@kidecms/core 0.16.1 → 0.16.3

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.
@@ -850,7 +850,7 @@ export default function AssetsGrid({
850
850
  <CardContent className="text-muted-foreground py-12 text-center text-sm">Searching…</CardContent>
851
851
  </Card>
852
852
  ) : (
853
- <div className="bg-muted/20 flex h-40 flex-col items-center justify-center gap-3 rounded-lg border border-dashed">
853
+ <div className="bg-field-subtle flex h-40 flex-col items-center justify-center gap-3 rounded-lg border border-dashed">
854
854
  <ImagePlus className="text-muted-foreground/30 size-12" />
855
855
  <p className="text-muted-foreground text-sm">{emptyStateMessage}</p>
856
856
  </div>
@@ -477,7 +477,7 @@ export default function BlockEditor({
477
477
  <input type="hidden" ref={hiddenRef} name={name} value={serialized} />
478
478
 
479
479
  {blocks.length === 0 && (
480
- <div className="bg-muted/20 flex h-20 items-center justify-center rounded-lg border border-dashed">
480
+ <div className="bg-field-subtle flex h-20 items-center justify-center rounded-lg border border-dashed">
481
481
  <p className="text-muted-foreground text-sm">No blocks added yet</p>
482
482
  </div>
483
483
  )}
@@ -134,7 +134,7 @@ export default function CollaborationReviewBar(props: Props) {
134
134
 
135
135
  return (
136
136
  <>
137
- <div className="bg-muted/30 flex w-full flex-wrap items-center justify-between gap-x-4 gap-y-2 rounded-lg border px-4 py-2.5">
137
+ <div className="bg-field flex w-full flex-wrap items-center justify-between gap-x-4 gap-y-2 rounded-lg border px-4 py-2.5">
138
138
  {/* Left — review status + the action for this stage */}
139
139
  <div className="flex flex-wrap items-center gap-2.5">
140
140
  {reviewState === "changes_requested" ? (
@@ -565,7 +565,7 @@ export default function ContentEditor({
565
565
  className={cn(
566
566
  isFullscreen
567
567
  ? "bg-background fixed inset-0 z-50 flex flex-col"
568
- : "border-input hover:border-foreground/20 bg-muted/30 dark:bg-input/30 relative overflow-hidden rounded-lg border transition-colors",
568
+ : "border-input hover:border-foreground/20 bg-field relative overflow-hidden rounded-lg border transition-colors",
569
569
  )}
570
570
  >
571
571
  <input ref={hiddenRef} type="hidden" name={name} value={cmsJson} />
@@ -83,7 +83,7 @@ export default function FocalPointSelector({ src, alt, focalX: initialX, focalY:
83
83
  </div>
84
84
  )}
85
85
  </div>
86
- <div className="bg-muted/30 relative cursor-crosshair overflow-hidden rounded-md" onClick={handleClick}>
86
+ <div className="bg-field relative cursor-crosshair overflow-hidden rounded-md" onClick={handleClick}>
87
87
  <img ref={imageRef} src={src} alt={alt} className="w-full object-contain" draggable={false} />
88
88
  {hasFocal && (
89
89
  <div
@@ -102,7 +102,7 @@ export default function FocalPointSelector({ src, alt, focalX: initialX, focalY:
102
102
  {presets.map((preset) => (
103
103
  <div key={preset.name} className="space-y-1">
104
104
  <div
105
- className="bg-muted/30 w-24 overflow-hidden rounded-sm"
105
+ className="bg-field w-24 overflow-hidden rounded-sm"
106
106
  style={{ aspectRatio: preset.aspect.replace(/[:x]/, "/") }}
107
107
  >
108
108
  <img
@@ -162,7 +162,7 @@ export default function ImageBrowseDialog({ open, onOpenChange, onSelect }: Prop
162
162
  </div>
163
163
  ) : (
164
164
  browse.folders.length === 0 && (
165
- <div className="bg-muted/20 text-muted-foreground flex h-48 items-center justify-center rounded-lg border border-dashed text-sm">
165
+ <div className="bg-field-subtle text-muted-foreground flex h-48 items-center justify-center rounded-lg border border-dashed text-sm">
166
166
  {browse.folderId ? "This folder is empty." : "No images uploaded yet."}
167
167
  </div>
168
168
  )
@@ -94,7 +94,7 @@ export default function ImagePicker({ name, value: initialValue, onChange: onCha
94
94
  <img src={imgSrc} alt="" className="size-full object-cover" />
95
95
  </a>
96
96
  ) : (
97
- <div className="bg-muted/30 flex size-40 items-center justify-center rounded-lg border">
97
+ <div className="bg-field flex size-40 items-center justify-center rounded-lg border">
98
98
  <span className="text-muted-foreground truncate px-4 text-sm">{value}</span>
99
99
  </div>
100
100
  )}
@@ -57,7 +57,7 @@ function SortableRow({
57
57
  ref={setNodeRef}
58
58
  style={{ transform: CSS.Transform.toString(transform), transition }}
59
59
  className={cn(
60
- "bg-muted-strong/50 has-[[data-drag-handle]:hover]:bg-muted-strong/70 flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors",
60
+ "bg-field flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors",
61
61
  isDragging && "z-10 opacity-90 shadow-lg",
62
62
  )}
63
63
  >
@@ -320,7 +320,7 @@ export function LinkDialog({
320
320
  role="combobox"
321
321
  aria-expanded={comboOpen}
322
322
  size="lg"
323
- className="border-input bg-muted/30 hover:bg-muted dark:bg-input/30 dark:hover:bg-input/50 w-full justify-between text-sm font-normal"
323
+ className="border-input bg-field hover:bg-muted dark:hover:bg-input/40 w-full justify-between text-sm font-normal"
324
324
  >
325
325
  <span className={cn("truncate", !selectedLabel && "text-muted-foreground")}>
326
326
  {selectedLabel || "Search documents..."}
@@ -514,7 +514,7 @@ export default function RichTextEditor({ name, initialValue, rows = 10, onChange
514
514
  <input ref={hiddenRef} type="hidden" name={name} value={cmsJson} />
515
515
 
516
516
  {/* Toolbar */}
517
- <div className="bg-muted/40 dark:bg-input/30 flex flex-wrap items-center gap-0.5 border-b px-2 py-1.5">
517
+ <div className="bg-field flex flex-wrap items-center gap-0.5 border-b px-2 py-1.5">
518
518
  <ToolbarButton
519
519
  onClick={() => editor?.chain().focus().toggleBold().run()}
520
520
  active={editor?.isActive("bold")}
@@ -54,7 +54,7 @@ export default function SharedSectionBlockField({ name, value, types, blockRelat
54
54
 
55
55
  if (typeNames.length === 0) {
56
56
  return (
57
- <div className="bg-muted/20 text-muted-foreground rounded-lg border border-dashed px-4 py-3 text-sm">
57
+ <div className="bg-field-subtle text-muted-foreground rounded-lg border border-dashed px-4 py-3 text-sm">
58
58
  Add at least one block type to a collection before creating shared sections.
59
59
  </div>
60
60
  );
@@ -761,7 +761,7 @@ export default function TreeItemsEditor({ name, value, variant, label, linkOptio
761
761
  className={
762
762
  items.length > 0
763
763
  ? "bg-muted-strong/50 rounded-lg border"
764
- : "bg-muted/20 flex h-20 items-center justify-center rounded-lg border border-dashed"
764
+ : "bg-field-subtle flex h-20 items-center justify-center rounded-lg border border-dashed"
765
765
  }
766
766
  >
767
767
  {items.length > 0 ? (
@@ -37,7 +37,7 @@ export default function YoutubeField({ value = "", placeholder, onChange }: Prop
37
37
  ) : (
38
38
  <div
39
39
  className={cn(
40
- "bg-muted/30 text-muted-foreground flex aspect-video w-64 max-w-full items-center justify-center rounded-lg border px-4 text-center text-sm",
40
+ "bg-field text-muted-foreground flex aspect-video w-64 max-w-full items-center justify-center rounded-lg border px-4 text-center text-sm",
41
41
  )}
42
42
  >
43
43
  Not a recognized YouTube URL
@@ -11,8 +11,8 @@ const buttonVariants = cva(
11
11
  default:
12
12
  "bg-indigo-100 hover:bg-indigo-200/70 text-indigo-900 border-indigo-300 dark:bg-indigo-500/30 dark:hover:bg-indigo-500/40 dark:border-indigo-600 dark:text-indigo-100",
13
13
  outline:
14
- "border-input hover:border-foreground/20 bg-muted-strong/40 hover:bg-muted-strong/60 hover:text-foreground aria-expanded:bg-muted-strong/60 aria-expanded:text-foreground dark:border-input dark:hover:border-foreground/20 dark:bg-input/30 dark:hover:bg-input/50",
15
- input: "border-input hover:border-foreground/25 bg-muted/30 dark:bg-input/30 dark:hover:border-foreground/25",
14
+ "border-input hover:border-foreground/20 bg-muted-strong/40 hover:bg-muted-strong/60 hover:text-foreground aria-expanded:bg-muted-strong/60 aria-expanded:text-foreground dark:border-input dark:hover:border-foreground/20 dark:bg-input/20 dark:hover:bg-input/40",
15
+ input: "border-input hover:border-foreground/25 bg-field dark:hover:border-foreground/25",
16
16
  secondary:
17
17
  "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
18
18
  publish:
@@ -10,7 +10,7 @@ function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
10
10
  <CheckboxPrimitive.Root
11
11
  data-slot="checkbox"
12
12
  className={cn(
13
- "peer border-foreground/35 hover:border-primary/60 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:border-foreground/40 dark:hover:border-primary/60 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary disabled:hover:border-foreground/35 relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",
13
+ "peer border-foreground/35 hover:border-primary/60 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-field dark:border-foreground/40 dark:hover:border-primary/60 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary disabled:hover:border-foreground/35 relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",
14
14
  className,
15
15
  )}
16
16
  {...props}
@@ -9,7 +9,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
9
9
  type={type}
10
10
  data-slot="input"
11
11
  className={cn(
12
- "border-input hover:border-foreground/25 file:text-foreground placeholder:text-muted-foreground disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 bg-muted/30 read-only:hover:border-input read-only:text-muted-foreground h-9 w-full min-w-0 rounded-lg border px-3 py-1.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:font-medium read-only:cursor-not-allowed disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",
12
+ "border-input hover:border-foreground/25 file:text-foreground placeholder:text-muted-foreground disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:disabled:bg-input/60 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 bg-field read-only:hover:border-input read-only:text-muted-foreground h-9 w-full min-w-0 rounded-lg border px-3 py-1.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:font-medium read-only:cursor-not-allowed disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",
13
13
  className,
14
14
  )}
15
15
  {...props}
@@ -29,7 +29,7 @@ function SelectTrigger({
29
29
  data-slot="select-trigger"
30
30
  data-size={size}
31
31
  className={cn(
32
- "border-input hover:border-foreground/25 dark:hover:border-foreground/25 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 bg-muted/30 flex w-fit items-center justify-between gap-1.5 rounded-lg border py-1.5 pr-3 pl-3 text-sm whitespace-nowrap transition-colors outline-none select-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
32
+ "border-input hover:border-foreground/25 dark:hover:border-foreground/25 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 bg-field flex w-fit items-center justify-between gap-1.5 rounded-lg border py-1.5 pr-3 pl-3 text-sm whitespace-nowrap transition-colors outline-none select-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
33
33
  className,
34
34
  )}
35
35
  {...props}
@@ -7,7 +7,7 @@ function Table({ className, ...props }: React.ComponentProps<"table">) {
7
7
  <div data-slot="table-container" className="relative w-full overflow-x-auto">
8
8
  <table
9
9
  data-slot="table"
10
- className={cn("bg-muted/30 w-full caption-bottom rounded-lg text-sm", className)}
10
+ className={cn("bg-field w-full caption-bottom rounded-lg text-sm", className)}
11
11
  {...props}
12
12
  />
13
13
  </div>
@@ -7,7 +7,7 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
7
7
  <textarea
8
8
  data-slot="textarea"
9
9
  className={cn(
10
- "border-input hover:border-foreground/25 placeholder:text-muted-foreground disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 bg-muted/30 read-only:hover:border-input read-only:text-muted-foreground flex field-sizing-content min-h-16 w-full rounded-lg border px-3 py-2.5 text-sm transition-colors outline-none read-only:cursor-not-allowed disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",
10
+ "border-input hover:border-foreground/25 placeholder:text-muted-foreground disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:disabled:bg-input/60 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 bg-field read-only:hover:border-input read-only:text-muted-foreground flex field-sizing-content min-h-16 w-full rounded-lg border px-3 py-2.5 text-sm transition-colors outline-none read-only:cursor-not-allowed disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",
11
11
  className,
12
12
  )}
13
13
  {...props}
package/core/define.ts CHANGED
@@ -3,11 +3,6 @@ export type CollectionLabels = {
3
3
  plural: string;
4
4
  };
5
5
 
6
- export type DatabaseConfig = {
7
- dialect: "sqlite" | "postgres";
8
- url?: string;
9
- };
10
-
11
6
  export type LocaleConfig = {
12
7
  default: string;
13
8
  supported: string[];
@@ -42,7 +37,6 @@ type BaseFieldConfig<TType extends string, TValue = unknown> = {
42
37
  description?: string;
43
38
  required?: boolean;
44
39
  defaultValue?: TValue;
45
- indexed?: boolean;
46
40
  unique?: boolean;
47
41
  translatable?: boolean;
48
42
  condition?: FieldCondition;
@@ -446,7 +440,6 @@ export const isApprover = (config: CMSConfig, role: string | null | undefined):
446
440
  };
447
441
 
448
442
  export type CMSConfig = {
449
- database?: DatabaseConfig;
450
443
  locales?: LocaleConfig;
451
444
  admin?: AdminConfig;
452
445
  images?: ImagesConfig;
package/core/index.ts CHANGED
@@ -73,7 +73,6 @@ export type {
73
73
  ContentBlockNode,
74
74
  ContentDocument,
75
75
  CollectionLabels,
76
- DatabaseConfig,
77
76
  LocaleConfig,
78
77
  AdminConfig,
79
78
  IntegrationsConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kidecms/core",
3
- "version": "0.16.1",
3
+ "version": "0.16.3",
4
4
  "description": "Kide CMS runtime — core library, admin UI, routes, and middleware for Astro. Shipped as TypeScript source.",
5
5
  "keywords": [
6
6
  "cms",