@velastack/patterns 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/dist/chunks/{collections-OI0LQoJt.js → collections-Ch4kZjuV.js} +3 -3
  2. package/dist/chunks/{collections-OI0LQoJt.js.map → collections-Ch4kZjuV.js.map} +1 -1
  3. package/dist/chunks/{env.runtime-CSAfqDu4.js → env.runtime-BauEimvd.js} +2 -2
  4. package/dist/chunks/{env.runtime-CSAfqDu4.js.map → env.runtime-BauEimvd.js.map} +1 -1
  5. package/dist/chunks/{generate.runtime-BQFcrwn8.js → generate.runtime-CnxTssBQ.js} +3 -3
  6. package/dist/chunks/{generate.runtime-BQFcrwn8.js.map → generate.runtime-CnxTssBQ.js.map} +1 -1
  7. package/dist/chunks/{generate.runtime-BQg5E0LV.js → generate.runtime-D5bvTbSL.js} +2 -2
  8. package/dist/chunks/{generate.runtime-BQg5E0LV.js.map → generate.runtime-D5bvTbSL.js.map} +1 -1
  9. package/dist/chunks/{generate.runtime-ZXBZUjeH.js → generate.runtime-Tk3iuGQE.js} +2 -2
  10. package/dist/chunks/{generate.runtime-ZXBZUjeH.js.map → generate.runtime-Tk3iuGQE.js.map} +1 -1
  11. package/dist/chunks/{generate.runtime-CEFyA2-Y.js → generate.runtime-hZV63PD9.js} +4 -4
  12. package/dist/chunks/{generate.runtime-CEFyA2-Y.js.map → generate.runtime-hZV63PD9.js.map} +1 -1
  13. package/dist/chunks/{index-9TLCLhJv.js → index-CoeyNVkU.js} +1116 -1214
  14. package/dist/chunks/index-CoeyNVkU.js.map +1 -0
  15. package/dist/chunks/{pocketbase-Vk0YzqnQ.js → pocketbase-rvyHmLFw.js} +2 -2
  16. package/dist/chunks/{pocketbase-Vk0YzqnQ.js.map → pocketbase-rvyHmLFw.js.map} +1 -1
  17. package/dist/chunks/{write-result-DmD7kWlV.js → write-result-1Q3LB_k4.js} +27 -25
  18. package/dist/chunks/write-result-1Q3LB_k4.js.map +1 -0
  19. package/dist/index.js +1 -1
  20. package/package.json +1 -1
  21. package/dist/chunks/index-9TLCLhJv.js.map +0 -1
  22. package/dist/chunks/write-result-DmD7kWlV.js.map +0 -1
@@ -5,7 +5,7 @@ import { detect as y } from "package-manager-detector";
5
5
  import { resolveCommand as _ } from "package-manager-detector/commands";
6
6
  import k from "cross-spawn";
7
7
  import R from "node:net";
8
- import { D as A, M as p } from "./index-9TLCLhJv.js";
8
+ import { D as A, M as p } from "./index-CoeyNVkU.js";
9
9
  function T() {
10
10
  return Math.floor(Math.random() * 1e4) + 1e4;
11
11
  }
@@ -137,4 +137,4 @@ export {
137
137
  W as m,
138
138
  K as w
139
139
  };
140
- //# sourceMappingURL=pocketbase-Vk0YzqnQ.js.map
140
+ //# sourceMappingURL=pocketbase-rvyHmLFw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pocketbase-Vk0YzqnQ.js","sources":["../../src/runtime/net.ts","../../src/runtime/pocketbase.ts"],"sourcesContent":["import net from \"node:net\";\n\n// Generate a random port\nexport function randomPort() {\n return Math.floor(Math.random() * 10000) + 10000;\n}\n\n// Wait for the port to be available\nexport function waitForPort(\n port: number,\n host: string,\n maxAttempts = 10,\n): Promise<void> {\n return new Promise((resolve, reject) => {\n let attempts = 0;\n\n const tryConnect = () => {\n attempts++;\n\n const socket = new net.Socket();\n\n const onError = () => {\n socket.destroy();\n\n if (attempts === maxAttempts) {\n reject(\n new Error(`Timed out waiting for port ${port} to be available`),\n );\n return;\n }\n\n setTimeout(tryConnect, 500);\n };\n\n socket.once(\"error\", onError);\n\n socket.connect(port, host, () => {\n socket.destroy();\n resolve();\n });\n };\n\n tryConnect();\n });\n}\n\n// Wait for the health check to be successful\nexport function waitForHealth(url: string, maxAttempts = 10): Promise<void> {\n return new Promise((resolve, reject) => {\n let attempts = 0;\n\n const tryHealth = async () => {\n attempts++;\n\n try {\n const response = await fetch(`${url}/api/health`);\n if (response.status === 200) {\n resolve();\n return;\n }\n } catch {\n // Ignore fetch errors and continue retrying\n }\n\n if (attempts === maxAttempts) {\n reject(\n new Error(`Timed out waiting for health check at ${url}/api/health`),\n );\n return;\n }\n\n setTimeout(tryHealth, 500);\n };\n\n tryHealth();\n });\n}\n","import { existsSync, readdirSync, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport PocketBase from \"pocketbase\";\nimport { detect } from \"package-manager-detector\";\nimport { resolveCommand } from \"package-manager-detector/commands\";\nimport spawn from \"cross-spawn\";\nimport { randomPort, waitForPort, waitForHealth } from \"./net\";\nimport type { Options } from \"../core/types\";\nimport { DATA_DIR, MIGRATIONS_DIR } from \"../core/constants\";\n\n/**\n * PocketBase names migration files with a 1-second-resolution Unix timestamp\n * (e.g. `1776099881_created_users.js`). Two schema operations issued in the\n * same wall-clock second produce files that sort alphabetically by their\n * action/collection suffix — which reverses the intended order whenever a\n * later migration depends on an earlier one. Wait out the full second between\n * migration-producing calls so the timestamps stay distinct.\n */\nconst MIGRATION_DELAY_MS = 1100;\n\nexport function migrationDelay(): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, MIGRATION_DELAY_MS));\n}\n\nexport function getMigrationFile(\n collectionName: string,\n action: \"created\" | \"deleted\" | \"updated\",\n options: Options,\n): string | undefined {\n const ending = `${action}_${collectionName}.js`;\n\n // find last file with ending in migrations dir\n const migrationFiles = readdirSync(\n path.join(options.root, MIGRATIONS_DIR),\n ).filter((file) => file.endsWith(ending));\n\n const migrationFile = migrationFiles.sort().pop();\n\n if (!migrationFile) {\n return undefined;\n }\n\n return path.join(options.root, MIGRATIONS_DIR, migrationFile);\n}\n\nexport function getPocketbaseMetadata(cwd: string): {\n pocketbaseUrl: string;\n vitePort: number;\n} | null {\n const metadataPath = path.join(\n cwd,\n \"node_modules\",\n \".vite\",\n \"_pocketbase_metadata.json\",\n );\n if (existsSync(metadataPath)) {\n return JSON.parse(readFileSync(metadataPath, \"utf8\"));\n }\n return null;\n}\n\nexport async function authWithRetries(\n pb: PocketBase,\n email: string,\n password: string,\n) {\n // Retry authentication up to 3 times with 100ms backoff\n let authSuccess = false;\n for (let attempt = 1; attempt <= 3; attempt++) {\n try {\n await pb.collection(\"_superusers\").authWithPassword(email, password);\n authSuccess = true;\n break;\n } catch {\n if (attempt < 3) {\n await new Promise((resolve) => setTimeout(resolve, 100));\n }\n }\n }\n\n if (!authSuccess) {\n throw new Error(\n \"Failed to authenticate with PocketBase. Check your superuser credentials.\",\n );\n }\n}\n\nexport async function withPocketbase(\n cwd: string,\n fn: (pb: PocketBase) => Promise<void>,\n) {\n const dir = path.join(cwd, DATA_DIR);\n const migrationsDir = path.join(cwd, MIGRATIONS_DIR);\n const host = \"localhost\";\n\n if (!existsSync(dir)) {\n throw new Error(\"PocketBase data directory does not exist\");\n }\n\n // First check if the server is already running by reading node_modules/.vite/_pocketbase_metadata.json\n const metadata = getPocketbaseMetadata(cwd);\n if (metadata) {\n if (metadata.pocketbaseUrl) {\n const pb = new PocketBase(metadata.pocketbaseUrl);\n await authWithRetries(\n pb,\n process.env.POCKETBASE_SUPERUSER_EMAIL!,\n process.env.POCKETBASE_SUPERUSER_PASSWORD!,\n );\n await fn(pb);\n return;\n }\n }\n\n const port = randomPort();\n const commandArgs = [\n \"pocketbase-server\",\n \"serve\",\n \"--dir\",\n dir,\n \"--migrationsDir\",\n migrationsDir,\n \"--http\",\n `${host}:${port}`,\n ];\n\n const packageManager = (await detect({ cwd }))?.name ?? \"npm\";\n const { command, args } = resolveCommand(\n packageManager,\n \"execute\",\n commandArgs,\n )!;\n\n // adding --yes as the first parameter helps avoiding the \"Need to install the following packages:\" message\n if (packageManager === \"npm\") args.unshift(\"--yes\");\n\n // Start the PocketBase server process\n const serverProcess = spawn(command, args, {\n stdio: \"ignore\",\n });\n\n try {\n // Wait for the server to be ready\n await waitForPort(port, host);\n await waitForHealth(`http://${host}:${port}`);\n\n const pb = new PocketBase(`http://${host}:${port}`);\n await authWithRetries(\n pb,\n process.env.POCKETBASE_SUPERUSER_EMAIL!,\n process.env.POCKETBASE_SUPERUSER_PASSWORD!,\n );\n await fn(pb);\n } finally {\n // Ensure we always clean up the process\n serverProcess.kill();\n }\n}\n"],"names":["randomPort","waitForPort","port","host","maxAttempts","resolve","reject","attempts","tryConnect","socket","net","onError","waitForHealth","url","tryHealth","MIGRATION_DELAY_MS","migrationDelay","getMigrationFile","collectionName","action","options","ending","migrationFile","readdirSync","path","MIGRATIONS_DIR","file","getPocketbaseMetadata","cwd","metadataPath","existsSync","readFileSync","authWithRetries","pb","email","password","authSuccess","attempt","withPocketbase","fn","dir","DATA_DIR","migrationsDir","metadata","PocketBase","commandArgs","packageManager","_a","detect","command","args","resolveCommand","serverProcess","spawn"],"mappings":";;;;;;;;AAGO,SAASA,IAAa;AAC3B,SAAO,KAAK,MAAM,KAAK,OAAA,IAAW,GAAK,IAAI;AAC7C;AAGO,SAASC,EACdC,GACAC,GACAC,IAAc,IACC;AACf,SAAO,IAAI,QAAQ,CAACC,GAASC,MAAW;AACtC,QAAIC,IAAW;AAEf,UAAMC,IAAa,MAAM;AACvB,MAAAD;AAEA,YAAME,IAAS,IAAIC,EAAI,OAAA,GAEjBC,IAAU,MAAM;AAGpB,YAFAF,EAAO,QAAA,GAEHF,MAAaH,GAAa;AAC5B,UAAAE;AAAA,YACE,IAAI,MAAM,8BAA8BJ,CAAI,kBAAkB;AAAA,UAAA;AAEhE;AAAA,QACF;AAEA,mBAAWM,GAAY,GAAG;AAAA,MAC5B;AAEA,MAAAC,EAAO,KAAK,SAASE,CAAO,GAE5BF,EAAO,QAAQP,GAAMC,GAAM,MAAM;AAC/B,QAAAM,EAAO,QAAA,GACPJ,EAAA;AAAA,MACF,CAAC;AAAA,IACH;AAEA,IAAAG,EAAA;AAAA,EACF,CAAC;AACH;AAGO,SAASI,EAAcC,GAAaT,IAAc,IAAmB;AAC1E,SAAO,IAAI,QAAQ,CAACC,GAASC,MAAW;AACtC,QAAIC,IAAW;AAEf,UAAMO,IAAY,YAAY;AAC5B,MA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;AAAA,MACZ,QAAQ,IAAI;AAAA,IAAA,GAEd,MAAMM,EAAGN,CAAE;AAAA,EACb,UAAA;AAEE,IAAAmB,EAAc,KAAA;AAAA,EAChB;AACF;"}
1
+ {"version":3,"file":"pocketbase-rvyHmLFw.js","sources":["../../src/runtime/net.ts","../../src/runtime/pocketbase.ts"],"sourcesContent":["import net from \"node:net\";\n\n// Generate a random port\nexport function randomPort() {\n return Math.floor(Math.random() * 10000) + 10000;\n}\n\n// Wait for the port to be available\nexport function waitForPort(\n port: number,\n host: string,\n maxAttempts = 10,\n): Promise<void> {\n return new Promise((resolve, reject) => {\n let attempts = 0;\n\n const tryConnect = () => {\n attempts++;\n\n const socket = new net.Socket();\n\n const onError = () => {\n socket.destroy();\n\n if (attempts === maxAttempts) {\n reject(\n new Error(`Timed out waiting for port ${port} to be available`),\n );\n return;\n }\n\n setTimeout(tryConnect, 500);\n };\n\n socket.once(\"error\", onError);\n\n socket.connect(port, host, () => {\n socket.destroy();\n resolve();\n });\n };\n\n tryConnect();\n });\n}\n\n// Wait for the health check to be successful\nexport function waitForHealth(url: string, maxAttempts = 10): Promise<void> {\n return new Promise((resolve, reject) => {\n let attempts = 0;\n\n const tryHealth = async () => {\n attempts++;\n\n try {\n const response = await fetch(`${url}/api/health`);\n if (response.status === 200) {\n resolve();\n return;\n }\n } catch {\n // Ignore fetch errors and continue retrying\n }\n\n if (attempts === maxAttempts) {\n reject(\n new Error(`Timed out waiting for health check at ${url}/api/health`),\n );\n return;\n }\n\n setTimeout(tryHealth, 500);\n };\n\n tryHealth();\n });\n}\n","import { existsSync, readdirSync, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport PocketBase from \"pocketbase\";\nimport { detect } from \"package-manager-detector\";\nimport { resolveCommand } from \"package-manager-detector/commands\";\nimport spawn from \"cross-spawn\";\nimport { randomPort, waitForPort, waitForHealth } from \"./net\";\nimport type { Options } from \"../core/types\";\nimport { DATA_DIR, MIGRATIONS_DIR } from \"../core/constants\";\n\n/**\n * PocketBase names migration files with a 1-second-resolution Unix timestamp\n * (e.g. `1776099881_created_users.js`). Two schema operations issued in the\n * same wall-clock second produce files that sort alphabetically by their\n * action/collection suffix — which reverses the intended order whenever a\n * later migration depends on an earlier one. Wait out the full second between\n * migration-producing calls so the timestamps stay distinct.\n */\nconst MIGRATION_DELAY_MS = 1100;\n\nexport function migrationDelay(): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, MIGRATION_DELAY_MS));\n}\n\nexport function getMigrationFile(\n collectionName: string,\n action: \"created\" | \"deleted\" | \"updated\",\n options: Options,\n): string | undefined {\n const ending = `${action}_${collectionName}.js`;\n\n // find last file with ending in migrations dir\n const migrationFiles = readdirSync(\n path.join(options.root, MIGRATIONS_DIR),\n ).filter((file) => file.endsWith(ending));\n\n const migrationFile = migrationFiles.sort().pop();\n\n if (!migrationFile) {\n return undefined;\n }\n\n return path.join(options.root, MIGRATIONS_DIR, migrationFile);\n}\n\nexport function getPocketbaseMetadata(cwd: string): {\n pocketbaseUrl: string;\n vitePort: number;\n} | null {\n const metadataPath = path.join(\n cwd,\n \"node_modules\",\n \".vite\",\n \"_pocketbase_metadata.json\",\n );\n if (existsSync(metadataPath)) {\n return JSON.parse(readFileSync(metadataPath, \"utf8\"));\n }\n return null;\n}\n\nexport async function authWithRetries(\n pb: PocketBase,\n email: string,\n password: string,\n) {\n // Retry authentication up to 3 times with 100ms backoff\n let authSuccess = false;\n for (let attempt = 1; attempt <= 3; attempt++) {\n try {\n await pb.collection(\"_superusers\").authWithPassword(email, password);\n authSuccess = true;\n break;\n } catch {\n if (attempt < 3) {\n await new Promise((resolve) => setTimeout(resolve, 100));\n }\n }\n }\n\n if (!authSuccess) {\n throw new Error(\n \"Failed to authenticate with PocketBase. Check your superuser credentials.\",\n );\n }\n}\n\nexport async function withPocketbase(\n cwd: string,\n fn: (pb: PocketBase) => Promise<void>,\n) {\n const dir = path.join(cwd, DATA_DIR);\n const migrationsDir = path.join(cwd, MIGRATIONS_DIR);\n const host = \"localhost\";\n\n if (!existsSync(dir)) {\n throw new Error(\"PocketBase data directory does not exist\");\n }\n\n // First check if the server is already running by reading node_modules/.vite/_pocketbase_metadata.json\n const metadata = getPocketbaseMetadata(cwd);\n if (metadata) {\n if (metadata.pocketbaseUrl) {\n const pb = new PocketBase(metadata.pocketbaseUrl);\n await authWithRetries(\n pb,\n process.env.POCKETBASE_SUPERUSER_EMAIL!,\n process.env.POCKETBASE_SUPERUSER_PASSWORD!,\n );\n await fn(pb);\n return;\n }\n }\n\n const port = randomPort();\n const commandArgs = [\n \"pocketbase-server\",\n \"serve\",\n \"--dir\",\n dir,\n \"--migrationsDir\",\n migrationsDir,\n \"--http\",\n `${host}:${port}`,\n ];\n\n const packageManager = (await detect({ cwd }))?.name ?? \"npm\";\n const { command, args } = resolveCommand(\n packageManager,\n \"execute\",\n commandArgs,\n )!;\n\n // adding --yes as the first parameter helps avoiding the \"Need to install the following packages:\" message\n if (packageManager === \"npm\") args.unshift(\"--yes\");\n\n // Start the PocketBase server process\n const serverProcess = spawn(command, args, {\n stdio: \"ignore\",\n });\n\n try {\n // Wait for the server to be ready\n await waitForPort(port, host);\n await waitForHealth(`http://${host}:${port}`);\n\n const pb = new PocketBase(`http://${host}:${port}`);\n await authWithRetries(\n pb,\n process.env.POCKETBASE_SUPERUSER_EMAIL!,\n process.env.POCKETBASE_SUPERUSER_PASSWORD!,\n );\n await fn(pb);\n } finally {\n // Ensure we always clean up the process\n serverProcess.kill();\n }\n}\n"],"names":["randomPort","waitForPort","port","host","maxAttempts","resolve","reject","attempts","tryConnect","socket","net","onError","waitForHealth","url","tryHealth","MIGRATION_DELAY_MS","migrationDelay","getMigrationFile","collectionName","action","options","ending","migrationFile","readdirSync","path","MIGRATIONS_DIR","file","getPocketbaseMetadata","cwd","metadataPath","existsSync","readFileSync","authWithRetries","pb","email","password","authSuccess","attempt","withPocketbase","fn","dir","DATA_DIR","migrationsDir","metadata","PocketBase","commandArgs","packageManager","_a","detect","command","args","resol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ChD,UAAMX;AAAA,MACJC;AAAA,MACA,QAAQ,IAAI;AAAA,MACZ,QAAQ,IAAI;AAAA,IAAA,GAEd,MAAMM,EAAGN,CAAE;AACX;AAAA,EACF;AAGF,QAAM/B,IAAOF,EAAA,GACP6C,IAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACAL;AAAA,IACA;AAAA,IACAE;AAAA,IACA;AAAA,IACA,GAAGvC,CAAI,IAAID,CAAI;AAAA,EAAA,GAGX4C,MAAkBC,IAAA,MAAMC,EAAO,EAAE,KAAApB,EAAA,CAAK,MAApB,gBAAAmB,EAAwB,SAAQ,OAClD,EAAE,SAAAE,GAAS,MAAAC,EAAA,IAASC;AAAA,IACxBL;AAAA,IACA;AAAA,IACAD;AAAA,EAAA;AAIF,EAAIC,MAAmB,SAAOI,EAAK,QAAQ,OAAO;AAGlD,QAAME,IAAgBC,EAAMJ,GAASC,GAAM;AAAA,IACzC,OAAO;AAAA,EAAA,CACR;AAED,MAAI;AAEF,UAAMjD,EAAYC,GAAMC,CAAI,GAC5B,MAAMS,EAAc,UAAUT,CAAI,IAAID,CAAI,EAAE;AAE5C,UAAM+B,IAAK,IAAIW,EAAW,UAAUzC,CAAI,IAAID,CAAI,EAAE;AAClD,UAAM8B;AAAA,MACJC;AAAA,MACA,QAAQ,IAAI;AAAA,MACZ,QAAQ,IAAI;AAAA,IAAA,GAEd,MAAMM,EAAGN,CAAE;AAAA,EACb,UAAA;AAEE,IAAAmB,EAAc,KAAA;AAAA,EAChB;AACF;"}
@@ -771,16 +771,18 @@ export { default as UrlCell } from "./url.svelte";
771
771
  const onremove = (file: File | string) => {
772
772
  if (typeof file === 'string') {
773
773
  removed.push(file);
774
- }
775
-
776
- reset({
777
- data: {
778
- ...$formData,
779
- [ctx.name]: $formData[ctx.name].filter((f: File | string) => f !== file) as
780
- | File[]
781
- | undefined
774
+ } else {
775
+ if (Array.isArray($formData[\`\${ctx.name}+\`])) {
776
+ reset({
777
+ data: {
778
+ ...$formData,
779
+ [\`\${ctx.name}+\`]: $formData[\`\${ctx.name}+\`].filter((f: File | string) => f !== file) as
780
+ | File[]
781
+ | undefined
782
+ }
783
+ });
782
784
  }
783
- });
785
+ }
784
786
  };
785
787
 
786
788
  const initialFiles = $formData[ctx.name] || [];
@@ -1330,7 +1332,7 @@ export { default as Chip } from "./chip.svelte";
1330
1332
  {:else}
1331
1333
  {placeholder}
1332
1334
  {/if}
1333
- `, Ct = `<script lang="ts">
1335
+ `, yt = `<script lang="ts">
1334
1336
  import { getContext, type Snippet } from 'svelte';
1335
1337
  import { cn } from '$lib/utils';
1336
1338
  import { Command as CommandPrimitive } from 'bits-ui';
@@ -1369,7 +1371,7 @@ export { default as Chip } from "./chip.svelte";
1369
1371
  {label}
1370
1372
  <CheckIcon class={cn('ml-auto', !isSelected(value) && 'text-transparent')} />
1371
1373
  </Command.Item>
1372
- `, wt = `<script lang="ts">
1374
+ `, Ct = `<script lang="ts">
1373
1375
  import * as Popover from '$lib/components/ui/popover';
1374
1376
  import { Popover as PopoverPrimitive } from 'bits-ui';
1375
1377
  import { cn } from '$lib/utils';
@@ -1387,7 +1389,7 @@ export { default as Chip } from "./chip.svelte";
1387
1389
  {@render children?.()}
1388
1390
  <ChevronDownIcon class="size-4 opacity-50" />
1389
1391
  </Popover.Trigger>
1390
- `, yt = `export { default as Pagination } from "./pagination.svelte";
1392
+ `, wt = `export { default as Pagination } from "./pagination.svelte";
1391
1393
  `, Mt = `<script lang="ts">
1392
1394
  import * as Select from '$lib/components/ui/select';
1393
1395
  import { Button } from '$lib/components/ui/button';
@@ -1577,9 +1579,9 @@ export { default as Chip } from "./chip.svelte";
1577
1579
  "../ui/components/multiselect/field.svelte": ht,
1578
1580
  "../ui/components/multiselect/index.ts": _t,
1579
1581
  "../ui/components/multiselect/input.svelte": xt,
1580
- "../ui/components/multiselect/item.svelte": Ct,
1581
- "../ui/components/multiselect/trigger.svelte": wt,
1582
- "../ui/components/pagination/index.ts": yt,
1582
+ "../ui/components/multiselect/item.svelte": yt,
1583
+ "../ui/components/multiselect/trigger.svelte": Ct,
1584
+ "../ui/components/pagination/index.ts": wt,
1583
1585
  "../ui/components/pagination/pagination.svelte": Mt,
1584
1586
  "../ui/components/row-actions/index.ts": Tt,
1585
1587
  "../ui/components/row-actions/row-actions.svelte": $t
@@ -1587,11 +1589,11 @@ export { default as Chip } from "./chip.svelte";
1587
1589
  function kt() {
1588
1590
  return [
1589
1591
  ...new Set(
1590
- Object.keys(x).map(C)
1592
+ Object.keys(x).map(y)
1591
1593
  )
1592
1594
  ].filter(Boolean).sort();
1593
1595
  }
1594
- function C(t) {
1596
+ function y(t) {
1595
1597
  const n = t.split("/"), e = n.indexOf("components");
1596
1598
  return n[e + 1] ?? "";
1597
1599
  }
@@ -1632,7 +1634,7 @@ async function Nt(t, n, e) {
1632
1634
  });
1633
1635
  });
1634
1636
  }
1635
- async function w(t, n, e, o) {
1637
+ async function C(t, n, e, o) {
1636
1638
  if (o != null && o.executeCommand) {
1637
1639
  await o.executeCommand(t, n, e);
1638
1640
  return;
@@ -1651,11 +1653,11 @@ function St(t) {
1651
1653
  ...Object.keys(e.peerDependencies ?? {})
1652
1654
  ]);
1653
1655
  }
1654
- async function y(t, n, e) {
1656
+ async function w(t, n, e) {
1655
1657
  if (n.length === 0)
1656
1658
  return [];
1657
1659
  const o = St(t), i = [...new Set(n)].filter((s) => !o.has(s));
1658
- return i.length === 0 ? [] : (await w(t, "install", i, e), i);
1660
+ return i.length === 0 ? [] : (await C(t, "install", i, e), i);
1659
1661
  }
1660
1662
  function b(t) {
1661
1663
  return kt().includes(t);
@@ -1671,7 +1673,7 @@ function Et(t, n) {
1671
1673
  const e = l.join(n, t);
1672
1674
  f(e, { recursive: !0 });
1673
1675
  for (const [o, i] of Object.entries(x)) {
1674
- if (C(o) !== t)
1676
+ if (y(o) !== t)
1675
1677
  continue;
1676
1678
  const s = Lt(o);
1677
1679
  if (!s)
@@ -1699,12 +1701,12 @@ async function Ft(t, n, e) {
1699
1701
  const p = [];
1700
1702
  for (const a of [...r].sort())
1701
1703
  Et(a, o), p.push(a), c.delete(a);
1702
- const u = await y(
1704
+ const u = await w(
1703
1705
  t,
1704
1706
  At([...r]),
1705
1707
  e
1706
1708
  ), m = [...c].sort();
1707
- return m.length > 0 && (await w(
1709
+ return m.length > 0 && (await C(
1708
1710
  t,
1709
1711
  "execute",
1710
1712
  ["shadcn-svelte", "add", "--yes", "--overwrite", ...m],
@@ -1721,7 +1723,7 @@ async function Ot(t, n, e) {
1721
1723
  h(v(n.root, s.path), s.content);
1722
1724
  for (const s of t.deletes)
1723
1725
  It(v(n.root, s.path));
1724
- const o = await y(
1726
+ const o = await w(
1725
1727
  n.root,
1726
1728
  t.packages,
1727
1729
  e
@@ -1739,4 +1741,4 @@ async function Ot(t, n, e) {
1739
1741
  export {
1740
1742
  Ot as writeResult
1741
1743
  };
1742
- //# sourceMappingURL=write-result-DmD7kWlV.js.map
1744
+ //# sourceMappingURL=write-result-1Q3LB_k4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-result-1Q3LB_k4.js","sources":["../../src/ui/components/auth-menu/auth-menu-content.svelte?raw","../../src/ui/components/auth-menu/auth-menu-group.svelte?raw","../../src/ui/components/auth-menu/auth-menu-item.svelte?raw","../../src/ui/components/auth-menu/auth-menu-label.svelte?raw","../../src/ui/components/auth-menu/auth-menu-separator.svelte?raw","../../src/ui/components/auth-menu/auth-menu-trigger.svelte?raw","../../src/ui/components/auth-menu/auth-menu.svelte?raw","../../src/ui/components/auth-menu/context.ts?raw","../../src/ui/components/auth-menu/index.ts?raw","../../src/ui/components/cells/autodate.svelte?raw","../../src/ui/components/cells/bool.svelte?raw","../../src/ui/components/cells/date.svelte?raw","../../src/ui/components/cells/editor.svelte?raw","../../src/ui/components/cells/email.svelte?raw","../../src/ui/components/cells/file.svelte?raw","../../src/ui/components/cells/geoPoint.svelte?raw","../../src/ui/components/cells/index.ts?raw","../../src/ui/components/cells/json.svelte?raw","../../src/ui/components/cells/number.svelte?raw","../../src/ui/components/cells/password.svelte?raw","../../src/ui/components/cells/relation.svelte?raw","../../src/ui/components/cells/select.svelte?raw","../../src/ui/components/cells/text.svelte?raw","../../src/ui/components/cells/url.svelte?raw","../../src/ui/components/column-header/column-header.svelte?raw","../../src/ui/components/column-header/index.ts?raw","../../src/ui/components/faceted-filter/faceted-filter.svelte?raw","../../src/ui/components/faceted-filter/index.ts?raw","../../src/ui/components/file-form/file-field.svelte?raw","../../src/ui/components/file-form/file-input.svelte?raw","../../src/ui/components/file-form/file-multiple.svelte?raw","../../src/ui/components/file-form/file-single.svelte?raw","../../src/ui/components/file-form/file-thumb.svelte?raw","../../src/ui/components/file-form/index.ts?raw","../../src/ui/components/file-form/shared.ts?raw","../../src/ui/components/geopoint/coordinate.svelte?raw","../../src/ui/components/geopoint/index.ts?raw","../../src/ui/components/geopoint/input.svelte?raw","../../src/ui/components/geopoint/toggle-map.svelte?raw","../../src/ui/components/leaflet/index.ts?raw","../../src/ui/components/leaflet/leaflet.svelte?raw","../../src/ui/components/multiselect/chip.svelte?raw","../../src/ui/components/multiselect/content.svelte?raw","../../src/ui/components/multiselect/field.svelte?raw","../../src/ui/components/multiselect/index.ts?raw","../../src/ui/components/multiselect/input.svelte?raw","../../src/ui/components/multiselect/item.svelte?raw","../../src/ui/components/multiselect/trigger.svelte?raw","../../src/ui/components/pagination/index.ts?raw","../../src/ui/components/pagination/pagination.svelte?raw","../../src/ui/components/row-actions/index.ts?raw","../../src/ui/components/row-actions/row-actions.svelte?raw","../../src/runtime/write-result.ts"],"sourcesContent":["export default \"<script lang=\\\"ts\\\">\\n\\timport { cn } from '$lib/utils';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: DropdownMenuPrimitive.ContentProps & {\\n\\t\\tportalProps?: DropdownMenuPrimitive.PortalProps;\\n\\t} = $props();\\n\\n\\tlet { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Content class={className} {...restProps}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Content>\\n{:else}\\n\\t<div class={cn('flex flex-col w-full', className)}>\\n\\t\\t{@render children?.()}\\n\\t</div>\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tlet { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\tlet { children, ...restProps } = $props();\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Group {...restProps}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Group>\\n{:else}\\n\\t{@render children?.()}\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { goto } from '$app/navigation';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tlet { children, href = undefined, ...restProps } = $props();\\n\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\n\\tconst handleClick = () => {\\n\\t\\tif (restProps.onclick) {\\n\\t\\t\\trestProps.onclick();\\n\\t\\t} else {\\n\\t\\t\\tif (href) {\\n\\t\\t\\t\\tgoto(href);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Item {...restProps} onclick={handleClick}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Item>\\n{:else}\\n\\t<Button\\n\\t\\tclass=\\\"w-full justify-start md:justify-center md:w-auto\\\"\\n\\t\\tvariant=\\\"ghost\\\"\\n\\t\\t{href}\\n\\t\\t{...restProps}\\n\\t>\\n\\t\\t{@render children?.()}\\n\\t</Button>\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\tlet { children, ...restProps } = $props();\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Label {...restProps}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Label>\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\tlet restProps = $props();\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Separator {...restProps} />\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { cn } from '$lib/utils';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tlet { class: className = '', ...restProps } = $props();\\n\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Trigger class={cn('inline-flex', className)} {...restProps} />\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { page } from '$app/state';\\n\\timport { browser } from '$app/environment';\\n\\timport { onMount, setContext } from 'svelte';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\n\\tlet { user, guest } = $props();\\n\\n\\tconst breakpoint = 768;\\n\\tconst breakpointQuery = `(min-width: ${breakpoint}px)`;\\n\\n\\tlet hasMounted = $state(false);\\n\\tlet authMenuContext = $state<AuthMenuContext>({ isDesktop: true });\\n\\n\\tsetContext(AUTH_MENU_CONTEXT_KEY, authMenuContext);\\n\\n\\tfunction updateIsDesktop() {\\n\\t\\tif (!browser) return;\\n\\t\\tauthMenuContext.isDesktop = window.matchMedia(breakpointQuery).matches;\\n\\t}\\n\\n\\tonMount(() => {\\n\\t\\tupdateIsDesktop();\\n\\t\\thasMounted = true;\\n\\t\\tconst mq = window.matchMedia(breakpointQuery);\\n\\t\\tconst listener = () => (authMenuContext.isDesktop = mq.matches);\\n\\t\\tmq.addEventListener('change', listener);\\n\\t\\treturn () => mq.removeEventListener('change', listener);\\n\\t});\\n</script>\\n\\n{#if page.data.user}\\n\\t{#if authMenuContext.isDesktop}\\n\\t\\t<DropdownMenu.Root>\\n\\t\\t\\t{@render user?.()}\\n\\t\\t</DropdownMenu.Root>\\n\\t{:else}\\n\\t\\t<!-- This prevents the menu from being rendered twice before we know if we're on desktop or not -->\\n\\t\\t{#if hasMounted}\\n\\t\\t\\t{@render user?.()}\\n\\t\\t{/if}\\n\\t{/if}\\n{:else}\\n\\t{@render guest?.()}\\n{/if}\\n\"","export default \"export type AuthMenuContext = {\\n isDesktop: boolean;\\n};\\n\\nexport const AUTH_MENU_CONTEXT_KEY = Symbol(\\\"auth-menu-context\\\");\\n\"","export default \"import Root from \\\"./auth-menu.svelte\\\";\\nimport Content from \\\"./auth-menu-content.svelte\\\";\\nimport Trigger from \\\"./auth-menu-trigger.svelte\\\";\\nimport Group from \\\"./auth-menu-group.svelte\\\";\\nimport Label from \\\"./auth-menu-label.svelte\\\";\\nimport Separator from \\\"./auth-menu-separator.svelte\\\";\\nimport Item from \\\"./auth-menu-item.svelte\\\";\\n\\nexport { Root, Content, Trigger, Group, Label, Separator, Item };\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{new Date(value).toLocaleDateString()}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: boolean | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value ? 'Yes' : 'No'}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{new Date(value).toLocaleDateString()}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport FileIcon from '@lucide/svelte/icons/file';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tcollectionId,\\n\\t\\tid,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string[] | string | undefined;\\n\\t\\tcollectionId: string;\\n\\t\\tid: string;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{#if Array.isArray(value)}\\n\\t\\t\\t{#each value.slice(0, 2) as filename}\\n\\t\\t\\t\\t{#if ['.jpg', '.png', '.jpeg', '.webp', '.gif'].some((ext) => filename.endsWith(ext))}\\n\\t\\t\\t\\t\\t<img\\n\\t\\t\\t\\t\\t\\tsrc=\\\"/api/files/{collectionId}/{id}/{filename}\\\"\\n\\t\\t\\t\\t\\t\\tclass=\\\"w-8 h-8 rounded-sm object-cover inline-block mr-2\\\"\\n\\t\\t\\t\\t\\t\\talt={filename}\\n\\t\\t\\t\\t\\t\\ttitle={filename}\\n\\t\\t\\t\\t\\t/>\\n\\t\\t\\t\\t{:else}\\n\\t\\t\\t\\t\\t<div\\n\\t\\t\\t\\t\\t\\tclass=\\\"inline-flex items-center justify-center w-8 h-8 bg-muted rounded-sm mr-2\\\"\\n\\t\\t\\t\\t\\t\\ttitle={filename}\\n\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t{/if}\\n\\t\\t\\t{/each}\\n\\t\\t\\t{#if value.length > 2}\\n\\t\\t\\t\\tand {value.length - 2} more files\\n\\t\\t\\t{/if}\\n\\t\\t{:else if ['.jpg', '.png', '.jpeg', '.webp', '.gif'].some((ext) => value.endsWith(ext))}\\n\\t\\t\\t<img\\n\\t\\t\\t\\tsrc=\\\"/api/files/{collectionId}/{id}/{value}\\\"\\n\\t\\t\\t\\tclass=\\\"w-8 h-8 rounded-sm object-cover\\\"\\n\\t\\t\\t\\talt={value}\\n\\t\\t\\t\\ttitle={value}\\n\\t\\t\\t/>\\n\\t\\t{:else}\\n\\t\\t\\t<div\\n\\t\\t\\t\\tclass=\\\"inline-flex items-center justify-center w-8 h-8 bg-muted rounded-sm\\\"\\n\\t\\t\\t\\ttitle={value}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t</div>\\n\\t\\t{/if}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport MapPinIcon from '@lucide/svelte/icons/map-pin';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: { lat: number; lon: number } | undefined;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center space-x-1', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t<MapPinIcon class=\\\"inline-block w-4 h-4 text-muted-foreground\\\" />\\n\\t\\t<span>{value.lat.toFixed(6)}, {value.lon.toFixed(6)}</span>\\n\\t{/if}\\n</div>\\n\"","export default \"export { default as AutodateCell } from \\\"./autodate.svelte\\\";\\nexport { default as BoolCell } from \\\"./bool.svelte\\\";\\nexport { default as DateCell } from \\\"./date.svelte\\\";\\nexport { default as EditorCell } from \\\"./editor.svelte\\\";\\nexport { default as EmailCell } from \\\"./email.svelte\\\";\\nexport { default as FileCell } from \\\"./file.svelte\\\";\\nexport { default as GeoPointCell } from \\\"./geoPoint.svelte\\\";\\nexport { default as JsonCell } from \\\"./json.svelte\\\";\\nexport { default as NumberCell } from \\\"./number.svelte\\\";\\nexport { default as PasswordCell } from \\\"./password.svelte\\\";\\nexport { default as RelationCell } from \\\"./relation.svelte\\\";\\nexport { default as SelectCell } from \\\"./select.svelte\\\";\\nexport { default as TextCell } from \\\"./text.svelte\\\";\\nexport { default as UrlCell } from \\\"./url.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: any } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value !== undefined}\\n\\t\\t{JSON.stringify(value)}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: number | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>********</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { Badge } from '$lib/components/ui/badge';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\texpanded,\\n\\t\\tdisplayField = 'id',\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string[] | string | undefined;\\n\\t\\texpanded: any;\\n\\t\\tdisplayField?: string;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if expanded}\\n\\t\\t{#if Array.isArray(expanded)}\\n\\t\\t\\t{#each expanded.slice(0, 2) as item}\\n\\t\\t\\t\\t<Badge variant=\\\"outline\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t\\t{item[displayField]}\\n\\t\\t\\t\\t</Badge>\\n\\t\\t\\t{/each}\\n\\t\\t\\t{#if expanded.length > 2}\\n\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t\\t+{expanded.length - 2}\\n\\t\\t\\t\\t</Badge>\\n\\t\\t\\t{/if}\\n\\t\\t{:else}\\n\\t\\t\\t<Badge variant=\\\"outline\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t{expanded[displayField]}\\n\\t\\t\\t</Badge>\\n\\t\\t{/if}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { Badge } from '$lib/components/ui/badge';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\toptions,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string[] | string | undefined;\\n\\t\\toptions: Record<string, { label: string; value: string }>;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{#if Array.isArray(value)}\\n\\t\\t\\t{#each value.slice(0, 2) as item}\\n\\t\\t\\t\\t<Badge variant=\\\"outline\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t\\t{options[item].label}\\n\\t\\t\\t\\t</Badge>\\n\\t\\t\\t{/each}\\n\\t\\t{:else}\\n\\t\\t\\t{options[value].label}\\n\\t\\t{/if}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\ttarget = '_blank',\\n\\t\\trel = 'noopener noreferrer',\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string | undefined;\\n\\t\\ttarget?: string;\\n\\t\\trel?: string;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t<a href={value} {target} {rel}>{value}</a>\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport type { Column } from '@tanstack/table-core';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport ArrowUpIcon from '@lucide/svelte/icons/arrow-up';\\n\\timport ArrowDownIcon from '@lucide/svelte/icons/arrow-down';\\n\\timport ChevronsUpDownIcon from '@lucide/svelte/icons/chevrons-up-down';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tcolumn,\\n\\t\\ttitle,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { column: Column<any>; title: string } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n{#if !column?.getCanSort()}\\n\\t<div class={className} {...restProps}>\\n\\t\\t{title}\\n\\t</div>\\n{:else}\\n\\t<div class={cn('flex items-center', className)} {...restProps}>\\n\\t\\t<DropdownMenu.Root>\\n\\t\\t\\t<DropdownMenu.Trigger>\\n\\t\\t\\t\\t{#snippet child({ props })}\\n\\t\\t\\t\\t\\t<Button\\n\\t\\t\\t\\t\\t\\t{...props}\\n\\t\\t\\t\\t\\t\\tvariant=\\\"ghost\\\"\\n\\t\\t\\t\\t\\t\\tsize=\\\"sm\\\"\\n\\t\\t\\t\\t\\t\\tclass=\\\"data-[state=open]:bg-accent -ml-3 h-8\\\"\\n\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t<span>\\n\\t\\t\\t\\t\\t\\t\\t{title}\\n\\t\\t\\t\\t\\t\\t</span>\\n\\t\\t\\t\\t\\t\\t{#if column.getIsSorted() === 'desc'}\\n\\t\\t\\t\\t\\t\\t\\t<ArrowDownIcon />\\n\\t\\t\\t\\t\\t\\t{:else if column.getIsSorted() === 'asc'}\\n\\t\\t\\t\\t\\t\\t\\t<ArrowUpIcon />\\n\\t\\t\\t\\t\\t\\t{:else}\\n\\t\\t\\t\\t\\t\\t\\t<ChevronsUpDownIcon />\\n\\t\\t\\t\\t\\t\\t{/if}\\n\\t\\t\\t\\t\\t</Button>\\n\\t\\t\\t\\t{/snippet}\\n\\t\\t\\t</DropdownMenu.Trigger>\\n\\t\\t\\t<DropdownMenu.Content align=\\\"start\\\">\\n\\t\\t\\t\\t<DropdownMenu.Item onclick={() => column.toggleSorting(false)}>\\n\\t\\t\\t\\t\\t<ArrowUpIcon class=\\\"text-muted-foreground/70 mr-2 size-3.5\\\" />\\n\\t\\t\\t\\t\\tAsc\\n\\t\\t\\t\\t</DropdownMenu.Item>\\n\\t\\t\\t\\t<DropdownMenu.Item onclick={() => column.toggleSorting(true)}>\\n\\t\\t\\t\\t\\t<ArrowDownIcon class=\\\"text-muted-foreground/70 mr-2 size-3.5\\\" />\\n\\t\\t\\t\\t\\tDesc\\n\\t\\t\\t\\t</DropdownMenu.Item>\\n\\t\\t\\t</DropdownMenu.Content>\\n\\t\\t</DropdownMenu.Root>\\n\\t</div>\\n{/if}\\n\"","export default \"export { default as ColumnHeader } from \\\"./column-header.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"TData, TValue\\\">\\n\\timport type { Component } from 'svelte';\\n\\timport { SvelteSet } from 'svelte/reactivity';\\n\\timport type { Column } from '@tanstack/table-core';\\n\\timport CirclePlusIcon from '@lucide/svelte/icons/circle-plus';\\n\\timport CheckIcon from '@lucide/svelte/icons/check';\\n\\timport * as Command from '$lib/components/ui/command';\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport { Separator } from '$lib/components/ui/separator';\\n\\timport { Badge } from '$lib/components/ui/badge';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tcolumn,\\n\\t\\ttitle,\\n\\t\\toptions\\n\\t}: {\\n\\t\\tcolumn: Column<TData, TValue>;\\n\\t\\ttitle: string;\\n\\t\\toptions: {\\n\\t\\t\\tlabel: string;\\n\\t\\t\\tvalue: string;\\n\\t\\t\\ticon?: Component;\\n\\t\\t}[];\\n\\t} = $props();\\n\\n\\tconst facets = $derived(column?.getFacetedUniqueValues());\\n\\tconst selectedValues = $derived(new SvelteSet(column?.getFilterValue() as string[]));\\n</script>\\n\\n<Popover.Root>\\n\\t<Popover.Trigger>\\n\\t\\t{#snippet child({ props })}\\n\\t\\t\\t<Button {...props} variant=\\\"outline\\\" size=\\\"sm\\\" class=\\\"h-8 border-dashed\\\">\\n\\t\\t\\t\\t<CirclePlusIcon />\\n\\t\\t\\t\\t{title}\\n\\t\\t\\t\\t{#if selectedValues.size > 0}\\n\\t\\t\\t\\t\\t<Separator orientation=\\\"vertical\\\" class=\\\"mx-2 h-4\\\" />\\n\\t\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"rounded-sm px-1 font-normal lg:hidden\\\">\\n\\t\\t\\t\\t\\t\\t{selectedValues.size}\\n\\t\\t\\t\\t\\t</Badge>\\n\\t\\t\\t\\t\\t<div class=\\\"hidden space-x-1 lg:flex\\\">\\n\\t\\t\\t\\t\\t\\t{#if selectedValues.size > 2}\\n\\t\\t\\t\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"rounded-sm px-1 font-normal\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t{selectedValues.size} selected\\n\\t\\t\\t\\t\\t\\t\\t</Badge>\\n\\t\\t\\t\\t\\t\\t{:else}\\n\\t\\t\\t\\t\\t\\t\\t{#each options.filter((opt) => selectedValues.has(opt.value)) as option (option)}\\n\\t\\t\\t\\t\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"rounded-sm px-1 font-normal\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{option.label}\\n\\t\\t\\t\\t\\t\\t\\t\\t</Badge>\\n\\t\\t\\t\\t\\t\\t\\t{/each}\\n\\t\\t\\t\\t\\t\\t{/if}\\n\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t{/if}\\n\\t\\t\\t</Button>\\n\\t\\t{/snippet}\\n\\t</Popover.Trigger>\\n\\t<Popover.Content class=\\\"w-[200px] p-0\\\" align=\\\"start\\\">\\n\\t\\t<Command.Root>\\n\\t\\t\\t<Command.Input placeholder={title} />\\n\\t\\t\\t<Command.List>\\n\\t\\t\\t\\t<Command.Empty>No results found.</Command.Empty>\\n\\t\\t\\t\\t<Command.Group>\\n\\t\\t\\t\\t\\t{#each options as option (option)}\\n\\t\\t\\t\\t\\t\\t{@const isSelected = selectedValues.has(option.value)}\\n\\t\\t\\t\\t\\t\\t<Command.Item\\n\\t\\t\\t\\t\\t\\t\\tonSelect={() => {\\n\\t\\t\\t\\t\\t\\t\\t\\tif (isSelected) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tselectedValues.delete(option.value);\\n\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tselectedValues.add(option.value);\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\tconst filterValues = Array.from(selectedValues);\\n\\t\\t\\t\\t\\t\\t\\t\\tcolumn?.setFilterValue(filterValues.length ? filterValues : undefined);\\n\\t\\t\\t\\t\\t\\t\\t}}\\n\\t\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\\t<div\\n\\t\\t\\t\\t\\t\\t\\t\\tclass={cn(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'border-primary mr-2 flex size-4 items-center justify-center rounded-sm border',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tisSelected ? 'bg-primary text-primary-foreground' : 'opacity-50 [&_svg]:invisible'\\n\\t\\t\\t\\t\\t\\t\\t\\t)}\\n\\t\\t\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\\t\\t<CheckIcon class=\\\"size-4\\\" />\\n\\t\\t\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t\\t\\t\\t{#if option.icon}\\n\\t\\t\\t\\t\\t\\t\\t\\t{@const Icon = option.icon}\\n\\t\\t\\t\\t\\t\\t\\t\\t<Icon class=\\\"text-muted-foreground\\\" />\\n\\t\\t\\t\\t\\t\\t\\t{/if}\\n\\n\\t\\t\\t\\t\\t\\t\\t<span>{option.label}</span>\\n\\t\\t\\t\\t\\t\\t\\t{#if facets?.get(option.value)}\\n\\t\\t\\t\\t\\t\\t\\t\\t<span class=\\\"ml-auto flex size-4 items-center justify-center font-mono text-xs\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{facets.get(option.value)}\\n\\t\\t\\t\\t\\t\\t\\t\\t</span>\\n\\t\\t\\t\\t\\t\\t\\t{/if}\\n\\t\\t\\t\\t\\t\\t</Command.Item>\\n\\t\\t\\t\\t\\t{/each}\\n\\t\\t\\t\\t</Command.Group>\\n\\t\\t\\t\\t{#if selectedValues.size > 0}\\n\\t\\t\\t\\t\\t<Command.Separator />\\n\\t\\t\\t\\t\\t<Command.Group>\\n\\t\\t\\t\\t\\t\\t<Command.Item\\n\\t\\t\\t\\t\\t\\t\\tonSelect={() => column?.setFilterValue(undefined)}\\n\\t\\t\\t\\t\\t\\t\\tclass=\\\"justify-center text-center\\\"\\n\\t\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\\tClear filters\\n\\t\\t\\t\\t\\t\\t</Command.Item>\\n\\t\\t\\t\\t\\t</Command.Group>\\n\\t\\t\\t\\t{/if}\\n\\t\\t\\t</Command.List>\\n\\t\\t</Command.Root>\\n\\t</Popover.Content>\\n</Popover.Root>\\n\"","export default \"export { default as FacetedFilter } from \\\"./faceted-filter.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"T extends Record<string, unknown>, U extends FormPath<T>\\\">\\n\\timport * as FormPrimitive from 'formsnap';\\n\\timport type { FormPath } from 'sveltekit-superforms';\\n\\timport { cn, type WithElementRef, type WithoutChildren } from '$lib/utils';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { setContext } from 'svelte';\\n\\n\\tlet {\\n\\t\\tref = $bindable(null),\\n\\t\\tclass: className,\\n\\t\\tform,\\n\\t\\tname,\\n\\t\\tchildren: childrenProp,\\n\\t\\t...restProps\\n\\t}: FormPrimitive.FieldProps<T, U> &\\n\\t\\tWithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();\\n\\n\\tsetContext('file-field', {\\n\\t\\tget form() {\\n\\t\\t\\treturn form;\\n\\t\\t},\\n\\t\\tget name() {\\n\\t\\t\\treturn name;\\n\\t\\t}\\n\\t});\\n</script>\\n\\n<FormPrimitive.Field {form} {name}>\\n\\t{#snippet children({ constraints, errors, tainted, value })}\\n\\t\\t<div bind:this={ref} data-slot=\\\"form-item\\\" class={cn('space-y-2', className)} {...restProps}>\\n\\t\\t\\t{@render childrenProp?.({ constraints, errors, tainted, value: value as T[U] })}\\n\\t\\t</div>\\n\\t{/snippet}\\n</FormPrimitive.Field>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { getContext } from 'svelte';\\n\\timport { fileProxy, filesProxy, type SuperForm } from 'sveltekit-superforms';\\n\\timport { Input } from '$lib/components/ui/input';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst { multiple } = getContext<{ multiple: boolean }>('file-field-multiple');\\n\\n\\tconst files = multiple ? filesProxy(ctx.form, `${ctx.name}+`) : fileProxy(ctx.form, ctx.name);\\n\\tconst { form: formData, reset } = ctx.form;\\n\\n\\tconst { ...props } = $props();\\n\\n\\tconst onchange = () => {\\n\\t\\treset({\\n\\t\\t\\tdata: $formData\\n\\t\\t});\\n\\t};\\n</script>\\n\\n{#if !multiple}\\n\\t{#if $formData[ctx.name]}\\n\\t\\t{#if typeof $formData[ctx.name] === 'string'}\\n\\t\\t\\t<input type=\\\"text\\\" name={ctx.name} value={$formData[ctx.name]} class=\\\"hidden\\\" />\\n\\t\\t{:else}\\n\\t\\t\\t<input type=\\\"file\\\" name={ctx.name} files={$files} class=\\\"hidden\\\" />\\n\\t\\t{/if}\\n\\t{:else}\\n\\t\\t<input type=\\\"text\\\" name={ctx.name} value=\\\"\\\" class=\\\"hidden\\\" />\\n\\t{/if}\\n{/if}\\n\\n<Input\\n\\ttype=\\\"file\\\"\\n\\tbind:files={$files}\\n\\t{multiple}\\n\\t{onchange}\\n\\t{...props}\\n\\tname={multiple ? `${ctx.name}+` : ''}\\n/>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { setContext, getContext } from 'svelte';\\n\\timport { type SuperForm } from 'sveltekit-superforms';\\n\\timport { getName } from './shared';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst {\\n\\t\\tdisplay,\\n\\t\\tinput\\n\\t}: {\\n\\t\\tdisplay: (props: {\\n\\t\\t\\tfile: File | string;\\n\\t\\t\\tfilename: string;\\n\\t\\t\\tonremove: (file: File | string) => void;\\n\\t\\t}) => any;\\n\\t\\tinput: () => any;\\n\\t} = $props();\\n\\n\\tsetContext('file-field-multiple', { multiple: true });\\n\\n\\tconst { form: formData, reset } = ctx.form;\\n\\n\\tlet removed = $state<string[]>([]);\\n\\n\\tconst onremove = (file: File | string) => {\\n\\t\\tif (typeof file === 'string') {\\n\\t\\t\\tremoved.push(file);\\n\\t\\t} else {\\n\\t\\t\\tif (Array.isArray($formData[`${ctx.name}+`])) {\\n\\t\\t\\t\\treset({\\n\\t\\t\\t\\t\\tdata: {\\n\\t\\t\\t\\t\\t\\t...$formData,\\n\\t\\t\\t\\t\\t\\t[`${ctx.name}+`]: $formData[`${ctx.name}+`].filter((f: File | string) => f !== file) as\\n\\t\\t\\t\\t\\t\\t\\t| File[]\\n\\t\\t\\t\\t\\t\\t\\t| undefined\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t});\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n\\n\\tconst initialFiles = $formData[ctx.name] || [];\\n</script>\\n\\n{#if initialFiles}\\n\\t{#each initialFiles as file}\\n\\t\\t{#if !removed.includes(file)}\\n\\t\\t\\t{@render display({ file, filename: getName(file), onremove })}\\n\\t\\t{/if}\\n\\t{/each}\\n{/if}\\n\\n{#each $formData[`${ctx.name}+`] as file}\\n\\t{#if file && typeof file !== 'string'}\\n\\t\\t{@render display({ file, filename: getName(file), onremove })}\\n\\t{/if}\\n{/each}\\n\\n{#each removed as removedFile}\\n\\t<input type=\\\"text\\\" name={`${ctx.name}-`} value={removedFile} class=\\\"hidden\\\" />\\n{/each}\\n\\n{@render input()}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { setContext, getContext } from 'svelte';\\n\\timport { type SuperForm } from 'sveltekit-superforms';\\n\\timport { getName } from './shared';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst {\\n\\t\\tdisplay,\\n\\t\\tinput\\n\\t}: {\\n\\t\\tdisplay: (props: {\\n\\t\\t\\tfile: File | string;\\n\\t\\t\\tfilename: string;\\n\\t\\t\\tonremove: (file: File | string) => void;\\n\\t\\t}) => any;\\n\\t\\tinput: () => any;\\n\\t} = $props();\\n\\n\\tconst { form: formData, reset } = ctx.form;\\n\\n\\tsetContext('file-field-multiple', { multiple: false });\\n\\n\\tconst onremove = () => {\\n\\t\\treset({\\n\\t\\t\\tdata: {\\n\\t\\t\\t\\t...$formData,\\n\\t\\t\\t\\t[ctx.name]: ''\\n\\t\\t\\t}\\n\\t\\t});\\n\\t};\\n</script>\\n\\n{#if $formData[ctx.name]}\\n\\t{@render display({ file: $formData[ctx.name], filename: getName($formData[ctx.name]), onremove })}\\n{/if}\\n\\n{@render input()}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { getContext } from 'svelte';\\n\\timport { type SuperForm } from 'sveltekit-superforms';\\n\\timport FileIcon from '@lucide/svelte/icons/file';\\n\\timport ImageIcon from '@lucide/svelte/icons/image';\\n\\timport { cn } from '$lib/utils';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst { form: formData } = ctx.form;\\n\\n\\tconst {\\n\\t\\tfile,\\n\\t\\tfilename,\\n\\t\\tcollectionId,\\n\\t\\tid,\\n\\t\\tthumb = '50x50',\\n\\t\\tclass: className,\\n\\t\\ttype = 'image',\\n\\t\\t...props\\n\\t}: {\\n\\t\\tfile: File | string;\\n\\t\\tfilename: string;\\n\\t\\tcollectionId?: string;\\n\\t\\tid?: string;\\n\\t\\tthumb?: string;\\n\\t\\tclass?: string;\\n\\t\\ttype?: 'image' | 'file';\\n\\t} & HTMLAttributes<HTMLImageElement> = $props();\\n\\n\\tconst isImage = $derived(\\n\\t\\ttype === 'image' ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.png') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.jpg') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.jpeg') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.gif') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.webp')\\n\\t);\\n\\n\\tfunction getUrl(file: string) {\\n\\t\\treturn `/api/files/${collectionId ?? $formData.collectionId}/${id ?? $formData.id}/${file}?thumb=${thumb}`;\\n\\t}\\n</script>\\n\\n{#if typeof file === 'string'}\\n\\t{#if (id ?? $formData.collectionId) && (id ?? $formData.id) && isImage}\\n\\t\\t<img src={getUrl(file)} alt={filename} class={className} {...props} />\\n\\t{:else}\\n\\t\\t<div\\n\\t\\t\\tclass={cn('flex items-center justify-center w-full h-full bg-muted rounded-md', className)}\\n\\t\\t\\t{...props as HTMLAttributes<HTMLDivElement>}\\n\\t\\t>\\n\\t\\t\\t{#if isImage}\\n\\t\\t\\t\\t<ImageIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t{:else}\\n\\t\\t\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t{/if}\\n\\t\\t</div>\\n\\t{/if}\\n{:else if isImage}\\n\\t<img src={URL.createObjectURL(file)} alt={filename} class={className} {...props} />\\n{:else}\\n\\t<div\\n\\t\\tclass={cn('flex items-center justify-center w-full h-full bg-muted rounded-md', className)}\\n\\t\\t{...props as HTMLAttributes<HTMLDivElement>}\\n\\t>\\n\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t</div>\\n{/if}\\n\"","export default \"export { default as Field } from \\\"./file-field.svelte\\\";\\nexport { default as Single } from \\\"./file-single.svelte\\\";\\nexport { default as Multiple } from \\\"./file-multiple.svelte\\\";\\nexport { default as Input } from \\\"./file-input.svelte\\\";\\nexport { default as Thumb } from \\\"./file-thumb.svelte\\\";\\n\"","export default \"export function getUrl(\\n file: File | string,\\n collectionId: string,\\n recordId: string,\\n thumb: string,\\n) {\\n return typeof file === \\\"string\\\"\\n ? `/api/files/${collectionId}/${recordId}/${file}?thumb=${thumb}`\\n : URL.createObjectURL(file);\\n}\\n\\nexport function getName(file: File | string) {\\n return typeof file === \\\"string\\\" ? (file.split(\\\"/\\\").pop() ?? \\\"\\\") : file.name;\\n}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue = $bindable(),\\n\\t\\tid,\\n\\t\\tlabel,\\n\\t\\tshortLabel,\\n\\t\\tmapOpen\\n\\t}: {\\n\\t\\tvalue: number;\\n\\t\\tid: string;\\n\\t\\tlabel: string;\\n\\t\\tshortLabel: string;\\n\\t\\tmapOpen: boolean;\\n\\t} = $props();\\n</script>\\n\\n<div\\n\\tclass={cn(\\n\\t\\t'border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground shadow-xs flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\\n\\t\\t'focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]',\\n\\t\\t'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\\n\\t\\t'pr-0 flex items-center',\\n\\t\\tlabel === 'Latitude' && 'rounded-r-none',\\n\\t\\tlabel === 'Longitude' && 'rounded-none -ml-px',\\n\\t\\tmapOpen && 'rounded-b-none'\\n\\t)}\\n>\\n\\t<label for={id} class=\\\"text-muted-foreground mr-2\\\">\\n\\t\\t<span class=\\\"hidden md:block\\\">{label}</span>\\n\\t\\t<span class=\\\"block md:hidden\\\">{shortLabel}</span>\\n\\t</label>\\n\\n\\t<input\\n\\t\\tbind:value\\n\\t\\ttype=\\\"number\\\"\\n\\t\\tclass=\\\"border-none outline-none min-w-0 w-full pr-2\\\"\\n\\t\\t{id}\\n\\t\\tstep=\\\"0.000001\\\"\\n\\t/>\\n</div>\\n\"","export default \"export { default as GeopointInput } from \\\"./input.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { setContext } from 'svelte';\\n\\timport ToggleMap from './toggle-map.svelte';\\n\\timport Coordinate from './coordinate.svelte';\\n\\n\\tlet {\\n\\t\\tname,\\n\\t\\tvalue = $bindable()\\n\\t}: {\\n\\t\\tname: string;\\n\\t\\tvalue: string | undefined;\\n\\t} = $props();\\n\\n\\tconst geopoint = $state(value ? JSON.parse(value) : { lat: 0, lon: 0 });\\n\\tconst map = $state({ open: false });\\n\\n\\tsetContext('geopoint', {\\n\\t\\tgeopoint,\\n\\t\\tmap\\n\\t});\\n\\n\\t$effect(() => {\\n\\t\\tif (value) {\\n\\t\\t\\tconst parsed = JSON.parse(value);\\n\\n\\t\\t\\tif (typeof parsed === 'object' && parsed !== null && 'lat' in parsed && 'lon' in parsed) {\\n\\t\\t\\t\\tgeopoint.lat = parsed.lat.toFixed(6);\\n\\t\\t\\t\\tgeopoint.lon = parsed.lon.toFixed(6);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t});\\n\\n\\tconst stringValue = $derived(\\n\\t\\tJSON.stringify({ lat: parseFloat(geopoint.lat), lon: parseFloat(geopoint.lon) })\\n\\t);\\n</script>\\n\\n<input type=\\\"hidden\\\" {name} value={stringValue} />\\n\\n<div class=\\\"w-full\\\">\\n\\t<div class=\\\"w-full flex\\\">\\n\\t\\t<Coordinate\\n\\t\\t\\tid=\\\"latitude\\\"\\n\\t\\t\\tlabel=\\\"Latitude\\\"\\n\\t\\t\\tshortLabel=\\\"Lat\\\"\\n\\t\\t\\tbind:value={geopoint.lat}\\n\\t\\t\\tmapOpen={map.open}\\n\\t\\t/>\\n\\t\\t<Coordinate\\n\\t\\t\\tid=\\\"longitude\\\"\\n\\t\\t\\tlabel=\\\"Longitude\\\"\\n\\t\\t\\tshortLabel=\\\"Lon\\\"\\n\\t\\t\\tbind:value={geopoint.lon}\\n\\t\\t\\tmapOpen={map.open}\\n\\t\\t/>\\n\\t\\t<ToggleMap />\\n\\t</div>\\n\\n\\t{#if map.open}\\n\\t\\t{#await import('$lib/components/ui/leaflet/leaflet.svelte')}\\n\\t\\t\\t<div class=\\\"h-[225px] w-full bg-input rounded-b-md\\\"></div>\\n\\t\\t{:then { default: Leaflet }}\\n\\t\\t\\t<Leaflet height={225} point={geopoint} class=\\\"rounded-b-md overflow-hidden\\\" />\\n\\t\\t{/await}\\n\\t{/if}\\n</div>\\n\"","export default \"<script>\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport MapIcon from '@lucide/svelte/icons/map';\\n\\timport { getContext } from 'svelte';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet { map } = getContext('geopoint');\\n</script>\\n\\n<Button\\n\\tvariant=\\\"outline\\\"\\n\\tsize=\\\"icon\\\"\\n\\tclass={cn('w-10 rounded-none rounded-r-md border-l-0', map.open && 'rounded-b-none')}\\n\\tonclick={() => (map.open = !map.open)}\\n>\\n\\t<MapIcon class=\\\"w-4 h-4\\\" />\\n</Button>\\n\"","export default \"export { default as Leaflet } from \\\"./leaflet.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { onMount } from 'svelte';\\n\\timport L from 'leaflet';\\n\\timport 'leaflet/dist/leaflet.css';\\n\\n\\t// manually load the markers so that they can be embedded in the prod bundle\\n\\timport markerIconUrl from 'leaflet/dist/images/marker-icon.png';\\n\\timport markerIconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\\n\\timport markerShadowUrl from 'leaflet/dist/images/marker-shadow.png';\\n\\n\\tlet { height = 225, point = $bindable(), readonly = false, ...props } = $props();\\n\\n\\tlet map: L.Map;\\n\\tlet mapEl: HTMLElement;\\n\\tlet marker: L.Marker;\\n\\tlet panTimeoutId: ReturnType<typeof setTimeout>;\\n\\n\\tconst defaultZoomLevel = 8;\\n\\n\\t$effect(() => {\\n\\t\\tif (point.lat && point.lon) {\\n\\t\\t\\tpanInside();\\n\\t\\t}\\n\\t});\\n\\n\\tfunction normalizeCoordinate(coord: any) {\\n\\t\\treturn +(+coord).toFixed(6);\\n\\t}\\n\\n\\tfunction panInside(debounce = 200) {\\n\\t\\tclearTimeout(panTimeoutId);\\n\\t\\tpanTimeoutId = setTimeout(() => {\\n\\t\\t\\tmarker?.setLatLng([point.lat, point.lon]);\\n\\t\\t\\tmap?.panInside([point.lat, point.lon], { padding: [20, 40] });\\n\\t\\t}, debounce);\\n\\t}\\n\\n\\tfunction initMap() {\\n\\t\\tconst latlon = [\\n\\t\\t\\tnormalizeCoordinate(point.lat),\\n\\t\\t\\tnormalizeCoordinate(point.lon)\\n\\t\\t] as L.LatLngTuple;\\n\\n\\t\\tmap = L.map(mapEl, {\\n\\t\\t\\tzoomControl: false,\\n\\t\\t\\tmaxBounds: [\\n\\t\\t\\t\\t[-90, -180],\\n\\t\\t\\t\\t[90, 180]\\n\\t\\t\\t],\\n\\t\\t\\tminZoom: 2\\n\\t\\t}).setView(latlon, defaultZoomLevel);\\n\\n\\t\\tif (readonly) {\\n\\t\\t\\tmap.dragging.disable();\\n\\t\\t\\tmap.touchZoom.disable();\\n\\t\\t\\tmap.doubleClickZoom.disable();\\n\\t\\t\\tmap.scrollWheelZoom.disable();\\n\\t\\t\\tmap.boxZoom.disable();\\n\\t\\t\\tmap.keyboard.disable();\\n\\t\\t}\\n\\n\\t\\tL.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {\\n\\t\\t\\tattribution: '&copy; <a href=\\\"https://www.openstreetmap.org/copyright\\\">OSM</a>',\\n\\t\\t\\tnoWrap: true\\n\\t\\t}).addTo(map);\\n\\n\\t\\tmap.attributionControl.setPrefix('');\\n\\n\\t\\t// reassign the default marker images with the loaded ones\\n\\t\\t// (https://leafletjs.com/reference.html#icon-default-option)\\n\\t\\tL.Icon.Default.prototype.options.iconUrl = markerIconUrl;\\n\\t\\tL.Icon.Default.prototype.options.iconRetinaUrl = markerIconRetinaUrl;\\n\\t\\tL.Icon.Default.prototype.options.shadowUrl = markerShadowUrl;\\n\\t\\tL.Icon.Default.imagePath = '';\\n\\n\\t\\tmarker = L.marker(latlon, {\\n\\t\\t\\tdraggable: true,\\n\\t\\t\\tautoPan: true\\n\\t\\t}).addTo(map);\\n\\n\\t\\tmarker.bindTooltip('drag or right click anywhere on the map to move');\\n\\n\\t\\tmarker.on('moveend', (e) => {\\n\\t\\t\\tif (e.sourceTarget?._latlng) {\\n\\t\\t\\t\\tselect(e.sourceTarget._latlng.lat, e.sourceTarget._latlng.lng, false);\\n\\t\\t\\t}\\n\\t\\t});\\n\\n\\t\\tmap.on('contextmenu', (e) => {\\n\\t\\t\\tselect(e.latlng.lat, e.latlng.lng, false);\\n\\t\\t});\\n\\t}\\n\\n\\tfunction destroyMap() {\\n\\t\\tmarker?.remove();\\n\\t\\tmap?.remove();\\n\\t}\\n\\n\\tfunction select(lat: number, lon: number, centerMap = true) {\\n\\t\\tpoint.lat = normalizeCoordinate(lat);\\n\\t\\tpoint.lon = normalizeCoordinate(lon);\\n\\n\\t\\t// center the map\\n\\t\\tif (centerMap) {\\n\\t\\t\\tmarker?.setLatLng([point.lat, point.lon]); // optimistic marker update\\n\\t\\t\\tmap?.panTo([point.lat, point.lon], { animate: false });\\n\\t\\t}\\n\\t}\\n\\n\\tonMount(() => {\\n\\t\\tinitMap();\\n\\n\\t\\treturn () => {\\n\\t\\t\\tdestroyMap();\\n\\t\\t};\\n\\t});\\n</script>\\n\\n<div class=\\\"map-wrapper\\\" style=\\\"{height ? `height:${height}px` : null};\\\" {...props}>\\n\\t<div bind:this={mapEl} class=\\\"map-box\\\"></div>\\n</div>\\n\\n<style>\\n\\t.map-wrapper {\\n\\t\\tposition: relative;\\n\\t\\tdisplay: block;\\n\\t\\theight: 100%;\\n\\t\\twidth: 100%;\\n\\t}\\n\\t.map-box {\\n\\t\\tz-index: 1;\\n\\t\\theight: 100%;\\n\\t\\twidth: 100%;\\n\\t}\\n</style>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { Snippet } from 'svelte';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet { children, class: className }: { children: Snippet; class?: string } = $props();\\n</script>\\n\\n<span class={cn('bg-secondary text-secondary-foreground px-2 py-1 rounded-sm text-sm', className)}>\\n\\t{@render children?.()}\\n</span>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { Popover as PopoverPrimitive } from 'bits-ui';\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\t...props\\n\\t}: PopoverPrimitive.ContentProps & {\\n\\t\\tportalProps?: PopoverPrimitive.PortalProps;\\n\\t} = $props();\\n</script>\\n\\n<Popover.Content {...props}>\\n\\t{@render children?.()}\\n</Popover.Content>\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"T extends Record<string, unknown>, U extends FormPath<T>\\\">\\n\\timport * as FormPrimitive from 'formsnap';\\n\\timport type { FormPath } from 'sveltekit-superforms';\\n\\timport { cn, type WithElementRef, type WithoutChildren } from '$lib/utils';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { setContext } from 'svelte';\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\n\\tlet {\\n\\t\\tref = $bindable(null),\\n\\t\\tclass: className,\\n\\t\\ttype,\\n\\t\\tform,\\n\\t\\tname,\\n\\t\\trequired,\\n\\t\\tchildren: childrenProp,\\n\\t\\t...restProps\\n\\t}: FormPrimitive.FieldProps<T, U> & {\\n\\t\\ttype: 'multiple' | 'single';\\n\\t\\trequired?: boolean;\\n\\t} & WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();\\n\\n\\tconst { form: formData } = form;\\n\\n\\tconst toggleSelected = (value: string) => {\\n\\t\\tif (type === 'single') {\\n\\t\\t\\tif (!required && $formData[name] === value) {\\n\\t\\t\\t\\t$formData[name] = undefined as T[U];\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$formData[name] = value as T[U];\\n\\t\\t\\t}\\n\\t\\t} else if (type === 'multiple') {\\n\\t\\t\\tif (!$formData[name]) {\\n\\t\\t\\t\\t$formData[name] = [] as T[U];\\n\\t\\t\\t}\\n\\n\\t\\t\\tconst currentValue = $formData[name] as string[];\\n\\t\\t\\tconst index = currentValue.indexOf(value);\\n\\n\\t\\t\\tif (index > -1) {\\n\\t\\t\\t\\t$formData[name] = currentValue.filter((id) => id !== value) as T[U];\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$formData[name] = [...currentValue, value] as T[U];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n\\n\\tconst isSelected = (value: string) => {\\n\\t\\tif (type === 'single') {\\n\\t\\t\\treturn $formData[name] === value;\\n\\t\\t} else if (type === 'multiple') {\\n\\t\\t\\treturn ($formData[name] as string[])?.includes(value) ?? false;\\n\\t\\t}\\n\\t};\\n\\n\\tsetContext('multiselect-field', {\\n\\t\\tform,\\n\\t\\tname,\\n\\t\\ttype,\\n\\t\\ttoggleSelected,\\n\\t\\tisSelected\\n\\t});\\n</script>\\n\\n<Popover.Root>\\n\\t<FormPrimitive.Field {form} {name}>\\n\\t\\t{#snippet children({ constraints, errors, tainted, value })}\\n\\t\\t\\t<div bind:this={ref} data-slot=\\\"form-item\\\" class={cn('space-y-2', className)} {...restProps}>\\n\\t\\t\\t\\t{@render childrenProp?.({ constraints, errors, tainted, value: value as T[U] })}\\n\\t\\t\\t</div>\\n\\t\\t{/snippet}\\n\\t</FormPrimitive.Field>\\n</Popover.Root>\\n\"","export default \"export { default as Field } from \\\"./field.svelte\\\";\\nexport { default as Trigger } from \\\"./trigger.svelte\\\";\\nexport { default as Input } from \\\"./input.svelte\\\";\\nexport { default as Content } from \\\"./content.svelte\\\";\\nexport { default as Item } from \\\"./item.svelte\\\";\\nexport { default as Chip } from \\\"./chip.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"T extends string\\\">\\n\\timport type { SuperForm } from 'sveltekit-superforms';\\n\\timport { getContext, type Snippet } from 'svelte';\\n\\n\\tconst { form, type } = getContext<{ form: SuperForm<any, any>; type: 'single' | 'multiple' }>(\\n\\t\\t'multiselect-field'\\n\\t);\\n\\tconst { form: formData } = form;\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\tplaceholder,\\n\\t\\tname,\\n\\t\\tvalue = $bindable()\\n\\t}: {\\n\\t\\tchildren: Snippet<[{ selected: T[] }]>;\\n\\t\\tplaceholder?: string;\\n\\t\\tname: string;\\n\\t\\tvalue: T[] | T | undefined;\\n\\t} = $props();\\n</script>\\n\\n{#if value && value.length > 0}\\n\\t{@render children?.({ selected: type === 'single' ? [$formData[name]] : $formData[name] })}\\n\\t{#if type === 'multiple'}\\n\\t\\t{#each value as v}\\n\\t\\t\\t<input type=\\\"hidden\\\" {name} value={v} />\\n\\t\\t{/each}\\n\\t{:else}\\n\\t\\t<input type=\\\"hidden\\\" {name} {value} />\\n\\t{/if}\\n{:else}\\n\\t{placeholder}\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { getContext, type Snippet } from 'svelte';\\n\\timport { cn } from '$lib/utils';\\n\\timport { Command as CommandPrimitive } from 'bits-ui';\\n\\timport * as Command from '$lib/components/ui/command';\\n\\timport CheckIcon from '@lucide/svelte/icons/check';\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\tvalue,\\n\\t\\tlabel,\\n\\t\\tclass: className,\\n\\t\\t...props\\n\\t}: CommandPrimitive.ItemProps & {\\n\\t\\tvalue: string;\\n\\t\\tlabel: string | undefined;\\n\\t\\tchildren?: Snippet;\\n\\t\\tclass?: string;\\n\\t} = $props();\\n\\n\\tconst { toggleSelected, isSelected } = getContext<{\\n\\t\\ttoggleSelected: (value: string) => void;\\n\\t\\tisSelected: (value: string) => boolean;\\n\\t}>('multiselect-field');\\n\\n\\tconst handleSelect = () => {\\n\\t\\ttoggleSelected(value);\\n\\t};\\n</script>\\n\\n<Command.Item\\n\\tclass={cn('cursor-pointer', className)}\\n\\t{...props}\\n\\tvalue={label}\\n\\tonSelect={handleSelect}\\n>\\n\\t{label}\\n\\t<CheckIcon class={cn('ml-auto', !isSelected(value) && 'text-transparent')} />\\n</Command.Item>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\timport { Popover as PopoverPrimitive } from 'bits-ui';\\n\\timport { cn } from '$lib/utils';\\n\\timport { buttonVariants } from '$lib/components/ui/button';\\n\\timport ChevronDownIcon from '@lucide/svelte/icons/chevron-down';\\n\\n\\tlet { children, class: className, ...props }: PopoverPrimitive.TriggerProps = $props();\\n</script>\\n\\n<Popover.Trigger\\n\\tclass={cn(buttonVariants({ variant: 'outline' }), className)}\\n\\trole=\\\"combobox\\\"\\n\\t{...props}\\n>\\n\\t{@render children?.()}\\n\\t<ChevronDownIcon class=\\\"size-4 opacity-50\\\" />\\n</Popover.Trigger>\\n\"","export default \"export { default as Pagination } from \\\"./pagination.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as Select from '$lib/components/ui/select';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport ChevronsLeftIcon from '@lucide/svelte/icons/chevrons-left';\\n\\timport ChevronLeftIcon from '@lucide/svelte/icons/chevron-left';\\n\\timport ChevronRightIcon from '@lucide/svelte/icons/chevron-right';\\n\\timport ChevronsRightIcon from '@lucide/svelte/icons/chevrons-right';\\n\\timport type { Table as TableType } from '@tanstack/table-core';\\n\\n\\tlet { table }: { table: TableType<any> } = $props();\\n</script>\\n\\n<div class=\\\"flex items-center justify-between px-2\\\">\\n\\t<div class=\\\"text-muted-foreground flex-1 text-sm\\\">\\n\\t\\t{table.getFilteredSelectedRowModel().rows.length} of\\n\\t\\t{table.getFilteredRowModel().rows.length} row(s) selected.\\n\\t</div>\\n\\t<div class=\\\"flex items-center space-x-6 lg:space-x-8\\\">\\n\\t\\t<div class=\\\"flex items-center space-x-2\\\">\\n\\t\\t\\t<p class=\\\"text-sm font-medium\\\">Rows per page</p>\\n\\t\\t\\t<Select.Root\\n\\t\\t\\t\\tallowDeselect={false}\\n\\t\\t\\t\\ttype=\\\"single\\\"\\n\\t\\t\\t\\tvalue={`${table.getState().pagination.pageSize}`}\\n\\t\\t\\t\\tonValueChange={(value) => {\\n\\t\\t\\t\\t\\ttable.setPageSize(Number(value));\\n\\t\\t\\t\\t}}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<Select.Trigger class=\\\"h-8 w-[70px]\\\">\\n\\t\\t\\t\\t\\t{String(table.getState().pagination.pageSize)}\\n\\t\\t\\t\\t</Select.Trigger>\\n\\t\\t\\t\\t<Select.Content side=\\\"top\\\">\\n\\t\\t\\t\\t\\t{#each [10, 20, 30, 40, 50] as pageSize (pageSize)}\\n\\t\\t\\t\\t\\t\\t<Select.Item value={`${pageSize}`}>\\n\\t\\t\\t\\t\\t\\t\\t{pageSize}\\n\\t\\t\\t\\t\\t\\t</Select.Item>\\n\\t\\t\\t\\t\\t{/each}\\n\\t\\t\\t\\t</Select.Content>\\n\\t\\t\\t</Select.Root>\\n\\t\\t</div>\\n\\t\\t<div class=\\\"flex w-[100px] items-center justify-center text-sm font-medium\\\">\\n\\t\\t\\tPage {table.getState().pagination.pageIndex + 1} of\\n\\t\\t\\t{table.getPageCount()}\\n\\t\\t</div>\\n\\t\\t<div class=\\\"flex items-center space-x-2\\\">\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"hidden size-8 p-0 lg:flex\\\"\\n\\t\\t\\t\\tonclick={() => table.setPageIndex(0)}\\n\\t\\t\\t\\tdisabled={!table.getCanPreviousPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to first page</span>\\n\\t\\t\\t\\t<ChevronsLeftIcon />\\n\\t\\t\\t</Button>\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"size-8 p-0\\\"\\n\\t\\t\\t\\tonclick={() => table.previousPage()}\\n\\t\\t\\t\\tdisabled={!table.getCanPreviousPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to previous page</span>\\n\\t\\t\\t\\t<ChevronLeftIcon />\\n\\t\\t\\t</Button>\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"size-8 p-0\\\"\\n\\t\\t\\t\\tonclick={() => table.nextPage()}\\n\\t\\t\\t\\tdisabled={!table.getCanNextPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to next page</span>\\n\\t\\t\\t\\t<ChevronRightIcon />\\n\\t\\t\\t</Button>\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"hidden size-8 p-0 lg:flex\\\"\\n\\t\\t\\t\\tonclick={() => table.setPageIndex(table.getPageCount() - 1)}\\n\\t\\t\\t\\tdisabled={!table.getCanNextPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to last page</span>\\n\\t\\t\\t\\t<ChevronsRightIcon />\\n\\t\\t\\t</Button>\\n\\t\\t</div>\\n\\t</div>\\n</div>\\n\"","export default \"export { default as RowActions } from \\\"./row-actions.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { goto } from '$app/navigation';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport EllipsisIcon from '@lucide/svelte/icons/ellipsis';\\n\\n\\tlet {\\n\\t\\tviewPath,\\n\\t\\teditPath,\\n\\t\\tdeletePath\\n\\t}: {\\n\\t\\tviewPath: string;\\n\\t\\teditPath: string;\\n\\t\\tdeletePath: string;\\n\\t} = $props();\\n</script>\\n\\n<DropdownMenu.Root>\\n\\t<DropdownMenu.Trigger>\\n\\t\\t{#snippet child({ props })}\\n\\t\\t\\t<Button {...props} variant=\\\"ghost\\\" class=\\\"data-[state=open]:bg-muted flex h-8 w-8 p-0\\\">\\n\\t\\t\\t\\t<EllipsisIcon />\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Open Menu</span>\\n\\t\\t\\t</Button>\\n\\t\\t{/snippet}\\n\\t</DropdownMenu.Trigger>\\n\\t<DropdownMenu.Content class=\\\"w-[160px]\\\" align=\\\"end\\\">\\n\\t\\t<DropdownMenu.Item onclick={() => goto(viewPath)}>View</DropdownMenu.Item>\\n\\t\\t<DropdownMenu.Item onclick={() => goto(editPath)}>Edit</DropdownMenu.Item>\\n\\t\\t<DropdownMenu.Item>\\n\\t\\t\\t<form method=\\\"POST\\\" action={deletePath}>\\n\\t\\t\\t\\t<button type=\\\"submit\\\" class=\\\"contents\\\">Delete</button>\\n\\t\\t\\t</form>\\n\\t\\t</DropdownMenu.Item>\\n\\t</DropdownMenu.Content>\\n</DropdownMenu.Root>\\n\"","import {\n existsSync,\n mkdirSync,\n readFileSync,\n rmSync,\n writeFileSync,\n} from \"node:fs\";\nimport path from \"node:path\";\nimport { detect } from \"package-manager-detector\";\nimport { resolveCommand } from \"package-manager-detector/commands\";\nimport spawn from \"cross-spawn\";\nimport type { Options, Result } from \"../core/types\";\n\ntype PackageManagerOperation = \"execute\" | \"install\";\ntype ExecuteCommand = (\n cwd: string,\n operation: PackageManagerOperation,\n args: string[],\n) => Promise<void>;\n\ninterface WriteResultRuntime {\n executeCommand?: ExecuteCommand;\n}\n\ntype CustomNpmPackages = Record<string, string[]>;\n\nconst customDependencies: Record<string, string[]> = {\n \"file-form\": [\"input\", \"form\"],\n multiselect: [\"command\", \"popover\", \"button\", \"badge\"],\n geopoint: [\"button\", \"leaflet\"],\n cells: [],\n \"column-header\": [\"dropdown-menu\", \"button\"],\n \"faceted-filter\": [\"command\", \"popover\", \"button\", \"separator\", \"badge\"],\n pagination: [\"button\", \"select\"],\n \"row-actions\": [\"dropdown-menu\", \"button\"],\n leaflet: [],\n \"auth-menu\": [\"dropdown-menu\", \"button\"],\n};\n\nconst customNpmPackages: CustomNpmPackages = {\n \"file-form\": [],\n multiselect: [],\n geopoint: [],\n cells: [],\n \"column-header\": [\"@tanstack/table-core\"],\n \"faceted-filter\": [\"@tanstack/table-core\"],\n pagination: [\"@tanstack/table-core\"],\n \"row-actions\": [],\n leaflet: [\"leaflet\", \"@types/leaflet\"],\n};\n\nconst customComponentAssets = import.meta.glob<string>(\"../ui/components/**\", {\n query: \"?raw\",\n import: \"default\",\n eager: true,\n});\n\nfunction getAllCustomComponents() {\n return [\n ...new Set(\n Object.keys(customComponentAssets).map(componentNameFromAssetPath),\n ),\n ]\n .filter(Boolean)\n .sort();\n}\n\nfunction componentNameFromAssetPath(assetPath: string): string {\n const parts = assetPath.split(\"/\");\n const index = parts.indexOf(\"components\");\n return parts[index + 1] ?? \"\";\n}\n\nfunction componentRelativeAssetPath(assetPath: string): string {\n const parts = assetPath.split(\"/\");\n const index = parts.indexOf(\"components\");\n return parts.slice(index + 2).join(\"/\");\n}\n\nfunction toTargetPath(root: string, filePath: string): string {\n if (path.isAbsolute(filePath)) {\n return filePath;\n }\n return path.join(root, filePath);\n}\n\nfunction writeFile(filePath: string, content: string): void {\n mkdirSync(path.dirname(filePath), { recursive: true });\n writeFileSync(filePath, content, \"utf8\");\n}\n\nfunction removeFile(filePath: string): void {\n if (!existsSync(filePath)) {\n return;\n }\n\n rmSync(filePath, { force: true, recursive: true });\n}\n\nasync function executeWithDetectedPackageManager(\n cwd: string,\n operation: PackageManagerOperation,\n args: string[],\n): Promise<void> {\n const packageManager = (await detect({ cwd }))?.name ?? \"npm\";\n const resolved = resolveCommand(packageManager, operation, args);\n if (!resolved) {\n throw new Error(\n `Unable to resolve ${operation} command for ${packageManager}`,\n );\n }\n\n const commandArgs = [...resolved.args];\n if (packageManager === \"npm\") {\n commandArgs.unshift(\"--yes\");\n }\n\n await new Promise<void>((resolve, reject) => {\n const child = spawn(resolved.command, commandArgs, {\n cwd,\n stdio: \"inherit\",\n });\n child.on(\"error\", reject);\n child.on(\"exit\", (code) => {\n if (code === 0) {\n resolve();\n return;\n }\n reject(\n new Error(`${resolved.command} exited with code ${code ?? \"unknown\"}`),\n );\n });\n });\n}\n\nasync function executeCommand(\n cwd: string,\n operation: PackageManagerOperation,\n args: string[],\n runtime?: WriteResultRuntime,\n): Promise<void> {\n if (runtime?.executeCommand) {\n await runtime.executeCommand(cwd, operation, args);\n return;\n }\n\n await executeWithDetectedPackageManager(cwd, operation, args);\n}\n\nfunction installedPackagesFromProject(root: string): Set<string> {\n const packageJsonPath = path.join(root, \"package.json\");\n if (!existsSync(packageJsonPath)) {\n return new Set();\n }\n\n const packageJson = JSON.parse(readFileSync(packageJsonPath, \"utf8\")) as {\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n optionalDependencies?: Record<string, string>;\n peerDependencies?: Record<string, string>;\n };\n\n return new Set([\n ...Object.keys(packageJson.dependencies ?? {}),\n ...Object.keys(packageJson.devDependencies ?? {}),\n ...Object.keys(packageJson.optionalDependencies ?? {}),\n ...Object.keys(packageJson.peerDependencies ?? {}),\n ]);\n}\n\nasync function installPackages(\n root: string,\n packages: string[],\n runtime?: WriteResultRuntime,\n): Promise<string[]> {\n if (packages.length === 0) {\n return [];\n }\n\n const installed = installedPackagesFromProject(root);\n const toInstall = [...new Set(packages)].filter((pkg) => !installed.has(pkg));\n if (toInstall.length === 0) {\n return [];\n }\n\n await executeCommand(root, \"install\", toInstall, runtime);\n return toInstall;\n}\n\nfunction isCustomComponent(component: string): boolean {\n return getAllCustomComponents().includes(component);\n}\n\nfunction customNpmPackagesFor(components: string[]): string[] {\n return [\n ...new Set(\n components.flatMap((component) => customNpmPackages[component] ?? []),\n ),\n ];\n}\n\nfunction copyCustomComponent(\n component: string,\n targetComponentsDir: string,\n): void {\n const targetDir = path.join(targetComponentsDir, component);\n mkdirSync(targetDir, { recursive: true });\n\n for (const [assetPath, content] of Object.entries(customComponentAssets)) {\n if (componentNameFromAssetPath(assetPath) !== component) {\n continue;\n }\n const relativePath = componentRelativeAssetPath(assetPath);\n if (!relativePath) {\n continue;\n }\n\n const outputPath = path.join(targetDir, relativePath);\n mkdirSync(path.dirname(outputPath), { recursive: true });\n writeFileSync(outputPath, content, \"utf8\");\n }\n}\n\nasync function installComponents(\n root: string,\n components: string[],\n runtime?: WriteResultRuntime,\n): Promise<{ components: string[]; packages: string[] }> {\n if (components.length === 0) {\n return { components: [], packages: [] };\n }\n\n const componentsDir = path.join(root, \"src\", \"lib\", \"components\", \"ui\");\n mkdirSync(componentsDir, { recursive: true });\n\n const requested = [...new Set(components)];\n const missing = requested.filter(\n (component) => !existsSync(path.join(componentsDir, component)),\n );\n\n if (missing.length === 0) {\n return { components: [], packages: [] };\n }\n\n const customToInstall = new Set(missing.filter(isCustomComponent));\n const publicToInstall = new Set(\n missing.filter((component) => !isCustomComponent(component)),\n );\n\n for (const component of [...customToInstall]) {\n for (const dependency of customDependencies[component] ?? []) {\n if (existsSync(path.join(componentsDir, dependency))) {\n continue;\n }\n if (isCustomComponent(dependency)) {\n customToInstall.add(dependency);\n } else {\n publicToInstall.add(dependency);\n }\n }\n }\n\n const installedComponents: string[] = [];\n for (const component of [...customToInstall].sort()) {\n copyCustomComponent(component, componentsDir);\n installedComponents.push(component);\n publicToInstall.delete(component);\n }\n\n const customPackages = await installPackages(\n root,\n customNpmPackagesFor([...customToInstall]),\n runtime,\n );\n\n const publicList = [...publicToInstall].sort();\n if (publicList.length > 0) {\n await executeCommand(\n root,\n \"execute\",\n [\"shadcn-svelte\", \"add\", \"--yes\", \"--overwrite\", ...publicList],\n runtime,\n );\n installedComponents.push(...publicList);\n }\n\n return {\n components: [...new Set(installedComponents)],\n packages: customPackages,\n };\n}\n\nexport async function writeResult(\n result: Result,\n options: Options,\n runtime?: WriteResultRuntime,\n): Promise<Result> {\n for (const file of result.creates) {\n writeFile(toTargetPath(options.root, file.path), file.content);\n }\n\n for (const file of result.modifies) {\n writeFile(toTargetPath(options.root, file.path), file.content);\n }\n\n for (const file of result.deletes) {\n removeFile(toTargetPath(options.root, file.path));\n }\n\n const packageInstalls = await installPackages(\n options.root,\n result.packages,\n runtime,\n );\n const componentInstalls = await installComponents(\n options.root,\n result.components,\n runtime,\n );\n\n return {\n ...result,\n components: componentInstalls.components,\n packages: [...new Set([...packageInstalls, ...componentInstalls.packages])],\n };\n}\n"],"names":["__vite_glob_0_0","__vite_glob_0_1","__vite_glob_0_2","__vite_glob_0_3","__vite_glob_0_4","__vite_glob_0_5","__vite_glob_0_6","__vite_glob_0_7","__vite_glob_0_8","__vite_glob_0_9","__vite_glob_0_10","__vite_glob_0_11","__vite_glob_0_12","__vite_glob_0_13","__vite_glob_0_14","__vite_glob_0_15","__vite_glob_0_16","__vite_glob_0_17","__vite_glob_0_18","__vite_glob_0_19","__vite_glob_0_20","__vite_glob_0_21","__vite_glob_0_22","__vite_glob_0_23","__vite_glob_0_24","__vite_glob_0_25","__vite_glob_0_26","__vite_glob_0_27","__vite_glob_0_28","__vite_glob_0_29","__vite_glob_0_30","__vite_glob_0_31","__vite_glob_0_32","__vite_glob_0_33","__vite_glob_0_34","__vite_glob_0_35","__vite_glob_0_36","__vite_glob_0_37","__vite_glob_0_38","__vite_glob_0_39","__vite_glob_0_40","__vite_glob_0_41","__vite_glob_0_42","__vite_glob_0_43","__vite_glob_0_44","__vite_glob_0_45","__vite_glob_0_46","__vite_glob_0_47","__vite_glob_0_48","__vite_glob_0_49","__vite_glob_0_50","__vite_glob_0_51","customDependencies","customNpmPackages","customComponentAssets","getAllCustomComponents","componentNameFromAssetPath","assetPath","parts","index","componentRelativeAssetPath","toTargetPath","root","filePath","path","writeFile","content","mkdirSync","writeFileSync","removeFile","existsSync","rmSync","executeWithDetectedPackageManager","cwd","operation","args","packageManager","_a","detect","resolved","resolveCommand","commandArgs","resolve","reject","child","spawn","code","executeCommand","runtime","installedPackagesFromProject","packageJsonPath","packageJson","readFileSync","installPackages","packages","installed","toInstall","pkg","isCustomComponent","component","customNpmPackagesFor","components","copyCustomComponent","targetComponentsDir","targetDir","relativePath","outputPath","installComponents","componentsDir","missing","customToInstall","publicToInstall","dependency","installedComponents","customPackages","publicList","writeResult","result","options","file","packageInstalls","componentInstalls"],"mappings":";;;;;AAAA,MAAAA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GCAfC,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GCAfC,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GCAfC,IAAe;AAAA;AAAA;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K,IAAI,GAAGA,EAAK,OAAO;AAG/D,aAAWA,KAAQF,EAAO;AACxB,IAAAhD,GAAWR,EAAayD,EAAQ,MAAMC,EAAK,IAAI,CAAC;AAGlD,QAAMC,IAAkB,MAAM3B;AAAA,IAC5ByB,EAAQ;AAAA,IACRD,EAAO;AAAA,IACP7B;AAAA,EAAA,GAEIiC,IAAoB,MAAMd;AAAA,IAC9BW,EAAQ;AAAA,IACRD,EAAO;AAAA,IACP7B;AAAA,EAAA;AAGF,SAAO;AAAA,IACL,GAAG6B;AAAA,IACH,YAAYI,EAAkB;AAAA,IAC9B,UAAU,CAAC,GAAG,oBAAI,IAAI,CAAC,GAAGD,GAAiB,GAAGC,EAAkB,QAAQ,CAAC,CAAC;AAAA,EAAA;AAE9E;"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as r, a as e, p as o, v as t } from "./chunks/index-9TLCLhJv.js";
1
+ import { b as r, a as e, p as o, v as t } from "./chunks/index-CoeyNVkU.js";
2
2
  export {
3
3
  r as byCategory,
4
4
  e as bySlug,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velastack/patterns",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",