Trying to fix auth refactor.

This commit is contained in:
Bradley Shellnut 2023-09-11 17:29:15 -07:00
parent 38b288cf58
commit 2f54c1189e
14 changed files with 360 additions and 309 deletions

View file

@ -46,15 +46,15 @@
"prisma": "^5.2.0",
"sass": "^1.65.1",
"svelte": "^4.2.0",
"svelte-check": "^3.5.0",
"svelte-check": "^3.5.1",
"svelte-preprocess": "^5.0.4",
"svelte-sequential-preprocessor": "^2.0.1",
"sveltekit-flash-message": "^2.2.0",
"sveltekit-flash-message": "^2.2.1",
"sveltekit-superforms": "^1.6.1",
"tailwindcss": "^3.3.3",
"ts-node": "^10.9.1",
"tslib": "^2.6.1",
"typescript": "^5.1.6",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vitest": "^0.25.3",
"zod": "^3.22.2"
@ -73,7 +73,7 @@
"@lucia-auth/adapter-prisma": "^3.0.1",
"@lukeed/uuid": "^2.0.1",
"@melt-ui/svelte": "^0.37.6",
"@prisma/client": "5.1.1",
"@prisma/client": "5.2.0",
"@types/feather-icons": "^4.29.1",
"bits-ui": "^0.0.27",
"class-variance-authority": "^0.6.1",
@ -84,7 +84,7 @@
"iconify-icon": "^1.0.8",
"just-kebab-case": "^4.2.0",
"loader": "^2.1.1",
"lucia": "^2.4.2",
"lucia": "^2.5.0",
"lucide-svelte": "^0.256.1",
"open-props": "^1.5.13",
"radix-svelte": "^0.9.0",
@ -93,8 +93,8 @@
"svelte-lazy-loader": "^1.0.0",
"svelte-legos": "^0.2.1",
"tailwind-merge": "^1.14.0",
"tailwind-variants": "^0.1.13",
"tailwindcss-animate": "^1.0.6",
"tailwind-variants": "^0.1.14",
"tailwindcss-animate": "^1.0.7",
"zod-to-json-schema": "^3.21.4"
}
}

View file

@ -19,10 +19,10 @@ dependencies:
version: 1.2.47
'@lucia-auth/adapter-mysql':
specifier: ^2.0.0
version: 2.0.0(lucia@2.4.2)
version: 2.0.0(lucia@2.5.0)
'@lucia-auth/adapter-prisma':
specifier: ^3.0.1
version: 3.0.1(@prisma/client@5.1.1)(lucia@2.4.2)
version: 3.0.1(@prisma/client@5.2.0)(lucia@2.5.0)
'@lukeed/uuid':
specifier: ^2.0.1
version: 2.0.1
@ -30,8 +30,8 @@ dependencies:
specifier: ^0.37.6
version: 0.37.6(svelte@4.2.0)
'@prisma/client':
specifier: 5.1.1
version: 5.1.1(prisma@5.2.0)
specifier: 5.2.0
version: 5.2.0(prisma@5.2.0)
'@types/feather-icons':
specifier: ^4.29.1
version: 4.29.1
@ -63,8 +63,8 @@ dependencies:
specifier: ^2.1.1
version: 2.1.1
lucia:
specifier: ^2.4.2
version: 2.4.2
specifier: ^2.5.0
version: 2.5.0
lucide-svelte:
specifier: ^0.256.1
version: 0.256.1(svelte@4.2.0)
@ -90,11 +90,11 @@ dependencies:
specifier: ^1.14.0
version: 1.14.0
tailwind-variants:
specifier: ^0.1.13
version: 0.1.13(tailwindcss@3.3.3)
specifier: ^0.1.14
version: 0.1.14(tailwindcss@3.3.3)
tailwindcss-animate:
specifier: ^1.0.6
version: 1.0.6(tailwindcss@3.3.3)
specifier: ^1.0.7
version: 1.0.7(tailwindcss@3.3.3)
zod-to-json-schema:
specifier: ^3.21.4
version: 3.21.4(zod@3.22.2)
@ -123,10 +123,10 @@ devDependencies:
version: 18.17.5
'@typescript-eslint/eslint-plugin':
specifier: ^5.62.0
version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.47.0)(typescript@5.1.6)
version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.47.0)(typescript@5.2.2)
'@typescript-eslint/parser':
specifier: ^5.62.0
version: 5.62.0(eslint@8.47.0)(typescript@5.1.6)
version: 5.62.0(eslint@8.47.0)(typescript@5.2.2)
autoprefixer:
specifier: ^10.4.15
version: 10.4.15(postcss@8.4.29)
@ -173,17 +173,17 @@ devDependencies:
specifier: ^4.2.0
version: 4.2.0
svelte-check:
specifier: ^3.5.0
version: 3.5.0(postcss-load-config@4.0.1)(postcss@8.4.29)(sass@1.65.1)(svelte@4.2.0)
specifier: ^3.5.1
version: 3.5.1(postcss-load-config@4.0.1)(postcss@8.4.29)(sass@1.65.1)(svelte@4.2.0)
svelte-preprocess:
specifier: ^5.0.4
version: 5.0.4(postcss-load-config@4.0.1)(postcss@8.4.29)(sass@1.65.1)(svelte@4.2.0)(typescript@5.1.6)
version: 5.0.4(postcss-load-config@4.0.1)(postcss@8.4.29)(sass@1.65.1)(svelte@4.2.0)(typescript@5.2.2)
svelte-sequential-preprocessor:
specifier: ^2.0.1
version: 2.0.1
sveltekit-flash-message:
specifier: ^2.2.0
version: 2.2.0(@sveltejs/kit@1.24.1)(svelte@4.2.0)
specifier: ^2.2.1
version: 2.2.1(@sveltejs/kit@1.24.1)(svelte@4.2.0)
sveltekit-superforms:
specifier: ^1.6.1
version: 1.6.1(@sveltejs/kit@1.24.1)(svelte@4.2.0)(zod@3.22.2)
@ -192,13 +192,13 @@ devDependencies:
version: 3.3.3(ts-node@10.9.1)
ts-node:
specifier: ^10.9.1
version: 10.9.1(@types/node@18.17.5)(typescript@5.1.6)
version: 10.9.1(@types/node@18.17.5)(typescript@5.2.2)
tslib:
specifier: ^2.6.1
version: 2.6.1
specifier: ^2.6.2
version: 2.6.2
typescript:
specifier: ^5.1.6
version: 5.1.6
specifier: ^5.2.2
version: 5.2.2
vite:
specifier: ^4.4.9
version: 4.4.9(@types/node@18.17.5)(sass@1.65.1)
@ -1145,7 +1145,7 @@ packages:
'@jridgewell/resolve-uri': 3.1.0
'@jridgewell/sourcemap-codec': 1.4.15
/@lucia-auth/adapter-mysql@2.0.0(lucia@2.4.2):
/@lucia-auth/adapter-mysql@2.0.0(lucia@2.5.0):
resolution: {integrity: sha512-8a4JZ3VjDyRu/mAop2hEt/jOJO2HXwWIAid6a4wGiR8wgnlyOws9brRc+/wxQHSOlWUlrWemrfDvXLs5mMtkeQ==}
peerDependencies:
'@planetscale/database': ^1.0.0
@ -1157,17 +1157,17 @@ packages:
mysql2:
optional: true
dependencies:
lucia: 2.4.2
lucia: 2.5.0
dev: false
/@lucia-auth/adapter-prisma@3.0.1(@prisma/client@5.1.1)(lucia@2.4.2):
/@lucia-auth/adapter-prisma@3.0.1(@prisma/client@5.2.0)(lucia@2.5.0):
resolution: {integrity: sha512-JZNl+721M5ApjtNiH+WUYstiC8cffcI/Y9IzKsa0uUhQMIHl2ObCrgO0R3fgHnjWHBjhQoK36g/r/iSJIDppBA==}
peerDependencies:
'@prisma/client': ^4.2.0 || ^5.0.0
lucia: ^2.0.0
dependencies:
'@prisma/client': 5.1.1(prisma@5.2.0)
lucia: 2.4.2
'@prisma/client': 5.2.0(prisma@5.2.0)
lucia: 2.5.0
dev: false
/@lukeed/csprng@1.1.0:
@ -1265,8 +1265,8 @@ packages:
/@polka/url@1.0.0-next.21:
resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==}
/@prisma/client@5.1.1(prisma@5.2.0):
resolution: {integrity: sha512-fxcCeK5pMQGcgCqCrWsi+I2rpIbk0rAhdrN+ke7f34tIrgPwA68ensrpin+9+fZvuV2OtzHmuipwduSY6HswdA==}
/@prisma/client@5.2.0(prisma@5.2.0):
resolution: {integrity: sha512-AiTjJwR4J5Rh6Z/9ZKrBBLel3/5DzUNntMohOy7yObVnVoTNVFi2kvpLZlFuKO50d7yDspOtW6XBpiAd0BVXbQ==}
engines: {node: '>=16.13'}
requiresBuild: true
peerDependencies:
@ -1275,12 +1275,12 @@ packages:
prisma:
optional: true
dependencies:
'@prisma/engines-version': 5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e
'@prisma/engines-version': 5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f
prisma: 5.2.0
dev: false
/@prisma/engines-version@5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e:
resolution: {integrity: sha512-owZqbY/wucbr65bXJ/ljrHPgQU5xXTSkmcE/JcbqE1kusuAXV/TLN3/exmz21SZ5rJ7WDkyk70J2G/n68iogbQ==}
/@prisma/engines-version@5.2.0-25.2804dc98259d2ea960602aca6b8e7fdc03c1758f:
resolution: {integrity: sha512-jsnKT5JIDIE01lAeCj2ghY9IwxkedhKNvxQeoyLs6dr4ZXynetD0vTy7u6wMJt8vVPv8I5DPy/I4CFaoXAgbtg==}
dev: false
/@prisma/engines@5.2.0:
@ -1445,7 +1445,7 @@ packages:
resolution: {integrity: sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==}
dev: false
/@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.47.0)(typescript@5.1.6):
/@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.47.0)(typescript@5.2.2):
resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -1457,23 +1457,23 @@ packages:
optional: true
dependencies:
'@eslint-community/regexpp': 4.5.0
'@typescript-eslint/parser': 5.62.0(eslint@8.47.0)(typescript@5.1.6)
'@typescript-eslint/parser': 5.62.0(eslint@8.47.0)(typescript@5.2.2)
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/type-utils': 5.62.0(eslint@8.47.0)(typescript@5.1.6)
'@typescript-eslint/utils': 5.62.0(eslint@8.47.0)(typescript@5.1.6)
'@typescript-eslint/type-utils': 5.62.0(eslint@8.47.0)(typescript@5.2.2)
'@typescript-eslint/utils': 5.62.0(eslint@8.47.0)(typescript@5.2.2)
debug: 4.3.4
eslint: 8.47.0
graphemer: 1.4.0
ignore: 5.2.1
natural-compare-lite: 1.4.0
semver: 7.3.8
tsutils: 3.21.0(typescript@5.1.6)
typescript: 5.1.6
tsutils: 3.21.0(typescript@5.2.2)
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/parser@5.62.0(eslint@8.47.0)(typescript@5.1.6):
/@typescript-eslint/parser@5.62.0(eslint@8.47.0)(typescript@5.2.2):
resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -1485,10 +1485,10 @@ packages:
dependencies:
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6)
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2)
debug: 4.3.4
eslint: 8.47.0
typescript: 5.1.6
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
@ -1501,7 +1501,7 @@ packages:
'@typescript-eslint/visitor-keys': 5.62.0
dev: true
/@typescript-eslint/type-utils@5.62.0(eslint@8.47.0)(typescript@5.1.6):
/@typescript-eslint/type-utils@5.62.0(eslint@8.47.0)(typescript@5.2.2):
resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -1511,12 +1511,12 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6)
'@typescript-eslint/utils': 5.62.0(eslint@8.47.0)(typescript@5.1.6)
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2)
'@typescript-eslint/utils': 5.62.0(eslint@8.47.0)(typescript@5.2.2)
debug: 4.3.4
eslint: 8.47.0
tsutils: 3.21.0(typescript@5.1.6)
typescript: 5.1.6
tsutils: 3.21.0(typescript@5.2.2)
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
@ -1526,7 +1526,7 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@typescript-eslint/typescript-estree@5.62.0(typescript@5.1.6):
/@typescript-eslint/typescript-estree@5.62.0(typescript@5.2.2):
resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -1541,13 +1541,13 @@ packages:
globby: 11.1.0
is-glob: 4.0.3
semver: 7.5.4
tsutils: 3.21.0(typescript@5.1.6)
typescript: 5.1.6
tsutils: 3.21.0(typescript@5.2.2)
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/utils@5.62.0(eslint@8.47.0)(typescript@5.1.6):
/@typescript-eslint/utils@5.62.0(eslint@8.47.0)(typescript@5.2.2):
resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -1558,7 +1558,7 @@ packages:
'@types/semver': 7.5.0
'@typescript-eslint/scope-manager': 5.62.0
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6)
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2)
eslint: 8.47.0
eslint-scope: 5.1.1
semver: 7.3.8
@ -2801,8 +2801,8 @@ packages:
dependencies:
yallist: 4.0.0
/lucia@2.4.2:
resolution: {integrity: sha512-JJMAxrsjNXS5WUNe/u9+ahIXM+RNHTL2+RRtzUo1lZgUQL7oFsOgckikdjUPmGaEKrmQfUznxg20L/Ghba3Fjg==}
/lucia@2.5.0:
resolution: {integrity: sha512-eUUtf4gBsT1vLF1UEkZly3Sh620N4P0TcGzeDMviFqF0qULB7XOgC9GMmobK3y9L/cEfoD8YHNxfIN/AzSXQsg==}
dev: false
/lucide-svelte@0.256.1(svelte@4.2.0):
@ -3307,7 +3307,7 @@ packages:
dependencies:
lilconfig: 2.1.0
postcss: 8.4.29
ts-node: 10.9.1(@types/node@18.17.5)(typescript@5.1.6)
ts-node: 10.9.1(@types/node@18.17.5)(typescript@5.2.2)
yaml: 1.10.2
dev: true
@ -3325,7 +3325,7 @@ packages:
dependencies:
lilconfig: 2.0.6
postcss: 8.4.29
ts-node: 10.9.1(@types/node@18.17.5)(typescript@5.1.6)
ts-node: 10.9.1(@types/node@18.17.5)(typescript@5.2.2)
yaml: 2.1.3
/postcss-logical@6.2.0(postcss@8.4.29):
@ -3848,8 +3848,8 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
/svelte-check@3.5.0(postcss-load-config@4.0.1)(postcss@8.4.29)(sass@1.65.1)(svelte@4.2.0):
resolution: {integrity: sha512-KHujbn4k17xKYLmtCwv0sKKM7uiHTYcQvXnvrCcNU6a7hcszh99zFTIoiu/Sp/ewAw5aJmillJ1Cs8gKLmcX4A==}
/svelte-check@3.5.1(postcss-load-config@4.0.1)(postcss@8.4.29)(sass@1.65.1)(svelte@4.2.0):
resolution: {integrity: sha512-+Zb4iHxAhdUtcUg/WJPRjlS1RJalIsWAe9Mz6G1zyznSs7dDkT7VUBdXc3q7Iwg49O/VrZgyJRvOJkjuBfKjFA==}
hasBin: true
peerDependencies:
svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0
@ -3861,8 +3861,8 @@ packages:
picocolors: 1.0.0
sade: 1.8.1
svelte: 4.2.0
svelte-preprocess: 5.0.4(postcss-load-config@4.0.1)(postcss@8.4.29)(sass@1.65.1)(svelte@4.2.0)(typescript@5.1.6)
typescript: 5.1.6
svelte-preprocess: 5.0.4(postcss-load-config@4.0.1)(postcss@8.4.29)(sass@1.65.1)(svelte@4.2.0)(typescript@5.2.2)
typescript: 5.2.2
transitivePeerDependencies:
- '@babel/core'
- coffeescript
@ -3932,7 +3932,7 @@ packages:
svelte: 4.2.0
dev: false
/svelte-preprocess@5.0.4(postcss-load-config@4.0.1)(postcss@8.4.29)(sass@1.65.1)(svelte@4.2.0)(typescript@5.1.6):
/svelte-preprocess@5.0.4(postcss-load-config@4.0.1)(postcss@8.4.29)(sass@1.65.1)(svelte@4.2.0)(typescript@5.2.2):
resolution: {integrity: sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==}
engines: {node: '>= 14.10.0'}
requiresBuild: true
@ -3979,7 +3979,7 @@ packages:
sorcery: 0.11.0
strip-indent: 3.0.0
svelte: 4.2.0
typescript: 5.1.6
typescript: 5.2.2
dev: true
/svelte-sequential-preprocessor@2.0.1:
@ -3987,7 +3987,7 @@ packages:
engines: {node: '>=16'}
dependencies:
svelte: 4.2.0
tslib: 2.6.1
tslib: 2.6.2
dev: true
/svelte-writable-derived@3.1.0(svelte@4.2.0):
@ -4016,8 +4016,8 @@ packages:
magic-string: 0.30.0
periscopic: 3.1.0
/sveltekit-flash-message@2.2.0(@sveltejs/kit@1.24.1)(svelte@4.2.0):
resolution: {integrity: sha512-22hYvD4kQUWJevbiJQkRNIWtEexKyKYhN4zyn8YhfU6J2hRY1uFdTTfH0JIWwPkJ/QarBgLwzP79GO5t/LLZUw==}
/sveltekit-flash-message@2.2.1(@sveltejs/kit@1.24.1)(svelte@4.2.0):
resolution: {integrity: sha512-KnVuC7Q07crRTwgm/N5CQEebNbzPWoMrtlKXRMq608T+/by8kETXmyTUnuZ5wsnfJEwhWQyXsXBOY2a6NzCPQQ==}
peerDependencies:
'@sveltejs/kit': 1.x
svelte: 3.x || 4.x
@ -4044,8 +4044,8 @@ packages:
resolution: {integrity: sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ==}
dev: false
/tailwind-variants@0.1.13(tailwindcss@3.3.3):
resolution: {integrity: sha512-G2M7M74hjq0nAo6QdEfUJgF+0t9DecFUw91GC1P9YTnwMcfB3uChT5U5e2DuNU42xoOz15lzo7r0mPdMzZkylg==}
/tailwind-variants@0.1.14(tailwindcss@3.3.3):
resolution: {integrity: sha512-qfOkSGP+cSolTTkJboldGmiM+w5uE77pazCRkwixEBsuaml9CmhN0E8qgH7QnZNmOTVSsgRK1tn/MsKOvOKVWA==}
engines: {node: '>=16.x', pnpm: '>=7.x'}
peerDependencies:
tailwindcss: '*'
@ -4054,8 +4054,8 @@ packages:
tailwindcss: 3.3.3(ts-node@10.9.1)
dev: false
/tailwindcss-animate@1.0.6(tailwindcss@3.3.3):
resolution: {integrity: sha512-4WigSGMvbl3gCCact62ZvOngA+PRqhAn7si3TQ3/ZuPuQZcIEtVap+ENSXbzWhpojKB8CpvnIsrwBu8/RnHtuw==}
/tailwindcss-animate@1.0.7(tailwindcss@3.3.3):
resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==}
peerDependencies:
tailwindcss: '>=3.0.0 || insiders'
dependencies:
@ -4165,7 +4165,7 @@ packages:
/ts-interface-checker@0.1.13:
resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}
/ts-node@10.9.1(@types/node@18.17.5)(typescript@5.1.6):
/ts-node@10.9.1(@types/node@18.17.5)(typescript@5.2.2):
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true
peerDependencies:
@ -4191,7 +4191,7 @@ packages:
create-require: 1.1.1
diff: 4.0.2
make-error: 1.3.6
typescript: 5.1.6
typescript: 5.2.2
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
@ -4199,18 +4199,18 @@ packages:
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
dev: true
/tslib@2.6.1:
resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==}
/tslib@2.6.2:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
dev: true
/tsutils@3.21.0(typescript@5.1.6):
/tsutils@3.21.0(typescript@5.2.2):
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
engines: {node: '>= 6'}
peerDependencies:
typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
dependencies:
tslib: 1.14.1
typescript: 5.1.6
typescript: 5.2.2
dev: true
/type-check@0.4.0:
@ -4230,8 +4230,8 @@ packages:
engines: {node: '>=10'}
dev: true
/typescript@5.1.6:
resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==}
/typescript@5.2.2:
resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==}
engines: {node: '>=14.17'}
hasBin: true

View file

@ -1,30 +0,0 @@
<script lang="ts">
import type { HTMLInputAttributes } from "svelte/elements";
import { cn } from "$lib/utils";
let className: string | undefined | null = undefined;
export let value: HTMLInputAttributes["value"] = undefined;
export { className as class };
</script>
<input
class={cn(
"flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className
)}
bind:value
on:blur
on:change
on:click
on:focus
on:keydown
on:keypress
on:keyup
on:mouseover
on:mouseenter
on:mouseleave
on:paste
on:input
{...$$restProps}
/>

View file

@ -1,16 +0,0 @@
<script lang="ts">
import { cva } from "class-variance-authority";
import { Label as LabelPrimitive } from "radix-svelte";
import { cn } from "$lib/utils";
const labelVariants = cva(
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
);
let className: string | undefined | null = undefined;
export { className as class };
</script>
<LabelPrimitive.Root class={cn(labelVariants(), className)} {...$$restProps}>
<slot />
</LabelPrimitive.Root>

View file

@ -1 +1,7 @@
export { default as Label } from "./Label.svelte";
import Root from "./label.svelte";
export {
Root,
//
Root as Label
};

View file

@ -0,0 +1,21 @@
<script lang="ts">
import { Label as LabelPrimitive } from "bits-ui";
import { cn } from "$lib/utils";
type $$Props = LabelPrimitive.Props;
type $$Events = LabelPrimitive.Events;
let className: $$Props["class"] = undefined;
export { className as class };
</script>
<LabelPrimitive.Root
class={cn(
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
className
)}
{...$$restProps}
on:mousedown
>
<slot />
</LabelPrimitive.Root>

View file

@ -3,8 +3,8 @@
//import SuperDebug from 'sveltekit-superforms/client/SuperDebug.svelte';
import { userSchema } from '$lib/config/zod-schemas';
import { AlertTriangle } from 'lucide-svelte';
import Label from '$components/ui/label/Label.svelte';
import Input from '$components/ui/input/Input.svelte';
import { Label } from '$components/ui/label';
import { Input } from '$components/ui/input';
import { Button } from '$components/ui/button';
export let data;

View file

@ -1,83 +1,68 @@
<script lang="ts">
// import "../app.postcss";
import { onMount } from "svelte";
import { getFlash } from 'sveltekit-flash-message/client';
import toast, { Toaster } from 'svelte-french-toast';
import { navigating, page } from '$app/stores';
import { browser } from '$app/environment';
import debounce from 'just-debounce-it';
import 'iconify-icon';
import Transition from '$lib/components/transition/index.svelte';
import Analytics from '$lib/components/analytics.svelte';
import Header from '$lib/components/header/index.svelte';
import Footer from '$lib/components/footer.svelte';
import Loading from '$lib/components/loading.svelte';
import Portal from '$lib/Portal.svelte';
import { boredState } from '$lib/stores/boredState';
import { collectionStore } from '$lib/stores/collectionStore';
import { wishlistStore } from '$lib/stores/wishlistStore';
import { theme } from '$state/theme';
import type { SavedGameType } from '$lib/types';
$: {
if ($navigating) {
debounce(() => {
boredState.update((n) => ({ ...n, loading: true }));
}, 250);
}
if (!$navigating) {
boredState.update((n) => ({ ...n, loading: false }));
}
}
// $: {
// if ($navigating) {
// debounce(() => {
// boredState.update((n) => ({ ...n, loading: true }));
// }, 250);
// }
// if (!$navigating) {
// boredState.update((n) => ({ ...n, loading: false }));
// }
// }
$: isOpen = $boredState?.dialog?.isOpen;
// $: isOpen = $boredState?.dialog?.isOpen;
if (browser) {
const collator = new Intl.Collator('en');
// if (browser) {
// const collator = new Intl.Collator('en');
let collectionEmpty = $collectionStore.length === 0 || false;
let wishlistEmpty = $wishlistStore.length === 0 || false;
if (wishlistEmpty && localStorage?.wishlist && localStorage?.wishlist?.length !== 0) {
const wishlist: SavedGameType[] = JSON.parse(localStorage.wishlist);
if (wishlist?.length !== 0) {
wishlist.sort((a, b) => collator.compare(a.name, b.name));
for (const item of wishlist) {
if (!item?.searchTerms) {
item.searchTerms = `${item?.name?.toLowerCase()}`;
}
if (!item?.includeInRandom) {
item.includeInRandom = false;
}
}
wishlistStore.addAll(wishlist);
}
}
if (collectionEmpty && localStorage?.collection && localStorage?.collection?.length !== 0) {
const collection: SavedGameType[] = JSON.parse(localStorage.collection);
if (collection?.length !== 0) {
collection.sort((a, b) => collator.compare(a.name, b.name));
for (const item of collection) {
if (!item?.searchTerms) {
item.searchTerms = `${item?.name?.toLowerCase()}`;
}
}
collectionStore.addAll(collection);
}
}
}
// let collectionEmpty = $collectionStore.length === 0 || false;
// let wishlistEmpty = $wishlistStore.length === 0 || false;
// if (wishlistEmpty && localStorage?.wishlist && localStorage?.wishlist?.length !== 0) {
// const wishlist: SavedGameType[] = JSON.parse(localStorage.wishlist);
// if (wishlist?.length !== 0) {
// wishlist.sort((a, b) => collator.compare(a.name, b.name));
// for (const item of wishlist) {
// if (!item?.searchTerms) {
// item.searchTerms = `${item?.name?.toLowerCase()}`;
// }
// if (!item?.includeInRandom) {
// item.includeInRandom = false;
// }
// }
// wishlistStore.addAll(wishlist);
// }
// }
// if (collectionEmpty && localStorage?.collection && localStorage?.collection?.length !== 0) {
// const collection: SavedGameType[] = JSON.parse(localStorage.collection);
// if (collection?.length !== 0) {
// collection.sort((a, b) => collator.compare(a.name, b.name));
// for (const item of collection) {
// if (!item?.searchTerms) {
// item.searchTerms = `${item?.name?.toLowerCase()}`;
// }
// }
// collectionStore.addAll(collection);
// }
// }
// }
const dev = process.env.NODE_ENV !== 'production';
// const dev = process.env.NODE_ENV !== 'production';
export let data;
$: ({ user } = data);
// $: ({ user } = data);
const flash = getFlash(page, {
clearAfterMs: 6000
});
let flashType;
let flashMessage;
$: flashType = $flash?.type;
$: flashMessage = $flash?.message;
// const flash = getFlash(page, {
// clearAfterMs: 6000
// });
// let flashType;
// let flashMessage;
// $: flashType = $flash?.type;
// $: flashMessage = $flash?.message;
// if ($flash && flashType && flashMessage) {
// switch (flashType) {
@ -92,34 +77,34 @@
// }
// }
onMount(() => {
// set the theme to the user's active theme
$theme = user?.theme || 'system';
document.querySelector('html')?.setAttribute('data-theme', $theme);
});
// onMount(() => {
// // set the theme to the user's active theme
// $theme = user?.theme || 'system';
// document.querySelector('html')?.setAttribute('data-theme', $theme);
// });
flash.subscribe(($flash) => {
if (!$flash) return;
// flash.subscribe(($flash) => {
// if (!$flash) return;
if ($flash.type == 'success') {
toast.success($flash.message);
} else {
toast.error($flash.message, {
duration: 5000
});
}
// if ($flash.type == 'success') {
// toast.success($flash.message);
// } else {
// toast.error($flash.message, {
// duration: 5000
// });
// }
// Clearing the flash message could sometimes
// be required here to avoid double-toasting.
flash.set(undefined);
});
// // Clearing the flash message could sometimes
// // be required here to avoid double-toasting.
// flash.set(undefined);
// });
</script>
{#if !dev}
<!-- {#if !dev}
<Analytics />
{/if}
{/if} -->
<div class="wrapper">
<!-- <div class="wrapper"> -->
<Header user={data.user} />
<main>
@ -129,11 +114,11 @@
</main>
<Footer />
</div>
<!-- </div> -->
<Toaster />
<!-- <Toaster /> -->
{#if $boredState?.loading}
<!-- {#if $boredState?.loading}
<Portal>
<div class="loading">
<Loading></Loading>
@ -146,16 +131,16 @@
<div class="container">
<svelte:component this={$boredState?.dialog?.content}></svelte:component>
</div>
{/if}
{/if} -->
<style lang="postcss">
.flash {
/* .flash {
display: inline-block;
position: absolute;
place-items: center;
padding: 0.5rem;
border-radius: 2px;
}
} */
.loading {
position: fixed;
@ -181,11 +166,11 @@
z-index: 100;
}
.wrapper {
/* .wrapper {
display: grid;
grid-template-rows: auto 1fr auto;
min-height: 100vh;
}
} */
main {
flex: 1;

View file

@ -1,5 +1,5 @@
<script lang="ts">
import TextSearch from '$lib/components/search/textSearch/index.svelte';
// import TextSearch from '$lib/components/search/textSearch/index.svelte';
import RandomSearch from '$lib/components/search/random/index.svelte';
import Random from '$lib/components/random/index.svelte';

View file

@ -70,6 +70,77 @@
grid-template-columns: repeat(2, minmax(0, 1fr));
max-width: none;
}
.auth-marketing {
display: none;
position: relative;
padding: 2.5rem;
flex-direction: column;
height: 100%;
color: #ffffff;
@media (min-width: 1024px) {
display: flex;
}
.image {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-size: cover;
}
.logo {
display: flex;
position: relative;
z-index: 20;
gap: 0.5rem;
align-items: center;
font-size: 1.125rem;
line-height: 1.75rem;
font-weight: 500;
transition-property: color, background-color, border-color,text-decoration-color, fill, stroke;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 300ms;
&:hover {
color: hsl(var(--muted-foreground));
}
.logo-image {
width: 2rem;
height: 2rem;
}
}
.quote-wrapper {
position: relative;
z-index: 20;
margin-top: auto;
.quote {
margin-top: 0.5rem;
p {
font-size: 1.125rem;
line-height: 1.75rem;
}
}
footer {
font-size: 0.875rem;
line-height: 1.25rem;
}
}
}
.auth-form {
@media (min-width: 1024px) {
padding: 2rem;
}
}
}
:global(.auth-button) {
@ -82,75 +153,4 @@
right: 2rem;
}
}
.auth-marketing {
display: none;
position: relative;
padding: 2.5rem;
flex-direction: column;
height: 100%;
color: #ffffff;
@media (min-width: 1024px) {
display: flex;
}
.image {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-size: cover;
}
.logo {
display: flex;
position: relative;
z-index: 20;
gap: 0.5rem;
align-items: center;
font-size: 1.125rem;
line-height: 1.75rem;
font-weight: 500;
transition-property: color, background-color, border-color,text-decoration-color, fill, stroke;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 300ms;
&:hover {
color: hsl(var(--muted-foreground));
}
.logo-image {
width: 2rem;
height: 2rem;
}
}
.quote-wrapper {
position: relative;
z-index: 20;
margin-top: auto;
.quote {
margin-top: 0.5rem;
p {
font-size: 1.125rem;
line-height: 1.75rem;
}
}
.footer {
font-size: 0.875rem;
line-height: 1.25rem;
}
}
}
.auth-form {
@media (min-width: 1024px) {
padding: 2rem;
}
}
</style>

View file

@ -45,7 +45,7 @@
</svelte:head>
<div class="login">
<form method="POST" use:enhance class="grid max-w-sm items-center gap-2">
<form method="POST" use:enhance>
<h2
class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0"
>
@ -79,10 +79,23 @@
<style lang="postcss">
.login {
display: grid;
display: flex;
margin-top: 1.5rem;
flex-direction: column;
justify-content: center;
width: 100%;
max-width: 24rem;
margin-left: auto;
margin-right: auto;
margin-left: auto;
@media (min-width: 640px) {
width: 350px;
}
form {
display: grid;
gap: 0.5rem;
align-items: center;
max-width: 24rem;
}
}
</style>

View file

@ -5,8 +5,8 @@
import toast from 'svelte-french-toast';
import { ChevronsUpDown } from "lucide-svelte";
import { Button } from '$components/ui/button';
import { Input } from '$components/ui/input';
import Label from '$components/ui/label/Label.svelte';
import { Label } from '$components/ui/label';
import { Input } from '$components/ui/input';
import { signUpSchema } from '$lib/config/zod-schemas.js';
import * as Collapsible from '$lib/components/ui/collapsible';
import * as Alert from '$lib/components/ui/alert';

View file

@ -1,7 +1,79 @@
<script lang="ts">
import "$lib/styles/app.postcss";
import { onMount } from "svelte";
import { getFlash } from 'sveltekit-flash-message/client';
import toast, { Toaster } from 'svelte-french-toast';
import { navigating, page } from '$app/stores';
import debounce from 'just-debounce-it';
import 'iconify-icon';
import Analytics from '$lib/components/analytics.svelte';
import { boredState } from '$lib/stores/boredState';
import { theme } from '$state/theme';
const dev = process.env.NODE_ENV !== 'production';
export let data;
$: ({ user } = data);
const flash = getFlash(page, {
clearAfterMs: 6000
});
let flashType;
let flashMessage;
$: flashType = $flash?.type;
$: flashMessage = $flash?.message;
$: {
if ($navigating) {
debounce(() => {
boredState.update((n) => ({ ...n, loading: true }));
}, 250);
}
if (!$navigating) {
boredState.update((n) => ({ ...n, loading: false }));
}
}
$: isOpen = $boredState?.dialog?.isOpen;
onMount(() => {
// set the theme to the user's active theme
$theme = user?.theme || 'system';
document.querySelector('html')?.setAttribute('data-theme', $theme);
});
flash.subscribe(($flash) => {
if (!$flash) return;
if ($flash.type == 'success') {
toast.success($flash.message);
} else {
toast.error($flash.message, {
duration: 5000
});
}
// Clearing the flash message could sometimes
// be required here to avoid double-toasting.
flash.set(undefined);
});
</script>
<div class="relative flex min-h-screen flex-col">
{#if !dev}
<Analytics />
{/if}
<div class="layout">
<slot />
</div>
</div>
<Toaster />
<style lang="postcss">
.layout {
display: flex;
position: relative;
flex-direction: column;
min-height: 100vh;
}
</style>