@drawnagency/primitives 0.1.56 → 0.1.58
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.
- package/dist/adapter-HH47ZPGM.js +1779 -0
- package/dist/auth/index.js +1 -0
- package/dist/{chunk-EU6NZ4GS.js → chunk-AN62WPW7.js} +22 -163
- package/dist/chunk-ESE5UBQI.js +73 -0
- package/dist/{chunk-KGYWQDBB.js → chunk-ICLXLWQ5.js} +9 -72
- package/dist/chunk-JSBRDJBE.js +30 -0
- package/dist/chunk-NSCT3AMV.js +32 -0
- package/dist/chunk-RFZNNCAS.js +160 -0
- package/dist/chunk-TG43X7JO.js +123 -0
- package/dist/{chunk-7IAWF7LE.js → chunk-V7JN2DDU.js} +2 -19
- package/dist/chunk-VKAGMEKE.js +90 -0
- package/dist/chunk-ZU2MKPTG.js +29 -0
- package/dist/closest-edge-EBOXL3YW.js +72 -0
- package/dist/components/editor/ChildBlockWrapper.d.ts +19 -0
- package/dist/components/editor/ChildBlockWrapper.d.ts.map +1 -0
- package/dist/components/editor/ColSpanControl.d.ts +9 -0
- package/dist/components/editor/ColSpanControl.d.ts.map +1 -0
- package/dist/components/editor/SectionWrapper.d.ts +1 -1
- package/dist/components/editor/SectionWrapper.d.ts.map +1 -1
- package/dist/components/editor/SettingsForm.d.ts +5 -1
- package/dist/components/editor/SettingsForm.d.ts.map +1 -1
- package/dist/components/primitives/EditableGrid.d.ts.map +1 -1
- package/dist/components/primitives/IconPicker.d.ts +7 -1
- package/dist/components/primitives/IconPicker.d.ts.map +1 -1
- package/dist/components/sections/Container/Container.d.ts +20 -0
- package/dist/components/sections/Container/Container.d.ts.map +1 -0
- package/dist/components/sections/Container/ContainerSettingsForm.d.ts +17 -0
- package/dist/components/sections/Container/ContainerSettingsForm.d.ts.map +1 -0
- package/dist/components/sections/Container/index.d.ts +11 -0
- package/dist/components/sections/Container/index.d.ts.map +1 -0
- package/dist/components/sections/IconList/IconList.d.ts +1 -0
- package/dist/components/sections/IconList/IconList.d.ts.map +1 -1
- package/dist/components/sections/IconList/IconListSettings.d.ts +3 -4
- package/dist/components/sections/IconList/IconListSettings.d.ts.map +1 -1
- package/dist/components/sections/IconList/index.d.ts +1 -0
- package/dist/components/sections/IconList/index.d.ts.map +1 -1
- package/dist/components/sections/Media/MediaBlock.d.ts +19 -0
- package/dist/components/sections/Media/MediaBlock.d.ts.map +1 -0
- package/dist/components/sections/{MediaGrid → Media}/index.d.ts +15 -25
- package/dist/components/sections/Media/index.d.ts.map +1 -0
- package/dist/components/sections/Prose/index.d.ts.map +1 -1
- package/dist/components/sections/Spacer/Spacer.d.ts +2 -0
- package/dist/components/sections/Spacer/Spacer.d.ts.map +1 -0
- package/dist/components/sections/Spacer/index.d.ts +6 -0
- package/dist/components/sections/Spacer/index.d.ts.map +1 -0
- package/dist/components/sections/all-sections.d.ts +29 -103
- package/dist/components/sections/all-sections.d.ts.map +1 -1
- package/dist/components/sections/register-schemas.d.ts.map +1 -1
- package/dist/components/sections/register-schemas.js +4094 -0
- package/dist/components/shared/Tabs.d.ts +24 -0
- package/dist/components/shared/Tabs.d.ts.map +1 -0
- package/dist/components/shell/EditorShell.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsModal.d.ts.map +1 -1
- package/dist/components/shell/blockMoveDispatch.d.ts +21 -0
- package/dist/components/shell/blockMoveDispatch.d.ts.map +1 -0
- package/dist/hooks/useBlockDnd.d.ts +48 -0
- package/dist/hooks/useBlockDnd.d.ts.map +1 -0
- package/dist/index.js +69 -56
- package/dist/lib/block-dnd.d.ts +42 -0
- package/dist/lib/block-dnd.d.ts.map +1 -0
- package/dist/lib/block-move.d.ts +31 -0
- package/dist/lib/block-move.d.ts.map +1 -0
- package/dist/lib/container-grid.d.ts +29 -0
- package/dist/lib/container-grid.d.ts.map +1 -0
- package/dist/lib/container-ops.d.ts +44 -0
- package/dist/lib/container-ops.d.ts.map +1 -0
- package/dist/lib/dexie.d.ts.map +1 -1
- package/dist/lib/dexie.js +15 -0
- package/dist/lib/env.js +1 -0
- package/dist/lib/index.js +19 -13
- package/dist/lib/loader.d.ts.map +1 -1
- package/dist/lib/migrate-sections-transform.d.ts +12 -0
- package/dist/lib/migrate-sections-transform.d.ts.map +1 -0
- package/dist/lib/migrate-sections-transform.js +7 -0
- package/dist/lib/registry.d.ts +39 -0
- package/dist/lib/registry.d.ts.map +1 -1
- package/dist/lib/registry.js +27 -0
- package/dist/media/index.js +1 -0
- package/dist/schemas/auth.js +1 -0
- package/dist/schemas/block.d.ts +20 -0
- package/dist/schemas/block.d.ts.map +1 -0
- package/dist/schemas/block.js +15 -0
- package/dist/schemas/index.js +13 -4
- package/dist/schemas/link.d.ts +7 -0
- package/dist/schemas/link.d.ts.map +1 -1
- package/dist/schemas/rich-text.d.ts +9 -0
- package/dist/schemas/rich-text.d.ts.map +1 -0
- package/dist/schemas/sections.d.ts +2 -0
- package/dist/schemas/sections.d.ts.map +1 -1
- package/dist/schemas/shared.d.ts +30 -0
- package/dist/schemas/shared.d.ts.map +1 -1
- package/dist/types/database.js +2 -0
- package/package.json +17 -1
- package/src/components/brandguide/Colors.tsx +35 -33
- package/src/components/editor/ChildBlockWrapper.tsx +108 -0
- package/src/components/editor/ColSpanControl.tsx +56 -0
- package/src/components/editor/SectionWrapper.tsx +44 -20
- package/src/components/editor/SettingsForm.tsx +100 -73
- package/src/components/primitives/EditableGrid.tsx +40 -36
- package/src/components/primitives/IconPicker.tsx +116 -26
- package/src/components/sections/Container/Container.tsx +354 -0
- package/src/components/sections/Container/ContainerSettingsForm.tsx +113 -0
- package/src/components/sections/Container/index.tsx +51 -0
- package/src/components/sections/IconList/IconList.tsx +113 -43
- package/src/components/sections/IconList/IconListSettings.tsx +2 -2
- package/src/components/sections/IconList/index.tsx +1 -1
- package/src/components/sections/Media/MediaBlock.tsx +103 -0
- package/src/components/sections/Media/index.tsx +85 -0
- package/src/components/sections/Prose/index.tsx +1 -0
- package/src/components/sections/Spacer/Spacer.tsx +6 -0
- package/src/components/sections/Spacer/index.tsx +18 -0
- package/src/components/sections/all-sections.ts +10 -8
- package/src/components/sections/register-schemas.ts +5 -2
- package/src/components/shared/Tabs.tsx +63 -0
- package/src/components/shell/EditorShell.tsx +105 -13
- package/src/components/shell/SiteSettingsModal.tsx +41 -51
- package/src/components/shell/blockMoveDispatch.ts +40 -0
- package/src/hooks/useBlockDnd.ts +144 -0
- package/src/lib/block-dnd.ts +58 -0
- package/src/lib/block-move.ts +236 -0
- package/src/lib/container-grid.ts +58 -0
- package/src/lib/container-ops.ts +159 -0
- package/src/lib/dexie.ts +22 -0
- package/src/lib/loader.ts +16 -4
- package/src/lib/migrate-sections-transform.ts +147 -0
- package/src/lib/registry.ts +48 -0
- package/src/schemas/block.ts +40 -0
- package/src/schemas/link.ts +19 -1
- package/src/schemas/rich-text.ts +11 -0
- package/src/schemas/sections.ts +5 -1
- package/src/schemas/shared.ts +6 -0
- package/dist/components/brandguide/DoDontList.d.ts +0 -16
- package/dist/components/brandguide/DoDontList.d.ts.map +0 -1
- package/dist/components/brandguide/DoDontMediaGrid.d.ts +0 -16
- package/dist/components/brandguide/DoDontMediaGrid.d.ts.map +0 -1
- package/dist/components/primitives/MediaSettingsForms.d.ts +0 -23
- package/dist/components/primitives/MediaSettingsForms.d.ts.map +0 -1
- package/dist/components/sections/DoDontList/index.d.ts +0 -21
- package/dist/components/sections/DoDontList/index.d.ts.map +0 -1
- package/dist/components/sections/DoDontMediaGrid/index.d.ts +0 -55
- package/dist/components/sections/DoDontMediaGrid/index.d.ts.map +0 -1
- package/dist/components/sections/MediaGrid/MediaGrid.d.ts +0 -17
- package/dist/components/sections/MediaGrid/MediaGrid.d.ts.map +0 -1
- package/dist/components/sections/MediaGrid/index.d.ts.map +0 -1
- package/dist/components/sections/SplitContent/SplitContent.d.ts +0 -14
- package/dist/components/sections/SplitContent/SplitContent.d.ts.map +0 -1
- package/dist/components/sections/SplitContent/index.d.ts +0 -13
- package/dist/components/sections/SplitContent/index.d.ts.map +0 -1
- package/src/components/brandguide/DoDontList.d.ts.map +0 -1
- package/src/components/brandguide/DoDontList.tsx +0 -67
- package/src/components/brandguide/DoDontMediaGrid.d.ts.map +0 -1
- package/src/components/brandguide/DoDontMediaGrid.tsx +0 -19
- package/src/components/primitives/MediaSettingsForms.tsx +0 -128
- package/src/components/sections/DoDontList/index.d.ts.map +0 -1
- package/src/components/sections/DoDontList/index.tsx +0 -45
- package/src/components/sections/DoDontMediaGrid/index.d.ts.map +0 -1
- package/src/components/sections/DoDontMediaGrid/index.tsx +0 -63
- package/src/components/sections/MediaGrid/MediaGrid.d.ts.map +0 -1
- package/src/components/sections/MediaGrid/MediaGrid.tsx +0 -239
- package/src/components/sections/MediaGrid/index.d.ts.map +0 -1
- package/src/components/sections/MediaGrid/index.tsx +0 -57
- package/src/components/sections/SplitContent/SplitContent.d.ts.map +0 -1
- package/src/components/sections/SplitContent/SplitContent.tsx +0 -84
- package/src/components/sections/SplitContent/index.d.ts.map +0 -1
- package/src/components/sections/SplitContent/index.tsx +0 -55
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// src/lib/migrate-sections-transform.ts
|
|
2
|
+
var RETIRED = /* @__PURE__ */ new Set(["split_content", "media_grid", "do_dont_grid", "do_dont"]);
|
|
3
|
+
function upgradeLegacySection(raw) {
|
|
4
|
+
if (!raw || typeof raw !== "object") return raw;
|
|
5
|
+
const section = raw;
|
|
6
|
+
if (!RETIRED.has(section.type)) return raw;
|
|
7
|
+
if (section.type === "split_content") return upgradeSplitContent(section);
|
|
8
|
+
if (section.type === "do_dont") return upgradeDoDont(section);
|
|
9
|
+
return upgradeGrid(section);
|
|
10
|
+
}
|
|
11
|
+
function buildRef(item, forceImage) {
|
|
12
|
+
const type = forceImage ? "image" : item.type;
|
|
13
|
+
const ref = { type, imageId: item.imageId ?? "" };
|
|
14
|
+
if (item.caption !== void 0) ref.caption = item.caption;
|
|
15
|
+
if (item.background !== void 0) ref.background = item.background;
|
|
16
|
+
if (item.invertFrom !== void 0) ref.invertFrom = item.invertFrom;
|
|
17
|
+
if (item.border !== void 0) ref.border = item.border;
|
|
18
|
+
if (item.objectFit !== void 0) ref.objectFit = item.objectFit;
|
|
19
|
+
if (type === "video") {
|
|
20
|
+
if (item.poster !== void 0) ref.poster = item.poster;
|
|
21
|
+
if (item.autoplay !== void 0) ref.autoplay = item.autoplay;
|
|
22
|
+
if (item.loop !== void 0) ref.loop = item.loop;
|
|
23
|
+
if (item.muted !== void 0) ref.muted = item.muted;
|
|
24
|
+
}
|
|
25
|
+
return ref;
|
|
26
|
+
}
|
|
27
|
+
function mapRefItem(item, parentId, index) {
|
|
28
|
+
const content = {};
|
|
29
|
+
if (item.type === "linkedImage") {
|
|
30
|
+
content.ref = buildRef(item, true);
|
|
31
|
+
content.link = { kind: "external", href: item.href ?? "", target: item.target === "_blank" ? "_blank" : "_self" };
|
|
32
|
+
} else if (item.type === "doDontImage") {
|
|
33
|
+
content.ref = buildRef(item, true);
|
|
34
|
+
if (item.doDont !== void 0) content.dodont = item.doDont;
|
|
35
|
+
} else {
|
|
36
|
+
content.ref = buildRef(item, false);
|
|
37
|
+
}
|
|
38
|
+
return { id: `${parentId}__media_${index}`, type: "media", content, options: {} };
|
|
39
|
+
}
|
|
40
|
+
function upgradeGrid(section) {
|
|
41
|
+
const id = section.id;
|
|
42
|
+
const content = section.content ?? {};
|
|
43
|
+
const options = section.options ?? {};
|
|
44
|
+
const media = Array.isArray(content.media) ? content.media : [];
|
|
45
|
+
const childDefaults = {};
|
|
46
|
+
if (options.square !== void 0) childDefaults.square = options.square;
|
|
47
|
+
if (options.showCaptions !== void 0) childDefaults.showCaption = options.showCaptions;
|
|
48
|
+
if (options.border !== void 0) childDefaults.border = options.border;
|
|
49
|
+
if (options.crop) childDefaults.objectFit = "cover";
|
|
50
|
+
const out = {
|
|
51
|
+
id,
|
|
52
|
+
type: "container",
|
|
53
|
+
content: {
|
|
54
|
+
columns: content.columns,
|
|
55
|
+
flow: "row",
|
|
56
|
+
children: media.map((item, i) => mapRefItem(item, id, i))
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
if (Object.keys(childDefaults).length > 0) out.content.childDefaults = childDefaults;
|
|
60
|
+
if (section.layout !== void 0) out.layout = section.layout;
|
|
61
|
+
return out;
|
|
62
|
+
}
|
|
63
|
+
function upgradeSplitContent(section) {
|
|
64
|
+
const id = section.id;
|
|
65
|
+
const content = section.content ?? {};
|
|
66
|
+
const options = section.options ?? {};
|
|
67
|
+
const mediaChild = {
|
|
68
|
+
id: `${id}__media_0`,
|
|
69
|
+
type: "media",
|
|
70
|
+
content: { ref: { type: "image", imageId: content.imageId ?? "" } },
|
|
71
|
+
options: options.border !== void 0 ? { border: options.border } : {}
|
|
72
|
+
};
|
|
73
|
+
const proseChild = {
|
|
74
|
+
id: `${id}__prose_1`,
|
|
75
|
+
type: "prose",
|
|
76
|
+
content: { body: content.body ?? "" }
|
|
77
|
+
};
|
|
78
|
+
const children = options.imagePosition === "right" ? [proseChild, mediaChild] : [mediaChild, proseChild];
|
|
79
|
+
const out = { id, type: "container", content: { columns: 2, flow: "row", children } };
|
|
80
|
+
if (section.layout !== void 0) out.layout = section.layout;
|
|
81
|
+
return out;
|
|
82
|
+
}
|
|
83
|
+
function dodontChildOptions(options) {
|
|
84
|
+
const out = {};
|
|
85
|
+
if (options.showLabel !== void 0) out.showLabel = options.showLabel;
|
|
86
|
+
if (options.stackText !== void 0) out.stackText = options.stackText;
|
|
87
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
88
|
+
}
|
|
89
|
+
function dodontChild(items, parentId, index, tag, options) {
|
|
90
|
+
const child = {
|
|
91
|
+
id: `${parentId}__icon_list_${index}`,
|
|
92
|
+
type: "icon_list",
|
|
93
|
+
content: { items: items.map((it) => ({ label: it.label ?? "", text: it.text ?? "", dodont: tag })) }
|
|
94
|
+
};
|
|
95
|
+
if (options !== void 0) child.options = options;
|
|
96
|
+
return child;
|
|
97
|
+
}
|
|
98
|
+
function upgradeDoDont(section) {
|
|
99
|
+
const id = section.id;
|
|
100
|
+
const content = section.content ?? {};
|
|
101
|
+
const options = section.options ?? {};
|
|
102
|
+
const doItems = Array.isArray(content.doItems) ? content.doItems : [];
|
|
103
|
+
const dontItems = Array.isArray(content.dontItems) ? content.dontItems : [];
|
|
104
|
+
const childOptions = dodontChildOptions(options);
|
|
105
|
+
const out = {
|
|
106
|
+
id,
|
|
107
|
+
type: "container",
|
|
108
|
+
content: {
|
|
109
|
+
columns: 2,
|
|
110
|
+
flow: "row",
|
|
111
|
+
children: [
|
|
112
|
+
dodontChild(doItems, id, 0, "do", childOptions),
|
|
113
|
+
dodontChild(dontItems, id, 1, "dont", childOptions)
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
if (section.layout !== void 0) out.layout = section.layout;
|
|
118
|
+
return out;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export {
|
|
122
|
+
upgradeLegacySection
|
|
123
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HexColorSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ICLXLWQ5.js";
|
|
4
4
|
|
|
5
5
|
// src/schemas/audience.ts
|
|
6
6
|
import { z } from "zod";
|
|
@@ -22,26 +22,9 @@ var MediaGridOptionsSchema = z2.object({
|
|
|
22
22
|
showCaptions: z2.boolean().optional()
|
|
23
23
|
}).default({});
|
|
24
24
|
|
|
25
|
-
// src/schemas/link.ts
|
|
26
|
-
import { z as z3 } from "zod";
|
|
27
|
-
var LinkTargetSchema = z3.enum(["_self", "_blank"]);
|
|
28
|
-
var LinkValueSchema = z3.discriminatedUnion("kind", [
|
|
29
|
-
z3.object({ kind: z3.literal("external"), href: z3.string(), target: LinkTargetSchema }),
|
|
30
|
-
z3.object({
|
|
31
|
-
kind: z3.literal("internal"),
|
|
32
|
-
pageId: z3.string(),
|
|
33
|
-
anchorSectionId: z3.string().nullable().optional(),
|
|
34
|
-
target: LinkTargetSchema
|
|
35
|
-
})
|
|
36
|
-
]);
|
|
37
|
-
var DEFAULT_LINK = { kind: "external", href: "", target: "_self" };
|
|
38
|
-
|
|
39
25
|
export {
|
|
40
26
|
AudienceNameSchema,
|
|
41
27
|
AudienceColorSchema,
|
|
42
28
|
slugifyAudienceName,
|
|
43
|
-
MediaGridOptionsSchema
|
|
44
|
-
LinkTargetSchema,
|
|
45
|
-
LinkValueSchema,
|
|
46
|
-
DEFAULT_LINK
|
|
29
|
+
MediaGridOptionsSchema
|
|
47
30
|
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// src/lib/registry.ts
|
|
2
|
+
function defineSection(def) {
|
|
3
|
+
return def;
|
|
4
|
+
}
|
|
5
|
+
function createRegistry() {
|
|
6
|
+
const sections = /* @__PURE__ */ new Map();
|
|
7
|
+
const schemas = /* @__PURE__ */ new Map();
|
|
8
|
+
const richText = /* @__PURE__ */ new Map();
|
|
9
|
+
return {
|
|
10
|
+
registerSection(def) {
|
|
11
|
+
sections.set(def.type, def);
|
|
12
|
+
if (def.richTextFields) richText.set(def.type, def.richTextFields);
|
|
13
|
+
},
|
|
14
|
+
registerSchema(type, schema) {
|
|
15
|
+
schemas.set(type, schema);
|
|
16
|
+
},
|
|
17
|
+
registerRichText(type, fields) {
|
|
18
|
+
richText.set(type, fields);
|
|
19
|
+
},
|
|
20
|
+
getRichTextFields(type) {
|
|
21
|
+
return richText.get(type) ?? [];
|
|
22
|
+
},
|
|
23
|
+
getSection(type) {
|
|
24
|
+
return sections.get(type);
|
|
25
|
+
},
|
|
26
|
+
getSchema(type) {
|
|
27
|
+
return schemas.get(type) ?? sections.get(type)?.schema;
|
|
28
|
+
},
|
|
29
|
+
getAllSections() {
|
|
30
|
+
return Array.from(sections.values());
|
|
31
|
+
},
|
|
32
|
+
getAllSchemas() {
|
|
33
|
+
const merged = new Map(schemas);
|
|
34
|
+
for (const [type, def] of sections) {
|
|
35
|
+
if (!merged.has(type)) merged.set(type, def.schema);
|
|
36
|
+
}
|
|
37
|
+
return Array.from(merged.values());
|
|
38
|
+
},
|
|
39
|
+
clearRegistry() {
|
|
40
|
+
sections.clear();
|
|
41
|
+
schemas.clear();
|
|
42
|
+
richText.clear();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("@drawnagency/primitives/registry");
|
|
47
|
+
var g = globalThis;
|
|
48
|
+
if (!g[REGISTRY_KEY]) g[REGISTRY_KEY] = createRegistry();
|
|
49
|
+
var defaultRegistry = g[REGISTRY_KEY];
|
|
50
|
+
function registerSection(def) {
|
|
51
|
+
defaultRegistry.registerSection(def);
|
|
52
|
+
}
|
|
53
|
+
function registerSchema(type, schema) {
|
|
54
|
+
defaultRegistry.registerSchema(type, schema);
|
|
55
|
+
}
|
|
56
|
+
function registerRichText(type, fields) {
|
|
57
|
+
defaultRegistry.registerRichText(type, fields);
|
|
58
|
+
}
|
|
59
|
+
function getRichTextFields(type) {
|
|
60
|
+
return defaultRegistry.getRichTextFields(type);
|
|
61
|
+
}
|
|
62
|
+
function getSection(type) {
|
|
63
|
+
return defaultRegistry.getSection(type);
|
|
64
|
+
}
|
|
65
|
+
function getSchema(type) {
|
|
66
|
+
return defaultRegistry.getSchema(type);
|
|
67
|
+
}
|
|
68
|
+
function getAllSections() {
|
|
69
|
+
return defaultRegistry.getAllSections();
|
|
70
|
+
}
|
|
71
|
+
function getAllSchemas() {
|
|
72
|
+
return defaultRegistry.getAllSchemas();
|
|
73
|
+
}
|
|
74
|
+
function clearRegistry() {
|
|
75
|
+
defaultRegistry.clearRegistry();
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
defineSection,
|
|
80
|
+
createRegistry,
|
|
81
|
+
registerSection,
|
|
82
|
+
registerSchema,
|
|
83
|
+
registerRichText,
|
|
84
|
+
getRichTextFields,
|
|
85
|
+
getSection,
|
|
86
|
+
getSchema,
|
|
87
|
+
getAllSections,
|
|
88
|
+
getAllSchemas,
|
|
89
|
+
clearRegistry
|
|
90
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// src/schemas/link.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var LinkTargetSchema = z.enum(["_self", "_blank"]);
|
|
4
|
+
function isSafeHref(href) {
|
|
5
|
+
const normalized = href.replace(/[\t\r\n]/g, "").trimStart();
|
|
6
|
+
if (normalized === "") return true;
|
|
7
|
+
if (normalized.startsWith("//")) return false;
|
|
8
|
+
const scheme = /^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(normalized);
|
|
9
|
+
if (!scheme) return true;
|
|
10
|
+
const s = scheme[1].toLowerCase();
|
|
11
|
+
return s === "http" || s === "https" || s === "mailto";
|
|
12
|
+
}
|
|
13
|
+
var LinkValueSchema = z.discriminatedUnion("kind", [
|
|
14
|
+
z.object({ kind: z.literal("external"), href: z.string().refine(isSafeHref, "Unsafe href scheme"), target: LinkTargetSchema }),
|
|
15
|
+
z.object({
|
|
16
|
+
kind: z.literal("internal"),
|
|
17
|
+
pageId: z.string(),
|
|
18
|
+
anchorSectionId: z.string().nullable().optional(),
|
|
19
|
+
target: LinkTargetSchema
|
|
20
|
+
})
|
|
21
|
+
]);
|
|
22
|
+
var DEFAULT_LINK = { kind: "external", href: "", target: "_self" };
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
LinkTargetSchema,
|
|
26
|
+
isSafeHref,
|
|
27
|
+
LinkValueSchema,
|
|
28
|
+
DEFAULT_LINK
|
|
29
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
require_defineProperty
|
|
3
|
+
} from "./chunk-ESE5UBQI.js";
|
|
4
|
+
import {
|
|
5
|
+
__toESM
|
|
6
|
+
} from "./chunk-JSBRDJBE.js";
|
|
7
|
+
|
|
8
|
+
// ../../node_modules/.pnpm/@atlaskit+pragmatic-drag-and-drop-hitbox@1.1.0/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/closest-edge.js
|
|
9
|
+
var import_defineProperty = __toESM(require_defineProperty());
|
|
10
|
+
function ownKeys(e, r) {
|
|
11
|
+
var t = Object.keys(e);
|
|
12
|
+
if (Object.getOwnPropertySymbols) {
|
|
13
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
14
|
+
r && (o = o.filter(function(r2) {
|
|
15
|
+
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
16
|
+
})), t.push.apply(t, o);
|
|
17
|
+
}
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
function _objectSpread(e) {
|
|
21
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
22
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
23
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
24
|
+
(0, import_defineProperty.default)(e, r2, t[r2]);
|
|
25
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
26
|
+
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return e;
|
|
30
|
+
}
|
|
31
|
+
var getDistanceToEdge = {
|
|
32
|
+
top: function top(rect, client) {
|
|
33
|
+
return Math.abs(client.y - rect.top);
|
|
34
|
+
},
|
|
35
|
+
right: function right(rect, client) {
|
|
36
|
+
return Math.abs(rect.right - client.x);
|
|
37
|
+
},
|
|
38
|
+
bottom: function bottom(rect, client) {
|
|
39
|
+
return Math.abs(rect.bottom - client.y);
|
|
40
|
+
},
|
|
41
|
+
left: function left(rect, client) {
|
|
42
|
+
return Math.abs(client.x - rect.left);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var uniqueKey = /* @__PURE__ */ Symbol("closestEdge");
|
|
46
|
+
function attachClosestEdge(userData, _ref) {
|
|
47
|
+
var _entries$sort$0$edge, _entries$sort$;
|
|
48
|
+
var element = _ref.element, input = _ref.input, allowedEdges = _ref.allowedEdges;
|
|
49
|
+
var client = {
|
|
50
|
+
x: input.clientX,
|
|
51
|
+
y: input.clientY
|
|
52
|
+
};
|
|
53
|
+
var rect = element.getBoundingClientRect();
|
|
54
|
+
var entries = allowedEdges.map(function(edge) {
|
|
55
|
+
return {
|
|
56
|
+
edge,
|
|
57
|
+
value: getDistanceToEdge[edge](rect, client)
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
var addClosestEdge = (_entries$sort$0$edge = (_entries$sort$ = entries.sort(function(a, b) {
|
|
61
|
+
return a.value - b.value;
|
|
62
|
+
})[0]) === null || _entries$sort$ === void 0 ? void 0 : _entries$sort$.edge) !== null && _entries$sort$0$edge !== void 0 ? _entries$sort$0$edge : null;
|
|
63
|
+
return _objectSpread(_objectSpread({}, userData), {}, (0, import_defineProperty.default)({}, uniqueKey, addClosestEdge));
|
|
64
|
+
}
|
|
65
|
+
function extractClosestEdge(userData) {
|
|
66
|
+
var _ref2;
|
|
67
|
+
return (_ref2 = userData[uniqueKey]) !== null && _ref2 !== void 0 ? _ref2 : null;
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
attachClosestEdge,
|
|
71
|
+
extractClosestEdge
|
|
72
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from "react";
|
|
2
|
+
import type { Edge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
3
|
+
export interface ChildBlockWrapperProps {
|
|
4
|
+
label: string;
|
|
5
|
+
columns: number;
|
|
6
|
+
colSpan: number;
|
|
7
|
+
closestEdge: Edge | null;
|
|
8
|
+
isDragging: boolean;
|
|
9
|
+
hasSettings: boolean;
|
|
10
|
+
/** Forwarded to the drag handle button (pragmatic-dnd dragHandle target). */
|
|
11
|
+
dragHandleRef?: Ref<HTMLButtonElement>;
|
|
12
|
+
onDelete: () => void;
|
|
13
|
+
onDuplicate: () => void;
|
|
14
|
+
onColSpanChange: (span: number) => void;
|
|
15
|
+
onOpenSettings?: () => void;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const ChildBlockWrapper: import("react").ForwardRefExoticComponent<ChildBlockWrapperProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
|
+
//# sourceMappingURL=ChildBlockWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChildBlockWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/editor/ChildBlockWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uDAAuD,CAAC;AAQlF,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,6EAA6E;IAC7E,aAAa,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,mHAkF7B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface ColSpanControlProps {
|
|
2
|
+
colSpan: number;
|
|
3
|
+
columns: number;
|
|
4
|
+
onChange: (span: number) => void;
|
|
5
|
+
}
|
|
6
|
+
/** Contextual col-span picker — only meaningful inside a multi-column container. */
|
|
7
|
+
export declare function ColSpanControl({ colSpan, columns, onChange }: ColSpanControlProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ColSpanControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColSpanControl.d.ts","sourceRoot":"","sources":["../../../src/components/editor/ColSpanControl.tsx"],"names":[],"mappings":"AAMA,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,mBAAmB,kDA0CjF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { WrapperProps } from "../../lib/registry";
|
|
2
|
-
export declare function SectionWrapper({ sectionId, sectionType, status, dirty, index, isLast, definition, options, audiences, access, onAccessChange, onStatusChange, onSectionChange, onReorder, onRequestInsert, onDelete, onMoveSection, mainStatus, contentDiffersFromMain, isLocalOnly, children, }: WrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function SectionWrapper({ sectionId, sectionType, status, dirty, index, isLast, containerId, isContainerBlock, definition, options, audiences, access, onAccessChange, onStatusChange, onSectionChange, onReorder, onRequestInsert, onDelete, onMoveSection, onAddChild, mainStatus, contentDiffersFromMain, isLocalOnly, children, }: WrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=SectionWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/editor/SectionWrapper.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"SectionWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/editor/SectionWrapper.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,WAAW,EACX,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,SAAS,EACT,MAAM,EACN,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,QAAQ,EACR,aAAa,EACb,UAAU,EACV,UAAU,EACV,sBAAsB,EACtB,WAAW,EACX,QAAQ,GACT,EAAE,YAAY,2CAgTd"}
|
|
@@ -7,7 +7,11 @@ interface SettingsFormProps {
|
|
|
7
7
|
schema: SettingsSchema;
|
|
8
8
|
values: Record<string, unknown>;
|
|
9
9
|
onChange: (result: SettingsFormResult) => void;
|
|
10
|
+
tabs?: {
|
|
11
|
+
label: string;
|
|
12
|
+
fields: string[];
|
|
13
|
+
}[];
|
|
10
14
|
}
|
|
11
|
-
export declare function SettingsForm({ schema, values, onChange }: SettingsFormProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function SettingsForm({ schema, values, onChange, tabs }: SettingsFormProps): import("react/jsx-runtime").JSX.Element;
|
|
12
16
|
export {};
|
|
13
17
|
//# sourceMappingURL=SettingsForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsForm.d.ts","sourceRoot":"","sources":["../../../src/components/editor/SettingsForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsForm.d.ts","sourceRoot":"","sources":["../../../src/components/editor/SettingsForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,oBAAoB,CAAC;AAU3E,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,UAAU,iBAAiB;IACzB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;CAC9C;AAqJD,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CA2BjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableGrid.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/EditableGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQpE,UAAU,iBAAiB,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE;QAAE,UAAU,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS,CAAC;IAClF,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAC9B,KAAK,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,SAAS,GACV,EAAE,iBAAiB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"EditableGrid.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/EditableGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQpE,UAAU,iBAAiB,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE;QAAE,UAAU,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS,CAAC;IAClF,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAC9B,KAAK,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,SAAS,GACV,EAAE,iBAAiB,CAAC,CAAC,CAAC,2CAqFtB"}
|
|
@@ -3,7 +3,13 @@ interface IconPickerProps {
|
|
|
3
3
|
onSelect: (iconId: string | null) => void;
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
showRemove?: boolean;
|
|
6
|
+
/** Opt-in: render the None / Do-Don't mode toggle. Default false → grid-only. */
|
|
7
|
+
allowDoDont?: boolean;
|
|
8
|
+
/** Current per-item Do/Don't tag (only meaningful when allowDoDont). */
|
|
9
|
+
dodont?: "do" | "dont";
|
|
10
|
+
/** Commit a Do/Don't choice; pass undefined to clear the tag (None). */
|
|
11
|
+
onSelectDoDont?: (v: "do" | "dont" | undefined) => void;
|
|
6
12
|
}
|
|
7
|
-
export declare function IconPicker({ selected, onSelect, onClose, showRemove }: IconPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function IconPicker({ selected, onSelect, onClose, showRemove, allowDoDont, dodont, onSelectDoDont, }: IconPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
14
|
export {};
|
|
9
15
|
//# sourceMappingURL=IconPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconPicker.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/IconPicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconPicker.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/IconPicker.tsx"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iFAAiF;IACjF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wEAAwE;IACxE,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACvB,wEAAwE;IACxE,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACzD;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,UAAiB,EACjB,WAAmB,EACnB,MAAM,EACN,cAAc,GACf,EAAE,eAAe,2CA2HjB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { Section } from "../../../schemas/sections";
|
|
3
|
+
interface ContainerContent {
|
|
4
|
+
columns: number;
|
|
5
|
+
flow: string;
|
|
6
|
+
childDefaults?: Record<string, unknown>;
|
|
7
|
+
children: Section[];
|
|
8
|
+
}
|
|
9
|
+
export interface ContainerProps {
|
|
10
|
+
content: {
|
|
11
|
+
id?: string;
|
|
12
|
+
content: ContainerContent;
|
|
13
|
+
};
|
|
14
|
+
isEditMode: boolean;
|
|
15
|
+
onChange?: (content: unknown) => void;
|
|
16
|
+
openModal?: (title: string, content: ReactNode) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function Container({ content, isEditMode, onChange, openModal }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Container/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAgB3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAqGzD,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,gBAAgB,CAAA;KAAE,CAAC;IACpD,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;CACzD;AAkDD,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,2CA8KrF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface ChildLike {
|
|
2
|
+
type: string;
|
|
3
|
+
options?: Record<string, unknown>;
|
|
4
|
+
}
|
|
5
|
+
interface ContainerSettingsFormProps {
|
|
6
|
+
columns?: number;
|
|
7
|
+
flow?: string;
|
|
8
|
+
childDefaults?: Record<string, unknown>;
|
|
9
|
+
children?: ChildLike[];
|
|
10
|
+
onChange: (result: {
|
|
11
|
+
content: Record<string, unknown>;
|
|
12
|
+
options: Record<string, unknown>;
|
|
13
|
+
}) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function ContainerSettingsForm({ columns, flow, childDefaults, children, onChange, }: ContainerSettingsFormProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=ContainerSettingsForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContainerSettingsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Container/ContainerSettingsForm.tsx"],"names":[],"mappings":"AAMA,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,UAAU,0BAA0B;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;IACvB,QAAQ,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;CACpG;AAgBD,wBAAgB,qBAAqB,CAAC,EACpC,OAAW,EACX,IAAY,EACZ,aAAkB,EAClB,QAAa,EACb,QAAQ,GACT,EAAE,0BAA0B,2CAyE5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: import("../../..").SectionDefinition<{
|
|
2
|
+
type: "container";
|
|
3
|
+
content: {
|
|
4
|
+
children: import("../../..").Section<Record<string, unknown>>[];
|
|
5
|
+
columns: number;
|
|
6
|
+
flow: "row" | "column";
|
|
7
|
+
childDefaults?: Record<string, unknown> | undefined;
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Container/index.tsx"],"names":[],"mappings":";;;;;;;;;AAiCA,wBAiBG"}
|
|
@@ -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;
|
|
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;AAUhE,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;CACxB;AAED,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,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,KAAK,EACL,IAAW,EACX,SAAgB,EAChB,SAAiB,EACjB,cAA+C,EAC/C,aAA0C,EAC1C,aAA8B,EAC9B,QAAQ,EACR,aAAa,GACd,EAAE,KAAK,2CAyCP"}
|
|
@@ -2,10 +2,9 @@ export declare function IconListSettings({ icon: initialIcon, showLabel: initial
|
|
|
2
2
|
icon: string | null;
|
|
3
3
|
showLabel: boolean;
|
|
4
4
|
stackText: boolean;
|
|
5
|
-
onChange: (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
stackText: boolean;
|
|
5
|
+
onChange: (result: {
|
|
6
|
+
content: Record<string, unknown>;
|
|
7
|
+
options: Record<string, unknown>;
|
|
9
8
|
}) => void;
|
|
10
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
//# sourceMappingURL=IconListSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconListSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/IconListSettings.tsx"],"names":[],"mappings":"AAMA,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,gBAAgB,EAC3B,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE;QAAE,
|
|
1
|
+
{"version":3,"file":"IconListSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/IconListSettings.tsx"],"names":[],"mappings":"AAMA,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,gBAAgB,EAC3B,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;CACpG,2CAgEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA,wBAuBG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SingleMediaReference } from "../../../schemas/shared";
|
|
2
|
+
import type { LinkValue } from "../../../schemas/link";
|
|
3
|
+
export interface MediaBlockProps {
|
|
4
|
+
refValue: SingleMediaReference;
|
|
5
|
+
options: {
|
|
6
|
+
square?: boolean;
|
|
7
|
+
showCaption?: boolean;
|
|
8
|
+
border?: boolean;
|
|
9
|
+
objectFit?: "cover" | "contain";
|
|
10
|
+
};
|
|
11
|
+
/** Per-item link (viewer: already resolved to kind:"external" upstream). */
|
|
12
|
+
link?: LinkValue;
|
|
13
|
+
/** Per-item do/dont badge. */
|
|
14
|
+
dodont?: "do" | "dont";
|
|
15
|
+
isEditMode: boolean;
|
|
16
|
+
onRefChange?: (ref: SingleMediaReference) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function MediaBlock({ refValue, options, link, dodont, isEditMode, onRefChange }: MediaBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=MediaBlock.d.ts.map
|
|
@@ -0,0 +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,CAAC;AAQvD,MAAM,WAAW,eAAe;IAC9B,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,4EAA4E;IAC5E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,eAAe,2CAkFvG"}
|