From a1da4727944f4f4d4c558260862b1ce132db5dcb Mon Sep 17 00:00:00 2001 From: Himself65 Date: Mon, 8 May 2023 23:09:22 +0800 Subject: [PATCH] feat: update code with `jotai-molecule` (#5) --- .github/workflows/build.yml | 47 ++ .npmrc | 1 + .nvmrc | 1 + README.md | 1 + package.json | 34 +- pnpm-lock.yaml | 540 ++++++++++++--------- src/components/Editor.tsx | 6 +- src/components/page-list/index.tsx | 9 +- src/components/workspace-list/index.tsx | 38 +- src/pages/[workspaceId]/[pageId]/index.tsx | 23 +- src/pages/_app.tsx | 13 +- src/store.ts | 240 +++++---- src/tests/store.spec.ts | 13 +- 13 files changed, 579 insertions(+), 387 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .npmrc create mode 100644 .nvmrc diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..270fd9c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build and Test + +on: + pull_request: + branches: + - stable + push: + branches: + - stable + - dev + +jobs: + build-and-test: + name: Build and Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + - name: Use Node.js LTS + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'pnpm' + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm run build + + - name: Test + run: pnpm run test diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..3bd3b7d --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +shell-emulator=true diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 diff --git a/README.md b/README.md index 3d083b9..daf2232 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ This is a minimum implementation of the AFFiNE project. ## Features - [x] jotai atoms example +- [x] jotai-molecule example - [x] `useSyncExternalStore` example - [x] React 18 `suspense` example - [x] BlockSuite Editor embed example diff --git a/package.json b/package.json index bd9e9ff..1d50561 100644 --- a/package.json +++ b/package.json @@ -12,34 +12,36 @@ "test": "vitest" }, "dependencies": { - "@blocksuite/blocks": "0.0.0-20230429153208-4ac043ec-nightly", - "@blocksuite/editor": "0.0.0-20230429153208-4ac043ec-nightly", - "@blocksuite/store": "0.0.0-20230429153208-4ac043ec-nightly", - "@toeverything/y-indexeddb": "0.5.4-canary.19", - "jotai": "^2.0.4", - "lit": "^2.7.3", + "@blocksuite/blocks": "0.0.0-20230508043859-34d0cc68-nightly", + "@blocksuite/editor": "0.0.0-20230508043859-34d0cc68-nightly", + "@blocksuite/store": "0.0.0-20230508043859-34d0cc68-nightly", + "@toeverything/y-indexeddb": "0.5.4-canary.26", + "jotai": "^2.1.0", + "jotai-molecules": "^1.1.1", + "lit": "^2.7.4", "nanoid": "^4.0.2", - "next": "^13.3.2", + "next": "^13.4.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-error-boundary": "^4.0.4", "rxjs": "^7.8.1", - "yjs": "^13.6.0" + "yjs": "^13.6.1" }, "devDependencies": { - "@types/react": "^18.0.28", - "@types/react-dom": "^18.0.11", - "@typescript-eslint/eslint-plugin": "^5.57.1", - "@typescript-eslint/parser": "^5.57.1", + "@testing-library/react": "^14.0.0", + "@types/react": "^18.2.6", + "@types/react-dom": "^18.2.4", + "@typescript-eslint/eslint-plugin": "^5.59.2", + "@typescript-eslint/parser": "^5.59.2", "@vanilla-extract/css": "^1.11.0", "@vanilla-extract/next-plugin": "^2.1.2", "@vitejs/plugin-react": "^4.0.0", - "eslint": "^8.38.0", - "eslint-config-next": "^13.3.4", + "eslint": "^8.40.0", + "eslint-config-next": "^13.4.1", "fake-indexeddb": "^4.0.1", - "happy-dom": "^9.10.1", + "happy-dom": "^9.10.9", "typescript": "^5.0.2", - "vite": "^4.3.3", + "vite": "^4.3.5", "vitest": "^0.30.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 695492b..9b47173 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2,29 +2,32 @@ lockfileVersion: '6.0' dependencies: '@blocksuite/blocks': - specifier: 0.0.0-20230429153208-4ac043ec-nightly - version: 0.0.0-20230429153208-4ac043ec-nightly(@blocksuite/store@0.0.0-20230429153208-4ac043ec-nightly)(nanoid@4.0.2)(yjs@13.6.0) + specifier: 0.0.0-20230508043859-34d0cc68-nightly + version: 0.0.0-20230508043859-34d0cc68-nightly(@blocksuite/store@0.0.0-20230508043859-34d0cc68-nightly)(nanoid@4.0.2)(yjs@13.6.1) '@blocksuite/editor': - specifier: 0.0.0-20230429153208-4ac043ec-nightly - version: 0.0.0-20230429153208-4ac043ec-nightly(@blocksuite/blocks@0.0.0-20230429153208-4ac043ec-nightly)(@blocksuite/store@0.0.0-20230429153208-4ac043ec-nightly) + specifier: 0.0.0-20230508043859-34d0cc68-nightly + version: 0.0.0-20230508043859-34d0cc68-nightly(@blocksuite/blocks@0.0.0-20230508043859-34d0cc68-nightly)(@blocksuite/store@0.0.0-20230508043859-34d0cc68-nightly) '@blocksuite/store': - specifier: 0.0.0-20230429153208-4ac043ec-nightly - version: 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3)(yjs@13.6.0) + specifier: 0.0.0-20230508043859-34d0cc68-nightly + version: 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4)(yjs@13.6.1) '@toeverything/y-indexeddb': - specifier: 0.5.4-canary.19 - version: 0.5.4-canary.19(yjs@13.6.0) + specifier: 0.5.4-canary.26 + version: 0.5.4-canary.26(yjs@13.6.1) jotai: - specifier: ^2.0.4 - version: 2.0.4(react@18.2.0) + specifier: ^2.1.0 + version: 2.1.0(react@18.2.0) + jotai-molecules: + specifier: ^1.1.1 + version: 1.1.1(jotai@2.1.0)(react@18.2.0) lit: - specifier: ^2.7.3 - version: 2.7.3 + specifier: ^2.7.4 + version: 2.7.4 nanoid: specifier: ^4.0.2 version: 4.0.2 next: - specifier: ^13.3.2 - version: 13.3.2(@babel/core@7.21.5)(react-dom@18.2.0)(react@18.2.0) + specifier: ^13.4.1 + version: 13.4.1(@babel/core@7.21.5)(react-dom@18.2.0)(react@18.2.0) react: specifier: ^18.2.0 version: 18.2.0 @@ -38,52 +41,55 @@ dependencies: specifier: ^7.8.1 version: 7.8.1 yjs: - specifier: ^13.6.0 - version: 13.6.0 + specifier: ^13.6.1 + version: 13.6.1 devDependencies: + '@testing-library/react': + specifier: ^14.0.0 + version: 14.0.0(react-dom@18.2.0)(react@18.2.0) '@types/react': - specifier: ^18.0.28 - version: 18.2.0 + specifier: ^18.2.6 + version: 18.2.6 '@types/react-dom': - specifier: ^18.0.11 - version: 18.2.1 + specifier: ^18.2.4 + version: 18.2.4 '@typescript-eslint/eslint-plugin': - specifier: ^5.57.1 - version: 5.59.1(@typescript-eslint/parser@5.59.1)(eslint@8.39.0)(typescript@5.0.4) + specifier: ^5.59.2 + version: 5.59.2(@typescript-eslint/parser@5.59.2)(eslint@8.40.0)(typescript@5.0.4) '@typescript-eslint/parser': - specifier: ^5.57.1 - version: 5.59.1(eslint@8.39.0)(typescript@5.0.4) + specifier: ^5.59.2 + version: 5.59.2(eslint@8.40.0)(typescript@5.0.4) '@vanilla-extract/css': specifier: ^1.11.0 version: 1.11.0 '@vanilla-extract/next-plugin': specifier: ^2.1.2 - version: 2.1.2(next@13.3.2)(webpack@5.81.0) + version: 2.1.2(next@13.4.1)(webpack@5.82.0) '@vitejs/plugin-react': specifier: ^4.0.0 - version: 4.0.0(vite@4.3.3) + version: 4.0.0(vite@4.3.5) eslint: - specifier: ^8.38.0 - version: 8.39.0 + specifier: ^8.40.0 + version: 8.40.0 eslint-config-next: - specifier: ^13.3.4 - version: 13.3.4(eslint@8.39.0)(typescript@5.0.4) + specifier: ^13.4.1 + version: 13.4.1(eslint@8.40.0)(typescript@5.0.4) fake-indexeddb: specifier: ^4.0.1 version: 4.0.1 happy-dom: - specifier: ^9.10.1 - version: 9.10.1 + specifier: ^9.10.9 + version: 9.10.9 typescript: specifier: ^5.0.2 version: 5.0.4 vite: - specifier: ^4.3.3 - version: 4.3.3(@types/node@18.16.3) + specifier: ^4.3.5 + version: 4.3.5(@types/node@18.16.3) vitest: specifier: ^0.30.1 - version: 0.30.1(happy-dom@9.10.1) + version: 0.30.1(happy-dom@9.10.9) packages: @@ -309,48 +315,50 @@ packages: '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 - /@blocksuite/blocks@0.0.0-20230429153208-4ac043ec-nightly(@blocksuite/store@0.0.0-20230429153208-4ac043ec-nightly)(nanoid@4.0.2)(yjs@13.6.0): - resolution: {integrity: sha512-Nsz0RUcWYiVKfqDxwuBLejkVcQBkSTvnsyFQay8H9kiHCWplnPSbHacihGb4UGcuHUDD5wbicWdAC/BUYAbZ7g==} + /@blocksuite/blocks@0.0.0-20230508043859-34d0cc68-nightly(@blocksuite/store@0.0.0-20230508043859-34d0cc68-nightly)(nanoid@4.0.2)(yjs@13.6.1): + resolution: {integrity: sha512-PKqGjo639KYe9mrK8MTmuSZ+XSZXptDWd4GEfHZbZGKnBCCT+tL0B6XjRwvBnMQFsHw8XFWUgLpyye9aCwdO5Q==} peerDependencies: - '@blocksuite/store': 0.0.0-20230429153208-4ac043ec-nightly + '@blocksuite/store': 0.0.0-20230508043859-34d0cc68-nightly + yjs: ^13 dependencies: - '@blocksuite/connector': 0.0.0-20230429153208-4ac043ec-nightly - '@blocksuite/global': 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3) - '@blocksuite/phasor': 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3)(nanoid@4.0.2)(yjs@13.6.0) - '@blocksuite/store': 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3)(yjs@13.6.0) - '@blocksuite/virgo': 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3)(yjs@13.6.0) + '@blocksuite/connector': 0.0.0-20230508043859-34d0cc68-nightly + '@blocksuite/global': 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4) + '@blocksuite/phasor': 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4)(nanoid@4.0.2)(yjs@13.6.1) + '@blocksuite/store': 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4)(yjs@13.6.1) + '@blocksuite/virgo': 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4)(yjs@13.6.1) '@popperjs/core': 2.11.7 hotkeys-js: 3.10.2 - lit: 2.7.3 + lit: 2.7.4 marked: 4.3.0 shiki: 0.14.2 turndown: 7.1.2 + yjs: 13.6.1 zod: 3.21.4 transitivePeerDependencies: - nanoid - - yjs dev: false - /@blocksuite/connector@0.0.0-20230429153208-4ac043ec-nightly: - resolution: {integrity: sha512-quTyYnWO75tr4n46hFnaj4TyfQZMLE8zPcr941oNRNzljnLPfoZvQD5VTWyup5U1rDgBf3IJqEQAKD1kKgPvvg==} + /@blocksuite/connector@0.0.0-20230508043859-34d0cc68-nightly: + resolution: {integrity: sha512-oq5UpgMfiq9Zj+oHlbaeJ9jnTpFGArCSf5F0dtShIhEdyoitApiw2Nh4MXX9++P5UbS2btd4xnEEnxGqHJBcWg==} dev: false - /@blocksuite/editor@0.0.0-20230429153208-4ac043ec-nightly(@blocksuite/blocks@0.0.0-20230429153208-4ac043ec-nightly)(@blocksuite/store@0.0.0-20230429153208-4ac043ec-nightly): - resolution: {integrity: sha512-CAgY832P4Co3RWwGGaSXv0gf06yrBB5dVWbZ3dMgVD39fHPGDhxh2+cCngUwv3NiY+yoQFwG90CDNJLoCyo8gQ==} + /@blocksuite/editor@0.0.0-20230508043859-34d0cc68-nightly(@blocksuite/blocks@0.0.0-20230508043859-34d0cc68-nightly)(@blocksuite/store@0.0.0-20230508043859-34d0cc68-nightly): + resolution: {integrity: sha512-Lr13aBPNd4nSIGB4YMKCTx41Yq2qkYnSJZzH0K1Xpz3jy6CGw7xMwX2yXiE9zRjxjxFm9KEN8Mx69X6E5wAi3A==} peerDependencies: - '@blocksuite/blocks': 0.0.0-20230429153208-4ac043ec-nightly - '@blocksuite/store': 0.0.0-20230429153208-4ac043ec-nightly - dependencies: - '@blocksuite/blocks': 0.0.0-20230429153208-4ac043ec-nightly(@blocksuite/store@0.0.0-20230429153208-4ac043ec-nightly)(nanoid@4.0.2)(yjs@13.6.0) - '@blocksuite/global': 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3) - '@blocksuite/store': 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3)(yjs@13.6.0) - lit: 2.7.3 + '@blocksuite/blocks': 0.0.0-20230508043859-34d0cc68-nightly + '@blocksuite/store': 0.0.0-20230508043859-34d0cc68-nightly + dependencies: + '@blocksuite/blocks': 0.0.0-20230508043859-34d0cc68-nightly(@blocksuite/store@0.0.0-20230508043859-34d0cc68-nightly)(nanoid@4.0.2)(yjs@13.6.1) + '@blocksuite/global': 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4) + '@blocksuite/store': 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4)(yjs@13.6.1) + '@toeverything/theme': 0.5.7 + lit: 2.7.4 marked: 4.3.0 turndown: 7.1.2 dev: false - /@blocksuite/global@0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3): - resolution: {integrity: sha512-sVAhSAF6Vu4nXU/XiNvVyEF0vxzEQaLPS7/3xXRj+Bp6102qSwLssDoSr5Lwtbbgh9AyaJ41RiyMH0bn2+Buow==} + /@blocksuite/global@0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4): + resolution: {integrity: sha512-ayVcifmb7yhPUzY3Eh3xBqKqQzuHFS1H6IELsgXA2blEmwc00ByrYjmFROX2rdoWlAI/XSyhtz8umAWZCYVS+g==} peerDependencies: lit: ^2.7 peerDependenciesMeta: @@ -358,31 +366,31 @@ packages: optional: true dependencies: ansi-colors: 4.1.3 - lit: 2.7.3 + lit: 2.7.4 zod: 3.21.4 dev: false - /@blocksuite/phasor@0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3)(nanoid@4.0.2)(yjs@13.6.0): - resolution: {integrity: sha512-9946sl2gU917aOHudjKBoBmaU4TOyzIAI/ngfmUI2LgHK8I3PCNzQ+RsZihqtUQGQsAWHJe8662nfjBgX3JD+Q==} + /@blocksuite/phasor@0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4)(nanoid@4.0.2)(yjs@13.6.1): + resolution: {integrity: sha512-REuLw/WKEKarmbqSjWOZjBeKbr+ySBblkq81RnLnSrjGDwiaPae9YJ+IFlk2v2+/Cbqq+kikIdSsAVKRICk7kg==} peerDependencies: nanoid: ^4 yjs: ^13 dependencies: - '@blocksuite/global': 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3) + '@blocksuite/global': 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4) fractional-indexing: 3.2.0 nanoid: 4.0.2 - yjs: 13.6.0 + yjs: 13.6.1 transitivePeerDependencies: - lit dev: false - /@blocksuite/store@0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3)(yjs@13.6.0): - resolution: {integrity: sha512-F619lOqxGETcy6e6i3Go5J/EoiW4lHRIY7bbitWFWGnBUMfPiNEyOynrreZKS4y9aIsT1Ik6NqFSvUnqC+sA0w==} + /@blocksuite/store@0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4)(yjs@13.6.1): + resolution: {integrity: sha512-oi6ipATeVynGLZPf1iyT3CRxilh+ShmILAD/YcO2Xr6D8WjWaat6itXPZ+8f9hysjRMPX4eXEtxBX0YJRasZWw==} peerDependencies: yjs: ^13 dependencies: - '@blocksuite/global': 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3) - '@blocksuite/virgo': 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3)(yjs@13.6.0) + '@blocksuite/global': 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4) + '@blocksuite/virgo': 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4)(yjs@13.6.1) '@types/flexsearch': 0.7.3 buffer: 6.0.3 flexsearch: 0.7.21 @@ -394,7 +402,7 @@ packages: nanoid: 4.0.2 y-protocols: 1.0.5 y-webrtc: 10.2.5 - yjs: 13.6.0 + yjs: 13.6.1 zod: 3.21.4 transitivePeerDependencies: - bufferutil @@ -403,15 +411,15 @@ packages: - utf-8-validate dev: false - /@blocksuite/virgo@0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3)(yjs@13.6.0): - resolution: {integrity: sha512-1IfNzEdRGPhhZtMyFHB6noSuDntqLG9beBnfZhBzc6Tjlic6QnM8rFbHWlr8ChvzjpDdwafHE/MmZQ94b1sf3Q==} + /@blocksuite/virgo@0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4)(yjs@13.6.1): + resolution: {integrity: sha512-Oo11SEM/XJUQzQtpmKcrY2BCLkfFbOK0gM5kh9Jv9xxX0kXT+wY/w/xrh0yU3U8hhGCxyPA027FnQyrcacPB5A==} peerDependencies: lit: ^2.7 yjs: ^13 dependencies: - '@blocksuite/global': 0.0.0-20230429153208-4ac043ec-nightly(lit@2.7.3) - lit: 2.7.3 - yjs: 13.6.0 + '@blocksuite/global': 0.0.0-20230508043859-34d0cc68-nightly(lit@2.7.4) + lit: 2.7.4 + yjs: 13.6.1 zod: 3.21.4 dev: false @@ -815,14 +823,14 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.39.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.40.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.39.0 - eslint-visitor-keys: 3.4.0 + eslint: 8.40.0 + eslint-visitor-keys: 3.4.1 dev: true /@eslint-community/regexpp@4.5.1: @@ -830,13 +838,13 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.0.2: - resolution: {integrity: sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==} + /@eslint/eslintrc@2.0.3: + resolution: {integrity: sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.5.1 + espree: 9.5.2 globals: 13.20.0 ignore: 5.2.4 import-fresh: 3.3.0 @@ -847,8 +855,8 @@ packages: - supports-color dev: true - /@eslint/js@8.39.0: - resolution: {integrity: sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==} + /@eslint/js@8.40.0: + resolution: {integrity: sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -917,81 +925,81 @@ packages: '@lit-labs/ssr-dom-shim': 1.1.1 dev: false - /@next/env@13.3.2: - resolution: {integrity: sha512-W+RJPtDj8PhOmZFi0MMhFoyWCz4tJeDEm7WtTTKflD+fgvmxpuOwxfQ2RWMz2gwnz6gL6hCuXtCtPpBBHDB7rg==} + /@next/env@13.4.1: + resolution: {integrity: sha512-eD6WCBMFjLFooLM19SIhSkWBHtaFrZFfg2Cxnyl3vS3DAdFRfnx5TY2RxlkuKXdIRCC0ySbtK9JXXt8qLCqzZg==} - /@next/eslint-plugin-next@13.3.4: - resolution: {integrity: sha512-mvS+HafOPy31oJbAi920WJXMdjbyb4v5FAMr9PeGZfRIdEcsLkA3mU/ZvmwzovJgP3nAWw2e2yM8iIFW8VpvIA==} + /@next/eslint-plugin-next@13.4.1: + resolution: {integrity: sha512-tVPS/2FKlA3ANCRCYZVT5jdbUKasBU8LG6bYqcNhyORDFTlDYa4cAWQJjZ7msIgLwMQIbL8CAsxrOL8maa/4Lg==} dependencies: glob: 7.1.7 dev: true - /@next/swc-darwin-arm64@13.3.2: - resolution: {integrity: sha512-Wa5o2EbkBP0NcUM13sEjzGoB86YTZWUfoqbbVB7gs9RJAy8KkIoGNoLV7K55fru7GNgHsRMga3j1FadjJJWQYg==} + /@next/swc-darwin-arm64@13.4.1: + resolution: {integrity: sha512-eF8ARHtYfnoYtDa6xFHriUKA/Mfj/cCbmKb3NofeKhMccs65G6/loZ15a6wYCCx4rPAd6x4t1WmVYtri7EdeBg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@next/swc-darwin-x64@13.3.2: - resolution: {integrity: sha512-mSk/rSKIo/VMTQa0t8DMELsNjjyYHMbX0q+MK7+SoWysiA5KrU0MQ2h8DUPf2T5tmQjyaUpX49l4j/dr2jovBA==} + /@next/swc-darwin-x64@13.4.1: + resolution: {integrity: sha512-7cmDgF9tGWTgn5Gw+vP17miJbH4wcraMHDCOHTYWkO/VeKT73dUWG23TNRLfgtCNSPgH4V5B4uLHoZTanx9bAw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@next/swc-linux-arm64-gnu@13.3.2: - resolution: {integrity: sha512-+5OC61uF33s0GdiGK2D5436Z2BqE8tJnlC6csTcBvCKQyvLsp6H5sPND5A1D2p/Gzh0mIGV/5vqfQ8yy+akOjw==} + /@next/swc-linux-arm64-gnu@13.4.1: + resolution: {integrity: sha512-qwJqmCri2ie8aTtE5gjTSr8S6O8B67KCYgVZhv9gKH44yvc/zXbAY8u23QGULsYOyh1islWE5sWfQNLOj9iryg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@next/swc-linux-arm64-musl@13.3.2: - resolution: {integrity: sha512-TZ7c7iZ3MB8yRBukbNVNzKSX/k9DKtGaEuofIZBWp+o4e29e8iuJaej9UUCNUkN6L/117/AEnlpH1c7yfvSj8Q==} + /@next/swc-linux-arm64-musl@13.4.1: + resolution: {integrity: sha512-qcC54tWNGDv/VVIFkazxhqH1Bnagjfs4enzELVRlUOoJPD2BGJTPI7z08pQPbbgxLtRiu8gl2mXvpB8WlOkMeA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@next/swc-linux-x64-gnu@13.3.2: - resolution: {integrity: sha512-aVoiakznPxGFIMcNlnY4HlZ4Be6oGhthaLSoXiVeplAgHLzHU2UqPMWqB/8/1TfMdWwISmwH4hb6DcdQ/PzTyA==} + /@next/swc-linux-x64-gnu@13.4.1: + resolution: {integrity: sha512-9TeWFlpLsBosZ+tsm/rWBaMwt5It9tPH8m3nawZqFUUrZyGRfGcI67js774vtx0k3rL9qbyY6+3pw9BCVpaYUA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@next/swc-linux-x64-musl@13.3.2: - resolution: {integrity: sha512-D2CsQZkBq/hcdcQkMXrG2huLJDPhyMuO5J8ZOc5fZtI8D/UxcRjWWK8yw+JgbOdZ3D9IMJSD3cd5QMx4VEI+Kg==} + /@next/swc-linux-x64-musl@13.4.1: + resolution: {integrity: sha512-sNDGaWmSqTS4QRUzw61wl4mVPeSqNIr1OOjLlQTRuyInxMxtqImRqdvzDvFTlDfdeUMU/DZhWGYoHrXLlZXe6A==} engines: {node: '>= 10'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@next/swc-win32-arm64-msvc@13.3.2: - resolution: {integrity: sha512-mjiWKEf9i1JAVePOa0Uw7c5c9Dp5D0LrevwIg31SNEpp8NwTr+ifHQzgf/ELNBWMxMLyiZiywWbYdcIjoa5y4A==} + /@next/swc-win32-arm64-msvc@13.4.1: + resolution: {integrity: sha512-+CXZC7u1iXdLRudecoUYbhbsXpglYv8KFYsFxKBPn7kg+bk7eJo738wAA4jXIl8grTF2mPdmO93JOQym+BlYGA==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@next/swc-win32-ia32-msvc@13.3.2: - resolution: {integrity: sha512-fee18wB9lfAnyAwJbyqN/PhcXWH1lGpBWJVF0gTB8G8/eUU0Vlq524Qt1RCt0K0pxLsSEhw1wEpGvqYYrAdQTA==} + /@next/swc-win32-ia32-msvc@13.4.1: + resolution: {integrity: sha512-vIoXVVc7UYO68VwVMDKwJC2+HqAZQtCYiVlApyKEeIPIQpz2gpufzGxk1z3/gwrJt/kJ5CDZjlhYDCzd3hdz+g==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@next/swc-win32-x64-msvc@13.3.2: - resolution: {integrity: sha512-eE6hPs0vtM08UB3B8YM1KIBOYZHJPF7NtWBdU0EIvRJ+R197+3W3VraaVBMMg0zy0e2e1jKgQPypakxN+vfZcw==} + /@next/swc-win32-x64-msvc@13.4.1: + resolution: {integrity: sha512-n8V5ImLQZibKTu10UUdI3nIeTLkliEXe628qxqW9v8My3BAH2a7H0SaCqkV2OgqFnn8sG1wxKYw9/SNJ632kSA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1044,15 +1052,51 @@ packages: dependencies: tslib: 2.5.0 - /@toeverything/y-indexeddb@0.5.4-canary.19(yjs@13.6.0): - resolution: {integrity: sha512-jWmZR41YwFMJKM+GH23Fj6WDXC09BAyDAjBU0P6DinVJlN96+6K9i37ohe3pw8B4TewVfw6N9Hs7cxQI14WvKw==} + /@testing-library/dom@9.2.0: + resolution: {integrity: sha512-xTEnpUKiV/bMyEsE5bT4oYA0x0Z/colMtxzUY8bKyPXBNLn/e0V4ZjBZkEhms0xE4pv9QsPfSRu9AWS4y5wGvA==} + engines: {node: '>=14'} + dependencies: + '@babel/code-frame': 7.21.4 + '@babel/runtime': 7.21.5 + '@types/aria-query': 5.0.1 + aria-query: 5.1.3 + chalk: 4.1.2 + dom-accessibility-api: 0.5.16 + lz-string: 1.5.0 + pretty-format: 27.5.1 + dev: true + + /@testing-library/react@14.0.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg==} + engines: {node: '>=14'} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + dependencies: + '@babel/runtime': 7.21.5 + '@testing-library/dom': 9.2.0 + '@types/react-dom': 18.2.4 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true + + /@toeverything/theme@0.5.7: + resolution: {integrity: sha512-uukhC5w7x7GcmBb0xZHp3g+aPYILceEdvOwMPzHvsLHpCeG/EyiHKLnccc3b02mLGiYRvIyO2XOg5Hawz4DRtA==} + dev: false + + /@toeverything/y-indexeddb@0.5.4-canary.26(yjs@13.6.1): + resolution: {integrity: sha512-zkDy9h0gwmnUI4ycwVuGHKAth7EGZgzD86jFPu1Rm/hbnr82sqpf3dd9OSAOl+A76KJ560whet+ba528noN6mA==} peerDependencies: yjs: ^13.5.51 dependencies: idb: 7.1.1 - yjs: 13.6.0 + yjs: 13.6.1 dev: false + /@types/aria-query@5.0.1: + resolution: {integrity: sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==} + dev: true + /@types/chai-subset@1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} dependencies: @@ -1097,18 +1141,22 @@ packages: resolution: {integrity: sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q==} dev: true + /@types/node@20.1.0: + resolution: {integrity: sha512-O+z53uwx64xY7D6roOi4+jApDGFg0qn6WHcxe5QeqjMaTezBO/mxdfFXIVAVVyNWKx84OmPB3L8kbVYOTeN34A==} + dev: true + /@types/prop-types@15.7.5: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} dev: true - /@types/react-dom@18.2.1: - resolution: {integrity: sha512-8QZEV9+Kwy7tXFmjJrp3XUKQSs9LTnE0KnoUb0YCguWBiNW0Yfb2iBMYZ08WPg35IR6P3Z0s00B15SwZnO26+w==} + /@types/react-dom@18.2.4: + resolution: {integrity: sha512-G2mHoTMTL4yoydITgOGwWdWMVd8sNgyEP85xVmMKAPUBwQWm9wBPQUmvbeF4V3WBY1P7mmL4BkjQ0SqUpf1snw==} dependencies: - '@types/react': 18.2.0 + '@types/react': 18.2.6 dev: true - /@types/react@18.2.0: - resolution: {integrity: sha512-0FLj93y5USLHdnhIhABk83rm8XEGA7kH3cr+YUlvxoUGp1xNt/DINUMvqPxLyOQMzLmZe8i4RTHbvb8MC7NmrA==} + /@types/react@18.2.6: + resolution: {integrity: sha512-wRZClXn//zxCFW+ye/D2qY65UsYP1Fpex2YXorHc8awoNamkMZSvBxwxdYVInsHOZZd2Ppq8isnSzJL5Mpf8OA==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.3 @@ -1127,8 +1175,8 @@ packages: resolution: {integrity: sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==} dev: false - /@typescript-eslint/eslint-plugin@5.59.1(@typescript-eslint/parser@5.59.1)(eslint@8.39.0)(typescript@5.0.4): - resolution: {integrity: sha512-AVi0uazY5quFB9hlp2Xv+ogpfpk77xzsgsIEWyVS7uK/c7MZ5tw7ZPbapa0SbfkqE0fsAMkz5UwtgMLVk2BQAg==} + /@typescript-eslint/eslint-plugin@5.59.2(@typescript-eslint/parser@5.59.2)(eslint@8.40.0)(typescript@5.0.4): + resolution: {integrity: sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -1139,12 +1187,12 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.1(eslint@8.39.0)(typescript@5.0.4) - '@typescript-eslint/scope-manager': 5.59.1 - '@typescript-eslint/type-utils': 5.59.1(eslint@8.39.0)(typescript@5.0.4) - '@typescript-eslint/utils': 5.59.1(eslint@8.39.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.59.2(eslint@8.40.0)(typescript@5.0.4) + '@typescript-eslint/scope-manager': 5.59.2 + '@typescript-eslint/type-utils': 5.59.2(eslint@8.40.0)(typescript@5.0.4) + '@typescript-eslint/utils': 5.59.2(eslint@8.40.0)(typescript@5.0.4) debug: 4.3.4 - eslint: 8.39.0 + eslint: 8.40.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -1155,8 +1203,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@5.59.1(eslint@8.39.0)(typescript@5.0.4): - resolution: {integrity: sha512-nzjFAN8WEu6yPRDizIFyzAfgK7nybPodMNFGNH0M9tei2gYnYszRDqVA0xlnRjkl7Hkx2vYrEdb6fP2a21cG1g==} + /@typescript-eslint/parser@5.59.2(eslint@8.40.0)(typescript@5.0.4): + resolution: {integrity: sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1165,26 +1213,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.59.1 - '@typescript-eslint/types': 5.59.1 - '@typescript-eslint/typescript-estree': 5.59.1(typescript@5.0.4) + '@typescript-eslint/scope-manager': 5.59.2 + '@typescript-eslint/types': 5.59.2 + '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.0.4) debug: 4.3.4 - eslint: 8.39.0 + eslint: 8.40.0 typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@5.59.1: - resolution: {integrity: sha512-mau0waO5frJctPuAzcxiNWqJR5Z8V0190FTSqRw1Q4Euop6+zTwHAf8YIXNwDOT29tyUDrQ65jSg9aTU/H0omA==} + /@typescript-eslint/scope-manager@5.59.2: + resolution: {integrity: sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.59.1 - '@typescript-eslint/visitor-keys': 5.59.1 + '@typescript-eslint/types': 5.59.2 + '@typescript-eslint/visitor-keys': 5.59.2 dev: true - /@typescript-eslint/type-utils@5.59.1(eslint@8.39.0)(typescript@5.0.4): - resolution: {integrity: sha512-ZMWQ+Oh82jWqWzvM3xU+9y5U7MEMVv6GLioM3R5NJk6uvP47kZ7YvlgSHJ7ERD6bOY7Q4uxWm25c76HKEwIjZw==} + /@typescript-eslint/type-utils@5.59.2(eslint@8.40.0)(typescript@5.0.4): + resolution: {integrity: sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -1193,23 +1241,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.59.1(typescript@5.0.4) - '@typescript-eslint/utils': 5.59.1(eslint@8.39.0)(typescript@5.0.4) + '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.0.4) + '@typescript-eslint/utils': 5.59.2(eslint@8.40.0)(typescript@5.0.4) debug: 4.3.4 - eslint: 8.39.0 + eslint: 8.40.0 tsutils: 3.21.0(typescript@5.0.4) typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@5.59.1: - resolution: {integrity: sha512-dg0ICB+RZwHlysIy/Dh1SP+gnXNzwd/KS0JprD3Lmgmdq+dJAJnUPe1gNG34p0U19HvRlGX733d/KqscrGC1Pg==} + /@typescript-eslint/types@5.59.2: + resolution: {integrity: sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree@5.59.1(typescript@5.0.4): - resolution: {integrity: sha512-lYLBBOCsFltFy7XVqzX0Ju+Lh3WPIAWxYpmH/Q7ZoqzbscLiCW00LeYCdsUnnfnj29/s1WovXKh2gwCoinHNGA==} + /@typescript-eslint/typescript-estree@5.59.2(typescript@5.0.4): + resolution: {integrity: sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -1217,8 +1265,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.59.1 - '@typescript-eslint/visitor-keys': 5.59.1 + '@typescript-eslint/types': 5.59.2 + '@typescript-eslint/visitor-keys': 5.59.2 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -1229,19 +1277,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@5.59.1(eslint@8.39.0)(typescript@5.0.4): - resolution: {integrity: sha512-MkTe7FE+K1/GxZkP5gRj3rCztg45bEhsd8HYjczBuYm+qFHP5vtZmjx3B0yUCDotceQ4sHgTyz60Ycl225njmA==} + /@typescript-eslint/utils@5.59.2(eslint@8.40.0)(typescript@5.0.4): + resolution: {integrity: sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.39.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.59.1 - '@typescript-eslint/types': 5.59.1 - '@typescript-eslint/typescript-estree': 5.59.1(typescript@5.0.4) - eslint: 8.39.0 + '@typescript-eslint/scope-manager': 5.59.2 + '@typescript-eslint/types': 5.59.2 + '@typescript-eslint/typescript-estree': 5.59.2(typescript@5.0.4) + eslint: 8.40.0 eslint-scope: 5.1.1 semver: 7.5.0 transitivePeerDependencies: @@ -1249,12 +1297,12 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@5.59.1: - resolution: {integrity: sha512-6waEYwBTCWryx0VJmP7JaM4FpipLsFl9CvYf2foAE8Qh/Y0s+bxWysciwOs0LTBED4JCaNxTZ5rGadB14M6dwA==} + /@typescript-eslint/visitor-keys@5.59.2: + resolution: {integrity: sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.59.1 - eslint-visitor-keys: 3.4.0 + '@typescript-eslint/types': 5.59.2 + eslint-visitor-keys: 3.4.1 dev: true /@vanilla-extract/babel-plugin-debug-ids@1.0.2: @@ -1295,7 +1343,7 @@ packages: lodash: 4.17.21 mlly: 1.2.0 outdent: 0.8.0 - vite: 4.3.3(@types/node@18.16.3) + vite: 4.3.5(@types/node@18.16.3) vite-node: 0.28.5 transitivePeerDependencies: - '@types/node' @@ -1307,14 +1355,14 @@ packages: - terser dev: true - /@vanilla-extract/next-plugin@2.1.2(next@13.3.2)(webpack@5.81.0): + /@vanilla-extract/next-plugin@2.1.2(next@13.4.1)(webpack@5.82.0): resolution: {integrity: sha512-k8P2opwu9uGIhWNu1GaTBKdvKRK412/Z9ov0DC82am4JKCqTLo6aWH6UnCodnfI3KqTLKgdqdG3ekrFUpDlR9g==} peerDependencies: next: '>=12.0.5' dependencies: - '@vanilla-extract/webpack-plugin': 2.2.0(webpack@5.81.0) + '@vanilla-extract/webpack-plugin': 2.2.0(webpack@5.82.0) browserslist: 4.21.5 - next: 13.3.2(@babel/core@7.21.5)(react-dom@18.2.0)(react@18.2.0) + next: 13.4.1(@babel/core@7.21.5)(react-dom@18.2.0)(react@18.2.0) transitivePeerDependencies: - '@types/node' - less @@ -1330,7 +1378,7 @@ packages: resolution: {integrity: sha512-17kVyLq3ePTKOkveHxXuIJZtGYs+cSoev7BlP+Lf4916qfDhk/HBjvlYDe8egrea7LNPHKwSZJK/bzZC+Q6AwQ==} dev: true - /@vanilla-extract/webpack-plugin@2.2.0(webpack@5.81.0): + /@vanilla-extract/webpack-plugin@2.2.0(webpack@5.82.0): resolution: {integrity: sha512-EQrnT7gIki+Wm57eIRZRw6pi4M4VVnwiSp5OOcQF81XdZvoYXo51Ern7+dHKS+Xxli151BWTUsg/UZSpaAz29Q==} peerDependencies: webpack: ^4.30.0 || ^5.20.2 @@ -1339,7 +1387,7 @@ packages: chalk: 4.1.2 debug: 4.3.4 loader-utils: 2.0.4 - webpack: 5.81.0 + webpack: 5.82.0 transitivePeerDependencies: - '@types/node' - less @@ -1350,7 +1398,7 @@ packages: - terser dev: true - /@vitejs/plugin-react@4.0.0(vite@4.3.3): + /@vitejs/plugin-react@4.0.0(vite@4.3.5): resolution: {integrity: sha512-HX0XzMjL3hhOYm+0s95pb0Z7F8O81G7joUHgfDd/9J/ZZf5k4xX6QAMFkKsHFxaHlf6X7GD7+XuaZ66ULiJuhQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -1360,7 +1408,7 @@ packages: '@babel/plugin-transform-react-jsx-self': 7.21.0(@babel/core@7.21.5) '@babel/plugin-transform-react-jsx-source': 7.19.6(@babel/core@7.21.5) react-refresh: 0.14.0 - vite: 4.3.3(@types/node@18.16.3) + vite: 4.3.5(@types/node@18.16.3) transitivePeerDependencies: - supports-color dev: true @@ -1995,6 +2043,10 @@ packages: esutils: 2.0.3 dev: true + /dom-accessibility-api@0.5.16: + resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} + dev: true + /domexception@1.0.1: resolution: {integrity: sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==} dependencies: @@ -2184,8 +2236,8 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-next@13.3.4(eslint@8.39.0)(typescript@5.0.4): - resolution: {integrity: sha512-TknEcP+EdTqLvJ2zMY1KnWqcx8ZHl1C2Tjjbq3qmtWcHRU5oxe1PAsz3vrKG3NOzonSaPcB2SpCSfYqcgj6nfA==} + /eslint-config-next@13.4.1(eslint@8.40.0)(typescript@5.0.4): + resolution: {integrity: sha512-ajuxjCkW1hvirr0EQZb3/B/bFH52Z7CT89uCtTcICFL9l30i5c8hN4p0LXvTjdOXNPV5fEDcxBgGHgXdzTj1/A==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -2193,16 +2245,16 @@ packages: typescript: optional: true dependencies: - '@next/eslint-plugin-next': 13.3.4 + '@next/eslint-plugin-next': 13.4.1 '@rushstack/eslint-patch': 1.2.0 - '@typescript-eslint/parser': 5.59.1(eslint@8.39.0)(typescript@5.0.4) - eslint: 8.39.0 + '@typescript-eslint/parser': 5.59.2(eslint@8.40.0)(typescript@5.0.4) + eslint: 8.40.0 eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.1)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.39.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.1)(eslint-import-resolver-typescript@3.5.5)(eslint@8.39.0) - eslint-plugin-jsx-a11y: 6.7.1(eslint@8.39.0) - eslint-plugin-react: 7.32.2(eslint@8.39.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.39.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.40.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0) + eslint-plugin-jsx-a11y: 6.7.1(eslint@8.40.0) + eslint-plugin-react: 7.32.2(eslint@8.40.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.40.0) typescript: 5.0.4 transitivePeerDependencies: - eslint-import-resolver-webpack @@ -2219,7 +2271,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.59.1)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.39.0): + /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.40.0): resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2228,9 +2280,9 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.13.0 - eslint: 8.39.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.1)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.39.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.1)(eslint-import-resolver-typescript@3.5.5)(eslint@8.39.0) + eslint: 8.40.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0) get-tsconfig: 4.5.0 globby: 13.1.4 is-core-module: 2.12.0 @@ -2243,7 +2295,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.1)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.39.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -2264,16 +2316,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.59.1(eslint@8.39.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.59.2(eslint@8.40.0)(typescript@5.0.4) debug: 3.2.7 - eslint: 8.39.0 + eslint: 8.40.0 eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.1)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.39.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.40.0) transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.1)(eslint-import-resolver-typescript@3.5.5)(eslint@8.39.0): + /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0): resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -2283,15 +2335,15 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.59.1(eslint@8.39.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.59.2(eslint@8.40.0)(typescript@5.0.4) array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.39.0 + eslint: 8.40.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.1)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.39.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.2)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0) has: 1.0.3 is-core-module: 2.12.0 is-glob: 4.0.3 @@ -2306,7 +2358,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsx-a11y@6.7.1(eslint@8.39.0): + /eslint-plugin-jsx-a11y@6.7.1(eslint@8.40.0): resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} engines: {node: '>=4.0'} peerDependencies: @@ -2321,7 +2373,7 @@ packages: axobject-query: 3.1.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.39.0 + eslint: 8.40.0 has: 1.0.3 jsx-ast-utils: 3.3.3 language-tags: 1.0.5 @@ -2331,16 +2383,16 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-react-hooks@4.6.0(eslint@8.39.0): + /eslint-plugin-react-hooks@4.6.0(eslint@8.40.0): resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.39.0 + eslint: 8.40.0 dev: true - /eslint-plugin-react@7.32.2(eslint@8.39.0): + /eslint-plugin-react@7.32.2(eslint@8.40.0): resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} engines: {node: '>=4'} peerDependencies: @@ -2350,7 +2402,7 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 - eslint: 8.39.0 + eslint: 8.40.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -2380,20 +2432,20 @@ packages: estraverse: 5.3.0 dev: true - /eslint-visitor-keys@3.4.0: - resolution: {integrity: sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==} + /eslint-visitor-keys@3.4.1: + resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.39.0: - resolution: {integrity: sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==} + /eslint@8.40.0: + resolution: {integrity: sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.39.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) '@eslint-community/regexpp': 4.5.1 - '@eslint/eslintrc': 2.0.2 - '@eslint/js': 8.39.0 + '@eslint/eslintrc': 2.0.3 + '@eslint/js': 8.40.0 '@humanwhocodes/config-array': 0.11.8 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -2404,8 +2456,8 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.0 - espree: 9.5.1 + eslint-visitor-keys: 3.4.1 + espree: 9.5.2 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -2434,13 +2486,13 @@ packages: - supports-color dev: true - /espree@9.5.1: - resolution: {integrity: sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==} + /espree@9.5.2: + resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.8.2 acorn-jsx: 5.3.2(acorn@8.8.2) - eslint-visitor-keys: 3.4.0 + eslint-visitor-keys: 3.4.1 dev: true /esquery@1.5.0: @@ -2737,8 +2789,8 @@ packages: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true - /happy-dom@9.10.1: - resolution: {integrity: sha512-4wEWL9jYxtjcvGJDACtcelTBD86Sv//Kwn3G/+zb0mrNF3sC/JC0lTznqLu4Vw4cNUfR4WLMjiC+jeAr8CxM2g==} + /happy-dom@9.10.9: + resolution: {integrity: sha512-3RnOyu6buPMpDAyOpp8yfR5Xi/k2p5MhrDwlG/dgpVHkptFN5IqubdbGOQU5luB7ANh6a08GOuiB+Bo9JCzCBw==} dependencies: css.escape: 1.5.1 he: 1.2.0 @@ -3037,13 +3089,24 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.16.3 + '@types/node': 20.1.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jotai@2.0.4(react@18.2.0): - resolution: {integrity: sha512-XkR1Jtm4a2iKV/7fdB3rNHjJz8FkkDMVczqiAok7lt8W4F69l/ZQkPGWSEV+hJOJXRn27k6XYKOoKEQIwBuAMA==} + /jotai-molecules@1.1.1(jotai@2.1.0)(react@18.2.0): + resolution: {integrity: sha512-Z57pYXbZumT/Ix/nAFZdSF6ur4V2bTRO6Trh/iNwUwzUnw446UsxdObJ9+eWrhd/WUjAqq9TyIei/txKRNtSvw==} + engines: {node: '>=10'} + peerDependencies: + jotai: '>=1' + react: '>=16' + dependencies: + jotai: 2.1.0(react@18.2.0) + react: 18.2.0 + dev: false + + /jotai@2.1.0(react@18.2.0): + resolution: {integrity: sha512-fR82PtHAmEQrc/daMEYGc4EteW96/b6wodtDSCzLvoJA/6y4YG70er4hh2f8CYwYjqwQ0eZUModGfG4DmwkTyQ==} engines: {node: '>=12.20.0'} peerDependencies: react: '>=17.0.0' @@ -3158,8 +3221,8 @@ packages: '@types/trusted-types': 2.0.3 dev: false - /lit@2.7.3: - resolution: {integrity: sha512-0a+u+vVbmgSfPu+fyvqjMPBX0Kwbyj9QOv9MbQFZhWGlV2cyk3lEwgfUQgYN+i/lx++1Z3wZknSIp3QCKxHLyg==} + /lit@2.7.4: + resolution: {integrity: sha512-cgD7xrZoYr21mbrkZIuIrj98YTMw/snJPg52deWVV4A8icLyNHI3bF70xsJeAgwTuiq5Kkd+ZR8gybSJDCPB7g==} dependencies: '@lit/reactive-element': 1.6.1 lit-element: 3.3.2 @@ -3224,6 +3287,11 @@ packages: yallist: 4.0.0 dev: true + /lz-string@1.5.0: + resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} + hasBin: true + dev: true + /magic-string@0.30.0: resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} engines: {node: '>=12'} @@ -3335,8 +3403,8 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true - /next@13.3.2(@babel/core@7.21.5)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-82VuWoMGWFqGUwCEWcqkIhGgdRry+VKVBZ9KNte1Uk2byZKvPZrC5c62fYHrIhSf36YKY6m21hxdyDzn6MDHFA==} + /next@13.4.1(@babel/core@7.21.5)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-JBw2kAIyhKDpjhEWvNVoFeIzNp9xNxg8wrthDOtMctfn3EpqGCmW0FSviNyGgOSOSn6zDaX48pmvbdf6X2W9xA==} engines: {node: '>=16.8.0'} hasBin: true peerDependencies: @@ -3356,7 +3424,7 @@ packages: sass: optional: true dependencies: - '@next/env': 13.3.2 + '@next/env': 13.4.1 '@swc/helpers': 0.5.1 busboy: 1.6.0 caniuse-lite: 1.0.30001481 @@ -3364,16 +3432,17 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) styled-jsx: 5.1.1(@babel/core@7.21.5)(react@18.2.0) + zod: 3.21.4 optionalDependencies: - '@next/swc-darwin-arm64': 13.3.2 - '@next/swc-darwin-x64': 13.3.2 - '@next/swc-linux-arm64-gnu': 13.3.2 - '@next/swc-linux-arm64-musl': 13.3.2 - '@next/swc-linux-x64-gnu': 13.3.2 - '@next/swc-linux-x64-musl': 13.3.2 - '@next/swc-win32-arm64-msvc': 13.3.2 - '@next/swc-win32-ia32-msvc': 13.3.2 - '@next/swc-win32-x64-msvc': 13.3.2 + '@next/swc-darwin-arm64': 13.4.1 + '@next/swc-darwin-x64': 13.4.1 + '@next/swc-linux-arm64-gnu': 13.4.1 + '@next/swc-linux-arm64-musl': 13.4.1 + '@next/swc-linux-x64-gnu': 13.4.1 + '@next/swc-linux-x64-musl': 13.4.1 + '@next/swc-win32-arm64-msvc': 13.4.1 + '@next/swc-win32-ia32-msvc': 13.4.1 + '@next/swc-win32-x64-msvc': 13.4.1 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -3996,8 +4065,8 @@ packages: engines: {node: '>=6'} dev: true - /terser-webpack-plugin@5.3.7(webpack@5.81.0): - resolution: {integrity: sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==} + /terser-webpack-plugin@5.3.8(webpack@5.82.0): + resolution: {integrity: sha512-WiHL3ElchZMsK27P8uIUh4604IgJyAW47LVXGbEoB21DbQcZ+OuMpGjVYnEUaqcWM6dO8uS2qUbA7LSCWqvsbg==} engines: {node: '>= 10.13.0'} peerDependencies: '@swc/core': '*' @@ -4016,12 +4085,12 @@ packages: jest-worker: 27.5.1 schema-utils: 3.1.2 serialize-javascript: 6.0.1 - terser: 5.17.1 - webpack: 5.81.0 + terser: 5.17.2 + webpack: 5.82.0 dev: true - /terser@5.17.1: - resolution: {integrity: sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw==} + /terser@5.17.2: + resolution: {integrity: sha512-1D1aGbOF1Mnayq5PvfMc0amAR1y5Z1nrZaGCvI5xsdEfZEVte8okonk02OiaK5fw5hG1GWuuVsakOnpZW8y25A==} engines: {node: '>=10'} hasBin: true dependencies: @@ -4201,7 +4270,7 @@ packages: picocolors: 1.0.0 source-map: 0.6.1 source-map-support: 0.5.21 - vite: 4.3.3(@types/node@18.16.3) + vite: 4.3.5(@types/node@18.16.3) transitivePeerDependencies: - '@types/node' - less @@ -4222,7 +4291,7 @@ packages: mlly: 1.2.0 pathe: 1.1.0 picocolors: 1.0.0 - vite: 4.3.3(@types/node@18.16.3) + vite: 4.3.5(@types/node@18.16.3) transitivePeerDependencies: - '@types/node' - less @@ -4233,8 +4302,8 @@ packages: - terser dev: true - /vite@4.3.3(@types/node@18.16.3): - resolution: {integrity: sha512-MwFlLBO4udZXd+VBcezo3u8mC77YQk+ik+fbc0GZWGgzfbPP+8Kf0fldhARqvSYmtIWoAJ5BXPClUbMTlqFxrA==} + /vite@4.3.5(@types/node@18.16.3): + resolution: {integrity: sha512-0gEnL9wiRFxgz40o/i/eTBwm+NEbpUeTWhzKrZDSdKm6nplj+z4lKz8ANDgildxHm47Vg8EUia0aicKbawUVVA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -4266,7 +4335,7 @@ packages: fsevents: 2.3.2 dev: true - /vitest@0.30.1(happy-dom@9.10.1): + /vitest@0.30.1(happy-dom@9.10.9): resolution: {integrity: sha512-y35WTrSTlTxfMLttgQk4rHcaDkbHQwDP++SNwPb+7H8yb13Q3cu2EixrtHzF27iZ8v0XCciSsLg00RkPAzB/aA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -4311,7 +4380,7 @@ packages: chai: 4.3.7 concordance: 5.0.4 debug: 4.3.4 - happy-dom: 9.10.1 + happy-dom: 9.10.9 local-pkg: 0.4.3 magic-string: 0.30.0 pathe: 1.1.0 @@ -4321,7 +4390,7 @@ packages: strip-literal: 1.0.1 tinybench: 2.5.0 tinypool: 0.4.0 - vite: 4.3.3(@types/node@18.16.3) + vite: 4.3.5(@types/node@18.16.3) vite-node: 0.30.1(@types/node@18.16.3) why-is-node-running: 2.2.2 transitivePeerDependencies: @@ -4368,8 +4437,8 @@ packages: engines: {node: '>=10.13.0'} dev: true - /webpack@5.81.0: - resolution: {integrity: sha512-AAjaJ9S4hYCVODKLQTgG5p5e11hiMawBwV2v8MYLE0C/6UAGLuAF4n1qa9GOwdxnicaP+5k6M5HrLmD4+gIB8Q==} + /webpack@5.82.0: + resolution: {integrity: sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -4399,7 +4468,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.1.2 tapable: 2.2.1 - terser-webpack-plugin: 5.3.7(webpack@5.81.0) + terser-webpack-plugin: 5.3.8(webpack@5.82.0) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -4535,8 +4604,8 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true - /yjs@13.6.0: - resolution: {integrity: sha512-tFZtuQV6XamtDa9SfZhUsxchUcTBWe7fzpo1UWZDLXGejTZ5t9MCswGYzyvq7+BDzfEc9oX54QEbzI/4NyS6+g==} + /yjs@13.6.1: + resolution: {integrity: sha512-IyyHL+/v9N2S4YLSjGHMa0vMAfFxq8RDG5Nvb77raTTHJPweU3L/fRlqw6ElZvZUuHWnax3ufHR0Tx0ntfG63Q==} engines: {node: '>=16.0.0', npm: '>=8.0.0'} dependencies: lib0: 0.2.74 @@ -4554,4 +4623,3 @@ packages: /zod@3.21.4: resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==} - dev: false diff --git a/src/components/Editor.tsx b/src/components/Editor.tsx index 806cd37..a3be476 100644 --- a/src/components/Editor.tsx +++ b/src/components/Editor.tsx @@ -1,8 +1,10 @@ -import { useRef} from 'react' +import { useRef } from 'react' import { useAtomValue } from 'jotai' -import { currentPageIdAtom, editorAtom } from '../store.ts' +import { WorkspaceMolecule } from '../store.ts' +import { useMolecule } from 'jotai-molecules' export const Editor = () => { + const { currentPageIdAtom, editorAtom } = useMolecule(WorkspaceMolecule) const ref = useRef(null) const pageId = useAtomValue(currentPageIdAtom) const editor = useAtomValue(editorAtom) diff --git a/src/components/page-list/index.tsx b/src/components/page-list/index.tsx index 075efbc..a526b4f 100644 --- a/src/components/page-list/index.tsx +++ b/src/components/page-list/index.tsx @@ -1,12 +1,11 @@ import { useAtomValue, useSetAtom } from 'jotai' -import { - currentPageIdAtom, - currentPageMetaAtom, -} from '../../store.ts' +import { WorkspaceMolecule } from '../../store.ts' import { ReactElement } from 'react' +import { useMolecule } from 'jotai-molecules' export const PageList = (): ReactElement => { - const pageList= useAtomValue(currentPageMetaAtom) + const { currentPageIdAtom,currentPageMetaAtom } = useMolecule(WorkspaceMolecule) + const pageList = useAtomValue(currentPageMetaAtom) const setPageId= useSetAtom(currentPageIdAtom) return (
diff --git a/src/components/workspace-list/index.tsx b/src/components/workspace-list/index.tsx index 57f7a12..25e2237 100644 --- a/src/components/workspace-list/index.tsx +++ b/src/components/workspace-list/index.tsx @@ -1,14 +1,18 @@ import { useAtom, useSetAtom } from 'jotai' import { - currentPageIdAtom, - currentWorkspaceIdAtom, - workspaceIdsAtom + WorkspaceMolecule } from '../../store.ts' import { useRouter } from 'next/router' import React, { useCallback } from 'react' import { cardStyle, containerStyle } from './index.css.ts' +import { useMolecule } from 'jotai-molecules' export const WorkspaceList = () => { + const { + currentPageIdAtom, + currentWorkspaceIdAtom, + workspaceIdsAtom + } = useMolecule(WorkspaceMolecule) const [ids, setIds] = useAtom(workspaceIdsAtom) const router = useRouter() const setWorkspaceId = useSetAtom(currentWorkspaceIdAtom) @@ -38,20 +42,20 @@ export const WorkspaceList = () => {
))}
{ - const id = prompt('Workspace ID') - if (id) { - setIds((ids) => { - if (!ids) { - return [id] - } - if (ids.includes(id)) { - return ids - } - return [...ids, id] - }) - } - }, [setIds])} + onClick={useCallback(() => { + const id = prompt('Workspace ID') + if (id) { + setIds((ids) => { + if (!ids) { + return [id] + } + if (ids.includes(id)) { + return ids + } + return [...ids, id] + }) + } + }, [setIds])} > ADD Workspace
diff --git a/src/pages/[workspaceId]/[pageId]/index.tsx b/src/pages/[workspaceId]/[pageId]/index.tsx index 9322d92..718ed51 100644 --- a/src/pages/[workspaceId]/[pageId]/index.tsx +++ b/src/pages/[workspaceId]/[pageId]/index.tsx @@ -1,10 +1,9 @@ import { - currentPageIdAtom, currentWorkspaceAtom, - currentWorkspaceIdAtom, - rootStore + WorkspaceMolecule, + rootStore, WorkspaceScope } from '../../../store.ts' import { useAtomValue } from 'jotai' -import { Suspense, useEffect, useState } from 'react' +import { Suspense, useEffect, useMemo, useState } from 'react' import Link from 'next/link' import { Editor } from '../../../components/Editor' @@ -12,8 +11,10 @@ import { buttonStyle, containerStyle } from '../../../styles/index.css.ts' import { PageList } from '../../../components/page-list' import { assertExists } from '@blocksuite/store' import { initPage } from '../../../utils.ts' +import { ScopeProvider, useMolecule } from 'jotai-molecules' const WorkspacePage = () => { + const { currentPageIdAtom, currentWorkspaceAtom, currentWorkspaceIdAtom } = useMolecule(WorkspaceMolecule) const workspaceId = useAtomValue(currentWorkspaceIdAtom) const pageId = useAtomValue(currentPageIdAtom) const [value, setValue] = useState(undefined) @@ -21,6 +22,11 @@ const WorkspacePage = () => { useEffect(() => { setValue(true) }, []) + const scopeValue = useMemo(() => ({ + defaultPage: pageId, + defaultWorkspace: workspaceId, + defaultMode: 'page' + }) as const, [pageId, workspaceId]) if (isInitialRender) { return 'Loading...' } @@ -52,6 +58,15 @@ const WorkspacePage = () => { key={`${workspaceId}-${pageId}`} /> + + Loading... + }> + + + ) } diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 50fc8dc..a95303e 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -3,10 +3,17 @@ import '../index.css' import type { AppProps } from 'next/app' import { Provider } from 'jotai' -import { rootStore } from '../store.ts' +import { rootStore, WorkspaceScope } from '../store.ts' import { ErrorBoundary } from 'react-error-boundary' import { WorkspaceNotFoundError } from '../utils.ts' import Link from 'next/link' +import { ScopeProvider } from 'jotai-molecules' + +const defaultValue: WorkspaceScope = { + defaultPage: null, + defaultWorkspace: null, + defaultMode: 'page' +} const App = ({ Component, pageProps }: AppProps) => { return ( @@ -34,7 +41,9 @@ const App = ({ Component, pageProps }: AppProps) => { }} > - + + + ) diff --git a/src/store.ts b/src/store.ts index 4f1ca86..f5370d7 100644 --- a/src/store.ts +++ b/src/store.ts @@ -9,128 +9,164 @@ import type { EditorContainer } from '@blocksuite/editor' import type { PageMeta } from '@blocksuite/store' import { initPage, WorkspaceNotFoundError } from './utils.ts' import { Observable, from } from 'rxjs' -import { filter, mergeMap } from 'rxjs/operators' +import { filter, switchMap } from 'rxjs/operators' +import { + molecule, + createScope, +} from 'jotai-molecules' -const editorContainerAtom = atom>(async () => { - const { EditorContainer } = await import('@blocksuite/editor') - return EditorContainer -}) +const hashMap = new Map() +const providerHashMap = new Map>() export const rootStore = createStore() -// if the value is `null`, it means the user has not created any workspace yet -export const workspaceIdsAtom = atomWithStorage('workspaces', null) +export type WorkspaceScope = { + defaultWorkspace: string | null + defaultPage: string | null + defaultMode: 'page' | 'edgeless' +} -// hotfix for jotai #1813 -rootStore.sub(workspaceIdsAtom, () => {}) +export const WorkspaceScope = createScope({ + defaultWorkspace: null, + defaultPage: null, + defaultMode: 'page' +}) -workspaceIdsAtom.onMount = (set) => { - if (localStorage.getItem('workspaces') === null) { - set([ - 'demo-workspace' - ]) - } -} +export const WorkspaceMolecule = molecule((_, getScope) => { + const { defaultWorkspace, defaultPage, defaultMode } = getScope(WorkspaceScope) + const editorContainerAtom = atom>(async () => { + const { EditorContainer } = await import('@blocksuite/editor') + return EditorContainer + }) -export const currentWorkspaceIdAtom = atom(null) -export const currentPageIdAtom = atom(null) + // if the value is `null`, it means the user has not created any workspace yet + const workspaceIdsAtom = atomWithStorage('workspaces', null) -const hashMap = new Map() + const currentModeAtom = atom<'page' | 'edgeless'>(defaultMode) -export const currentWorkspaceAtom = atom>( - async (get, { - signal - }) => { - const ids = get(workspaceIdsAtom) - const id = get(currentWorkspaceIdAtom) - console.log(ids) - if (!id) return null - if (ids === null) { - return null - } - if (ids.indexOf(id) === -1) { - throw new WorkspaceNotFoundError('workspace not found') - } - let workspace = hashMap.get(id) - if (!workspace) { - workspace = new Workspace({ - id - }) - workspace.register(AffineSchemas) - hashMap.set(id, workspace) + // hotfix for jotai #1813 + rootStore.sub(workspaceIdsAtom, () => {}) + + workspaceIdsAtom.onMount = (set) => { + if (localStorage.getItem('workspaces') === null) { + set([ + 'demo-workspace' + ]) } - const provider = createIndexedDBProvider(workspace.id, workspace.doc) - assertExists(provider) - provider.connect() - provider.whenSynced.then(() => { - assertExists(workspace) - if (workspace.isEmpty) { - const page = workspace.createPage({ - id: 'page0' + } + + const currentWorkspaceIdAtom = atom(defaultWorkspace) + const currentPageIdAtom = atom(defaultPage) + + const currentWorkspaceAtom = atom>( + async (get, { + signal + }) => { + const ids = get(workspaceIdsAtom) + const id = get(currentWorkspaceIdAtom) + if (!id) return null + if (ids === null) { + return null + } + if (ids.indexOf(id) === -1) { + throw new WorkspaceNotFoundError('workspace not found') + } + let workspace = hashMap.get(id) + if (!workspace) { + workspace = new Workspace({ + id }) + workspace.register(AffineSchemas) + hashMap.set(id, workspace) + } + let provider = providerHashMap.get(id) + if (!provider) { + provider = createIndexedDBProvider(workspace.id, workspace.doc) + assertExists(provider) + provider.connect() + provider.whenSynced.then(() => { + assertExists(workspace) + if (workspace.isEmpty) { + const page = workspace.createPage({ + id: 'page0' + }) - initPage(page) - } else { - const page = workspace.getPage('page0') - assertExists(page) + initPage(page) + } else { + const page = workspace.getPage('page0') + assertExists(page) + } + }) + await provider.whenSynced + if (signal.aborted) { + provider.disconnect() + return null + } + signal.addEventListener('abort', () => { + provider.disconnect() + }) + providerHashMap.set(id, provider) } + return workspace }) - await provider.whenSynced - if (signal.aborted) { - provider.disconnect() - return null - } - signal.addEventListener('abort', () => { - provider.disconnect() - }) - return workspace - }) -export const currentPageMetaAtom = atomWithObservable( - (get) => { - return from(get(currentWorkspaceAtom)).pipe( - filter((workspace): workspace is Workspace => workspace !== null), - mergeMap(workspace => { - const group = new DisposableGroup() - return new Observable((subscriber) => { - group.add(workspace.slots.pageAdded.on(() => { + const currentPageMetaAtom = atomWithObservable( + (get) => { + return from(get(currentWorkspaceAtom)).pipe( + filter((workspace): workspace is Workspace => workspace !== null), + switchMap(workspace => { + const group = new DisposableGroup() + return new Observable((subscriber) => { + group.add(workspace.slots.pageAdded.on(() => { + subscriber.next(workspace.meta.pageMetas) + })) + group.add(workspace.slots.pageRemoved.on(() => { + subscriber.next(workspace.meta.pageMetas) + })) subscriber.next(workspace.meta.pageMetas) - })) - group.add(workspace.slots.pageRemoved.on(() => { - subscriber.next(workspace.meta.pageMetas) - })) - subscriber.next(workspace.meta.pageMetas) - return () => { - group.dispose() - } + return () => { + group.dispose() + } + }) }) - }) - ) + ) + }) + + const editorAtom = atom>(async (get) => { + const workspace = await get(currentWorkspaceAtom) + const pageId = get(currentPageIdAtom) + if (!workspace || !pageId) return null + const EditorContainer = await get(editorContainerAtom) + const editor = new EditorContainer() + const page = workspace.getPage(pageId) + editor.mode = get(currentModeAtom) + if (!page) { + return null + } + editor.page = page + return editor }) -export const editorAtom = atom>(async (get) => { - const workspace = await get(currentWorkspaceAtom) - const pageId = get(currentPageIdAtom) - if (!workspace || !pageId) return null - const EditorContainer = await get(editorContainerAtom) - const editor = new EditorContainer() - const page = workspace.getPage(pageId) - if (!page) { - return null + if (!defaultWorkspace && !defaultPage && typeof window !== 'undefined') { + const workspaceId = window.location.pathname.split('/')[1] + const pageId = window.location.pathname.split('/')[2] + if (workspaceId) { + rootStore.set(currentWorkspaceIdAtom, workspaceId) + } + if (pageId) { + rootStore.set(currentPageIdAtom, pageId) + } } - editor.page = page - return editor -}) -if (typeof window !== 'undefined') { - const workspaceId = window.location.pathname.split('/')[1] - const pageId = window.location.pathname.split('/')[2] - if (workspaceId) { - rootStore.set(currentWorkspaceIdAtom, workspaceId) - } - if (pageId) { - rootStore.set(currentPageIdAtom, pageId) - } -} + return { + workspaceIdsAtom, + currentWorkspaceIdAtom, + currentPageIdAtom, + currentModeAtom, + currentWorkspaceAtom, + currentPageMetaAtom, + editorAtom + } as const +}) diff --git a/src/tests/store.spec.ts b/src/tests/store.spec.ts index c0724e0..f8930a3 100644 --- a/src/tests/store.spec.ts +++ b/src/tests/store.spec.ts @@ -2,14 +2,20 @@ import 'fake-indexeddb/auto' import { describe, expect, test } from 'vitest' import { - currentWorkspaceAtom, - currentWorkspaceIdAtom, - rootStore, workspaceIdsAtom + WorkspaceMolecule, + rootStore, } from '../store' +import { useMolecule } from 'jotai-molecules' import { assertExists } from '@blocksuite/store' +import { renderHook } from '@testing-library/react' + +function getAtoms() { + return renderHook(() => useMolecule(WorkspaceMolecule)).result.current +} describe('store', () => { test('init', async () => { + const { currentWorkspaceIdAtom, currentWorkspaceAtom, workspaceIdsAtom } = getAtoms() expect(rootStore.get(currentWorkspaceIdAtom)).toBe(null) expect(await rootStore.get(currentWorkspaceAtom)).toBe(null) @@ -22,6 +28,7 @@ describe('store', () => { }) test('switch workspace', async () => { + const { currentWorkspaceIdAtom, currentWorkspaceAtom, workspaceIdsAtom } = getAtoms() rootStore.set(workspaceIdsAtom, ['workspace1', 'workspace2']) rootStore.set(currentWorkspaceIdAtom, 'workspace1') {