diff --git a/.github/workflows/test-multiple-builds.yml b/.github/workflows/test-multiple-builds.yml index 15d1bfaa..b8aedfc8 100644 --- a/.github/workflows/test-multiple-builds.yml +++ b/.github/workflows/test-multiple-builds.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: build: [cjs, esm] - env: [development, production] + env: [development] # [development, production] steps: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 @@ -26,10 +26,6 @@ jobs: cache-dependency-path: '**/pnpm-lock.yaml' - run: pnpm install --frozen-lockfile - run: pnpm build - - name: Use React 17 for production test - if: ${{ matrix.env == 'production' }} - run: | - pnpm add -D react@17.0.2 react-dom@17.0.2 @testing-library/react@12.1.4 - name: Patch for DEV-ONLY if: ${{ matrix.env == 'development' }} run: | @@ -44,7 +40,6 @@ jobs: if: ${{ matrix.build == 'cjs' }} run: | sed -i~ "s/resolve('\.\/src\(.*\)\.ts')/resolve('\.\/dist\1.js')/" vitest.config.ts - sed -i~ "s/\"valtio\/vanilla\"/\"..\/..\/..\/..\/..\/..\/dist\/vanilla.js\"/" node_modules/derive-valtio/dist/index.umd.js - name: Patch for ESM if: ${{ matrix.build == 'esm' }} run: | @@ -52,19 +47,6 @@ jobs: sed -i~ "1s/^/import.meta.env=import.meta.env||{};import.meta.env.MODE='${NODE_ENV}';/" tests/*.tsx env: NODE_ENV: ${{ matrix.env }} - - name: Patch for UMD - if: ${{ matrix.build == 'umd' }} - run: | - sed -i~ "s/resolve('\.\/src\(.*\)\.ts')/resolve('\.\/dist\/umd\1.${NODE_ENV}.js')/" vitest.config.ts - sed -i~ "s/\"valtio\/vanilla\"/\"..\/..\/..\/..\/..\/..\/dist\/umd\/vanilla.${NODE_ENV}.js\"/" node_modules/derive-valtio/dist/index.umd.js - env: - NODE_ENV: ${{ matrix.env }} - - name: Patch for SystemJS - if: ${{ matrix.build == 'system' }} - run: | - sed -i~ "s/resolve('\.\/src\(.*\)\.ts')/resolve('\.\/dist\/system\1.${NODE_ENV}.js')/" vitest.config.ts - env: - NODE_ENV: ${{ matrix.env }} - name: Test ${{ matrix.build }} ${{ matrix.env }} run: | pnpm test:spec diff --git a/.github/workflows/test-multiple-versions.yml b/.github/workflows/test-multiple-versions.yml index 2fc0a7fd..ebb210ea 100644 --- a/.github/workflows/test-multiple-versions.yml +++ b/.github/workflows/test-multiple-versions.yml @@ -29,9 +29,6 @@ jobs: fail-fast: false matrix: react: - - 16.8.0 - - 16.9.0 - - 17.0.0 - 18.0.0 - 18.1.0 - 18.2.0 diff --git a/.github/workflows/test-old-typescript.yml b/.github/workflows/test-old-typescript.yml index 400fc727..21500f6c 100644 --- a/.github/workflows/test-old-typescript.yml +++ b/.github/workflows/test-old-typescript.yml @@ -23,14 +23,6 @@ jobs: - 4.7.4 - 4.6.4 - 4.5.5 - - 4.4.4 - - 4.3.5 - - 4.2.3 - - 4.1.5 - - 4.0.5 - - 3.9.7 - - 3.8.3 - - 3.7.5 steps: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 @@ -45,39 +37,12 @@ jobs: - run: pnpm build - name: Patch for Old TS run: | - sed -i~ 's/\/\/ @ts-expect-error.*\[LATEST-TS-ONLY\]//' tests/*.tsx - sed -i~ 's/"target":/"skipLibCheck":true,"target":/' tsconfig.json - sed -i~ 's/"exactOptionalPropertyTypes": true,//' tsconfig.json sed -i~ 's/"moduleResolution": "bundler",/"moduleResolution": "node",/' tsconfig.json sed -i~ 's/"allowImportingTsExtensions": true,//' tsconfig.json - sed -i~ 's/"valtio": \["\.\/src\/index\.ts"\],/"valtio": [".\/dist\/ts3.4\/index.d.ts"],/' tsconfig.json - sed -i~ 's/"valtio\/\*": \["\.\/src\/\*\.ts"\]/"valtio\/*": [".\/dist\/ts3.4\/*.d.ts"]/' tsconfig.json + sed -i~ 's/"valtio": \["\.\/src\/index\.ts"\],/"valtio": [".\/dist\/index.d.ts"],/' tsconfig.json + sed -i~ 's/"valtio\/\*": \["\.\/src\/\*\.ts"\]/"valtio\/*": [".\/dist\/*.d.ts"]/' tsconfig.json sed -i~ 's/"include": .*/"include": ["src\/types.d.ts", "dist\/**\/*", "tests\/**\/*"],/' tsconfig.json - - name: Patch for Older TS - if: ${{ matrix.typescript == '4.4.4' ||matrix.typescript == '4.3.5' || matrix.typescript == '4.2.3' || matrix.typescript == '4.1.5' || matrix.typescript == '4.0.5' || startsWith(matrix.typescript, '3.') }} - run: | - sed -i~ 's/import\.meta\.env/(import.meta.env as any)/' tests/*.tsx - sed -i~ '1s/^/import React from "react";/' tests/*.tsx - sed -i~ 's/"jsx": "react-jsx"/"jsx": "react"/' tsconfig.json - sed -i~ 's/"noUncheckedIndexedAccess": true,//' tsconfig.json - pnpm json -I -f package.json -e "this.resolutions={}; this.resolutions['pretty-format']='25.5.0'; this.resolutions['@types/prettier']='2.4.2'; this.resolutions['@types/yargs']='17.0.13'; this.resolutions['@types/node']='18.11.18';" - pnpm add -D pretty-format@25.5.0 @types/prettier@2.4.2 @types/yargs@17.0.13 @types/node@18.11.18 @types/babel__traverse@7.18.2 - rm -r tests/macro-vite.* - name: Install old TypeScript - run: | - pnpm add -D typescript@${{ matrix.typescript }} - rm node_modules/.pnpm/parse5@*/node_modules/parse5/dist/*.d.ts - - name: Patch testing setup for Old TS - if: ${{ matrix.typescript == '4.4.4' || matrix.typescript == '4.3.5' || matrix.typescript == '4.2.3' || matrix.typescript == '4.1.5' || matrix.typescript == '4.0.5' || startsWith(matrix.typescript, '3.') }} - run: | - pnpm add -D vitest@0.33.0 @vitest/coverage-v8@0.33.0 @vitest/ui@0.33.0 - - name: Patch testing setup for older TS - if: ${{ matrix.typescript == '4.0.5' || startsWith(matrix.typescript, '3.') }} - run: | - pnpm add -D @testing-library/user-event@12.1.7 @testing-library/react@11.0.4 - rm node_modules/vitest/dist/*.d.ts - rm node_modules/.pnpm/@types+babel__traverse@*/node_modules/@types/babel__traverse/*.d.ts - echo "declare module 'vitest'" >> ./src/types.d.ts + run: pnpm add -D typescript@${{ matrix.typescript }} - name: Test ${{ matrix.typescript }} - run: | - pnpm test:types + run: pnpm test:types diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index fa15c8a7..00000000 --- a/babel.config.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = (api, targets) => { - // https://babeljs.io/docs/en/config-files#config-function-api - const isTestEnv = api.env('test') - - return { - babelrc: false, - ignore: ['./node_modules'], - presets: [ - [ - '@babel/preset-env', - { - loose: true, - modules: isTestEnv ? 'commonjs' : false, - targets: isTestEnv ? { node: 'current' } : targets, - }, - ], - ], - plugins: [ - [ - '@babel/plugin-transform-react-jsx', - { - runtime: 'automatic', - }, - ], - ['@babel/plugin-transform-typescript', { isTSX: true }], - ], - } -} diff --git a/docs/guides/migrating-to-v2.mdx b/docs/guides/migrating-to-v2.mdx new file mode 100644 index 00000000..9de5f6c1 --- /dev/null +++ b/docs/guides/migrating-to-v2.mdx @@ -0,0 +1,83 @@ +--- +title: 'How to Migrate to v2 from v1' +--- + +# How to Migrate to v2 from v1 + +## Changes in v2 + +React 19 officially introduces the `use` hook to handle promises. +Valtio v1 internally handled promises, which is no longer recommended. +In Valtio v2, promises are not handled internally, +and developers should explicitly use the `use` hook to manage promises. + +Valtio v2 also introduces several changes in its design choices: + +First, the behavior of `proxy(obj)` has changed. In v1, it was a pure function and deeply copied `obj`. In v2, it is an impure function and deeply modifies `obj`. Generally, reusing `obj` is not recommended, and if you have followed this convention, nothing will break. + +Second, the behavior of `useSnapshot()` has been altered. Although it is a subtle change, it is less optimized to ensure compatibility with `useMemo` and the upcoming React compiler. The change may lead to extra re-renders in some edge cases, but it might not be noticeable. + +Other notable changes to keep things updated and fresh include: + +- Removal of all deprecated features +- Requirement of React version 18 and above +- Requirement of TypeScript version 4.5 and above +- The build target updated to ES2018 + +## Migration for breaking changes + +### Resolving promises + +```js +// v1 +import { proxy, useSnapshot } from 'valtio' + +const state = proxy({ data: fetch(...).then((res) => res.json()) }) + +const Component = () => { + const snap = useSnapshot(state) + return <>{JSON.stringify(snap.data)} +} +``` + +```js +// v2 +import { use } from 'react' +import { proxy, useSnapshot } from 'valtio' + +const state = proxy({ data: fetch(...).then((res) => res.json()) }) + +const Component = () => { + const snap = useSnapshot(state) + return <>{JSON.stringify(use(snap.data))} + // If `data` is not an object, you can directly embed it in JSX. + // return <>{snap.data} +} +``` + +### Impure `proxy(obj)` + +```js +// v1 +import { proxy } from 'valtio' + +const state = proxy({ count: 1, obj: { text: 'hi' } }) +state.obj = { text: 'hello' } +``` + +```js +// v2 +import { proxy } from 'valtio' +import { deepClone } from 'valtio/utils' + +const state = proxy(deepClone({ count: 1, obj: { text: 'hi' } })) +state.obj = deepClone({ text: 'hello' }) +``` + +Note that `deepClone` is unnecessary unless you are reusing the object. +It is generally recommended to avoid reusing the object. + +## Links + +- https://github.com/pmndrs/valtio/discussions/703 +- https://github.com/pmndrs/valtio/pull/810 diff --git a/package.json b/package.json index 2f8bec6d..d6544535 100644 --- a/package.json +++ b/package.json @@ -3,16 +3,27 @@ "description": "💊 Valtio makes proxy-state simple for React and Vanilla", "private": true, "type": "commonjs", - "version": "1.13.2", + "version": "2.0.0-beta.5", + "publishConfig": { + "tag": "next" + }, "main": "./index.js", "types": "./index.d.ts", "typesVersions": { - "<4.5": { + ">=4.5": { + "esm/*": [ + "esm/*" + ], + "*": [ + "*" + ] + }, + "*": { "esm/*": [ - "ts3.4/*" + "ts_version_4.5_and_above_is_required.d.ts" ], "*": [ - "ts3.4/*" + "ts_version_4.5_and_above_is_required.d.ts" ] } }, @@ -23,10 +34,6 @@ "types": "./esm/index.d.mts", "default": "./esm/index.mjs" }, - "module": { - "types": "./esm/index.d.ts", - "default": "./esm/index.js" - }, "default": { "types": "./index.d.ts", "default": "./index.js" @@ -37,10 +44,6 @@ "types": "./esm/*.d.mts", "default": "./esm/*.mjs" }, - "module": { - "types": "./esm/*.d.ts", - "default": "./esm/*.js" - }, "default": { "types": "./*.d.ts", "default": "./*.js" @@ -61,9 +64,7 @@ "build:vanilla_utils": "rollup -c --config-vanilla_utils", "build:react": "rollup -c --config-react", "build:react_utils": "rollup -c --config-react_utils", - "build:macro": "rollup -c --config-macro", - "build:macro_vite": "rollup -c --config-macro_vite", - "postbuild": "pnpm patch-d-ts && pnpm copy && pnpm patch-macro-vite && pnpm patch-ts3.4 && pnpm patch-esm-ts", + "postbuild": "pnpm patch-d-ts && pnpm copy && pnpm patch-old-ts && pnpm patch-esm-ts", "prettier": "prettier '*.{js,json,md}' '{src,tests,docs}/**/*.{ts,tsx,md,mdx}' --write", "eslint": "eslint --no-eslintrc --c .eslintrc.json --fix '*.{js,json,ts}' '{src,tests}/**/*.{ts,tsx}'", "test": "pnpm run '/^test:.*/'", @@ -72,10 +73,9 @@ "test:lint": "eslint --no-eslintrc --c .eslintrc.json '*.{js,json,ts}' '{src,tests}/**/*.{ts,tsx}'", "test:spec": "vitest", "patch-d-ts": "node -e \"var {entries}=require('./rollup.config.js');require('shelljs').find('dist/**/*.d.ts').forEach(f=>{entries.forEach(({find,replacement})=>require('shelljs').sed('-i',new RegExp(' from \\''+find.source.slice(0,-1)+'\\';$'),' from \\''+replacement+'\\';',f));require('shelljs').sed('-i',/ from '(\\.[^']+)\\.ts';$/,' from \\'\\$1\\';',f)})\"", - "copy": "shx cp -r dist/src/* dist/esm && shx cp -r dist/src/* dist && shx rm -rf dist/{src,tests} && downlevel-dts dist dist/ts3.4 && shx cp package.json readme.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.prettier=undefined;\"", - "patch-macro-vite": "shx cp dist/esm/macro/vite.d.ts dist/macro/ && shx cp dist/ts3.4/esm/macro/vite.d.ts dist/ts3.4/macro/", - "patch-ts3.4": "node -e \"require('shelljs').find('dist/ts3.4/**/*.d.ts').forEach(f=>{require('fs').appendFileSync(f,'declare type Awaited = T extends Promise ? V : T;');require('shelljs').sed('-i',/^declare type Snapshot =/,'declare type Snapshot = T extends SnapshotIgnore ? T : T extends Promise ? Awaited : T extends object ? { readonly [K in keyof T]: Snapshot2 } : T; declare type Snapshot2 = T extends SnapshotIgnore ? T : T extends Promise ? Awaited : T extends object ? { readonly [K in keyof T]: T[K] } : T;;declare type _Snapshot =',f)})\"", - "patch-esm-ts": "node -e \"require('shelljs').find('dist/esm/**/*.d.ts').forEach(f=>{var f2=f.replace(/\\.ts$/,'.mts');require('fs').copyFileSync(f,f2);require('shelljs').sed('-i',/ from '(\\.[^']+)';$/,' from \\'\\$1.mjs\\';',f2);require('shelljs').sed('-i',/^declare module '(\\.[^']+)'/,'declare module \\'\\$1.mjs\\'',f2)})\"" + "copy": "shx cp -r dist/src/* dist/esm && shx cp -r dist/src/* dist && shx rm -rf dist/{src,tests} && shx cp package.json readme.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.prettier=undefined;\"", + "patch-old-ts": "shx touch dist/ts_version_4.5_and_above_is_required.d.ts", + "patch-esm-ts": "node -e \"require('shelljs').find('dist/esm/**/*.d.ts').forEach(f=>{var f2=f.replace(/\\.ts$/,'.mts');require('fs').renameSync(f,f2);require('shelljs').sed('-i',/ from '(\\.[^']+)';$/,' from \\'\\$1.mjs\\';',f2);require('shelljs').sed('-i',/^declare module '(\\.[^']+)'/,'declare module \\'\\$1.mjs\\'',f2)})\"" }, "engines": { "node": ">=12.20.0" @@ -106,42 +106,22 @@ "homepage": "https://github.com/pmndrs/valtio", "packageManager": "pnpm@8.15.0", "dependencies": { - "derive-valtio": "0.1.0", - "proxy-compare": "2.6.0", - "use-sync-external-store": "1.2.2" + "proxy-compare": "^3.0.0" }, "devDependencies": { - "@babel/core": "^7.24.5", - "@babel/helper-module-imports": "^7.24.3", - "@babel/plugin-transform-react-jsx": "^7.23.4", - "@babel/plugin-transform-typescript": "^7.24.5", - "@babel/preset-env": "^7.24.5", - "@babel/types": "^7.24.5", "@redux-devtools/extension": "^3.3.0", "@rollup/plugin-alias": "^5.1.0", - "@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "^5.0.5", - "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^11.1.6", "@testing-library/react": "^15.0.6", - "@typed-macro/core": "1.0.0-alpha", - "@typed-macro/runtime": "1.0.0-alpha", - "@types/babel-plugin-macros": "^3.1.3", - "@types/babel-plugin-tester": "^9.0.10", - "@types/babel__traverse": "^7.20.5", "@types/jsdom": "^21.1.6", - "@types/react": "18.2.56", + "@types/react": "^18.3.1", "@types/react-dom": "^18.3.0", - "@types/use-sync-external-store": "^0.0.6", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", "@vitest/coverage-v8": "^1.6.0", "@vitest/ui": "^1.6.0", - "aslemammad-vite-plugin-macro": "^1.0.0", - "babel-plugin-macros": "^3.1.0", - "babel-plugin-tester": "10.1.0", - "downlevel-dts": "^0.11.0", "esbuild": "^0.20.2", "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", @@ -157,8 +137,8 @@ "postinstall-postinstall": "^2.1.0", "prettier": "^3.2.5", "proxy-memoize": "^3.0.0", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "19.0.0-beta-1beb73de0f-20240503", + "react-dom": "19.0.0-beta-1beb73de0f-20240503", "redux": "^5.0.1", "rollup": "^4.17.2", "rollup-plugin-esbuild": "^6.1.1", @@ -174,8 +154,8 @@ "@types/react": "18.2.56" }, "peerDependencies": { - "@types/react": ">=16.8", - "react": ">=16.8" + "@types/react": ">=18.0.0", + "react": ">=18.0.0" }, "peerDependenciesMeta": { "@types/react": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 932833ee..d96edce1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,1381 +8,176 @@ overrides: '@types/react': 18.2.56 dependencies: - derive-valtio: - specifier: 0.1.0 - version: 0.1.0(valtio@1.13.2) proxy-compare: - specifier: 2.6.0 - version: 2.6.0 - use-sync-external-store: - specifier: 1.2.2 - version: 1.2.2(react@18.3.1) + specifier: ^3.0.0 + version: 3.0.0 devDependencies: - '@babel/core': - specifier: ^7.24.5 - version: 7.24.5 - '@babel/helper-module-imports': - specifier: ^7.24.3 - version: 7.24.3 - '@babel/plugin-transform-react-jsx': - specifier: ^7.23.4 - version: 7.23.4(@babel/core@7.24.5) - '@babel/plugin-transform-typescript': - specifier: ^7.24.5 - version: 7.24.5(@babel/core@7.24.5) - '@babel/preset-env': - specifier: ^7.24.5 - version: 7.24.5(@babel/core@7.24.5) - '@babel/types': - specifier: ^7.24.5 - version: 7.24.5 '@redux-devtools/extension': specifier: ^3.3.0 version: 3.3.0(redux@5.0.1) '@rollup/plugin-alias': specifier: ^5.1.0 version: 5.1.0(rollup@4.17.2) - '@rollup/plugin-babel': - specifier: ^6.0.4 - version: 6.0.4(@babel/core@7.24.5)(rollup@4.17.2) '@rollup/plugin-node-resolve': specifier: ^15.2.3 version: 15.2.3(rollup@4.17.2) '@rollup/plugin-replace': specifier: ^5.0.5 version: 5.0.5(rollup@4.17.2) - '@rollup/plugin-terser': - specifier: ^0.4.4 - version: 0.4.4(rollup@4.17.2) - '@rollup/plugin-typescript': - specifier: ^11.1.6 - version: 11.1.6(rollup@4.17.2)(tslib@2.6.2)(typescript@5.4.5) - '@testing-library/react': - specifier: ^15.0.6 - version: 15.0.7(@types/react@18.2.56)(react-dom@18.3.1)(react@18.3.1) - '@typed-macro/core': - specifier: 1.0.0-alpha - version: 1.0.0-alpha(chokidar@3.6.0) - '@typed-macro/runtime': - specifier: 1.0.0-alpha - version: 1.0.0-alpha(chokidar@3.6.0) - '@types/babel-plugin-macros': - specifier: ^3.1.3 - version: 3.1.3 - '@types/babel-plugin-tester': - specifier: ^9.0.10 - version: 9.0.10 - '@types/babel__traverse': - specifier: ^7.20.5 - version: 7.20.5 - '@types/jsdom': - specifier: ^21.1.6 - version: 21.1.6 - '@types/react': - specifier: 18.2.56 - version: 18.2.56 - '@types/react-dom': - specifier: ^18.3.0 - version: 18.3.0 - '@types/use-sync-external-store': - specifier: ^0.0.6 - version: 0.0.6 - '@typescript-eslint/eslint-plugin': - specifier: ^7.8.0 - version: 7.8.0(@typescript-eslint/parser@7.8.0)(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': - specifier: ^7.8.0 - version: 7.8.0(eslint@8.57.0)(typescript@5.4.5) - '@vitest/coverage-v8': - specifier: ^1.6.0 - version: 1.6.0(vitest@1.6.0) - '@vitest/ui': - specifier: ^1.6.0 - version: 1.6.0(vitest@1.6.0) - aslemammad-vite-plugin-macro: - specifier: ^1.0.0 - version: 1.0.0(vite@5.2.11) - babel-plugin-macros: - specifier: ^3.1.0 - version: 3.1.0 - babel-plugin-tester: - specifier: 10.1.0 - version: 10.1.0(@babel/core@7.24.5) - downlevel-dts: - specifier: ^0.11.0 - version: 0.11.0 - esbuild: - specifier: ^0.20.2 - version: 0.20.2 - eslint: - specifier: 8.57.0 - version: 8.57.0 - eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@8.57.0) - eslint-import-resolver-alias: - specifier: ^1.1.2 - version: 1.1.2(eslint-plugin-import@2.29.1) - eslint-plugin-import: - specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.8.0)(eslint@8.57.0) - eslint-plugin-prettier: - specifier: ^5.1.3 - version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) - eslint-plugin-react: - specifier: ^7.34.1 - version: 7.34.1(eslint@8.57.0) - eslint-plugin-react-hooks: - specifier: ^4.6.2 - version: 4.6.2(eslint@8.57.0) - eslint-plugin-vitest: - specifier: ^0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@7.8.0)(eslint@8.57.0)(typescript@5.4.5)(vitest@1.6.0) - jest-leak-detector: - specifier: ^29.7.0 - version: 29.7.0 - jsdom: - specifier: ^24.0.0 - version: 24.0.0 - json: - specifier: ^11.0.0 - version: 11.0.0 - postinstall-postinstall: - specifier: ^2.1.0 - version: 2.1.0 - prettier: - specifier: ^3.2.5 - version: 3.2.5 - proxy-memoize: - specifier: ^3.0.0 - version: 3.0.0 - react: - specifier: ^18.3.1 - version: 18.3.1 - react-dom: - specifier: ^18.3.1 - version: 18.3.1(react@18.3.1) - redux: - specifier: ^5.0.1 - version: 5.0.1 - rollup: - specifier: ^4.17.2 - version: 4.17.2 - rollup-plugin-esbuild: - specifier: ^6.1.1 - version: 6.1.1(esbuild@0.20.2)(rollup@4.17.2) - shelljs: - specifier: ^0.8.5 - version: 0.8.5 - shx: - specifier: ^0.3.4 - version: 0.3.4 - ts-expect: - specifier: ^1.3.0 - version: 1.3.0 - tslib: - specifier: ^2.6.2 - version: 2.6.2 - typescript: - specifier: ^5.4.5 - version: 5.4.5 - vite: - specifier: ^5.2.11 - version: 5.2.11 - vitest: - specifier: ^1.6.0 - version: 1.6.0(@vitest/ui@1.6.0)(jsdom@24.0.0) - -packages: - - /@ampproject/remapping@2.3.0: - resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - dev: true - - /@babel/code-frame@7.24.2: - resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.24.5 - picocolors: 1.0.0 - dev: true - - /@babel/compat-data@7.24.4: - resolution: {integrity: sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/core@7.24.5: - resolution: {integrity: sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==} - engines: {node: '>=6.9.0'} - dependencies: - '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.5 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) - '@babel/helpers': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 - convert-source-map: 2.0.0 - debug: 4.3.4 - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/generator@7.24.5: - resolution: {integrity: sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 - dev: true - - /@babel/helper-annotate-as-pure@7.22.5: - resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@babel/helper-builder-binary-assignment-operator-visitor@7.22.15: - resolution: {integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@babel/helper-compilation-targets@7.23.6: - resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/compat-data': 7.24.4 - '@babel/helper-validator-option': 7.23.5 - browserslist: 4.23.0 - lru-cache: 5.1.1 - semver: 6.3.1 - dev: true - - /@babel/helper-create-class-features-plugin@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-uRc4Cv8UQWnE4NXlYTIIdM7wfFkOqlFztcC/gVXDKohKoVB3OyonfelUBaJzSwpBntZ2KYGF/9S7asCHsXwW6g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-member-expression-to-functions': 7.24.5 - '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.5) - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/helper-split-export-declaration': 7.24.5 - semver: 6.3.1 - dev: true - - /@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.24.5): - resolution: {integrity: sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-annotate-as-pure': 7.22.5 - regexpu-core: 5.3.2 - semver: 6.3.1 - dev: true - - /@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.24.5): - resolution: {integrity: sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.5 - debug: 4.3.4 - lodash.debounce: 4.0.8 - resolve: 1.22.8 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-environment-visitor@7.22.20: - resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-function-name@7.23.0: - resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.24.0 - '@babel/types': 7.24.5 - dev: true - - /@babel/helper-hoist-variables@7.22.5: - resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@babel/helper-member-expression-to-functions@7.24.5: - resolution: {integrity: sha512-4owRteeihKWKamtqg4JmWSsEZU445xpFRXPEwp44HbgbxdWlUV1b4Agg4lkA806Lil5XM/e+FJyS0vj5T6vmcA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@babel/helper-module-imports@7.24.3: - resolution: {integrity: sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@babel/helper-module-transforms@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.24.3 - '@babel/helper-simple-access': 7.24.5 - '@babel/helper-split-export-declaration': 7.24.5 - '@babel/helper-validator-identifier': 7.24.5 - dev: true - - /@babel/helper-optimise-call-expression@7.22.5: - resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@babel/helper-plugin-utils@7.24.5: - resolution: {integrity: sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-remap-async-to-generator@7.22.20(@babel/core@7.24.5): - resolution: {integrity: sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-wrap-function': 7.24.5 - dev: true - - /@babel/helper-replace-supers@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-member-expression-to-functions': 7.24.5 - '@babel/helper-optimise-call-expression': 7.22.5 - dev: true - - /@babel/helper-simple-access@7.24.5: - resolution: {integrity: sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@babel/helper-skip-transparent-expression-wrappers@7.22.5: - resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@babel/helper-split-export-declaration@7.24.5: - resolution: {integrity: sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@babel/helper-string-parser@7.24.1: - resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-identifier@7.24.5: - resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-option@7.23.5: - resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-wrap-function@7.24.5: - resolution: {integrity: sha512-/xxzuNvgRl4/HLNKvnFwdhdgN3cpLxgLROeLDl83Yx0AJ1SGvq1ak0OszTOjDfiB8Vx03eJbeDWh9r+jCCWttw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-function-name': 7.23.0 - '@babel/template': 7.24.0 - '@babel/types': 7.24.5 - dev: true - - /@babel/helpers@7.24.5: - resolution: {integrity: sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/highlight@7.24.5: - resolution: {integrity: sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.24.5 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.0.0 - dev: true - - /@babel/parser@7.24.5: - resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-LdXRi1wEMTrHVR4Zc9F8OewC3vdm5h4QB6L71zy6StmYeqGi1b3ttIO8UC+BfZKcH9jdr4aI249rBkm+3+YvHw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-y4HqEnkelJIOQGd+3g1bTeKsA5c6qM7eOn7VggGVbBc0y8MLSKHacwcIE2PplNlQSj0PqS9rrXL/nkPVK+kUNg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-Hj791Ii4ci8HqnaKHAlLNs+zaLXb0EzSDhiAWp5VNlyvCNymYfacs64pxTxbH1znW/NcArSmwpmG9IKE/TUVVQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.13.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-transform-optional-chaining': 7.24.5(@babel/core@7.24.5) - dev: true - - /@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-m9m/fXsXLiHfwdgydIFnpk+7jlVbnvlK5B2EKiPdLUb6WX654ZaaEWJUjk8TftRbZpK0XibovlLWX4KIZhV6jw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.5): - resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - dev: true - - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.5): - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.5): - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.24.5): - resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.24.5): - resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.24.5): - resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-import-assertions@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-IuwnI5XnuF189t91XbxmXeCDz3qs6iDRO7GJ++wcfgeXNs/8FmIlKcpDSXNVyuLQxlwvskmI3Ct73wUODkJBlQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-import-attributes@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-zhQTMH0X2nVLnb04tz+s7AMuasX8U0FnpE+nHTOhSOINjWMnopoZTxtIKsd45n4GQ/HIZLyfIpoul8e2m0DnRA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.5): - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.5): - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.5): - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.5): - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.5): - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.5): - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.5): - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.5): - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.24.5): - resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.5): - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.24.5): - resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-arrow-functions@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-ngT/3NkRhsaep9ck9uj2Xhv9+xB1zShY3tM3g6om4xxCELwCDN4g4Aq5dRn48+0hasAql7s2hdBOysCfNpr4fw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-async-generator-functions@7.24.3(@babel/core@7.24.5): - resolution: {integrity: sha512-Qe26CMYVjpQxJ8zxM1340JFNjZaF+ISWpr1Kt/jGo+ZTUzKkfw/pphEWbRCb+lmSM6k/TOgfYLvmbHkUQ0asIg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.24.5) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-async-to-generator@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-AawPptitRXp1y0n4ilKcGbRYWfbbzFWz2NqNu7dacYDtFtz0CMjG64b3LQsb3KIgnf4/obcUL78hfaOS7iCUfw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-module-imports': 7.24.3 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-block-scoped-functions@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-TWWC18OShZutrv9C6mye1xwtam+uNi2bnTOCBUd5sZxyHOiWbU6ztSROofIMrK84uweEZC219POICK/sTYwfgg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-block-scoping@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-sMfBc3OxghjC95BkYrYocHL3NaOplrcaunblzwXhGmlPwpmfsxr4vK+mBBt49r+S240vahmv+kUxkeKgs+haCw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-class-properties@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-OMLCXi0NqvJfORTaPQBwqLXHhb93wkBKZ4aNwMl6WtehO7ar+cmp+89iPEQPqxAnxsOKTaMcs3POz3rKayJ72g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-class-static-block@7.24.4(@babel/core@7.24.5): - resolution: {integrity: sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.12.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-classes@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-gWkLP25DFj2dwe9Ck8uwMOpko4YsqyfZJrOmqqcegeDYEbp7rmn4U6UQZNj08UF6MaX39XenSpKRCvpDRBtZ7Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.5) - '@babel/helper-split-export-declaration': 7.24.5 - globals: 11.12.0 - dev: true - - /@babel/plugin-transform-computed-properties@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-5pJGVIUfJpOS+pAqBQd+QMaTD2vCL/HcePooON6pDpHgRp4gNRmzyHTPIkXntwKsq3ayUFVfJaIKPw2pOkOcTw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/template': 7.24.0 - dev: true - - /@babel/plugin-transform-destructuring@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-SZuuLyfxvsm+Ah57I/i1HVjveBENYK9ue8MJ7qkc7ndoNjqquJiElzA7f5yaAXjyW2hKojosOTAQQRX50bPSVg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-dotall-regex@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-p7uUxgSoZwZ2lPNMzUkqCts3xlp8n+o05ikjy7gbtFJSt9gdU88jAmtfmOxHM14noQXBxfgzf2yRWECiNVhTCw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-duplicate-keys@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-msyzuUnvsjsaSaocV6L7ErfNsa5nDWL1XKNnDePLgmz+WdU4w/J8+AxBMrWfi9m4IxfL5sZQKUPQKDQeeAT6lA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-dynamic-import@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-av2gdSTyXcJVdI+8aFZsCAtR29xJt0S5tas+Ef8NvBNmD1a+N/3ecMLeMBgfcK+xzsjdLDT6oHt+DFPyeqUbDA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-exponentiation-operator@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-U1yX13dVBSwS23DEAqU+Z/PkwE9/m7QQy8Y9/+Tdb8UWYaGNDYwTLi19wqIAiROr8sXVum9A/rtiH5H0boUcTw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.15 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-export-namespace-from@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-Ft38m/KFOyzKw2UaJFkWG9QnHPG/Q/2SkOrRk4pNBPg5IPZ+dOxcmkK5IyuBcxiNPyyYowPGUReyBvrvZs7IlQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-for-of@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-OxBdcnF04bpdQdR3i4giHZNZQn7cm8RQKcSwA17wAAqEELo1ZOwp5FFgeptWUQXFyT9kwHo10aqqauYkRZPCAg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - dev: true - - /@babel/plugin-transform-function-name@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-BXmDZpPlh7jwicKArQASrj8n22/w6iymRnvHYYd2zO30DbE277JO20/7yXJT3QxDPtiQiOxQBbZH4TpivNXIxA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-json-strings@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-U7RMFmRvoasscrIFy5xA4gIp8iWnWubnKkKuUGJjsuOH7GfbMkB+XZzeslx2kLdEGdOJDamEmCqOks6e8nv8DQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-literals@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-zn9pwz8U7nCqOYIiBaOxoQOtYmMODXTJnkxG4AtX8fPmnCRYWBOHD0qcpwS9e2VDSp1zNJYpdnFMIKb8jmwu6g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-logical-assignment-operators@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-OhN6J4Bpz+hIBqItTeWJujDOfNP+unqv/NJgyhlpSqgBTPm37KkMmZV6SYcOj+pnDbdcl1qRGV/ZiIjX9Iy34w==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-member-expression-literals@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-4ojai0KysTWXzHseJKa1XPNXKRbuUrhkOPY4rEGeR+7ChlJVKxFa3H3Bz+7tWaGKgJAXUWKOGmltN+u9B3+CVg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-modules-amd@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-lAxNHi4HVtjnHd5Rxg3D5t99Xm6H7b04hUS7EHIXcUl2EV4yl1gWdqZrNzXnSrHveL9qMdbODlLF55mvgjAfaQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-modules-commonjs@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-simple-access': 7.24.5 - dev: true - - /@babel/plugin-transform-modules-systemjs@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-mqQ3Zh9vFO1Tpmlt8QPnbwGHzNz3lpNEMxQb1kAemn/erstyqw1r9KeOlOfo3y6xAnFEcOv2tSyrXfmMk+/YZA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-validator-identifier': 7.24.5 - dev: true - - /@babel/plugin-transform-modules-umd@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-tuA3lpPj+5ITfcCluy6nWonSL7RvaG0AOTeAuvXqEKS34lnLzXpDb0dcP6K8jD0zWZFNDVly90AGFJPnm4fOYg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.24.5): - resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-new-target@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-/rurytBM34hYy0HKZQyA0nHbQgQNFm4Q/BOc9Hflxi2X3twRof7NaE5W46j4kQitm7SvACVRXsa6N/tSZxvPug==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-nullish-coalescing-operator@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-iQ+caew8wRrhCikO5DrUYx0mrmdhkaELgFa+7baMcVuhxIkN7oxt06CZ51D65ugIb1UWRQ8oQe+HXAVM6qHFjw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-numeric-separator@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-7GAsGlK4cNL2OExJH1DzmDeKnRv/LXq0eLUSvudrehVA5Rgg4bIrqEUW29FbKMBRT0ztSqisv7kjP+XIC4ZMNw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-object-rest-spread@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-7EauQHszLGM3ay7a161tTQH7fj+3vVM/gThlz5HpFtnygTxjrlvoeq7MPVA1Vy9Q555OB8SnAOsMkLShNkkrHA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-transform-parameters': 7.24.5(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-object-super@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-oKJqR3TeI5hSLRxudMjFQ9re9fBVUU0GICqM3J1mi8MqlhVr6hC/ZN4ttAyMuQR6EZZIY6h/exe5swqGNNIkWQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-optional-catch-binding@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-oBTH7oURV4Y+3EUrf6cWn1OHio3qG/PVwO5J03iSJmBg6m2EhKjkAu/xuaXaYwWW9miYtvbWv4LNf0AmR43LUA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-optional-chaining@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-xWCkmwKT+ihmA6l7SSTpk8e4qQl/274iNbSKRRS8mpqFR32ksy36+a+LWY8OXCCEefF8WFlnOHVsaDI2231wBg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-parameters@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-9Co00MqZ2aoky+4j2jhofErthm6QVLKbpQrvz20c3CH9KQCLHyNB+t2ya4/UrRpQGR+Wrwjg9foopoeSdnHOkA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-private-methods@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-tGvisebwBO5em4PaYNqt4fkw56K2VALsAbAakY0FjTYqJp7gfdrgr7YX76Or8/cpik0W6+tj3rZ0uHU9Oil4tw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-private-property-in-object@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-JM4MHZqnWR04jPMujQDTBVRnqxpLLpx2tkn7iPn+Hmsc0Gnb79yvRWOkvqFOx3Z7P7VxiRIR22c4eGSNj87OBQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.5) - dev: true - - /@babel/plugin-transform-property-literals@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-LetvD7CrHmEx0G442gOomRr66d7q8HzzGGr4PMHGr+5YIm6++Yke+jxj246rpvsbyhJwCLxcTn6zW1P1BSenqA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5): - resolution: {integrity: sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-module-imports': 7.24.3 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.5) - '@babel/types': 7.24.5 - dev: true - - /@babel/plugin-transform-regenerator@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-sJwZBCzIBE4t+5Q4IGLaaun5ExVMRY0lYwos/jNecjMrVCygCdph3IKv0tkP5Fc87e/1+bebAmEAGBfnRD+cnw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - regenerator-transform: 0.15.2 - dev: true - - /@babel/plugin-transform-reserved-words@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-JAclqStUfIwKN15HrsQADFgeZt+wexNQ0uLhuqvqAUFoqPMjEcFCYZBhq0LUdz6dZK/mD+rErhW71fbx8RYElg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-shorthand-properties@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-LyjVB1nsJ6gTTUKRjRWx9C1s9hE7dLfP/knKdrfeH9UPtAGjYGgxIbFfx7xyLIEWs7Xe1Gnf8EWiUqfjLhInZA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-spread@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-KjmcIM+fxgY+KxPVbjelJC6hrH1CgtPmTvdXAfn3/a9CnWGSTY7nH4zm5+cjmWJybdcPSsD0++QssDsjcpe47g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - dev: true - - /@babel/plugin-transform-sticky-regex@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-9v0f1bRXgPVcPrngOQvLXeGNNVLc8UjMVfebo9ka0WF3/7+aVUHmaJVT3sa0XCzEFioPfPHZiOcYG9qOsH63cw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/plugin-transform-template-literals@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-WRkhROsNzriarqECASCNu/nojeXCDTE/F2HmRgOzi7NGvyfYGq1NEjKBK3ckLfRgGc6/lPAqP0vDOSw3YtG34g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true + '@rollup/plugin-typescript': + specifier: ^11.1.6 + version: 11.1.6(rollup@4.17.2)(tslib@2.6.2)(typescript@5.4.5) + '@testing-library/react': + specifier: ^15.0.6 + version: 15.0.7(@types/react@18.2.56)(react-dom@19.0.0-beta-1beb73de0f-20240503)(react@19.0.0-beta-1beb73de0f-20240503) + '@types/jsdom': + specifier: ^21.1.6 + version: 21.1.6 + '@types/react': + specifier: 18.2.56 + version: 18.2.56 + '@types/react-dom': + specifier: ^18.3.0 + version: 18.3.0 + '@typescript-eslint/eslint-plugin': + specifier: ^7.8.0 + version: 7.8.0(@typescript-eslint/parser@7.8.0)(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': + specifier: ^7.8.0 + version: 7.8.0(eslint@8.57.0)(typescript@5.4.5) + '@vitest/coverage-v8': + specifier: ^1.6.0 + version: 1.6.0(vitest@1.6.0) + '@vitest/ui': + specifier: ^1.6.0 + version: 1.6.0(vitest@1.6.0) + esbuild: + specifier: ^0.20.2 + version: 0.20.2 + eslint: + specifier: 8.57.0 + version: 8.57.0 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@8.57.0) + eslint-import-resolver-alias: + specifier: ^1.1.2 + version: 1.1.2(eslint-plugin-import@2.29.1) + eslint-plugin-import: + specifier: ^2.29.1 + version: 2.29.1(@typescript-eslint/parser@7.8.0)(eslint@8.57.0) + eslint-plugin-prettier: + specifier: ^5.1.3 + version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) + eslint-plugin-react: + specifier: ^7.34.1 + version: 7.34.1(eslint@8.57.0) + eslint-plugin-react-hooks: + specifier: ^4.6.2 + version: 4.6.2(eslint@8.57.0) + eslint-plugin-vitest: + specifier: ^0.5.4 + version: 0.5.4(@typescript-eslint/eslint-plugin@7.8.0)(eslint@8.57.0)(typescript@5.4.5)(vitest@1.6.0) + jest-leak-detector: + specifier: ^29.7.0 + version: 29.7.0 + jsdom: + specifier: ^24.0.0 + version: 24.0.0 + json: + specifier: ^11.0.0 + version: 11.0.0 + postinstall-postinstall: + specifier: ^2.1.0 + version: 2.1.0 + prettier: + specifier: ^3.2.5 + version: 3.2.5 + proxy-memoize: + specifier: ^3.0.0 + version: 3.0.0 + react: + specifier: 19.0.0-beta-1beb73de0f-20240503 + version: 19.0.0-beta-1beb73de0f-20240503 + react-dom: + specifier: 19.0.0-beta-1beb73de0f-20240503 + version: 19.0.0-beta-1beb73de0f-20240503(react@19.0.0-beta-1beb73de0f-20240503) + redux: + specifier: ^5.0.1 + version: 5.0.1 + rollup: + specifier: ^4.17.2 + version: 4.17.2 + rollup-plugin-esbuild: + specifier: ^6.1.1 + version: 6.1.1(esbuild@0.20.2)(rollup@4.17.2) + shelljs: + specifier: ^0.8.5 + version: 0.8.5 + shx: + specifier: ^0.3.4 + version: 0.3.4 + ts-expect: + specifier: ^1.3.0 + version: 1.3.0 + tslib: + specifier: ^2.6.2 + version: 2.6.2 + typescript: + specifier: ^5.4.5 + version: 5.4.5 + vite: + specifier: ^5.2.11 + version: 5.2.11 + vitest: + specifier: ^1.6.0 + version: 1.6.0(@vitest/ui@1.6.0)(jsdom@24.0.0) - /@babel/plugin-transform-typeof-symbol@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-UTGnhYVZtTAjdwOTzT+sCyXmTn8AhaxOS/MjG9REclZ6ULHWF9KoCZur0HSGU7hk8PdBFKKbYe6+gqdXWz84Jg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 - dev: true +packages: - /@babel/plugin-transform-typescript@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-E0VWu/hk83BIFUWnsKZ4D81KXjN5L3MobvevOHErASk9IPwKHOkTgvqzvNo1yP/ePJWqqK2SpUR5z+KQbl6NVw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 + /@ampproject/remapping@2.3.0: + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} dependencies: - '@babel/core': 7.24.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.24.5(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.5) + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 dev: true - /@babel/plugin-transform-unicode-escapes@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-RlkVIcWT4TLI96zM660S877E7beKlQw7Ig+wqkKBiWfj0zH5Q4h50q6er4wzZKRNSYpfo6ILJ+hrJAGSX2qcNw==} + /@babel/code-frame@7.24.2: + resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/highlight': 7.24.5 + picocolors: 1.0.0 dev: true - /@babel/plugin-transform-unicode-property-regex@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-Ss4VvlfYV5huWApFsF8/Sq0oXnGO+jB+rijFEFugTd3cwSObUSnUi88djgR5528Csl0uKlrI331kRqe56Ov2Ng==} + /@babel/helper-string-parser@7.24.1: + resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 dev: true - /@babel/plugin-transform-unicode-regex@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-2A/94wgZgxfTsiLaQ2E36XAOdcZmGAaEEgVmxQWwZXWkGhvoHbaqXcKnU8zny4ycpu3vNqg0L/PcCiYtHtA13g==} + /@babel/helper-validator-identifier@7.24.5: + resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 dev: true - /@babel/plugin-transform-unicode-sets-regex@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-fqj4WuzzS+ukpgerpAoOnMfQXwUHFxXUZUE84oL2Kao2N8uSlvcpnAidKASgsNgzZHBsHWvcm8s9FPWUhAb8fA==} + /@babel/highlight@7.24.5: + resolution: {integrity: sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.5) - '@babel/helper-plugin-utils': 7.24.5 - dev: true - - /@babel/preset-env@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-UGK2ifKtcC8i5AI4cH+sbLLuLc2ktYSFJgBAXorKAsHUZmrQ1q6aQ6i3BvU24wWs2AAKqQB6kq3N9V9Gw1HiMQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/compat-data': 7.24.4 - '@babel/core': 7.24.5 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.5 - '@babel/helper-validator-option': 7.23.5 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.24.5(@babel/core@7.24.5) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.5) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.5) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.5) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.5) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-import-assertions': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-syntax-import-attributes': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.5) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.5) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.5) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.5) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.5) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.24.5) - '@babel/plugin-transform-arrow-functions': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-async-generator-functions': 7.24.3(@babel/core@7.24.5) - '@babel/plugin-transform-async-to-generator': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-block-scoped-functions': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-block-scoping': 7.24.5(@babel/core@7.24.5) - '@babel/plugin-transform-class-properties': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-class-static-block': 7.24.4(@babel/core@7.24.5) - '@babel/plugin-transform-classes': 7.24.5(@babel/core@7.24.5) - '@babel/plugin-transform-computed-properties': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-destructuring': 7.24.5(@babel/core@7.24.5) - '@babel/plugin-transform-dotall-regex': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-duplicate-keys': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-dynamic-import': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-exponentiation-operator': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-export-namespace-from': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-for-of': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-function-name': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-json-strings': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-literals': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-logical-assignment-operators': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-member-expression-literals': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-modules-amd': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-modules-systemjs': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-modules-umd': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.24.5) - '@babel/plugin-transform-new-target': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-nullish-coalescing-operator': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-numeric-separator': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-object-rest-spread': 7.24.5(@babel/core@7.24.5) - '@babel/plugin-transform-object-super': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-optional-catch-binding': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-optional-chaining': 7.24.5(@babel/core@7.24.5) - '@babel/plugin-transform-parameters': 7.24.5(@babel/core@7.24.5) - '@babel/plugin-transform-private-methods': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-private-property-in-object': 7.24.5(@babel/core@7.24.5) - '@babel/plugin-transform-property-literals': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-regenerator': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-reserved-words': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-shorthand-properties': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-spread': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-sticky-regex': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-template-literals': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-typeof-symbol': 7.24.5(@babel/core@7.24.5) - '@babel/plugin-transform-unicode-escapes': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-unicode-property-regex': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-unicode-regex': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-transform-unicode-sets-regex': 7.24.1(@babel/core@7.24.5) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.24.5) - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.24.5) - babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.5) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.24.5) - core-js-compat: 3.37.0 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color + '@babel/helper-validator-identifier': 7.24.5 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.0.0 dev: true - /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.24.5): - resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==} - peerDependencies: - '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 + /@babel/parser@7.24.5: + resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} + engines: {node: '>=6.0.0'} + hasBin: true dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 '@babel/types': 7.24.5 - esutils: 2.0.3 - dev: true - - /@babel/regjsgen@0.8.0: - resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} dev: true /@babel/runtime@7.24.5: @@ -1392,33 +187,6 @@ packages: regenerator-runtime: 0.14.1 dev: true - /@babel/template@7.24.0: - resolution: {integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.24.2 - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 - dev: true - - /@babel/traverse@7.24.5: - resolution: {integrity: sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/types@7.24.5: resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} engines: {node: '>=6.9.0'} @@ -1727,13 +495,6 @@ packages: engines: {node: '>=6.0.0'} dev: true - /@jridgewell/source-map@0.3.6: - resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - dev: true - /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true @@ -1798,25 +559,6 @@ packages: slash: 4.0.0 dev: true - /@rollup/plugin-babel@6.0.4(@babel/core@7.24.5)(rollup@4.17.2): - resolution: {integrity: sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==} - engines: {node: '>=14.0.0'} - peerDependencies: - '@babel/core': ^7.0.0 - '@types/babel__core': ^7.1.9 - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - '@types/babel__core': - optional: true - rollup: - optional: true - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-module-imports': 7.24.3 - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) - rollup: 4.17.2 - dev: true - /@rollup/plugin-node-resolve@15.2.3(rollup@4.17.2): resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} @@ -1849,21 +591,6 @@ packages: rollup: 4.17.2 dev: true - /@rollup/plugin-terser@0.4.4(rollup@4.17.2): - resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - rollup: 4.17.2 - serialize-javascript: 6.0.2 - smob: 1.5.0 - terser: 5.31.0 - dev: true - /@rollup/plugin-typescript@11.1.6(rollup@4.17.2)(tslib@2.6.2)(typescript@5.4.5): resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} engines: {node: '>=14.0.0'} @@ -2045,7 +772,7 @@ packages: pretty-format: 27.5.1 dev: true - /@testing-library/react@15.0.7(@types/react@18.2.56)(react-dom@18.3.1)(react@18.3.1): + /@testing-library/react@15.0.7(@types/react@18.2.56)(react-dom@19.0.0-beta-1beb73de0f-20240503)(react@19.0.0-beta-1beb73de0f-20240503): resolution: {integrity: sha512-cg0RvEdD1TIhhkm1IeYMQxrzy0MtUNfa3minv4MjbgcYzJAZ7yD0i0lwoPOTPr+INtiXFezt2o8xMSnyHhEn2Q==} engines: {node: '>=18'} peerDependencies: @@ -2057,139 +784,15 @@ packages: optional: true dependencies: '@babel/runtime': 7.24.5 - '@testing-library/dom': 10.1.0 - '@types/react': 18.2.56 - '@types/react-dom': 18.3.0 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - dev: true - - /@typed-macro/core@1.0.0-alpha(chokidar@3.6.0): - resolution: {integrity: sha512-8tKQ8PMcqUu8a3joZCvt+CR6cPjq+ijW1YRRl8aToGotmYwmjGUTTJOWpWU+YgAn7fPlYPb66XkfXUVvXcXPWA==} - peerDependencies: - chokidar: ^3.5.2 - dependencies: - '@babel/generator': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 - '@typed-macro/shared': 1.0.0-alpha - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.5 - chokidar: 3.6.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@typed-macro/core@1.0.0-alpha.1: - resolution: {integrity: sha512-Io7F9hZVuj5UXBrJBYlEdOThxV0/S3jweJqKs936a4nnXxmePa91EFkSFdtAPMXo76Eyl0748WUPIF131dfciQ==} - dependencies: - '@babel/generator': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 - '@typed-macro/shared': 1.0.0-alpha.1 - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@typed-macro/runtime@1.0.0-alpha(chokidar@3.6.0): - resolution: {integrity: sha512-XWvAPFN/JIrxlep4WKZwD74YSkEyHG/3w2xPzH1xEiC4+uTBan/QIZ+iyOxuv1HB1ef/+2NlyR6C5AmG+xJEuQ==} - peerDependencies: - chokidar: ^3.5.2 - dependencies: - '@babel/generator': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 - '@typed-macro/core': 1.0.0-alpha(chokidar@3.6.0) - '@typed-macro/shared': 1.0.0-alpha - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.5 - chokidar: 3.6.0 - picomatch: 2.3.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@typed-macro/runtime@1.0.0-alpha.1: - resolution: {integrity: sha512-u+4Wb909rzcTqGHWyisfmbkgDqGQr810hDt5WsIBHcLrEnJMw7CXlb70FQ41Ij2NJkGUzF4Ay25NLou6jYPlcg==} - dependencies: - '@babel/generator': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 - '@typed-macro/core': 1.0.0-alpha.1 - '@typed-macro/shared': 1.0.0-alpha.1 - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.5 - picomatch: 2.3.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@typed-macro/shared@1.0.0-alpha: - resolution: {integrity: sha512-4kB0MtyKl+asBX7UJfb/rONAeq0/aL0z+Eaj/TTgkmJ9aYRqWL6RWAw34iqsQiOEWGrXyfcjvXB/ohj++WbRXw==} - dev: true - - /@typed-macro/shared@1.0.0-alpha.1: - resolution: {integrity: sha512-4qw1Dtfkzj/dkVut8oCkfRa5y0YZzmklK0GYMA3E6+JofqJSpZfX1SvM6+Iv40kiSZz74XgqUXet645vZh3X1A==} - dev: true - - /@types/aria-query@5.0.4: - resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} - dev: true - - /@types/babel-plugin-macros@3.1.3: - resolution: {integrity: sha512-JU+MgpsHK3taY18mBETy5XlwY6LVngte7QXYzUuXEaaX0CN8dBqbjXtADe+gJmkSQE1FJHufzPj++OWZlhRmGw==} - dependencies: - '@types/babel__core': 7.20.5 - dev: true - - /@types/babel-plugin-tester@9.0.10: - resolution: {integrity: sha512-X+n3nZb8qIZ3a07qt7B5ONfptAZJ6nWLgU5I4U+gm0dRgtcjL+73P2tUkQAJ/iIbRF72BlW/2of5J0qbjlmsBw==} - dependencies: - '@types/babel__core': 7.20.5 - '@types/prettier': 2.7.3 - dev: true - - /@types/babel__core@7.20.5: - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.5 - dev: true - - /@types/babel__generator@7.6.8: - resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} - dependencies: - '@babel/types': 7.24.5 - dev: true - - /@types/babel__template@7.4.4: - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@testing-library/dom': 10.1.0 + '@types/react': 18.2.56 + '@types/react-dom': 18.3.0 + react: 19.0.0-beta-1beb73de0f-20240503 + react-dom: 19.0.0-beta-1beb73de0f-20240503(react@19.0.0-beta-1beb73de0f-20240503) dev: true - /@types/babel__traverse@7.20.5: - resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} - dependencies: - '@babel/types': 7.24.5 + /@types/aria-query@5.0.4: + resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} dev: true /@types/estree@1.0.5: @@ -2218,16 +821,9 @@ packages: undici-types: 5.26.5 dev: true - /@types/parse-json@4.0.2: - resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} - dev: true - - /@types/prettier@2.7.3: - resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} - dev: true - /@types/prop-types@15.7.12: resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} + dev: true /@types/react-dom@18.3.0: resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} @@ -2241,6 +837,7 @@ packages: '@types/prop-types': 15.7.12 '@types/scheduler': 0.23.0 csstype: 3.1.3 + dev: true /@types/resolve@1.20.2: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} @@ -2248,6 +845,7 @@ packages: /@types/scheduler@0.23.0: resolution: {integrity: sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw==} + dev: true /@types/semver@7.5.8: resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -2257,10 +855,6 @@ packages: resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} dev: true - /@types/use-sync-external-store@0.0.6: - resolution: {integrity: sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==} - dev: true - /@typescript-eslint/eslint-plugin@7.8.0(@typescript-eslint/parser@7.8.0)(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -2535,14 +1129,6 @@ packages: engines: {node: '>=10'} dev: true - /anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - dev: true - /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true @@ -2655,20 +1241,6 @@ packages: is-shared-array-buffer: 1.0.3 dev: true - /aslemammad-vite-plugin-macro@1.0.0(vite@5.2.11): - resolution: {integrity: sha512-PFxmuU34aHoA6yNSsV5apBUB06xL2d3raSeEhdjzsN514kWRSzpTTwGV3hYw2PsqUxy9SyXAFD9TIqg3Rj5zNg==} - peerDependencies: - vite: '*' - dependencies: - '@typed-macro/core': 1.0.0-alpha.1 - '@typed-macro/runtime': 1.0.0-alpha.1 - '@typed-macro/shared': 1.0.0-alpha.1 - chokidar: 3.6.0 - vite: 5.2.11 - transitivePeerDependencies: - - supports-color - dev: true - /assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true @@ -2684,73 +1256,10 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /babel-plugin-macros@3.1.0: - resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} - engines: {node: '>=10', npm: '>=6'} - dependencies: - '@babel/runtime': 7.24.5 - cosmiconfig: 7.1.0 - resolve: 1.22.8 - dev: true - - /babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.24.5): - resolution: {integrity: sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/compat-data': 7.24.4 - '@babel/core': 7.24.5 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.5) - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-polyfill-corejs3@0.10.4(@babel/core@7.24.5): - resolution: {integrity: sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.5) - core-js-compat: 3.37.0 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.24.5): - resolution: {integrity: sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.5) - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-tester@10.1.0(@babel/core@7.24.5): - resolution: {integrity: sha512-4P2tNaM/Mtg6ytA9YAqmgONnMYqWvdbGDuwRTpIIC9yFZGQrEHoyvDPCx+X1QALAufVb5DKieOPGj5dffiEiNg==} - engines: {node: '>=10.13', npm: '>=6'} - peerDependencies: - '@babel/core': ^7.11.6 - dependencies: - '@babel/core': 7.24.5 - '@types/babel-plugin-tester': 9.0.10 - lodash.mergewith: 4.6.2 - prettier: 2.8.8 - strip-indent: 3.0.0 - dev: true - /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true - /binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - dev: true - /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -2771,21 +1280,6 @@ packages: fill-range: 7.0.1 dev: true - /browserslist@4.23.0: - resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001617 - electron-to-chromium: 1.4.762 - node-releases: 2.0.14 - update-browserslist-db: 1.0.15(browserslist@4.23.0) - dev: true - - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} @@ -2812,10 +1306,6 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001617: - resolution: {integrity: sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA==} - dev: true - /chai@4.4.1: resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} engines: {node: '>=4'} @@ -2852,21 +1342,6 @@ packages: get-func-name: 2.0.2 dev: true - /chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.3 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - dev: true - /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -2895,10 +1370,6 @@ packages: delayed-stream: 1.0.0 dev: true - /commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: true - /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true @@ -2907,27 +1378,6 @@ packages: resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} dev: true - /convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - dev: true - - /core-js-compat@3.37.0: - resolution: {integrity: sha512-vYq4L+T8aS5UuFg4UwDhc7YNRWVeVZwltad9C/jV3R2LgVOpS9BDr7l/WL6BN0dbV3k1XejPTHqqEzJgsa0frA==} - dependencies: - browserslist: 4.23.0 - dev: true - - /cosmiconfig@7.1.0: - resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} - engines: {node: '>=10'} - dependencies: - '@types/parse-json': 4.0.2 - import-fresh: 3.3.0 - parse-json: 5.2.0 - path-type: 4.0.0 - yaml: 1.10.2 - dev: true - /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2946,6 +1396,7 @@ packages: /csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + dev: true /data-urls@5.0.0: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} @@ -3053,14 +1504,6 @@ packages: engines: {node: '>=6'} dev: true - /derive-valtio@0.1.0(valtio@1.13.2): - resolution: {integrity: sha512-OCg2UsLbXK7GmmpzMXhYkdO64vhJ1ROUUGaTFyHjVwEdMEcTTRj7W1TxLbSBxdY8QLBPCcp66MTyaSy0RpO17A==} - peerDependencies: - valtio: '*' - dependencies: - valtio: 1.13.2(@types/react@18.2.56)(react@18.3.1) - dev: false - /diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3091,30 +1534,11 @@ packages: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} dev: true - /downlevel-dts@0.11.0: - resolution: {integrity: sha512-vo835pntK7kzYStk7xUHDifiYJvXxVhUapt85uk2AI94gUUAQX9HNRtrcMHNSc3YHJUEHGbYIGsM99uIbgAtxw==} - hasBin: true - dependencies: - semver: 7.6.2 - shelljs: 0.8.5 - typescript: 5.5.0-dev.20240509 - dev: true - - /electron-to-chromium@1.4.762: - resolution: {integrity: sha512-rrFvGweLxPwwSwJOjIopy3Vr+J3cIPtZzuc74bmlvmBIgQO3VYJDvVrlj94iKZ3ukXUH64Ex31hSfRTLqvjYJQ==} - dev: true - /entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} dev: true - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - dependencies: - is-arrayish: 0.2.1 - dev: true - /es-abstract@1.23.3: resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} engines: {node: '>= 0.4'} @@ -3265,11 +1689,6 @@ packages: '@esbuild/win32-x64': 0.20.2 dev: true - /escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} - engines: {node: '>=6'} - dev: true - /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -3686,11 +2105,6 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true - /gensync@1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} - dev: true - /get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} dev: true @@ -3751,11 +2165,6 @@ packages: path-is-absolute: 1.0.1 dev: true - /globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - dev: true - /globals@13.24.0: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} @@ -3935,10 +2344,6 @@ packages: get-intrinsic: 1.2.4 dev: true - /is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: true - /is-async-function@2.0.0: resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} engines: {node: '>= 0.4'} @@ -3952,13 +2357,6 @@ packages: has-bigints: 1.0.2 dev: true - /is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.3.0 - dev: true - /is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} @@ -4190,6 +2588,7 @@ packages: /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true /js-tokens@9.0.0: resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==} @@ -4238,25 +2637,10 @@ packages: - utf-8-validate dev: true - /jsesc@0.5.0: - resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} - hasBin: true - dev: true - - /jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} - hasBin: true - dev: true - /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: true - /json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: true - /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true @@ -4272,12 +2656,6 @@ packages: minimist: 1.2.8 dev: true - /json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true - dev: true - /json@11.0.0: resolution: {integrity: sha512-N/ITv3Yw9Za8cGxuQqSqrq6RHnlaHWZkAFavcfpH/R52522c26EbihMxnY7A1chxfXJ4d+cEFIsyTgfi9GihrA==} engines: {node: '>=0.10.0'} @@ -4308,10 +2686,6 @@ packages: type-check: 0.4.0 dev: true - /lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true - /local-pkg@0.5.0: resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} engines: {node: '>=14'} @@ -4327,23 +2701,16 @@ packages: p-locate: 5.0.0 dev: true - /lodash.debounce@4.0.8: - resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} - dev: true - /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true - /lodash.mergewith@4.6.2: - resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==} - dev: true - /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true dependencies: js-tokens: 4.0.0 + dev: true /loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} @@ -4351,12 +2718,6 @@ packages: get-func-name: 2.0.2 dev: true - /lru-cache@5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - dependencies: - yallist: 3.1.1 - dev: true - /lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -4417,11 +2778,6 @@ packages: engines: {node: '>=12'} dev: true - /min-indent@1.0.1: - resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} - engines: {node: '>=4'} - dev: true - /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -4471,15 +2827,6 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true - /node-releases@2.0.14: - resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} - dev: true - - /normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true - /npm-run-path@5.3.0: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4614,16 +2961,6 @@ packages: callsites: 3.1.0 dev: true - /parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - dependencies: - '@babel/code-frame': 7.24.2 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - dev: true - /parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} dependencies: @@ -4715,12 +3052,6 @@ packages: fast-diff: 1.3.0 dev: true - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - dev: true - /prettier@3.2.5: resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} engines: {node: '>=14'} @@ -4753,13 +3084,8 @@ packages: react-is: 16.13.1 dev: true - /proxy-compare@2.6.0: - resolution: {integrity: sha512-8xuCeM3l8yqdmbPoYeLbrAXCBWu19XEYc5/F28f5qOaoAIMyfmBUkl5axiK+x9olUvRlcekvnm98AP9RDngOIw==} - dev: false - /proxy-compare@3.0.0: resolution: {integrity: sha512-y44MCkgtZUCT9tZGuE278fB7PWVf7fRYy0vbRXAts2o5F0EfC4fIQrvQQGBJo1WJbFcVLXzApOscyJuZqHQc1w==} - dev: true /proxy-memoize@3.0.0: resolution: {integrity: sha512-2fs4eIg4w6SfOjKHGVdg5tJ9WgHifEXKo2gfS/+tHGajO2YtAu03lLs+ltNKnteGKvq3SvHromkZeKus4J39/g==} @@ -4784,20 +3110,13 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true - /randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - dependencies: - safe-buffer: 5.2.1 - dev: true - - /react-dom@18.3.1(react@18.3.1): - resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + /react-dom@19.0.0-beta-1beb73de0f-20240503(react@19.0.0-beta-1beb73de0f-20240503): + resolution: {integrity: sha512-rO+shDuY8lkywpDDeQswtY//YnqIif4bpkkCQLDCwGqU+wk8m4PLJUeVEwzdfTQ2M8B74Urgh9P6WGnWuhAblQ==} peerDependencies: - react: ^18.3.1 + react: 19.0.0-beta-1beb73de0f-20240503 dependencies: - loose-envify: 1.4.0 - react: 18.3.1 - scheduler: 0.23.2 + react: 19.0.0-beta-1beb73de0f-20240503 + scheduler: 0.25.0-beta-1beb73de0f-20240503 dev: true /react-is@16.13.1: @@ -4812,17 +3131,9 @@ packages: resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} dev: true - /react@18.3.1: - resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + /react@19.0.0-beta-1beb73de0f-20240503: + resolution: {integrity: sha512-8/w0xugUoj/eE/270K+2DU4tbGG1XYKejW9yxzJCunIQfpSos80wlPT4F6rFuPiQLko46csH7F3zac6zQWvotg==} engines: {node: '>=0.10.0'} - dependencies: - loose-envify: 1.4.0 - - /readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.1 dev: true /rechoir@0.6.2: @@ -4849,27 +3160,10 @@ packages: which-builtin-type: 1.1.3 dev: true - /regenerate-unicode-properties@10.1.1: - resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==} - engines: {node: '>=4'} - dependencies: - regenerate: 1.4.2 - dev: true - - /regenerate@1.4.2: - resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} - dev: true - /regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} dev: true - /regenerator-transform@0.15.2: - resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} - dependencies: - '@babel/runtime': 7.24.5 - dev: true - /regexp.prototype.flags@1.5.2: resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} engines: {node: '>= 0.4'} @@ -4880,25 +3174,6 @@ packages: set-function-name: 2.0.2 dev: true - /regexpu-core@5.3.2: - resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} - engines: {node: '>=4'} - dependencies: - '@babel/regjsgen': 0.8.0 - regenerate: 1.4.2 - regenerate-unicode-properties: 10.1.1 - regjsparser: 0.9.1 - unicode-match-property-ecmascript: 2.0.0 - unicode-match-property-value-ecmascript: 2.1.0 - dev: true - - /regjsparser@0.9.1: - resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} - hasBin: true - dependencies: - jsesc: 0.5.0 - dev: true - /requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} dev: true @@ -5005,10 +3280,6 @@ packages: isarray: 2.0.5 dev: true - /safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true - /safe-regex-test@1.0.3: resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} engines: {node: '>= 0.4'} @@ -5029,10 +3300,8 @@ packages: xmlchars: 2.2.0 dev: true - /scheduler@0.23.2: - resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} - dependencies: - loose-envify: 1.4.0 + /scheduler@0.25.0-beta-1beb73de0f-20240503: + resolution: {integrity: sha512-DjdpTSyuA41YgJxUfivFeOrtP94k+k2f51IOTY+AWELpiTKDudU/3lkmx9O9rt1zj5o2dIQZFapNcKReRQcSew==} dev: true /semver@6.3.1: @@ -5046,12 +3315,6 @@ packages: hasBin: true dev: true - /serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - dependencies: - randombytes: 2.1.0 - dev: true - /set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -5143,27 +3406,11 @@ packages: engines: {node: '>=12'} dev: true - /smob@1.5.0: - resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} - dev: true - /source-map-js@1.2.0: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} dev: true - /source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true - /stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true @@ -5234,13 +3481,6 @@ packages: engines: {node: '>=12'} dev: true - /strip-indent@3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} - dependencies: - min-indent: 1.0.1 - dev: true - /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -5283,17 +3523,6 @@ packages: tslib: 2.6.2 dev: true - /terser@5.31.0: - resolution: {integrity: sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==} - engines: {node: '>=10'} - hasBin: true - dependencies: - '@jridgewell/source-map': 0.3.6 - acorn: 8.11.3 - commander: 2.20.3 - source-map-support: 0.5.21 - dev: true - /test-exclude@6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} @@ -5448,12 +3677,6 @@ packages: hasBin: true dev: true - /typescript@5.5.0-dev.20240509: - resolution: {integrity: sha512-r/zZRQGt3udzXP4ZaxPUs7r+NgrzW94LRfqa0XrFe0IXANWaewB/amTIL8O/zZ9qRv4QN34kr4td6HJsSbG9eA==} - engines: {node: '>=14.17'} - hasBin: true - dev: true - /ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} dev: true @@ -5471,45 +3694,11 @@ packages: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true - /unicode-canonical-property-names-ecmascript@2.0.0: - resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} - engines: {node: '>=4'} - dev: true - - /unicode-match-property-ecmascript@2.0.0: - resolution: {integrity: sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==} - engines: {node: '>=4'} - dependencies: - unicode-canonical-property-names-ecmascript: 2.0.0 - unicode-property-aliases-ecmascript: 2.1.0 - dev: true - - /unicode-match-property-value-ecmascript@2.1.0: - resolution: {integrity: sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==} - engines: {node: '>=4'} - dev: true - - /unicode-property-aliases-ecmascript@2.1.0: - resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} - engines: {node: '>=4'} - dev: true - /universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} dev: true - /update-browserslist-db@1.0.15(browserslist@4.23.0): - resolution: {integrity: sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - dependencies: - browserslist: 4.23.0 - escalade: 3.1.2 - picocolors: 1.0.0 - dev: true - /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -5523,41 +3712,6 @@ packages: requires-port: 1.0.0 dev: true - /use-sync-external-store@1.2.0(react@18.3.1): - resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - dependencies: - react: 18.3.1 - dev: false - - /use-sync-external-store@1.2.2(react@18.3.1): - resolution: {integrity: sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - dependencies: - react: 18.3.1 - dev: false - - /valtio@1.13.2(@types/react@18.2.56)(react@18.3.1): - resolution: {integrity: sha512-Qik0o+DSy741TmkqmRfjq+0xpZBXi/Y6+fXZLn0xNF1z/waFMbE3rkivv5Zcf9RrMUp6zswf2J7sbh2KBlba5A==} - engines: {node: '>=12.20.0'} - peerDependencies: - '@types/react': 18.2.56 - react: '>=16.8' - peerDependenciesMeta: - '@types/react': - optional: true - react: - optional: true - dependencies: - '@types/react': 18.2.56 - derive-valtio: 0.1.0(valtio@1.13.2) - proxy-compare: 2.6.0 - react: 18.3.1 - use-sync-external-store: 1.2.0(react@18.3.1) - dev: false - /vite-node@1.6.0: resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -5800,15 +3954,6 @@ packages: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} dev: true - /yallist@3.1.1: - resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - dev: true - - /yaml@1.10.2: - resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} - engines: {node: '>= 6'} - dev: true - /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} diff --git a/rollup.config.js b/rollup.config.js index 5709ae77..b0dc7d3d 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,12 +1,9 @@ const path = require('path') const alias = require('@rollup/plugin-alias') -const babelPlugin = require('@rollup/plugin-babel') const resolve = require('@rollup/plugin-node-resolve') const replace = require('@rollup/plugin-replace') -const terser = require('@rollup/plugin-terser') const typescript = require('@rollup/plugin-typescript') const { default: esbuild } = require('rollup-plugin-esbuild') -const createBabelConfig = require('./babel.config.js') const extensions = ['.js', '.ts', '.tsx'] const { root } = path.parse(process.cwd()) @@ -21,18 +18,8 @@ function external(id) { return !id.startsWith('.') && !id.startsWith(root) } -function getBabelOptions(targets) { - return { - ...createBabelConfig({ env: (env) => env === 'build' }, targets), - extensions, - comments: false, - babelHelpers: 'bundled', - } -} - -function getEsbuild(env = 'development') { +function getEsbuild() { return esbuild({ - minify: env === 'production', target: 'es2018', supported: { 'import-meta': true }, tsconfig: path.resolve('./tsconfig.json'), @@ -73,8 +60,6 @@ function createESMConfig(input, output) { 'import.meta.env?.MODE': '(import.meta.env ? import.meta.env.MODE : undefined)', }), - // a workround for #410 - 'use-sync-external-store/shim': 'use-sync-external-store/shim/index.js', delimiters: ['\\b', '\\b(?!(\\.|/))'], preventAssignment: true, }), @@ -86,7 +71,7 @@ function createESMConfig(input, output) { function createCommonJSConfig(input, output) { return { input, - output: { file: `${output}.js`, format: 'cjs' }, + output: { file: output, format: 'cjs' }, external, plugins: [ alias({ entries: entries.filter((e) => !e.find.test(input)) }), @@ -96,65 +81,7 @@ function createCommonJSConfig(input, output) { delimiters: ['\\b', '\\b(?!(\\.|/))'], preventAssignment: true, }), - babelPlugin(getBabelOptions({ ie: 11 })), - ], - } -} - -function createUMDConfig(input, output, env) { - let name = 'valtio' - const fileName = output.slice('dist/umd/'.length) - const capitalize = (s) => s.slice(0, 1).toUpperCase() + s.slice(1) - if (fileName !== 'index') { - name += fileName.replace(/(\w+)\W*/g, (_, p) => capitalize(p)) - } - return { - input, - output: { - file: `${output}.${env}.js`, - format: 'umd', - name, - globals: { - react: 'React', - 'valtio/vanilla': 'valtioVanilla', - 'valtio/utils': 'valtioUtils', - 'valtio/react': 'valtioReact', - 'valtio/vanilla/utils': 'valtioVanillaUtils', - 'valtio/react/utils': 'valtioReactUtils', - }, - }, - external, - plugins: [ - alias({ entries: entries.filter((e) => !e.find.test(input)) }), - resolve({ extensions }), - replace({ - 'import.meta.env?.MODE': JSON.stringify(env), - delimiters: ['\\b', '\\b(?!(\\.|/))'], - preventAssignment: true, - }), - babelPlugin(getBabelOptions({ ie: 11 })), - ...(env === 'production' ? [terser()] : []), - ], - } -} - -function createSystemConfig(input, output, env) { - return { - input, - output: { - file: `${output}.${env}.js`, - format: 'system', - }, - external, - plugins: [ - alias({ entries: entries.filter((e) => !e.find.test(input)) }), - resolve({ extensions }), - replace({ - 'import.meta.env?.MODE': JSON.stringify(env), - delimiters: ['\\b', '\\b(?!(\\.|/))'], - preventAssignment: true, - }), - getEsbuild(env), + getEsbuild(), ], } } @@ -168,13 +95,8 @@ module.exports = function (args) { } return [ ...(c === 'index' ? [createDeclarationConfig(`src/${c}.ts`, 'dist')] : []), - createCommonJSConfig(`src/${c}.ts`, `dist/${c}`), - createESMConfig(`src/${c}.ts`, `dist/esm/${c}.js`), + createCommonJSConfig(`src/${c}.ts`, `dist/${c}.js`), createESMConfig(`src/${c}.ts`, `dist/esm/${c}.mjs`), - createUMDConfig(`src/${c}.ts`, `dist/umd/${c}`, 'development'), - createUMDConfig(`src/${c}.ts`, `dist/umd/${c}`, 'production'), - createSystemConfig(`src/${c}.ts`, `dist/system/${c}`, 'development'), - createSystemConfig(`src/${c}.ts`, `dist/system/${c}`, 'production'), ] } diff --git a/src/macro.ts b/src/macro.ts deleted file mode 100644 index f6801e60..00000000 --- a/src/macro.ts +++ /dev/null @@ -1,50 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import { addNamed } from '@babel/helper-module-imports' -import type { NodePath } from '@babel/traverse' -import * as t from '@babel/types' -import { MacroError, createMacro } from 'babel-plugin-macros' - -const macro = ({ references }: any) => { - if (import.meta.env?.MODE !== 'production') { - console.warn('[DEPRECATED] Use useProxy hook instead.') - } - references.useProxy?.forEach((path: NodePath) => { - const hook = addNamed(path, 'useSnapshot', 'valtio') - const proxy = (path.parentPath?.get('arguments.0') as any)?.node - if (!t.isIdentifier(proxy)) throw new MacroError('no proxy object') - const snap = t.identifier(`valtio_macro_snap_${proxy.name}`) - path.parentPath?.parentPath?.replaceWith( - t.variableDeclaration('const', [ - t.variableDeclarator(snap, t.callExpression(hook, [proxy])), - ]), - ) - let inFunction = 0 - path.parentPath?.getFunctionParent()?.traverse({ - Identifier(p) { - if ( - inFunction === 0 && // in render - p.node !== proxy && - p.node.name === proxy.name - ) { - p.node.name = snap.name - } - }, - Function: { - enter() { - ++inFunction - }, - exit() { - --inFunction - }, - }, - }) - }) -} - -/** - * @deprecated Use useProxy hook instead. - */ -export declare function useProxy(proxyObject: T): void - -export default createMacro(macro, { configName: 'valtio' }) diff --git a/src/macro/vite.ts b/src/macro/vite.ts deleted file mode 100644 index d24bc5d4..00000000 --- a/src/macro/vite.ts +++ /dev/null @@ -1,73 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import * as babelModuleImports from '@babel/helper-module-imports' -import * as t from '@babel/types' -import * as plugin from 'aslemammad-vite-plugin-macro' -import * as babelMacro from 'babel-plugin-macros' - -const { defineMacro, defineMacroProvider, createMacroPlugin } = - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - ('default' in plugin ? plugin.default : plugin) as typeof plugin - -// const {} = plugin.default as typeof import('aslemammad-vite-plugin-macro') -export const valtioMacro = defineMacro(`useProxy`) - .withSignature(`(proxyObject: T): void`) - .withHandler((ctx) => { - const { path, args } = ctx - const hook = babelModuleImports.addNamed(path, 'useSnapshot', 'valtio') - const proxy = args[0]?.node - - if (!t.isIdentifier(proxy)) { - throw new babelMacro.MacroError('no proxy object') - } - - const snap = t.identifier(`valtio_macro_snap_${proxy.name}`) - path.parentPath?.replaceWith( - t.variableDeclaration('const', [ - t.variableDeclarator(snap, t.callExpression(hook, [proxy])), - ]), - ) - - let inFunction = 0 - path.parentPath?.getFunctionParent()?.traverse({ - Identifier(p) { - if ( - inFunction === 0 && // in render - p.node !== proxy && - p.node.name === proxy.name - ) { - p.node.name = snap.name - } - }, - Function: { - enter() { - ++inFunction - }, - exit() { - --inFunction - }, - }, - }) - }) - -export function provideValtioMacro() { - if (import.meta.env?.MODE !== 'production') { - console.warn('[DEPRECATED] Use useProxy hook instead.') - } - return defineMacroProvider({ - id: 'valtio/macro', - exports: { - 'valtio/macro': { - macros: [valtioMacro], - }, - }, - }) -} - -/** - * @deprecated Use useProxy hook instead. - */ -const macroPlugin = createMacroPlugin({}).use(provideValtioMacro()) - -export default macroPlugin diff --git a/src/react.ts b/src/react.ts index a02d5aca..ce078e67 100644 --- a/src/react.ts +++ b/src/react.ts @@ -1,28 +1,19 @@ -/// - -import ReactExports, { +import { useCallback, useDebugValue, useEffect, + useLayoutEffect, useMemo, useRef, + useSyncExternalStore, } from 'react' import { affectedToPathList, createProxy as createProxyToCompare, isChanged, } from 'proxy-compare' -// import { useSyncExternalStore } from 'use-sync-external-store/shim' -// This doesn't work in ESM, because use-sync-external-store only exposes CJS. -// See: https://github.com/pmndrs/valtio/issues/452 -// The following is a workaround until ESM is supported. -// eslint-disable-next-line import/extensions -import useSyncExternalStoreExports from 'use-sync-external-store/shim' import { snapshot, subscribe } from './vanilla.ts' -import type { INTERNAL_Snapshot as Snapshot } from './vanilla.ts' - -const { use } = ReactExports -const { useSyncExternalStore } = useSyncExternalStoreExports +import type { Snapshot } from './vanilla.ts' const useAffectedDebugValue = ( state: object, @@ -120,8 +111,10 @@ export function useSnapshot( options?: Options, ): Snapshot { const notifyInSync = options?.sync + // per-proxy & per-hook affected, it's not ideal but memo compatible + // eslint-disable-next-line react-hooks/exhaustive-deps + const affected = useMemo(() => new WeakMap(), [proxyObject]) const lastSnapshot = useRef>() - const lastAffected = useRef>() let inRender = true const currSnapshot = useSyncExternalStore( useCallback( @@ -133,16 +126,15 @@ export function useSnapshot( [proxyObject, notifyInSync], ), () => { - const nextSnapshot = snapshot(proxyObject, use) + const nextSnapshot = snapshot(proxyObject) try { if ( !inRender && lastSnapshot.current && - lastAffected.current && !isChanged( lastSnapshot.current, nextSnapshot, - lastAffected.current, + affected, new WeakMap(), ) ) { @@ -154,23 +146,16 @@ export function useSnapshot( } return nextSnapshot }, - () => snapshot(proxyObject, use), + () => snapshot(proxyObject), ) inRender = false - const currAffected = new WeakMap() - useEffect(() => { + useLayoutEffect(() => { lastSnapshot.current = currSnapshot - lastAffected.current = currAffected }) if (import.meta.env?.MODE !== 'production') { // eslint-disable-next-line react-hooks/rules-of-hooks - useAffectedDebugValue(currSnapshot as object, currAffected) + useAffectedDebugValue(currSnapshot as object, affected) } const proxyCache = useMemo(() => new WeakMap(), []) // per-hook proxyCache - return createProxyToCompare( - currSnapshot, - currAffected, - proxyCache, - targetCache, - ) + return createProxyToCompare(currSnapshot, affected, proxyCache, targetCache) } diff --git a/src/vanilla.ts b/src/vanilla.ts index 44fc6556..21df9a1e 100644 --- a/src/vanilla.ts +++ b/src/vanilla.ts @@ -28,29 +28,15 @@ type SnapshotIgnore = | AnyFunction | Primitive -type Snapshot = T extends { $$valtioSnapshot: infer S } +export type Snapshot = T extends { $$valtioSnapshot: infer S } ? S : T extends SnapshotIgnore ? T - : T extends Promise - ? Awaited - : T extends object - ? { readonly [K in keyof T]: Snapshot } - : T + : T extends object + ? { readonly [K in keyof T]: Snapshot } + : T -/** - * This is not a public API. - * It can be changed without any notice. - */ -export type INTERNAL_Snapshot = Snapshot - -type HandlePromise =

>(promise: P) => Awaited

- -type CreateSnapshot = ( - target: T, - version: number, - handlePromise?: HandlePromise, -) => T +type CreateSnapshot = (target: T, version: number) => T type RemoveListener = () => void type AddListener = (listener: Listener) => RemoveListener @@ -85,29 +71,11 @@ const buildProxyFunction = ( !(x instanceof RegExp) && !(x instanceof ArrayBuffer), - defaultHandlePromise =

>( - promise: P & { - status?: 'pending' | 'fulfilled' | 'rejected' - value?: Awaited

- reason?: unknown - }, - ) => { - switch (promise.status) { - case 'fulfilled': - return promise.value as Awaited

- case 'rejected': - throw promise.reason - default: - throw promise - } - }, - snapCache = new WeakMap(), createSnapshot: CreateSnapshot = ( target: T, version: number, - handlePromise: HandlePromise = defaultHandlePromise, ): T => { const cache = snapCache.get(target) if (cache?.[0] === version) { @@ -137,18 +105,11 @@ const buildProxyFunction = ( } if (refSet.has(value as object)) { markToTrack(value as object, false) // mark not to track - } else if (value instanceof Promise) { - delete desc.value - desc.get = () => handlePromise(value) } else if (proxyStateMap.has(value as object)) { const [target, ensureVersion] = proxyStateMap.get( value as object, ) as ProxyState - desc.value = createSnapshot( - target, - ensureVersion(), - handlePromise, - ) as Snapshot + desc.value = createSnapshot(target, ensureVersion()) as Snapshot } Object.defineProperty(snap, key, desc) }) @@ -159,11 +120,11 @@ const buildProxyFunction = ( versionHolder = [1, 1] as [number, number], - proxyFunction = (initialObject: T): T => { - if (!isObject(initialObject)) { + proxyFunction = (baseObject: T): T => { + if (!isObject(baseObject)) { throw new Error('object required') } - const found = proxyCache.get(initialObject) as T | undefined + const found = proxyCache.get(baseObject) as T | undefined if (found) { return found } @@ -199,18 +160,23 @@ const buildProxyFunction = ( string | symbol, readonly [ProxyState, RemoveListener?] >() - const addPropListener = ( - prop: string | symbol, - propProxyState: ProxyState, - ) => { - if (import.meta.env?.MODE !== 'production' && propProxyStates.has(prop)) { - throw new Error('prop listener already exists') - } - if (listeners.size) { - const remove = propProxyState[3](createPropListener(prop)) - propProxyStates.set(prop, [propProxyState, remove]) - } else { - propProxyStates.set(prop, [propProxyState]) + const addPropListener = (prop: string | symbol, propValue: unknown) => { + const propProxyState = + !refSet.has(propValue as object) && + proxyStateMap.get(propValue as object) + if (propProxyState) { + if ( + import.meta.env?.MODE !== 'production' && + propProxyStates.has(prop) + ) { + throw new Error('prop listener already exists') + } + if (listeners.size) { + const remove = propProxyState[3](createPropListener(prop)) + propProxyStates.set(prop, [propProxyState, remove]) + } else { + propProxyStates.set(prop, [propProxyState]) + } } } const removePropListener = (prop: string | symbol) => { @@ -244,9 +210,7 @@ const buildProxyFunction = ( } return removeListener } - const baseObject = Array.isArray(initialObject) - ? [] - : Object.create(Object.getPrototypeOf(initialObject)) + let initializing = true const handler: ProxyHandler = { deleteProperty(target: T, prop: string | symbol) { const prevValue = Reflect.get(target, prop) @@ -258,7 +222,7 @@ const buildProxyFunction = ( return deleted }, set(target: T, prop: string | symbol, value: any, receiver: object) { - const hasPrevValue = Reflect.has(target, prop) + const hasPrevValue = !initializing && Reflect.has(target, prop) const prevValue = Reflect.get(target, prop, receiver) if ( hasPrevValue && @@ -289,11 +253,7 @@ const buildProxyFunction = ( if (!proxyStateMap.has(value) && canProxy(value)) { nextValue = proxyFunction(value) } - const childProxyState = - !refSet.has(nextValue) && proxyStateMap.get(nextValue) - if (childProxyState) { - addPropListener(prop, childProxyState) - } + addPropListener(prop, nextValue) } Reflect.set(target, prop, nextValue, receiver) notifyUpdate(['set', [prop], value, prevValue]) @@ -301,7 +261,7 @@ const buildProxyFunction = ( }, } const proxyObject = newProxy(baseObject, handler) - proxyCache.set(initialObject, proxyObject) + proxyCache.set(baseObject, proxyObject) const proxyState: ProxyState = [ baseObject, ensureVersion, @@ -309,20 +269,16 @@ const buildProxyFunction = ( addListener, ] proxyStateMap.set(proxyObject, proxyState) - Reflect.ownKeys(initialObject).forEach((key) => { + Reflect.ownKeys(baseObject).forEach((key) => { const desc = Object.getOwnPropertyDescriptor( - initialObject, + baseObject, key, ) as PropertyDescriptor - if ('value' in desc) { - proxyObject[key as keyof T] = initialObject[key as keyof T] - // We need to delete desc.value because we already set it, - // and delete desc.writable because we want to write it again. - delete desc.value - delete desc.writable + if ('value' in desc && desc.writable) { + proxyObject[key as keyof T] = baseObject[key as keyof T] } - Object.defineProperty(baseObject, key, desc) }) + initializing = false return proxyObject }, ) => @@ -336,7 +292,6 @@ const buildProxyFunction = ( objectIs, newProxy, canProxy, - defaultHandlePromise, snapCache, createSnapshot, proxyCache, @@ -345,8 +300,8 @@ const buildProxyFunction = ( const [defaultProxyFunction] = buildProxyFunction() -export function proxy(initialObject: T = {} as T): T { - return defaultProxyFunction(initialObject) +export function proxy(baseObject: T = {} as T): T { + return defaultProxyFunction(baseObject) } export function getVersion(proxyObject: unknown): number | undefined { @@ -390,16 +345,13 @@ export function subscribe( } } -export function snapshot( - proxyObject: T, - handlePromise?: HandlePromise, -): Snapshot { +export function snapshot(proxyObject: T): Snapshot { const proxyState = proxyStateMap.get(proxyObject as object) if (import.meta.env?.MODE !== 'production' && !proxyState) { console.warn('Please use proxy object') } const [target, ensureVersion, createSnapshot] = proxyState as ProxyState - return createSnapshot(target, ensureVersion(), handlePromise) as Snapshot + return createSnapshot(target, ensureVersion()) as Snapshot } export function ref(obj: T) { diff --git a/src/vanilla/utils.ts b/src/vanilla/utils.ts index 21bf9d85..0e45446c 100644 --- a/src/vanilla/utils.ts +++ b/src/vanilla/utils.ts @@ -1,9 +1,6 @@ export { subscribeKey } from './utils/subscribeKey.ts' export { watch } from './utils/watch.ts' export { devtools } from './utils/devtools.ts' -export { derive, underive, unstable_deriveSubscriptions } from 'derive-valtio' -export { addComputed_DEPRECATED as addComputed } from './utils/addComputed.ts' -export { proxyWithComputed_DEPRECATED as proxyWithComputed } from './utils/proxyWithComputed.ts' -export { proxyWithHistory_DEPRECATED as proxyWithHistory } from './utils/proxyWithHistory.ts' +export { deepClone } from './utils/deepClone.ts' export { proxySet } from './utils/proxySet.ts' export { proxyMap } from './utils/proxyMap.ts' diff --git a/src/vanilla/utils/addComputed.ts b/src/vanilla/utils/addComputed.ts deleted file mode 100644 index 5cb5cad5..00000000 --- a/src/vanilla/utils/addComputed.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { derive } from 'derive-valtio' - -/** - * addComputed (DEPRECATED) - * - * @deprecated Please consider using `derive` or `proxyWithComputed` instead. - */ -export function addComputed_DEPRECATED( - proxyObject: T, - computedFns_FAKE: { - [K in keyof U]: (snap_FAKE: T) => U[K] - }, - targetObject: any = proxyObject, -) { - if (import.meta.env?.MODE !== 'production') { - console.warn( - 'addComputed is deprecated. Please consider using `derive`. Falling back to emulation with derive. https://github.com/pmndrs/valtio/pull/201', - ) - } - const derivedFns: { - [K in keyof U]: (get: any) => U[K] - } = {} as any - ;(Object.keys(computedFns_FAKE) as (keyof U)[]).forEach((key) => { - derivedFns[key] = (get) => computedFns_FAKE[key](get(proxyObject)) - }) - return derive(derivedFns, { proxy: targetObject }) -} diff --git a/src/vanilla/utils/deepClone.ts b/src/vanilla/utils/deepClone.ts new file mode 100644 index 00000000..8e6b22d2 --- /dev/null +++ b/src/vanilla/utils/deepClone.ts @@ -0,0 +1,25 @@ +import { unstable_buildProxyFunction as buildProxyFunction } from '../../vanilla.ts' + +const isObject = (x: unknown): x is object => + typeof x === 'object' && x !== null + +let defaultRefSet: WeakSet | undefined +const getDefaultRefSet = (): WeakSet => { + if (!defaultRefSet) { + defaultRefSet = buildProxyFunction()[2] + } + return defaultRefSet +} + +export const deepClone = (obj: T, getRefSet = getDefaultRefSet): T => { + if (!isObject(obj) || getRefSet().has(obj)) { + return obj + } + const baseObject: T = Array.isArray(obj) + ? [] + : Object.create(Object.getPrototypeOf(obj)) + Reflect.ownKeys(obj).forEach((key) => { + baseObject[key as keyof T] = deepClone(obj[key as keyof T], getRefSet) + }) + return baseObject +} diff --git a/src/vanilla/utils/devtools.ts b/src/vanilla/utils/devtools.ts index 026c8bdb..6eaf6f3c 100644 --- a/src/vanilla/utils/devtools.ts +++ b/src/vanilla/utils/devtools.ts @@ -21,19 +21,6 @@ type Options = { name?: string } & Config -export function devtools( - proxyObject: T, - options?: Options, -): (() => void) | undefined - -/** - * @deprecated Please use { name } option - */ -export function devtools( - proxyObject: T, - name?: string, -): (() => void) | undefined - /** * devtools * @@ -47,14 +34,8 @@ export function devtools( */ export function devtools( proxyObject: T, - options?: Options | string, -) { - if (typeof options === 'string') { - console.warn( - 'string name option is deprecated, use { name }. https://github.com/pmndrs/valtio/pull/400', - ) - options = { name: options } - } + options?: Options, +): (() => void) | undefined { const { enabled, name = '', ...rest } = options || {} let extension: (typeof window)['__REDUX_DEVTOOLS_EXTENSION__'] | false diff --git a/src/vanilla/utils/proxyWithComputed.ts b/src/vanilla/utils/proxyWithComputed.ts deleted file mode 100644 index a1f41dd4..00000000 --- a/src/vanilla/utils/proxyWithComputed.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { proxy, snapshot } from '../../vanilla.ts' -import type { INTERNAL_Snapshot as Snapshot } from '../../vanilla.ts' - -/** - * proxyWithComputed (DEPRECATED) - * - * @deprecated Please follow "Computed Properties" guide in docs. - */ -export function proxyWithComputed_DEPRECATED< - T extends object, - U extends object, ->( - initialObject: T, - computedFns: { - [K in keyof U]: - | ((snap: Snapshot) => U[K]) - | { - get: (snap: Snapshot) => U[K] - set?: (state: T, newValue: U[K]) => void - } - }, -) { - if (import.meta.env?.MODE !== 'production') { - console.warn( - 'proxyWithComputed is deprecated. Please follow "Computed Properties" guide in docs.', - ) - } - ;(Object.keys(computedFns) as (keyof U)[]).forEach((key) => { - if (Object.getOwnPropertyDescriptor(initialObject, key)) { - throw new Error('object property already defined') - } - const computedFn = computedFns[key] - const { get, set } = ( - typeof computedFn === 'function' ? { get: computedFn } : computedFn - ) as { - get: (snap: Snapshot) => U[typeof key] - set?: (state: T, newValue: U[typeof key]) => void - } - const desc: PropertyDescriptor = {} - desc.get = () => get(snapshot(proxyObject)) - if (set) { - desc.set = (newValue) => set(proxyObject, newValue) - } - Object.defineProperty(initialObject, key, desc) - }) - const proxyObject = proxy(initialObject) as T & U - return proxyObject -} diff --git a/src/vanilla/utils/proxyWithHistory.ts b/src/vanilla/utils/proxyWithHistory.ts deleted file mode 100644 index d724b669..00000000 --- a/src/vanilla/utils/proxyWithHistory.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { - unstable_buildProxyFunction as buildProxyFunction, - proxy, - ref, - snapshot, - subscribe, -} from '../../vanilla.ts' -import type { INTERNAL_Snapshot as Snapshot } from '../../vanilla.ts' - -type SnapshotOrUndefined = Snapshot | undefined -type Snapshots = Snapshot[] - -const isObject = (x: unknown): x is object => - typeof x === 'object' && x !== null - -let refSet: WeakSet | undefined - -const deepClone = (obj: T): T => { - if (!refSet) { - refSet = buildProxyFunction()[2] - } - if (!isObject(obj) || refSet.has(obj)) { - return obj - } - const baseObject: T = Array.isArray(obj) - ? [] - : Object.create(Object.getPrototypeOf(obj)) - Reflect.ownKeys(obj).forEach((key) => { - baseObject[key as keyof T] = deepClone(obj[key as keyof T]) - }) - return baseObject -} - -/** - * proxyWithHistory - * - * This creates a new proxy with history support. - * It includes following properties: - * - value: any value (does not have to be an object) - * - history: an array holding the history of snapshots - * - historyIndex: the history index to the current snapshot - * - canUndo: a function to return true if undo is available - * - undo: a function to go back history - * - canRedo: a function to return true if redo is available - * - redo: a function to go forward history - * - saveHistory: a function to save history - * - * [Notes] - * Suspense/promise is not supported. - * - * @example - * import { proxyWithHistory } from 'valtio/utils' - * const state = proxyWithHistory({ - * count: 1, - * }) - * - * @deprecated Please use the `valtio-history` package. eg. - * import { proxyWithHistory } from 'valtio-history' - */ -export function proxyWithHistory_DEPRECATED( - initialValue: V, - skipSubscribe = false, -) { - if (import.meta.env?.MODE !== 'production') { - console.warn( - 'proxyWithHistory is deprecated. Please use the "valtio-history" package; refer to the docs', - ) - } - const proxyObject = proxy({ - value: initialValue, - history: ref({ - wip: undefined as SnapshotOrUndefined, // to avoid infinite loop - snapshots: [] as Snapshots, - index: -1, - }), - clone: deepClone, - canUndo: () => proxyObject.history.index > 0, - undo: () => { - if (proxyObject.canUndo()) { - proxyObject.value = (proxyObject.history.wip = proxyObject.clone( - proxyObject.history.snapshots[--proxyObject.history.index], - ) as Snapshot) as V - } - }, - canRedo: () => - proxyObject.history.index < proxyObject.history.snapshots.length - 1, - redo: () => { - if (proxyObject.canRedo()) { - proxyObject.value = (proxyObject.history.wip = proxyObject.clone( - proxyObject.history.snapshots[++proxyObject.history.index], - ) as Snapshot) as V - } - }, - saveHistory: () => { - proxyObject.history.snapshots.splice(proxyObject.history.index + 1) - proxyObject.history.snapshots.push(snapshot(proxyObject).value) - ++proxyObject.history.index - }, - subscribe: () => - subscribe(proxyObject, (ops) => { - if ( - ops.every( - (op) => - op[1][0] === 'value' && - (op[0] !== 'set' || op[2] !== proxyObject.history.wip), - ) - ) { - proxyObject.saveHistory() - } - }), - }) - proxyObject.saveHistory() - if (!skipSubscribe) { - proxyObject.subscribe() - } - return proxyObject -} diff --git a/tests/__snapshots__/macro-vite.test.ts.snap b/tests/__snapshots__/macro-vite.test.ts.snap deleted file mode 100644 index 6c81fe7a..00000000 --- a/tests/__snapshots__/macro-vite.test.ts.snap +++ /dev/null @@ -1,34 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`basic 1`] = ` -"import { useSnapshot as _useSnapshot } from "valtio"; - - -const Component = () => {const valtio_macro_snap_state = _useSnapshot( - state); - return ( -
- {valtio_macro_snap_state.count} - -
); - -};" -`; - -exports[`complex 1`] = ` -"import { useSnapshot as _useSnapshot } from "valtio"; - - -const Component = () => {const valtio_macro_snap_state = _useSnapshot( - state); - return ( -
- - {valtio_macro_snap_state.count} -
); - -};" -`; diff --git a/tests/__snapshots__/macro.test.ts.snap b/tests/__snapshots__/macro.test.ts.snap deleted file mode 100644 index 3ea4fd2a..00000000 --- a/tests/__snapshots__/macro.test.ts.snap +++ /dev/null @@ -1,71 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`valtio/macro > 1. valtio/macro > 1. valtio/macro 1`] = ` -" -import { useProxy } from '../dist/macro' - -const Component = () => { - useProxy(state) - return ( -
- {state.count} - -
- ) -} - - ↓ ↓ ↓ ↓ ↓ ↓ - -import { useSnapshot as _useSnapshot } from 'valtio' -const Component = () => { - const valtio_macro_snap_state = _useSnapshot(state) - return ( -
- {valtio_macro_snap_state.count} - -
- ) -} - -" -`; - -exports[`valtio/macro > 2. valtio/macro > 2. valtio/macro 1`] = ` -" -import { useProxy } from '../dist/macro' - -const Component = () => { - useProxy(state) - return ( -
- - {state.count} -
- ) -} - - ↓ ↓ ↓ ↓ ↓ ↓ - -import { useSnapshot as _useSnapshot } from 'valtio' -const Component = () => { - const valtio_macro_snap_state = _useSnapshot(state) - return ( -
- - {valtio_macro_snap_state.count} -
- ) -} - -" -`; diff --git a/tests/async.test.tsx b/tests/async.test.tsx index c90cb0f1..47554f2c 100644 --- a/tests/async.test.tsx +++ b/tests/async.test.tsx @@ -1,4 +1,6 @@ -import { StrictMode, Suspense } from 'react' +/// + +import ReactExports, { StrictMode, Suspense } from 'react' import { fireEvent, render, waitFor } from '@testing-library/react' import { it } from 'vitest' import { proxy, useSnapshot } from 'valtio' @@ -8,7 +10,10 @@ const sleep = (ms: number) => setTimeout(resolve, ms) }) -it('delayed increment', async () => { +const { use } = ReactExports +const use2 = (x: T): Awaited => (x instanceof Promise ? use(x) : x) + +it.skipIf(typeof use === 'undefined')('delayed increment', async () => { const state = proxy({ count: 0 }) const delayedIncrement = () => { const nextCount = state.count + 1 @@ -19,7 +24,7 @@ it('delayed increment', async () => { const snap = useSnapshot(state) return ( <> -
count: {snap.count}
+
count: {use2(snap.count)}
) @@ -40,7 +45,7 @@ it('delayed increment', async () => { await findByText('count: 1') }) -it('delayed object', async () => { +it.skipIf(typeof use === 'undefined')('delayed object', async () => { const state = proxy({ object: { text: 'none' } }) const delayedObject = () => { state.object = sleep(300).then(() => ({ text: 'hello' })) @@ -50,7 +55,7 @@ it('delayed object', async () => { const snap = useSnapshot(state) return ( <> -
text: {snap.object.text}
+
text: {use2(snap.object).text}
) @@ -71,51 +76,54 @@ it('delayed object', async () => { await findByText('text: hello') }) -it('delayed object update fulfilled', async () => { - const state = proxy({ - object: sleep(300).then(() => ({ text: 'counter', count: 0 })), - }) - const updateObject = () => { - state.object = state.object.then((v: any) => - sleep(300).then(() => ({ ...v, count: v.count + 1 })), +it.skipIf(typeof use === 'undefined')( + 'delayed object update fulfilled', + async () => { + const state = proxy({ + object: sleep(300).then(() => ({ text: 'counter', count: 0 })), + }) + const updateObject = () => { + state.object = state.object.then((v: any) => + sleep(300).then(() => ({ ...v, count: v.count + 1 })), + ) + } + + const Counter = () => { + const snap = useSnapshot(state) + return ( + <> +
text: {use2(snap.object).text}
+
count: {use2(snap.object).count}
+ + + ) + } + + const { getByText, findByText } = render( + + + + + , ) - } - - const Counter = () => { - const snap = useSnapshot(state) - return ( - <> -
text: {snap.object.text}
-
count: {snap.object.count}
- - - ) - } - - const { getByText, findByText } = render( - - - - - , - ) - await findByText('loading') - await waitFor(() => { - getByText('text: counter') - getByText('count: 0') - }) + await findByText('loading') + await waitFor(() => { + getByText('text: counter') + getByText('count: 0') + }) - fireEvent.click(getByText('button')) + fireEvent.click(getByText('button')) - await findByText('loading') - await waitFor(() => { - getByText('text: counter') - getByText('count: 1') - }) -}) + await findByText('loading') + await waitFor(() => { + getByText('text: counter') + getByText('count: 1') + }) + }, +) -it('delayed falsy value', async () => { +it.skipIf(typeof use === 'undefined')('delayed falsy value', async () => { const state = proxy({ value: true }) const delayedValue = () => { state.value = sleep(300).then(() => null) @@ -125,7 +133,7 @@ it('delayed falsy value', async () => { const snap = useSnapshot(state) return ( <> -
value: {String(snap.value)}
+
value: {String(use2(snap.value))}
) diff --git a/tests/computed.test.tsx b/tests/computed.test.tsx deleted file mode 100644 index ae862663..00000000 --- a/tests/computed.test.tsx +++ /dev/null @@ -1,322 +0,0 @@ -import { StrictMode, Suspense } from 'react' -import { fireEvent, render } from '@testing-library/react' -import { memoize } from 'proxy-memoize' -import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { proxy, snapshot, subscribe, useSnapshot } from 'valtio' -import { addComputed, proxyWithComputed, subscribeKey } from 'valtio/utils' - -const consoleWarn = console.warn -beforeEach(() => { - console.warn = vi.fn((message: string) => { - if (message.startsWith('addComputed is deprecated.')) { - return - } - consoleWarn(message) - }) -}) -afterEach(() => { - console.warn = consoleWarn -}) - -const sleep = (ms: number) => - new Promise((resolve) => { - setTimeout(resolve, ms) - }) - -describe('proxyWithComputed', () => { - it('simple computed getters', async () => { - const computeDouble = vi.fn((x: number) => x * 2) - const state = proxyWithComputed( - { - text: '', - count: 0, - }, - { - doubled: { get: memoize((snap) => computeDouble(snap.count)) }, - }, - ) - - const callback = vi.fn() - subscribe(state, callback) - - expect(snapshot(state)).toMatchObject({ text: '', count: 0, doubled: 0 }) - expect(computeDouble).toBeCalledTimes(1) - expect(callback).toBeCalledTimes(0) - - state.count += 1 - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ text: '', count: 1, doubled: 2 }) - expect(computeDouble).toBeCalledTimes(2) - expect(callback).toBeCalledTimes(1) - - state.text = 'a' - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ text: 'a', count: 1, doubled: 2 }) - expect(computeDouble).toBeCalledTimes(2) - expect(callback).toBeCalledTimes(2) - }) - - it('computed getters and setters', async () => { - const computeDouble = vi.fn((x: number) => x * 2) - const state = proxyWithComputed( - { - text: '', - count: 0, - }, - { - doubled: { - get: memoize((snap) => computeDouble(snap.count)), - set: (state, newValue: number) => { - state.count = newValue / 2 - }, - }, - }, - ) - - expect(snapshot(state)).toMatchObject({ text: '', count: 0, doubled: 0 }) - expect(computeDouble).toBeCalledTimes(1) - - state.count += 1 - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ text: '', count: 1, doubled: 2 }) - expect(computeDouble).toBeCalledTimes(2) - - state.doubled = 1 - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ text: '', count: 0.5, doubled: 1 }) - expect(computeDouble).toBeCalledTimes(3) - - state.text = 'a' - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ text: 'a', count: 0.5, doubled: 1 }) - expect(computeDouble).toBeCalledTimes(3) - }) - - it('computed setters with object and array', async () => { - const state = proxyWithComputed( - { - obj: { a: 1 }, - arr: [2], - }, - { - object: { - get: memoize((snap) => snap.obj), - set: (state, newValue: any) => { - state.obj = newValue - }, - }, - array: { - get: (snap) => snap.arr, - set: (state, newValue: any) => { - state.arr = newValue - }, - }, - }, - ) - - expect(snapshot(state)).toMatchObject({ - obj: { a: 1 }, - arr: [2], - object: { a: 1 }, - array: [2], - }) - - state.object = { a: 2 } - state.array = [3] - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ - obj: { a: 2 }, - arr: [3], - object: { a: 2 }, - array: [3], - }) - }) - - it('render computed getter with condition (#435)', async () => { - const state = proxyWithComputed( - { - texts: [] as string[], - filter: '', - }, - { - filtered: memoize((snap) => { - if (!snap.filter) return snap.texts - return snap.texts.filter((text) => !text.includes(snap.filter)) - }), - }, - ) - - const Component = () => { - const snap = useSnapshot(state) - return ( - <> -
filtered: [{snap.filtered.join(',')}]
- - - ) - } - - const { getByText, findByText } = render( - - - , - ) - - await findByText('filtered: []') - - fireEvent.click(getByText('button')) - await findByText('filtered: [foo]') - }) -}) - -describe('DEPRECATED addComputed', () => { - it('simple addComputed', async () => { - const computeDouble = vi.fn((x: number) => x * 2) - const state = proxy({ - text: '', - count: 0, - }) - addComputed(state, { - doubled: (snap) => computeDouble(snap.count), - }) - - const callback = vi.fn() - subscribe(state, callback) - - expect(snapshot(state)).toMatchObject({ text: '', count: 0, doubled: 0 }) - expect(computeDouble).toBeCalledTimes(1) - expect(callback).toBeCalledTimes(0) - - state.count += 1 - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ text: '', count: 1, doubled: 2 }) - expect(computeDouble).toBeCalledTimes(2) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) - - state.text = 'a' - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ text: 'a', count: 1, doubled: 2 }) - // This can't pass with derive emulation: expect(computeDouble).toBeCalledTimes(2) - expect(callback).toBeCalledTimes(2) - }) - - it('async addComputed', async () => { - const state = proxy({ count: 0 }) - addComputed(state, { - delayedCount: async (snap) => { - await sleep(300) - return snap.count + 1 - }, - }) - - const Counter = () => { - const snap = useSnapshot( - state as { count: number; delayedCount: Promise }, - ) - return ( - <> -
- count: {snap.count}, delayedCount: {snap.delayedCount} -
- - - ) - } - - const { getByText, findByText } = render( - - - - - , - ) - - await findByText('loading') - await findByText('count: 0, delayedCount: 1') - - fireEvent.click(getByText('button')) - await findByText('loading') - await findByText('count: 1, delayedCount: 2') - }) - - it('nested emulation with addComputed', async () => { - const computeDouble = vi.fn((x: number) => x * 2) - const state = proxy({ text: '', math: { count: 0 } }) - addComputed( - state, - { - doubled: (snap) => computeDouble(snap.math.count), - }, - state.math, - ) - - const callback = vi.fn() - subscribe(state, callback) - - expect(snapshot(state)).toMatchObject({ - text: '', - math: { count: 0, doubled: 0 }, - }) - expect(computeDouble).toBeCalledTimes(1) - expect(callback).toBeCalledTimes(0) - - state.math.count += 1 - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ - text: '', - math: { count: 1, doubled: 2 }, - }) - expect(computeDouble).toBeCalledTimes(2) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) - - state.text = 'a' - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ - text: 'a', - math: { count: 1, doubled: 2 }, - }) - // This can't pass with derive emulation: expect(computeDouble).toBeCalledTimes(2) - expect(callback).toBeCalledTimes(2) - }) - - it('addComputed with array.pop (#124)', async () => { - const state = proxy({ - arr: [{ n: 1 }, { n: 2 }, { n: 3 }], - }) - addComputed(state, { - nums: (snap) => snap.arr.map((item) => item.n), - }) - - expect(snapshot(state)).toMatchObject({ - arr: [{ n: 1 }, { n: 2 }, { n: 3 }], - nums: [1, 2, 3], - }) - - state.arr.pop() - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ - arr: [{ n: 1 }, { n: 2 }], - nums: [1, 2], - }) - }) -}) - -describe('proxyWithComputed and subscribeKey', () => { - it('should call subscribeKey subscription when computed value changes?', async () => { - const state = proxyWithComputed( - { - count: 1, - }, - { - doubled: (snap) => snap.count * 2, - }, - ) - const handler = vi.fn() - subscribeKey(state, 'doubled', handler) - state.count = 2 - await Promise.resolve() - expect(handler).toBeCalledTimes(1) - }) -}) diff --git a/tests/derive.test.tsx b/tests/derive.test.tsx deleted file mode 100644 index 72bc36fb..00000000 --- a/tests/derive.test.tsx +++ /dev/null @@ -1,496 +0,0 @@ -import { StrictMode, Suspense, useEffect, useRef } from 'react' -import { fireEvent, render } from '@testing-library/react' -import { describe, expect, it, vi } from 'vitest' -import { proxy, snapshot, subscribe, useSnapshot } from 'valtio' -import { derive, underive } from 'valtio/utils' - -type DeriveGet = (proxyObject: T) => T - -const sleep = (ms: number) => - new Promise((resolve) => { - setTimeout(resolve, ms) - }) - -it('basic derive', async () => { - const computeDouble = vi.fn((x: number) => x * 2) - const state = proxy({ - text: '', - count: 0, - }) - const derived = derive({ - doubled: (get) => computeDouble(get(state).count), - }) - - const callback = vi.fn() - subscribe(derived, callback) - - expect(snapshot(derived)).toMatchObject({ doubled: 0 }) - expect(computeDouble).toBeCalledTimes(1) - expect(callback).toBeCalledTimes(0) - - state.count += 1 - await Promise.resolve() - expect(snapshot(derived)).toMatchObject({ doubled: 2 }) - expect(computeDouble).toBeCalledTimes(2) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) - - state.text = 'a' - await Promise.resolve() - expect(snapshot(derived)).toMatchObject({ doubled: 2 }) - expect(computeDouble).toBeCalledTimes(3) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) -}) - -it('derive another proxy', async () => { - const computeDouble = vi.fn((x: number) => x * 2) - const state = proxy({ - text: '', - count: 0, - }) - const anotherState = proxy({}) - derive( - { - doubled: (get) => computeDouble(get(state).count), - }, - { - proxy: anotherState, - }, - ) - - const callback = vi.fn() - subscribe(anotherState, callback) - - expect(snapshot(anotherState)).toMatchObject({ doubled: 0 }) - expect(computeDouble).toBeCalledTimes(1) - expect(callback).toBeCalledTimes(0) - - state.count += 1 - await Promise.resolve() - expect(snapshot(anotherState)).toMatchObject({ doubled: 2 }) - expect(computeDouble).toBeCalledTimes(2) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) - - state.text = 'a' - await Promise.resolve() - expect(snapshot(anotherState)).toMatchObject({ doubled: 2 }) - expect(computeDouble).toBeCalledTimes(3) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) -}) - -it('derive with self', async () => { - const computeDouble = vi.fn((x: number) => x * 2) - const state = proxy({ - text: '', - count: 0, - }) - derive( - { - doubled: (get) => computeDouble(get(state).count), - }, - { - proxy: state, - }, - ) - - const callback = vi.fn() - subscribe(state, callback) - - expect(snapshot(state)).toMatchObject({ text: '', count: 0, doubled: 0 }) - expect(computeDouble).toBeCalledTimes(1) - expect(callback).toBeCalledTimes(0) - - state.count += 1 - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ text: '', count: 1, doubled: 2 }) - expect(computeDouble).toBeCalledTimes(2) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) - - state.text = 'a' - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ text: 'a', count: 1, doubled: 2 }) - expect(computeDouble).toBeCalledTimes(3) - await Promise.resolve() - expect(callback).toBeCalledTimes(2) -}) - -it('derive with two dependencies', async () => { - const computeSum = vi.fn((x: number, y: number) => x + y) - const state1 = proxy({ count: 1 }) - const state2 = proxy({ count: 10 }) - const derived = derive({ - sum: (get) => computeSum(get(state1).count, get(state2).count), - }) - - const callback = vi.fn() - subscribe(derived, callback) - - expect(snapshot(derived)).toMatchObject({ sum: 11 }) - expect(computeSum).toBeCalledTimes(1) - expect(callback).toBeCalledTimes(0) - - state1.count += 1 - await Promise.resolve() - expect(snapshot(derived)).toMatchObject({ sum: 12 }) - expect(computeSum).toBeCalledTimes(2) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) - - state1.count += 1 - state2.count += 10 - await Promise.resolve() - expect(snapshot(derived)).toMatchObject({ sum: 23 }) - expect(computeSum).toBeCalledTimes(3) - await Promise.resolve() - expect(callback).toBeCalledTimes(2) -}) - -it('async derive', async () => { - const state = proxy({ count: 0 }) - derive( - { - delayedCount: async (get) => { - await sleep(300) - return get(state).count + 1 - }, - }, - { proxy: state }, - ) - - const Counter = () => { - const snap = useSnapshot( - state as { count: number; delayedCount: Promise }, - ) - return ( - <> -
- count: {snap.count}, delayedCount: {snap.delayedCount} -
- - - ) - } - - const { getByText, findByText } = render( - - - - - , - ) - - await findByText('loading') - await findByText('count: 0, delayedCount: 1') - - fireEvent.click(getByText('button')) - await findByText('loading') - await findByText('count: 1, delayedCount: 2') -}) - -it('nested emulation with derive', async () => { - const computeDouble = vi.fn((x: number) => x * 2) - const state = proxy({ text: '', math: { count: 0 } }) - derive( - { - doubled: (get) => computeDouble(get(state.math).count), - }, - { proxy: state.math, sync: true }, - ) - - const callback = vi.fn() - subscribe(state, callback) - - expect(snapshot(state)).toMatchObject({ - text: '', - math: { count: 0, doubled: 0 }, - }) - expect(computeDouble).toBeCalledTimes(1) - expect(callback).toBeCalledTimes(0) - - state.math.count += 1 - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ - text: '', - math: { count: 1, doubled: 2 }, - }) - expect(computeDouble).toBeCalledTimes(2) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) - - state.text = 'a' - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ - text: 'a', - math: { count: 1, doubled: 2 }, - }) - expect(computeDouble).toBeCalledTimes(2) - await Promise.resolve() - expect(callback).toBeCalledTimes(2) -}) - -it('derive with array.pop', async () => { - const state = proxy({ - arr: [{ n: 1 }, { n: 2 }, { n: 3 }], - }) - derive( - { - nums: (get) => get(state.arr).map((item) => item.n), - }, - { proxy: state }, - ) - - expect(snapshot(state)).toMatchObject({ - arr: [{ n: 1 }, { n: 2 }, { n: 3 }], - nums: [1, 2, 3], - }) - - state.arr.pop() - await Promise.resolve() - expect(snapshot(state)).toMatchObject({ - arr: [{ n: 1 }, { n: 2 }], - nums: [1, 2], - }) -}) - -it('basic underive', async () => { - const computeDouble = vi.fn((x: number) => x * 2) - const state = proxy({ count: 0 }) - const derived = derive({ - doubled: (get) => computeDouble(get(state).count), - }) - - const callback = vi.fn() - subscribe(derived, callback) - - expect(snapshot(derived)).toMatchObject({ doubled: 0 }) - expect(computeDouble).toBeCalledTimes(1) - expect(callback).toBeCalledTimes(0) - - state.count += 1 - await Promise.resolve() - expect(snapshot(derived)).toMatchObject({ doubled: 2 }) - expect(computeDouble).toBeCalledTimes(2) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) - - underive(derived) - - state.count += 1 - await Promise.resolve() - expect(snapshot(derived)).toMatchObject({ doubled: 2 }) - expect(computeDouble).toBeCalledTimes(2) - await Promise.resolve() - expect(callback).toBeCalledTimes(1) -}) - -describe('glitch free', () => { - it('basic (#296)', async () => { - const state = proxy({ value: 0 }) - const derived1 = derive({ value: (get) => get(state).value }) - const derived2 = derive({ value: (get) => get(derived1).value }) - const computeValue = vi.fn((get: DeriveGet) => { - const v0 = get(state).value - const v1 = get(derived1).value - const v2 = get(derived2).value - return `v0: ${v0}, v1: ${v1}, v2: ${v2}` - }) - const derived3 = derive({ value: computeValue }) - - const App = () => { - const snap = useSnapshot(derived3) - const commitsRef = useRef(1) - useEffect(() => { - commitsRef.current += 1 - }) - return ( - <> - value: {snap.value} (commits: {commitsRef.current}) - - - ) - } - - const { getByText, findByText } = render( - <> - - , - ) - - await findByText('value: v0: 0, v1: 0, v2: 0 (commits: 1)') - expect(computeValue).toBeCalledTimes(1) - - fireEvent.click(getByText('button')) - await findByText('value: v0: 1, v1: 1, v2: 1 (commits: 2)') - expect(computeValue).toBeCalledTimes(2) - }) - - it('same value', async () => { - const state = proxy({ value: 0 }) - const derived1 = derive({ - value: (get) => get(state).value * 0, - }) - const derived2 = derive({ - value: (get) => get(derived1).value * 0, - }) - const computeValue = vi.fn((get: DeriveGet) => { - const v0 = get(state).value - const v1 = get(derived1).value - const v2 = get(derived2).value - return v0 + (v1 - v2) - }) - const derived3 = derive({ - value: (get) => computeValue(get), - }) - - const App = () => { - const snap = useSnapshot(derived3) - return ( -
- value: {snap.value} - -
- ) - } - - const { getByText, findByText } = render( - - - , - ) - - await findByText('value: 0') - expect(computeValue).toBeCalledTimes(1) - - fireEvent.click(getByText('button')) - await findByText('value: 1') - expect(computeValue).toBeCalledTimes(2) - }) - - it('double chain', async () => { - const state = proxy({ value: 0 }) - const derived1 = derive({ - value: (get) => get(state).value, - }) - const derived2 = derive({ - value: (get) => get(derived1).value, - }) - const derived3 = derive({ - value: (get) => get(derived2).value, - }) - const computeValue = vi.fn((get: DeriveGet) => { - const v0 = get(state).value - const v1 = get(derived1).value - const v2 = get(derived2).value - const v3 = get(derived3).value - return v0 + (v1 - v2) + v3 * 0 - }) - const derived4 = derive({ - value: (get) => computeValue(get), - }) - - const App = () => { - const snap = useSnapshot(derived4) - return ( -
- value: {snap.value} - -
- ) - } - - const { getByText, findByText } = render( - - - , - ) - - await findByText('value: 0') - expect(computeValue).toBeCalledTimes(1) - - fireEvent.click(getByText('button')) - await findByText('value: 1') - expect(computeValue).toBeCalledTimes(2) - }) -}) - -describe('two derived properties', () => { - type State = { - a: number - derived1?: unknown - derived2?: unknown - } - - it('two derived properties both returning primitive values (#349)', async () => { - const state: State = proxy({ a: 1 }) - derive( - { - derived1: (get) => { - get(state).a - return 1 - }, - }, - { proxy: state }, - ) - derive( - { - derived2: (get) => { - get(state).a - return 1 - }, - }, - { proxy: state }, - ) - await Promise.resolve() - expect(state.derived1).toBeDefined() - expect(state.derived2).toBeDefined() - }) - - it('two derived properties both returning non primitive values, defined at the same time (#349)', async () => { - const state: State = proxy({ a: 1 }) - derive( - { - derived1: (get) => { - get(state).a - return {} - }, - derived2: (get) => { - get(state).a - return {} - }, - }, - { proxy: state }, - ) - await Promise.resolve() - expect(state.derived1).toBeDefined() - expect(state.derived2).toBeDefined() - }) - - it('two derived properties both returning non primitive values (#349)', async () => { - const state: State = proxy({ a: 1 }) - derive( - { - derived1: (get) => { - get(state).a - return {} - }, - }, - { proxy: state }, - ) - derive( - { - derived2: (get) => { - get(state).a - return {} - }, - }, - { proxy: state }, - ) - await Promise.resolve() - expect(state.derived1).toBeDefined() - expect(state.derived2).toBeDefined() - }) -}) diff --git a/tests/history.test.tsx b/tests/history.test.tsx deleted file mode 100644 index cc2ffe99..00000000 --- a/tests/history.test.tsx +++ /dev/null @@ -1,311 +0,0 @@ -import { StrictMode } from 'react' -import { fireEvent, render } from '@testing-library/react' -import { it } from 'vitest' -import { useSnapshot } from 'valtio' -import { proxyWithHistory } from 'valtio/utils' - -it('simple count', async () => { - const state = proxyWithHistory(0) - - const Counter = () => { - const snap = useSnapshot(state) - return ( - <> -
count: {snap.value}
- - - - - ) - } - - const { getByText, findByText } = render( - - - , - ) - - await findByText('count: 0') - - fireEvent.click(getByText('inc')) - await findByText('count: 1') - - fireEvent.click(getByText('inc')) - await findByText('count: 2') - - fireEvent.click(getByText('inc')) - await findByText('count: 3') - - fireEvent.click(getByText('undo')) - await findByText('count: 2') - - fireEvent.click(getByText('redo')) - await findByText('count: 3') - - fireEvent.click(getByText('undo')) - await findByText('count: 2') - - fireEvent.click(getByText('undo')) - await findByText('count: 1') - - fireEvent.click(getByText('undo')) - await findByText('count: 0') - - fireEvent.click(getByText('inc')) - await findByText('count: 1') - - fireEvent.click(getByText('undo')) - await findByText('count: 0') -}) - -it('count in object', async () => { - const state = proxyWithHistory({ count: 0 }) - - const Counter = () => { - const snap = useSnapshot(state) - return ( - <> -
count: {snap.value.count}
- - - - - ) - } - - const { getByText, findByText } = render( - - - , - ) - - await findByText('count: 0') - - fireEvent.click(getByText('inc')) - await findByText('count: 1') - - fireEvent.click(getByText('inc')) - await findByText('count: 2') - - fireEvent.click(getByText('inc')) - await findByText('count: 3') - - fireEvent.click(getByText('undo')) - await findByText('count: 2') - - fireEvent.click(getByText('redo')) - await findByText('count: 3') - - fireEvent.click(getByText('undo')) - await findByText('count: 2') - - fireEvent.click(getByText('undo')) - await findByText('count: 1') - - fireEvent.click(getByText('undo')) - await findByText('count: 0') - - fireEvent.click(getByText('inc')) - await findByText('count: 1') - - fireEvent.click(getByText('undo')) - await findByText('count: 0') -}) - -it('count in nested object', async () => { - const state = proxyWithHistory({ nested: { count: 0 } }) - - const Counter = () => { - const snap = useSnapshot(state) - return ( - <> -
count: {snap.value.nested.count}
- - - - - ) - } - - const { getByText, findByText } = render( - - - , - ) - - await findByText('count: 0') - - fireEvent.click(getByText('inc')) - await findByText('count: 1') - - fireEvent.click(getByText('inc')) - await findByText('count: 2') - - fireEvent.click(getByText('inc')) - await findByText('count: 3') - - fireEvent.click(getByText('undo')) - await findByText('count: 2') - - fireEvent.click(getByText('redo')) - await findByText('count: 3') - - fireEvent.click(getByText('undo')) - await findByText('count: 2') - - fireEvent.click(getByText('undo')) - await findByText('count: 1') - - fireEvent.click(getByText('undo')) - await findByText('count: 0') - - fireEvent.click(getByText('inc')) - await findByText('count: 1') - - fireEvent.click(getByText('undo')) - await findByText('count: 0') -}) - -it('multiple redos at once (#323)', async () => { - const state = proxyWithHistory({ nested: { count: 0 } }) - - const Counter = () => { - const snap = useSnapshot(state) - return ( - <> -
count: {snap.value.nested.count}
- - - - - ) - } - - const { getByText, findByText } = render( - - - , - ) - - await findByText('count: 0') - - fireEvent.click(getByText('inc')) - await findByText('count: 1') - fireEvent.click(getByText('inc')) - await findByText('count: 2') - - fireEvent.click(getByText('undo twice')) - await findByText('count: 0') - - fireEvent.click(getByText('redo twice')) - await findByText('count: 2') -}) - -it('nested array (#516)', async () => { - interface Level1Interface { - level1Values: number[] - } - interface Level0Interface { - level0Values: Level1Interface[] - } - const state = proxyWithHistory({ - level0Values: [{ level1Values: [0, 1] }, { level1Values: [2, 3] }], - }) - - const NestedArray = () => { - const snap = useSnapshot(state) - return ( - <> -
values: {JSON.stringify(snap.value)}
- - - - - - ) - } - - const { getByText, findByText } = render( - - - , - ) - - await findByText( - 'values: {"level0Values":[{"level1Values":[0,1]},{"level1Values":[2,3]}]}', - ) - - fireEvent.click(getByText('change 2 to 10')) - await findByText( - 'values: {"level0Values":[{"level1Values":[0,1]},{"level1Values":[10,3]}]}', - ) - - fireEvent.click(getByText('change 10 to 11')) - await findByText( - 'values: {"level0Values":[{"level1Values":[0,1]},{"level1Values":[11,3]}]}', - ) - - fireEvent.click(getByText('undo')) // => 11 back to 10 - await findByText( - 'values: {"level0Values":[{"level1Values":[0,1]},{"level1Values":[10,3]}]}', - ) - - fireEvent.click(getByText('change 0 to 12')) - await findByText( - 'values: {"level0Values":[{"level1Values":[12,1]},{"level1Values":[10,3]}]}', - ) - - fireEvent.click(getByText('undo')) // => 12 back to 0 - await findByText( - 'values: {"level0Values":[{"level1Values":[0,1]},{"level1Values":[10,3]}]}', - ) - - fireEvent.click(getByText('undo')) // => 10 back to 2 - await findByText( - 'values: {"level0Values":[{"level1Values":[0,1]},{"level1Values":[2,3]}]}', - ) -}) diff --git a/tests/macro-vite.test.ts b/tests/macro-vite.test.ts deleted file mode 100644 index a89c97c3..00000000 --- a/tests/macro-vite.test.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { EnvContext } from '@typed-macro/core' -import { createTransformer } from '@typed-macro/runtime' -import { expect, it } from 'vitest' -import { valtioMacro } from 'valtio/macro/vite' - -const env: EnvContext = { - host: 'test', - packageManager: 'test', - projectPath: [''], - dev: true, - ssr: false, -} - -it('basic', async () => { - const transform = createTransformer({}) - transform.appendMacros('valtio/macro', [valtioMacro]) - - expect( - transform.transform( - ` -import { useProxy } from 'valtio/macro' - -const Component = () => { - useProxy(state) - return ( -
- {state.count} - -
- ) -} -`, - 'test.ts', - env, - ), - ).toMatchSnapshot() -}) - -it('complex', async () => { - const transform = createTransformer({}) - transform.appendMacros('valtio/macro', [valtioMacro]) - - expect( - transform.transform( - ` -import { useProxy } from 'valtio/macro' - -const Component = () => { - useProxy(state) - return ( -
- - {state.count} -
- ) -} -`, - 'test.ts', - env, - ), - ).toMatchSnapshot() -}) diff --git a/tests/macro.test.ts b/tests/macro.test.ts deleted file mode 100644 index 34ddbf4c..00000000 --- a/tests/macro.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ -import plugin from 'babel-plugin-macros' -import BabelPluginTester from 'babel-plugin-tester' -import { describe, expect, it } from 'vitest' - -// @ts-ignore -globalThis.describe = describe -// @ts-ignore -globalThis.it = it -// @ts-ignore -globalThis.expect = expect - -const pluginTester = (BabelPluginTester as any).default || BabelPluginTester - -pluginTester({ - pluginName: 'valtio/macro', - plugin, - snapshot: true, - babelOptions: { - filename: './valtio/tests', - parserOpts: { plugins: ['jsx'] }, - }, - tests: [ - ` -import { useProxy } from '../dist/macro' - -const Component = () => { - useProxy(state) - return ( -
- {state.count} - -
- ) -} -`, - ` -import { useProxy } from '../dist/macro' - -const Component = () => { - useProxy(state) - return ( -
- - {state.count} -
- ) -} -`, - ], -}) diff --git a/tests/optimization.test.tsx b/tests/optimization.test.tsx new file mode 100644 index 00000000..47c5e725 --- /dev/null +++ b/tests/optimization.test.tsx @@ -0,0 +1,116 @@ +import { useState } from 'react' +import { fireEvent, render, waitFor } from '@testing-library/react' +import { expect, it, vi } from 'vitest' +import { proxy, useSnapshot } from 'valtio' + +it('regression: useSnapshot renders should not fail consistency check with extra render (nested useSnapshot)', async () => { + const obj = proxy({ childCount: 0, parentCount: 0 }) + + const childRenderFn = vi.fn() + const Child = () => { + const snap = useSnapshot(obj) + childRenderFn(snap.childCount) + return ( + <> +
childCount: {snap.childCount}
+ + + ) + } + + const parentRenderFn = vi.fn() + const Parent = () => { + const snap = useSnapshot(obj) + parentRenderFn(snap.parentCount) + return ( + <> +
parentCount: {snap.parentCount}
+ + + + ) + } + + const { getByText } = render() + + await waitFor(() => { + getByText('childCount: 0') + getByText('parentCount: 0') + }) + + expect(childRenderFn).toBeCalledTimes(1) + expect(childRenderFn).lastCalledWith(0) + expect(parentRenderFn).toBeCalledTimes(1) + expect(parentRenderFn).lastCalledWith(0) + + obj.parentCount += 1 + + await waitFor(() => { + getByText('childCount: 0') + getByText('parentCount: 1') + }) + + expect(childRenderFn).toBeCalledTimes(2) + expect(childRenderFn).lastCalledWith(0) + expect(parentRenderFn).toBeCalledTimes(2) + expect(parentRenderFn).lastCalledWith(1) +}) + +it('regression: useSnapshot renders should not fail consistency check with extra render', async () => { + const obj = proxy({ childCount: 0, anotherValue: 0 }) + + const childRenderFn = vi.fn() + const Child = () => { + const snap = useSnapshot(obj) + childRenderFn(snap.childCount) + return ( + <> +
childCount: {snap.childCount}
+ + + ) + } + + const parentRenderFn = vi.fn() + const Parent = () => { + const [parentCount, setParentCount] = useState(0) + + parentRenderFn(parentCount) + + return ( + <> +
parentCount: {parentCount}
+ + + + ) + } + + const { getByText } = render() + + await waitFor(() => { + getByText('childCount: 0') + getByText('parentCount: 0') + }) + + expect(childRenderFn).toBeCalledTimes(1) + expect(childRenderFn).lastCalledWith(0) + expect(parentRenderFn).toBeCalledTimes(1) + expect(parentRenderFn).lastCalledWith(0) + + obj.anotherValue += 1 + + fireEvent.click(getByText('parentButton')) + + await waitFor(() => { + getByText('childCount: 0') + getByText('parentCount: 1') + }) + + expect(childRenderFn).toBeCalledTimes(2) + expect(childRenderFn).lastCalledWith(0) + expect(parentRenderFn).toBeCalledTimes(2) + expect(parentRenderFn).lastCalledWith(1) +}) diff --git a/tests/snapshot.test.ts b/tests/snapshot.test.ts index 2fb0b89c..3f492f24 100644 --- a/tests/snapshot.test.ts +++ b/tests/snapshot.test.ts @@ -1,29 +1,7 @@ import { createProxy, getUntracked } from 'proxy-compare' import { TypeEqual, expectType } from 'ts-expect' import { describe, expect, it } from 'vitest' -import { INTERNAL_Snapshot as Snapshot, proxy, snapshot } from 'valtio' - -const sleep = (ms: number) => - new Promise((resolve) => { - setTimeout(resolve, ms) - }) - -it('getter returns value after promise is resolved', async () => { - const state = proxy({ status: sleep(10).then(() => 'done') }) - const snap = snapshot(state) - - await new Promise((resolve) => { - resolve(snap.status) - }) - .catch((thrown) => { - expect(thrown).toBeInstanceOf(Promise) - return thrown - }) - .then((value) => { - expect(value).toBe('done') - expect(snap.status).toBe('done') - }) -}) +import { Snapshot, proxy, snapshot } from 'valtio' it('should return correct snapshots without subscribe', async () => { const child = proxy({ count: 0 }) @@ -115,15 +93,6 @@ describe('snapsoht typings', () => { >(true) }) - it('infers Promise result from property value', () => { - expectType< - TypeEqual< - Snapshot<{ promise: Promise }>, - { readonly promise: string } - > - >(true) - }) - it('converts arrays to readonly arrays', () => { expectType, readonly number[]>>(true) })