From 30f4ce26bee83118d5711ccc36a5a136cfce4e83 Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Sat, 9 Mar 2024 09:40:52 -0500 Subject: [PATCH 01/19] bad --- components.json | 14 + package-lock.json | 814 +++++++++++++----- package.json | 16 +- src/app.d.ts | 2 +- src/app.postcss | 76 +- src/components/Header.svelte | 17 +- src/components/Settings.svelte | 108 ++- src/components/ui/button/button.svelte | 25 + src/components/ui/button/index.ts | 49 ++ src/components/ui/form/form-button.svelte | 9 + .../ui/form/form-description.svelte | 17 + .../ui/form/form-element-field.svelte | 26 + .../ui/form/form-field-errors.svelte | 26 + src/components/ui/form/form-field.svelte | 26 + src/components/ui/form/form-fieldset.svelte | 31 + src/components/ui/form/form-label.svelte | 17 + src/components/ui/form/form-legend.svelte | 17 + src/components/ui/form/index.ts | 33 + src/components/ui/input/index.ts | 27 + src/components/ui/input/input.svelte | 35 + src/components/ui/label/index.ts | 7 + src/components/ui/label/label.svelte | 21 + src/components/ui/select/index.ts | 34 + .../ui/select/select-content.svelte | 39 + src/components/ui/select/select-item.svelte | 40 + src/components/ui/select/select-label.svelte | 16 + .../ui/select/select-separator.svelte | 11 + .../ui/select/select-trigger.svelte | 27 + src/lib/database/event.ts | 2 + src/lib/event.ts | 4 +- src/lib/utils.ts | 56 ++ src/routes/+layout.svelte | 2 + .../events/[slug]/+page.server.ts | 51 ++ .../events/[slug]/+page.svelte | 4 +- .../protected-routes/events/[slug]/+page.ts | 30 +- src/schemas/settingsSchema.ts | 12 + src/schemas/supabase.ts | 131 +++ svelte.config.js | 3 +- tailwind.config.js | 81 +- 39 files changed, 1663 insertions(+), 293 deletions(-) create mode 100644 components.json create mode 100644 src/components/ui/button/button.svelte create mode 100644 src/components/ui/button/index.ts create mode 100644 src/components/ui/form/form-button.svelte create mode 100644 src/components/ui/form/form-description.svelte create mode 100644 src/components/ui/form/form-element-field.svelte create mode 100644 src/components/ui/form/form-field-errors.svelte create mode 100644 src/components/ui/form/form-field.svelte create mode 100644 src/components/ui/form/form-fieldset.svelte create mode 100644 src/components/ui/form/form-label.svelte create mode 100644 src/components/ui/form/form-legend.svelte create mode 100644 src/components/ui/form/index.ts create mode 100644 src/components/ui/input/index.ts create mode 100644 src/components/ui/input/input.svelte create mode 100644 src/components/ui/label/index.ts create mode 100644 src/components/ui/label/label.svelte create mode 100644 src/components/ui/select/index.ts create mode 100644 src/components/ui/select/select-content.svelte create mode 100644 src/components/ui/select/select-item.svelte create mode 100644 src/components/ui/select/select-label.svelte create mode 100644 src/components/ui/select/select-separator.svelte create mode 100644 src/components/ui/select/select-trigger.svelte create mode 100644 src/lib/utils.ts create mode 100644 src/routes/protected-routes/events/[slug]/+page.server.ts create mode 100644 src/schemas/settingsSchema.ts create mode 100644 src/schemas/supabase.ts diff --git a/components.json b/components.json new file mode 100644 index 0000000..d3aed24 --- /dev/null +++ b/components.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://shadcn-svelte.com/schema.json", + "style": "default", + "tailwind": { + "config": "tailwind.config.js", + "css": "src/app.postcss", + "baseColor": "slate" + }, + "aliases": { + "components": "$components", + "utils": "$lib/utils" + }, + "typescript": true +} diff --git a/package-lock.json b/package-lock.json index 4858894..62f5dd7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,17 @@ "": { "name": "volleyman", "version": "0.0.1", + "dependencies": { + "bits-ui": "^0.19.5", + "clsx": "^2.1.0", + "formsnap": "^0.5.1", + "lucide-svelte": "^0.349.0", + "mode-watcher": "^0.2.2", + "sveltekit-superforms": "^2.8.0", + "tailwind-merge": "^2.2.1", + "tailwind-variants": "^0.2.0", + "zod-validation-error": "^3.0.3" + }, "devDependencies": { "@jest/globals": "^29.7.0", "@playwright/test": "^1.41.2", @@ -66,7 +77,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "dev": true, "engines": { "node": ">=10" }, @@ -78,7 +88,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -691,7 +700,6 @@ "version": "7.23.8", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.8.tgz", "integrity": "sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==", - "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -764,7 +772,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "aix" @@ -780,7 +787,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "android" @@ -796,7 +802,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "android" @@ -812,7 +817,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "android" @@ -828,7 +832,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -844,7 +847,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -860,7 +862,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -876,7 +877,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -892,7 +892,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -908,7 +907,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -924,7 +922,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "linux" @@ -940,7 +937,6 @@ "cpu": [ "loong64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -956,7 +952,6 @@ "cpu": [ "mips64el" ], - "dev": true, "optional": true, "os": [ "linux" @@ -972,7 +967,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -988,7 +982,6 @@ "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -1004,7 +997,6 @@ "cpu": [ "s390x" ], - "dev": true, "optional": true, "os": [ "linux" @@ -1020,7 +1012,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -1036,7 +1027,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "netbsd" @@ -1052,7 +1042,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "openbsd" @@ -1068,7 +1057,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "sunos" @@ -1084,7 +1072,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -1100,7 +1087,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -1116,7 +1102,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -1185,7 +1170,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==", - "dev": true, "dependencies": { "@floating-ui/utils": "^0.2.1" } @@ -1194,7 +1178,6 @@ "version": "1.6.3", "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", - "dev": true, "dependencies": { "@floating-ui/core": "^1.0.0", "@floating-ui/utils": "^0.2.0" @@ -1203,8 +1186,37 @@ "node_modules/@floating-ui/utils": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz", - "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==", - "dev": true + "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" + }, + "node_modules/@gcornut/valibot-json-schema": { + "version": "0.0.25", + "resolved": "https://registry.npmjs.org/@gcornut/valibot-json-schema/-/valibot-json-schema-0.0.25.tgz", + "integrity": "sha512-JlOmghA8OMM8B+3lLSWrZqce4FM5SrCO/bmYGZQz3ZYPja/mXhLYa2qEOFUsBaz24prv04un3zXIUpJzgglAkw==", + "optional": true, + "bin": { + "valibot-json-schema": "bin/index.js" + }, + "peerDependencies": { + "@types/json-schema": ">= 7.0.14", + "esbuild": ">= 0.18.20", + "esbuild-runner": ">= 2.2.2", + "valibot": ">= 0.21.0" + } + }, + "node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "optional": true + }, + "node_modules/@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "optional": true, + "dependencies": { + "@hapi/hoek": "^9.0.0" + } }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.13", @@ -1239,6 +1251,14 @@ "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, + "node_modules/@internationalized/date": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.5.2.tgz", + "integrity": "sha512-vo1yOMUt2hzp63IutEaTUxROdvQg1qlMRsbCvbay2AK2Gai7wIgCyK5weEX3nHkiLgo4qCXHijFNC/ILhlRpOQ==", + "dependencies": { + "@swc/helpers": "^0.5.0" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1478,7 +1498,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -1492,7 +1511,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -1501,7 +1519,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -1509,14 +1526,12 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.18", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", - "dev": true, "dependencies": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" @@ -1525,8 +1540,7 @@ "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.11", @@ -1548,11 +1562,43 @@ "node-pre-gyp": "bin/node-pre-gyp" } }, + "node_modules/@melt-ui/svelte": { + "version": "0.75.3", + "resolved": "https://registry.npmjs.org/@melt-ui/svelte/-/svelte-0.75.3.tgz", + "integrity": "sha512-EA2IKn7w9qtzO/M7VEENpphQ9A4az+QDMQbA8SJLuKyu+S8NWliln5y9vvmnx9dZF8GtKtUKuxpwRNyPg5LAOg==", + "dependencies": { + "@floating-ui/core": "^1.3.1", + "@floating-ui/dom": "^1.4.5", + "@internationalized/date": "^3.5.0", + "dequal": "^2.0.3", + "focus-trap": "^7.5.2", + "nanoid": "^5.0.4" + }, + "peerDependencies": { + "svelte": ">=3 <5" + } + }, + "node_modules/@melt-ui/svelte/node_modules/nanoid": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.6.tgz", + "integrity": "sha512-rRq0eMHoGZxlvaFOUdK1Ev83Bd1IgzzR+WJ3IbDJ7QOSdAxYjlurSPqFs9s4lJg29RT6nPwizFtJhQS6V5xgiA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1565,7 +1611,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, "engines": { "node": ">= 8" } @@ -1574,7 +1619,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1676,8 +1720,7 @@ "node_modules/@polka/url": { "version": "1.0.0-next.24", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.24.tgz", - "integrity": "sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==", - "dev": true + "integrity": "sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==" }, "node_modules/@popperjs/core": { "version": "2.11.8", @@ -1689,6 +1732,15 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@poppinss/macroable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@poppinss/macroable/-/macroable-1.0.1.tgz", + "integrity": "sha512-bO3+rnqGhE+gdx4DOyYjY9jCm2+c5Ncyl2Gmst0w271rIFnsB00btonpdmAqvFNzS8rcas+APGm+47fYMmkpQA==", + "optional": true, + "engines": { + "node": ">=18.16.0" + } + }, "node_modules/@rollup/pluginutils": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", @@ -1709,7 +1761,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "android" @@ -1722,7 +1773,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "android" @@ -1735,7 +1785,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -1748,7 +1797,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -1761,7 +1809,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -1774,7 +1821,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -1787,7 +1833,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -1800,7 +1845,6 @@ "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -1813,7 +1857,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -1826,7 +1869,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -1839,7 +1881,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -1852,7 +1893,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -1865,12 +1905,32 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" ] }, + "node_modules/@sideway/address": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", + "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", + "optional": true, + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/formula": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", + "optional": true + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "optional": true + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -1895,6 +1955,12 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@sodaru/yup-to-json-schema": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@sodaru/yup-to-json-schema/-/yup-to-json-schema-2.0.1.tgz", + "integrity": "sha512-lWb0Wiz8KZ9ip/dY1eUqt7fhTPmL24p6Hmv5Fd9pzlzAdw/YNcWZr+tiCT4oZ4Zyxzi9+1X4zv82o7jYvcFxYA==", + "optional": true + }, "node_modules/@stitches/core": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/@stitches/core/-/core-1.2.8.tgz", @@ -2083,7 +2149,6 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.5.0.tgz", "integrity": "sha512-1uyXvzC2Lu1FZa30T4y5jUAC21R309ZMRG0TPt+PPPbNUoDpy8zSmSNVWYaBWxYDqLGQ5oPNWvjvvF2IjJ1jmA==", - "dev": true, "hasInstallScript": true, "dependencies": { "@types/cookie": "^0.6.0", @@ -2115,7 +2180,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-3.0.2.tgz", "integrity": "sha512-MpmF/cju2HqUls50WyTHQBZUV3ovV/Uk8k66AN2gwHogNAG8wnW8xtZDhzNBsFJJuvmq1qnzA5kE7YfMJNFv2Q==", - "dev": true, "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^2.0.0", "debug": "^4.3.4", @@ -2137,7 +2201,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-2.0.0.tgz", "integrity": "sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==", - "dev": true, "dependencies": { "debug": "^4.3.4" }, @@ -2150,6 +2213,14 @@ "vite": "^5.0.0" } }, + "node_modules/@swc/helpers": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.6.tgz", + "integrity": "sha512-aYX01Ke9hunpoCexYAgQucEpARGQ5w/cqHFrIR+e9gdKb1QWTsVJuTJ2ozQzIAxLyRQe/m+2RqzkyOOGiMKRQA==", + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/cli-progress": { "version": "3.11.5", "resolved": "https://registry.npmjs.org/@types/cli-progress/-/cli-progress-3.11.5.tgz", @@ -2162,14 +2233,12 @@ "node_modules/@types/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", - "dev": true + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==" }, "node_modules/@types/estree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", - "dev": true + "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==" }, "node_modules/@types/graceful-fs": { "version": "4.1.9", @@ -2218,13 +2287,13 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "devOptional": true }, "node_modules/@types/node": { "version": "18.16.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz", "integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q==", - "dev": true + "devOptional": true }, "node_modules/@types/phoenix": { "version": "1.6.4", @@ -2250,6 +2319,12 @@ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, + "node_modules/@types/validator": { + "version": "13.11.9", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.9.tgz", + "integrity": "sha512-FCTsikRozryfayPuiI46QzH3fnrOoctTjvOYZkho9BTFLCOZ2rgZJHMOVgCOfttjPJcgOx52EpkY0CMfy87MIw==", + "optional": true + }, "node_modules/@types/ws": { "version": "8.5.10", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", @@ -2559,6 +2634,46 @@ "node": ">=8" } }, + "node_modules/@vinejs/compiler": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@vinejs/compiler/-/compiler-2.4.0.tgz", + "integrity": "sha512-qEhp+Ux4wCeyYlQpB5TddjlRRyxbZz4RVYG/UHGnnnn3eOw326dZGCJldOOEl6huBFoOguMUQfhKLLSjJ0v+XQ==", + "optional": true, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@vinejs/vine": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vinejs/vine/-/vine-1.7.1.tgz", + "integrity": "sha512-24FYCIMrQZbhUKkVyAApz5/eN34FBVuhayty1RyCNvdvYF2TpZpO/+NyjELW3JRtbIDfrAvr1+pYdJfRIovcbA==", + "optional": true, + "dependencies": { + "@poppinss/macroable": "^1.0.1", + "@types/validator": "^13.11.8", + "@vinejs/compiler": "^2.4.0", + "camelcase": "^8.0.0", + "dayjs": "^1.11.10", + "dlv": "^1.1.3", + "normalize-url": "^8.0.0", + "validator": "^13.11.0" + }, + "engines": { + "node": ">=18.16.0" + } + }, + "node_modules/@vinejs/vine/node_modules/camelcase": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", + "integrity": "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==", + "optional": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@vitest/expect": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.3.1.tgz", @@ -2689,7 +2804,6 @@ "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -2818,14 +2932,12 @@ "node_modules/any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -2871,8 +2983,7 @@ "node_modules/arg": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" }, "node_modules/argparse": { "version": "2.0.1", @@ -2884,11 +2995,16 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dev": true, "dependencies": { "dequal": "^2.0.3" } }, + "node_modules/arktype": { + "version": "1.0.29-alpha", + "resolved": "https://registry.npmjs.org/arktype/-/arktype-1.0.29-alpha.tgz", + "integrity": "sha512-glMLgVhIQRSkR3tymiS+POAcWVJH09sfrgic0jHnyFL8BlhHAJZX2BzdImU9zYr1y9NBqy+U93ZNrRTHXsKRDw==", + "optional": true + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -2975,7 +3091,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==", - "dev": true, "dependencies": { "dequal": "^2.0.3" } @@ -3022,8 +3137,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/base64-js": { "version": "1.5.1", @@ -3049,7 +3163,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, "engines": { "node": ">=8" } @@ -3063,6 +3176,36 @@ "file-uri-to-path": "1.0.0" } }, + "node_modules/bits-ui": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/bits-ui/-/bits-ui-0.19.5.tgz", + "integrity": "sha512-jrt0pGZdixtl27VrfzLj5yJxha29CK+6nClZZSoJCL5DlXFT1sluF9NnOSMP48D3kczR5YjpArvCe0BEnGq4jA==", + "dependencies": { + "@internationalized/date": "^3.5.1", + "@melt-ui/svelte": "0.75.3", + "nanoid": "^5.0.5" + }, + "peerDependencies": { + "svelte": "^4.0.0" + } + }, + "node_modules/bits-ui/node_modules/nanoid": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.6.tgz", + "integrity": "sha512-rRq0eMHoGZxlvaFOUdK1Ev83Bd1IgzzR+WJ3IbDJ7QOSdAxYjlurSPqFs9s4lJg29RT6nPwizFtJhQS6V5xgiA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -3078,7 +3221,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3088,7 +3230,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -3170,6 +3311,13 @@ "node": "*" } }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "optional": true, + "peer": true + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -3201,7 +3349,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true, "engines": { "node": ">= 6" } @@ -3304,7 +3451,6 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, "funding": [ { "type": "individual", @@ -3331,7 +3477,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -3432,11 +3577,18 @@ "node": ">=0.8" } }, + "node_modules/clsx": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", + "engines": { + "node": ">=6" + } + }, "node_modules/code-red": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", - "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15", "@types/estree": "^1.0.1", @@ -3449,7 +3601,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, "dependencies": { "@types/estree": "^1.0.0" } @@ -3520,7 +3671,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, "engines": { "node": ">= 6" } @@ -3528,8 +3678,7 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/console-control-strings": { "version": "1.1.0", @@ -3547,7 +3696,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -3556,7 +3704,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", - "dev": true, + "devOptional": true, "dependencies": { "is-what": "^3.14.1" }, @@ -3582,7 +3730,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "dev": true, "dependencies": { "mdn-data": "2.0.30", "source-map-js": "^1.0.1" @@ -3595,7 +3742,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, "bin": { "cssesc": "bin/cssesc" }, @@ -3666,13 +3812,12 @@ "version": "1.11.10", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==", - "dev": true + "devOptional": true }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -3713,7 +3858,6 @@ "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -3749,7 +3893,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, "engines": { "node": ">=6" } @@ -3775,14 +3918,12 @@ "node_modules/devalue": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz", - "integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==", - "dev": true + "integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==" }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" }, "node_modules/diff-sequences": { "version": "29.6.3", @@ -3808,8 +3949,7 @@ "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" }, "node_modules/doctrine": { "version": "3.0.0", @@ -3872,7 +4012,6 @@ "version": "0.1.8", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, "optional": true, "dependencies": { "prr": "~1.0.1" @@ -3891,7 +4030,6 @@ "version": "0.19.11", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", - "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -3925,6 +4063,30 @@ "@esbuild/win32-x64": "0.19.11" } }, + "node_modules/esbuild-runner": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/esbuild-runner/-/esbuild-runner-2.2.2.tgz", + "integrity": "sha512-fRFVXcmYVmSmtYm2mL8RlUASt2TDkGh3uRcvHFOKNr/T58VrfVeKD9uT9nlgxk96u0LS0ehS/GY7Da/bXWKkhw==", + "optional": true, + "peer": true, + "dependencies": { + "source-map-support": "0.5.21", + "tslib": "2.4.0" + }, + "bin": { + "esr": "bin/esr.js" + }, + "peerDependencies": { + "esbuild": "*" + } + }, + "node_modules/esbuild-runner/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "optional": true, + "peer": true + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -4139,8 +4301,7 @@ "node_modules/esm-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz", - "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==", - "dev": true + "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==" }, "node_modules/espree": { "version": "9.6.1", @@ -4307,7 +4468,6 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -4323,7 +4483,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -4347,7 +4506,6 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, "dependencies": { "reusify": "^1.0.4" } @@ -4437,7 +4595,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -4520,6 +4677,14 @@ "tailwindcss": "^3.3.2" } }, + "node_modules/focus-trap": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", + "integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==", + "dependencies": { + "tabbable": "^6.2.0" + } + }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -4534,6 +4699,35 @@ "node": ">= 6" } }, + "node_modules/formsnap": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/formsnap/-/formsnap-0.5.1.tgz", + "integrity": "sha512-8ppOlOu7llBEJbV0PzUz/KWh1J8KfiGqwjiyb8emQ2m+/nYXohLBtMcLVpW3XwlMkUbYaIXM+5lhfGjw8xbGJw==", + "dependencies": { + "nanoid": "^5.0.5" + }, + "peerDependencies": { + "svelte": "^4.0.0", + "sveltekit-superforms": "^2.3.0" + } + }, + "node_modules/formsnap/node_modules/nanoid": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.6.tgz", + "integrity": "sha512-rRq0eMHoGZxlvaFOUdK1Ev83Bd1IgzzR+WJ3IbDJ7QOSdAxYjlurSPqFs9s4lJg29RT6nPwizFtJhQS6V5xgiA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } + }, "node_modules/fraction.js": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", @@ -4597,14 +4791,12 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -4617,8 +4809,7 @@ "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "node_modules/gauge": { "version": "3.0.2", @@ -4703,7 +4894,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -4729,8 +4919,7 @@ "node_modules/globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", - "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", - "dev": true + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==" }, "node_modules/globby": { "version": "11.1.0", @@ -4755,14 +4944,13 @@ "node_modules/globrex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", - "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", - "dev": true + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==" }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "devOptional": true }, "node_modules/graphemer": { "version": "1.4.0", @@ -4774,7 +4962,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -4869,7 +5056,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, + "devOptional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -4910,7 +5097,6 @@ "version": "0.5.5", "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", - "dev": true, "optional": true, "bin": { "image-size": "bin/image-size.js" @@ -4923,7 +5109,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", - "dev": true + "devOptional": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -4945,7 +5131,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz", "integrity": "sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==", - "dev": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -4973,7 +5158,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -4982,8 +5166,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/inquirer": { "version": "8.2.6", @@ -5035,7 +5218,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -5047,7 +5229,6 @@ "version": "2.12.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", - "dev": true, "dependencies": { "has": "^1.0.3" }, @@ -5074,7 +5255,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -5092,7 +5272,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -5113,7 +5292,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, "engines": { "node": ">=0.12.0" } @@ -5149,7 +5327,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", - "dev": true, "dependencies": { "@types/estree": "*" } @@ -5182,7 +5359,7 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", - "dev": true + "devOptional": true }, "node_modules/is-wsl": { "version": "2.2.0", @@ -5443,11 +5620,23 @@ "version": "1.21.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", - "dev": true, "bin": { "jiti": "bin/jiti.js" } }, + "node_modules/joi": { + "version": "17.12.2", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.2.tgz", + "integrity": "sha512-RonXAIzCiHLc8ss3Ibuz45u28GOsWE1UpfDXLbN/9NKbL4tCJf8TWYVKsoYuuh+sAUt7fsSNpA+r2+TBA6Wjmw==", + "optional": true, + "dependencies": { + "@hapi/hoek": "^9.3.0", + "@hapi/topo": "^5.1.0", + "@sideway/address": "^4.1.5", + "@sideway/formula": "^3.0.1", + "@sideway/pinpoint": "^2.0.0" + } + }, "node_modules/jose": { "version": "4.15.4", "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.4.tgz", @@ -5637,11 +5826,15 @@ "node": ">= 10.0.0" } }, + "node_modules/just-clone": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/just-clone/-/just-clone-6.2.0.tgz", + "integrity": "sha512-1IynUYEc/HAwxhi3WDpIpxJbZpMCvvrrmZVqvj9EhpvbH8lls7HhdhiByjL7DkAaWlLIzpC0Xc/VPvy/UxLNjA==" + }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "dev": true, "engines": { "node": ">=6" } @@ -5656,7 +5849,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/less/-/less-4.2.0.tgz", "integrity": "sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==", - "dev": true, + "devOptional": true, "dependencies": { "copy-anything": "^2.0.1", "parse-node-version": "^1.0.1", @@ -5682,7 +5875,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, "optional": true, "dependencies": { "pify": "^4.0.1", @@ -5696,7 +5888,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, "optional": true, "engines": { "node": ">=6" @@ -5706,7 +5897,6 @@ "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, "optional": true, "bin": { "semver": "bin/semver" @@ -5729,7 +5919,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "dev": true, "engines": { "node": ">=10" } @@ -5737,8 +5926,7 @@ "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "node_modules/local-pkg": { "version": "0.5.0", @@ -5759,8 +5947,7 @@ "node_modules/locate-character": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", - "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", - "dev": true + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==" }, "node_modules/locate-path": { "version": "6.0.0", @@ -5826,6 +6013,14 @@ "node": ">=10" } }, + "node_modules/lucide-svelte": { + "version": "0.349.0", + "resolved": "https://registry.npmjs.org/lucide-svelte/-/lucide-svelte-0.349.0.tgz", + "integrity": "sha512-aOtTEE3Bm1voDCDUaEBqF5ZKLDzUHQtCo6xgSHrjivBETzSA0KLAhUFuug9n685vnYODtbkdlO3xn+zpQiFoYg==", + "peerDependencies": { + "svelte": "^3 || ^4 || ^5.0.0-next.42" + } + }, "node_modules/lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", @@ -5836,7 +6031,6 @@ "version": "0.30.5", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", - "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, @@ -5892,8 +6086,12 @@ "node_modules/mdn-data": { "version": "2.0.30", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", - "dev": true + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" + }, + "node_modules/memoize-weak": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/memoize-weak/-/memoize-weak-1.0.2.tgz", + "integrity": "sha512-gj39xkrjEw7nCn4nJ1M5ms6+MyMlyiGmttzsqAUsAKn6bYKwuTHh/AO3cKPF8IBrTIYTxb0wWXFs3E//Y8VoWQ==" }, "node_modules/merge-stream": { "version": "2.0.0", @@ -5905,7 +6103,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, "engines": { "node": ">= 8" } @@ -5914,7 +6111,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -5927,7 +6123,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, "optional": true, "bin": { "mime": "cli.js" @@ -5991,7 +6186,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -6066,11 +6260,18 @@ "ufo": "^1.3.0" } }, + "node_modules/mode-watcher": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/mode-watcher/-/mode-watcher-0.2.2.tgz", + "integrity": "sha512-QjkHQL9pXrr7Vb0P3WbOWAF8mv1Q6jEwUZ5GUyCnI9eEoXH234zuaOGChUF7ZQtjxwtmXDzKFSW/36TvLDg1/A==", + "peerDependencies": { + "svelte": "^4.0.0" + } + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "dev": true, "engines": { "node": ">=4" } @@ -6079,7 +6280,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", - "dev": true, "engines": { "node": ">=10" } @@ -6087,8 +6287,7 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/mute-stream": { "version": "0.0.8", @@ -6100,7 +6299,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", @@ -6111,7 +6309,6 @@ "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, "funding": [ { "type": "github", @@ -6144,7 +6341,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/needle/-/needle-3.3.1.tgz", "integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==", - "dev": true, "optional": true, "dependencies": { "iconv-lite": "^0.6.3", @@ -6219,7 +6415,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -6233,6 +6428,18 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-url": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz", + "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==", + "optional": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/npm-run-path": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", @@ -6282,7 +6489,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -6291,7 +6497,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true, "engines": { "node": ">= 6" } @@ -6315,7 +6520,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "dependencies": { "wrappy": "1" } @@ -6439,7 +6643,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.10" } @@ -6479,7 +6683,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -6496,8 +6699,7 @@ "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-type": { "version": "4.0.0", @@ -6527,7 +6729,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", - "dev": true, "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^3.0.0", @@ -6538,7 +6739,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, "dependencies": { "@types/estree": "^1.0.0" } @@ -6546,14 +6746,12 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, "engines": { "node": ">=8.6" }, @@ -6565,7 +6763,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -6574,7 +6771,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "dev": true, "engines": { "node": ">= 6" } @@ -6624,7 +6820,6 @@ "version": "8.4.35", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", - "dev": true, "funding": [ { "type": "opencollective", @@ -6652,7 +6847,6 @@ "version": "15.1.0", "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, "dependencies": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", @@ -6669,7 +6863,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "dev": true, "dependencies": { "camelcase-css": "^2.0.1" }, @@ -6732,7 +6925,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", - "dev": true, "dependencies": { "postcss-selector-parser": "^6.0.11" }, @@ -6793,7 +6985,6 @@ "version": "6.0.12", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.12.tgz", "integrity": "sha512-NdxGCAZdRrwVI1sy59+Wzrh+pMMHxapGnpfenDVlMEXoOcvt4pGE0JLK9YY2F5dLxcFYA/YbVQKhcGU+FtSYQg==", - "dev": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -6805,8 +6996,7 @@ "node_modules/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/prelude-ls": { "version": "1.2.1", @@ -6868,11 +7058,16 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/property-expr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.6.tgz", + "integrity": "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA==", + "optional": true + }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", - "dev": true, "optional": true }, "node_modules/psl": { @@ -6900,7 +7095,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, "funding": [ { "type": "github", @@ -6936,7 +7130,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, "dependencies": { "pify": "^2.3.0" } @@ -6959,7 +7152,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -6979,8 +7171,7 @@ "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/requires-port": { "version": "1.0.0", @@ -6992,7 +7183,6 @@ "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, "dependencies": { "is-core-module": "^2.11.0", "path-parse": "^1.0.7", @@ -7055,7 +7245,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -7080,7 +7269,6 @@ "version": "4.9.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.0.tgz", "integrity": "sha512-bUHW/9N21z64gw8s6tP4c88P382Bq/L5uZDowHlHx6s/QWpjJXivIAbEw6LZthgSvlEizZBfLC4OAvWe7aoF7A==", - "dev": true, "bin": { "rollup": "dist/bin/rollup" }, @@ -7124,7 +7312,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, "funding": [ { "type": "github", @@ -7156,7 +7343,6 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", - "dev": true, "dependencies": { "mri": "^1.1.0" }, @@ -7188,7 +7374,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "devOptional": true }, "node_modules/sander": { "version": "0.5.1", @@ -7218,7 +7404,7 @@ "version": "1.71.0", "resolved": "https://registry.npmjs.org/sass/-/sass-1.71.0.tgz", "integrity": "sha512-HKKIKf49Vkxlrav3F/w6qRuPcmImGVbIXJ2I3Kg0VMA+3Bav+8yE9G5XmP5lMj6nl4OlqbPftGAscNaNu28b8w==", - "dev": true, + "devOptional": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -7235,7 +7421,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", - "dev": true, "optional": true }, "node_modules/saxes": { @@ -7280,8 +7465,7 @@ "node_modules/set-cookie-parser": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", - "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==", - "dev": true + "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==" }, "node_modules/shebang-command": { "version": "2.0.0", @@ -7341,7 +7525,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", - "dev": true, "dependencies": { "@polka/url": "^1.0.0-next.24", "mrmime": "^2.0.0", @@ -7396,7 +7579,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "optional": true, "engines": { "node": ">=0.10.0" @@ -7406,11 +7588,21 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "optional": true, + "peer": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -7543,7 +7735,6 @@ "version": "3.32.0", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.32.0.tgz", "integrity": "sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", @@ -7565,7 +7756,6 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -7620,6 +7810,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/superstruct": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.3.tgz", + "integrity": "sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==", + "optional": true, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7649,7 +7848,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -7661,7 +7859,6 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.11.tgz", "integrity": "sha512-YIQk3J4X89wOLhjsqIW8tqY3JHPuBdtdOIkASP2PZeAMcSW9RsIjQzMesCrxOF3gdWYC0mKknlKF7OqmLM+Zqg==", - "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.1", "@jridgewell/sourcemap-codec": "^1.4.15", @@ -7744,7 +7941,6 @@ "version": "0.15.3", "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz", "integrity": "sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==", - "dev": true, "engines": { "node": "^12.20 || ^14.13.1 || >= 16" }, @@ -7819,11 +8015,92 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, "dependencies": { "@types/estree": "^1.0.0" } }, + "node_modules/sveltekit-superforms": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/sveltekit-superforms/-/sveltekit-superforms-2.8.0.tgz", + "integrity": "sha512-Ac3GlnVOjZ6q4m6+1xcPEznJsoet4tNn3FqbgZ83UJP5O/io4fWXioGFDztuZXmIDPeaBoAx22A0TMmS61pCxA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ciscoheat" + }, + { + "type": "ko-fi", + "url": "https://ko-fi.com/ciscoheat" + }, + { + "type": "paypal", + "url": "https://www.paypal.com/donate/?hosted_button_id=NY7F5ALHHSVQS" + } + ], + "dependencies": { + "devalue": "^4.3.2", + "just-clone": "^6.2.0", + "memoize-weak": "^1.0.2", + "ts-deepmerge": "^7.0.0" + }, + "optionalDependencies": { + "@gcornut/valibot-json-schema": "^0.0.25", + "@sinclair/typebox": "^0.32.15", + "@sodaru/yup-to-json-schema": "^2.0.1", + "@vinejs/vine": "^1.7.1", + "arktype": "1.0.29-alpha", + "joi": "^17.12.2", + "superstruct": "^1.0.3", + "valibot": "^0.29.0", + "yup": "^1.3.3", + "zod": "^3.22.4", + "zod-to-json-schema": "^3.22.4" + }, + "peerDependencies": { + "@sinclair/typebox": ">=0.32.13 <1", + "@sveltejs/kit": "1.x || 2.x", + "@vinejs/vine": "^1.7.1", + "arktype": "1.0.29-alpha", + "joi": "^17.12.1", + "superstruct": "^1.0.3", + "svelte": "3.x || 4.x || >=5.0.0-next.51", + "valibot": ">=0.28.1 <1", + "yup": "^1.3.3", + "zod": "^3.22.4" + }, + "peerDependenciesMeta": { + "@sinclair/typebox": { + "optional": true + }, + "@vinejs/vine": { + "optional": true + }, + "arktype": { + "optional": true + }, + "joi": { + "optional": true + }, + "superstruct": { + "optional": true + }, + "valibot": { + "optional": true + }, + "yup": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, + "node_modules/sveltekit-superforms/node_modules/@sinclair/typebox": { + "version": "0.32.15", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.32.15.tgz", + "integrity": "sha512-5Lrwo7VOiWEBJBhHmqNmf3TPB9ll8gcEshvYJyAIJyCZ2PF48MFOtiDHJNj8+FsNcqImaQYmxVkKBCBlyAa/wg==", + "optional": true + }, "node_modules/svg.draggable.js": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz", @@ -7921,11 +8198,15 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "node_modules/tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==" + }, "node_modules/tailwind-merge": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.2.1.tgz", "integrity": "sha512-o+2GTLkthfa5YUt4JxPfzMIpQzZ3adD1vLVkvKE1Twl9UAhGsEbIZhHHZVRttyW177S8PDJI3bTQNaebyofK3Q==", - "dev": true, "dependencies": { "@babel/runtime": "^7.23.7" }, @@ -7934,11 +8215,25 @@ "url": "https://github.com/sponsors/dcastil" } }, + "node_modules/tailwind-variants": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/tailwind-variants/-/tailwind-variants-0.2.0.tgz", + "integrity": "sha512-EuW5Sic7c0tzp+p5rJwAgb7398Jb0hi4zkyCstOoZPW0DWwr+EWkNtnZYEo5CjgE1tazHUzyt4oIhss64UXRVA==", + "dependencies": { + "tailwind-merge": "^2.2.0" + }, + "engines": { + "node": ">=16.x", + "pnpm": ">=7.x" + }, + "peerDependencies": { + "tailwindcss": "*" + } + }, "node_modules/tailwindcss": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", - "dev": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -7975,7 +8270,6 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -8010,7 +8304,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", - "dev": true, "engines": { "node": ">=14" } @@ -8068,7 +8361,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, "dependencies": { "any-promise": "^1.0.0" } @@ -8077,7 +8369,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, "dependencies": { "thenify": ">= 3.1.0 < 4" }, @@ -8109,11 +8400,16 @@ "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, + "node_modules/tiny-case": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-case/-/tiny-case-1.0.3.tgz", + "integrity": "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q==", + "optional": true + }, "node_modules/tiny-glob": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", - "dev": true, "dependencies": { "globalyzer": "0.1.0", "globrex": "^0.1.2" @@ -8184,7 +8480,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -8192,11 +8487,16 @@ "node": ">=8.0" } }, + "node_modules/toposort": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", + "integrity": "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==", + "optional": true + }, "node_modules/totalist": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", - "dev": true, "engines": { "node": ">=6" } @@ -8243,11 +8543,18 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-deepmerge": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ts-deepmerge/-/ts-deepmerge-7.0.0.tgz", + "integrity": "sha512-WZ/iAJrKDhdINv1WG6KZIGHrZDar6VfhftG1QJFpVbOYZMYJLJOvZOo1amictRXVdBXZIgBHKswMTXzElngprA==", + "engines": { + "node": ">=14.13.1" + } + }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" }, "node_modules/ts-to-zod": { "version": "3.7.0", @@ -8294,8 +8601,7 @@ "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -8476,14 +8782,27 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/valibot": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/valibot/-/valibot-0.29.0.tgz", + "integrity": "sha512-JhZn08lwZPhAamOCfBwBkv/btQt4KeQhekULPH8crH053zUCLSOGEF2zKExu3bFf245tsj6J1dY0ysd/jUiMIQ==", + "optional": true + }, + "node_modules/validator": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "optional": true, + "engines": { + "node": ">= 0.10" + } }, "node_modules/vite": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.3.tgz", "integrity": "sha512-UfmUD36DKkqhi/F75RrxvPpry+9+tTkrXfMNZD+SboZqBCMsxKtO52XeGzzuh7ioz+Eo/SYDBbdb0Z7vgcDJew==", - "dev": true, "dependencies": { "esbuild": "^0.19.3", "postcss": "^8.4.35", @@ -8560,7 +8879,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -8574,7 +8892,6 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz", "integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==", - "dev": true, "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" }, @@ -8806,8 +9123,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/write-file-atomic": { "version": "4.0.2", @@ -8868,7 +9184,6 @@ "version": "2.3.4", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", - "dev": true, "engines": { "node": ">= 14" } @@ -8885,14 +9200,57 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/yup": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/yup/-/yup-1.4.0.tgz", + "integrity": "sha512-wPbgkJRCqIf+OHyiTBQoJiP5PFuAXaWiJK6AmYkzQAh5/c2K9hzSApBZG5wV9KoKSePF7sAxmNSvh/13YHkFDg==", + "optional": true, + "dependencies": { + "property-expr": "^2.0.5", + "tiny-case": "^1.0.3", + "toposort": "^2.0.2", + "type-fest": "^2.19.0" + } + }, + "node_modules/yup/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "optional": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zod": { "version": "3.22.4", "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", - "dev": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } + }, + "node_modules/zod-to-json-schema": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.22.4.tgz", + "integrity": "sha512-2Ed5dJ+n/O3cU383xSY28cuVi0BCQhF8nYqWU5paEpl7fVdqdAmiLdqLyfblbNdfOFwFfi/mqU4O1pwc60iBhQ==", + "optional": true, + "peerDependencies": { + "zod": "^3.22.4" + } + }, + "node_modules/zod-validation-error": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.0.3.tgz", + "integrity": "sha512-cETTrcMq3Ze58vhdR0zD37uJm/694I6mAxcf/ei5bl89cC++fBNxrC2z8lkFze/8hVMPwrbtrwXHR2LB50fpHw==", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "zod": "^3.18.0" + } } } } diff --git a/package.json b/package.json index 5e0cc07..8b6a1db 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "devDependencies": { "@jest/globals": "^29.7.0", "@playwright/test": "^1.41.2", + "@supabase/auth-helpers-sveltekit": "^0.12.0", "@supabase/auth-ui-shared": "^0.1.8", "@supabase/auth-ui-svelte": "^0.2.9", "@supabase/ssr": "^0.1.0", @@ -55,9 +56,18 @@ "typescript": "^5.3.3", "vite": "^5.1.3", "vitest": "^1.3.1", - "zod": "^3.22.4", - "@supabase/auth-helpers-sveltekit": "^0.12.0" + "zod": "^3.22.4" }, "type": "module", - "dependencies": {} + "dependencies": { + "bits-ui": "^0.19.5", + "clsx": "^2.1.0", + "formsnap": "^0.5.1", + "lucide-svelte": "^0.349.0", + "mode-watcher": "^0.2.2", + "sveltekit-superforms": "^2.8.0", + "tailwind-merge": "^2.2.1", + "tailwind-variants": "^0.2.0", + "zod-validation-error": "^3.0.3" + } } diff --git a/src/app.d.ts b/src/app.d.ts index 37d6947..353d550 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -8,7 +8,7 @@ import type { teamsRowSchema, bracketsRowSchema, matchStateSchema -} from './types/schemas'; +} from '$schemas/supabase'; // See https://kit.svelte.dev/docs/types#app // for information about these interfaces diff --git a/src/app.postcss b/src/app.postcss index 1a7b7cf..6ff7062 100644 --- a/src/app.postcss +++ b/src/app.postcss @@ -1,4 +1,78 @@ -/* Write your global styles here, in PostCSS syntax */ @tailwind base; @tailwind components; @tailwind utilities; + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 72.2% 50.6%; + --destructive-foreground: 210 40% 98%; + + --ring: 222.2 84% 4.9%; + + --radius: 0.5rem; + } + + .dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 11.2%; + + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + + --ring: hsl(212.7,26.8%,83.9); + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} \ No newline at end of file diff --git a/src/components/Header.svelte b/src/components/Header.svelte index 8d49b52..1a33077 100644 --- a/src/components/Header.svelte +++ b/src/components/Header.svelte @@ -1,7 +1,10 @@
@@ -80,7 +81,15 @@ {/if}
  • - +
  • diff --git a/src/components/Settings.svelte b/src/components/Settings.svelte index ef767da..2308b43 100644 --- a/src/components/Settings.svelte +++ b/src/components/Settings.svelte @@ -2,14 +2,32 @@ import dayjs from 'dayjs'; import type { SvelteToastOptions } from '@zerodevx/svelte-toast/stores'; import { goto } from '$app/navigation'; - import { Input, Label, Button } from 'flowbite-svelte'; import { error, success } from '$lib/toast'; import type { HttpError } from '@sveltejs/kit'; - import { Select } from 'flowbite-svelte'; import { Event } from '$lib/event'; + import * as Form from '$components/ui/form'; + import { Input } from '$components/ui/input'; + import * as Select from '$components/ui/select'; + import SuperDebug, { type SuperValidated, type Infer, superForm } from 'sveltekit-superforms'; + import { zodClient } from 'sveltekit-superforms/adapters'; + import { formSchema, type FormSchema } from '$schemas/settingsSchema'; + export let data: SuperValidated>; export let tournament: Event; - export let event_id: number | string; + export let event_id: number | 'create'; + + const form = superForm(data, { + validators: zodClient(formSchema), + onUpdated: async ({ form: f }) => { + if (f.valid) { + success(`Tournament settings updated`); + } else { + error(f.message); + } + } + }); + + const { form: formData, enhance } = form; async function createNewEvent(): Promise { tournament.courts = Number(tournament.courts); @@ -29,22 +47,6 @@ }); } - async function updateTournament(): Promise { - tournament.courts = Number(tournament.courts); - tournament.pools = Number(tournament.pools); - - tournament - .update(tournament.id, tournament) - .then((res: Event) => { - tournament = res; - success(`Tournament settings updated`); - }) - .catch((err) => { - console.error(err); - error(err.body?.message ?? `Something went wrong: ${err}`); - }); - } - async function deleteEvent(): Promise { tournament .delete() @@ -60,19 +62,77 @@ $: tournament?.date, (tournament.date = dayjs(tournament?.date).format('YYYY-MM-DD')); -
    +
    + + + Name + + + This is your public display name for your event. + + + + + + Submit +
    + + diff --git a/src/components/ui/button/button.svelte b/src/components/ui/button/button.svelte new file mode 100644 index 0000000..fb61a87 --- /dev/null +++ b/src/components/ui/button/button.svelte @@ -0,0 +1,25 @@ + + + + + diff --git a/src/components/ui/button/index.ts b/src/components/ui/button/index.ts new file mode 100644 index 0000000..cfb5560 --- /dev/null +++ b/src/components/ui/button/index.ts @@ -0,0 +1,49 @@ +import Root from "./button.svelte"; +import { tv, type VariantProps } from "tailwind-variants"; +import type { Button as ButtonPrimitive } from "bits-ui"; + +const buttonVariants = tv({ + base: "inline-flex items-center justify-center rounded-md text-sm font-medium whitespace-nowrap ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", + outline: + "border border-input bg-background hover:bg-accent hover:text-accent-foreground", + secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-10 px-4 py-2", + sm: "h-9 rounded-md px-3", + lg: "h-11 rounded-md px-8", + icon: "h-10 w-10", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, +}); + +type Variant = VariantProps["variant"]; +type Size = VariantProps["size"]; + +type Props = ButtonPrimitive.Props & { + variant?: Variant; + size?: Size; +}; + +type Events = ButtonPrimitive.Events; + +export { + Root, + type Props, + type Events, + // + Root as Button, + type Props as ButtonProps, + type Events as ButtonEvents, + buttonVariants, +}; diff --git a/src/components/ui/form/form-button.svelte b/src/components/ui/form/form-button.svelte new file mode 100644 index 0000000..456348f --- /dev/null +++ b/src/components/ui/form/form-button.svelte @@ -0,0 +1,9 @@ + + + + + diff --git a/src/components/ui/form/form-description.svelte b/src/components/ui/form/form-description.svelte new file mode 100644 index 0000000..b404729 --- /dev/null +++ b/src/components/ui/form/form-description.svelte @@ -0,0 +1,17 @@ + + + + + diff --git a/src/components/ui/form/form-element-field.svelte b/src/components/ui/form/form-element-field.svelte new file mode 100644 index 0000000..72d024a --- /dev/null +++ b/src/components/ui/form/form-element-field.svelte @@ -0,0 +1,26 @@ + + + + + +
    + +
    +
    diff --git a/src/components/ui/form/form-field-errors.svelte b/src/components/ui/form/form-field-errors.svelte new file mode 100644 index 0000000..00fdbec --- /dev/null +++ b/src/components/ui/form/form-field-errors.svelte @@ -0,0 +1,26 @@ + + + + + {#each errors as error} +
    {error}
    + {/each} +
    +
    diff --git a/src/components/ui/form/form-field.svelte b/src/components/ui/form/form-field.svelte new file mode 100644 index 0000000..745f87c --- /dev/null +++ b/src/components/ui/form/form-field.svelte @@ -0,0 +1,26 @@ + + + + + +
    + +
    +
    diff --git a/src/components/ui/form/form-fieldset.svelte b/src/components/ui/form/form-fieldset.svelte new file mode 100644 index 0000000..6d35255 --- /dev/null +++ b/src/components/ui/form/form-fieldset.svelte @@ -0,0 +1,31 @@ + + + + + + + diff --git a/src/components/ui/form/form-label.svelte b/src/components/ui/form/form-label.svelte new file mode 100644 index 0000000..4405a37 --- /dev/null +++ b/src/components/ui/form/form-label.svelte @@ -0,0 +1,17 @@ + + + diff --git a/src/components/ui/form/form-legend.svelte b/src/components/ui/form/form-legend.svelte new file mode 100644 index 0000000..9026f17 --- /dev/null +++ b/src/components/ui/form/form-legend.svelte @@ -0,0 +1,17 @@ + + + + + diff --git a/src/components/ui/form/index.ts b/src/components/ui/form/index.ts new file mode 100644 index 0000000..0713927 --- /dev/null +++ b/src/components/ui/form/index.ts @@ -0,0 +1,33 @@ +import * as FormPrimitive from "formsnap"; +import Description from "./form-description.svelte"; +import Label from "./form-label.svelte"; +import FieldErrors from "./form-field-errors.svelte"; +import Field from "./form-field.svelte"; +import Fieldset from "./form-fieldset.svelte"; +import Legend from "./form-legend.svelte"; +import ElementField from "./form-element-field.svelte"; +import Button from "./form-button.svelte"; + +const Control = FormPrimitive.Control; + +export { + Field, + Control, + Label, + Button, + FieldErrors, + Description, + Fieldset, + Legend, + ElementField, + // + Field as FormField, + Control as FormControl, + Description as FormDescription, + Label as FormLabel, + FieldErrors as FormFieldErrors, + Fieldset as FormFieldset, + Legend as FormLegend, + ElementField as FormElementField, + Button as FormButton, +}; diff --git a/src/components/ui/input/index.ts b/src/components/ui/input/index.ts new file mode 100644 index 0000000..859f3b0 --- /dev/null +++ b/src/components/ui/input/index.ts @@ -0,0 +1,27 @@ +import Root from "./input.svelte"; + +export type FormInputEvent = T & { + currentTarget: EventTarget & HTMLInputElement; +}; +export type InputEvents = { + blur: FormInputEvent; + change: FormInputEvent; + click: FormInputEvent; + focus: FormInputEvent; + focusin: FormInputEvent; + focusout: FormInputEvent; + keydown: FormInputEvent; + keypress: FormInputEvent; + keyup: FormInputEvent; + mouseover: FormInputEvent; + mouseenter: FormInputEvent; + mouseleave: FormInputEvent; + paste: FormInputEvent; + input: FormInputEvent; +}; + +export { + Root, + // + Root as Input, +}; diff --git a/src/components/ui/input/input.svelte b/src/components/ui/input/input.svelte new file mode 100644 index 0000000..c479fbe --- /dev/null +++ b/src/components/ui/input/input.svelte @@ -0,0 +1,35 @@ + + + diff --git a/src/components/ui/label/index.ts b/src/components/ui/label/index.ts new file mode 100644 index 0000000..8bfca0b --- /dev/null +++ b/src/components/ui/label/index.ts @@ -0,0 +1,7 @@ +import Root from "./label.svelte"; + +export { + Root, + // + Root as Label, +}; diff --git a/src/components/ui/label/label.svelte b/src/components/ui/label/label.svelte new file mode 100644 index 0000000..264c8fd --- /dev/null +++ b/src/components/ui/label/label.svelte @@ -0,0 +1,21 @@ + + + + + diff --git a/src/components/ui/select/index.ts b/src/components/ui/select/index.ts new file mode 100644 index 0000000..327541c --- /dev/null +++ b/src/components/ui/select/index.ts @@ -0,0 +1,34 @@ +import { Select as SelectPrimitive } from "bits-ui"; + +import Label from "./select-label.svelte"; +import Item from "./select-item.svelte"; +import Content from "./select-content.svelte"; +import Trigger from "./select-trigger.svelte"; +import Separator from "./select-separator.svelte"; + +const Root = SelectPrimitive.Root; +const Group = SelectPrimitive.Group; +const Input = SelectPrimitive.Input; +const Value = SelectPrimitive.Value; + +export { + Root, + Group, + Input, + Label, + Item, + Value, + Content, + Trigger, + Separator, + // + Root as Select, + Group as SelectGroup, + Input as SelectInput, + Label as SelectLabel, + Item as SelectItem, + Value as SelectValue, + Content as SelectContent, + Trigger as SelectTrigger, + Separator as SelectSeparator, +}; diff --git a/src/components/ui/select/select-content.svelte b/src/components/ui/select/select-content.svelte new file mode 100644 index 0000000..a07dc3a --- /dev/null +++ b/src/components/ui/select/select-content.svelte @@ -0,0 +1,39 @@ + + + +
    + +
    +
    diff --git a/src/components/ui/select/select-item.svelte b/src/components/ui/select/select-item.svelte new file mode 100644 index 0000000..80ef3ed --- /dev/null +++ b/src/components/ui/select/select-item.svelte @@ -0,0 +1,40 @@ + + + + + + + + + + {label ? label : value} + + diff --git a/src/components/ui/select/select-label.svelte b/src/components/ui/select/select-label.svelte new file mode 100644 index 0000000..2fd2be4 --- /dev/null +++ b/src/components/ui/select/select-label.svelte @@ -0,0 +1,16 @@ + + + + + diff --git a/src/components/ui/select/select-separator.svelte b/src/components/ui/select/select-separator.svelte new file mode 100644 index 0000000..42e312c --- /dev/null +++ b/src/components/ui/select/select-separator.svelte @@ -0,0 +1,11 @@ + + + diff --git a/src/components/ui/select/select-trigger.svelte b/src/components/ui/select/select-trigger.svelte new file mode 100644 index 0000000..992c420 --- /dev/null +++ b/src/components/ui/select/select-trigger.svelte @@ -0,0 +1,27 @@ + + +span]:line-clamp-1", + className + )} + {...$$restProps} + let:builder + on:click + on:keydown +> + +
    + +
    +
    diff --git a/src/lib/database/event.ts b/src/lib/database/event.ts index 8a1c09a..defa130 100644 --- a/src/lib/database/event.ts +++ b/src/lib/database/event.ts @@ -2,6 +2,8 @@ import { SupabaseDatabaseService } from '$lib/database/supabaseDatabaseService'; import type { PostgrestResponse, PostgrestSingleResponse } from '@supabase/supabase-js'; import { z } from 'zod'; import { eventsRowSchema, eventsUpdateSchema } from '../../types/schemas'; +import type { FormSchema } from '$schemas/settingsSchema'; +import type { Infer } from 'sveltekit-superforms'; const EventsRowSchemaArray = z.array(eventsRowSchema); diff --git a/src/lib/event.ts b/src/lib/event.ts index cb49fcd..bb6f071 100644 --- a/src/lib/event.ts +++ b/src/lib/event.ts @@ -1,5 +1,7 @@ import type { EventSupabaseDatabaseService } from '$lib/database/event'; +import type { Infer, SuperValidated } from 'sveltekit-superforms'; import { Base } from './base'; +import type { FormSchema } from '$schemas/settingsSchema'; /** * The Tournament class represents a tournament in the application. @@ -76,7 +78,7 @@ export class Event extends Base { * @returns {Promise} - Returns a promise that resolves to the updated tournament. * @throws {Error} - Throws an error if there's an issue updating the tournament. */ - async update(id: number, input: Event): Promise { + async update(id: number, input: Infer): Promise { const res: EventRow | null = await this.databaseService.updateEvent(id, input); if (res !== null) { diff --git a/src/lib/utils.ts b/src/lib/utils.ts new file mode 100644 index 0000000..eba19d8 --- /dev/null +++ b/src/lib/utils.ts @@ -0,0 +1,56 @@ +import { type ClassValue, clsx } from 'clsx'; +import { twMerge } from 'tailwind-merge'; +import { cubicOut } from 'svelte/easing'; +import type { TransitionConfig } from 'svelte/transition'; + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)); +} + +type FlyAndScaleParams = { + y?: number; + x?: number; + start?: number; + duration?: number; +}; + +export const flyAndScale = ( + node: Element, + params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 } +): TransitionConfig => { + const style = getComputedStyle(node); + const transform = style.transform === 'none' ? '' : style.transform; + + const scaleConversion = (valueA: number, scaleA: [number, number], scaleB: [number, number]) => { + const [minA, maxA] = scaleA; + const [minB, maxB] = scaleB; + + const percentage = (valueA - minA) / (maxA - minA); + const valueB = percentage * (maxB - minB) + minB; + + return valueB; + }; + + const styleToString = (style: Record): string => { + return Object.keys(style).reduce((str, key) => { + if (style[key] === undefined) return str; + return str + `${key}:${style[key]};`; + }, ''); + }; + + return { + duration: params.duration ?? 200, + delay: 0, + css: (t) => { + const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0]); + const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0]); + const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1]); + + return styleToString({ + transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`, + opacity: t + }); + }, + easing: cubicOut + }; +}; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 6919e2c..0bc5cfd 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -5,6 +5,7 @@ import Header from '$components/Header.svelte'; import Footer from '$components/Footer.svelte'; import { invalidate } from '$app/navigation'; + import { ModeWatcher } from 'mode-watcher'; import { onMount } from 'svelte'; import type { LayoutData } from './$types'; import { SvelteToast } from '@zerodevx/svelte-toast'; @@ -46,6 +47,7 @@ +
    diff --git a/src/routes/protected-routes/events/[slug]/+page.server.ts b/src/routes/protected-routes/events/[slug]/+page.server.ts new file mode 100644 index 0000000..f98339e --- /dev/null +++ b/src/routes/protected-routes/events/[slug]/+page.server.ts @@ -0,0 +1,51 @@ +import { superValidate } from 'sveltekit-superforms'; +import { formSchema as settingsSchema } from '$schemas/settingsSchema'; +import { zod } from 'sveltekit-superforms/adapters'; +import type { PageServerLoad, Actions } from './$types'; +import { fail } from '@sveltejs/kit'; +import { Event } from '$lib/event'; +import { EventSupabaseDatabaseService } from '$lib/database/event'; +import type { ZodError } from 'zod'; +import { fromZodError } from 'zod-validation-error'; + +export const load: PageServerLoad = async ({ params }) => { + return { + event_id: params.slug, + form: await superValidate(zod(settingsSchema)) + }; +}; + +export const actions: Actions = { + settings: async (event) => { + const form = await superValidate(event, zod(settingsSchema)); + if (!form.valid) { + return fail(400, { + form + }); + } + + const event_id = event.params.slug as unknown as number; + + const eventSupabaseDatabaseService = new EventSupabaseDatabaseService(event.locals.supabase); + let tournament = new Event(event_id, eventSupabaseDatabaseService); + tournament.id = Number(tournament.id); + + try { + await tournament.update(Number(event_id), tournament); + + return { + form + }; + } catch (error) { + form.valid = false; + + const validationError = fromZodError(error); + + form.message = validationError.message; + + return fail(400, { + form + }); + } + } +}; diff --git a/src/routes/protected-routes/events/[slug]/+page.svelte b/src/routes/protected-routes/events/[slug]/+page.svelte index dc35552..61729ae 100644 --- a/src/routes/protected-routes/events/[slug]/+page.svelte +++ b/src/routes/protected-routes/events/[slug]/+page.svelte @@ -13,7 +13,7 @@ import { initiateEvent } from '$lib/helper'; export let data: PageData; - let { supabase, event_id } = data; + let { supabase, event_id, form } = data; let { tournament, matches, teams, bracket } = initiateEvent(event_id, supabase); @@ -60,7 +60,7 @@
    {:then} - +
    {#if data?.event_id !== 'create' && tournament} diff --git a/src/routes/protected-routes/events/[slug]/+page.ts b/src/routes/protected-routes/events/[slug]/+page.ts index 3a6df6d..ec5bebe 100644 --- a/src/routes/protected-routes/events/[slug]/+page.ts +++ b/src/routes/protected-routes/events/[slug]/+page.ts @@ -1,6 +1,30 @@ import type { PageLoad } from './$types'; +import { Event } from '$lib/event'; +import { EventSupabaseDatabaseService } from '$lib/database/event'; +import { superValidate, type Infer, type SuperValidated } from 'sveltekit-superforms'; +import { formSchema as settingsSchema, type FormSchema } from '$schemas/settingsSchema'; +import { zod } from 'sveltekit-superforms/adapters'; -// src/routes/events/+page.server.ts -export const load: PageLoad = async ({ params }) => { - return { event_id: params.slug }; +export const load: PageLoad = async ({ params, parent }) => { + const { supabase } = await parent(); + + const eventSupabaseDatabaseService = new EventSupabaseDatabaseService(supabase); + let tournament = new Event(params.slug as unknown as number, eventSupabaseDatabaseService); + await tournament.load().catch((error) => { + console.error('Failed to load event:', error); + }); + + const form: SuperValidated> = await superValidate( + { + name: tournament.name + // courts: tournament.courts, + // pools: tournament.pools, + // ref: tournament.refs + // eventDate: tournament.date, + // eventScoring: tournament.scoring + }, + zod(settingsSchema) + ); + + return { event_id: params.slug, form }; }; diff --git a/src/schemas/settingsSchema.ts b/src/schemas/settingsSchema.ts new file mode 100644 index 0000000..6dd7158 --- /dev/null +++ b/src/schemas/settingsSchema.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; + +export const formSchema = z.object({ + name: z.string().refine((v) => v, { message: 'A event name is required.' }) + // courts: z.number().refine((v) => v, { message: 'A number of courts is required.' }), + // pools: z.number().refine((v) => v, { message: 'A number of pools is required.' }), + // ref: z.string().refine((v) => v, { message: 'A ref type is required.' }) + // date: z.string().refine((v) => v, { message: 'A date is required.' }), + // scoring: z.string().refine((v) => v, { message: 'A scoring type is required.' }) +}); + +export type FormSchema = typeof formSchema; diff --git a/src/schemas/supabase.ts b/src/schemas/supabase.ts new file mode 100644 index 0000000..c182b93 --- /dev/null +++ b/src/schemas/supabase.ts @@ -0,0 +1,131 @@ +// Generated by ts-to-zod +import { z } from 'zod'; +import type { Json } from './../types/supabase'; + +export const jsonSchema: z.ZodSchema = z.lazy(() => + z + .union([ + z.string(), + z.number(), + z.boolean(), + z.record(z.union([jsonSchema, z.undefined()])), + z.array(jsonSchema) + ]) + .nullable() +); + +export const eventsRowSchema = z.object({ + courts: z.number().nullable(), + created_at: z.string(), + date: z.string().nullable(), + id: z.number(), + name: z.string(), + owner: z.string(), + pools: z.number().nullable(), + refs: z.string().nullable(), + scoring: z.string().nullable() +}); + +export const eventsInsertSchema = z.object({ + courts: z.number().optional().nullable(), + created_at: z.string().optional(), + date: z.string().optional().nullable(), + id: z.number().optional(), + name: z.string(), + owner: z.string(), + pools: z.number().optional().nullable(), + refs: z.string().optional().nullable(), + scoring: z.string().optional().nullable() +}); + +export const eventsUpdateSchema = z.object({ + courts: z.number().optional().nullable(), + created_at: z.string().optional(), + date: z.string().optional().nullable(), + id: z.number().optional(), + name: z.string().optional(), + owner: z.string().optional(), + pools: z.number().optional().nullable(), + refs: z.string().optional().nullable(), + scoring: z.string().optional().nullable() +}); + +export const matchStateSchema = z.union([z.literal('COMPLETE'), z.literal('INCOMPLETE')]); + +export const matchesInsertSchema = z.object({ + child_id: z.number().optional().nullable(), + court: z.number().optional(), + created_at: z.string().optional(), + event_id: z.number(), + id: z.number().optional(), + ref: z.number().optional().nullable(), + round: z.number().optional(), + state: matchStateSchema.optional(), + team1: z.number().optional().nullable(), + team1_score: z.number().optional().nullable(), + team2: z.number().optional().nullable(), + team2_score: z.number().optional().nullable(), + type: z.string().optional() +}); + +export const matchesUpdateSchema = z.object({ + child_id: z.number().optional().nullable(), + court: z.number().optional(), + created_at: z.string().optional(), + event_id: z.number().optional(), + id: z.number().optional(), + ref: z.number().optional().nullable(), + round: z.number().optional(), + state: matchStateSchema.optional(), + team1: z.number().optional().nullable(), + team1_score: z.number().optional().nullable(), + team2: z.number().optional().nullable(), + team2_score: z.number().optional().nullable(), + type: z.string().optional() +}); + +export const teamsRowSchema = z.object({ + created_at: z.string().nullable(), + event_id: z.number().nullable(), + id: z.number(), + name: z.string(), + state: z.string().nullable() +}); + +export const teamsInsertSchema = z.object({ + created_at: z.string().optional().nullable(), + event_id: z.number().optional().nullable(), + id: z.number().optional(), + name: z.string(), + state: z.string().optional().nullable() +}); + +export const teamsUpdateSchema = z.object({ + created_at: z.string().optional().nullable(), + event_id: z.number().optional().nullable(), + id: z.number().optional(), + name: z.string().optional(), + state: z.string().optional().nullable() +}); + +export const stageTypeSchema = z.union([ + z.literal('ROUND_ROBIN'), + z.literal('SINGLE_ELIMINATION'), + z.literal('DOUBLE_ELIMINATION') +]); + +export const matchesRowSchema = z.object({ + child_id: z.number().nullable(), + court: z.number(), + created_at: z.string(), + event_id: z.number(), + id: z.number(), + ref: z.number().nullable(), + round: z.number(), + state: matchStateSchema, + team1: z.number().nullable(), + team1_score: z.number().nullable(), + team2: z.number().nullable(), + team2_score: z.number().nullable(), + type: z.string() +}); diff --git a/svelte.config.js b/svelte.config.js index 22dc7bc..65c6843 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -19,7 +19,8 @@ const config = { alias: { $lib: path.resolve('src/lib'), $components: path.resolve('src/components'), - $supabaseTypes: path.resolve('src/types/supabase') + $supabaseTypes: path.resolve('src/types/supabase'), + $schemas: path.resolve('src/schemas'), } } }; diff --git a/tailwind.config.js b/tailwind.config.js index 1fe9e81..8d260d9 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,33 +1,64 @@ +import { fontFamily } from "tailwindcss/defaultTheme"; + /** @type {import('tailwindcss').Config} */ -export default { - plugins: [require('flowbite/plugin')], - darkMode: 'class', - content: [ - './src/**/*.{html,js,svelte,ts}', - './node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}' - ], +const config = { + darkMode: ["class"], + content: ["./src/**/*.{html,js,svelte,ts}"], + safelist: ["dark"], theme: { + container: { + center: true, + padding: "2rem", + screens: { + "2xl": "1400px" + } + }, extend: { colors: { - nord: { - 0: '#2E3440', - 1: '#3B4252', - 2: '#434C5E', - 3: '#4C566A', - 4: '#D8DEE9', - 5: '#E5E9F0', - 6: '#ECEFF4', - 7: '#8FBCBB', - 8: '#88C0D0', - 9: '#81A1C1', - 10: '#5E81AC', - 11: '#BF616A', - 12: '#D08770', - 13: '#EBCB8B', - 14: '#A3BE8C', - 15: '#B48EAD' + border: "hsl(var(--border) / )", + input: "hsl(var(--input) / )", + ring: "hsl(var(--ring) / )", + background: "hsl(var(--background) / )", + foreground: "hsl(var(--foreground) / )", + primary: { + DEFAULT: "hsl(var(--primary) / )", + foreground: "hsl(var(--primary-foreground) / )" + }, + secondary: { + DEFAULT: "hsl(var(--secondary) / )", + foreground: "hsl(var(--secondary-foreground) / )" + }, + destructive: { + DEFAULT: "hsl(var(--destructive) / )", + foreground: "hsl(var(--destructive-foreground) / )" + }, + muted: { + DEFAULT: "hsl(var(--muted) / )", + foreground: "hsl(var(--muted-foreground) / )" + }, + accent: { + DEFAULT: "hsl(var(--accent) / )", + foreground: "hsl(var(--accent-foreground) / )" + }, + popover: { + DEFAULT: "hsl(var(--popover) / )", + foreground: "hsl(var(--popover-foreground) / )" + }, + card: { + DEFAULT: "hsl(var(--card) / )", + foreground: "hsl(var(--card-foreground) / )" } + }, + borderRadius: { + lg: "var(--radius)", + md: "calc(var(--radius) - 2px)", + sm: "calc(var(--radius) - 4px)" + }, + fontFamily: { + sans: [...fontFamily.sans] } } - } + }, }; + +export default config; From af80c9e7c54a0358e6b1d21347b3ed9588f2a394 Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Sat, 9 Mar 2024 10:46:33 -0500 Subject: [PATCH 02/19] putting together --- package-lock.json | 1 + package.json | 1 + src/app.postcss | 144 ++--- src/components/Settings.svelte | 196 +++---- src/components/ui/button/index.ts | 43 +- .../ui/calendar/calendar-cell.svelte | 21 + .../ui/calendar/calendar-day.svelte | 42 ++ .../ui/calendar/calendar-grid-body.svelte | 13 + .../ui/calendar/calendar-grid-head.svelte | 13 + .../ui/calendar/calendar-grid-row.svelte | 13 + .../ui/calendar/calendar-grid.svelte | 13 + .../ui/calendar/calendar-head-cell.svelte | 16 + .../ui/calendar/calendar-header.svelte | 16 + .../ui/calendar/calendar-heading.svelte | 19 + .../ui/calendar/calendar-months.svelte | 16 + .../ui/calendar/calendar-next-button.svelte | 27 + .../ui/calendar/calendar-prev-button.svelte | 27 + src/components/ui/calendar/calendar.svelte | 59 ++ src/components/ui/calendar/index.ts | 30 ++ src/components/ui/form/form-button.svelte | 2 +- .../ui/form/form-description.svelte | 8 +- .../ui/form/form-element-field.svelte | 12 +- .../ui/form/form-field-errors.svelte | 10 +- src/components/ui/form/form-field.svelte | 12 +- src/components/ui/form/form-fieldset.svelte | 10 +- src/components/ui/form/form-label.svelte | 12 +- src/components/ui/form/form-legend.svelte | 8 +- src/components/ui/form/index.ts | 20 +- src/components/ui/input/index.ts | 4 +- src/components/ui/input/input.svelte | 12 +- src/components/ui/label/index.ts | 4 +- src/components/ui/label/label.svelte | 8 +- src/components/ui/popover/index.ts | 17 + .../ui/popover/popover-content.svelte | 22 + src/components/ui/select/index.ts | 14 +- .../ui/select/select-content.svelte | 22 +- src/components/ui/select/select-item.svelte | 16 +- src/components/ui/select/select-label.svelte | 8 +- .../ui/select/select-separator.svelte | 8 +- .../ui/select/select-trigger.svelte | 10 +- src/lib/brackets.ts | 2 +- src/lib/database/event.ts | 9 +- src/lib/database/matches.ts | 2 +- src/lib/database/teams.ts | 2 +- src/lib/event.ts | 15 +- .../protected-routes/dashboard/+page.svelte | 5 +- .../events/[slug]/+page.server.ts | 56 +- .../protected-routes/events/[slug]/+page.ts | 12 +- src/schemas/settingsSchema.ts | 15 +- src/types/schemas.ts | 134 ----- src/types/supabase.ts | 508 +++++++++--------- svelte.config.js | 2 +- tailwind.config.js | 58 +- 53 files changed, 993 insertions(+), 776 deletions(-) create mode 100644 src/components/ui/calendar/calendar-cell.svelte create mode 100644 src/components/ui/calendar/calendar-day.svelte create mode 100644 src/components/ui/calendar/calendar-grid-body.svelte create mode 100644 src/components/ui/calendar/calendar-grid-head.svelte create mode 100644 src/components/ui/calendar/calendar-grid-row.svelte create mode 100644 src/components/ui/calendar/calendar-grid.svelte create mode 100644 src/components/ui/calendar/calendar-head-cell.svelte create mode 100644 src/components/ui/calendar/calendar-header.svelte create mode 100644 src/components/ui/calendar/calendar-heading.svelte create mode 100644 src/components/ui/calendar/calendar-months.svelte create mode 100644 src/components/ui/calendar/calendar-next-button.svelte create mode 100644 src/components/ui/calendar/calendar-prev-button.svelte create mode 100644 src/components/ui/calendar/calendar.svelte create mode 100644 src/components/ui/calendar/index.ts create mode 100644 src/components/ui/popover/index.ts create mode 100644 src/components/ui/popover/popover-content.svelte delete mode 100644 src/types/schemas.ts diff --git a/package-lock.json b/package-lock.json index 62f5dd7..0f4d149 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "volleyman", "version": "0.0.1", "dependencies": { + "@internationalized/date": "^3.5.2", "bits-ui": "^0.19.5", "clsx": "^2.1.0", "formsnap": "^0.5.1", diff --git a/package.json b/package.json index 8b6a1db..eaa44af 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ }, "type": "module", "dependencies": { + "@internationalized/date": "^3.5.2", "bits-ui": "^0.19.5", "clsx": "^2.1.0", "formsnap": "^0.5.1", diff --git a/src/app.postcss b/src/app.postcss index 6ff7062..83f2661 100644 --- a/src/app.postcss +++ b/src/app.postcss @@ -1,78 +1,78 @@ @tailwind base; @tailwind components; @tailwind utilities; - + @layer base { - :root { - --background: 0 0% 100%; - --foreground: 222.2 84% 4.9%; - - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - - --popover: 0 0% 100%; - --popover-foreground: 222.2 84% 4.9%; - - --card: 0 0% 100%; - --card-foreground: 222.2 84% 4.9%; - - --border: 214.3 31.8% 91.4%; - --input: 214.3 31.8% 91.4%; - - --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; - - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; - - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; - - --destructive: 0 72.2% 50.6%; - --destructive-foreground: 210 40% 98%; - - --ring: 222.2 84% 4.9%; - - --radius: 0.5rem; - } - - .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; - - --muted: 217.2 32.6% 17.5%; - --muted-foreground: 215 20.2% 65.1%; - - --popover: 222.2 84% 4.9%; - --popover-foreground: 210 40% 98%; - - --card: 222.2 84% 4.9%; - --card-foreground: 210 40% 98%; - - --border: 217.2 32.6% 17.5%; - --input: 217.2 32.6% 17.5%; - - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 11.2%; - - --secondary: 217.2 32.6% 17.5%; - --secondary-foreground: 210 40% 98%; - - --accent: 217.2 32.6% 17.5%; - --accent-foreground: 210 40% 98%; - - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 210 40% 98%; - - --ring: hsl(212.7,26.8%,83.9); - } + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 72.2% 50.6%; + --destructive-foreground: 210 40% 98%; + + --ring: 222.2 84% 4.9%; + + --radius: 0.5rem; + } + + .dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 11.2%; + + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + + --ring: hsl(212.7, 26.8%, 83.9); + } } - + @layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground; - } -} \ No newline at end of file + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} diff --git a/src/components/Settings.svelte b/src/components/Settings.svelte index 2308b43..7592ebd 100644 --- a/src/components/Settings.svelte +++ b/src/components/Settings.svelte @@ -1,19 +1,26 @@ -
    + Name @@ -72,10 +60,10 @@ - - - Submit -
    - - + + + diff --git a/src/components/ui/button/index.ts b/src/components/ui/button/index.ts index cfb5560..806d442 100644 --- a/src/components/ui/button/index.ts +++ b/src/components/ui/button/index.ts @@ -1,34 +1,33 @@ -import Root from "./button.svelte"; -import { tv, type VariantProps } from "tailwind-variants"; -import type { Button as ButtonPrimitive } from "bits-ui"; +import Root from './button.svelte'; +import { tv, type VariantProps } from 'tailwind-variants'; +import type { Button as ButtonPrimitive } from 'bits-ui'; const buttonVariants = tv({ - base: "inline-flex items-center justify-center rounded-md text-sm font-medium whitespace-nowrap ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", + base: 'inline-flex items-center justify-center rounded-md text-sm font-medium whitespace-nowrap ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', variants: { variant: { - default: "bg-primary text-primary-foreground hover:bg-primary/90", - destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", - outline: - "border border-input bg-background hover:bg-accent hover:text-accent-foreground", - secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", - ghost: "hover:bg-accent hover:text-accent-foreground", - link: "text-primary underline-offset-4 hover:underline", + default: 'bg-primary text-primary-foreground hover:bg-primary/90', + destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90', + outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground', + secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', + ghost: 'hover:bg-accent hover:text-accent-foreground', + link: 'text-primary underline-offset-4 hover:underline' }, size: { - default: "h-10 px-4 py-2", - sm: "h-9 rounded-md px-3", - lg: "h-11 rounded-md px-8", - icon: "h-10 w-10", - }, + default: 'h-10 px-4 py-2', + sm: 'h-9 rounded-md px-3', + lg: 'h-11 rounded-md px-8', + icon: 'h-10 w-10' + } }, defaultVariants: { - variant: "default", - size: "default", - }, + variant: 'default', + size: 'default' + } }); -type Variant = VariantProps["variant"]; -type Size = VariantProps["size"]; +type Variant = VariantProps['variant']; +type Size = VariantProps['size']; type Props = ButtonPrimitive.Props & { variant?: Variant; @@ -45,5 +44,5 @@ export { Root as Button, type Props as ButtonProps, type Events as ButtonEvents, - buttonVariants, + buttonVariants }; diff --git a/src/components/ui/calendar/calendar-cell.svelte b/src/components/ui/calendar/calendar-cell.svelte new file mode 100644 index 0000000..ef2bed6 --- /dev/null +++ b/src/components/ui/calendar/calendar-cell.svelte @@ -0,0 +1,21 @@ + + + + + diff --git a/src/components/ui/calendar/calendar-day.svelte b/src/components/ui/calendar/calendar-day.svelte new file mode 100644 index 0000000..9dbda6a --- /dev/null +++ b/src/components/ui/calendar/calendar-day.svelte @@ -0,0 +1,42 @@ + + + + + {date.day} + + diff --git a/src/components/ui/calendar/calendar-grid-body.svelte b/src/components/ui/calendar/calendar-grid-body.svelte new file mode 100644 index 0000000..80b6f84 --- /dev/null +++ b/src/components/ui/calendar/calendar-grid-body.svelte @@ -0,0 +1,13 @@ + + + + + diff --git a/src/components/ui/calendar/calendar-grid-head.svelte b/src/components/ui/calendar/calendar-grid-head.svelte new file mode 100644 index 0000000..dbe3e8e --- /dev/null +++ b/src/components/ui/calendar/calendar-grid-head.svelte @@ -0,0 +1,13 @@ + + + + + diff --git a/src/components/ui/calendar/calendar-grid-row.svelte b/src/components/ui/calendar/calendar-grid-row.svelte new file mode 100644 index 0000000..3a1473c --- /dev/null +++ b/src/components/ui/calendar/calendar-grid-row.svelte @@ -0,0 +1,13 @@ + + + + + diff --git a/src/components/ui/calendar/calendar-grid.svelte b/src/components/ui/calendar/calendar-grid.svelte new file mode 100644 index 0000000..d52c9a7 --- /dev/null +++ b/src/components/ui/calendar/calendar-grid.svelte @@ -0,0 +1,13 @@ + + + + + diff --git a/src/components/ui/calendar/calendar-head-cell.svelte b/src/components/ui/calendar/calendar-head-cell.svelte new file mode 100644 index 0000000..49aa39d --- /dev/null +++ b/src/components/ui/calendar/calendar-head-cell.svelte @@ -0,0 +1,16 @@ + + + + + diff --git a/src/components/ui/calendar/calendar-header.svelte b/src/components/ui/calendar/calendar-header.svelte new file mode 100644 index 0000000..014ff28 --- /dev/null +++ b/src/components/ui/calendar/calendar-header.svelte @@ -0,0 +1,16 @@ + + + + + diff --git a/src/components/ui/calendar/calendar-heading.svelte b/src/components/ui/calendar/calendar-heading.svelte new file mode 100644 index 0000000..409a182 --- /dev/null +++ b/src/components/ui/calendar/calendar-heading.svelte @@ -0,0 +1,19 @@ + + + + + {headingValue} + + diff --git a/src/components/ui/calendar/calendar-months.svelte b/src/components/ui/calendar/calendar-months.svelte new file mode 100644 index 0000000..cb8ae7b --- /dev/null +++ b/src/components/ui/calendar/calendar-months.svelte @@ -0,0 +1,16 @@ + + +
    + +
    diff --git a/src/components/ui/calendar/calendar-next-button.svelte b/src/components/ui/calendar/calendar-next-button.svelte new file mode 100644 index 0000000..843b913 --- /dev/null +++ b/src/components/ui/calendar/calendar-next-button.svelte @@ -0,0 +1,27 @@ + + + + + + + diff --git a/src/components/ui/calendar/calendar-prev-button.svelte b/src/components/ui/calendar/calendar-prev-button.svelte new file mode 100644 index 0000000..375b0eb --- /dev/null +++ b/src/components/ui/calendar/calendar-prev-button.svelte @@ -0,0 +1,27 @@ + + + + + + + diff --git a/src/components/ui/calendar/calendar.svelte b/src/components/ui/calendar/calendar.svelte new file mode 100644 index 0000000..0857f3d --- /dev/null +++ b/src/components/ui/calendar/calendar.svelte @@ -0,0 +1,59 @@ + + + + + + + + + + {#each months as month} + + + + {#each weekdays as weekday} + + {weekday.slice(0, 2)} + + {/each} + + + + {#each month.weeks as weekDates} + + {#each weekDates as date} + + + + {/each} + + {/each} + + + {/each} + + diff --git a/src/components/ui/calendar/index.ts b/src/components/ui/calendar/index.ts new file mode 100644 index 0000000..ab257ab --- /dev/null +++ b/src/components/ui/calendar/index.ts @@ -0,0 +1,30 @@ +import Root from "./calendar.svelte"; +import Cell from "./calendar-cell.svelte"; +import Day from "./calendar-day.svelte"; +import Grid from "./calendar-grid.svelte"; +import Header from "./calendar-header.svelte"; +import Months from "./calendar-months.svelte"; +import GridRow from "./calendar-grid-row.svelte"; +import Heading from "./calendar-heading.svelte"; +import GridBody from "./calendar-grid-body.svelte"; +import GridHead from "./calendar-grid-head.svelte"; +import HeadCell from "./calendar-head-cell.svelte"; +import NextButton from "./calendar-next-button.svelte"; +import PrevButton from "./calendar-prev-button.svelte"; + +export { + Day, + Cell, + Grid, + Header, + Months, + GridRow, + Heading, + GridBody, + GridHead, + HeadCell, + NextButton, + PrevButton, + // + Root as Calendar, +}; diff --git a/src/components/ui/form/form-button.svelte b/src/components/ui/form/form-button.svelte index 456348f..ec11a46 100644 --- a/src/components/ui/form/form-button.svelte +++ b/src/components/ui/form/form-button.svelte @@ -1,5 +1,5 @@ diff --git a/src/components/ui/form/form-description.svelte b/src/components/ui/form/form-description.svelte index b404729..8a0224e 100644 --- a/src/components/ui/form/form-description.svelte +++ b/src/components/ui/form/form-description.svelte @@ -1,7 +1,7 @@ diff --git a/src/components/ui/form/form-element-field.svelte b/src/components/ui/form/form-element-field.svelte index 72d024a..fc127ac 100644 --- a/src/components/ui/form/form-element-field.svelte +++ b/src/components/ui/form/form-element-field.svelte @@ -1,26 +1,26 @@ -
    +
    diff --git a/src/components/ui/form/form-field-errors.svelte b/src/components/ui/form/form-field-errors.svelte index 00fdbec..588641a 100644 --- a/src/components/ui/form/form-field-errors.svelte +++ b/src/components/ui/form/form-field-errors.svelte @@ -1,18 +1,18 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars - import type { FormPath, SuperForm } from "sveltekit-superforms"; + import type { FormPath, SuperForm } from 'sveltekit-superforms'; type T = Record; type U = unknown; -
    +
    diff --git a/src/components/ui/form/form-fieldset.svelte b/src/components/ui/form/form-fieldset.svelte index 6d35255..c1bf647 100644 --- a/src/components/ui/form/form-fieldset.svelte +++ b/src/components/ui/form/form-fieldset.svelte @@ -1,20 +1,20 @@ @@ -25,7 +25,7 @@ let:errors let:tainted let:value - class={cn("space-y-2", className)} + class={cn('space-y-2', className)} > diff --git a/src/components/ui/form/form-label.svelte b/src/components/ui/form/form-label.svelte index 4405a37..3cdc6e0 100644 --- a/src/components/ui/form/form-label.svelte +++ b/src/components/ui/form/form-label.svelte @@ -1,17 +1,17 @@ -
    diff --git a/src/routes/protected-routes/events/[slug]/+page.server.ts b/src/routes/protected-routes/events/[slug]/+page.server.ts index f98339e..e772caa 100644 --- a/src/routes/protected-routes/events/[slug]/+page.server.ts +++ b/src/routes/protected-routes/events/[slug]/+page.server.ts @@ -1,5 +1,6 @@ import { superValidate } from 'sveltekit-superforms'; import { formSchema as settingsSchema } from '$schemas/settingsSchema'; +import { eventsInsertSchema, eventsUpdateSchema } from '$schemas/supabase'; import { zod } from 'sveltekit-superforms/adapters'; import type { PageServerLoad, Actions } from './$types'; import { fail } from '@sveltejs/kit'; @@ -7,6 +8,7 @@ import { Event } from '$lib/event'; import { EventSupabaseDatabaseService } from '$lib/database/event'; import type { ZodError } from 'zod'; import { fromZodError } from 'zod-validation-error'; +import { goto } from '$app/navigation'; export const load: PageServerLoad = async ({ params }) => { return { @@ -24,14 +26,17 @@ export const actions: Actions = { }); } - const event_id = event.params.slug as unknown as number; + const event_id = Number(event.params.slug); + if (!event.params.slug) { + throw new Error('Slug is undefined'); + } const eventSupabaseDatabaseService = new EventSupabaseDatabaseService(event.locals.supabase); let tournament = new Event(event_id, eventSupabaseDatabaseService); - tournament.id = Number(tournament.id); try { - await tournament.update(Number(event_id), tournament); + await tournament.update(event_id, form.data); + form.data.name = tournament.name ?? ''; return { form @@ -39,13 +44,56 @@ export const actions: Actions = { } catch (error) { form.valid = false; - const validationError = fromZodError(error); + const validationError = fromZodError(error as ZodError); + form.message = validationError.message; + + return fail(400, { + form + }); + } + }, + + create: async (event) => { + const form = await superValidate(event, zod(settingsSchema)); + if (!form.valid) { + return fail(400, { + form + }); + } + + const event_id = Number(event.params.slug); + if (!event.params.slug) { + throw new Error('Slug is undefined'); + } + const eventSupabaseDatabaseService = new EventSupabaseDatabaseService(event.locals.supabase); + let tournament = new Event(event_id, eventSupabaseDatabaseService); + + try { + await tournament.create(form.data); + + goto(`/protected-routes/events/${tournament.id}`); + } catch (error) { + form.valid = false; + + const validationError = fromZodError(error as ZodError); form.message = validationError.message; return fail(400, { form }); } + }, + + delete: async (event) => { + const event_id = Number(event.params.slug); + + const eventSupabaseDatabaseService = new EventSupabaseDatabaseService(event.locals.supabase); + let tournament = new Event(event_id, eventSupabaseDatabaseService); + + // TODO: How do we handle delete failure? + await tournament.delete(); + + goto(`/protected-routes/dashboard`); } }; diff --git a/src/routes/protected-routes/events/[slug]/+page.ts b/src/routes/protected-routes/events/[slug]/+page.ts index ec5bebe..9400186 100644 --- a/src/routes/protected-routes/events/[slug]/+page.ts +++ b/src/routes/protected-routes/events/[slug]/+page.ts @@ -16,12 +16,12 @@ export const load: PageLoad = async ({ params, parent }) => { const form: SuperValidated> = await superValidate( { - name: tournament.name - // courts: tournament.courts, - // pools: tournament.pools, - // ref: tournament.refs - // eventDate: tournament.date, - // eventScoring: tournament.scoring + name: tournament.name, + courts: tournament.courts, + pools: tournament.pools, + ref: tournament.refs, + date: tournament.date, + scoring: tournament.scoring }, zod(settingsSchema) ); diff --git a/src/schemas/settingsSchema.ts b/src/schemas/settingsSchema.ts index 6dd7158..ba2262d 100644 --- a/src/schemas/settingsSchema.ts +++ b/src/schemas/settingsSchema.ts @@ -1,12 +1,13 @@ -import { z } from 'zod'; +import { string, z } from 'zod'; export const formSchema = z.object({ - name: z.string().refine((v) => v, { message: 'A event name is required.' }) - // courts: z.number().refine((v) => v, { message: 'A number of courts is required.' }), - // pools: z.number().refine((v) => v, { message: 'A number of pools is required.' }), - // ref: z.string().refine((v) => v, { message: 'A ref type is required.' }) - // date: z.string().refine((v) => v, { message: 'A date is required.' }), - // scoring: z.string().refine((v) => v, { message: 'A scoring type is required.' }) + name: z.string().refine((v) => v, { message: 'A event name is required.' }), + courts: z.coerce.number().refine((v) => v, { message: 'A number of courts is required.' }), + pools: z.coerce.number().refine((v) => v, { message: 'A number of pools is required.' }), + ref: z.string().refine((v) => v, { message: 'A ref type is required.' }), + date: z.string().refine((v) => v, { message: 'A date is required.' }), + scoring: z.string().refine((v) => v, { message: 'A scoring type is required.' }), + owner: string().optional() }); export type FormSchema = typeof formSchema; diff --git a/src/types/schemas.ts b/src/types/schemas.ts deleted file mode 100644 index df097f8..0000000 --- a/src/types/schemas.ts +++ /dev/null @@ -1,134 +0,0 @@ -// Generated by ts-to-zod -import { z } from "zod"; -import type { Json } from "./supabase"; - -export const jsonSchema: z.ZodSchema = z.lazy(() => - z - .union([ - z.string(), - z.number(), - z.boolean(), - z.record(z.union([jsonSchema, z.undefined()])), - z.array(jsonSchema), - ]) - .nullable(), -); - -export const eventsRowSchema = z.object({ - courts: z.number().nullable(), - created_at: z.string(), - date: z.string().nullable(), - id: z.number(), - name: z.string(), - owner: z.string(), - pools: z.number().nullable(), - refs: z.string().nullable(), - scoring: z.string().nullable(), -}); - -export const eventsInsertSchema = z.object({ - courts: z.number().optional().nullable(), - created_at: z.string().optional(), - date: z.string().optional().nullable(), - id: z.number().optional(), - name: z.string(), - owner: z.string(), - pools: z.number().optional().nullable(), - refs: z.string().optional().nullable(), - scoring: z.string().optional().nullable(), -}); - -export const eventsUpdateSchema = z.object({ - courts: z.number().optional().nullable(), - created_at: z.string().optional(), - date: z.string().optional().nullable(), - id: z.number().optional(), - name: z.string().optional(), - owner: z.string().optional(), - pools: z.number().optional().nullable(), - refs: z.string().optional().nullable(), - scoring: z.string().optional().nullable(), -}); - -export const matchStateSchema = z.union([ - z.literal("COMPLETE"), - z.literal("INCOMPLETE"), -]); - -export const matchesInsertSchema = z.object({ - child_id: z.number().optional().nullable(), - court: z.number().optional(), - created_at: z.string().optional(), - event_id: z.number(), - id: z.number().optional(), - ref: z.number().optional().nullable(), - round: z.number().optional(), - state: matchStateSchema.optional(), - team1: z.number().optional().nullable(), - team1_score: z.number().optional().nullable(), - team2: z.number().optional().nullable(), - team2_score: z.number().optional().nullable(), - type: z.string().optional(), -}); - -export const matchesUpdateSchema = z.object({ - child_id: z.number().optional().nullable(), - court: z.number().optional(), - created_at: z.string().optional(), - event_id: z.number().optional(), - id: z.number().optional(), - ref: z.number().optional().nullable(), - round: z.number().optional(), - state: matchStateSchema.optional(), - team1: z.number().optional().nullable(), - team1_score: z.number().optional().nullable(), - team2: z.number().optional().nullable(), - team2_score: z.number().optional().nullable(), - type: z.string().optional(), -}); - -export const teamsRowSchema = z.object({ - created_at: z.string().nullable(), - event_id: z.number().nullable(), - id: z.number(), - name: z.string(), - state: z.string().nullable(), -}); - -export const teamsInsertSchema = z.object({ - created_at: z.string().optional().nullable(), - event_id: z.number().optional().nullable(), - id: z.number().optional(), - name: z.string(), - state: z.string().optional().nullable(), -}); - -export const teamsUpdateSchema = z.object({ - created_at: z.string().optional().nullable(), - event_id: z.number().optional().nullable(), - id: z.number().optional(), - name: z.string().optional(), - state: z.string().optional().nullable(), -}); - -export const stageTypeSchema = z.union([ - z.literal("ROUND_ROBIN"), - z.literal("SINGLE_ELIMINATION"), - z.literal("DOUBLE_ELIMINATION"), -]); - -export const matchesRowSchema = z.object({ - child_id: z.number().nullable(), - court: z.number(), - created_at: z.string(), - event_id: z.number(), - id: z.number(), - ref: z.number().nullable(), - round: z.number(), - state: matchStateSchema, - team1: z.number().nullable(), - team1_score: z.number().nullable(), - team2: z.number().nullable(), - team2_score: z.number().nullable(), - type: z.string(), -}); diff --git a/src/types/supabase.ts b/src/types/supabase.ts index 02173d0..3f1c06f 100644 --- a/src/types/supabase.ts +++ b/src/types/supabase.ts @@ -1,274 +1,262 @@ -export type Json = - | string - | number - | boolean - | null - | { [key: string]: Json | undefined } - | Json[] +export type Json = string | number | boolean | null | { [key: string]: Json | undefined } | Json[]; export type Database = { - public: { - Tables: { - events: { - Row: { - courts: number | null - created_at: string - date: string | null - id: number - name: string - owner: string - pools: number | null - refs: string | null - scoring: string | null - } - Insert: { - courts?: number | null - created_at?: string - date?: string | null - id?: number - name: string - owner: string - pools?: number | null - refs?: string | null - scoring?: string | null - } - Update: { - courts?: number | null - created_at?: string - date?: string | null - id?: number - name?: string - owner?: string - pools?: number | null - refs?: string | null - scoring?: string | null - } - Relationships: [ - { - foreignKeyName: "events_owner_fkey" - columns: ["owner"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - } - ] - } - matches: { - Row: { - child_id: number | null - court: number - created_at: string - event_id: number - id: number - ref: number | null - round: number - state: Database["public"]["Enums"]["MatchState"] - team1: number | null - team1_score: number | null - team2: number | null - team2_score: number | null - type: string - } - Insert: { - child_id?: number | null - court?: number - created_at?: string - event_id: number - id?: number - ref?: number | null - round?: number - state?: Database["public"]["Enums"]["MatchState"] - team1?: number | null - team1_score?: number | null - team2?: number | null - team2_score?: number | null - type?: string - } - Update: { - child_id?: number | null - court?: number - created_at?: string - event_id?: number - id?: number - ref?: number | null - round?: number - state?: Database["public"]["Enums"]["MatchState"] - team1?: number | null - team1_score?: number | null - team2?: number | null - team2_score?: number | null - type?: string - } - Relationships: [ - { - foreignKeyName: "matches_child_id_fkey" - columns: ["child_id"] - isOneToOne: false - referencedRelation: "matches" - referencedColumns: ["id"] - }, - { - foreignKeyName: "matches_event_id_fkey" - columns: ["event_id"] - isOneToOne: false - referencedRelation: "events" - referencedColumns: ["id"] - }, - { - foreignKeyName: "matches_id_fkey" - columns: ["id"] - isOneToOne: true - referencedRelation: "matches" - referencedColumns: ["id"] - }, - { - foreignKeyName: "matches_ref_fkey" - columns: ["ref"] - isOneToOne: false - referencedRelation: "teams" - referencedColumns: ["id"] - }, - { - foreignKeyName: "matches_team1_fkey" - columns: ["team1"] - isOneToOne: false - referencedRelation: "teams" - referencedColumns: ["id"] - }, - { - foreignKeyName: "matches_team2_fkey" - columns: ["team2"] - isOneToOne: false - referencedRelation: "teams" - referencedColumns: ["id"] - } - ] - } - teams: { - Row: { - created_at: string | null - event_id: number | null - id: number - name: string - state: string | null - } - Insert: { - created_at?: string | null - event_id?: number | null - id?: number - name: string - state?: string | null - } - Update: { - created_at?: string | null - event_id?: number | null - id?: number - name?: string - state?: string | null - } - Relationships: [ - { - foreignKeyName: "teams_event_id_fkey" - columns: ["event_id"] - isOneToOne: false - referencedRelation: "events" - referencedColumns: ["id"] - } - ] - } - } - Views: { - [_ in never]: never - } - Functions: { - [_ in never]: never - } - Enums: { - MatchState: "COMPLETE" | "INCOMPLETE" - StageType: "ROUND_ROBIN" | "SINGLE_ELIMINATION" | "DOUBLE_ELIMINATION" - } - CompositeTypes: { - [_ in never]: never - } - } -} + public: { + Tables: { + events: { + Row: { + courts: number | null; + created_at: string; + date: string | null; + id: number; + name: string; + owner: string; + pools: number | null; + refs: string | null; + scoring: string | null; + }; + Insert: { + courts?: number | null; + created_at?: string; + date?: string | null; + id?: number; + name: string; + owner: string; + pools?: number | null; + refs?: string | null; + scoring?: string | null; + }; + Update: { + courts?: number | null; + created_at?: string; + date?: string | null; + id?: number; + name?: string; + owner?: string; + pools?: number | null; + refs?: string | null; + scoring?: string | null; + }; + Relationships: [ + { + foreignKeyName: 'events_owner_fkey'; + columns: ['owner']; + isOneToOne: false; + referencedRelation: 'users'; + referencedColumns: ['id']; + } + ]; + }; + matches: { + Row: { + child_id: number | null; + court: number; + created_at: string; + event_id: number; + id: number; + ref: number | null; + round: number; + state: Database['public']['Enums']['MatchState']; + team1: number | null; + team1_score: number | null; + team2: number | null; + team2_score: number | null; + type: string; + }; + Insert: { + child_id?: number | null; + court?: number; + created_at?: string; + event_id: number; + id?: number; + ref?: number | null; + round?: number; + state?: Database['public']['Enums']['MatchState']; + team1?: number | null; + team1_score?: number | null; + team2?: number | null; + team2_score?: number | null; + type?: string; + }; + Update: { + child_id?: number | null; + court?: number; + created_at?: string; + event_id?: number; + id?: number; + ref?: number | null; + round?: number; + state?: Database['public']['Enums']['MatchState']; + team1?: number | null; + team1_score?: number | null; + team2?: number | null; + team2_score?: number | null; + type?: string; + }; + Relationships: [ + { + foreignKeyName: 'matches_child_id_fkey'; + columns: ['child_id']; + isOneToOne: false; + referencedRelation: 'matches'; + referencedColumns: ['id']; + }, + { + foreignKeyName: 'matches_event_id_fkey'; + columns: ['event_id']; + isOneToOne: false; + referencedRelation: 'events'; + referencedColumns: ['id']; + }, + { + foreignKeyName: 'matches_id_fkey'; + columns: ['id']; + isOneToOne: true; + referencedRelation: 'matches'; + referencedColumns: ['id']; + }, + { + foreignKeyName: 'matches_ref_fkey'; + columns: ['ref']; + isOneToOne: false; + referencedRelation: 'teams'; + referencedColumns: ['id']; + }, + { + foreignKeyName: 'matches_team1_fkey'; + columns: ['team1']; + isOneToOne: false; + referencedRelation: 'teams'; + referencedColumns: ['id']; + }, + { + foreignKeyName: 'matches_team2_fkey'; + columns: ['team2']; + isOneToOne: false; + referencedRelation: 'teams'; + referencedColumns: ['id']; + } + ]; + }; + teams: { + Row: { + created_at: string | null; + event_id: number | null; + id: number; + name: string; + state: string | null; + }; + Insert: { + created_at?: string | null; + event_id?: number | null; + id?: number; + name: string; + state?: string | null; + }; + Update: { + created_at?: string | null; + event_id?: number | null; + id?: number; + name?: string; + state?: string | null; + }; + Relationships: [ + { + foreignKeyName: 'teams_event_id_fkey'; + columns: ['event_id']; + isOneToOne: false; + referencedRelation: 'events'; + referencedColumns: ['id']; + } + ]; + }; + }; + Views: { + [_ in never]: never; + }; + Functions: { + [_ in never]: never; + }; + Enums: { + MatchState: 'COMPLETE' | 'INCOMPLETE'; + StageType: 'ROUND_ROBIN' | 'SINGLE_ELIMINATION' | 'DOUBLE_ELIMINATION'; + }; + CompositeTypes: { + [_ in never]: never; + }; + }; +}; export type Tables< - PublicTableNameOrOptions extends - | keyof (Database["public"]["Tables"] & Database["public"]["Views"]) - | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } - ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] & - Database[PublicTableNameOrOptions["schema"]]["Views"]) - : never = never + PublicTableNameOrOptions extends + | keyof (Database['public']['Tables'] & Database['public']['Views']) + | { schema: keyof Database }, + TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + ? keyof (Database[PublicTableNameOrOptions['schema']]['Tables'] & + Database[PublicTableNameOrOptions['schema']]['Views']) + : never = never > = PublicTableNameOrOptions extends { schema: keyof Database } - ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] & - Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends { - Row: infer R - } - ? R - : never - : PublicTableNameOrOptions extends keyof (Database["public"]["Tables"] & - Database["public"]["Views"]) - ? (Database["public"]["Tables"] & - Database["public"]["Views"])[PublicTableNameOrOptions] extends { - Row: infer R - } - ? R - : never - : never + ? (Database[PublicTableNameOrOptions['schema']]['Tables'] & + Database[PublicTableNameOrOptions['schema']]['Views'])[TableName] extends { + Row: infer R; + } + ? R + : never + : PublicTableNameOrOptions extends keyof (Database['public']['Tables'] & + Database['public']['Views']) + ? (Database['public']['Tables'] & + Database['public']['Views'])[PublicTableNameOrOptions] extends { + Row: infer R; + } + ? R + : never + : never; export type TablesInsert< - PublicTableNameOrOptions extends - | keyof Database["public"]["Tables"] - | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } - ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] - : never = never + PublicTableNameOrOptions extends keyof Database['public']['Tables'] | { schema: keyof Database }, + TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] + : never = never > = PublicTableNameOrOptions extends { schema: keyof Database } - ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends { - Insert: infer I - } - ? I - : never - : PublicTableNameOrOptions extends keyof Database["public"]["Tables"] - ? Database["public"]["Tables"][PublicTableNameOrOptions] extends { - Insert: infer I - } - ? I - : never - : never + ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { + Insert: infer I; + } + ? I + : never + : PublicTableNameOrOptions extends keyof Database['public']['Tables'] + ? Database['public']['Tables'][PublicTableNameOrOptions] extends { + Insert: infer I; + } + ? I + : never + : never; export type TablesUpdate< - PublicTableNameOrOptions extends - | keyof Database["public"]["Tables"] - | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } - ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] - : never = never + PublicTableNameOrOptions extends keyof Database['public']['Tables'] | { schema: keyof Database }, + TableName extends PublicTableNameOrOptions extends { schema: keyof Database } + ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] + : never = never > = PublicTableNameOrOptions extends { schema: keyof Database } - ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends { - Update: infer U - } - ? U - : never - : PublicTableNameOrOptions extends keyof Database["public"]["Tables"] - ? Database["public"]["Tables"][PublicTableNameOrOptions] extends { - Update: infer U - } - ? U - : never - : never + ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { + Update: infer U; + } + ? U + : never + : PublicTableNameOrOptions extends keyof Database['public']['Tables'] + ? Database['public']['Tables'][PublicTableNameOrOptions] extends { + Update: infer U; + } + ? U + : never + : never; export type Enums< - PublicEnumNameOrOptions extends - | keyof Database["public"]["Enums"] - | { schema: keyof Database }, - EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database } - ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"] - : never = never + PublicEnumNameOrOptions extends keyof Database['public']['Enums'] | { schema: keyof Database }, + EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database } + ? keyof Database[PublicEnumNameOrOptions['schema']]['Enums'] + : never = never > = PublicEnumNameOrOptions extends { schema: keyof Database } - ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName] - : PublicEnumNameOrOptions extends keyof Database["public"]["Enums"] - ? Database["public"]["Enums"][PublicEnumNameOrOptions] - : never + ? Database[PublicEnumNameOrOptions['schema']]['Enums'][EnumName] + : PublicEnumNameOrOptions extends keyof Database['public']['Enums'] + ? Database['public']['Enums'][PublicEnumNameOrOptions] + : never; diff --git a/svelte.config.js b/svelte.config.js index 65c6843..87557f3 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -20,7 +20,7 @@ const config = { $lib: path.resolve('src/lib'), $components: path.resolve('src/components'), $supabaseTypes: path.resolve('src/types/supabase'), - $schemas: path.resolve('src/schemas'), + $schemas: path.resolve('src/schemas') } } }; diff --git a/tailwind.config.js b/tailwind.config.js index 8d260d9..38fb24e 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,64 +1,64 @@ -import { fontFamily } from "tailwindcss/defaultTheme"; +import { fontFamily } from 'tailwindcss/defaultTheme'; /** @type {import('tailwindcss').Config} */ const config = { - darkMode: ["class"], - content: ["./src/**/*.{html,js,svelte,ts}"], - safelist: ["dark"], + darkMode: ['class'], + content: ['./src/**/*.{html,js,svelte,ts}'], + safelist: ['dark'], theme: { container: { center: true, - padding: "2rem", + padding: '2rem', screens: { - "2xl": "1400px" + '2xl': '1400px' } }, extend: { colors: { - border: "hsl(var(--border) / )", - input: "hsl(var(--input) / )", - ring: "hsl(var(--ring) / )", - background: "hsl(var(--background) / )", - foreground: "hsl(var(--foreground) / )", + border: 'hsl(var(--border) / )', + input: 'hsl(var(--input) / )', + ring: 'hsl(var(--ring) / )', + background: 'hsl(var(--background) / )', + foreground: 'hsl(var(--foreground) / )', primary: { - DEFAULT: "hsl(var(--primary) / )", - foreground: "hsl(var(--primary-foreground) / )" + DEFAULT: 'hsl(var(--primary) / )', + foreground: 'hsl(var(--primary-foreground) / )' }, secondary: { - DEFAULT: "hsl(var(--secondary) / )", - foreground: "hsl(var(--secondary-foreground) / )" + DEFAULT: 'hsl(var(--secondary) / )', + foreground: 'hsl(var(--secondary-foreground) / )' }, destructive: { - DEFAULT: "hsl(var(--destructive) / )", - foreground: "hsl(var(--destructive-foreground) / )" + DEFAULT: 'hsl(var(--destructive) / )', + foreground: 'hsl(var(--destructive-foreground) / )' }, muted: { - DEFAULT: "hsl(var(--muted) / )", - foreground: "hsl(var(--muted-foreground) / )" + DEFAULT: 'hsl(var(--muted) / )', + foreground: 'hsl(var(--muted-foreground) / )' }, accent: { - DEFAULT: "hsl(var(--accent) / )", - foreground: "hsl(var(--accent-foreground) / )" + DEFAULT: 'hsl(var(--accent) / )', + foreground: 'hsl(var(--accent-foreground) / )' }, popover: { - DEFAULT: "hsl(var(--popover) / )", - foreground: "hsl(var(--popover-foreground) / )" + DEFAULT: 'hsl(var(--popover) / )', + foreground: 'hsl(var(--popover-foreground) / )' }, card: { - DEFAULT: "hsl(var(--card) / )", - foreground: "hsl(var(--card-foreground) / )" + DEFAULT: 'hsl(var(--card) / )', + foreground: 'hsl(var(--card-foreground) / )' } }, borderRadius: { - lg: "var(--radius)", - md: "calc(var(--radius) - 2px)", - sm: "calc(var(--radius) - 4px)" + lg: 'var(--radius)', + md: 'calc(var(--radius) - 2px)', + sm: 'calc(var(--radius) - 4px)' }, fontFamily: { sans: [...fontFamily.sans] } } - }, + } }; export default config; From 501f58903fad5ace6c3634626fffa52b5944f2cc Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Sat, 9 Mar 2024 10:58:42 -0500 Subject: [PATCH 03/19] better --- src/components/Settings.svelte | 12 ++++++------ src/routes/protected-routes/events/[slug]/+page.ts | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/Settings.svelte b/src/components/Settings.svelte index 7592ebd..f92bce0 100644 --- a/src/components/Settings.svelte +++ b/src/components/Settings.svelte @@ -11,11 +11,10 @@ DateFormatter, getLocalTimeZone, today, - parseDate, - CalendarDate + parseDate } from '@internationalized/date'; import { cn } from '$lib/utils.js'; - import { Button, buttonVariants } from '$components/ui/button'; + import { buttonVariants } from '$components/ui/button'; import { Calendar } from '$components/ui/calendar'; import * as Popover from '$components/ui/popover'; import CalendarIcon from 'lucide-svelte/icons/calendar'; @@ -29,7 +28,9 @@ if (f.valid) { success(`Tournament settings updated`); } else { - error(f.errors); + for (let [_, value] of Object.entries(f.errors)) { + error(value.pop()); + } } } }); @@ -124,8 +125,7 @@ { diff --git a/src/routes/protected-routes/events/[slug]/+page.ts b/src/routes/protected-routes/events/[slug]/+page.ts index 9400186..343593c 100644 --- a/src/routes/protected-routes/events/[slug]/+page.ts +++ b/src/routes/protected-routes/events/[slug]/+page.ts @@ -8,6 +8,12 @@ import { zod } from 'sveltekit-superforms/adapters'; export const load: PageLoad = async ({ params, parent }) => { const { supabase } = await parent(); + if (params.slug === 'create') { + const form: SuperValidated> = await superValidate(zod(settingsSchema)); + + return { event_id: params.slug, form }; + } + const eventSupabaseDatabaseService = new EventSupabaseDatabaseService(supabase); let tournament = new Event(params.slug as unknown as number, eventSupabaseDatabaseService); await tournament.load().catch((error) => { From f8dd68727a53533567d934d06615fcc5467956d7 Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Sat, 9 Mar 2024 11:04:39 -0500 Subject: [PATCH 04/19] scoring --- src/components/Settings.svelte | 30 +++++++++++++++++++ .../events/[slug]/+page.svelte | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/components/Settings.svelte b/src/components/Settings.svelte index f92bce0..8f3413a 100644 --- a/src/components/Settings.svelte +++ b/src/components/Settings.svelte @@ -49,6 +49,13 @@ }); $: dateValue = $formData.date ? parseDate($formData.date) : undefined; let datePlaceholder: DateValue = today(getLocalTimeZone()); + + $: scoringValue = $formData.scoring + ? { + label: $formData.scoring, + value: $formData.scoring + } + : undefined;
    @@ -106,6 +113,29 @@ + + + Scoring Method + { + v && ($formData.scoring = v.value); + }} + > + + + + + + + + + + + Seeding for playoffs based on score of just wins. + + + Date diff --git a/src/routes/protected-routes/events/[slug]/+page.svelte b/src/routes/protected-routes/events/[slug]/+page.svelte index 61729ae..00cb47a 100644 --- a/src/routes/protected-routes/events/[slug]/+page.svelte +++ b/src/routes/protected-routes/events/[slug]/+page.svelte @@ -60,7 +60,7 @@
    {:then} - +
    {#if data?.event_id !== 'create' && tournament} From 385218260a03e9143a2819bf3fc9f55bb4b94082 Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Sat, 9 Mar 2024 12:35:57 -0500 Subject: [PATCH 05/19] handle redirects --- src/components/Settings.svelte | 15 +++++------ src/routes/+page.svelte | 26 +++++++++++-------- .../events/[slug]/+page.server.ts | 16 ++++++------ src/schemas/settingsSchema.ts | 3 ++- 4 files changed, 32 insertions(+), 28 deletions(-) diff --git a/src/components/Settings.svelte b/src/components/Settings.svelte index 8f3413a..3dc5310 100644 --- a/src/components/Settings.svelte +++ b/src/components/Settings.svelte @@ -11,13 +11,14 @@ DateFormatter, getLocalTimeZone, today, - parseDate + parseDateTime } from '@internationalized/date'; import { cn } from '$lib/utils.js'; import { buttonVariants } from '$components/ui/button'; import { Calendar } from '$components/ui/calendar'; import * as Popover from '$components/ui/popover'; import CalendarIcon from 'lucide-svelte/icons/calendar'; + import { goto } from '$app/navigation'; export let data: SuperValidated>; export let event_id: number | 'create'; @@ -47,7 +48,7 @@ const df = new DateFormatter('en-US', { dateStyle: 'long' }); - $: dateValue = $formData.date ? parseDate($formData.date) : undefined; + $: dateValue = $formData.date ? parseDateTime($formData.date) : undefined; let datePlaceholder: DateValue = today(getLocalTimeZone()); $: scoringValue = $formData.scoring @@ -69,18 +70,18 @@ - + Number of Courts. - + Number of Courts available for pool play - + Number of pool play games - + Number of pool play games before the next stage (single/double elim) {/if} - - diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index f8aa3e9..3ca8c47 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -14,17 +14,21 @@
    {:then events} -
    +
    Upcoming events:
    - {#each events as event} - -
    - {event.name} -
    -

    - {dayjs(event.date).format('YYYY-MM-DD')} -

    -
    - {/each} + {#if events && events.length > 0} +
    + {#each events as event} + +
    + {event.name} +
    +

    + {dayjs(event.date).format('YYYY-MM-DD')} +

    +
    + {/each} +
    + {/if}
    {/await} diff --git a/src/routes/protected-routes/events/[slug]/+page.server.ts b/src/routes/protected-routes/events/[slug]/+page.server.ts index e772caa..ce65746 100644 --- a/src/routes/protected-routes/events/[slug]/+page.server.ts +++ b/src/routes/protected-routes/events/[slug]/+page.server.ts @@ -3,12 +3,11 @@ import { formSchema as settingsSchema } from '$schemas/settingsSchema'; import { eventsInsertSchema, eventsUpdateSchema } from '$schemas/supabase'; import { zod } from 'sveltekit-superforms/adapters'; import type { PageServerLoad, Actions } from './$types'; -import { fail } from '@sveltejs/kit'; +import { fail, redirect } from '@sveltejs/kit'; import { Event } from '$lib/event'; import { EventSupabaseDatabaseService } from '$lib/database/event'; import type { ZodError } from 'zod'; import { fromZodError } from 'zod-validation-error'; -import { goto } from '$app/navigation'; export const load: PageServerLoad = async ({ params }) => { return { @@ -61,18 +60,18 @@ export const actions: Actions = { }); } - const event_id = Number(event.params.slug); + const event_id = event.params.slug; if (!event.params.slug) { throw new Error('Slug is undefined'); } const eventSupabaseDatabaseService = new EventSupabaseDatabaseService(event.locals.supabase); - let tournament = new Event(event_id, eventSupabaseDatabaseService); + let tournament = new Event(event_id as unknown as number, eventSupabaseDatabaseService); + let newId: number; try { - await tournament.create(form.data); - - goto(`/protected-routes/events/${tournament.id}`); + const res = await tournament.create(form.data); + newId = res.id; } catch (error) { form.valid = false; @@ -83,6 +82,7 @@ export const actions: Actions = { form }); } + redirect(303, `/protected-routes/events/${newId}`); }, delete: async (event) => { @@ -94,6 +94,6 @@ export const actions: Actions = { // TODO: How do we handle delete failure? await tournament.delete(); - goto(`/protected-routes/dashboard`); + redirect(303, '/protected-routes/dashboard'); } }; diff --git a/src/schemas/settingsSchema.ts b/src/schemas/settingsSchema.ts index ba2262d..ea6a2d8 100644 --- a/src/schemas/settingsSchema.ts +++ b/src/schemas/settingsSchema.ts @@ -7,7 +7,8 @@ export const formSchema = z.object({ ref: z.string().refine((v) => v, { message: 'A ref type is required.' }), date: z.string().refine((v) => v, { message: 'A date is required.' }), scoring: z.string().refine((v) => v, { message: 'A scoring type is required.' }), - owner: string().optional() + owner: z.string().optional(), + id: z.coerce.number().optional() }); export type FormSchema = typeof formSchema; From 659661de02bd95881be51586f13dc1080447f245 Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Sat, 9 Mar 2024 13:20:54 -0500 Subject: [PATCH 06/19] prep teams --- src/components/Settings.svelte | 5 +-- .../events/[slug]/+page.server.ts | 43 +++++++++++++++++-- src/schemas/settingsSchema.ts | 2 +- src/schemas/teamsSchema.ts | 9 ++++ 4 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 src/schemas/teamsSchema.ts diff --git a/src/components/Settings.svelte b/src/components/Settings.svelte index 3dc5310..7ea981e 100644 --- a/src/components/Settings.svelte +++ b/src/components/Settings.svelte @@ -18,7 +18,6 @@ import { Calendar } from '$components/ui/calendar'; import * as Popover from '$components/ui/popover'; import CalendarIcon from 'lucide-svelte/icons/calendar'; - import { goto } from '$app/navigation'; export let data: SuperValidated>; export let event_id: number | 'create'; @@ -59,7 +58,7 @@ : undefined; -
    + Name @@ -178,7 +177,7 @@ Submit {#if event_id !== 'create'} - + Delete {/if} diff --git a/src/routes/protected-routes/events/[slug]/+page.server.ts b/src/routes/protected-routes/events/[slug]/+page.server.ts index ce65746..dec835f 100644 --- a/src/routes/protected-routes/events/[slug]/+page.server.ts +++ b/src/routes/protected-routes/events/[slug]/+page.server.ts @@ -1,6 +1,7 @@ import { superValidate } from 'sveltekit-superforms'; import { formSchema as settingsSchema } from '$schemas/settingsSchema'; -import { eventsInsertSchema, eventsUpdateSchema } from '$schemas/supabase'; +import { formSchema as teamsSchema } from '$schemas/teamsSchema'; +import { eventsInsertSchema, eventsUpdateSchema, teamsInsertSchema } from '$schemas/supabase'; import { zod } from 'sveltekit-superforms/adapters'; import type { PageServerLoad, Actions } from './$types'; import { fail, redirect } from '@sveltejs/kit'; @@ -8,6 +9,8 @@ import { Event } from '$lib/event'; import { EventSupabaseDatabaseService } from '$lib/database/event'; import type { ZodError } from 'zod'; import { fromZodError } from 'zod-validation-error'; +import { TeamsSupabaseDatabaseService } from '$lib/database/teams'; +import { Teams } from '$lib/teams'; export const load: PageServerLoad = async ({ params }) => { return { @@ -17,7 +20,7 @@ export const load: PageServerLoad = async ({ params }) => { }; export const actions: Actions = { - settings: async (event) => { + updateEvent: async (event) => { const form = await superValidate(event, zod(settingsSchema)); if (!form.valid) { return fail(400, { @@ -52,7 +55,7 @@ export const actions: Actions = { } }, - create: async (event) => { + createEvent: async (event) => { const form = await superValidate(event, zod(settingsSchema)); if (!form.valid) { return fail(400, { @@ -85,7 +88,7 @@ export const actions: Actions = { redirect(303, `/protected-routes/events/${newId}`); }, - delete: async (event) => { + deleteEvent: async (event) => { const event_id = Number(event.params.slug); const eventSupabaseDatabaseService = new EventSupabaseDatabaseService(event.locals.supabase); @@ -95,5 +98,37 @@ export const actions: Actions = { await tournament.delete(); redirect(303, '/protected-routes/dashboard'); + }, + + createTeam: async (event) => { + const form = await superValidate(event, zod(teamsSchema)); + if (!form.valid) { + return fail(400, { + form + }); + } + + const event_id = Number(event.params.slug); + + const teamsSupabaseDatabaseService = new TeamsSupabaseDatabaseService(event.locals.supabase); + let teams = new Teams(event_id, teamsSupabaseDatabaseService); + + try { + const newTeam: Partial = { + name: form.data.name, + event_id + }; + await teams.create(newTeam); + return { form }; + } catch (error) { + form.valid = false; + + const validationError = fromZodError(error as ZodError); + form.message = validationError.message; + + return fail(400, { + form + }); + } } }; diff --git a/src/schemas/settingsSchema.ts b/src/schemas/settingsSchema.ts index ea6a2d8..9c498db 100644 --- a/src/schemas/settingsSchema.ts +++ b/src/schemas/settingsSchema.ts @@ -1,4 +1,4 @@ -import { string, z } from 'zod'; +import { z } from 'zod'; export const formSchema = z.object({ name: z.string().refine((v) => v, { message: 'A event name is required.' }), diff --git a/src/schemas/teamsSchema.ts b/src/schemas/teamsSchema.ts new file mode 100644 index 0000000..08b64a5 --- /dev/null +++ b/src/schemas/teamsSchema.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const formSchema = z.object({ + name: z.string().refine((v) => v, { message: 'A team name is required.' }), + event_id: z.coerce.number().refine((v) => v, { message: 'An event id is required.' }), + id: z.coerce.number().optional() +}); + +export type FormSchema = typeof formSchema; From df9b3f2187acab66f53af1a81c317f112f901182 Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Sat, 9 Mar 2024 22:35:28 -0500 Subject: [PATCH 07/19] make all admin components tabs --- src/routes/protected-routes/events/[slug]/+page.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/routes/protected-routes/events/[slug]/+page.svelte b/src/routes/protected-routes/events/[slug]/+page.svelte index 00cb47a..e3a2c9f 100644 --- a/src/routes/protected-routes/events/[slug]/+page.svelte +++ b/src/routes/protected-routes/events/[slug]/+page.svelte @@ -60,12 +60,14 @@
    {:then} - -
    {#if data?.event_id !== 'create' && tournament} - + + + + + From 8e08d2effc0e70e44a9c3888e09de173e19113a8 Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Sat, 9 Mar 2024 22:46:42 -0500 Subject: [PATCH 08/19] shadcn tabs --- src/components/ui/card/card-content.svelte | 13 +++ .../ui/card/card-description.svelte | 13 +++ src/components/ui/card/card-footer.svelte | 13 +++ src/components/ui/card/card-header.svelte | 13 +++ src/components/ui/card/card-title.svelte | 21 +++++ src/components/ui/card/card.svelte | 16 ++++ src/components/ui/card/index.ts | 24 +++++ src/components/ui/tabs/index.ts | 18 ++++ src/components/ui/tabs/tabs-content.svelte | 21 +++++ src/components/ui/tabs/tabs-list.svelte | 19 ++++ src/components/ui/tabs/tabs-trigger.svelte | 23 +++++ .../events/[slug]/+page.svelte | 88 ++++++++++++++----- 12 files changed, 261 insertions(+), 21 deletions(-) create mode 100644 src/components/ui/card/card-content.svelte create mode 100644 src/components/ui/card/card-description.svelte create mode 100644 src/components/ui/card/card-footer.svelte create mode 100644 src/components/ui/card/card-header.svelte create mode 100644 src/components/ui/card/card-title.svelte create mode 100644 src/components/ui/card/card.svelte create mode 100644 src/components/ui/card/index.ts create mode 100644 src/components/ui/tabs/index.ts create mode 100644 src/components/ui/tabs/tabs-content.svelte create mode 100644 src/components/ui/tabs/tabs-list.svelte create mode 100644 src/components/ui/tabs/tabs-trigger.svelte diff --git a/src/components/ui/card/card-content.svelte b/src/components/ui/card/card-content.svelte new file mode 100644 index 0000000..f922c56 --- /dev/null +++ b/src/components/ui/card/card-content.svelte @@ -0,0 +1,13 @@ + + +
    + +
    diff --git a/src/components/ui/card/card-description.svelte b/src/components/ui/card/card-description.svelte new file mode 100644 index 0000000..9a35919 --- /dev/null +++ b/src/components/ui/card/card-description.svelte @@ -0,0 +1,13 @@ + + +

    + +

    diff --git a/src/components/ui/card/card-footer.svelte b/src/components/ui/card/card-footer.svelte new file mode 100644 index 0000000..32f90bb --- /dev/null +++ b/src/components/ui/card/card-footer.svelte @@ -0,0 +1,13 @@ + + +
    + +
    diff --git a/src/components/ui/card/card-header.svelte b/src/components/ui/card/card-header.svelte new file mode 100644 index 0000000..e474528 --- /dev/null +++ b/src/components/ui/card/card-header.svelte @@ -0,0 +1,13 @@ + + +
    + +
    diff --git a/src/components/ui/card/card-title.svelte b/src/components/ui/card/card-title.svelte new file mode 100644 index 0000000..c32dc73 --- /dev/null +++ b/src/components/ui/card/card-title.svelte @@ -0,0 +1,21 @@ + + + + + diff --git a/src/components/ui/card/card.svelte b/src/components/ui/card/card.svelte new file mode 100644 index 0000000..b4746df --- /dev/null +++ b/src/components/ui/card/card.svelte @@ -0,0 +1,16 @@ + + +
    + +
    diff --git a/src/components/ui/card/index.ts b/src/components/ui/card/index.ts new file mode 100644 index 0000000..bcc031d --- /dev/null +++ b/src/components/ui/card/index.ts @@ -0,0 +1,24 @@ +import Root from "./card.svelte"; +import Content from "./card-content.svelte"; +import Description from "./card-description.svelte"; +import Footer from "./card-footer.svelte"; +import Header from "./card-header.svelte"; +import Title from "./card-title.svelte"; + +export { + Root, + Content, + Description, + Footer, + Header, + Title, + // + Root as Card, + Content as CardContent, + Description as CardDescription, + Footer as CardFooter, + Header as CardHeader, + Title as CardTitle, +}; + +export type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6"; diff --git a/src/components/ui/tabs/index.ts b/src/components/ui/tabs/index.ts new file mode 100644 index 0000000..f1ab372 --- /dev/null +++ b/src/components/ui/tabs/index.ts @@ -0,0 +1,18 @@ +import { Tabs as TabsPrimitive } from "bits-ui"; +import Content from "./tabs-content.svelte"; +import List from "./tabs-list.svelte"; +import Trigger from "./tabs-trigger.svelte"; + +const Root = TabsPrimitive.Root; + +export { + Root, + Content, + List, + Trigger, + // + Root as Tabs, + Content as TabsContent, + List as TabsList, + Trigger as TabsTrigger, +}; diff --git a/src/components/ui/tabs/tabs-content.svelte b/src/components/ui/tabs/tabs-content.svelte new file mode 100644 index 0000000..53b79f8 --- /dev/null +++ b/src/components/ui/tabs/tabs-content.svelte @@ -0,0 +1,21 @@ + + + + + diff --git a/src/components/ui/tabs/tabs-list.svelte b/src/components/ui/tabs/tabs-list.svelte new file mode 100644 index 0000000..71c51a6 --- /dev/null +++ b/src/components/ui/tabs/tabs-list.svelte @@ -0,0 +1,19 @@ + + + + + diff --git a/src/components/ui/tabs/tabs-trigger.svelte b/src/components/ui/tabs/tabs-trigger.svelte new file mode 100644 index 0000000..e98222f --- /dev/null +++ b/src/components/ui/tabs/tabs-trigger.svelte @@ -0,0 +1,23 @@ + + + + + diff --git a/src/routes/protected-routes/events/[slug]/+page.svelte b/src/routes/protected-routes/events/[slug]/+page.svelte index e3a2c9f..f6bb035 100644 --- a/src/routes/protected-routes/events/[slug]/+page.svelte +++ b/src/routes/protected-routes/events/[slug]/+page.svelte @@ -6,8 +6,10 @@ import Matches from '$components/Matches.svelte'; import Teams from '$components/Teams.svelte'; import { loadInitialData } from '$lib/helper'; - import { Tabs, TabItem, Spinner } from 'flowbite-svelte'; + import { Spinner } from 'flowbite-svelte'; import EditMatch from '$components/EditMatch.svelte'; + import * as Tabs from '$components/ui/tabs/index.js'; + import * as Card from '$components/ui/card/index.js'; import { page } from '$app/stores'; import { Modal } from 'flowbite-svelte'; import { initiateEvent } from '$lib/helper'; @@ -62,26 +64,70 @@ {:then}
    {#if data?.event_id !== 'create' && tournament} - - - - - - - - - - - - - - - - - - - - + + + Settings + Teams + Matches + Standings + Bracket + + + + + Account + Make changes to your event here. + + + + + + + + + + Teams + Add/remove teams + + + + + + + + + + Matches + Update pool play match results + + + + + + + + + + Current Standings + Current standings based on pool play results + + + + + + + + + + Bracket + Single/Double elim bracket + + + + + + + {/if}
    {/await} From f762887f1f801e83c1a6a9b388b348a6a85b2cbb Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Sat, 9 Mar 2024 23:05:53 -0500 Subject: [PATCH 09/19] cards --- src/components/eventsCards.svelte | 33 +++++ src/routes/+page.svelte | 19 +-- .../protected-routes/dashboard/+page.svelte | 23 +-- .../events/[slug]/+page.svelte | 132 +++++++++--------- 4 files changed, 109 insertions(+), 98 deletions(-) create mode 100644 src/components/eventsCards.svelte diff --git a/src/components/eventsCards.svelte b/src/components/eventsCards.svelte new file mode 100644 index 0000000..156b14a --- /dev/null +++ b/src/components/eventsCards.svelte @@ -0,0 +1,33 @@ + + +
    + {#if events && events.length > 0} + + {/if} +
    diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 3ca8c47..1cf1fd2 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,7 +1,7 @@ {#if $page.state.showModal && $page.state.matchId} @@ -63,72 +65,70 @@
    {:then}
    - {#if data?.event_id !== 'create' && tournament} - - - Settings - Teams - Matches - Standings - Bracket - - - - - Account - Make changes to your event here. - - - - - - - - - - Teams - Add/remove teams - - - - - - - - - - Matches - Update pool play match results - - - - - - - - - - Current Standings - Current standings based on pool play results - - - - - - - - - - Bracket - Single/Double elim bracket - - - - - - - - {/if} + + + Settings + Teams + Matches + Standings + Bracket + + + + + Account + Make changes to your event here. + + + + + + + + + + Teams + Add/remove teams + + + + + + + + + + Matches + Update pool play match results + + + + + + + + + + Current Standings + Current standings based on pool play results + + + + + + + + + + Bracket + Single/Double elim bracket + + + + + + +
    {/await}
    From c51b601d1db1ef305b78c021488d5fcfd626cbaa Mon Sep 17 00:00:00 2001 From: Craig Kaiser Date: Sat, 9 Mar 2024 23:18:21 -0500 Subject: [PATCH 10/19] more --- src/components/eventsCards.svelte | 3 +- src/routes/+page.svelte | 2 +- src/routes/events/[slug]/+page.svelte | 60 ++++++++++++++----- .../protected-routes/dashboard/+page.svelte | 5 +- .../events/[slug]/+page.svelte | 4 +- 5 files changed, 51 insertions(+), 23 deletions(-) diff --git a/src/components/eventsCards.svelte b/src/components/eventsCards.svelte index 156b14a..6065a69 100644 --- a/src/components/eventsCards.svelte +++ b/src/components/eventsCards.svelte @@ -4,13 +4,14 @@ import { parseDateTime } from '@internationalized/date'; export let events: Event[]; + export let readOnly: boolean = true;
    {#if events && events.length > 0}
    {#each events as event} - + {event.name} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 1cf1fd2..ec758ff 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -16,6 +16,6 @@ {:then events}
    Upcoming events:
    - +
    {/await} diff --git a/src/routes/events/[slug]/+page.svelte b/src/routes/events/[slug]/+page.svelte index a2b670e..59f61f8 100644 --- a/src/routes/events/[slug]/+page.svelte +++ b/src/routes/events/[slug]/+page.svelte @@ -4,7 +4,10 @@ import Bracket from '$components/Bracket.svelte'; import { initiateEvent, loadInitialData } from '$lib/helper'; import Standings from '$components/Standings.svelte'; - import { Tabs, TabItem, Label, Select, Spinner } from 'flowbite-svelte'; + import { Label, Select } from 'flowbite-svelte'; + import Loader2 from 'lucide-svelte/icons/loader-2'; + import * as Tabs from '$components/ui/tabs/index.js'; + import * as Card from '$components/ui/card/index.js'; import { page } from '$app/stores'; import { browser } from '$app/environment'; import { pushState } from '$app/navigation'; @@ -38,7 +41,7 @@
    {#await loadingInitialDataPromise}
    - +
    {:then} {tournament?.name} @@ -55,18 +58,45 @@ bind:value={defaultTeam} /> - - - - - - - - - - - - - + + + Matches + Standings + Bracket + + + + + Matches + Results of pool play (live) + + + + + + + + + + Current Standings + Current standings based on pool play results + + + + + + + + + + Bracket + Single/Double elim bracket + + + + + + + {/await}
    diff --git a/src/routes/protected-routes/dashboard/+page.svelte b/src/routes/protected-routes/dashboard/+page.svelte index 91ae295..f254682 100644 --- a/src/routes/protected-routes/dashboard/+page.svelte +++ b/src/routes/protected-routes/dashboard/+page.svelte @@ -1,9 +1,6 @@
    @@ -46,18 +53,20 @@ {:then} {tournament?.name} -