includio-cms 0.6.2 → 0.7.1

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 (78) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/ROADMAP.md +18 -2
  3. package/dist/admin/api/accept-invite.js +2 -2
  4. package/dist/admin/auth-client.d.ts +2122 -2122
  5. package/dist/admin/client/admin/admin-layout.svelte +5 -1
  6. package/dist/admin/client/admin/admin-layout.svelte.d.ts +2 -0
  7. package/dist/admin/client/index.d.ts +1 -0
  8. package/dist/admin/client/index.js +1 -0
  9. package/dist/admin/components/fields/blocks-field.svelte +3 -3
  10. package/dist/admin/components/fields/field-renderer.svelte +9 -0
  11. package/dist/admin/components/fields/image-field.svelte +2 -2
  12. package/dist/admin/components/fields/media-field.svelte +4 -4
  13. package/dist/admin/components/media/file/file-miniature.svelte +6 -6
  14. package/dist/admin/helpers/build-custom-fields-map.d.ts +7 -0
  15. package/dist/admin/helpers/build-custom-fields-map.js +13 -0
  16. package/dist/admin/helpers/index.d.ts +7 -0
  17. package/dist/admin/helpers/index.js +7 -0
  18. package/dist/admin/helpers/use-field.d.ts +26 -0
  19. package/dist/admin/helpers/use-field.js +9 -0
  20. package/dist/admin/state/custom-fields.svelte.d.ts +3 -0
  21. package/dist/admin/state/custom-fields.svelte.js +10 -0
  22. package/dist/admin/styles/admin.css +1 -1
  23. package/dist/admin/ui/index.d.ts +12 -0
  24. package/dist/admin/ui/index.js +14 -0
  25. package/dist/components/ui/accordion/accordion.svelte.d.ts +1 -1
  26. package/dist/components/ui/calendar/calendar.svelte.d.ts +1 -1
  27. package/dist/components/ui/command/command-dialog.svelte.d.ts +1 -1
  28. package/dist/components/ui/command/command-input.svelte.d.ts +1 -1
  29. package/dist/components/ui/command/command.svelte.d.ts +1 -1
  30. package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +1 -1
  31. package/dist/components/ui/input/input.svelte +2 -2
  32. package/dist/components/ui/input/input.svelte.d.ts +1 -1
  33. package/dist/components/ui/input-group/input-group-input.svelte.d.ts +2 -2
  34. package/dist/components/ui/input-group/input-group-textarea.svelte.d.ts +1 -1
  35. package/dist/components/ui/input-group/input-group.svelte +1 -1
  36. package/dist/components/ui/radio-group/radio-group.svelte.d.ts +1 -1
  37. package/dist/components/ui/select/select-trigger.svelte +1 -1
  38. package/dist/components/ui/sidebar/sidebar-input.svelte.d.ts +2 -2
  39. package/dist/components/ui/tabs/tabs.svelte.d.ts +1 -1
  40. package/dist/components/ui/textarea/textarea.svelte +1 -1
  41. package/dist/components/ui/textarea/textarea.svelte.d.ts +1 -1
  42. package/dist/components/ui/toggle-group/toggle-group-item.svelte.d.ts +1 -1
  43. package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +1 -1
  44. package/dist/core/cms.d.ts +7 -4
  45. package/dist/core/cms.js +52 -2
  46. package/dist/core/fields/fieldSchemaToTs.d.ts +11 -0
  47. package/dist/core/fields/fieldSchemaToTs.js +30 -0
  48. package/dist/core/index.d.ts +1 -0
  49. package/dist/core/index.js +1 -0
  50. package/dist/core/server/fields/populateEntry.js +50 -0
  51. package/dist/core/server/fields/resolveRichtextLinks.js +3 -2
  52. package/dist/core/server/fields/resolveUrlFields.js +2 -2
  53. package/dist/core/server/fields/slugResolver.d.ts +5 -0
  54. package/dist/core/server/fields/slugResolver.js +16 -0
  55. package/dist/core/server/fields/utils/resolveMedia.d.ts +12 -0
  56. package/dist/core/server/fields/utils/resolveMedia.js +23 -0
  57. package/dist/core/server/generator/fields.d.ts +2 -0
  58. package/dist/core/server/generator/fields.js +8 -0
  59. package/dist/core/server/generator/generator.js +9 -1
  60. package/dist/db-postgres/index.d.ts +6 -1
  61. package/dist/db-postgres/index.js +1 -0
  62. package/dist/server/auth.d.ts +1 -1358
  63. package/dist/server/auth.js +3 -23
  64. package/dist/sveltekit/index.d.ts +1 -0
  65. package/dist/sveltekit/index.js +1 -0
  66. package/dist/sveltekit/server/handle.js +21 -2
  67. package/dist/types/cms.d.ts +8 -3
  68. package/dist/types/config.d.ts +1 -0
  69. package/dist/types/fields.d.ts +9 -2
  70. package/dist/types/index.d.ts +2 -1
  71. package/dist/types/index.js +1 -0
  72. package/dist/types/plugins.d.ts +19 -1
  73. package/dist/updates/0.7.0/index.d.ts +2 -0
  74. package/dist/updates/0.7.0/index.js +16 -0
  75. package/dist/updates/0.7.1/index.d.ts +2 -0
  76. package/dist/updates/0.7.1/index.js +16 -0
  77. package/dist/updates/index.js +3 -1
  78. package/package.json +14 -1
@@ -3,12 +3,16 @@
3
3
  import '../../styles/admin.css';
4
4
  import { Toaster } from '../../../components/ui/sonner/index.js';
5
5
  import { MediaSort, setMediaSort } from '../../state/media-sort.svelte.js';
6
+ import { setCustomFields } from '../../state/custom-fields.svelte.js';
7
+ import type { CustomFieldDefinition } from '../../../types/plugins.js';
6
8
  import AdminPreloader from './admin-preloader.svelte';
7
9
  import { onMount } from 'svelte';
8
10
 
9
11
  setMediaSort(new MediaSort());
10
12
 
11
- let { children }: { children: Snippet } = $props();
13
+ let { children, customFields }: { children: Snippet; customFields?: Map<string, CustomFieldDefinition> } = $props();
14
+
15
+ setCustomFields(customFields ?? new Map());
12
16
 
13
17
  let mounted = $state(false);
14
18
  onMount(() => {
@@ -1,7 +1,9 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  import '../../styles/admin.css';
3
+ import type { CustomFieldDefinition } from '../../../types/plugins.js';
3
4
  type $$ComponentProps = {
4
5
  children: Snippet;
6
+ customFields?: Map<string, CustomFieldDefinition>;
5
7
  };
6
8
  declare const AdminLayout: import("svelte").Component<$$ComponentProps, {}, "">;
7
9
  type AdminLayout = ReturnType<typeof AdminLayout>;
@@ -10,3 +10,4 @@ export { default as FormSubmissionPage } from './form/form-submission/form-submi
10
10
  export { default as UsersPage } from './users/users-page.svelte';
11
11
  export { default as AcceptInvitePage } from './users/accept-invite-page.svelte';
12
12
  export { default as MaintenancePage } from './maintenance/maintenance-page.svelte';
13
+ export { default as MediaSelector } from '../components/media/media-selector.svelte';
@@ -10,3 +10,4 @@ export { default as FormSubmissionPage } from './form/form-submission/form-submi
10
10
  export { default as UsersPage } from './users/users-page.svelte';
11
11
  export { default as AcceptInvitePage } from './users/accept-invite-page.svelte';
12
12
  export { default as MaintenancePage } from './maintenance/maintenance-page.svelte';
13
+ export { default as MediaSelector } from '../components/media/media-selector.svelte';
@@ -299,9 +299,9 @@
299
299
  {@const objectField = field.of.find((option) => option.slug === item.slug)}
300
300
 
301
301
  {#if objectField}
302
- <Accordion.Item value={index.toString()} class="border-0" data-depth={depth + 1}>
302
+ <Accordion.Item value={index.toString()} class="overflow-hidden rounded-md border-0" data-depth={depth + 1}>
303
303
  <Accordion.Trigger
304
- class="items-center border px-4 text-base font-normal data-[state=open]:rounded-b-none"
304
+ class="items-center rounded-md border bg-card/60 px-4 text-base font-normal data-[state=open]:rounded-b-none"
305
305
  >
306
306
  <div class="flex grow items-center justify-between gap-4">
307
307
  <div class="flex items-center gap-4">
@@ -373,7 +373,7 @@
373
373
  {/if}
374
374
  </div>
375
375
  </Accordion.Trigger>
376
- <Accordion.Content class="space-y-4 rounded-b-md border border-t-0 p-4">
376
+ <Accordion.Content class="space-y-4 rounded-b-md border border-t-0 bg-card/80 p-4">
377
377
  {@const itemPath = joinPath(path, index)}
378
378
  <div data-field-path={itemPath}>
379
379
  <FieldRenderer
@@ -16,6 +16,7 @@
16
16
  import LazyField from './lazy-field.svelte';
17
17
  import { useInterfaceLanguage } from '../../state/interface-language.svelte.js';
18
18
  import { getLocalizedLabel } from '../../utils/collectionLabel.js';
19
+ import { getCustomFields } from '../../state/custom-fields.svelte.js';
19
20
 
20
21
  type Props = {
21
22
  objectFieldType?: 'default' | 'inline';
@@ -31,6 +32,7 @@
31
32
  let { field, form, path, objectFieldType = 'default', focusedPath = null, flashingPath = null, depth = 0, distributed = false, ...props }: Props = $props();
32
33
 
33
34
  const interfaceLanguage = useInterfaceLanguage();
35
+ const customFieldDefs = getCustomFields();
34
36
 
35
37
  // Bridge: SuperForm store → $bindable for leaf components
36
38
  // Cast to any: runtime types enforced by child components via $bindable
@@ -159,6 +161,13 @@
159
161
  <DateTimeField {field} bind:value={$value} />
160
162
  {:else if field.type === 'select'}
161
163
  <SelectField {field} bind:value={$value} />
164
+ {:else if field.type === 'custom'}
165
+ {@const customDef = customFieldDefs.get(field.fieldType)}
166
+ {#if customDef}
167
+ <LazyField loader={customDef.component} props={{ field, form, path }} skeletonClass="h-20" />
168
+ {:else}
169
+ <p>Nieznany custom field: {field.fieldType}</p>
170
+ {/if}
162
171
  {:else}
163
172
  <p>Nieobsługiwany typ pola: {field.type}</p>
164
173
  {/if}
@@ -114,7 +114,7 @@
114
114
  </button>
115
115
  </div>
116
116
  <!-- Counter -->
117
- <div class="absolute top-2 right-2 rounded-full bg-black/60 px-2 py-0.5 text-xs font-medium text-white backdrop-blur">
117
+ <div class="absolute top-2 right-2 rounded-full bg-plum-darker/60 px-2 py-0.5 text-xs font-medium text-white backdrop-blur">
118
118
  {currentIndex + 1} / {valueArr.length}
119
119
  </div>
120
120
  {/if}
@@ -122,7 +122,7 @@
122
122
 
123
123
  <!-- Stały gradient z przyciskami na dole -->
124
124
  <div
125
- class="absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-black/60 to-transparent p-2 pt-8"
125
+ class="absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-plum-darker/50 to-transparent p-2 pt-8"
126
126
  >
127
127
  <div class="flex gap-1">
128
128
  <Button {...props} size="sm" variant="secondary" class="h-8">
@@ -226,7 +226,7 @@
226
226
  >
227
227
  <FileMiniature {file} />
228
228
  </button>
229
- <div class="absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-black/60 to-transparent p-2 pt-8">
229
+ <div class="absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-plum-darker/50 to-transparent p-2 pt-8">
230
230
  <Button {...props} size="sm" variant="secondary" class="h-8">
231
231
  <Plus class="h-4 w-4" />
232
232
  {lang[interfaceLanguage.current].change}
@@ -279,12 +279,12 @@
279
279
  <ChevronRight class="h-5 w-5" />
280
280
  </button>
281
281
  </div>
282
- <div class="absolute top-2 right-2 rounded-full bg-black/60 px-2 py-0.5 text-xs font-medium text-white backdrop-blur">
282
+ <div class="absolute top-2 right-2 rounded-full bg-plum-darker/60 px-2 py-0.5 text-xs font-medium text-white backdrop-blur">
283
283
  {currentIndex + 1} / {valueArr.length}
284
284
  </div>
285
285
  {/if}
286
286
 
287
- <div class="absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-black/60 to-transparent p-2 pt-8">
287
+ <div class="absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-plum-darker/50 to-transparent p-2 pt-8">
288
288
  <Button {...props} size="sm" variant="secondary" class="h-8">
289
289
  <Plus class="h-4 w-4" />
290
290
  {lang[interfaceLanguage.current].change}
@@ -306,7 +306,7 @@
306
306
  <button
307
307
  {...props}
308
308
  type="button"
309
- class="flex aspect-video max-w-64 w-full flex-col items-center justify-center gap-2 rounded-2xl border-2 border-dashed border-muted-foreground/30 bg-muted/30 p-6 transition-colors hover:border-primary/50 hover:bg-muted/50"
309
+ class="flex aspect-video max-w-64 w-full flex-col items-center justify-center gap-2 rounded-2xl border-2 border-dashed border-border bg-card/80 p-6 transition-colors hover:border-primary/50 hover:bg-card"
310
310
  >
311
311
  <div class="rounded-full bg-muted p-3">
312
312
  <Plus class="h-6 w-6 text-muted-foreground" />
@@ -18,10 +18,10 @@
18
18
  {#if mode === 'thumb'}
19
19
  <!-- Thumb mode: just the media content for 120px thumb area -->
20
20
  {#if file.type === 'image'}
21
- <img class="pointer-events-none size-full object-contain" src={file.url} alt={file.name} />
21
+ <img class="pointer-events-none size-full object-contain m-0" src={file.url} alt={file.name} />
22
22
  {:else if file.type === 'video'}
23
23
  {#if file.thumbnailUrl}
24
- <img class="pointer-events-none size-full object-contain" src={file.thumbnailUrl} alt={file.name} />
24
+ <img class="pointer-events-none size-full object-contain m-0" src={file.thumbnailUrl} alt={file.name} />
25
25
  {/if}
26
26
  <div class="ml-video-overlay">
27
27
  <div class="ml-video-play">
@@ -48,12 +48,12 @@
48
48
  <div class="absolute top-1 right-1 rounded-sm bg-background/80 backdrop-blur-sm p-0.5">
49
49
  <Photo class="text-muted-foreground" />
50
50
  </div>
51
- <img class="pointer-events-none size-full object-contain" src={file.url} alt={file.name} />
51
+ <img class="pointer-events-none size-full object-contain m-0" src={file.url} alt={file.name} />
52
52
  {:else if file.type === 'video'}
53
53
  <div class="absolute top-1 right-1 rounded-sm bg-background/80 backdrop-blur-sm p-0.5">
54
54
  <Video class="text-muted-foreground" />
55
55
  </div>
56
- <img class="pointer-events-none size-full object-contain" src={file.thumbnailUrl} alt={file.name} />
56
+ <img class="pointer-events-none size-full object-contain m-0" src={file.thumbnailUrl} alt={file.name} />
57
57
  {:else if file.type === 'audio'}
58
58
  <div class="absolute top-1 right-1 rounded-sm bg-background/80 backdrop-blur-sm p-0.5">
59
59
  <Music class="text-muted-foreground" />
@@ -65,12 +65,12 @@
65
65
  <div class="absolute top-1 right-1 rounded-sm bg-background/80 backdrop-blur-sm p-0.5">
66
66
  <Pdf class="text-muted-foreground" />
67
67
  </div>
68
- <Pdf class="pointer-events-none size-full object-contain" />
68
+ <Pdf class="pointer-events-none size-full object-contain m-0" />
69
69
  {:else}
70
70
  <div class="absolute top-1 right-1 rounded-sm bg-background/80 backdrop-blur-sm p-0.5">
71
71
  <File class="text-muted-foreground" />
72
72
  </div>
73
- <File class="pointer-events-none size-full object-contain" />
73
+ <File class="pointer-events-none size-full object-contain m-0" />
74
74
  {/if}
75
75
  </div>
76
76
  {/if}
@@ -0,0 +1,7 @@
1
+ import type { PluginConfig } from '../../types/plugins.js';
2
+ import type { CustomFieldDefinition } from '../../types/plugins.js';
3
+ /**
4
+ * Build a Map<fieldType, CustomFieldDefinition> from plugin configs.
5
+ * Use in consumer's admin layout to pass customFields to AdminLayout.
6
+ */
7
+ export declare function buildCustomFieldsMap(...plugins: PluginConfig[]): Map<string, CustomFieldDefinition>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Build a Map<fieldType, CustomFieldDefinition> from plugin configs.
3
+ * Use in consumer's admin layout to pass customFields to AdminLayout.
4
+ */
5
+ export function buildCustomFieldsMap(...plugins) {
6
+ const map = new Map();
7
+ for (const p of plugins) {
8
+ for (const f of p.fields ?? []) {
9
+ map.set(f.fieldType, f);
10
+ }
11
+ }
12
+ return map;
13
+ }
@@ -0,0 +1,7 @@
1
+ export { useField } from './use-field.js';
2
+ export { buildCustomFieldsMap } from './build-custom-fields-map.js';
3
+ export { useInterfaceLanguage } from '../state/interface-language.svelte.js';
4
+ export { getContentLanguage } from '../state/content-language.svelte.js';
5
+ export { getRemotes } from '../context/remotes.js';
6
+ export { getCustomFields } from '../state/custom-fields.svelte.js';
7
+ export { getLocalizedLabel } from '../utils/collectionLabel.js';
@@ -0,0 +1,7 @@
1
+ export { useField } from './use-field.js';
2
+ export { buildCustomFieldsMap } from './build-custom-fields-map.js';
3
+ export { useInterfaceLanguage } from '../state/interface-language.svelte.js';
4
+ export { getContentLanguage } from '../state/content-language.svelte.js';
5
+ export { getRemotes } from '../context/remotes.js';
6
+ export { getCustomFields } from '../state/custom-fields.svelte.js';
7
+ export { getLocalizedLabel } from '../utils/collectionLabel.js';
@@ -0,0 +1,26 @@
1
+ import { type SuperForm, type FormPathLeaves } from 'sveltekit-superforms';
2
+ /**
3
+ * Simplified wrapper around sveltekit-superforms' formFieldProxy.
4
+ * Plugin authors don't need to know the superforms API.
5
+ */
6
+ export declare function useField(form: SuperForm<Record<string, unknown>>, path: FormPathLeaves<Record<string, unknown>>): {
7
+ value: {
8
+ subscribe: (this: void, run: import("svelte/store").Subscriber<unknown>, invalidate?: () => void) => import("svelte/store").Unsubscriber;
9
+ set(this: void, value: unknown, options?: {
10
+ taint?: import("sveltekit-superforms").TaintOption;
11
+ }): void;
12
+ update(this: void, updater: import("svelte/store").Updater<unknown>, options?: {
13
+ taint?: import("sveltekit-superforms").TaintOption;
14
+ }): void;
15
+ };
16
+ errors: import("svelte/store").Writable<string[] | undefined>;
17
+ constraints: import("svelte/store").Writable<Partial<{
18
+ pattern: string;
19
+ min: number | string;
20
+ max: number | string;
21
+ required: boolean;
22
+ step: number | "any";
23
+ minlength: number;
24
+ maxlength: number;
25
+ }> | undefined>;
26
+ };
@@ -0,0 +1,9 @@
1
+ import { formFieldProxy } from 'sveltekit-superforms';
2
+ /**
3
+ * Simplified wrapper around sveltekit-superforms' formFieldProxy.
4
+ * Plugin authors don't need to know the superforms API.
5
+ */
6
+ export function useField(form, path) {
7
+ const { value, errors, constraints } = formFieldProxy(form, path);
8
+ return { value, errors, constraints };
9
+ }
@@ -0,0 +1,3 @@
1
+ import type { CustomFieldDefinition } from '../../types/plugins.js';
2
+ export declare function setCustomFields(defs: Map<string, CustomFieldDefinition>): void;
3
+ export declare function getCustomFields(): Map<string, CustomFieldDefinition>;
@@ -0,0 +1,10 @@
1
+ import { getContext, setContext } from 'svelte';
2
+ import { setSchemaCustomFields } from '../../core/fields/fieldSchemaToTs.js';
3
+ const contextKey = Symbol('customFields');
4
+ export function setCustomFields(defs) {
5
+ setContext(contextKey, defs);
6
+ setSchemaCustomFields(defs);
7
+ }
8
+ export function getCustomFields() {
9
+ return getContext(contextKey) ?? new Map();
10
+ }
@@ -650,7 +650,7 @@ div[data-collapsible]:not([data-collapsible='icon'])
650
650
 
651
651
  /* Checkered transparency background */
652
652
  .ml-checkered-bg {
653
- background: repeating-conic-gradient(var(--muted) 0% 25%, var(--card) 0% 50%) 50% / 16px 16px;
653
+ background: repeating-conic-gradient(#E2DFF0 0% 25%, #F4F2FA 0% 50%) 50% / 16px 16px;
654
654
  }
655
655
 
656
656
  /* Staggered fadeUp animation for file cards */
@@ -0,0 +1,12 @@
1
+ export { Button, type ButtonProps } from '../../components/ui/button/index.js';
2
+ export * as Dialog from '../../components/ui/dialog/index.js';
3
+ export { Input } from '../../components/ui/input/index.js';
4
+ export * as Card from '../../components/ui/card/index.js';
5
+ export { Label } from '../../components/ui/label/index.js';
6
+ export { Separator } from '../../components/ui/separator/index.js';
7
+ export { Badge } from '../../components/ui/badge/index.js';
8
+ export { Skeleton } from '../../components/ui/skeleton/index.js';
9
+ export * as Tabs from '../../components/ui/tabs/index.js';
10
+ export * as Tooltip from '../../components/ui/tooltip/index.js';
11
+ export { default as FileMiniature } from '../components/media/file/file-miniature.svelte';
12
+ export { default as MediaSelector } from '../components/media/media-selector.svelte';
@@ -0,0 +1,14 @@
1
+ // shadcn-svelte UI primitives
2
+ export { Button } from '../../components/ui/button/index.js';
3
+ export * as Dialog from '../../components/ui/dialog/index.js';
4
+ export { Input } from '../../components/ui/input/index.js';
5
+ export * as Card from '../../components/ui/card/index.js';
6
+ export { Label } from '../../components/ui/label/index.js';
7
+ export { Separator } from '../../components/ui/separator/index.js';
8
+ export { Badge } from '../../components/ui/badge/index.js';
9
+ export { Skeleton } from '../../components/ui/skeleton/index.js';
10
+ export * as Tabs from '../../components/ui/tabs/index.js';
11
+ export * as Tooltip from '../../components/ui/tooltip/index.js';
12
+ // Admin components
13
+ export { default as FileMiniature } from '../components/media/file/file-miniature.svelte';
14
+ export { default as MediaSelector } from '../components/media/media-selector.svelte';
@@ -1,4 +1,4 @@
1
1
  import { Accordion as AccordionPrimitive } from "bits-ui";
2
- declare const Accordion: import("svelte").Component<AccordionPrimitive.RootProps, {}, "ref" | "value">;
2
+ declare const Accordion: import("svelte").Component<AccordionPrimitive.RootProps, {}, "value" | "ref">;
3
3
  type Accordion = ReturnType<typeof Accordion>;
4
4
  export default Accordion;
@@ -16,6 +16,6 @@ type $$ComponentProps = WithoutChildrenOrChild<CalendarPrimitive.RootProps> & {
16
16
  outsideMonth: boolean;
17
17
  }]>;
18
18
  };
19
- declare const Calendar: import("svelte").Component<$$ComponentProps, {}, "ref" | "value" | "placeholder">;
19
+ declare const Calendar: import("svelte").Component<$$ComponentProps, {}, "value" | "ref" | "placeholder">;
20
20
  type Calendar = ReturnType<typeof Calendar>;
21
21
  export default Calendar;
@@ -7,6 +7,6 @@ type $$ComponentProps = WithoutChildrenOrChild<DialogPrimitive.RootProps> & With
7
7
  title?: string;
8
8
  description?: string;
9
9
  };
10
- declare const CommandDialog: import("svelte").Component<$$ComponentProps, {}, "ref" | "value" | "open">;
10
+ declare const CommandDialog: import("svelte").Component<$$ComponentProps, {}, "value" | "ref" | "open">;
11
11
  type CommandDialog = ReturnType<typeof CommandDialog>;
12
12
  export default CommandDialog;
@@ -1,4 +1,4 @@
1
1
  import { Command as CommandPrimitive } from "bits-ui";
2
- declare const CommandInput: import("svelte").Component<CommandPrimitive.InputProps, {}, "ref" | "value">;
2
+ declare const CommandInput: import("svelte").Component<CommandPrimitive.InputProps, {}, "value" | "ref">;
3
3
  type CommandInput = ReturnType<typeof CommandInput>;
4
4
  export default CommandInput;
@@ -3,6 +3,6 @@ export type CommandRootApi = CommandPrimitive.Root;
3
3
  type $$ComponentProps = CommandPrimitive.RootProps & {
4
4
  api?: CommandRootApi | null;
5
5
  };
6
- declare const Command: import("svelte").Component<$$ComponentProps, {}, "api" | "ref" | "value">;
6
+ declare const Command: import("svelte").Component<$$ComponentProps, {}, "value" | "ref" | "api">;
7
7
  type Command = ReturnType<typeof Command>;
8
8
  export default Command;
@@ -1,4 +1,4 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
2
- declare const DropdownMenuRadioGroup: import("svelte").Component<DropdownMenuPrimitive.RadioGroupProps, {}, "ref" | "value">;
2
+ declare const DropdownMenuRadioGroup: import("svelte").Component<DropdownMenuPrimitive.RadioGroupProps, {}, "value" | "ref">;
3
3
  type DropdownMenuRadioGroup = ReturnType<typeof DropdownMenuRadioGroup>;
4
4
  export default DropdownMenuRadioGroup;
@@ -25,7 +25,7 @@
25
25
  bind:this={ref}
26
26
  data-slot={dataSlot}
27
27
  class={cn(
28
- "selection:bg-primary selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground shadow-xs flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50",
28
+ "selection:bg-primary selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground shadow-xs flex h-9 w-full min-w-0 rounded-md border bg-card px-3 pt-1.5 text-sm font-medium outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50",
29
29
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
30
30
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
31
31
  className
@@ -40,7 +40,7 @@
40
40
  bind:this={ref}
41
41
  data-slot={dataSlot}
42
42
  class={cn(
43
- "border-input bg-background selection:bg-primary 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",
43
+ "border-input bg-card selection:bg-primary 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",
44
44
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
45
45
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
46
46
  className
@@ -8,6 +8,6 @@ type Props = WithElementRef<Omit<HTMLInputAttributes, "type"> & ({
8
8
  type?: InputType;
9
9
  files?: undefined;
10
10
  })>;
11
- declare const Input: import("svelte").Component<Props, {}, "files" | "ref" | "value">;
11
+ declare const Input: import("svelte").Component<Props, {}, "files" | "value" | "ref">;
12
12
  type Input = ReturnType<typeof Input>;
13
13
  export default Input;
@@ -2,10 +2,10 @@ declare const InputGroupInput: import("svelte").Component<(Omit<import("svelte/e
2
2
  type: "file";
3
3
  files?: FileList;
4
4
  } | {
5
- type?: "number" | "image" | "url" | "text" | "date" | "radio" | "color" | "button" | "checkbox" | "search" | (string & {}) | "email" | "hidden" | "password" | "reset" | "time" | "submit" | "tel" | "datetime-local" | "month" | "range" | "week";
5
+ type?: "number" | "image" | "url" | "text" | "date" | "radio" | "color" | "button" | "checkbox" | "search" | (string & {}) | "email" | "time" | "password" | "hidden" | "reset" | "submit" | "tel" | "datetime-local" | "month" | "range" | "week";
6
6
  files?: undefined;
7
7
  })) & {
8
8
  ref?: HTMLElement | null | undefined;
9
- }, {}, "ref" | "value">;
9
+ }, {}, "value" | "ref">;
10
10
  type InputGroupInput = ReturnType<typeof InputGroupInput>;
11
11
  export default InputGroupInput;
@@ -1,3 +1,3 @@
1
- declare const InputGroupTextarea: import("svelte").Component<Omit<import("../../../utils.js").WithElementRef<import("svelte/elements").HTMLTextareaAttributes>, "children">, {}, "ref" | "value">;
1
+ declare const InputGroupTextarea: import("svelte").Component<Omit<import("../../../utils.js").WithElementRef<import("svelte/elements").HTMLTextareaAttributes>, "children">, {}, "value" | "ref">;
2
2
  type InputGroupTextarea = ReturnType<typeof InputGroupTextarea>;
3
3
  export default InputGroupTextarea;
@@ -15,7 +15,7 @@
15
15
  data-slot="input-group"
16
16
  role="group"
17
17
  class={cn(
18
- "group/input-group border-input dark:bg-input/30 shadow-xs relative flex w-full items-center rounded-md border outline-none transition-[color,box-shadow]",
18
+ "group/input-group border-input bg-card shadow-xs relative flex w-full items-center rounded-md border outline-none transition-[color,box-shadow]",
19
19
  "h-9 has-[>textarea]:h-auto",
20
20
 
21
21
  // Variants based on alignment.
@@ -1,4 +1,4 @@
1
1
  import { RadioGroup as RadioGroupPrimitive } from "bits-ui";
2
- declare const RadioGroup: import("svelte").Component<RadioGroupPrimitive.RootProps, {}, "ref" | "value">;
2
+ declare const RadioGroup: import("svelte").Component<RadioGroupPrimitive.RootProps, {}, "value" | "ref">;
3
3
  type RadioGroup = ReturnType<typeof RadioGroup>;
4
4
  export default RadioGroup;
@@ -19,7 +19,7 @@
19
19
  data-slot="select-trigger"
20
20
  data-size={size}
21
21
  class={cn(
22
- "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 shadow-xs flex w-fit select-none items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
22
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shadow-xs flex w-fit select-none items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-card px-3 py-2 text-sm outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
23
23
  className
24
24
  )}
25
25
  {...restProps}
@@ -2,10 +2,10 @@ declare const SidebarInput: import("svelte").Component<(Omit<import("svelte/elem
2
2
  type: "file";
3
3
  files?: FileList;
4
4
  } | {
5
- type?: "number" | "image" | "url" | "text" | "date" | "radio" | "color" | "button" | "checkbox" | "search" | (string & {}) | "email" | "hidden" | "password" | "reset" | "time" | "submit" | "tel" | "datetime-local" | "month" | "range" | "week";
5
+ type?: "number" | "image" | "url" | "text" | "date" | "radio" | "color" | "button" | "checkbox" | "search" | (string & {}) | "email" | "time" | "password" | "hidden" | "reset" | "submit" | "tel" | "datetime-local" | "month" | "range" | "week";
6
6
  files?: undefined;
7
7
  })) & {
8
8
  ref?: HTMLElement | null | undefined;
9
- }, {}, "ref" | "value">;
9
+ }, {}, "value" | "ref">;
10
10
  type SidebarInput = ReturnType<typeof SidebarInput>;
11
11
  export default SidebarInput;
@@ -1,4 +1,4 @@
1
1
  import { Tabs as TabsPrimitive } from "bits-ui";
2
- declare const Tabs: import("svelte").Component<TabsPrimitive.RootProps, {}, "ref" | "value">;
2
+ declare const Tabs: import("svelte").Component<TabsPrimitive.RootProps, {}, "value" | "ref">;
3
3
  type Tabs = ReturnType<typeof Tabs>;
4
4
  export default Tabs;
@@ -15,7 +15,7 @@
15
15
  bind:this={ref}
16
16
  data-slot={dataSlot}
17
17
  class={cn(
18
- "border-input placeholder:text-muted-foreground shadow-xs field-sizing-content flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
18
+ "border-input placeholder:text-muted-foreground shadow-xs field-sizing-content flex min-h-16 w-full rounded-md border bg-card px-3 py-2 text-base outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
19
19
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
20
20
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
21
21
  className
@@ -1,5 +1,5 @@
1
1
  import { type WithElementRef } from "../../../utils.js";
2
2
  import type { HTMLTextareaAttributes } from "svelte/elements";
3
- declare const Textarea: import("svelte").Component<Omit<WithElementRef<HTMLTextareaAttributes>, "children">, {}, "ref" | "value">;
3
+ declare const Textarea: import("svelte").Component<Omit<WithElementRef<HTMLTextareaAttributes>, "children">, {}, "value" | "ref">;
4
4
  type Textarea = ReturnType<typeof Textarea>;
5
5
  export default Textarea;
@@ -1,6 +1,6 @@
1
1
  import { ToggleGroup as ToggleGroupPrimitive } from "bits-ui";
2
2
  import { type ToggleVariants } from "../toggle/index.js";
3
3
  type $$ComponentProps = ToggleGroupPrimitive.ItemProps & ToggleVariants;
4
- declare const ToggleGroupItem: import("svelte").Component<$$ComponentProps, {}, "ref" | "value">;
4
+ declare const ToggleGroupItem: import("svelte").Component<$$ComponentProps, {}, "value" | "ref">;
5
5
  type ToggleGroupItem = ReturnType<typeof ToggleGroupItem>;
6
6
  export default ToggleGroupItem;
@@ -3,6 +3,6 @@ export declare function setToggleGroupCtx(props: ToggleVariants): void;
3
3
  export declare function getToggleGroupCtx(): ToggleVariants;
4
4
  import { ToggleGroup as ToggleGroupPrimitive } from "bits-ui";
5
5
  type $$ComponentProps = ToggleGroupPrimitive.RootProps & ToggleVariants;
6
- declare const ToggleGroup: import("svelte").Component<$$ComponentProps, {}, "ref" | "value">;
6
+ declare const ToggleGroup: import("svelte").Component<$$ComponentProps, {}, "value" | "ref">;
7
7
  type ToggleGroup = ReturnType<typeof ToggleGroup>;
8
8
  export default ToggleGroup;
@@ -1,29 +1,32 @@
1
1
  import type { DatabaseAdapter } from '../types/adapters/db.js';
2
2
  import type { FilesAdapter } from '../types/adapters/files.js';
3
- import type { ApiKeyConfig, CMSConfig, ICMS, MediaConfig } from '../types/cms.js';
3
+ import type { ApiKeyConfig, AuthConfig, CMSConfig, ICMS, MediaConfig } from '../types/cms.js';
4
4
  import type { CollectionConfigWithType } from '../types/collections.js';
5
5
  import type { Language } from '../types/languages.js';
6
6
  import type { SingleConfigWithType } from '../types/singles.js';
7
- import type { PluginConfig } from '../types/plugins.js';
7
+ import type { CustomFieldDefinition, PluginConfig } from '../types/plugins.js';
8
8
  import type { FormConfig } from '../types/forms.js';
9
9
  import type { AIAdapter } from '../types/adapters/ai.js';
10
10
  import type { EmailAdapter } from '../types/adapters/email.js';
11
- import type { AuthAdapter } from '../types/cms.js';
11
+ import { betterAuth } from 'better-auth';
12
12
  export declare class CMS implements ICMS {
13
13
  private config;
14
14
  databaseAdapter: DatabaseAdapter;
15
15
  filesAdapter: FilesAdapter;
16
16
  emailAdapter: EmailAdapter | null;
17
- auth: AuthAdapter | null;
17
+ authConfig: AuthConfig | null;
18
18
  aiAdapter: AIAdapter | null;
19
+ private _betterAuth;
19
20
  collections: Record<string, CollectionConfigWithType>;
20
21
  singles: Record<string, SingleConfigWithType>;
21
22
  forms: Record<string, FormConfig>;
22
23
  languages: Language[];
23
24
  mediaConfig: MediaConfig;
24
25
  plugins: PluginConfig[];
26
+ customFields: Map<string, CustomFieldDefinition>;
25
27
  apiKeys: ApiKeyConfig[];
26
28
  constructor(config: CMSConfig);
29
+ get auth(): ReturnType<typeof betterAuth>;
27
30
  getBySlug(slug: string): CollectionConfigWithType | SingleConfigWithType;
28
31
  getFormBySlug(slug: string): FormConfig;
29
32
  }