@drawnagency/primitives 0.1.107 → 0.1.109

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 (35) hide show
  1. package/dist/{chunk-PZJL2S3Z.js → chunk-3ZRQ4G5F.js} +1 -1
  2. package/dist/{chunk-LUAI5DWR.js → chunk-5PVRACZY.js} +2 -2
  3. package/dist/{chunk-IPKZ5FU6.js → chunk-67ZOQCUD.js} +7 -7
  4. package/dist/chunk-F2LYQPXV.js +77 -0
  5. package/dist/{chunk-JIQBLG6Y.js → chunk-LQHYVPBS.js} +6 -6
  6. package/dist/{chunk-ZHHJVKU7.js → chunk-WBDPDGFA.js} +59 -175
  7. package/dist/{chunk-5IZ2KTMU.js → chunk-WXBHP4JY.js} +1 -1
  8. package/dist/chunk-XIDE4TDF.js +194 -0
  9. package/dist/{chunk-D6TLUVOP.js → chunk-ZKVKNUJC.js} +47 -1
  10. package/dist/components/editor/index.js +4 -4
  11. package/dist/components/primitives/index.d.ts +2 -0
  12. package/dist/components/primitives/index.d.ts.map +1 -1
  13. package/dist/components/primitives/index.js +12 -5
  14. package/dist/components/sections/brand-guide.js +5 -5
  15. package/dist/components/sections/register-schemas.js +9 -9
  16. package/dist/components/sections/register.js +9 -9
  17. package/dist/components/shell/EditorShell.d.ts.map +1 -1
  18. package/dist/hooks/useEditorPublish.d.ts +2 -0
  19. package/dist/hooks/useEditorPublish.d.ts.map +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/lib/dexie.d.ts +25 -8
  22. package/dist/lib/dexie.d.ts.map +1 -1
  23. package/dist/lib/dexie.js +19 -17
  24. package/dist/schemas/index.js +1 -1
  25. package/dist/schemas/link.d.ts.map +1 -1
  26. package/dist/schemas/link.js +1 -1
  27. package/package.json +1 -1
  28. package/src/components/primitives/index.ts +5 -0
  29. package/src/components/shared/LinkField.tsx +1 -1
  30. package/src/components/shell/EditorShell.tsx +64 -29
  31. package/src/hooks/useEditorPublish.ts +29 -4
  32. package/src/lib/dexie.ts +62 -28
  33. package/src/schemas/link.ts +4 -1
  34. package/dist/chunk-5THS4K5D.js +0 -123
  35. package/dist/chunk-ZSPCE6MZ.js +0 -70
@@ -23,7 +23,7 @@ var LinkValueSchema = z.discriminatedUnion("kind", [
23
23
  target: LinkTargetSchema.describe("Where the link opens: '_self' (same tab) or '_blank' (new tab).")
24
24
  })
25
25
  ]);
26
- var DEFAULT_LINK = { kind: "external", href: "", target: "_self" };
26
+ var DEFAULT_LINK = { kind: "internal", pageId: "", anchorSectionId: null, target: "_self" };
27
27
 
28
28
  export {
29
29
  LinkTargetSchema,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  EditablePlainText
3
- } from "./chunk-5IZ2KTMU.js";
3
+ } from "./chunk-WXBHP4JY.js";
4
4
  import {
5
5
  Button,
6
6
  usePages
7
- } from "./chunk-ZSPCE6MZ.js";
7
+ } from "./chunk-XIDE4TDF.js";
8
8
  import {
9
9
  sanitizeHtml,
10
10
  toSectionId
@@ -1,26 +1,26 @@
1
1
  import {
2
- Checkbox,
3
- FormLabel,
4
- Input
5
- } from "./chunk-5THS4K5D.js";
2
+ Checkbox
3
+ } from "./chunk-F2LYQPXV.js";
6
4
  import {
7
5
  EditableGrid,
8
6
  EditablePlainText,
9
7
  MediaBlock,
10
8
  containerGridClass,
11
9
  useEditableCollection
12
- } from "./chunk-5IZ2KTMU.js";
10
+ } from "./chunk-WXBHP4JY.js";
13
11
  import {
14
12
  AddIcon,
15
13
  DeleteIcon,
16
14
  DragHandle,
15
+ FormLabel,
17
16
  IconButton,
17
+ Input,
18
18
  useMediaLibrary
19
- } from "./chunk-D6TLUVOP.js";
19
+ } from "./chunk-ZKVKNUJC.js";
20
20
  import {
21
21
  DEFAULT_LINK,
22
22
  LinkValueSchema
23
- } from "./chunk-PZJL2S3Z.js";
23
+ } from "./chunk-3ZRQ4G5F.js";
24
24
  import {
25
25
  DOCUMENT_MIME_TO_EXT
26
26
  } from "./chunk-BS5AQHZG.js";
@@ -0,0 +1,77 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-7EOSDFS3.js";
4
+
5
+ // src/components/shared/Checkbox.tsx
6
+ import { useId } from "react";
7
+ import { Check } from "lucide-react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ function Checkbox({
10
+ checked,
11
+ onChange,
12
+ label,
13
+ description,
14
+ disabled,
15
+ className,
16
+ startAdornment,
17
+ align = "start"
18
+ }) {
19
+ const id = useId();
20
+ return /* @__PURE__ */ jsxs(
21
+ "label",
22
+ {
23
+ htmlFor: id,
24
+ className: cn(
25
+ "flex cursor-pointer gap-3 select-none hover:opacity-80",
26
+ align === "start" ? "items-start" : "items-center",
27
+ disabled && "cursor-not-allowed opacity-50",
28
+ className
29
+ ),
30
+ children: [
31
+ /* @__PURE__ */ jsxs(
32
+ "span",
33
+ {
34
+ className: cn(
35
+ "relative flex h-5 w-5 shrink-0 items-center justify-center",
36
+ align === "start" && "mt-0.5"
37
+ ),
38
+ children: [
39
+ /* @__PURE__ */ jsx(
40
+ "input",
41
+ {
42
+ id,
43
+ type: "checkbox",
44
+ checked,
45
+ disabled,
46
+ onChange: (e) => onChange(e.target.checked),
47
+ className: "sr-only"
48
+ }
49
+ ),
50
+ /* @__PURE__ */ jsx(
51
+ "span",
52
+ {
53
+ "aria-hidden": "true",
54
+ className: cn(
55
+ "flex h-5 w-5 items-center justify-center rounded border transition-colors",
56
+ checked ? "border-primary bg-primary text-primary-contrast" : "border-base-300 bg-base hover:border-primary",
57
+ disabled && "pointer-events-none"
58
+ ),
59
+ children: checked && /* @__PURE__ */ jsx(Check, { size: 14, strokeWidth: 3 })
60
+ }
61
+ )
62
+ ]
63
+ }
64
+ ),
65
+ startAdornment,
66
+ /* @__PURE__ */ jsxs("div", { className: "text-sm", children: [
67
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-base-contrast", children: label }),
68
+ description && /* @__PURE__ */ jsx("span", { className: "block text-base-contrast-light", children: description })
69
+ ] })
70
+ ]
71
+ }
72
+ );
73
+ }
74
+
75
+ export {
76
+ Checkbox
77
+ };
@@ -9,7 +9,7 @@ import {
9
9
  stripHtmlToPlainText,
10
10
  trimTrailingSpacers,
11
11
  truncate
12
- } from "./chunk-IPKZ5FU6.js";
12
+ } from "./chunk-67ZOQCUD.js";
13
13
  import {
14
14
  DeleteButton,
15
15
  DragHandle,
@@ -23,11 +23,11 @@ import {
23
23
  buildBlockDropData,
24
24
  canDropBlock,
25
25
  isBlockDragData
26
- } from "./chunk-ZHHJVKU7.js";
26
+ } from "./chunk-WBDPDGFA.js";
27
27
  import {
28
28
  EditableRichText,
29
29
  defineHeadingSection
30
- } from "./chunk-LUAI5DWR.js";
30
+ } from "./chunk-5PVRACZY.js";
31
31
  import {
32
32
  EditablePlainText,
33
33
  ImageDropZone,
@@ -37,18 +37,18 @@ import {
37
37
  containerGridClass,
38
38
  masonryColumnsClass,
39
39
  spacerHiddenClass
40
- } from "./chunk-5IZ2KTMU.js";
40
+ } from "./chunk-WXBHP4JY.js";
41
41
  import {
42
42
  useMediaLibrary,
43
43
  useResolvedMedia
44
- } from "./chunk-D6TLUVOP.js";
44
+ } from "./chunk-ZKVKNUJC.js";
45
45
  import {
46
46
  embedUrl
47
47
  } from "./chunk-Y4JQGO6G.js";
48
48
  import {
49
49
  DEFAULT_LINK,
50
50
  LinkValueSchema
51
- } from "./chunk-PZJL2S3Z.js";
51
+ } from "./chunk-3ZRQ4G5F.js";
52
52
  import {
53
53
  sanitizeHtml
54
54
  } from "./chunk-72CG6AA2.js";
@@ -1,20 +1,21 @@
1
1
  import {
2
- Checkbox,
3
- FormLabel,
4
- Input
5
- } from "./chunk-5THS4K5D.js";
2
+ Checkbox
3
+ } from "./chunk-F2LYQPXV.js";
6
4
  import {
7
5
  Button,
8
- usePages
9
- } from "./chunk-ZSPCE6MZ.js";
6
+ LinkField,
7
+ Select
8
+ } from "./chunk-XIDE4TDF.js";
10
9
  import {
11
10
  DeleteIcon,
12
11
  DragHandle,
12
+ FormLabel,
13
13
  IconButton,
14
+ Input,
14
15
  SettingsIcon,
15
16
  useMediaLibrary,
16
17
  useResolvedMedia
17
- } from "./chunk-D6TLUVOP.js";
18
+ } from "./chunk-ZKVKNUJC.js";
18
19
  import {
19
20
  formatFileSize
20
21
  } from "./chunk-XBYJQ5RS.js";
@@ -100,128 +101,11 @@ function SettingsButton({ onClick }) {
100
101
  }
101
102
 
102
103
  // src/components/editor/SettingsForm.tsx
103
- import { useId as useId2, useState as useState3 } from "react";
104
-
105
- // src/components/shared/Select.tsx
106
- import { useId } from "react";
107
- import { ChevronDown } from "lucide-react";
108
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
109
- function Select({
110
- label,
111
- value,
112
- onChange,
113
- options,
114
- disabled,
115
- className,
116
- selectClassName
117
- }) {
118
- const id = useId();
119
- return /* @__PURE__ */ jsxs3("div", { className, children: [
120
- label && /* @__PURE__ */ jsx5(FormLabel, { htmlFor: id, children: label }),
121
- /* @__PURE__ */ jsxs3("div", { className: "relative", children: [
122
- /* @__PURE__ */ jsx5(
123
- "select",
124
- {
125
- id,
126
- value,
127
- onChange: (e) => onChange(e.target.value),
128
- disabled,
129
- className: cn(
130
- "w-full appearance-none rounded border border-base-200 bg-base py-2 pr-8 pl-3 text-sm text-base-contrast",
131
- "focus:border-base-contrast focus:outline-none focus:ring-1 focus:ring-base-contrast",
132
- disabled && "cursor-not-allowed opacity-50",
133
- selectClassName
134
- ),
135
- children: options.map((opt) => /* @__PURE__ */ jsx5("option", { value: opt.value, children: opt.label }, opt.value))
136
- }
137
- ),
138
- /* @__PURE__ */ jsx5(
139
- ChevronDown,
140
- {
141
- size: 14,
142
- className: "pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-base-contrast-light"
143
- }
144
- )
145
- ] })
146
- ] });
147
- }
148
-
149
- // src/components/shared/LinkField.tsx
150
- import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
151
- var TARGET_OPTIONS = [
152
- { label: "Same tab (_self)", value: "_self" },
153
- { label: "New tab (_blank)", value: "_blank" }
154
- ];
155
- function LinkField({ label, value, onChange }) {
156
- const { pages, getPageHeadings } = usePages();
157
- const isInternal = value.kind === "internal";
158
- function setMode(kind) {
159
- if (kind === value.kind) return;
160
- onChange(kind === "external" ? { kind: "external", href: "", target: value.target } : { kind: "internal", pageId: "", anchorSectionId: null, target: "_self" });
161
- }
162
- const pageId = isInternal ? value.pageId : "";
163
- const headings = pageId ? getPageHeadings(pageId) : [];
164
- return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-3", children: [
165
- /* @__PURE__ */ jsx6(FormLabel, { children: label }),
166
- /* @__PURE__ */ jsx6("div", { className: "flex gap-2", role: "tablist", children: ["external", "internal"].map((kind) => /* @__PURE__ */ jsx6(
167
- "button",
168
- {
169
- type: "button",
170
- role: "tab",
171
- "aria-selected": value.kind === kind,
172
- onClick: () => setMode(kind),
173
- className: cn(
174
- "cursor-pointer rounded border px-3 py-1 text-sm capitalize",
175
- value.kind === kind ? "border-primary bg-primary text-primary-contrast" : "border-base-200 text-base-contrast"
176
- ),
177
- children: kind === "external" ? "External URL" : "Internal page"
178
- },
179
- kind
180
- )) }),
181
- value.kind === "external" ? /* @__PURE__ */ jsx6(
182
- Input,
183
- {
184
- label: "URL",
185
- value: value.href,
186
- placeholder: "https://...",
187
- onChange: (href) => onChange({ kind: "external", href, target: value.target })
188
- }
189
- ) : /* @__PURE__ */ jsxs4(Fragment2, { children: [
190
- /* @__PURE__ */ jsx6(
191
- Select,
192
- {
193
- label: "Page",
194
- value: value.pageId,
195
- options: [{ label: "Select a page\u2026", value: "" }, ...pages.map((p) => ({ label: p.title, value: p.id }))],
196
- onChange: (pid) => onChange({ kind: "internal", pageId: pid, anchorSectionId: null, target: value.target })
197
- }
198
- ),
199
- /* @__PURE__ */ jsx6(
200
- Select,
201
- {
202
- label: "Section",
203
- value: value.anchorSectionId ?? "",
204
- disabled: !pageId,
205
- options: [{ label: "None (top of page)", value: "" }, ...headings.map((h) => ({ label: h.label, value: h.id }))],
206
- onChange: (anchor) => onChange({ kind: "internal", pageId, anchorSectionId: anchor || null, target: value.target })
207
- }
208
- )
209
- ] }),
210
- value.kind === "external" && /* @__PURE__ */ jsx6(
211
- Select,
212
- {
213
- label: "Opens in",
214
- value: value.target,
215
- options: TARGET_OPTIONS,
216
- onChange: (t) => onChange({ ...value, target: t })
217
- }
218
- )
219
- ] });
220
- }
104
+ import { useId, useState as useState3 } from "react";
221
105
 
222
106
  // src/components/shared/VideoSourceField.tsx
223
107
  import { useState } from "react";
224
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
108
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
225
109
  var ASPECTS = [
226
110
  { label: "9:16", width: 9, height: 16 },
227
111
  { label: "4:5", width: 4, height: 5 },
@@ -270,9 +154,9 @@ function VideoSourceField({ value, onChange }) {
270
154
  setLoading(false);
271
155
  }
272
156
  }
273
- return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-3", children: [
274
- /* @__PURE__ */ jsx7(FormLabel, { children: "Source" }),
275
- /* @__PURE__ */ jsx7("div", { className: "flex gap-2", role: "tablist", children: ["library", "embed"].map((m) => /* @__PURE__ */ jsx7(
157
+ return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-3", children: [
158
+ /* @__PURE__ */ jsx5(FormLabel, { children: "Source" }),
159
+ /* @__PURE__ */ jsx5("div", { className: "flex gap-2", role: "tablist", children: ["library", "embed"].map((m) => /* @__PURE__ */ jsx5(
276
160
  "button",
277
161
  {
278
162
  type: "button",
@@ -287,9 +171,9 @@ function VideoSourceField({ value, onChange }) {
287
171
  },
288
172
  m
289
173
  )) }),
290
- mode === "library" ? /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-3", children: [
291
- libraryImageId ? resolved.poster ? /* @__PURE__ */ jsx7("img", { src: resolved.poster, alt: "", className: "h-12 w-20 rounded object-cover" }) : /* @__PURE__ */ jsx7("span", { className: "text-sm text-base-contrast-light", children: "Video selected" }) : /* @__PURE__ */ jsx7("span", { className: "text-sm text-base-contrast-light", children: "No video selected" }),
292
- /* @__PURE__ */ jsx7(
174
+ mode === "library" ? /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-3", children: [
175
+ libraryImageId ? resolved.poster ? /* @__PURE__ */ jsx5("img", { src: resolved.poster, alt: "", className: "h-12 w-20 rounded object-cover" }) : /* @__PURE__ */ jsx5("span", { className: "text-sm text-base-contrast-light", children: "Video selected" }) : /* @__PURE__ */ jsx5("span", { className: "text-sm text-base-contrast-light", children: "No video selected" }),
176
+ /* @__PURE__ */ jsx5(
293
177
  Button,
294
178
  {
295
179
  type: "button",
@@ -299,9 +183,9 @@ function VideoSourceField({ value, onChange }) {
299
183
  children: "Choose video"
300
184
  }
301
185
  )
302
- ] }) : /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-2", children: [
303
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
304
- /* @__PURE__ */ jsx7(
186
+ ] }) : /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
187
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
188
+ /* @__PURE__ */ jsx5(
305
189
  "input",
306
190
  {
307
191
  type: "text",
@@ -321,7 +205,7 @@ function VideoSourceField({ value, onChange }) {
321
205
  className: "flex-1 rounded border border-base-200 bg-base px-2 py-1 text-sm text-base-contrast placeholder:text-base-contrast-light focus:outline-none focus:ring-1 focus:ring-primary"
322
206
  }
323
207
  ),
324
- /* @__PURE__ */ jsx7(
208
+ /* @__PURE__ */ jsx5(
325
209
  Button,
326
210
  {
327
211
  type: "button",
@@ -333,13 +217,13 @@ function VideoSourceField({ value, onChange }) {
333
217
  }
334
218
  )
335
219
  ] }),
336
- error ? /* @__PURE__ */ jsx7("p", { className: "text-xs text-red-600", children: error }) : null,
337
- !error && fallback ? /* @__PURE__ */ jsx7("p", { className: "text-xs text-base-contrast-light/70", children: "Added \u2014 couldn't fetch exact dimensions, using 16:9." }) : null,
338
- value?.type === "external" && value.provider === "instagram" ? /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
339
- /* @__PURE__ */ jsx7("span", { className: "text-xs text-base-contrast-light", children: "Aspect" }),
220
+ error ? /* @__PURE__ */ jsx5("p", { className: "text-xs text-red-600", children: error }) : null,
221
+ !error && fallback ? /* @__PURE__ */ jsx5("p", { className: "text-xs text-base-contrast-light/70", children: "Added \u2014 couldn't fetch exact dimensions, using 16:9." }) : null,
222
+ value?.type === "external" && value.provider === "instagram" ? /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
223
+ /* @__PURE__ */ jsx5("span", { className: "text-xs text-base-contrast-light", children: "Aspect" }),
340
224
  ASPECTS.map(({ label, width, height }) => {
341
225
  const active = value.width === width && value.height === height;
342
- return /* @__PURE__ */ jsx7(
226
+ return /* @__PURE__ */ jsx5(
343
227
  "button",
344
228
  {
345
229
  type: "button",
@@ -373,22 +257,22 @@ function useResolvedDocument(documentId) {
373
257
  }
374
258
 
375
259
  // src/components/shared/DocumentSourceField.tsx
376
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
260
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
377
261
  function DocumentSourceField({ value, onChange }) {
378
262
  const mediaLibrary = useMediaLibrary();
379
263
  const documentId = value?.documentId || void 0;
380
264
  const { entry, missing } = useResolvedDocument(documentId);
381
- return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-3", children: [
382
- /* @__PURE__ */ jsx8(FormLabel, { children: "Document" }),
383
- /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-3", children: [
384
- entry ? /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1 truncate text-sm text-base-contrast", children: [
265
+ return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-3", children: [
266
+ /* @__PURE__ */ jsx6(FormLabel, { children: "Document" }),
267
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3", children: [
268
+ entry ? /* @__PURE__ */ jsxs4("span", { className: "min-w-0 flex-1 truncate text-sm text-base-contrast", children: [
385
269
  entry.filename,
386
- /* @__PURE__ */ jsxs6("span", { className: "text-base-contrast-light", children: [
270
+ /* @__PURE__ */ jsxs4("span", { className: "text-base-contrast-light", children: [
387
271
  " \xB7 ",
388
272
  formatFileSize(entry.size)
389
273
  ] })
390
- ] }) : /* @__PURE__ */ jsx8("span", { className: "flex-1 text-sm text-base-contrast-light", children: missing ? "File missing" : "No document selected" }),
391
- /* @__PURE__ */ jsx8(
274
+ ] }) : /* @__PURE__ */ jsx6("span", { className: "flex-1 text-sm text-base-contrast-light", children: missing ? "File missing" : "No document selected" }),
275
+ /* @__PURE__ */ jsx6(
392
276
  Button,
393
277
  {
394
278
  type: "button",
@@ -404,7 +288,7 @@ function DocumentSourceField({ value, onChange }) {
404
288
 
405
289
  // src/components/shared/Tabs.tsx
406
290
  import { useState as useState2 } from "react";
407
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
291
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
408
292
  function Tabs({ tabs, defaultTabId, activeTabId, onTabChange, fullBleedTabBar }) {
409
293
  const [uncontrolledId, setUncontrolledId] = useState2(defaultTabId ?? tabs[0]?.id);
410
294
  const isControlled = activeTabId !== void 0;
@@ -414,8 +298,8 @@ function Tabs({ tabs, defaultTabId, activeTabId, onTabChange, fullBleedTabBar })
414
298
  if (!isControlled) setUncontrolledId(id);
415
299
  onTabChange?.(id);
416
300
  }
417
- return /* @__PURE__ */ jsxs7("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
418
- /* @__PURE__ */ jsx9("div", { className: cn("border-b border-base-200", fullBleedTabBar && "-mx-6 px-6"), children: /* @__PURE__ */ jsx9("div", { className: "flex", role: "tablist", children: tabs.map((tab) => /* @__PURE__ */ jsx9(
301
+ return /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
302
+ /* @__PURE__ */ jsx7("div", { className: cn("border-b border-base-200", fullBleedTabBar && "-mx-6 px-6"), children: /* @__PURE__ */ jsx7("div", { className: "flex", role: "tablist", children: tabs.map((tab) => /* @__PURE__ */ jsx7(
419
303
  "button",
420
304
  {
421
305
  type: "button",
@@ -430,12 +314,12 @@ function Tabs({ tabs, defaultTabId, activeTabId, onTabChange, fullBleedTabBar })
430
314
  },
431
315
  tab.id
432
316
  )) }) }),
433
- /* @__PURE__ */ jsx9("div", { role: "tabpanel", className: cn("flex min-h-0 flex-1 flex-col px-px", fullBleedTabBar && "pt-4"), children: activeTab?.content })
317
+ /* @__PURE__ */ jsx7("div", { role: "tabpanel", className: cn("flex min-h-0 flex-1 flex-col px-px", fullBleedTabBar && "pt-4"), children: activeTab?.content })
434
318
  ] });
435
319
  }
436
320
 
437
321
  // src/components/editor/SettingsForm.tsx
438
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
322
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
439
323
  function resolveValues(schema, values) {
440
324
  const resolved = {};
441
325
  for (const [key, field] of Object.entries(schema)) {
@@ -474,10 +358,10 @@ function RangeField({
474
358
  value,
475
359
  onChange
476
360
  }) {
477
- const id = useId2();
478
- return /* @__PURE__ */ jsxs8("div", { children: [
479
- /* @__PURE__ */ jsx10(FormLabel, { htmlFor: id, children: field.label }),
480
- /* @__PURE__ */ jsx10(
361
+ const id = useId();
362
+ return /* @__PURE__ */ jsxs6("div", { children: [
363
+ /* @__PURE__ */ jsx8(FormLabel, { htmlFor: id, children: field.label }),
364
+ /* @__PURE__ */ jsx8(
481
365
  "input",
482
366
  {
483
367
  id,
@@ -497,7 +381,7 @@ function RangeField({
497
381
  function renderField(key, field, value, handleFieldChange) {
498
382
  switch (field.type) {
499
383
  case "text":
500
- return /* @__PURE__ */ jsx10(
384
+ return /* @__PURE__ */ jsx8(
501
385
  Input,
502
386
  {
503
387
  label: field.label,
@@ -508,7 +392,7 @@ function renderField(key, field, value, handleFieldChange) {
508
392
  key
509
393
  );
510
394
  case "number":
511
- return /* @__PURE__ */ jsx10(
395
+ return /* @__PURE__ */ jsx8(
512
396
  Input,
513
397
  {
514
398
  label: field.label,
@@ -519,7 +403,7 @@ function renderField(key, field, value, handleFieldChange) {
519
403
  key
520
404
  );
521
405
  case "checkbox":
522
- return /* @__PURE__ */ jsx10(
406
+ return /* @__PURE__ */ jsx8(
523
407
  Checkbox,
524
408
  {
525
409
  label: field.label,
@@ -529,7 +413,7 @@ function renderField(key, field, value, handleFieldChange) {
529
413
  key
530
414
  );
531
415
  case "select":
532
- return /* @__PURE__ */ jsx10(
416
+ return /* @__PURE__ */ jsx8(
533
417
  Select,
534
418
  {
535
419
  label: field.label,
@@ -540,7 +424,7 @@ function renderField(key, field, value, handleFieldChange) {
540
424
  key
541
425
  );
542
426
  case "range":
543
- return /* @__PURE__ */ jsx10(
427
+ return /* @__PURE__ */ jsx8(
544
428
  RangeField,
545
429
  {
546
430
  field,
@@ -550,7 +434,7 @@ function renderField(key, field, value, handleFieldChange) {
550
434
  key
551
435
  );
552
436
  case "link":
553
- return /* @__PURE__ */ jsx10(
437
+ return /* @__PURE__ */ jsx8(
554
438
  LinkField,
555
439
  {
556
440
  label: field.label,
@@ -560,7 +444,7 @@ function renderField(key, field, value, handleFieldChange) {
560
444
  key
561
445
  );
562
446
  case "video-source":
563
- return /* @__PURE__ */ jsx10(
447
+ return /* @__PURE__ */ jsx8(
564
448
  VideoSourceField,
565
449
  {
566
450
  value,
@@ -569,7 +453,7 @@ function renderField(key, field, value, handleFieldChange) {
569
453
  key
570
454
  );
571
455
  case "document-source":
572
- return /* @__PURE__ */ jsx10(
456
+ return /* @__PURE__ */ jsx8(
573
457
  DocumentSourceField,
574
458
  {
575
459
  value,
@@ -594,12 +478,12 @@ function SettingsForm({ schema, values, onChange, tabs }) {
594
478
  const otherKeys = Object.keys(schema).filter((key) => !listed.has(key));
595
479
  const panel = "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-px";
596
480
  const tabItems = [
597
- ...tabs.map((t) => ({ id: t.label, label: t.label, content: /* @__PURE__ */ jsx10("div", { className: panel, children: fields(t.fields) }) })),
598
- ...otherKeys.length > 0 ? [{ id: "__other__", label: "Other", content: /* @__PURE__ */ jsx10("div", { className: panel, children: fields(otherKeys) }) }] : []
481
+ ...tabs.map((t) => ({ id: t.label, label: t.label, content: /* @__PURE__ */ jsx8("div", { className: panel, children: fields(t.fields) }) })),
482
+ ...otherKeys.length > 0 ? [{ id: "__other__", label: "Other", content: /* @__PURE__ */ jsx8("div", { className: panel, children: fields(otherKeys) }) }] : []
599
483
  ];
600
- return /* @__PURE__ */ jsx10(Tabs, { tabs: tabItems, fullBleedTabBar: true });
484
+ return /* @__PURE__ */ jsx8(Tabs, { tabs: tabItems, fullBleedTabBar: true });
601
485
  }
602
- return /* @__PURE__ */ jsx10("div", { className: "flex flex-col gap-4", children: Object.entries(schema).map(([key, field]) => renderField(key, field, local[key], handleFieldChange)) });
486
+ return /* @__PURE__ */ jsx8("div", { className: "flex flex-col gap-4", children: Object.entries(schema).map(([key, field]) => renderField(key, field, local[key], handleFieldChange)) });
603
487
  }
604
488
 
605
489
  // src/components/shared/Popover.tsx
@@ -655,7 +539,7 @@ function useFocusTrap(ref, active) {
655
539
  }
656
540
 
657
541
  // src/components/shared/Popover.tsx
658
- import { jsx as jsx11 } from "react/jsx-runtime";
542
+ import { jsx as jsx9 } from "react/jsx-runtime";
659
543
  function Popover({
660
544
  isOpen,
661
545
  onClose,
@@ -738,7 +622,7 @@ function Popover({
738
622
  if (portal) {
739
623
  if (!fixedPos) return null;
740
624
  return createPortal(
741
- /* @__PURE__ */ jsx11(
625
+ /* @__PURE__ */ jsx9(
742
626
  "div",
743
627
  {
744
628
  ref: panelRef,
@@ -757,7 +641,7 @@ function Popover({
757
641
  document.body
758
642
  );
759
643
  }
760
- return /* @__PURE__ */ jsx11(
644
+ return /* @__PURE__ */ jsx9(
761
645
  "div",
762
646
  {
763
647
  ref: panelRef,
@@ -775,10 +659,10 @@ function Popover({
775
659
 
776
660
  // src/components/shared/PopoverItem.tsx
777
661
  import { forwardRef as forwardRef2 } from "react";
778
- import { jsx as jsx12 } from "react/jsx-runtime";
662
+ import { jsx as jsx10 } from "react/jsx-runtime";
779
663
  var PopoverItem = forwardRef2(
780
664
  function PopoverItem2({ className, children, ...rest }, ref) {
781
- return /* @__PURE__ */ jsx12(
665
+ return /* @__PURE__ */ jsx10(
782
666
  "button",
783
667
  {
784
668
  ref,
@@ -6,7 +6,7 @@ import {
6
6
  SettingsIcon,
7
7
  useMediaLibrary,
8
8
  useResolvedMedia
9
- } from "./chunk-D6TLUVOP.js";
9
+ } from "./chunk-ZKVKNUJC.js";
10
10
  import {
11
11
  rebindImageRef
12
12
  } from "./chunk-XBYJQ5RS.js";