diff --git a/package.json b/package.json index d4c24327..766fded9 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "eslint-import-resolver-typescript": "^4.4.4", "react": "^19.2.0", "react-dom": "^19.2.0", + "zustand": "^5.0.9", "react-router-dom": "^7.11.0" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d1eab9e..6856129a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 1.18.0 '@vanilla-extract/vite-plugin': specifier: ^5.1.4 - version: 5.1.4(@types/node@24.10.4)(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2))(yaml@2.8.2) + version: 5.1.4(@types/node@24.10.4)(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2))(yaml@2.8.2) eslint-import-resolver-typescript: specifier: ^4.4.4 version: 4.4.4(eslint-plugin-import@2.32.0)(eslint@9.39.2) @@ -25,7 +25,10 @@ importers: version: 19.2.3(react@19.2.3) react-router-dom: specifier: ^7.11.0 - version: 7.11.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + version: 7.12.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + zustand: + specifier: ^5.0.9 + version: 5.0.9(@types/react@19.2.7)(react@19.2.3)(use-sync-external-store@1.6.0(react@19.2.3)) devDependencies: '@eslint/js': specifier: ^9.39.1 @@ -35,10 +38,10 @@ importers: version: 10.1.11(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) '@storybook/addon-docs': specifier: ^10.1.11 - version: 10.1.11(@types/react@19.2.7)(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2)) + version: 10.1.11(@types/react@19.2.7)(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2)) '@storybook/react-vite': specifier: ^10.1.11 - version: 10.1.11(esbuild@0.27.2)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(typescript@5.9.3)(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2)) + version: 10.1.11(esbuild@0.27.2)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(typescript@5.9.3)(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2)) '@svgr/plugin-svgo': specifier: ^8.1.0 version: 8.1.0(@svgr/core@8.1.0(typescript@5.9.3))(typescript@5.9.3) @@ -59,7 +62,7 @@ importers: version: 8.52.0(eslint@9.39.2)(typescript@5.9.3) '@vitejs/plugin-react-swc': specifier: ^4.2.2 - version: 4.2.2(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2)) + version: 4.2.2(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2)) eslint: specifier: ^9.39.1 version: 9.39.2 @@ -107,10 +110,10 @@ importers: version: 8.52.0(eslint@9.39.2)(typescript@5.9.3) vite: specifier: ^7.2.4 - version: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + version: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) vite-plugin-svgr: specifier: ^4.5.0 - version: 4.5.0(rollup@4.55.1)(typescript@5.9.3)(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2)) + version: 4.5.0(rollup@4.55.1)(typescript@5.9.3)(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2)) packages: @@ -1197,15 +1200,15 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - axe-core@4.11.0: - resolution: {integrity: sha512-ilYanEU8vxxBexpJd8cWM4ElSQq4QctCLKih0TSfjIfCQTeyH/6zVrmIJfLPrKTKJRbiG+cfnZbQIjAlJmF1jQ==} + axe-core@4.11.1: + resolution: {integrity: sha512-BASOg+YwO2C+346x3LZOeoovTIoTrRqEsqMa6fmfAV0P+U9mFr9NsyOEpiYvFjbc64NMrSswhV50WdXzdb/Z5A==} engines: {node: '>=4'} balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - baseline-browser-mapping@2.9.11: - resolution: {integrity: sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==} + baseline-browser-mapping@2.9.13: + resolution: {integrity: sha512-WhtvB2NG2wjr04+h77sg3klAIwrgOqnjS49GGudnUPGFFgg7G17y7Qecqp+2Dr5kUDxNRBca0SK7cG8JwzkWDQ==} hasBin: true boolbase@1.0.0: @@ -1254,8 +1257,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001762: - resolution: {integrity: sha512-PxZwGNvH7Ak8WX5iXzoK1KPZttBXNPuaOvI2ZYU7NrlM+d9Ov+TUvlLOBNGzVXAntMSMMlJPd+jY6ovrVjSmUw==} + caniuse-lite@1.0.30001763: + resolution: {integrity: sha512-mh/dGtq56uN98LlNX9qdbKnzINhX0QzhiWBFEkFfsFO4QyCvL8YegrJAazCwXIeqkIob8BlZPGM3xdnY+sgmvQ==} chai@5.3.3: resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} @@ -2355,15 +2358,15 @@ packages: react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - react-router-dom@7.11.0: - resolution: {integrity: sha512-e49Ir/kMGRzFOOrYQBdoitq3ULigw4lKbAyKusnvtDu2t4dBX4AGYPrzNvorXmVuOyeakai6FUPW5MmibvVG8g==} + react-router-dom@7.12.0: + resolution: {integrity: sha512-pfO9fiBcpEfX4Tx+iTYKDtPbrSLLCbwJ5EqP+SPYQu1VYCXdy79GSj0wttR0U4cikVdlImZuEZ/9ZNCgoaxwBA==} engines: {node: '>=20.0.0'} peerDependencies: react: '>=18' react-dom: '>=18' - react-router@7.11.0: - resolution: {integrity: sha512-uI4JkMmjbWCZc01WVP2cH7ZfSzH91JAZUDd7/nIprDgWxBV1TkkmLToFh7EbMTcMak8URFRa2YoBL/W8GWnCTQ==} + react-router@7.12.0: + resolution: {integrity: sha512-kTPDYPFzDVGIIGNLS5VJykK0HfHLY5MF3b+xj0/tTyNYL1gF1qs7u67Z9jEhQk2sQ98SUaHxlG31g1JtF7IfVw==} engines: {node: '>=20.0.0'} peerDependencies: react: '>=18' @@ -2680,8 +2683,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - ufo@1.6.1: - resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} + ufo@1.6.2: + resolution: {integrity: sha512-heMioaxBcG9+Znsda5Q8sQbWnLJSl98AFDXTO80wELWEzX3hordXsTdxrIfMQoO9IY1MEnoGoPjpoKpMj+Yx0Q==} unbox-primitive@1.1.0: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} @@ -2721,8 +2724,8 @@ packages: peerDependencies: vite: '>=2.6.0' - vite@7.3.0: - resolution: {integrity: sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==} + vite@7.3.1: + resolution: {integrity: sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -2838,6 +2841,24 @@ packages: zod@4.3.5: resolution: {integrity: sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==} + zustand@5.0.9: + resolution: {integrity: sha512-ALBtUj0AfjJt3uNRQoL1tL2tMvj6Gp/6e39dnfT6uzpelGru8v1tPOGBzayOWbPJvujM8JojDk3E1LxeFisBNg==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=18.0.0' + immer: '>=9.0.6' + react: '>=18.0.0' + use-sync-external-store: '>=1.2.0' + peerDependenciesMeta: + '@types/react': + optional: true + immer: + optional: true + react: + optional: true + use-sync-external-store: + optional: true + snapshots: '@adobe/css-tools@4.4.4': {} @@ -3119,11 +3140,11 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 - '@joshwooding/vite-plugin-react-docgen-typescript@0.6.3(typescript@5.9.3)(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2))': + '@joshwooding/vite-plugin-react-docgen-typescript@0.6.3(typescript@5.9.3)(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2))': dependencies: glob: 11.1.0 react-docgen-typescript: 2.4.0(typescript@5.9.3) - vite: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) optionalDependencies: typescript: 5.9.3 @@ -3251,13 +3272,13 @@ snapshots: '@storybook/addon-a11y@10.1.11(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': dependencies: '@storybook/global': 5.0.0 - axe-core: 4.11.0 + axe-core: 4.11.1 storybook: 10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - '@storybook/addon-docs@10.1.11(@types/react@19.2.7)(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2))': + '@storybook/addon-docs@10.1.11(@types/react@19.2.7)(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2))': dependencies: '@mdx-js/react': 3.1.1(@types/react@19.2.7)(react@19.2.3) - '@storybook/csf-plugin': 10.1.11(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2)) + '@storybook/csf-plugin': 10.1.11(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2)) '@storybook/icons': 2.0.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@storybook/react-dom-shim': 10.1.11(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) react: 19.2.3 @@ -3271,27 +3292,27 @@ snapshots: - vite - webpack - '@storybook/builder-vite@10.1.11(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2))': + '@storybook/builder-vite@10.1.11(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2))': dependencies: - '@storybook/csf-plugin': 10.1.11(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2)) - '@vitest/mocker': 3.2.4(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2)) + '@storybook/csf-plugin': 10.1.11(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2)) + '@vitest/mocker': 3.2.4(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2)) storybook: 10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) ts-dedent: 2.2.0 - vite: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) transitivePeerDependencies: - esbuild - msw - rollup - webpack - '@storybook/csf-plugin@10.1.11(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2))': + '@storybook/csf-plugin@10.1.11(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2))': dependencies: storybook: 10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) unplugin: 2.3.11 optionalDependencies: esbuild: 0.27.2 rollup: 4.55.1 - vite: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) '@storybook/global@5.0.0': {} @@ -3306,11 +3327,11 @@ snapshots: react-dom: 19.2.3(react@19.2.3) storybook: 10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - '@storybook/react-vite@10.1.11(esbuild@0.27.2)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(typescript@5.9.3)(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2))': + '@storybook/react-vite@10.1.11(esbuild@0.27.2)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(typescript@5.9.3)(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2))': dependencies: - '@joshwooding/vite-plugin-react-docgen-typescript': 0.6.3(typescript@5.9.3)(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2)) + '@joshwooding/vite-plugin-react-docgen-typescript': 0.6.3(typescript@5.9.3)(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2)) '@rollup/pluginutils': 5.3.0(rollup@4.55.1) - '@storybook/builder-vite': 10.1.11(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2)) + '@storybook/builder-vite': 10.1.11(esbuild@0.27.2)(rollup@4.55.1)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2)) '@storybook/react': 10.1.11(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(storybook@10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(typescript@5.9.3) empathic: 2.0.0 magic-string: 0.30.21 @@ -3320,7 +3341,7 @@ snapshots: resolve: 1.22.11 storybook: 10.1.11(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) tsconfig-paths: 4.2.0 - vite: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) transitivePeerDependencies: - esbuild - msw @@ -3718,7 +3739,7 @@ snapshots: dependencies: '@vanilla-extract/css': 1.18.0 '@vanilla-extract/integration': 8.0.7 - vite: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) vite-node: 3.2.4(@types/node@24.10.4)(yaml@2.8.2) transitivePeerDependencies: - '@types/node' @@ -3770,11 +3791,11 @@ snapshots: '@vanilla-extract/private@1.0.9': {} - '@vanilla-extract/vite-plugin@5.1.4(@types/node@24.10.4)(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2))(yaml@2.8.2)': + '@vanilla-extract/vite-plugin@5.1.4(@types/node@24.10.4)(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2))(yaml@2.8.2)': dependencies: '@vanilla-extract/compiler': 0.3.4(@types/node@24.10.4)(yaml@2.8.2) '@vanilla-extract/integration': 8.0.7 - vite: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -3790,11 +3811,11 @@ snapshots: - tsx - yaml - '@vitejs/plugin-react-swc@4.2.2(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2))': + '@vitejs/plugin-react-swc@4.2.2(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2))': dependencies: '@rolldown/pluginutils': 1.0.0-beta.47 '@swc/core': 1.15.8 - vite: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) transitivePeerDependencies: - '@swc/helpers' @@ -3806,13 +3827,13 @@ snapshots: chai: 5.3.3 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2))': + '@vitest/mocker@3.2.4(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) '@vitest/pretty-format@3.2.4': dependencies: @@ -3944,11 +3965,11 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 - axe-core@4.11.0: {} + axe-core@4.11.1: {} balanced-match@1.0.2: {} - baseline-browser-mapping@2.9.11: {} + baseline-browser-mapping@2.9.13: {} boolbase@1.0.0: {} @@ -3967,8 +3988,8 @@ snapshots: browserslist@4.28.1: dependencies: - baseline-browser-mapping: 2.9.11 - caniuse-lite: 1.0.30001762 + baseline-browser-mapping: 2.9.13 + caniuse-lite: 1.0.30001763 electron-to-chromium: 1.5.267 node-releases: 2.0.27 update-browserslist-db: 1.2.3(browserslist@4.28.1) @@ -4000,7 +4021,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001762: {} + caniuse-lite@1.0.30001763: {} chai@5.3.3: dependencies: @@ -5007,7 +5028,7 @@ snapshots: acorn: 8.15.0 pathe: 2.0.3 pkg-types: 1.3.1 - ufo: 1.6.1 + ufo: 1.6.2 modern-ahocorasick@1.1.0: {} @@ -5210,13 +5231,13 @@ snapshots: react-is@17.0.2: {} - react-router-dom@7.11.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3): + react-router-dom@7.12.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: react: 19.2.3 react-dom: 19.2.3(react@19.2.3) - react-router: 7.11.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react-router: 7.12.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - react-router@7.11.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3): + react-router@7.12.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: cookie: 1.1.1 react: 19.2.3 @@ -5641,7 +5662,7 @@ snapshots: typescript@5.9.3: {} - ufo@1.6.1: {} + ufo@1.6.2: {} unbox-primitive@1.1.0: dependencies: @@ -5703,7 +5724,7 @@ snapshots: debug: 4.4.3 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) transitivePeerDependencies: - '@types/node' - jiti @@ -5718,18 +5739,18 @@ snapshots: - tsx - yaml - vite-plugin-svgr@4.5.0(rollup@4.55.1)(typescript@5.9.3)(vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2)): + vite-plugin-svgr@4.5.0(rollup@4.55.1)(typescript@5.9.3)(vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2)): dependencies: '@rollup/pluginutils': 5.3.0(rollup@4.55.1) '@svgr/core': 8.1.0(typescript@5.9.3) '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.9.3)) - vite: 7.3.0(@types/node@24.10.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@24.10.4)(yaml@2.8.2) transitivePeerDependencies: - rollup - supports-color - typescript - vite@7.3.0(@types/node@24.10.4)(yaml@2.8.2): + vite@7.3.1(@types/node@24.10.4)(yaml@2.8.2): dependencies: esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) @@ -5826,3 +5847,9 @@ snapshots: zod: 4.3.5 zod@4.3.5: {} + + zustand@5.0.9(@types/react@19.2.7)(react@19.2.3)(use-sync-external-store@1.6.0(react@19.2.3)): + optionalDependencies: + '@types/react': 19.2.7 + react: 19.2.3 + use-sync-external-store: 1.6.0(react@19.2.3) diff --git a/src/app/store/index.ts b/src/app/store/index.ts new file mode 100644 index 00000000..16b25023 --- /dev/null +++ b/src/app/store/index.ts @@ -0,0 +1 @@ +export { useAuthStore } from '@shared/model/auth'; diff --git a/src/shared/lib/.gitkeep b/src/shared/lib/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/shared/lib/auth/token-storage.ts b/src/shared/lib/auth/token-storage.ts new file mode 100644 index 00000000..917c0c33 --- /dev/null +++ b/src/shared/lib/auth/token-storage.ts @@ -0,0 +1,13 @@ +const ACCESS_TOKEN_KEY = 'accessToken'; + +export const tokenStorage = { + get() { + return sessionStorage.getItem(ACCESS_TOKEN_KEY); + }, + set(token: string) { + sessionStorage.setItem(ACCESS_TOKEN_KEY, token); + }, + clear() { + sessionStorage.removeItem(ACCESS_TOKEN_KEY); + }, +}; diff --git a/src/shared/model/.gitkeep b/src/shared/model/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/shared/model/auth/auth.store.ts b/src/shared/model/auth/auth.store.ts new file mode 100644 index 00000000..e4c85b1c --- /dev/null +++ b/src/shared/model/auth/auth.store.ts @@ -0,0 +1,25 @@ +import { create } from 'zustand'; + +import { tokenStorage } from '@/shared/lib/auth/token-storage'; + +interface AuthState { + isLoggedIn: boolean; + actions: { + login: (accessToken: string) => void; + logout: () => void; + }; +} + +export const useAuthStore = create((set) => ({ + isLoggedIn: Boolean(tokenStorage.get()), + actions: { + login: (accessToken) => { + tokenStorage.set(accessToken); + set({ isLoggedIn: true }); + }, + logout: () => { + tokenStorage.clear(); + set({ isLoggedIn: false }); + }, + }, +})); diff --git a/src/shared/model/auth/index.ts b/src/shared/model/auth/index.ts new file mode 100644 index 00000000..58d10fa8 --- /dev/null +++ b/src/shared/model/auth/index.ts @@ -0,0 +1 @@ +export { useAuthStore } from './auth.store'; \ No newline at end of file