@drawnagency/primitives 0.1.60 → 0.1.62

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 (82) hide show
  1. package/dist/chunk-2BHPWO7M.js +558 -0
  2. package/dist/chunk-4E66N6UV.js +10 -0
  3. package/dist/{chunk-RFZNNCAS.js → chunk-53DKVAB6.js} +1 -61
  4. package/dist/chunk-5THS4K5D.js +123 -0
  5. package/dist/chunk-677NTHAZ.js +27 -0
  6. package/dist/{chunk-TG43X7JO.js → chunk-75P6HWPN.js} +29 -5
  7. package/dist/chunk-7EOSDFS3.js +10 -0
  8. package/dist/{chunk-ODCJQOVO.js → chunk-7IMQVDDJ.js} +1 -1
  9. package/dist/chunk-FJBDGYHE.js +782 -0
  10. package/dist/chunk-I5737FJY.js +62 -0
  11. package/dist/chunk-JRT4KWHU.js +1201 -0
  12. package/dist/chunk-QWDOJUUO.js +648 -0
  13. package/dist/{chunk-BT7STGDW.js → chunk-TEYTLQVH.js} +0 -15
  14. package/dist/chunk-WDSVHKAH.js +54 -0
  15. package/dist/{chunk-Q5EEYBMJ.js → chunk-ZYXLNJ5M.js} +6 -30
  16. package/dist/components/brandguide/ColorSwatchSettings.d.ts +1 -1
  17. package/dist/components/brandguide/ColorSwatchSettings.d.ts.map +1 -1
  18. package/dist/components/brandguide/Colors.d.ts +1 -1
  19. package/dist/components/brandguide/Colors.d.ts.map +1 -1
  20. package/dist/components/editor/index.js +642 -0
  21. package/dist/components/primitives/IconPicker.d.ts +1 -7
  22. package/dist/components/primitives/IconPicker.d.ts.map +1 -1
  23. package/dist/components/primitives/index.d.ts +10 -0
  24. package/dist/components/primitives/index.d.ts.map +1 -0
  25. package/dist/components/primitives/index.js +169 -0
  26. package/dist/components/sections/Colors/index.d.ts.map +1 -1
  27. package/dist/components/sections/Colors/schema.d.ts +19 -0
  28. package/dist/components/sections/Colors/schema.d.ts.map +1 -0
  29. package/dist/components/sections/DoDontMedia/DoDontMediaBlock.d.ts +20 -0
  30. package/dist/components/sections/DoDontMedia/DoDontMediaBlock.d.ts.map +1 -0
  31. package/dist/components/sections/DoDontMedia/index.d.ts +45 -0
  32. package/dist/components/sections/DoDontMedia/index.d.ts.map +1 -0
  33. package/dist/components/sections/IconList/DoDontToggle.d.ts +14 -0
  34. package/dist/components/sections/IconList/DoDontToggle.d.ts.map +1 -0
  35. package/dist/components/sections/IconList/IconList.d.ts.map +1 -1
  36. package/dist/components/sections/IconList/index.d.ts.map +1 -1
  37. package/dist/components/sections/Media/MediaBlock.d.ts +1 -3
  38. package/dist/components/sections/Media/MediaBlock.d.ts.map +1 -1
  39. package/dist/components/sections/Media/index.d.ts +0 -1
  40. package/dist/components/sections/Media/index.d.ts.map +1 -1
  41. package/dist/components/sections/all-sections.d.ts +54 -18
  42. package/dist/components/sections/all-sections.d.ts.map +1 -1
  43. package/dist/components/sections/brand-guide.d.ts +84 -0
  44. package/dist/components/sections/brand-guide.d.ts.map +1 -0
  45. package/dist/components/sections/brand-guide.js +21 -0
  46. package/dist/components/sections/core-sections.d.ts +93 -0
  47. package/dist/components/sections/core-sections.d.ts.map +1 -0
  48. package/dist/components/sections/register-schemas.js +240 -3353
  49. package/dist/index.js +48 -46
  50. package/dist/lib/index.js +17 -11
  51. package/dist/lib/loader.d.ts.map +1 -1
  52. package/dist/lib/migrate-sections-transform.d.ts.map +1 -1
  53. package/dist/lib/migrate-sections-transform.js +1 -1
  54. package/dist/lib/registry.d.ts +6 -1
  55. package/dist/lib/registry.d.ts.map +1 -1
  56. package/dist/media/index.js +1 -1
  57. package/dist/schemas/index.js +9 -13
  58. package/dist/schemas/link.js +13 -0
  59. package/dist/schemas/shared.d.ts +0 -17
  60. package/dist/schemas/shared.d.ts.map +1 -1
  61. package/package.json +13 -1
  62. package/src/components/brandguide/ColorSwatchSettings.tsx +1 -1
  63. package/src/components/brandguide/Colors.tsx +1 -1
  64. package/src/components/primitives/IconPicker.tsx +27 -119
  65. package/src/components/primitives/index.ts +11 -0
  66. package/src/components/sections/Colors/index.tsx +2 -1
  67. package/src/components/sections/Colors/schema.ts +24 -0
  68. package/src/components/sections/DoDontMedia/DoDontMediaBlock.tsx +35 -0
  69. package/src/components/sections/DoDontMedia/index.tsx +84 -0
  70. package/src/components/sections/IconList/DoDontToggle.tsx +76 -0
  71. package/src/components/sections/IconList/IconList.tsx +24 -14
  72. package/src/components/sections/IconList/index.tsx +1 -0
  73. package/src/components/sections/Media/MediaBlock.tsx +1 -11
  74. package/src/components/sections/Media/index.tsx +0 -15
  75. package/src/components/sections/all-sections.ts +7 -35
  76. package/src/components/sections/brand-guide.ts +13 -0
  77. package/src/components/sections/core-sections.ts +26 -0
  78. package/src/lib/loader.ts +10 -4
  79. package/src/lib/migrate-sections-transform.ts +33 -5
  80. package/src/lib/registry.ts +6 -1
  81. package/src/schemas/shared.ts +0 -18
  82. /package/dist/{chunk-ZU2MKPTG.js → chunk-3DCG4DNU.js} +0 -0
@@ -0,0 +1,169 @@
1
+ import {
2
+ EditableRichText,
3
+ LinkPopover,
4
+ defineHeadingSection
5
+ } from "../../chunk-FJBDGYHE.js";
6
+ import {
7
+ EditableGrid,
8
+ EditablePlainText,
9
+ ImageDropZone,
10
+ MediaBlock,
11
+ ResolvedMedia,
12
+ useEditableCollection
13
+ } from "../../chunk-QWDOJUUO.js";
14
+ import "../../chunk-4E66N6UV.js";
15
+ import {
16
+ DeleteIcon,
17
+ DragHandle,
18
+ IconButton
19
+ } from "../../chunk-I5737FJY.js";
20
+ import "../../chunk-CBWK3KPV.js";
21
+ import "../../chunk-53DKVAB6.js";
22
+ import "../../chunk-ZGFAYZWB.js";
23
+ import {
24
+ cn
25
+ } from "../../chunk-7EOSDFS3.js";
26
+ import "../../chunk-TEYTLQVH.js";
27
+ import "../../chunk-VKAGMEKE.js";
28
+ import "../../chunk-JSBRDJBE.js";
29
+
30
+ // src/components/primitives/EditableList.tsx
31
+ import { useRef, useEffect, useState } from "react";
32
+ import { jsx, jsxs } from "react/jsx-runtime";
33
+ function EditableList({
34
+ items,
35
+ onChange,
36
+ createItem,
37
+ isEditMode,
38
+ renderItem,
39
+ className
40
+ }) {
41
+ const { wrappedItems, onReorder, onAdd, onRemove } = useEditableCollection({
42
+ items,
43
+ onChange,
44
+ createItem
45
+ });
46
+ const [dragState, setDragState] = useState({ sourceId: null, targetId: null });
47
+ if (!isEditMode) {
48
+ return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-2", className), children: wrappedItems.map((wrapped, index) => /* @__PURE__ */ jsx("div", { children: renderItem(wrapped.data, { isEditMode: false, index }) }, wrapped.id)) });
49
+ }
50
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
51
+ wrappedItems.map((wrapped, index) => /* @__PURE__ */ jsx(
52
+ ListRow,
53
+ {
54
+ id: wrapped.id,
55
+ index,
56
+ onReorder,
57
+ onRemove,
58
+ dragState,
59
+ setDragState,
60
+ children: renderItem(wrapped.data, { isEditMode: true, index })
61
+ },
62
+ wrapped.id
63
+ )),
64
+ /* @__PURE__ */ jsx(
65
+ "button",
66
+ {
67
+ onClick: onAdd,
68
+ className: "cursor-pointer rounded border-2 border-dashed border-base-200 px-3 py-2 text-sm text-base-contrast-light hover:border-primary hover:text-primary",
69
+ children: "Add row"
70
+ }
71
+ )
72
+ ] });
73
+ }
74
+ function ListRow({
75
+ id,
76
+ index,
77
+ onReorder,
78
+ onRemove,
79
+ dragState,
80
+ setDragState,
81
+ children
82
+ }) {
83
+ const rowRef = useRef(null);
84
+ const handleRef = useRef(null);
85
+ useEffect(() => {
86
+ const row = rowRef.current;
87
+ const handle = handleRef.current;
88
+ if (!row || !handle) return;
89
+ let cleanup;
90
+ let cancelled = false;
91
+ import("../../adapter-HH47ZPGM.js").then(({ draggable, dropTargetForElements }) => {
92
+ if (cancelled) return;
93
+ const cleanupDraggable = draggable({
94
+ element: handle,
95
+ getInitialData: () => ({ dragType: "list-row", id, index }),
96
+ onDragStart: () => setDragState({ sourceId: id, targetId: null }),
97
+ onDrop: () => setDragState({ sourceId: null, targetId: null })
98
+ });
99
+ const cleanupDropTarget = dropTargetForElements({
100
+ element: row,
101
+ canDrop: ({ source }) => source.data.dragType === "list-row",
102
+ getData: () => ({ id, index }),
103
+ onDragEnter: () => setDragState((prev) => ({ ...prev, targetId: id })),
104
+ onDragLeave: () => setDragState((prev) => prev.targetId === id ? { ...prev, targetId: null } : prev),
105
+ onDrop: ({ source }) => {
106
+ const fromIndex = source.data.index;
107
+ if (fromIndex !== index) {
108
+ onReorder(fromIndex, index);
109
+ }
110
+ }
111
+ });
112
+ cleanup = () => {
113
+ cleanupDraggable();
114
+ cleanupDropTarget();
115
+ };
116
+ });
117
+ return () => {
118
+ cancelled = true;
119
+ cleanup?.();
120
+ };
121
+ }, [id, index, onReorder, setDragState]);
122
+ const isDropTarget = dragState.targetId === id && dragState.sourceId !== id;
123
+ return /* @__PURE__ */ jsxs(
124
+ "div",
125
+ {
126
+ ref: rowRef,
127
+ className: cn(
128
+ "group/row relative flex items-center gap-2",
129
+ isDropTarget && "border-t-2 border-primary"
130
+ ),
131
+ children: [
132
+ /* @__PURE__ */ jsx(
133
+ IconButton,
134
+ {
135
+ ref: handleRef,
136
+ icon: /* @__PURE__ */ jsx(DragHandle, { size: 14 }),
137
+ label: "Drag to reorder",
138
+ size: "sm",
139
+ className: "shrink-0 cursor-grab opacity-0 group-hover/row:opacity-100 no-hover:opacity-100",
140
+ tabIndex: -1
141
+ }
142
+ ),
143
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children }),
144
+ /* @__PURE__ */ jsx(
145
+ IconButton,
146
+ {
147
+ icon: /* @__PURE__ */ jsx(DeleteIcon, { size: 14 }),
148
+ label: "Delete item",
149
+ size: "sm",
150
+ intent: "destructive",
151
+ onClick: () => onRemove(id),
152
+ className: "shrink-0 opacity-0 group-hover/row:opacity-100 no-hover:opacity-100"
153
+ }
154
+ )
155
+ ]
156
+ }
157
+ );
158
+ }
159
+ export {
160
+ EditableGrid,
161
+ EditableList,
162
+ EditablePlainText,
163
+ EditableRichText,
164
+ ImageDropZone,
165
+ LinkPopover,
166
+ MediaBlock,
167
+ ResolvedMedia,
168
+ defineHeadingSection
169
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Colors/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA,wBAkCG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Colors/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA,wBAmCG"}
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+ export declare const ColorSpaceSchema: z.ZodObject<{
3
+ hex: z.ZodOptional<z.ZodString>;
4
+ rgb: z.ZodOptional<z.ZodString>;
5
+ cmyk: z.ZodOptional<z.ZodString>;
6
+ pantone: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ export type ColorSpace = z.infer<typeof ColorSpaceSchema>;
9
+ export declare const ColorItemSchema: z.ZodObject<{
10
+ name: z.ZodOptional<z.ZodString>;
11
+ spaces: z.ZodArray<z.ZodObject<{
12
+ hex: z.ZodOptional<z.ZodString>;
13
+ rgb: z.ZodOptional<z.ZodString>;
14
+ cmyk: z.ZodOptional<z.ZodString>;
15
+ pantone: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>>;
17
+ }, z.core.$strip>;
18
+ export type ColorItem = z.infer<typeof ColorItemSchema>;
19
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Colors/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,gBAAgB;;;;;iBAQ5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,eAAe;;;;;;;;iBAG1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { SingleMediaReference } from "../../../schemas/shared";
2
+ import type { LinkValue } from "../../../schemas/link";
3
+ export interface DoDontMediaBlockProps {
4
+ refValue: SingleMediaReference;
5
+ options: {
6
+ square?: boolean;
7
+ showCaption?: boolean;
8
+ border?: boolean;
9
+ objectFit?: "cover" | "contain";
10
+ };
11
+ link?: LinkValue;
12
+ dodont: "do" | "dont";
13
+ isEditMode: boolean;
14
+ onRefChange?: (ref: SingleMediaReference) => void;
15
+ }
16
+ /** Brand-guide composition: a do/dont badge over the generic, brand-agnostic
17
+ * MediaBlock. The badge (do = check/green, dont = x/red) lives here, NOT in the
18
+ * generic media section. */
19
+ export declare function DoDontMediaBlock({ refValue, options, link, dodont, isEditMode, onRefChange }: DoDontMediaBlockProps): import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=DoDontMediaBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DoDontMediaBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/DoDontMedia/DoDontMediaBlock.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAE,CAAC;IACxG,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACnD;AAED;;6BAE6B;AAC7B,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,qBAAqB,2CAiBnH"}
@@ -0,0 +1,45 @@
1
+ declare const _default: import("../../..").SectionDefinition<{
2
+ type: "dodont_media";
3
+ content: {
4
+ ref: {
5
+ imageId: string;
6
+ type: "image";
7
+ caption?: string | string[] | undefined;
8
+ background?: string | undefined;
9
+ invertFrom?: string | undefined;
10
+ border?: boolean | undefined;
11
+ objectFit?: "cover" | "contain" | undefined;
12
+ } | {
13
+ imageId: string;
14
+ type: "video";
15
+ caption?: string | string[] | undefined;
16
+ background?: string | undefined;
17
+ invertFrom?: string | undefined;
18
+ border?: boolean | undefined;
19
+ objectFit?: "cover" | "contain" | undefined;
20
+ poster?: string | undefined;
21
+ autoplay?: boolean | undefined;
22
+ loop?: boolean | undefined;
23
+ muted?: boolean | undefined;
24
+ };
25
+ dodont: "do" | "dont";
26
+ link?: {
27
+ kind: "external";
28
+ href: string;
29
+ target: "_self" | "_blank";
30
+ } | {
31
+ kind: "internal";
32
+ pageId: string;
33
+ target: "_self" | "_blank";
34
+ anchorSectionId?: string | null | undefined;
35
+ } | undefined;
36
+ };
37
+ options: {
38
+ square?: boolean | undefined;
39
+ showCaption?: boolean | undefined;
40
+ border?: boolean | undefined;
41
+ objectFit?: "cover" | "contain" | undefined;
42
+ };
43
+ }>;
44
+ export default _default;
45
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/DoDontMedia/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,wBA2DG"}
@@ -0,0 +1,14 @@
1
+ interface DoDontToggleProps {
2
+ value?: "do" | "dont";
3
+ onSelect: (v: "do" | "dont" | undefined) => void;
4
+ onClose: () => void;
5
+ }
6
+ /**
7
+ * Brand-guide do/dont tagging control. Kept OUT of the generic IconPicker so
8
+ * that primitive stays brand-agnostic — do/dont semantics (do = check/green,
9
+ * dont = x/red) live here, in the brand-guide layer. This is the reference
10
+ * example of extending a true primitive with a branded composition.
11
+ */
12
+ export declare function DoDontToggle({ value, onSelect, onClose }: DoDontToggleProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=DoDontToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DoDontToggle.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/DoDontToggle.tsx"],"names":[],"mappings":"AAIA,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACjD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,iBAAiB,2CA2D3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconList.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/IconList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAShE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,UAAU,KAAK;IACb,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,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CAyCP"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;;;;;;;;iBAK7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;;;;;;;;;;;;;;;;;AAc9D,wBAoBG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;;;;;;;;iBAK7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;;;;;;;;;;;;;;;;;AAc9D,wBAqBG"}
@@ -10,10 +10,8 @@ export interface MediaBlockProps {
10
10
  };
11
11
  /** Per-item link (viewer: already resolved to kind:"external" upstream). */
12
12
  link?: LinkValue;
13
- /** Per-item do/dont badge. */
14
- dodont?: "do" | "dont";
15
13
  isEditMode: boolean;
16
14
  onRefChange?: (ref: SingleMediaReference) => void;
17
15
  }
18
- export declare function MediaBlock({ refValue, options, link, dodont, isEditMode, onRefChange }: MediaBlockProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function MediaBlock({ refValue, options, link, isEditMode, onRefChange }: MediaBlockProps): import("react/jsx-runtime").JSX.Element;
19
17
  //# sourceMappingURL=MediaBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MediaBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Media/MediaBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,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,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,eAAe,2CA2E/F"}
@@ -32,7 +32,6 @@ declare const _default: import("../../..").SectionDefinition<{
32
32
  target: "_self" | "_blank";
33
33
  anchorSectionId?: string | null | undefined;
34
34
  } | undefined;
35
- dodont?: "do" | "dont" | undefined;
36
35
  };
37
36
  options: {
38
37
  square?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Media/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,wBA4DG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Media/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,wBA8CG"}
@@ -1,15 +1,10 @@
1
1
  /**
2
- * The single ordered list of built-in section definitions.
3
- *
4
- * Both `register.ts` (full registration for rendering) and `register-schemas.ts`
5
- * (schema-only registration for /api/save validation) derive from this one
6
- * array, so the two can no longer drift — previously they hand-maintained
7
- * parallel 11-entry lists, and a section added to one but not the other would
8
- * make the editor render a type that save rejects with a 400 (or vice versa).
2
+ * The single ordered list of built-in section definitions, composed from the
3
+ * core (generic) and brand-guide groups. Both `register.ts` and
4
+ * `register-schemas.ts` derive from this one array, so they cannot drift.
9
5
  *
10
6
  * Retired: split_content, media_grid, do_dont_grid, do_dont — fully decomposable
11
- * into container sections. The loader fallback in mergeSiteContent transforms any
12
- * legacy-typed JSON to container before validation.
7
+ * into container sections by the loader fallback (mergeSiteContent).
13
8
  */
14
9
  export declare const allSectionDefs: (import("../..").SectionDefinition<{
15
10
  type: "link_heading";
@@ -65,7 +60,6 @@ export declare const allSectionDefs: (import("../..").SectionDefinition<{
65
60
  target: "_self" | "_blank";
66
61
  anchorSectionId?: string | null | undefined;
67
62
  } | undefined;
68
- dodont?: "do" | "dont" | undefined;
69
63
  };
70
64
  options: {
71
65
  square?: boolean | undefined;
@@ -89,6 +83,17 @@ export declare const allSectionDefs: (import("../..").SectionDefinition<{
89
83
  } | undefined;
90
84
  download?: boolean | undefined;
91
85
  };
86
+ }> | import("../..").SectionDefinition<{
87
+ type: "container";
88
+ content: {
89
+ children: import("../..").Section<Record<string, unknown>>[];
90
+ columns: number;
91
+ flow: "row" | "column";
92
+ childDefaults?: Record<string, unknown> | undefined;
93
+ };
94
+ }> | import("../..").SectionDefinition<{
95
+ type: "spacer";
96
+ content: Record<string, never>;
92
97
  }> | import("../..").SectionDefinition<{
93
98
  type: "colors";
94
99
  content: {
@@ -124,15 +129,46 @@ export declare const allSectionDefs: (import("../..").SectionDefinition<{
124
129
  stackText?: boolean | undefined;
125
130
  } | undefined;
126
131
  }> | import("../..").SectionDefinition<{
127
- type: "container";
132
+ type: "dodont_media";
128
133
  content: {
129
- children: import("../..").Section<Record<string, unknown>>[];
130
- columns: number;
131
- flow: "row" | "column";
132
- childDefaults?: Record<string, unknown> | undefined;
134
+ ref: {
135
+ imageId: string;
136
+ type: "image";
137
+ caption?: string | string[] | undefined;
138
+ background?: string | undefined;
139
+ invertFrom?: string | undefined;
140
+ border?: boolean | undefined;
141
+ objectFit?: "cover" | "contain" | undefined;
142
+ } | {
143
+ imageId: string;
144
+ type: "video";
145
+ caption?: string | string[] | undefined;
146
+ background?: string | undefined;
147
+ invertFrom?: string | undefined;
148
+ border?: boolean | undefined;
149
+ objectFit?: "cover" | "contain" | undefined;
150
+ poster?: string | undefined;
151
+ autoplay?: boolean | undefined;
152
+ loop?: boolean | undefined;
153
+ muted?: boolean | undefined;
154
+ };
155
+ dodont: "do" | "dont";
156
+ link?: {
157
+ kind: "external";
158
+ href: string;
159
+ target: "_self" | "_blank";
160
+ } | {
161
+ kind: "internal";
162
+ pageId: string;
163
+ target: "_self" | "_blank";
164
+ anchorSectionId?: string | null | undefined;
165
+ } | undefined;
166
+ };
167
+ options: {
168
+ square?: boolean | undefined;
169
+ showCaption?: boolean | undefined;
170
+ border?: boolean | undefined;
171
+ objectFit?: "cover" | "contain" | undefined;
133
172
  };
134
- }> | import("../..").SectionDefinition<{
135
- type: "spacer";
136
- content: Record<string, never>;
137
173
  }>)[];
138
174
  //# sourceMappingURL=all-sections.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"all-sections.d.ts","sourceRoot":"","sources":["../../../src/components/sections/all-sections.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;GAYG;AAKH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW1B,CAAC"}
1
+ {"version":3,"file":"all-sections.d.ts","sourceRoot":"","sources":["../../../src/components/sections/all-sections.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAiD,CAAC"}
@@ -0,0 +1,84 @@
1
+ /** Opinionated brand-guide sections. Self-contained subtree: a build that does
2
+ * not import this module drops these sections (and their cmyk/pantone schemas
3
+ * and do/dont compositions) entirely. Exposed at
4
+ * `@drawnagency/primitives/components/sections/brand-guide`. */
5
+ export declare const brandGuideSectionDefs: (import("../..").SectionDefinition<{
6
+ type: "colors";
7
+ content: {
8
+ colors: {
9
+ spaces: {
10
+ hex?: string | undefined;
11
+ rgb?: string | undefined;
12
+ cmyk?: string | undefined;
13
+ pantone?: string | undefined;
14
+ }[];
15
+ name?: string | undefined;
16
+ }[];
17
+ };
18
+ options?: {
19
+ label?: string | undefined;
20
+ columns?: number | undefined;
21
+ collapsing?: boolean | undefined;
22
+ showLabel?: boolean | undefined;
23
+ } | undefined;
24
+ }> | import("../..").SectionDefinition<{
25
+ type: "icon_list";
26
+ content: {
27
+ items: {
28
+ label: string;
29
+ text: string;
30
+ icon?: string | undefined;
31
+ dodont?: "do" | "dont" | undefined;
32
+ }[];
33
+ };
34
+ options?: {
35
+ icon?: string | null | undefined;
36
+ showLabel?: boolean | undefined;
37
+ stackText?: boolean | undefined;
38
+ } | undefined;
39
+ }> | import("../..").SectionDefinition<{
40
+ type: "dodont_media";
41
+ content: {
42
+ ref: {
43
+ imageId: string;
44
+ type: "image";
45
+ caption?: string | string[] | undefined;
46
+ background?: string | undefined;
47
+ invertFrom?: string | undefined;
48
+ border?: boolean | undefined;
49
+ objectFit?: "cover" | "contain" | undefined;
50
+ } | {
51
+ imageId: string;
52
+ type: "video";
53
+ caption?: string | string[] | undefined;
54
+ background?: string | undefined;
55
+ invertFrom?: string | undefined;
56
+ border?: boolean | undefined;
57
+ objectFit?: "cover" | "contain" | undefined;
58
+ poster?: string | undefined;
59
+ autoplay?: boolean | undefined;
60
+ loop?: boolean | undefined;
61
+ muted?: boolean | undefined;
62
+ };
63
+ dodont: "do" | "dont";
64
+ link?: {
65
+ kind: "external";
66
+ href: string;
67
+ target: "_self" | "_blank";
68
+ } | {
69
+ kind: "internal";
70
+ pageId: string;
71
+ target: "_self" | "_blank";
72
+ anchorSectionId?: string | null | undefined;
73
+ } | undefined;
74
+ };
75
+ options: {
76
+ square?: boolean | undefined;
77
+ showCaption?: boolean | undefined;
78
+ border?: boolean | undefined;
79
+ objectFit?: "cover" | "contain" | undefined;
80
+ };
81
+ }>)[];
82
+ export { ColorSpaceSchema, ColorItemSchema } from "./Colors/schema";
83
+ export type { ColorSpace, ColorItem } from "./Colors/schema";
84
+ //# sourceMappingURL=brand-guide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brand-guide.d.ts","sourceRoot":"","sources":["../../../src/components/sections/brand-guide.ts"],"names":[],"mappings":"AAIA;;;iEAGiE;AAEjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAkC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import {
2
+ ColorItemSchema,
3
+ ColorSpaceSchema,
4
+ brandGuideSectionDefs
5
+ } from "../../chunk-JRT4KWHU.js";
6
+ import "../../chunk-5THS4K5D.js";
7
+ import "../../chunk-QWDOJUUO.js";
8
+ import "../../chunk-I5737FJY.js";
9
+ import "../../chunk-CBWK3KPV.js";
10
+ import "../../chunk-3DCG4DNU.js";
11
+ import "../../chunk-WDSVHKAH.js";
12
+ import "../../chunk-ZGFAYZWB.js";
13
+ import "../../chunk-7EOSDFS3.js";
14
+ import "../../chunk-TEYTLQVH.js";
15
+ import "../../chunk-VKAGMEKE.js";
16
+ import "../../chunk-JSBRDJBE.js";
17
+ export {
18
+ ColorItemSchema,
19
+ ColorSpaceSchema,
20
+ brandGuideSectionDefs
21
+ };
@@ -0,0 +1,93 @@
1
+ /** Generic, brand-agnostic built-in sections. A non-brand site can register
2
+ * exactly these (plus its own custom sections) and tree-shake the brand-guide
3
+ * group out of its bundle. */
4
+ export declare const coreSectionDefs: (import("../..").SectionDefinition<{
5
+ type: "link_heading";
6
+ content: {
7
+ heading: string;
8
+ };
9
+ }> | import("../..").SectionDefinition<{
10
+ type: "sub_heading";
11
+ content: {
12
+ heading: string;
13
+ };
14
+ }> | import("../..").SectionDefinition<{
15
+ type: "sub_sub_heading";
16
+ content: {
17
+ heading: string;
18
+ };
19
+ }> | import("../..").SectionDefinition<{
20
+ type: "prose";
21
+ content: {
22
+ body: string;
23
+ };
24
+ }> | import("../..").SectionDefinition<{
25
+ type: "media";
26
+ content: {
27
+ ref: {
28
+ imageId: string;
29
+ type: "image";
30
+ caption?: string | string[] | undefined;
31
+ background?: string | undefined;
32
+ invertFrom?: string | undefined;
33
+ border?: boolean | undefined;
34
+ objectFit?: "cover" | "contain" | undefined;
35
+ } | {
36
+ imageId: string;
37
+ type: "video";
38
+ caption?: string | string[] | undefined;
39
+ background?: string | undefined;
40
+ invertFrom?: string | undefined;
41
+ border?: boolean | undefined;
42
+ objectFit?: "cover" | "contain" | undefined;
43
+ poster?: string | undefined;
44
+ autoplay?: boolean | undefined;
45
+ loop?: boolean | undefined;
46
+ muted?: boolean | undefined;
47
+ };
48
+ link?: {
49
+ kind: "external";
50
+ href: string;
51
+ target: "_self" | "_blank";
52
+ } | {
53
+ kind: "internal";
54
+ pageId: string;
55
+ target: "_self" | "_blank";
56
+ anchorSectionId?: string | null | undefined;
57
+ } | undefined;
58
+ };
59
+ options: {
60
+ square?: boolean | undefined;
61
+ showCaption?: boolean | undefined;
62
+ border?: boolean | undefined;
63
+ objectFit?: "cover" | "contain" | undefined;
64
+ };
65
+ }> | import("../..").SectionDefinition<{
66
+ type: "button";
67
+ content: {
68
+ text: string;
69
+ link?: {
70
+ kind: "external";
71
+ href: string;
72
+ target: "_self" | "_blank";
73
+ } | {
74
+ kind: "internal";
75
+ pageId: string;
76
+ target: "_self" | "_blank";
77
+ anchorSectionId?: string | null | undefined;
78
+ } | undefined;
79
+ download?: boolean | undefined;
80
+ };
81
+ }> | import("../..").SectionDefinition<{
82
+ type: "container";
83
+ content: {
84
+ children: import("../..").Section<Record<string, unknown>>[];
85
+ columns: number;
86
+ flow: "row" | "column";
87
+ childDefaults?: Record<string, unknown> | undefined;
88
+ };
89
+ }> | import("../..").SectionDefinition<{
90
+ type: "spacer";
91
+ content: Record<string, never>;
92
+ }>)[];
93
+ //# sourceMappingURL=core-sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-sections.d.ts","sourceRoot":"","sources":["../../../src/components/sections/core-sections.ts"],"names":[],"mappings":"AASA;;+BAE+B;AAK/B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAS3B,CAAC"}