deps: update dependencies

fix type erro in utils
This commit is contained in:
DefectingCat
2023-08-14 11:48:12 +08:00
parent cc66c95ad1
commit d6447c6a8e
3 changed files with 865 additions and 795 deletions

View File

@ -2,7 +2,7 @@ import * as THREE from 'three';
export const sortByDate = ( export const sortByDate = (
{ date: a }: { date: string }, { date: a }: { date: string },
{ date: b }: { date: string } { date: b }: { date: string },
) => { ) => {
if (a < b) { if (a < b) {
return 1; return 1;
@ -106,13 +106,13 @@ export const getMousePosition = (e: MouseEvent | globalThis.TouchEvent) => {
}; };
type Debounce = { type Debounce = {
<T extends unknown[], R>(fn: (...arg: T) => R, ms: number): ( <T extends unknown[], R>(
this: unknown, fn: (...arg: T) => R,
...arg: T ms: number,
) => void; ): (this: unknown, ...arg: T) => void;
}; };
export const debounce: Debounce = (fn, ms) => { export const debounce: Debounce = (fn, ms) => {
let timer: NodeJS.Timer; let timer: NodeJS.Timeout;
return function (...args) { return function (...args) {
clearTimeout(timer); clearTimeout(timer);
timer = setTimeout(() => { timer = setTimeout(() => {
@ -125,7 +125,7 @@ export const frameArea = (
sizeToFitOnScreen: number, sizeToFitOnScreen: number,
boxSize: number, boxSize: number,
boxCenter: THREE.Vector3, boxCenter: THREE.Vector3,
camera: THREE.PerspectiveCamera camera: THREE.PerspectiveCamera,
) => { ) => {
const halfSizeToFitOnScreen = sizeToFitOnScreen * 0.5; const halfSizeToFitOnScreen = sizeToFitOnScreen * 0.5;
const halfFovY = THREE.MathUtils.degToRad(camera.fov * 0.5); const halfFovY = THREE.MathUtils.degToRad(camera.fov * 0.5);

View File

@ -19,15 +19,15 @@
"@docsearch/react": "3", "@docsearch/react": "3",
"@giscus/react": "^2.3.0", "@giscus/react": "^2.3.0",
"@mapbox/rehype-prism": "^0.8.0", "@mapbox/rehype-prism": "^0.8.0",
"@react-three/drei": "^9.78.1", "@react-three/drei": "^9.80.2",
"@react-three/fiber": "^8.13.4", "@react-three/fiber": "^8.13.6",
"@tweenjs/tween.js": "^21.0.0", "@tweenjs/tween.js": "^21.0.0",
"algoliasearch": "^4.18.0", "algoliasearch": "^4.19.1",
"dayjs": "^1.11.9", "dayjs": "^1.11.9",
"next": "13.4.9", "next": "13.4.13",
"next-mdx-remote": "^4.4.1", "next-mdx-remote": "^4.4.1",
"next-themes": "^0.2.1", "next-themes": "^0.2.1",
"octokit": "^2.1.0", "octokit": "^3.1.0",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-icons": "^4.10.1", "react-icons": "^4.10.1",
@ -37,31 +37,31 @@
"remark-gfm": "^3.0.1", "remark-gfm": "^3.0.1",
"remark-parse": "^10.0.2", "remark-parse": "^10.0.2",
"remark-rehype": "^10.1.0", "remark-rehype": "^10.1.0",
"sharp": "^0.32.1", "sharp": "^0.32.4",
"three": "^0.154.0", "three": "^0.155.0",
"unified": "^10.1.2", "unified": "^10.1.2",
"zustand": "^4.3.9" "zustand": "^4.4.1"
}, },
"devDependencies": { "devDependencies": {
"@testing-library/jest-dom": "^5.16.5", "@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.0.0",
"@types/jest": "^29.5.3", "@types/jest": "^29.5.3",
"@types/node": "20.4.1", "@types/node": "20.5.0",
"@types/react": "18.2.14", "@types/react": "18.2.20",
"@types/three": "^0.153.0", "@types/three": "^0.155.0",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.15",
"clsx": "^1.2.1", "clsx": "^2.0.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
"encoding": "^0.1.13", "encoding": "^0.1.13",
"eslint": "8.44.0", "eslint": "8.47.0",
"eslint-config-next": "13.4.9", "eslint-config-next": "13.4.13",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"jest": "^29.6.1", "jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.1", "jest-environment-jsdom": "^29.6.2",
"postcss": "^8.4.25", "postcss": "^8.4.27",
"prettier": "^3.0.0", "prettier": "^3.0.1",
"tailwindcss": "^3.3.2", "tailwindcss": "^3.3.3",
"typescript": "5.1.6" "typescript": "5.1.6"
} }
} }

1604
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff