From 21f65dab04d19954e1cfcb1080d1e68f6d99e3da Mon Sep 17 00:00:00 2001 From: goncy Date: Fri, 30 Aug 2024 15:24:43 -0300 Subject: [PATCH] Implement optional catch all route --- package.json | 4 +- pnpm-lock.yaml | 538 ++++++++++-------- src/app/[[...product]]/page.tsx | 35 ++ src/app/[product]/client.tsx | 30 - src/app/[product]/page.tsx | 32 -- src/app/layout.tsx | 5 +- src/app/loading.tsx | 20 - src/app/mocks/[mock]/page.tsx | 16 - src/app/page.tsx | 10 - src/components/ui/sheet.tsx | 32 +- src/modules/product/api.ts | 16 +- .../product/components/ProductCard.tsx | 83 +-- src/modules/product/mocks/default.json | 88 ++- src/modules/store/screens/Store.tsx | 195 ++++--- 14 files changed, 544 insertions(+), 560 deletions(-) create mode 100644 src/app/[[...product]]/page.tsx delete mode 100644 src/app/[product]/client.tsx delete mode 100644 src/app/[product]/page.tsx delete mode 100644 src/app/loading.tsx delete mode 100644 src/app/mocks/[mock]/page.tsx delete mode 100644 src/app/page.tsx diff --git a/package.json b/package.json index 53e6f21..ed51e91 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.1.0", "lucide-react": "^0.331.0", - "next": "14.1.0", + "next": "14.2.7", "next-themes": "^0.2.1", "papaparse": "^5.4.1", "react": "18.2.0", @@ -27,7 +27,7 @@ "tailwindcss-animate": "^1.0.7" }, "devDependencies": { - "@next/eslint-plugin-next": "14.1.0", + "@next/eslint-plugin-next": "14.2.7", "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^14.2.1", "@types/jest": "^29.5.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76866ee..3159d43 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,19 +10,19 @@ importers: dependencies: '@radix-ui/react-dialog': specifier: ^1.0.5 - version: 1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + version: 1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-label': specifier: ^2.0.2 - version: 2.0.2(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + version: 2.0.2(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-radio-group': specifier: ^1.1.3 - version: 1.1.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-slot': specifier: ^1.0.2 version: 1.0.2(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-toggle': specifier: ^1.0.3 - version: 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + version: 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) class-variance-authority: specifier: ^0.7.0 version: 0.7.0 @@ -33,11 +33,11 @@ importers: specifier: ^0.331.0 version: 0.331.0(react@18.2.0) next: - specifier: 14.1.0 - version: 14.1.0(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + specifier: 14.2.7 + version: 14.2.7(@babel/core@7.20.12)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) next-themes: specifier: ^0.2.1 - version: 0.2.1(next@14.1.0)(react-dom@18.2.0)(react@18.2.0) + version: 0.2.1(next@14.2.7(@babel/core@7.20.12)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) papaparse: specifier: ^5.4.1 version: 5.4.1 @@ -55,14 +55,14 @@ importers: version: 1.0.7(tailwindcss@3.4.1) devDependencies: '@next/eslint-plugin-next': - specifier: 14.1.0 - version: 14.1.0 + specifier: 14.2.7 + version: 14.2.7 '@testing-library/jest-dom': specifier: ^6.4.2 - version: 6.4.2(@types/jest@29.5.12)(jest@29.7.0) + version: 6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.19)) '@testing-library/react': specifier: ^14.2.1 - version: 14.2.1(react-dom@18.2.0)(react@18.2.0) + version: 14.2.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@types/jest': specifier: ^29.5.12 version: 29.5.12 @@ -80,13 +80,13 @@ importers: version: 18.2.19 '@typescript-eslint/eslint-plugin': specifier: ^7.0.1 - version: 7.0.1(@typescript-eslint/parser@7.0.1)(eslint@8.56.0)(typescript@5.3.3) + version: 7.0.1(@typescript-eslint/parser@7.0.1(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/parser': specifier: ^7.0.1 version: 7.0.1(eslint@8.56.0)(typescript@5.3.3) '@vercel/style-guide': specifier: ^5.2.0 - version: 5.2.0(@next/eslint-plugin-next@14.1.0)(eslint@8.56.0)(jest@29.7.0)(prettier@3.2.5)(typescript@5.3.3) + version: 5.2.0(@next/eslint-plugin-next@14.2.7)(eslint@8.56.0)(jest@29.7.0(@types/node@20.11.19))(prettier@3.2.5)(typescript@5.3.3) autoprefixer: specifier: ^10.4.17 version: 10.4.17(postcss@8.4.35) @@ -104,10 +104,10 @@ importers: version: 2.15.1(eslint@8.56.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.0.1)(eslint@8.56.0) + version: 2.29.1(@typescript-eslint/parser@7.0.1(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0) eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.2.5) + version: 5.1.3(eslint-config-prettier@9.1.0(eslint@8.56.0))(eslint@8.56.0)(prettier@3.2.5) eslint-plugin-react: specifier: ^7.33.2 version: 7.33.2(eslint@8.56.0) @@ -134,7 +134,7 @@ importers: version: 3.4.1 ts-jest: specifier: ^29.1.2 - version: 29.1.2(@babel/core@7.20.12)(jest@29.7.0)(typescript@5.3.3) + version: 29.1.2(@babel/core@7.20.12)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.20.12))(jest@29.7.0(@types/node@20.11.19))(typescript@5.3.3) ts-standard: specifier: ^12.0.2 version: 12.0.2(typescript@5.3.3) @@ -598,62 +598,62 @@ packages: '@microsoft/tsdoc@0.14.2': resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} - '@next/env@14.1.0': - resolution: {integrity: sha512-Py8zIo+02ht82brwwhTg36iogzFqGLPXlRGKQw5s+qP/kMNc4MAyDeEwBKDijk6zTIbegEgu8Qy7C1LboslQAw==} + '@next/env@14.2.7': + resolution: {integrity: sha512-OTx9y6I3xE/eih+qtthppwLytmpJVPM5PPoJxChFsbjIEFXIayG0h/xLzefHGJviAa3Q5+Fd+9uYojKkHDKxoQ==} - '@next/eslint-plugin-next@14.1.0': - resolution: {integrity: sha512-x4FavbNEeXx/baD/zC/SdrvkjSby8nBn8KcCREqk6UuwvwoAPZmaV8TFCAuo/cpovBRTIY67mHhe86MQQm/68Q==} + '@next/eslint-plugin-next@14.2.7': + resolution: {integrity: sha512-+7xh142AdhZGjY9/L0iFo7mqRBMJHe+q+uOL+hto1Lfo9DeWCGcR6no4StlFbVSVcA6fQLKEX6y6qhMsSKbgNQ==} - '@next/swc-darwin-arm64@14.1.0': - resolution: {integrity: sha512-nUDn7TOGcIeyQni6lZHfzNoo9S0euXnu0jhsbMOmMJUBfgsnESdjN97kM7cBqQxZa8L/bM9om/S5/1dzCrW6wQ==} + '@next/swc-darwin-arm64@14.2.7': + resolution: {integrity: sha512-UhZGcOyI9LE/tZL3h9rs/2wMZaaJKwnpAyegUVDGZqwsla6hMfeSj9ssBWQS9yA4UXun3pPhrFLVnw5KXZs3vw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@14.1.0': - resolution: {integrity: sha512-1jgudN5haWxiAl3O1ljUS2GfupPmcftu2RYJqZiMJmmbBT5M1XDffjUtRUzP4W3cBHsrvkfOFdQ71hAreNQP6g==} + '@next/swc-darwin-x64@14.2.7': + resolution: {integrity: sha512-ys2cUgZYRc+CbyDeLAaAdZgS7N1Kpyy+wo0b/gAj+SeOeaj0Lw/q+G1hp+DuDiDAVyxLBCJXEY/AkhDmtihUTA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@14.1.0': - resolution: {integrity: sha512-RHo7Tcj+jllXUbK7xk2NyIDod3YcCPDZxj1WLIYxd709BQ7WuRYl3OWUNG+WUfqeQBds6kvZYlc42NJJTNi4tQ==} + '@next/swc-linux-arm64-gnu@14.2.7': + resolution: {integrity: sha512-2xoWtE13sUJ3qrC1lwE/HjbDPm+kBQYFkkiVECJWctRASAHQ+NwjMzgrfqqMYHfMxFb5Wws3w9PqzZJqKFdWcQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@14.1.0': - resolution: {integrity: sha512-v6kP8sHYxjO8RwHmWMJSq7VZP2nYCkRVQ0qolh2l6xroe9QjbgV8siTbduED4u0hlk0+tjS6/Tuy4n5XCp+l6g==} + '@next/swc-linux-arm64-musl@14.2.7': + resolution: {integrity: sha512-+zJ1gJdl35BSAGpkCbfyiY6iRTaPrt3KTl4SF/B1NyELkqqnrNX6cp4IjjjxKpd64/7enI0kf6b9O1Uf3cL0pw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@14.1.0': - resolution: {integrity: sha512-zJ2pnoFYB1F4vmEVlb/eSe+VH679zT1VdXlZKX+pE66grOgjmKJHKacf82g/sWE4MQ4Rk2FMBCRnX+l6/TVYzQ==} + '@next/swc-linux-x64-gnu@14.2.7': + resolution: {integrity: sha512-m6EBqrskeMUzykBrv0fDX/28lWIBGhMzOYaStp0ihkjzIYJiKUOzVYD1gULHc8XDf5EMSqoH/0/TRAgXqpQwmw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@14.1.0': - resolution: {integrity: sha512-rbaIYFt2X9YZBSbH/CwGAjbBG2/MrACCVu2X0+kSykHzHnYH5FjHxwXLkcoJ10cX0aWCEynpu+rP76x0914atg==} + '@next/swc-linux-x64-musl@14.2.7': + resolution: {integrity: sha512-gUu0viOMvMlzFRz1r1eQ7Ql4OE+hPOmA7smfZAhn8vC4+0swMZaZxa9CSIozTYavi+bJNDZ3tgiSdMjmMzRJlQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@14.1.0': - resolution: {integrity: sha512-o1N5TsYc8f/HpGt39OUQpQ9AKIGApd3QLueu7hXk//2xq5Z9OxmV6sQfNp8C7qYmiOlHYODOGqNNa0e9jvchGQ==} + '@next/swc-win32-arm64-msvc@14.2.7': + resolution: {integrity: sha512-PGbONHIVIuzWlYmLvuFKcj+8jXnLbx4WrlESYlVnEzDsa3+Q2hI1YHoXaSmbq0k4ZwZ7J6sWNV4UZfx1OeOlbQ==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-ia32-msvc@14.1.0': - resolution: {integrity: sha512-XXIuB1DBRCFwNO6EEzCTMHT5pauwaSj4SWs7CYnME57eaReAKBXCnkUE80p/pAZcewm7hs+vGvNqDPacEXHVkw==} + '@next/swc-win32-ia32-msvc@14.2.7': + resolution: {integrity: sha512-BiSY5umlx9ed5RQDoHcdbuKTUkuFORDqzYKPHlLeS+STUWQKWziVOn3Ic41LuTBvqE0TRJPKpio9GSIblNR+0w==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@next/swc-win32-x64-msvc@14.1.0': - resolution: {integrity: sha512-9WEbVRRAqJ3YFVqEZIxUqkiO8l1nool1LmNxygr5HWF8AcSYsEpneUDhmjUVJEzO2A04+oPtZdombzzPPkTtgg==} + '@next/swc-win32-x64-msvc@14.2.7': + resolution: {integrity: sha512-pxsI23gKWRt/SPHFkDEsP+w+Nd7gK37Hpv0ngc5HpWy2e7cKx9zR/+Q2ptAUqICNTecAaGWvmhway7pj/JLEWA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -959,8 +959,11 @@ packages: '@sinonjs/fake-timers@10.0.2': resolution: {integrity: sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==} - '@swc/helpers@0.5.2': - resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} + '@swc/counter@0.1.3': + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + + '@swc/helpers@0.5.5': + resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} '@testing-library/dom@9.3.4': resolution: {integrity: sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==} @@ -1600,9 +1603,6 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001451: - resolution: {integrity: sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w==} - caniuse-lite@1.0.30001587: resolution: {integrity: sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==} @@ -2468,9 +2468,11 @@ packages: glob@7.1.6: resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} + deprecated: Glob versions prior to v9 are no longer supported glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported global-dirs@3.0.1: resolution: {integrity: sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==} @@ -3193,11 +3195,6 @@ packages: mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - nanoid@3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -3216,18 +3213,21 @@ packages: react: '*' react-dom: '*' - next@14.1.0: - resolution: {integrity: sha512-wlzrsbfeSU48YQBjZhDzOwhWhGsy+uQycR8bHAOt1LY1bn3zZEcDyHQOEoN3aWzQ8LHCAJ1nqrWCc9XF2+O45Q==} + next@14.2.7: + resolution: {integrity: sha512-4Qy2aK0LwH4eQiSvQWyKuC7JXE13bIopEQesWE0c/P3uuNRnZCQanI0vsrMLmUQJLAto+A+/8+sve2hd+BQuOQ==} engines: {node: '>=18.17.0'} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 + '@playwright/test': ^1.41.2 react: ^18.2.0 react-dom: ^18.2.0 sass: ^1.3.0 peerDependenciesMeta: '@opentelemetry/api': optional: true + '@playwright/test': + optional: true sass: optional: true @@ -4391,7 +4391,7 @@ snapshots: debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -4443,7 +4443,7 @@ snapshots: '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.5 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 '@babel/helper-compilation-targets@7.23.6': dependencies: @@ -4893,7 +4893,7 @@ snapshots: collect-v8-coverage: 1.0.1 exit: 0.1.2 glob: 7.2.3 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 istanbul-lib-coverage: 3.2.0 istanbul-lib-instrument: 6.0.1 istanbul-lib-report: 3.0.0 @@ -4946,7 +4946,7 @@ snapshots: chalk: 4.1.2 convert-source-map: 2.0.0 fast-json-stable-stringify: 2.1.0 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-haste-map: 29.7.0 jest-regex-util: 29.6.3 jest-util: 29.7.0 @@ -5011,37 +5011,37 @@ snapshots: '@microsoft/tsdoc@0.14.2': {} - '@next/env@14.1.0': {} + '@next/env@14.2.7': {} - '@next/eslint-plugin-next@14.1.0': + '@next/eslint-plugin-next@14.2.7': dependencies: glob: 10.3.10 - '@next/swc-darwin-arm64@14.1.0': + '@next/swc-darwin-arm64@14.2.7': optional: true - '@next/swc-darwin-x64@14.1.0': + '@next/swc-darwin-x64@14.2.7': optional: true - '@next/swc-linux-arm64-gnu@14.1.0': + '@next/swc-linux-arm64-gnu@14.2.7': optional: true - '@next/swc-linux-arm64-musl@14.1.0': + '@next/swc-linux-arm64-musl@14.2.7': optional: true - '@next/swc-linux-x64-gnu@14.1.0': + '@next/swc-linux-x64-gnu@14.2.7': optional: true - '@next/swc-linux-x64-musl@14.1.0': + '@next/swc-linux-x64-musl@14.2.7': optional: true - '@next/swc-win32-arm64-msvc@14.1.0': + '@next/swc-win32-arm64-msvc@14.2.7': optional: true - '@next/swc-win32-ia32-msvc@14.1.0': + '@next/swc-win32-ia32-msvc@14.2.7': optional: true - '@next/swc-win32-x64-msvc@14.1.0': + '@next/swc-win32-x64-msvc@14.2.7': optional: true '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': @@ -5069,223 +5069,246 @@ snapshots: dependencies: '@babel/runtime': 7.20.13 - '@radix-ui/react-collection@1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-collection@1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-slot': 1.0.2(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 '@radix-ui/react-compose-refs@1.0.1(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 '@radix-ui/react-context@1.0.1(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 - '@radix-ui/react-dialog@1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-dialog@1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-id': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-slot': 1.0.2(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 aria-hidden: 1.2.2(@types/react@18.2.56)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-remove-scroll: 2.5.5(@types/react@18.2.56)(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 '@radix-ui/react-direction@1.0.1(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 - '@radix-ui/react-dismissable-layer@1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-dismissable-layer@1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 '@radix-ui/react-focus-guards@1.0.1(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 - '@radix-ui/react-focus-scope@1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-focus-scope@1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 '@radix-ui/react-id@1.0.1(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 - '@radix-ui/react-label@2.0.2(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-label@2.0.2(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 - '@radix-ui/react-portal@1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-portal@1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 - '@radix-ui/react-presence@1.0.1(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-presence@1.0.1(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 - '@radix-ui/react-primitive@1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-primitive@1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/react-slot': 1.0.2(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 - '@radix-ui/react-radio-group@1.1.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-radio-group@1.1.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-direction': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-roving-focus': 1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@radix-ui/react-roving-focus': 1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-use-previous': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 - '@radix-ui/react-roving-focus@1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-roving-focus@1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-direction': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-id': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.56)(react@18.2.0) '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 '@radix-ui/react-slot@1.0.2(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 - '@radix-ui/react-toggle@1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0)': + '@radix-ui/react-toggle@1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.56)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 - '@types/react-dom': 18.2.19 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 + '@types/react-dom': 18.2.19 '@radix-ui/react-use-callback-ref@1.0.1(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 '@radix-ui/react-use-controllable-state@1.0.1(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 '@radix-ui/react-use-escape-keydown@1.0.3(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 '@radix-ui/react-use-layout-effect@1.0.1(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 '@radix-ui/react-use-previous@1.0.1(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 '@radix-ui/react-use-size@1.0.1(@types/react@18.2.56)(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.56)(react@18.2.0) - '@types/react': 18.2.56 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.56 '@rushstack/eslint-patch@1.7.2': {} @@ -5309,9 +5332,12 @@ snapshots: dependencies: '@sinonjs/commons': 2.0.0 - '@swc/helpers@0.5.2': + '@swc/counter@0.1.3': {} + + '@swc/helpers@0.5.5': dependencies: - tslib: 2.5.0 + '@swc/counter': 0.1.3 + tslib: 2.6.2 '@testing-library/dom@9.3.4': dependencies: @@ -5324,20 +5350,22 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 - '@testing-library/jest-dom@6.4.2(@types/jest@29.5.12)(jest@29.7.0)': + '@testing-library/jest-dom@6.4.2(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.11.19))': dependencies: '@adobe/css-tools': 4.3.3 '@babel/runtime': 7.20.13 - '@types/jest': 29.5.12 aria-query: 5.1.3 chalk: 3.0.0 css.escape: 1.5.1 dom-accessibility-api: 0.6.3 - jest: 29.7.0(@types/node@20.11.19) lodash: 4.17.21 redent: 3.0.0 + optionalDependencies: + '@jest/globals': 29.7.0 + '@types/jest': 29.5.12 + jest: 29.7.0(@types/node@20.11.19) - '@testing-library/react@14.2.1(react-dom@18.2.0)(react@18.2.0)': + '@testing-library/react@14.2.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.20.13 '@testing-library/dom': 9.3.4 @@ -5438,7 +5466,7 @@ snapshots: '@types/node': 20.11.19 optional: true - '@typescript-eslint/eslint-plugin@5.51.0(@typescript-eslint/parser@5.51.0)(eslint@8.56.0)(typescript@5.3.3)': + '@typescript-eslint/eslint-plugin@5.51.0(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3)': dependencies: '@typescript-eslint/parser': 5.51.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/scope-manager': 5.51.0 @@ -5452,11 +5480,12 @@ snapshots: regexpp: 3.2.0 semver: 7.3.8 tsutils: 3.21.0(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.3.3)': + '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3)': dependencies: '@eslint-community/regexpp': 4.10.0 '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3) @@ -5471,11 +5500,12 @@ snapshots: natural-compare: 1.4.0 semver: 7.6.0 ts-api-utils: 1.2.1(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@7.0.1(@typescript-eslint/parser@7.0.1)(eslint@8.56.0)(typescript@5.3.3)': + '@typescript-eslint/eslint-plugin@7.0.1(@typescript-eslint/parser@7.0.1(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3)': dependencies: '@eslint-community/regexpp': 4.10.0 '@typescript-eslint/parser': 7.0.1(eslint@8.56.0)(typescript@5.3.3) @@ -5490,6 +5520,7 @@ snapshots: natural-compare: 1.4.0 semver: 7.6.0 ts-api-utils: 1.2.1(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5501,6 +5532,7 @@ snapshots: '@typescript-eslint/typescript-estree': 5.51.0(typescript@5.3.3) debug: 4.3.4(supports-color@8.1.1) eslint: 8.56.0 + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5513,6 +5545,7 @@ snapshots: '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.56.0 + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5525,6 +5558,7 @@ snapshots: '@typescript-eslint/visitor-keys': 7.0.1 debug: 4.3.4(supports-color@8.1.1) eslint: 8.56.0 + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5556,6 +5590,7 @@ snapshots: debug: 4.3.4(supports-color@8.1.1) eslint: 8.56.0 tsutils: 3.21.0(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5567,6 +5602,7 @@ snapshots: debug: 4.3.4(supports-color@8.1.1) eslint: 8.56.0 ts-api-utils: 1.2.1(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5578,6 +5614,7 @@ snapshots: debug: 4.3.4(supports-color@8.1.1) eslint: 8.56.0 ts-api-utils: 1.2.1(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5597,8 +5634,9 @@ snapshots: debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 - semver: 7.3.8 + semver: 7.6.0 tsutils: 3.21.0(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5610,8 +5648,9 @@ snapshots: debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 - semver: 7.3.8 + semver: 7.6.0 tsutils: 3.21.0(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5626,6 +5665,7 @@ snapshots: minimatch: 9.0.3 semver: 7.6.0 ts-api-utils: 1.2.1(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5640,6 +5680,7 @@ snapshots: minimatch: 9.0.3 semver: 7.6.0 ts-api-utils: 1.2.1(typescript@5.3.3) + optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -5654,7 +5695,7 @@ snapshots: eslint: 8.56.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0(eslint@8.56.0) - semver: 7.3.8 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript @@ -5724,30 +5765,31 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vercel/style-guide@5.2.0(@next/eslint-plugin-next@14.1.0)(eslint@8.56.0)(jest@29.7.0)(prettier@3.2.5)(typescript@5.3.3)': + '@vercel/style-guide@5.2.0(@next/eslint-plugin-next@14.2.7)(eslint@8.56.0)(jest@29.7.0(@types/node@20.11.19))(prettier@3.2.5)(typescript@5.3.3)': dependencies: '@babel/core': 7.23.9 '@babel/eslint-parser': 7.23.10(@babel/core@7.23.9)(eslint@8.56.0) - '@next/eslint-plugin-next': 14.1.0 '@rushstack/eslint-patch': 1.7.2 - '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3) - eslint: 8.56.0 eslint-config-prettier: 9.1.0(eslint@8.56.0) - eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.29.1) - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0) + eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1)(eslint@8.56.0) eslint-plugin-eslint-comments: 3.2.0(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) - eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint@8.56.0)(jest@29.7.0)(typescript@5.3.3) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@7.0.1(@typescript-eslint/parser@7.0.1(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(jest@29.7.0(@types/node@20.11.19))(typescript@5.3.3) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.56.0) - eslint-plugin-playwright: 0.16.0(eslint-plugin-jest@27.9.0)(eslint@8.56.0) + eslint-plugin-playwright: 0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(jest@29.7.0(@types/node@20.11.19))(typescript@5.3.3))(eslint@8.56.0) eslint-plugin-react: 7.33.2(eslint@8.56.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.56.0) eslint-plugin-testing-library: 6.2.0(eslint@8.56.0)(typescript@5.3.3) eslint-plugin-tsdoc: 0.2.17 eslint-plugin-unicorn: 48.0.1(eslint@8.56.0) - prettier: 3.2.5 prettier-plugin-packagejson: 2.4.11(prettier@3.2.5) + optionalDependencies: + '@next/eslint-plugin-next': 14.2.7 + eslint: 8.56.0 + prettier: 3.2.5 typescript: 5.3.3 transitivePeerDependencies: - eslint-import-resolver-node @@ -5814,9 +5856,10 @@ snapshots: aria-hidden@1.2.2(@types/react@18.2.56)(react@18.2.0): dependencies: - '@types/react': 18.2.56 react: 18.2.0 tslib: 2.5.0 + optionalDependencies: + '@types/react': 18.2.56 aria-query@5.1.3: dependencies: @@ -6034,7 +6077,7 @@ snapshots: browserslist@4.21.5: dependencies: - caniuse-lite: 1.0.30001451 + caniuse-lite: 1.0.30001587 electron-to-chromium: 1.4.295 node-releases: 2.0.10 update-browserslist-db: 1.0.10(browserslist@4.21.5) @@ -6067,7 +6110,7 @@ snapshots: builtins@5.0.1: dependencies: - semver: 7.3.8 + semver: 7.6.0 busboy@1.6.0: dependencies: @@ -6096,8 +6139,6 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001451: {} - caniuse-lite@1.0.30001587: {} caseless@0.12.0: {} @@ -6218,7 +6259,7 @@ snapshots: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-config: 29.7.0(@types/node@20.11.19) jest-util: 29.7.0 prompts: 2.4.2 @@ -6296,11 +6337,13 @@ snapshots: debug@3.2.7(supports-color@8.1.1): dependencies: ms: 2.1.3 + optionalDependencies: supports-color: 8.1.1 debug@4.3.4(supports-color@8.1.1): dependencies: ms: 2.1.2 + optionalDependencies: supports-color: 8.1.1 dedent@1.5.1: {} @@ -6570,34 +6613,34 @@ snapshots: dependencies: eslint: 8.56.0 - eslint-config-standard-jsx@11.0.0(eslint-plugin-react@7.33.2)(eslint@8.56.0): + eslint-config-standard-jsx@11.0.0(eslint-plugin-react@7.33.2(eslint@8.56.0))(eslint@8.56.0): dependencies: eslint: 8.56.0 eslint-plugin-react: 7.33.2(eslint@8.56.0) - eslint-config-standard-with-typescript@23.0.0(@typescript-eslint/eslint-plugin@5.51.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3): + eslint-config-standard-with-typescript@23.0.0(@typescript-eslint/eslint-plugin@5.51.0(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.3.3): dependencies: - '@typescript-eslint/eslint-plugin': 5.51.0(@typescript-eslint/parser@5.51.0)(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/eslint-plugin': 5.51.0(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/parser': 5.51.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 - eslint-config-standard: 17.0.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.51.0)(eslint@8.56.0) + eslint-config-standard: 17.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0) eslint-plugin-n: 15.7.0(eslint@8.56.0) eslint-plugin-promise: 6.1.1(eslint@8.56.0) typescript: 5.3.3 transitivePeerDependencies: - supports-color - eslint-config-standard@17.0.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0): + eslint-config-standard@17.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0): dependencies: eslint: 8.56.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.51.0)(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0) eslint-plugin-n: 15.7.0(eslint@8.56.0) eslint-plugin-promise: 6.1.1(eslint@8.56.0) - eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.29.1): + eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)): dependencies: - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -6607,13 +6650,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1)(eslint@8.56.0): dependencies: debug: 4.3.4(supports-color@8.1.1) enhanced-resolve: 5.13.0 eslint: 8.56.0 - eslint-module-utils: 2.7.4(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-module-utils: 2.7.4(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1)(eslint@8.56.0))(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) fast-glob: 3.3.2 get-tsconfig: 4.5.0 is-core-module: 2.11.0 @@ -6624,38 +6667,42 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.7.4(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): + eslint-module-utils@2.7.4(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1)(eslint@8.56.0))(eslint@8.56.0): dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3) debug: 3.2.7(supports-color@8.1.1) + optionalDependencies: + '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1)(eslint@8.56.0) transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@5.51.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): dependencies: - '@typescript-eslint/parser': 5.51.0(eslint@8.56.0)(typescript@5.3.3) debug: 3.2.7(supports-color@8.1.1) + optionalDependencies: + '@typescript-eslint/parser': 5.51.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1)(eslint@8.56.0))(eslint@8.56.0): dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3) debug: 3.2.7(supports-color@8.1.1) + optionalDependencies: + '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1)(eslint@8.56.0) transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@7.0.1)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@7.0.1(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint@8.56.0): dependencies: - '@typescript-eslint/parser': 7.0.1(eslint@8.56.0)(typescript@5.3.3) debug: 3.2.7(supports-color@8.1.1) + optionalDependencies: + '@typescript-eslint/parser': 7.0.1(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: @@ -6678,9 +6725,8 @@ snapshots: eslint: 8.56.0 ignore: 5.2.4 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.51.0)(eslint@8.56.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0): dependencies: - '@typescript-eslint/parser': 5.51.0(eslint@8.56.0)(typescript@5.3.3) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.4 array.prototype.flat: 1.3.2 @@ -6689,7 +6735,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.51.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) hasown: 2.0.1 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -6699,14 +6745,15 @@ snapshots: object.values: 1.1.7 semver: 6.3.1 tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 5.51.0(eslint@8.56.0)(typescript@5.3.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.4 array.prototype.flat: 1.3.2 @@ -6715,7 +6762,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1)(eslint@8.56.0))(eslint@8.56.0) hasown: 2.0.1 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -6725,14 +6772,15 @@ snapshots: object.values: 1.1.7 semver: 6.3.1 tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.0.1)(eslint@8.56.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.0.1(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0): dependencies: - '@typescript-eslint/parser': 7.0.1(eslint@8.56.0)(typescript@5.3.3) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.4 array.prototype.flat: 1.3.2 @@ -6741,7 +6789,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.0.1)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.0.1(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint@8.56.0) hasown: 2.0.1 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -6751,16 +6799,19 @@ snapshots: object.values: 1.1.7 semver: 6.3.1 tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 7.0.1(eslint@8.56.0)(typescript@5.3.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint@8.56.0)(jest@29.7.0)(typescript@5.3.3): + eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@7.0.1(@typescript-eslint/parser@7.0.1(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(jest@29.7.0(@types/node@20.11.19))(typescript@5.3.3): dependencies: - '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/utils': 5.59.1(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 + optionalDependencies: + '@typescript-eslint/eslint-plugin': 7.0.1(@typescript-eslint/parser@7.0.1(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3) jest: 29.7.0(@types/node@20.11.19) transitivePeerDependencies: - supports-color @@ -6798,18 +6849,20 @@ snapshots: resolve: 1.22.2 semver: 7.3.8 - eslint-plugin-playwright@0.16.0(eslint-plugin-jest@27.9.0)(eslint@8.56.0): + eslint-plugin-playwright@0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(jest@29.7.0(@types/node@20.11.19))(typescript@5.3.3))(eslint@8.56.0): dependencies: eslint: 8.56.0 - eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint@8.56.0)(jest@29.7.0)(typescript@5.3.3) + optionalDependencies: + eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@7.0.1(@typescript-eslint/parser@7.0.1(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(jest@29.7.0(@types/node@20.11.19))(typescript@5.3.3) - eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.2.5): + eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0(eslint@8.56.0))(eslint@8.56.0)(prettier@3.2.5): dependencies: eslint: 8.56.0 - eslint-config-prettier: 9.1.0(eslint@8.56.0) prettier: 3.2.5 prettier-linter-helpers: 1.0.0 synckit: 0.8.8 + optionalDependencies: + eslint-config-prettier: 9.1.0(eslint@8.56.0) eslint-plugin-promise@6.1.1(eslint@8.56.0): dependencies: @@ -7543,7 +7596,7 @@ snapshots: '@babel/parser': 7.20.15 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -7646,13 +7699,12 @@ snapshots: '@babel/core': 7.20.12 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.19 babel-jest: 29.7.0(@babel/core@7.20.12) chalk: 4.1.2 ci-info: 3.7.1 deepmerge: 4.3.0 glob: 7.2.3 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-circus: 29.7.0 jest-environment-node: 29.7.0 jest-get-type: 29.6.3 @@ -7666,6 +7718,8 @@ snapshots: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 20.11.19 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -7716,7 +7770,7 @@ snapshots: '@types/node': 20.11.19 anymatch: 3.1.3 fb-watchman: 2.0.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-regex-util: 29.6.3 jest-util: 29.7.0 jest-worker: 29.7.0 @@ -7762,7 +7816,7 @@ snapshots: '@jest/types': 29.6.3 '@types/stack-utils': 2.0.1 chalk: 4.1.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 micromatch: 4.0.5 pretty-format: 29.7.0 slash: 3.0.0 @@ -7775,7 +7829,7 @@ snapshots: jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): - dependencies: + optionalDependencies: jest-resolve: 29.7.0 jest-regex-util@29.6.3: {} @@ -7790,7 +7844,7 @@ snapshots: jest-resolve@29.7.0: dependencies: chalk: 4.1.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-haste-map: 29.7.0 jest-pnp-resolver: 1.2.3(jest-resolve@29.7.0) jest-util: 29.7.0 @@ -7809,7 +7863,7 @@ snapshots: '@types/node': 20.11.19 chalk: 4.1.2 emittery: 0.13.1 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-docblock: 29.7.0 jest-environment-node: 29.7.0 jest-haste-map: 29.7.0 @@ -7839,7 +7893,7 @@ snapshots: cjs-module-lexer: 1.2.2 collect-v8-coverage: 1.0.1 glob: 7.2.3 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 @@ -7865,7 +7919,7 @@ snapshots: babel-preset-current-node-syntax: 1.0.1(@babel/core@7.20.12) chalk: 4.1.2 expect: 29.7.0 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-diff: 29.7.0 jest-get-type: 29.6.3 jest-matcher-utils: 29.7.0 @@ -7892,7 +7946,7 @@ snapshots: '@types/node': 20.11.19 chalk: 4.1.2 ci-info: 3.7.1 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 picomatch: 2.3.1 jest-validate@29.7.0: @@ -8026,13 +8080,14 @@ snapshots: dependencies: cli-truncate: 2.1.0 colorette: 2.0.19 - enquirer: 2.3.6 log-update: 4.0.0 p-map: 4.0.0 rfdc: 1.3.0 rxjs: 7.8.0 through: 2.3.8 wrap-ansi: 7.0.0 + optionalDependencies: + enquirer: 2.3.6 load-json-file@5.3.0: dependencies: @@ -8103,7 +8158,7 @@ snapshots: make-dir@3.1.0: dependencies: - semver: 6.3.0 + semver: 6.3.1 make-error@1.3.6: {} @@ -8152,24 +8207,22 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 - nanoid@3.3.6: {} - nanoid@3.3.7: {} natural-compare-lite@1.4.0: {} natural-compare@1.4.0: {} - next-themes@0.2.1(next@14.1.0)(react-dom@18.2.0)(react@18.2.0): + next-themes@0.2.1(next@14.2.7(@babel/core@7.20.12)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - next: 14.1.0(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + next: 14.2.7(@babel/core@7.20.12)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - next@14.1.0(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0): + next@14.2.7(@babel/core@7.20.12)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - '@next/env': 14.1.0 - '@swc/helpers': 0.5.2 + '@next/env': 14.2.7 + '@swc/helpers': 0.5.5 busboy: 1.6.0 caniuse-lite: 1.0.30001587 graceful-fs: 4.2.11 @@ -8178,15 +8231,15 @@ snapshots: react-dom: 18.2.0(react@18.2.0) styled-jsx: 5.1.1(@babel/core@7.20.12)(react@18.2.0) optionalDependencies: - '@next/swc-darwin-arm64': 14.1.0 - '@next/swc-darwin-x64': 14.1.0 - '@next/swc-linux-arm64-gnu': 14.1.0 - '@next/swc-linux-arm64-musl': 14.1.0 - '@next/swc-linux-x64-gnu': 14.1.0 - '@next/swc-linux-x64-musl': 14.1.0 - '@next/swc-win32-arm64-msvc': 14.1.0 - '@next/swc-win32-ia32-msvc': 14.1.0 - '@next/swc-win32-x64-msvc': 14.1.0 + '@next/swc-darwin-arm64': 14.2.7 + '@next/swc-darwin-x64': 14.2.7 + '@next/swc-linux-arm64-gnu': 14.2.7 + '@next/swc-linux-arm64-musl': 14.2.7 + '@next/swc-linux-x64-gnu': 14.2.7 + '@next/swc-linux-x64-musl': 14.2.7 + '@next/swc-win32-arm64-msvc': 14.2.7 + '@next/swc-win32-ia32-msvc': 14.2.7 + '@next/swc-win32-x64-msvc': 14.2.7 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -8419,8 +8472,9 @@ snapshots: postcss-load-config@4.0.1(postcss@8.4.35): dependencies: lilconfig: 2.1.0 - postcss: 8.4.35 yaml: 2.2.2 + optionalDependencies: + postcss: 8.4.35 postcss-nested@6.0.1(postcss@8.4.35): dependencies: @@ -8436,7 +8490,7 @@ snapshots: postcss@8.4.31: dependencies: - nanoid: 3.3.6 + nanoid: 3.3.7 picocolors: 1.0.0 source-map-js: 1.0.2 @@ -8454,9 +8508,10 @@ snapshots: prettier-plugin-packagejson@2.4.11(prettier@3.2.5): dependencies: - prettier: 3.2.5 sort-package-json: 2.7.0 synckit: 0.9.0 + optionalDependencies: + prettier: 3.2.5 prettier-plugin-tailwindcss@0.5.11(prettier@3.2.5): dependencies: @@ -8534,28 +8589,31 @@ snapshots: react-remove-scroll-bar@2.3.4(@types/react@18.2.56)(react@18.2.0): dependencies: - '@types/react': 18.2.56 react: 18.2.0 react-style-singleton: 2.2.1(@types/react@18.2.56)(react@18.2.0) tslib: 2.5.0 + optionalDependencies: + '@types/react': 18.2.56 react-remove-scroll@2.5.5(@types/react@18.2.56)(react@18.2.0): dependencies: - '@types/react': 18.2.56 react: 18.2.0 react-remove-scroll-bar: 2.3.4(@types/react@18.2.56)(react@18.2.0) react-style-singleton: 2.2.1(@types/react@18.2.56)(react@18.2.0) tslib: 2.5.0 use-callback-ref: 1.3.0(@types/react@18.2.56)(react@18.2.0) use-sidecar: 1.1.2(@types/react@18.2.56)(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.56 react-style-singleton@2.2.1(@types/react@18.2.56)(react@18.2.0): dependencies: - '@types/react': 18.2.56 get-nonce: 1.0.1 invariant: 2.2.4 react: 18.2.0 tslib: 2.5.0 + optionalDependencies: + '@types/react': 18.2.56 react@18.2.0: dependencies: @@ -8682,11 +8740,11 @@ snapshots: rxjs@7.8.0: dependencies: - tslib: 2.5.0 + tslib: 2.6.2 rxjs@7.8.1: dependencies: - tslib: 2.5.0 + tslib: 2.6.2 safe-array-concat@1.1.0: dependencies: @@ -8924,9 +8982,10 @@ snapshots: styled-jsx@5.1.1(@babel/core@7.20.12)(react@18.2.0): dependencies: - '@babel/core': 7.20.12 client-only: 0.0.1 react: 18.2.0 + optionalDependencies: + '@babel/core': 7.20.12 sucrase@3.32.0: dependencies: @@ -9044,9 +9103,8 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.1.2(@babel/core@7.20.12)(jest@29.7.0)(typescript@5.3.3): + ts-jest@29.1.2(@babel/core@7.20.12)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.20.12))(jest@29.7.0(@types/node@20.11.19))(typescript@5.3.3): dependencies: - '@babel/core': 7.20.12 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 jest: 29.7.0(@types/node@20.11.19) @@ -9057,15 +9115,19 @@ snapshots: semver: 7.6.0 typescript: 5.3.3 yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.20.12 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.20.12) ts-standard@12.0.2(typescript@5.3.3): dependencies: - '@typescript-eslint/eslint-plugin': 5.51.0(@typescript-eslint/parser@5.51.0)(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/eslint-plugin': 5.51.0(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/parser': 5.51.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 - eslint-config-standard-jsx: 11.0.0(eslint-plugin-react@7.33.2)(eslint@8.56.0) - eslint-config-standard-with-typescript: 23.0.0(@typescript-eslint/eslint-plugin@5.51.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.51.0)(eslint@8.56.0) + eslint-config-standard-jsx: 11.0.0(eslint-plugin-react@7.33.2(eslint@8.56.0))(eslint@8.56.0) + eslint-config-standard-with-typescript: 23.0.0(@typescript-eslint/eslint-plugin@5.51.0(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.3.3) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.51.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0) eslint-plugin-n: 15.7.0(eslint@8.56.0) eslint-plugin-promise: 6.1.1(eslint@8.56.0) eslint-plugin-react: 7.33.2(eslint@8.56.0) @@ -9185,16 +9247,18 @@ snapshots: use-callback-ref@1.3.0(@types/react@18.2.56)(react@18.2.0): dependencies: - '@types/react': 18.2.56 react: 18.2.0 tslib: 2.5.0 + optionalDependencies: + '@types/react': 18.2.56 use-sidecar@1.1.2(@types/react@18.2.56)(react@18.2.0): dependencies: - '@types/react': 18.2.56 detect-node-es: 1.1.0 react: 18.2.0 tslib: 2.5.0 + optionalDependencies: + '@types/react': 18.2.56 util-deprecate@1.0.2: {} diff --git a/src/app/[[...product]]/page.tsx b/src/app/[[...product]]/page.tsx new file mode 100644 index 0000000..fcceb2e --- /dev/null +++ b/src/app/[[...product]]/page.tsx @@ -0,0 +1,35 @@ +import type {Metadata} from "next"; + +import api from "~/product/api"; + +import StoreScreen from "@/modules/store/screens/Store"; + +export async function generateStaticParams() { + const products = await api.list(); + + return products.map((product) => ({product: [product.id]})); +} + +export async function generateMetadata({ + params, +}: { + params: {product?: string[]}; +}): Promise { + if (params.product) { + const product = await api.fetch(params.product[0]); + + return { + title: product.title, + description: product.description, + }; + } +} + +async function HomeAndProductPage({params}: {params: {product?: [product: string]}}) { + const products = await api.list(); + const selected = params.product ? await api.fetch(params.product[0]) : null; + + return ; +} + +export default HomeAndProductPage; diff --git a/src/app/[product]/client.tsx b/src/app/[product]/client.tsx deleted file mode 100644 index 7c220de..0000000 --- a/src/app/[product]/client.tsx +++ /dev/null @@ -1,30 +0,0 @@ -"use client"; - -import type {Product} from "~/product/types"; - -import {useRouter} from "next/navigation"; -import Link from "next/link"; - -import ProductCard from "~/product/components/ProductCard"; -import {useCart} from "~/cart/context/client"; - -import {Button} from "@/components/ui/button"; - -export default function ProductPageClient({product}: {product: Product}) { - const [, {addItem}] = useCart(); - const router = useRouter(); - - function handleAddToCart(product: Product) { - addItem(Date.now(), {...product, quantity: 1}); - router.push("/"); - } - - return ( -
- - - - -
- ); -} diff --git a/src/app/[product]/page.tsx b/src/app/[product]/page.tsx deleted file mode 100644 index 600566f..0000000 --- a/src/app/[product]/page.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import type {Metadata} from "next"; - -import api from "~/product/api"; - -import ProductPageClient from "./client"; - -export async function generateStaticParams() { - const products = await api.list(); - - return products.map((product) => ({product: product.id})); -} - -export async function generateMetadata({ - params: {product: productId}, -}: { - params: {product: string}; -}): Promise { - const product = await api.fetch(productId); - - return { - title: product.title, - description: product.description, - }; -} - -const ProductPage = async ({params: {product}}: {params: {product: string}}) => { - const data = await api.fetch(product); - - return ; -}; - -export default ProductPage; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 445a72c..bd5d8dd 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -14,7 +14,10 @@ export async function generateMetadata(): Promise { const store = await api.fetch(); return { - title: store.title, + title: { + template: `${store.title} - %s`, + default: store.title, + }, description: store.subtitle, }; } diff --git a/src/app/loading.tsx b/src/app/loading.tsx deleted file mode 100644 index 3e28e8e..0000000 --- a/src/app/loading.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import {Skeleton} from "@/components/ui/skeleton"; - -export default function LoadingPage() { - return ( -
-
- -
- - -
-
-
- {Array.from({length: 3}).map((_, index) => ( - - ))} -
-
- ); -} diff --git a/src/app/mocks/[mock]/page.tsx b/src/app/mocks/[mock]/page.tsx deleted file mode 100644 index 13d158b..0000000 --- a/src/app/mocks/[mock]/page.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import api from "~/product/api"; -import StoreScreen from "~/store/screens/Store"; - -const IndexMockPage = async ({ - params: {mock}, -}: { - params: { - mock: string; - }; -}) => { - const products = await api.mock.list(mock); - - return ; -}; - -export default IndexMockPage; diff --git a/src/app/page.tsx b/src/app/page.tsx deleted file mode 100644 index fbf3628..0000000 --- a/src/app/page.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import api from "~/product/api"; -import StoreScreen from "~/store/screens/Store"; - -const IndexRoute = async () => { - const products = await api.list(); - - return ; -}; - -export default IndexRoute; diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx index 793eca1..85d3019 100644 --- a/src/components/ui/sheet.tsx +++ b/src/components/ui/sheet.tsx @@ -3,6 +3,7 @@ import * as React from "react"; import * as SheetPrimitive from "@radix-ui/react-dialog"; import {cva, type VariantProps} from "class-variance-authority"; +import dynamic from "next/dynamic"; import {cn} from "@/lib/utils"; @@ -53,17 +54,26 @@ interface SheetContentProps extends React.ComponentPropsWithoutRef, VariantProps {} -const SheetContent = React.forwardRef< - React.ElementRef, - SheetContentProps ->(({side = "right", className, children, ...props}, ref) => ( - - - - {children} - - -)); +const SheetContent = dynamic( + // eslint-disable-next-line @typescript-eslint/require-await + async () => + // eslint-disable-next-line react/display-name + React.forwardRef, SheetContentProps>( + ({side = "right", className, children, ...props}, ref) => ( + + + + {children} + + + ), + ), + {ssr: false}, +); SheetContent.displayName = SheetPrimitive.Content.displayName; diff --git a/src/modules/product/api.ts b/src/modules/product/api.ts index 2067746..88581ce 100644 --- a/src/modules/product/api.ts +++ b/src/modules/product/api.ts @@ -106,6 +106,11 @@ function normalize(data: (RawProduct | RawOption | RawUnknown)[]) { const api = { list: async (): Promise => { + // Uncomment to use the mock data + // return await import(`./mocks/default.json`).then( + // (module: {default: IProduct[]}) => module.default, + // ); + return fetch(process.env.PRODUCTS!, {next: {tags: ["products"]}}).then(async (response) => { const csv = await response.text(); @@ -123,6 +128,11 @@ const api = { }); }, fetch: async (id: IProduct["id"]): Promise => { + // Uncomment to use the mock data + // return await import(`./mocks/default.json`).then( + // (module: {default: IProduct[]}) => module.default.find((product) => product.id === id)!, + // ); + const products = await api.list(); const product = products.find((product) => product.id === id); @@ -130,12 +140,6 @@ const api = { return product; }, - mock: { - list: (mock: string): Promise => - import(`./mocks/${mock}.json`).then((result: {default: (RawProduct | RawOption)[]}) => - normalize(result.default), - ), - }, }; export default api; diff --git a/src/modules/product/components/ProductCard.tsx b/src/modules/product/components/ProductCard.tsx index cae3247..ebc590d 100644 --- a/src/modules/product/components/ProductCard.tsx +++ b/src/modules/product/components/ProductCard.tsx @@ -1,69 +1,44 @@ "use client"; -import type {CartItem} from "~/cart/types"; - import type {Product} from "../types"; -import {useState, useMemo} from "react"; import {ImageOff} from "lucide-react"; -import CartItemDrawer from "~/cart/components/CartItemDrawer"; import {parseCurrency} from "~/currency/utils"; -function ProductCard({product, onAdd}: {product: Product; onAdd: (product: Product) => void}) { - const [isModalOpen, setIsModalOpen] = useState(false); - const cartItem = useMemo(() => ({...product, quantity: 1}), [product]); - +function ProductCard({product}: {product: Product}) { return ( - <> -
{ - setIsModalOpen(true); - }} - > -
-
-
-

{product.title}

-

- {product.description} -

-
-
-

{parseCurrency(product.price)}

-
+
+
+
+
+

{product.title}

+

+ {product.description} +

+
+
+

{parseCurrency(product.price)}

- {product.image ? ( - {product.title} - ) : ( -
- -
- )}
+ {product.image ? ( + {product.title} + ) : ( +
+ +
+ )}
- {isModalOpen ? ( - { - setIsModalOpen(false); - }} - onSubmit={(item: CartItem) => { - onAdd(item); - setIsModalOpen(false); - }} - /> - ) : null} - +
); } diff --git a/src/modules/product/mocks/default.json b/src/modules/product/mocks/default.json index 944a352..41891ac 100644 --- a/src/modules/product/mocks/default.json +++ b/src/modules/product/mocks/default.json @@ -1,7 +1,6 @@ [ { "id": "0IuD9ykfUAoAELVEjNRH", - "type": "product", "title": "Mayonesa Natura", "category": "Almacén", "description": "x250g", @@ -10,7 +9,6 @@ }, { "id": "0Wbm9yWGTVW4RGjfLufg", - "type": "product", "title": "Yogur con Cereal", "category": "Lácteos", "description": "Frutilla", @@ -19,7 +17,6 @@ }, { "id": "11KvooBabTehkfk4trF2", - "type": "product", "title": "Tostadas Riera Arroz", "category": "Almacén", "description": "De Arroz", @@ -28,7 +25,6 @@ }, { "id": "1JpfEtgsaijIyJFKrjk9", - "type": "product", "title": "Hamburguesas", "category": "Congelados", "description": "Paty Express x4", @@ -37,7 +33,6 @@ }, { "id": "1UAl7EkjE2ATXJwU8n6u", - "type": "product", "title": "Hamburguesas Paladini", "category": "Congelados", "description": "x2", @@ -46,7 +41,6 @@ }, { "id": "1oO0lKuuCsb28Hwa8zsf", - "type": "product", "title": "Café Dolca", "category": "Almacén", "description": "170gr", @@ -55,7 +49,6 @@ }, { "id": "2cK6HzXhzrl4MD8bUq62", - "type": "product", "title": "Flan Casero Light", "category": "Lácteos", "description": "X2 unidades", @@ -64,7 +57,6 @@ }, { "id": "2uCz6HlKa54WrcZh5JC4", - "type": "product", "title": "Sorrentinos", "category": "Almacén", "description": "Tapamanía Jamón y queso x 600g", @@ -73,7 +65,6 @@ }, { "id": "2zppU2JpsnkwHw4VeWiC", - "type": "product", "title": "Puré Tomate", "category": "Almacén", "description": "Molto 200gr", @@ -82,7 +73,6 @@ }, { "id": "3ABGMBJqzJEwYdHcUtvw", - "type": "product", "title": "Leche Larga vida", "category": "Lácteos", "description": "Descremada 1lt", @@ -91,7 +81,6 @@ }, { "id": "3MH8zxiWhgVsjMHb03ke", - "type": "product", "title": "Crematto Light", "category": "Lácteos", "description": "Milkaut Light 290gr", @@ -100,7 +89,6 @@ }, { "id": "3V7jlo7p0f3GQ9fAdBFr", - "type": "product", "title": "Yogursino Bebible", "category": "Lácteos", "description": "Frutilla 1lts", @@ -109,7 +97,6 @@ }, { "id": "3VgpTuxg4a7T3GSiNhtG", - "type": "product", "title": "Cosecha Tardía Tinto", "category": "Bebidas con Alcohol", "description": "Norton 750ml", @@ -118,47 +105,48 @@ }, { "id": "3hXkJop3XdtBdCoSnk5C", - "type": "product", "title": "Dulce de leche", "category": "Lácteos", "description": "Milkaut 400gr", "image": "https://loremflickr.com/500/500", + "options": { + "Peso": [ + { + "id": "3hXkJop3XdtBdCoSnk5C", + "title": "1 KG", + "category": "Peso", + "description": "Pote edición limitada de 1 KG", + "image": "https://loremflickr.com/500/500", + "price": 50 + }, + { + "id": "3hXkJop3XdtBdCoSnk5C", + "title": "500 GR", + "category": "Peso", + "description": "Pote edición limitada de 500 GR", + "image": "https://loremflickr.com/500/500", + "price": 30 + } + ], + "Calidad": [ + { + "id": "3hXkJop3XdtBdCoSnk5C", + "title": "Baja", + "category": "Calidad", + "description": "Calidad baja", + "image": "https://loremflickr.com/500/500", + "price": 0 + }, + { + "id": "3hXkJop3XdtBdCoSnk5C", + "title": "Alta", + "category": "Calidad", + "description": "Validad alta", + "image": "https://loremflickr.com/500/500", + "price": 50 + } + ] + }, "price": 169 - }, - { - "id": "3hXkJop3XdtBdCoSnk5C", - "type": "option", - "title": "1 KG", - "category": "Peso", - "description": "Pote edición limitada de 1 KG", - "image": "https://loremflickr.com/500/500", - "price": 50 - }, - { - "id": "3hXkJop3XdtBdCoSnk5C", - "type": "option", - "title": "500 GR", - "category": "Peso", - "description": "Pote edición limitada de 500 GR", - "image": "https://loremflickr.com/500/500", - "price": 30 - }, - { - "id": "3hXkJop3XdtBdCoSnk5C", - "type": "option", - "title": "Baja", - "category": "Calidad", - "description": "Calidad baja", - "image": "https://loremflickr.com/500/500", - "price": 0 - }, - { - "id": "3hXkJop3XdtBdCoSnk5C", - "type": "option", - "title": "Alta", - "category": "Calidad", - "description": "Validad alta", - "image": "https://loremflickr.com/500/500", - "price": 50 } ] diff --git a/src/modules/store/screens/Store.tsx b/src/modules/store/screens/Store.tsx index 6cda1e0..ac3b340 100644 --- a/src/modules/store/screens/Store.tsx +++ b/src/modules/store/screens/Store.tsx @@ -4,6 +4,8 @@ import type {Product} from "~/product/types"; import {useMemo, useState} from "react"; import {SearchIcon, X, Table, StretchHorizontal, ChevronDown} from "lucide-react"; +import Link from "next/link"; +import {useRouter} from "next/navigation"; import {useCart} from "~/cart/context/client"; import ProductCard from "~/product/components/ProductCard"; @@ -11,9 +13,11 @@ import ProductCard from "~/product/components/ProductCard"; import {cn} from "@/lib/utils"; import {Input} from "@/components/ui/input"; import {Toggle} from "@/components/ui/toggle"; +import CartItemDrawer from "@/modules/cart/components/CartItemDrawer"; -function StoreScreen({products}: {products: Product[]}) { +function StoreScreen({products, selected}: {products: Product[]; selected: null | Product}) { const [, {addItem}] = useCart(); + const router = useRouter(); const [query, setQuery] = useState(""); const [layout, setLayout] = useState<"list" | "grid">(() => products.length > 30 ? "list" : "grid", @@ -66,104 +70,113 @@ function StoreScreen({products}: {products: Product[]}) { } return ( -
- {/* Filters */} -
-
- - { - setQuery(event.target.value); - }} - /> - {Boolean(query) && ( - { - setQuery(""); + <> +
+ {/* Filters */} +
+
+ + { + setQuery(event.target.value); }} /> - )} -
-
- { - setLayout("list"); - }} - > -
- -
-
- { - setLayout("grid"); - }} - > -
- - - - - - {/* Grid of products by category */} -
- {categories.length ? ( - categories.map(([category, categoryProducts]) => ( -
-
{ - handleSelectCategory(category); + setQuery(""); }} - > -

- {category} ({categoryProducts.length}) -

- {layout === "list" && } + /> + )} +
+
+ { + setLayout("list"); + }} + > +
+
- {((layout === "list" && selectedCategory === category) || layout === "grid") && ( -
- {categoryProducts.length ? ( - categoryProducts.map((product) => ( - { - addItem(Date.now(), {...item, quantity: 1}); - }} - /> - )) - ) : ( -
-

- No hay productos -

-
- )} + + { + setLayout("grid"); + }} + > +
+
+ + + + + {/* Grid of products by category */} +
+ {categories.length ? ( + categories.map(([category, categoryProducts]) => ( +
+
{ + handleSelectCategory(category); + }} + > +

+ {category} ({categoryProducts.length}) +

+ {layout === "list" && }
- )} + {((layout === "list" && selectedCategory === category) || layout === "grid") && ( +
+ {categoryProducts.length ? ( + categoryProducts.map((product) => ( + + + + )) + ) : ( +
+

+ No hay productos +

+
+ )} +
+ )} +
+ )) + ) : ( +
+

No hay productos

- )) - ) : ( -
-

No hay productos

-
- )} + )} +
- + {Boolean(selected) && ( + router.push("/")} + onSubmit={(item) => { + addItem(Date.now(), item); + router.push("/"); + }} + /> + )} + ); }