svelte-ag 1.0.16 → 1.0.18

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 (100) hide show
  1. package/dist/lib/api/form.svelte.d.ts +66 -2
  2. package/dist/lib/api/form.svelte.d.ts.map +1 -1
  3. package/dist/lib/api/form.svelte.js +59 -2
  4. package/dist/lib/api/query/query.svelte.d.ts +1 -1
  5. package/dist/lib/api/query/query.svelte.d.ts.map +1 -1
  6. package/dist/lib/api/query/query.svelte.js +4 -4
  7. package/dist/lib/components/animated/animated.svelte +7 -7
  8. package/dist/lib/components/breakpoint-badge/BreakpointBadge.svelte +7 -1
  9. package/dist/lib/components/breakpoint-badge/BreakpointBadge.svelte.d.ts.map +1 -1
  10. package/dist/lib/components/dnd/DndDroppable.svelte +1 -0
  11. package/dist/lib/components/dnd/DndDroppable.svelte.d.ts.map +1 -1
  12. package/dist/lib/components/dnd/DndHandle.svelte +1 -1
  13. package/dist/lib/components/dnd/DndItem.svelte +1 -0
  14. package/dist/lib/components/dnd/DndItem.svelte.d.ts.map +1 -1
  15. package/dist/lib/components/dnd/DndSortableItem.svelte +1 -0
  16. package/dist/lib/components/dnd/DndSortableItem.svelte.d.ts +1 -1
  17. package/dist/lib/components/dnd/DndSortableItem.svelte.d.ts.map +1 -1
  18. package/dist/lib/components/dnd/examples/SimpleSortable.svelte +4 -4
  19. package/dist/lib/components/dnd/utils.svelte.d.ts +2 -1
  20. package/dist/lib/components/dnd/utils.svelte.d.ts.map +1 -1
  21. package/dist/lib/components/form/form-button.svelte +20 -8
  22. package/dist/lib/components/form/form-button.svelte.d.ts +30 -4
  23. package/dist/lib/components/form/form-button.svelte.d.ts.map +1 -1
  24. package/dist/lib/components/form/form-description.svelte +1 -1
  25. package/dist/lib/components/form/form-field-errors.svelte +1 -1
  26. package/dist/lib/components/form/form-field-full.svelte +1 -1
  27. package/dist/lib/components/form/form-field-full.svelte.d.ts +1 -1
  28. package/dist/lib/components/form/form-field-full.svelte.d.ts.map +1 -1
  29. package/dist/lib/components/form/form-legend.svelte +1 -1
  30. package/dist/lib/components/gradient/Gradient.svelte +2 -2
  31. package/dist/lib/components/search/combinations/searchPopover.svelte +1 -1
  32. package/dist/lib/components/search/combinations/searchPopover.svelte.d.ts +1 -1
  33. package/dist/lib/components/search/components/search-input.svelte +2 -2
  34. package/dist/lib/components/search/components/search-input.svelte.d.ts +1 -1
  35. package/dist/lib/components/search/components/search-list.svelte +1 -1
  36. package/dist/lib/components/search/components/search.svelte.d.ts +1 -1
  37. package/dist/lib/components/shader/WebGpuShader.svelte +2 -1
  38. package/dist/lib/components/shader/WebGpuShader.svelte.d.ts.map +1 -1
  39. package/dist/lib/components/sidebar/sidebar-content.svelte +4 -1
  40. package/dist/lib/components/sidebar/sidebar-content.svelte.d.ts.map +1 -1
  41. package/dist/lib/components/sidebar/sidebar-group-action.svelte +11 -2
  42. package/dist/lib/components/sidebar/sidebar-group-action.svelte.d.ts.map +1 -1
  43. package/dist/lib/components/sidebar/sidebar-group-label.svelte +1 -1
  44. package/dist/lib/components/sidebar/sidebar-input.svelte +7 -1
  45. package/dist/lib/components/sidebar/sidebar-input.svelte.d.ts +2 -2
  46. package/dist/lib/components/sidebar/sidebar-input.svelte.d.ts.map +1 -1
  47. package/dist/lib/components/sidebar/sidebar-inset.svelte +3 -4
  48. package/dist/lib/components/sidebar/sidebar-inset.svelte.d.ts.map +1 -1
  49. package/dist/lib/components/sidebar/sidebar-menu-action.svelte +8 -5
  50. package/dist/lib/components/sidebar/sidebar-menu-action.svelte.d.ts.map +1 -1
  51. package/dist/lib/components/sidebar/sidebar-menu-badge.svelte +8 -2
  52. package/dist/lib/components/sidebar/sidebar-menu-badge.svelte.d.ts.map +1 -1
  53. package/dist/lib/components/sidebar/sidebar-menu-button.svelte +8 -8
  54. package/dist/lib/components/sidebar/sidebar-menu-sub-button.svelte +4 -4
  55. package/dist/lib/components/sidebar/sidebar-menu-sub.svelte +1 -1
  56. package/dist/lib/components/sidebar/sidebar-provider.svelte +1 -1
  57. package/dist/lib/components/sidebar/sidebar-rail.svelte +5 -4
  58. package/dist/lib/components/sidebar/sidebar-rail.svelte.d.ts.map +1 -1
  59. package/dist/lib/components/sidebar/sidebar-separator.svelte +1 -1
  60. package/dist/lib/components/sidebar/sidebar.svelte +9 -9
  61. package/dist/lib/vite/vite-plugin-component-source-collector.d.ts +0 -1
  62. package/dist/lib/vite/vite-plugin-component-source-collector.d.ts.map +1 -1
  63. package/dist/lib/vite/vite-plugin-component-source-collector.js +26 -32
  64. package/dist/routes/+page.svelte +1 -1
  65. package/package.json +39 -46
  66. package/src/lib/api/form.svelte.ts +137 -3
  67. package/src/lib/api/query/query.svelte.ts +4 -4
  68. package/src/lib/components/animated/animated.svelte +7 -7
  69. package/src/lib/components/breakpoint-badge/BreakpointBadge.svelte +7 -1
  70. package/src/lib/components/dnd/DndDroppable.svelte +1 -0
  71. package/src/lib/components/dnd/DndHandle.svelte +1 -1
  72. package/src/lib/components/dnd/DndItem.svelte +1 -0
  73. package/src/lib/components/dnd/DndSortableItem.svelte +1 -0
  74. package/src/lib/components/dnd/examples/SimpleSortable.svelte +4 -4
  75. package/src/lib/components/form/form-button.svelte +20 -8
  76. package/src/lib/components/form/form-description.svelte +1 -1
  77. package/src/lib/components/form/form-field-errors.svelte +1 -1
  78. package/src/lib/components/form/form-field-full.svelte +1 -1
  79. package/src/lib/components/form/form-legend.svelte +1 -1
  80. package/src/lib/components/gradient/Gradient.svelte +2 -2
  81. package/src/lib/components/search/combinations/searchPopover.svelte +1 -1
  82. package/src/lib/components/search/components/search-input.svelte +2 -2
  83. package/src/lib/components/search/components/search-list.svelte +1 -1
  84. package/src/lib/components/shader/WebGpuShader.svelte +2 -1
  85. package/src/lib/components/sidebar/sidebar-content.svelte +4 -1
  86. package/src/lib/components/sidebar/sidebar-group-action.svelte +11 -2
  87. package/src/lib/components/sidebar/sidebar-group-label.svelte +1 -1
  88. package/src/lib/components/sidebar/sidebar-input.svelte +7 -1
  89. package/src/lib/components/sidebar/sidebar-inset.svelte +3 -4
  90. package/src/lib/components/sidebar/sidebar-menu-action.svelte +8 -5
  91. package/src/lib/components/sidebar/sidebar-menu-badge.svelte +8 -2
  92. package/src/lib/components/sidebar/sidebar-menu-button.svelte +8 -8
  93. package/src/lib/components/sidebar/sidebar-menu-sub-button.svelte +4 -4
  94. package/src/lib/components/sidebar/sidebar-menu-sub.svelte +1 -1
  95. package/src/lib/components/sidebar/sidebar-provider.svelte +1 -1
  96. package/src/lib/components/sidebar/sidebar-rail.svelte +5 -4
  97. package/src/lib/components/sidebar/sidebar-separator.svelte +1 -1
  98. package/src/lib/components/sidebar/sidebar.svelte +9 -9
  99. package/src/lib/vite/vite-plugin-component-source-collector.ts +33 -41
  100. package/src/routes/+page.svelte +1 -1
@@ -1,18 +1,82 @@
1
1
  import { superForm, type SuperForm, type SuperValidated } from 'sveltekit-superforms';
2
2
  import type { ApiRequestFunction, HTTPMethod, ApiEndpoints, ApiInput, ApiSuccessBody, ApiErrorBody, ApiSchema } from 'ts-ag';
3
- type ValidInput<E extends ApiEndpoints, P extends E['path'], M extends E['method']> = NonNullable<ApiInput<E, P, M>>;
3
+ export type ValidInput<E extends ApiEndpoints, P extends E['path'], M extends E['method']> = NonNullable<ApiInput<E, P, M>>;
4
+ /**
5
+ * Creates a strongly-typed form factory for an API schema.
6
+ *
7
+ * Call the returned function with `{ path, method, ... }` to get a `SuperForm`
8
+ * that:
9
+ * - Validates using the Valibot schema for the given endpoint.
10
+ * - Submits via the provided `request` function on each valid update.
11
+ * - Maps API errors to `sveltekit-superforms` field errors / messages.
12
+ * - Optionally two-way binds external state through the `bind` adapter.
13
+ */
4
14
  export type ApiRequestForm<API extends ApiEndpoints> = <Path extends API['path'], Method extends Extract<API, {
5
15
  path: Path;
6
16
  }>['method']>(a: {
17
+ /** API path key used to select a schema and to call `request(path, method, data)` */
7
18
  path: Path;
19
+ /** HTTP method used to select a schema and to call `request(path, method, data)` */
8
20
  method: Method;
21
+ /**
22
+ * Optional lifecycle hooks for consumers.
23
+ * - `onSuccess`: called after a successful response body is parsed.
24
+ * - `onFail`: called after an error response body is parsed and mapped to form errors/messages.
25
+ */
9
26
  actions?: {
10
27
  onSuccess?: (form: SuperValidated<ValidInput<API, Path, Method>>, response: ApiSuccessBody<API, Path, Method>) => void | Promise<void>;
11
28
  onFail?: (form: SuperValidated<ValidInput<API, Path, Method>>, response: ApiErrorBody<API, Path, Method>) => void | Promise<void>;
12
29
  };
30
+ /**
31
+ * Partial initial values merged into schema defaults via `defaults(..., valibot(schema))`.
32
+ * Useful for edit forms where you only have a subset of fields initially.
33
+ */
13
34
  defaultValue?: Partial<ApiInput<API, Path, Method>>;
35
+ /**
36
+ * Two-way binding adapter to sync this form with external state.
37
+ *
38
+ * Use this when your app keeps the source-of-truth somewhere else (e.g. a store/box),
39
+ * but you still want Superforms handling validation + errors + submission.
40
+ *
41
+ * How it works:
42
+ * - Form -> external: on any form change, `bind.get(formData)` is validated against the schema,
43
+ * and if it differs from the current form value, `bind.set(formValue)` is called.
44
+ * - External -> form: whenever the external-derived value changes, the form store is updated
45
+ * to match (only if different).
46
+ *
47
+ * Important:
48
+ * - `get` should return an "input shape" object using the formData arg to populate fields that the
49
+ * external data store doesnt determine
50
+ * - `set` should update your external state based on the raw form data.
51
+ * - Keep `get` deterministic and free of side-effects; it is called frequently.
52
+ */
53
+ bind?: {
54
+ /**
55
+ * Derives the schema-valid value from the current form data.
56
+ * This is where you transform/prune the form state into the exact shape your endpoint expects.
57
+ *
58
+ * Return value must validate to `ValidInput<API, Path, Method>`.
59
+ */
60
+ get: (formData: ApiInput<API, Path, Method>) => ValidInput<API, Path, Method>;
61
+ /**
62
+ * Writes updated form data back to your external state.
63
+ * Called only when the derived value differs (deep) from the current form state.
64
+ */
65
+ set: (formData: ApiInput<API, Path, Method>) => void;
66
+ };
67
+ /**
68
+ * Extra `superForm` options (merged last).
69
+ * If you pass `onSubmit` / `onUpdate` here it will override the defaults in this helper.
70
+ */
14
71
  formProps?: Parameters<typeof superForm<ValidInput<API, Path, Method>>>[1];
15
72
  }) => SuperForm<ValidInput<API, Path, Method>>;
73
+ /**
74
+ * Build an endpoint-specific Superforms factory.
75
+ *
76
+ * @param schemas A `{[path]: {[method]: schema}}` mapping used to pick the Valibot schema for each endpoint.
77
+ * @param request An API request function that performs `(path, method, data)` and returns a fetch-like `Response`.
78
+ *
79
+ * @returns A function that creates a `SuperForm` for a particular `{path, method}` pair.
80
+ */
16
81
  export declare function createFormFunction<API extends ApiEndpoints>(schemas: Partial<Record<API['path'], Partial<Record<HTTPMethod, ApiSchema>>>>, request: ApiRequestFunction<API>): ApiRequestForm<API>;
17
- export {};
18
82
  //# sourceMappingURL=form.svelte.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/api/form.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkC,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtH,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,KAAK,UAAU,CAAC,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAErH,MAAM,MAAM,cAAc,CAAC,GAAG,SAAS,YAAY,IAAI,CACrD,IAAI,SAAS,GAAG,CAAC,MAAM,CAAC,EACxB,MAAM,SAAS,OAAO,CAAC,GAAG,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,QAAQ,CAAC,EACrD,CAAC,EAAE;IACH,IAAI,EAAE,IAAI,CAA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AAC,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAEpD;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,EAAE;QACL;;;;;WAKG;QACH,GAAG,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAE9E;;;WAGG;QACH,GAAG,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;KACtD,CAAC;IAEF;;;OAGG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5E,KAAK,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,SAAS,YAAY,EACzD,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,EAC7E,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,GAC/B,cAAc,CAAC,GAAG,CAAC,CAqGrB"}
@@ -1,19 +1,46 @@
1
1
  import { superForm, defaults, setError, setMessage } from 'sveltekit-superforms';
2
2
  import { valibot } from 'sveltekit-superforms/adapters';
3
+ import { watch } from 'runed';
4
+ import { dequal } from 'dequal';
5
+ import { get } from 'svelte/store';
6
+ import { safeParseAsync } from 'valibot';
7
+ /**
8
+ * Build an endpoint-specific Superforms factory.
9
+ *
10
+ * @param schemas A `{[path]: {[method]: schema}}` mapping used to pick the Valibot schema for each endpoint.
11
+ * @param request An API request function that performs `(path, method, data)` and returns a fetch-like `Response`.
12
+ *
13
+ * @returns A function that creates a `SuperForm` for a particular `{path, method}` pair.
14
+ */
3
15
  export function createFormFunction(schemas, request) {
4
- return ({ path, method, actions, defaultValue, formProps }) => {
16
+ return ({ path, method, actions, defaultValue, formProps, bind }) => {
5
17
  const schema = schemas[path]?.[method];
6
18
  if (schema === undefined)
7
19
  throw new Error('Invalid schema for form');
8
20
  // if (typeof schema === 'function') {
9
21
  // schema = schema();
10
22
  // }
11
- return superForm(defaults(defaultValue, valibot(schema)), {
23
+ const form = superForm(defaults(defaultValue, valibot(schema)), {
12
24
  SPA: true,
13
25
  resetForm: true,
14
26
  applyAction: false, // Prevents the form redirecting to the same page on submit
15
27
  delayMs: 300,
16
28
  validators: valibot(schema),
29
+ async onSubmit({ submitter }) {
30
+ // If a submit button has a name/value, include it in JSON forms (common for "intent" buttons).
31
+ if (submitter &&
32
+ 'name' in submitter &&
33
+ typeof submitter.name === 'string' &&
34
+ 'value' in submitter &&
35
+ typeof submitter.value === 'string') {
36
+ form.form.update((f) => {
37
+ if (submitter.name in f) {
38
+ f[submitter.name] = submitter.value;
39
+ }
40
+ return f;
41
+ });
42
+ }
43
+ },
17
44
  async onUpdate({ form }) {
18
45
  if (!form.valid)
19
46
  return;
@@ -42,5 +69,35 @@ export function createFormFunction(schemas, request) {
42
69
  },
43
70
  ...formProps
44
71
  });
72
+ if (bind !== undefined) {
73
+ /**
74
+ * Reads current form store, maps it through `bind.get`, and validates it against the endpoint schema.
75
+ * Returns the parsed (schema-valid) value.
76
+ */
77
+ const bindGet = async () => {
78
+ const formData = get(form.form);
79
+ return (await safeParseAsync(schema, bind.get(formData))).output;
80
+ };
81
+ form.form.subscribe((v) => {
82
+ bindGet().then((bindValue) => {
83
+ // console.log('Updating binded value', bindValue, 'to', v);
84
+ if (!dequal(bindValue, v)) {
85
+ bind.set(v);
86
+ // bindGet().then((v) => {
87
+ // console.log('done update', bindGet());
88
+ // });
89
+ }
90
+ });
91
+ });
92
+ watch(() => bindGet(), (newPromise) => {
93
+ newPromise.then((newValue) => {
94
+ // console.log('The state changed, updating the form from', get(form.form), 'to', newValue);
95
+ if (!dequal(get(form.form), newValue)) {
96
+ form.form.set(newValue);
97
+ }
98
+ });
99
+ });
100
+ }
101
+ return form;
45
102
  };
46
103
  }
@@ -28,7 +28,7 @@ export declare class Requestor<API extends ApiEndpoints, Path extends API['path'
28
28
  path: Path;
29
29
  }>['method']> {
30
30
  #private;
31
- constructor(path: Path, method: Method, request: ApiRequestFunction<API>, cache: Cache, batchDetails?: BatchDetails<API, Path, Method>);
31
+ constructor(path: Path, method: Method, request: ApiRequestFunction<API>, _cache: Cache, batchDetails?: BatchDetails<API, Path, Method>);
32
32
  private fetch;
33
33
  /**
34
34
  * Empties the batch queue for the id by combining the inputs.
@@ -1 +1 @@
1
- {"version":3,"file":"query.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/api/query/query.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAInH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAK5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEnE,qBAAa,KAAK,CAChB,GAAG,SAAS,YAAY,EACxB,IAAI,SAAS,GAAG,CAAC,MAAM,CAAC,EACxB,MAAM,SAAS,OAAO,CAAC,GAAG,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,QAAQ,CAAC;;gBAyBzC,EACV,IAAI,EACJ,MAAM,EACN,KAAK,EACL,SAAS,EACT,KAAK,EACN,EAAE;QACD,IAAI,EAAE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AMV,IAAI,MAAM,gBAET;IACD,IAAI,IAAI,IAAI,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,IAAI,CAEnD;IACD,IAAI,SAAS,IAAI,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,IAAI,CAEtD;CACF;AAED,qBAAa,SAAS,CACpB,GAAG,SAAS,YAAY,EACxB,IAAI,SAAS,GAAG,CAAC,MAAM,CAAC,EACxB,MAAM,SAAS,OAAO,CAAC,GAAG,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,QAAQ,CAAC;;gBA6BnD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,EAChC,MAAM,EAAE,KAAK,EACb,YAAY,CAAC,EAAE,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC;YAkBlC,KAAK;IAOnB;;;OAGG;YACW,eAAe;IAqBvB,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;CAkB3F"}
@@ -91,11 +91,11 @@ export class Requestor {
91
91
  #batchInput;
92
92
  #unBatchOutput;
93
93
  #limiter;
94
- #cache;
94
+ // #cache: Cache;
95
95
  // -------- State --------
96
96
  #batchQueue = {};
97
97
  #batchTimers = {};
98
- constructor(path, method, request, cache, batchDetails) {
98
+ constructor(path, method, request, _cache, batchDetails) {
99
99
  this.#path = path;
100
100
  this.#method = method;
101
101
  this.#request = request;
@@ -103,11 +103,11 @@ export class Requestor {
103
103
  maxConcurrent: 5,
104
104
  minTime: 100
105
105
  });
106
- this.#cache = cache;
106
+ // this.#cache = cache;
107
107
  // TODO
108
108
  this.#canBatch = batchDetails ? batchDetails.canBatch : () => false;
109
109
  this.#batchInput = batchDetails ? batchDetails.batchInput : (inputs) => inputs;
110
- this.#unBatchOutput = batchDetails ? batchDetails.unBatchOutput : (inputs, output) => [output];
110
+ this.#unBatchOutput = batchDetails ? batchDetails.unBatchOutput : (_inputs, output) => [output];
111
111
  }
112
112
  // Makes the actual call to the api
113
113
  async fetch(input) {
@@ -6,30 +6,30 @@
6
6
  variants: {
7
7
  animation: {
8
8
  flyAndScale: `
9
+ data-[state="hidden"]:animate-out data-[state="hidden"]:fade-out-0 data-[state="hidden"]:zoom-out-95
10
+ data-[state="hidden"]:slide-out-to-bottom-[10%]
9
11
  data-[state="visible"]:animate-in data-[state="visible"]:fade-in-0 data-[state="visible"]:zoom-in-95
10
12
  data-[state="visible"]:slide-in-from-bottom-[10%]
11
- data-[state="hidden"]:fade-out-0 data-[state="hidden"]:zoom-out-95
12
- data-[state="hidden"]:slide-out-to-bottom-[10%] data-[state="hidden"]:animate-out
13
13
  `,
14
14
  slide: `
15
+ data-[state="hidden"]:animate-out data-[state="hidden"]:slide-out-to-right
15
16
  data-[state="visible"]:animate-in data-[state="visible"]:slide-in-from-right
16
- data-[state="hidden"]:slide-out-to-right data-[state="hidden"]:animate-out
17
17
  `,
18
18
  fade: `
19
+ data-[state="hidden"]:animate-out data-[state="hidden"]:fade-out
19
20
  data-[state="visible"]:animate-in data-[state="visible"]:fade-in
20
- data-[state="hidden"]:fade-out data-[state="hidden"]:animate-out
21
21
  `,
22
22
  zoom: `
23
+ data-[state="hidden"]:animate-out data-[state="hidden"]:zoom-out-95
23
24
  data-[state="visible"]:animate-in data-[state="visible"]:zoom-in-95
24
- data-[state="hidden"]:zoom-out-95 data-[state="hidden"]:animate-out
25
25
  `,
26
26
  slideUp: `
27
+ data-[state="hidden"]:animate-out data-[state="hidden"]:slide-out-to-bottom
27
28
  data-[state="visible"]:animate-in data-[state="visible"]:slide-in-from-bottom
28
- data-[state="hidden"]:slide-out-to-bottom data-[state="hidden"]:animate-out
29
29
  `,
30
30
  slideDown: `
31
+ data-[state="hidden"]:animate-out data-[state="hidden"]:slide-out-to-top
31
32
  data-[state="visible"]:animate-in data-[state="visible"]:slide-in-from-top
32
- data-[state="hidden"]:slide-out-to-top data-[state="hidden"]:animate-out
33
33
  `,
34
34
  growHeight: `overflow-hidden`
35
35
  },
@@ -77,7 +77,13 @@
77
77
  <div class="w-fit">
78
78
  {#each breakpoints as bp (bp.name)}
79
79
  <div
80
- class="{bp.rounded} {bp.bgClass} {bp.hideClass} border {bp.borderClass} px-2 text-xs font-bold {bp.textClass}"
80
+ class="{bp.rounded}
81
+ {bp.bgClass}
82
+ {bp.hideClass}
83
+ border
84
+ {bp.borderClass}
85
+ px-2 text-xs font-bold
86
+ {bp.textClass}"
81
87
  >
82
88
  {bp.name}
83
89
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"BreakpointBadge.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/breakpoint-badge/BreakpointBadge.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,0BAA0B,GAAG;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC;AAuF5D,QAAA,MAAM,eAAe,gEAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"BreakpointBadge.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/breakpoint-badge/BreakpointBadge.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,0BAA0B,GAAG;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC;AA6F5D,QAAA,MAAM,eAAe,gEAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
@@ -10,6 +10,7 @@
10
10
 
11
11
  let { children, class: className, ...rest }: DroppableProps = $props();
12
12
 
13
+ // svelte-ignore state_referenced_locally
13
14
  const { ref, isDropTarget } = useDroppable(rest);
14
15
  </script>
15
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"DndDroppable.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/dnd/DndDroppable.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGpC,UAAU,cAAe,SAAQ,iBAAiB;IAChD,QAAQ,EAAE,OAAO,CAAC,CAAC;QAAE,YAAY,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAkBH,QAAA,MAAM,YAAY,oDAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"DndDroppable.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/dnd/DndDroppable.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGpC,UAAU,cAAe,SAAQ,iBAAiB;IAChD,QAAQ,EAAE,OAAO,CAAC,CAAC;QAAE,YAAY,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAmBH,QAAA,MAAM,YAAY,oDAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
@@ -14,7 +14,7 @@
14
14
  let handleClass = $derived(
15
15
  cn(
16
16
  `
17
- icon-draghandle text-muted-foreground flex size-4 transition-colors duration-150
17
+ icon-draghandle flex size-4 text-muted-foreground transition-colors duration-150
18
18
  hover:text-foreground
19
19
  `,
20
20
  item?.isDragging?.current ? `cursor-grabbing` : `cursor-grab`,
@@ -27,6 +27,7 @@
27
27
 
28
28
  let { child, class: className, style: styleName, ...rest }: DndItemProps = $props();
29
29
 
30
+ // svelte-ignore state_referenced_locally
30
31
  const { isDragging, ref, handleRef } = useDraggable({
31
32
  ...rest
32
33
  });
@@ -1 +1 @@
1
- {"version":3,"file":"DndItem.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/dnd/DndItem.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAC1C,iBAAiB,GAAG;IAClB,KAAK,EAAE,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;CACrC,CAAC;AAGN;;;;;;;;KAQK;AACL,OAAO,EAAM,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AA8BtC,QAAA,MAAM,OAAO,kDAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"DndItem.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/dnd/DndItem.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAC1C,iBAAiB,GAAG;IAClB,KAAK,EAAE,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;CACrC,CAAC;AAGN;;;;;;;;KAQK;AACL,OAAO,EAAM,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AA+BtC,QAAA,MAAM,OAAO,kDAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
@@ -35,6 +35,7 @@
35
35
 
36
36
  let { class: className, child, ...rest }: DndSortableItemProps = $props();
37
37
 
38
+ // svelte-ignore state_referenced_locally
38
39
  const { ref, handleRef, isDragging } = useSortable({ ...rest, feedback: 'move' });
39
40
 
40
41
  setItemContext({ handleRef, isDragging });
@@ -15,7 +15,7 @@ export declare function getItemContext(): ItemContext;
15
15
  import { useSortable, type UseSortableInput } from '@dnd-kit-svelte/svelte/sortable';
16
16
  import type { HTMLDivAttributes } from '../../utils/bits.js';
17
17
  import type { Attachment } from 'svelte/attachments';
18
- declare const DndSortableItem: import("svelte").Component<any, {}, "">;
18
+ declare const DndSortableItem: import("svelte").Component<DndSortableItemProps, {}, "">;
19
19
  type DndSortableItem = ReturnType<typeof DndSortableItem>;
20
20
  export default DndSortableItem;
21
21
  //# sourceMappingURL=DndSortableItem.svelte.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DndSortableItem.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/dnd/DndSortableItem.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,EAA0B,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE9D,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB,CA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AE,UAAU,CAAC,OAAO,CAAC,CAAC;CAChC,CAAC;AAEF,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,QAE/C;AAED,wBAAgB,cAAc,IAAI,WAAW,CAE5C;AAGH,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA2BrD,QAAA,MAAM,eAAe,0DAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
@@ -19,11 +19,11 @@
19
19
  </script>
20
20
 
21
21
  <button onclick={() => console.log($state.snapshot(items))}>hello</button>
22
- <SimpleSortable class="bg-sidebar flex h-100 flex-col gap-4 rounded-2xl p-6" bind:items>
22
+ <SimpleSortable class="flex h-100 flex-col gap-4 rounded-2xl bg-sidebar p-6" bind:items>
23
23
  {#snippet item(p)}
24
24
  <div
25
25
  class={cn(
26
- 'bg-secondary text-secondary-foreground rounded-md border-2 p-2',
26
+ 'rounded-md border-2 bg-secondary p-2 text-secondary-foreground',
27
27
  p.isOverlay && 'shadow-2xl',
28
28
  p.isDragging && 'bg-amber-700 opacity-20'
29
29
  )}
@@ -37,11 +37,11 @@
37
37
  </SimpleSortable>
38
38
 
39
39
  <!-- With handle -->
40
- <SimpleSortable class="bg-sidebar flex h-100 flex-col gap-4 rounded-2xl p-6" bind:items={items2}>
40
+ <SimpleSortable class="flex h-100 flex-col gap-4 rounded-2xl bg-sidebar p-6" bind:items={items2}>
41
41
  {#snippet item(p)}
42
42
  <div
43
43
  class={cn(
44
- 'bg-secondary text-secondary-foreground rounded-md border-2 p-2',
44
+ 'rounded-md border-2 bg-secondary p-2 text-secondary-foreground',
45
45
  p.isOverlay && 'shadow-2xl',
46
46
  p.isDragging && 'bg-amber-700 opacity-20'
47
47
  )}
@@ -1,6 +1,7 @@
1
1
  import { KeyboardSensor, PointerSensor } from '@dnd-kit-svelte/svelte';
2
+ import { RestrictToWindowEdges } from '@dnd-kit-svelte/svelte/modifiers';
2
3
  export declare const sensors: (typeof KeyboardSensor | typeof PointerSensor)[];
3
- export declare const modifiers: any[];
4
+ export declare const modifiers: (typeof RestrictToWindowEdges)[];
4
5
  /**
5
6
  * Finds an item recursively through the dnd.items list and each item's children
6
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"utils.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/dnd/utils.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvE,eAAO,MAAM,OAAO,kDAAkC,CAAC;AACvD,eAAO,MAAM,SAAS,OAA0B,CAAC;AAEjD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAA;CAAE,EAC/D,EAAE,EAAE,MAAM,GAAG,MAAM,EACnB,KAAK,EAAE,CAAC,EAAE,GACT;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAanD"}
1
+ {"version":3,"file":"utils.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/dnd/utils.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,eAAO,MAAM,OAAO,kDAAkC,CAAC;AACvD,eAAO,MAAM,SAAS,kCAA0B,CAAC;AAEjD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAA;CAAE,EAC/D,EAAE,EAAE,MAAM,GAAG,MAAM,EACnB,KAAK,EAAE,CAAC,EAAE,GACT;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAanD"}
@@ -7,21 +7,33 @@ Icons:
7
7
  -->
8
8
 
9
9
  <script module lang="ts">
10
- import * as Button from '$shadcn/button/index.js';
11
- export type FormButtonProps = Button.Props;
10
+ import type { FormFieldProps } from './form-field.svelte';
11
+ import type { FormPath } from 'sveltekit-superforms';
12
+ import type { Props as ButtonProps } from '$shadcn/button/index.js';
13
+
14
+ export type FormButtonProps<T extends Record<string, unknown>, U extends FormPath<T>> = Omit<ButtonProps, 'form'> & {
15
+ form?: FormFieldProps<T, U>['form'];
16
+ name?: U;
17
+ };
12
18
  </script>
13
19
 
14
- <script lang="ts">
20
+ <script lang="ts" generics="T extends Record<string, unknown>, U extends FormPath<T>">
21
+ import { Button } from '$shadcn/button/index.js';
15
22
  import { cn, flyAndScale } from '../../utils/utils.js';
16
23
  import { getFormContext } from './form.svelte';
17
24
 
18
- let { ref = $bindable(null), children, class: className, ...restProps }: FormButtonProps = $props();
25
+ let {
26
+ ref = $bindable(null),
27
+ form = getFormContext<T, U>(),
28
+ children,
29
+ class: className,
30
+ ...restProps
31
+ }: FormButtonProps<T, U> = $props();
19
32
 
20
- const form = getFormContext();
21
- const { submitting, delayed } = form;
33
+ const { submitting, delayed } = $derived(form);
22
34
  </script>
23
35
 
24
- <Button.Root bind:ref type="submit" class={cn(className)} {...restProps}>
36
+ <Button bind:ref type="submit" class={cn(className)} {...restProps}>
25
37
  <span class={cn('flex transition-opacity', $submitting && !$delayed && 'opacity-0')}>
26
38
  {#if $submitting && $delayed}
27
39
  <span in:flyAndScale|global class="icon-loading"></span>
@@ -29,4 +41,4 @@ Icons:
29
41
  {@render children?.()}
30
42
  {/if}
31
43
  </span>
32
- </Button.Root>
44
+ </Button>
@@ -1,6 +1,32 @@
1
- import * as Button from '$shadcn/button/index.js';
2
- export type FormButtonProps = Button.Props;
3
- declare const FormButton: import("svelte").Component<Button.Props, {}, "ref">;
4
- type FormButton = ReturnType<typeof FormButton>;
1
+ import type { FormFieldProps } from './form-field.svelte';
2
+ import type { FormPath } from 'sveltekit-superforms';
3
+ import type { Props as ButtonProps } from '$shadcn/button/index.js';
4
+ export type FormButtonProps<T extends Record<string, unknown>, U extends FormPath<T>> = Omit<ButtonProps, 'form'> & {
5
+ form?: FormFieldProps<T, U>['form'];
6
+ name?: U;
7
+ };
8
+ declare function $$render<T extends Record<string, unknown>, U extends FormPath<T>>(): {
9
+ props: FormButtonProps<T, U>;
10
+ exports: {};
11
+ bindings: "ref";
12
+ slots: {};
13
+ events: {};
14
+ };
15
+ declare class __sveltets_Render<T extends Record<string, unknown>, U extends FormPath<T>> {
16
+ props(): ReturnType<typeof $$render<T, U>>['props'];
17
+ events(): ReturnType<typeof $$render<T, U>>['events'];
18
+ slots(): ReturnType<typeof $$render<T, U>>['slots'];
19
+ bindings(): "ref";
20
+ exports(): {};
21
+ }
22
+ interface $$IsomorphicComponent {
23
+ new <T extends Record<string, unknown>, U extends FormPath<T>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T, U>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T, U>['props']>, ReturnType<__sveltets_Render<T, U>['events']>, ReturnType<__sveltets_Render<T, U>['slots']>> & {
24
+ $$bindings?: ReturnType<__sveltets_Render<T, U>['bindings']>;
25
+ } & ReturnType<__sveltets_Render<T, U>['exports']>;
26
+ <T extends Record<string, unknown>, U extends FormPath<T>>(internal: unknown, props: ReturnType<__sveltets_Render<T, U>['props']> & {}): ReturnType<__sveltets_Render<T, U>['exports']>;
27
+ z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>;
28
+ }
29
+ declare const FormButton: $$IsomorphicComponent;
30
+ type FormButton<T extends Record<string, unknown>, U extends FormPath<T>> = InstanceType<typeof FormButton<T, U>>;
5
31
  export default FormButton;
6
32
  //# sourceMappingURL=form-button.svelte.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-button.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/form/form-button.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAClD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC;AAgC7C,QAAA,MAAM,UAAU,qDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"form-button.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/form/form-button.svelte.ts"],"names":[],"mappings":"AAGE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEpE,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG;IAClH,IAAI,CAAC,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,CAAC,EAAE,CAAC,CAAC;CACV,CAAC;AAMJ,iBAAS,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC;WAgC7C,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;EAA+E;AACjI,cA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C,EAAC,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IACrL,YAAY,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,GAAG,EAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;CACrE;AACD,QAAA,MAAM,UAAU,EAAE,qBAAmC,CAAC;AACpC,KAAK,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAC,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,IAAI,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,CAAC;AAClH,eAAe,UAAU,CAAC"}
@@ -13,6 +13,6 @@
13
13
  <FormPrimitive.Description
14
14
  bind:ref
15
15
  data-slot="form-description"
16
- class={cn('text-muted-foreground text-sm', className)}
16
+ class={cn('text-sm text-muted-foreground', className)}
17
17
  {...restProps}
18
18
  />
@@ -14,7 +14,7 @@
14
14
  } = $props();
15
15
  </script>
16
16
 
17
- <FormPrimitive.FieldErrors bind:ref class={cn('text-destructive text-sm font-medium', className)} {...restProps}>
17
+ <FormPrimitive.FieldErrors bind:ref class={cn('text-sm font-medium text-destructive', className)} {...restProps}>
18
18
  {#snippet children({ errors, errorProps })}
19
19
  {#if childrenProp}
20
20
  {@render childrenProp({ errors, errorProps })}
@@ -2,7 +2,7 @@
2
2
  export type FormFullFieldProps<T extends Record<string, unknown>, U extends FormPath<T>> = FormFieldProps<T, U> & {
3
3
  label: string;
4
4
  description?: string;
5
- inputProps: HTMLInputAttributes;
5
+ inputProps?: HTMLInputAttributes;
6
6
  } & WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>>;
7
7
  </script>
8
8
 
@@ -1,7 +1,7 @@
1
1
  export type FormFullFieldProps<T extends Record<string, unknown>, U extends FormPath<T>> = FormFieldProps<T, U> & {
2
2
  label: string;
3
3
  description?: string;
4
- inputProps: HTMLInputAttributes;
4
+ inputProps?: HTMLInputAttributes;
5
5
  } & WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>>;
6
6
  import { type FormFieldProps } from './form-field.svelte';
7
7
  import { type FormPath } from 'sveltekit-superforms';
@@ -1 +1 @@
1
- {"version":3,"file":"form-field-full.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/form/form-field-full.svelte.ts"],"names":[],"mappings":"AAGE,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IAChH,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,mBAAmB,CAAC;CACjC,GAAG,eAAe,CAAC,cAAc,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;AAGtE,OAAc,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAMjE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE5E,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3E,iBAAS,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC;WAgD7C,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;EAA+E;AACpI,cA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CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;KAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9b,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAC,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IACrL,YAAY,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,GAAG,EAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;CACrE;AACD,QAAA,MAAM,aAAa,EAAE,qBAAmC,CAAC;AACvC,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAC,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,IAAI,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC,CAAC;AACxH,eAAe,aAAa,CAAC"}
@@ -10,8 +10,8 @@
10
10
  bind:ref
11
11
  class={cn(
12
12
  `
13
- data-fs-error:text-destructive
14
13
  text-sm leading-none font-medium
14
+ data-fs-error:text-destructive
15
15
  `,
16
16
  className
17
17
  )}
@@ -21,7 +21,7 @@
21
21
  } = $props();
22
22
 
23
23
  function toRgba(color: Vec4): string {
24
- const [r, g, b, a] = color.map((c) => Math.round(c * 255));
24
+ const [r, g, b, _a] = color.map((c) => Math.round(c * 255));
25
25
  return `rgba(${r}, ${g}, ${b}, ${color[3].toFixed(3)})`;
26
26
  }
27
27
 
@@ -40,7 +40,7 @@
40
40
  });
41
41
  </script>
42
42
 
43
- <div class={cn('h-full w-full', className)}>
43
+ <div class={cn('size-full', className)}>
44
44
  <WebGlShader
45
45
  width="100%"
46
46
  height="100%"
@@ -56,7 +56,7 @@
56
56
  {:else}
57
57
  Select an item...
58
58
  {/if}
59
- <span class="icon-[lucide--chevrons-up-down] ml-2 size-4 shrink-0 opacity-50"> </span>
59
+ <span class="ml-2 icon-[lucide--chevrons-up-down] size-4 shrink-0 opacity-50"> </span>
60
60
  </Button>
61
61
  {/snippet}
62
62
  </Popover.Trigger>
@@ -18,7 +18,7 @@ declare const SearchPopover: import("svelte").Component<SearchPopoverProps, {
18
18
  score?: number;
19
19
  })[];
20
20
  }) | null;
21
- }, "ref" | "value" | "perPage" | "trigger">;
21
+ }, "value" | "ref" | "perPage" | "trigger">;
22
22
  type SearchPopover = ReturnType<typeof SearchPopover>;
23
23
  export default SearchPopover;
24
24
  //# sourceMappingURL=searchPopover.svelte.d.ts.map
@@ -33,15 +33,15 @@
33
33
  {@render child({ props: mergedProps })}
34
34
  {:else}
35
35
  <div class="flex w-full items-center border-b px-2" data-command-input-wrapper="">
36
- <span class="icon-[lucide--search] mr-2 size-4 shrink-0 opacity-50"></span>
36
+ <span class="mr-2 icon-[lucide--search] size-4 shrink-0 opacity-50"></span>
37
37
  <input
38
38
  {...mergedProps}
39
39
  type="text"
40
40
  placeholder="Search..."
41
41
  class={cn(
42
42
  `
43
- placeholder:text-muted-foreground
44
43
  flex h-11 w-full rounded-md bg-transparent py-3 text-base outline-none
44
+ placeholder:text-muted-foreground
45
45
  disabled:cursor-not-allowed disabled:opacity-50
46
46
  md:text-sm
47
47
  `,