@drawnagency/primitives 0.1.56 → 0.1.57
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/{chunk-KGYWQDBB.js → chunk-ICLXLWQ5.js} +9 -72
- package/dist/chunk-NSCT3AMV.js +32 -0
- package/dist/{chunk-EU6NZ4GS.js → chunk-PRKUXM7E.js} +23 -9
- package/dist/{chunk-7IAWF7LE.js → chunk-PYWS3MOJ.js} +12 -2
- package/dist/chunk-TG43X7JO.js +123 -0
- package/dist/chunk-VKAGMEKE.js +90 -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/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 +56 -48
- 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 +13 -0
- package/dist/lib/index.js +10 -7
- 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 +6 -0
- package/dist/lib/registry.d.ts +39 -0
- package/dist/lib/registry.d.ts.map +1 -1
- package/dist/lib/registry.js +26 -0
- package/dist/schemas/block.d.ts +20 -0
- package/dist/schemas/block.d.ts.map +1 -0
- package/dist/schemas/block.js +14 -0
- package/dist/schemas/index.js +8 -2
- 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/package.json +13 -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
|
@@ -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"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
declare const _default: import("../../..").SectionDefinition<{
|
|
2
|
-
type: "
|
|
2
|
+
type: "media";
|
|
3
3
|
content: {
|
|
4
|
-
|
|
5
|
-
media: ({
|
|
4
|
+
ref: {
|
|
6
5
|
imageId: string;
|
|
7
6
|
type: "image";
|
|
8
7
|
caption?: string | string[] | undefined;
|
|
@@ -22,33 +21,24 @@ declare const _default: import("../../..").SectionDefinition<{
|
|
|
22
21
|
autoplay?: boolean | undefined;
|
|
23
22
|
loop?: boolean | undefined;
|
|
24
23
|
muted?: boolean | undefined;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
doDont: "do" | "dont";
|
|
29
|
-
caption?: string | string[] | undefined;
|
|
30
|
-
background?: string | undefined;
|
|
31
|
-
invertFrom?: string | undefined;
|
|
32
|
-
border?: boolean | undefined;
|
|
33
|
-
objectFit?: "cover" | "contain" | undefined;
|
|
34
|
-
} | {
|
|
35
|
-
imageId: string;
|
|
36
|
-
type: "linkedImage";
|
|
24
|
+
};
|
|
25
|
+
link?: {
|
|
26
|
+
kind: "external";
|
|
37
27
|
href: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
28
|
+
target: "_self" | "_blank";
|
|
29
|
+
} | {
|
|
30
|
+
kind: "internal";
|
|
31
|
+
pageId: string;
|
|
32
|
+
target: "_self" | "_blank";
|
|
33
|
+
anchorSectionId?: string | null | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
dodont?: "do" | "dont" | undefined;
|
|
46
36
|
};
|
|
47
37
|
options: {
|
|
48
38
|
square?: boolean | undefined;
|
|
39
|
+
showCaption?: boolean | undefined;
|
|
49
40
|
border?: boolean | undefined;
|
|
50
|
-
|
|
51
|
-
showCaptions?: boolean | undefined;
|
|
41
|
+
objectFit?: "cover" | "contain" | undefined;
|
|
52
42
|
};
|
|
53
43
|
}>;
|
|
54
44
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Media/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,wBA4DG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Prose/index.tsx"],"names":[],"mappings":";;;;;;AAWA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Prose/index.tsx"],"names":[],"mappings":";;;;;;AAWA,wBAWG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spacer.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Spacer/Spacer.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,MAAM,4CAE7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Spacer/index.tsx"],"names":[],"mappings":";;;;AAUA,wBAOG"}
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
* array, so the two can no longer drift — previously they hand-maintained
|
|
7
7
|
* parallel 11-entry lists, and a section added to one but not the other would
|
|
8
8
|
* make the editor render a type that save rejects with a 400 (or vice versa).
|
|
9
|
+
*
|
|
10
|
+
* 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.
|
|
9
13
|
*/
|
|
10
14
|
export declare const allSectionDefs: (import("../..").SectionDefinition<{
|
|
11
15
|
type: "link_heading";
|
|
@@ -30,10 +34,9 @@ export declare const allSectionDefs: (import("../..").SectionDefinition<{
|
|
|
30
34
|
body: string;
|
|
31
35
|
};
|
|
32
36
|
}> | import("../..").SectionDefinition<{
|
|
33
|
-
type: "
|
|
37
|
+
type: "media";
|
|
34
38
|
content: {
|
|
35
|
-
|
|
36
|
-
media: ({
|
|
39
|
+
ref: {
|
|
37
40
|
imageId: string;
|
|
38
41
|
type: "image";
|
|
39
42
|
caption?: string | string[] | undefined;
|
|
@@ -53,44 +56,25 @@ export declare const allSectionDefs: (import("../..").SectionDefinition<{
|
|
|
53
56
|
autoplay?: boolean | undefined;
|
|
54
57
|
loop?: boolean | undefined;
|
|
55
58
|
muted?: boolean | undefined;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
doDont: "do" | "dont";
|
|
60
|
-
caption?: string | string[] | undefined;
|
|
61
|
-
background?: string | undefined;
|
|
62
|
-
invertFrom?: string | undefined;
|
|
63
|
-
border?: boolean | undefined;
|
|
64
|
-
objectFit?: "cover" | "contain" | undefined;
|
|
65
|
-
} | {
|
|
66
|
-
imageId: string;
|
|
67
|
-
type: "linkedImage";
|
|
59
|
+
};
|
|
60
|
+
link?: {
|
|
61
|
+
kind: "external";
|
|
68
62
|
href: string;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
63
|
+
target: "_self" | "_blank";
|
|
64
|
+
} | {
|
|
65
|
+
kind: "internal";
|
|
66
|
+
pageId: string;
|
|
67
|
+
target: "_self" | "_blank";
|
|
68
|
+
anchorSectionId?: string | null | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
dodont?: "do" | "dont" | undefined;
|
|
77
71
|
};
|
|
78
72
|
options: {
|
|
79
73
|
square?: boolean | undefined;
|
|
74
|
+
showCaption?: boolean | undefined;
|
|
80
75
|
border?: boolean | undefined;
|
|
81
|
-
|
|
82
|
-
showCaptions?: boolean | undefined;
|
|
76
|
+
objectFit?: "cover" | "contain" | undefined;
|
|
83
77
|
};
|
|
84
|
-
}> | import("../..").SectionDefinition<{
|
|
85
|
-
type: "split_content";
|
|
86
|
-
content: {
|
|
87
|
-
body: string;
|
|
88
|
-
imageId?: string | undefined;
|
|
89
|
-
};
|
|
90
|
-
options?: {
|
|
91
|
-
border?: boolean | undefined;
|
|
92
|
-
imagePosition?: "left" | "right" | undefined;
|
|
93
|
-
} | undefined;
|
|
94
78
|
}> | import("../..").SectionDefinition<{
|
|
95
79
|
type: "button";
|
|
96
80
|
content: {
|
|
@@ -127,88 +111,30 @@ export declare const allSectionDefs: (import("../..").SectionDefinition<{
|
|
|
127
111
|
showLabel?: boolean | undefined;
|
|
128
112
|
} | undefined;
|
|
129
113
|
}> | import("../..").SectionDefinition<{
|
|
130
|
-
type: "
|
|
114
|
+
type: "icon_list";
|
|
131
115
|
content: {
|
|
132
|
-
|
|
133
|
-
label: string;
|
|
134
|
-
text: string;
|
|
135
|
-
icon?: string | undefined;
|
|
136
|
-
}[];
|
|
137
|
-
dontItems: {
|
|
116
|
+
items: {
|
|
138
117
|
label: string;
|
|
139
118
|
text: string;
|
|
140
119
|
icon?: string | undefined;
|
|
120
|
+
dodont?: "do" | "dont" | undefined;
|
|
141
121
|
}[];
|
|
142
122
|
};
|
|
143
123
|
options?: {
|
|
124
|
+
icon?: string | null | undefined;
|
|
144
125
|
showLabel?: boolean | undefined;
|
|
145
126
|
stackText?: boolean | undefined;
|
|
146
127
|
} | undefined;
|
|
147
128
|
}> | import("../..").SectionDefinition<{
|
|
148
|
-
type: "
|
|
129
|
+
type: "container";
|
|
149
130
|
content: {
|
|
131
|
+
children: import("../..").Section<Record<string, unknown>>[];
|
|
150
132
|
columns: number;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
type: "image";
|
|
154
|
-
caption?: string | string[] | undefined;
|
|
155
|
-
background?: string | undefined;
|
|
156
|
-
invertFrom?: string | undefined;
|
|
157
|
-
border?: boolean | undefined;
|
|
158
|
-
objectFit?: "cover" | "contain" | undefined;
|
|
159
|
-
} | {
|
|
160
|
-
imageId: string;
|
|
161
|
-
type: "video";
|
|
162
|
-
caption?: string | string[] | undefined;
|
|
163
|
-
background?: string | undefined;
|
|
164
|
-
invertFrom?: string | undefined;
|
|
165
|
-
border?: boolean | undefined;
|
|
166
|
-
objectFit?: "cover" | "contain" | undefined;
|
|
167
|
-
poster?: string | undefined;
|
|
168
|
-
autoplay?: boolean | undefined;
|
|
169
|
-
loop?: boolean | undefined;
|
|
170
|
-
muted?: boolean | undefined;
|
|
171
|
-
} | {
|
|
172
|
-
imageId: string;
|
|
173
|
-
type: "doDontImage";
|
|
174
|
-
doDont: "do" | "dont";
|
|
175
|
-
caption?: string | string[] | undefined;
|
|
176
|
-
background?: string | undefined;
|
|
177
|
-
invertFrom?: string | undefined;
|
|
178
|
-
border?: boolean | undefined;
|
|
179
|
-
objectFit?: "cover" | "contain" | undefined;
|
|
180
|
-
} | {
|
|
181
|
-
imageId: string;
|
|
182
|
-
type: "linkedImage";
|
|
183
|
-
href: string;
|
|
184
|
-
caption?: string | string[] | undefined;
|
|
185
|
-
background?: string | undefined;
|
|
186
|
-
invertFrom?: string | undefined;
|
|
187
|
-
border?: boolean | undefined;
|
|
188
|
-
objectFit?: "cover" | "contain" | undefined;
|
|
189
|
-
target?: string | undefined;
|
|
190
|
-
linkText?: string | undefined;
|
|
191
|
-
})[];
|
|
192
|
-
};
|
|
193
|
-
options: {
|
|
194
|
-
square?: boolean | undefined;
|
|
195
|
-
border?: boolean | undefined;
|
|
196
|
-
crop?: boolean | undefined;
|
|
197
|
-
showCaptions?: boolean | undefined;
|
|
133
|
+
flow: "row" | "column";
|
|
134
|
+
childDefaults?: Record<string, unknown> | undefined;
|
|
198
135
|
};
|
|
199
136
|
}> | import("../..").SectionDefinition<{
|
|
200
|
-
type: "
|
|
201
|
-
content:
|
|
202
|
-
items: {
|
|
203
|
-
label: string;
|
|
204
|
-
text: string;
|
|
205
|
-
icon?: string | undefined;
|
|
206
|
-
}[];
|
|
207
|
-
};
|
|
208
|
-
options?: {
|
|
209
|
-
icon?: string | null | undefined;
|
|
210
|
-
showLabel?: boolean | undefined;
|
|
211
|
-
stackText?: boolean | undefined;
|
|
212
|
-
} | undefined;
|
|
137
|
+
type: "spacer";
|
|
138
|
+
content: Record<string, never>;
|
|
213
139
|
}>)[];
|
|
214
140
|
//# 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":"
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-schemas.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register-schemas.ts"],"names":[],"mappings":"AAUA,wBAAgB,uBAAuB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"register-schemas.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register-schemas.ts"],"names":[],"mappings":"AAUA,wBAAgB,uBAAuB,IAAI,MAAM,CAShD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface TabsProps {
|
|
8
|
+
tabs: TabItem[];
|
|
9
|
+
/** Initial active tab when uncontrolled. Defaults to the first tab. */
|
|
10
|
+
defaultTabId?: string;
|
|
11
|
+
/** When provided, the component is controlled by the parent. */
|
|
12
|
+
activeTabId?: string;
|
|
13
|
+
onTabChange?: (id: string) => void;
|
|
14
|
+
/**
|
|
15
|
+
* When true, the tab-bar row uses -mx-6 to break out of the parent's px-6 padding
|
|
16
|
+
* (e.g. EditorModal's content wrapper) and re-pads with px-6 so buttons stay aligned.
|
|
17
|
+
* The tab panel inherits the parent's padding unchanged.
|
|
18
|
+
* Use only when the parent container has px-6; leave false for noPadding contexts.
|
|
19
|
+
*/
|
|
20
|
+
fullBleedTabBar?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function Tabs({ tabs, defaultTabId, activeTabId, onTabChange, fullBleedTabBar }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=Tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,UAAU,SAAS;IACjB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,SAAS,2CAqChG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../../src/components/shell/EditorShell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../../src/components/shell/EditorShell.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAqEjD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAQxD,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAIhB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO,CAAC;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;QACxB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;KAAE,GAAG,IAAI,CAAC;CACjE;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,OAAO,EACP,YAAY,EACZ,MAAM,EACN,SAAS,EAAE,gBAAgB,EAC3B,YAAY,EACZ,WAAW,GACZ,EAAE,KAAK,2CAg6BP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteSettingsModal.d.ts","sourceRoot":"","sources":["../../../src/components/shell/SiteSettingsModal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,UAAU,KAAK;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,kBAAkB,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,iBAAiB,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO,CAAC;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;QACxB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;KAAE,GAAG,IAAI,CAAC;CACjE;
|
|
1
|
+
{"version":3,"file":"SiteSettingsModal.d.ts","sourceRoot":"","sources":["../../../src/components/shell/SiteSettingsModal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,UAAU,KAAK;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,kBAAkB,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,iBAAiB,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO,CAAC;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;QACxB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;KAAE,GAAG,IAAI,CAAC;CACjE;AAED,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,KAAK,2CA2FzI"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type BlockMove, type BlockMoveState } from "../../lib/block-move";
|
|
2
|
+
import type { LoadedSection } from "../../lib/loader";
|
|
3
|
+
import type { SiteIndex } from "../../schemas/site-config";
|
|
4
|
+
import type { SectionContent } from "../../schemas/sections";
|
|
5
|
+
export interface BlockMoveDispatchDeps {
|
|
6
|
+
getState: () => BlockMoveState;
|
|
7
|
+
setSections: (updater: (prev: LoadedSection[]) => LoadedSection[]) => void;
|
|
8
|
+
setSiteIndex: (updater: (prev: SiteIndex) => SiteIndex) => void;
|
|
9
|
+
persistence: {
|
|
10
|
+
markSectionDirty: (id: string, content: SectionContent) => void;
|
|
11
|
+
markIndexDirty: () => void;
|
|
12
|
+
removeSection: (id: string) => void;
|
|
13
|
+
};
|
|
14
|
+
isRemote: (id: string) => boolean;
|
|
15
|
+
scheduleDelete: (id: string) => void;
|
|
16
|
+
markLocalChanges: () => void;
|
|
17
|
+
/** Latest content for a section id, for markSectionDirty after the move. */
|
|
18
|
+
newSectionContent: (id: string, sections: LoadedSection[]) => SectionContent;
|
|
19
|
+
}
|
|
20
|
+
export declare function makeBlockMoveDispatch(deps: BlockMoveDispatchDeps): (move: BlockMove) => void;
|
|
21
|
+
//# sourceMappingURL=blockMoveDispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockMoveDispatch.d.ts","sourceRoot":"","sources":["../../../src/components/shell/blockMoveDispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,cAAc,CAAC;IAC/B,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,IAAI,CAAC;IAC3E,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,KAAK,IAAI,CAAC;IAChE,WAAW,EAAE;QACX,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;QAChE,cAAc,EAAE,MAAM,IAAI,CAAC;QAC3B,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;KACrC,CAAC;IACF,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,4EAA4E;IAC5E,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,cAAc,CAAC;CAC9E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,qBAAqB,IACnC,MAAM,SAAS,UAiB5C"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Edge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
2
|
+
type AllowedEdges = Edge[];
|
|
3
|
+
export interface UseBlockDndArgs {
|
|
4
|
+
blockId: string;
|
|
5
|
+
containerId: string;
|
|
6
|
+
index: number;
|
|
7
|
+
isContainer: boolean;
|
|
8
|
+
/** ["left","right"] inside a row container, ["top","bottom"] at root */
|
|
9
|
+
allowedEdges: AllowedEdges;
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Wires a block as a unified drag source + drop target. Manages only this block's
|
|
14
|
+
* local hover edge + dragging flag — the actual move dispatch is centralized in the
|
|
15
|
+
* EditorContent monitor (a later task), so nested targets never double-fire. The edge
|
|
16
|
+
* indicator is shown only when this element is the innermost drop target.
|
|
17
|
+
*
|
|
18
|
+
* Callers must pass a stable `allowedEdges` array (module-level constant or memoized)
|
|
19
|
+
* to avoid re-subscribing on every render.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useBlockDnd({ blockId, containerId, index, isContainer, allowedEdges, enabled }: UseBlockDndArgs): {
|
|
22
|
+
dragRef: import("react").RefObject<HTMLDivElement | null>;
|
|
23
|
+
handleRef: import("react").RefObject<HTMLButtonElement | null>;
|
|
24
|
+
closestEdge: import("@atlaskit/pragmatic-drag-and-drop-hitbox/dist/types/types").Edge | null;
|
|
25
|
+
isDragging: boolean;
|
|
26
|
+
};
|
|
27
|
+
export interface UseBlockDropZoneArgs {
|
|
28
|
+
containerId: string;
|
|
29
|
+
index: number;
|
|
30
|
+
/** When set, the zone is a column-targeted drop (ghost/spacer): place at this 1-based column. */
|
|
31
|
+
toColumn?: number;
|
|
32
|
+
allowedEdges: AllowedEdges;
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A drop-target-ONLY zone (not draggable) — used for an empty container's first-drop
|
|
37
|
+
* area, where there are no child cells to act as targets. It advertises
|
|
38
|
+
* `{ dropContainerId, index }` and shows an edge indicator only when it is the innermost
|
|
39
|
+
* drop target. The actual move dispatch is centralized in the EditorContent monitor.
|
|
40
|
+
*
|
|
41
|
+
* Callers must pass a stable `allowedEdges` array (module-level constant or memoized).
|
|
42
|
+
*/
|
|
43
|
+
export declare function useBlockDropZone({ containerId, index, toColumn, allowedEdges, enabled }: UseBlockDropZoneArgs): {
|
|
44
|
+
dropRef: import("react").RefObject<HTMLDivElement | null>;
|
|
45
|
+
closestEdge: import("@atlaskit/pragmatic-drag-and-drop-hitbox/dist/types/types").Edge | null;
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=useBlockDnd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBlockDnd.d.ts","sourceRoot":"","sources":["../../src/hooks/useBlockDnd.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uDAAuD,CAAC;AAGlF,KAAK,YAAY,GAAG,IAAI,EAAE,CAAC;AAE3B,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,wEAAwE;IACxE,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,eAAe;;;;;EA0D/G;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,iGAAiG;IACjG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,oBAAoB;;;EAyC7G"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AUDIENCE_COOKIE,
|
|
3
|
+
AUDIENCE_MAX_AGE_SECONDS,
|
|
4
|
+
LastOwnerError,
|
|
5
|
+
SESSION_COOKIE,
|
|
6
|
+
SESSION_MAX_AGE_SECONDS,
|
|
7
|
+
setSessionCookie,
|
|
8
|
+
signAudienceToken,
|
|
9
|
+
signSessionToken,
|
|
10
|
+
verifyAudienceToken,
|
|
11
|
+
verifySessionToken
|
|
12
|
+
} from "./chunk-XTK4BR27.js";
|
|
13
|
+
import {
|
|
14
|
+
EXT_TO_MIME,
|
|
15
|
+
MIME_TO_EXT,
|
|
16
|
+
ProcessingQueue,
|
|
17
|
+
displayFilename,
|
|
18
|
+
displayFilenameExt,
|
|
19
|
+
formatFileSize,
|
|
20
|
+
generateVideoPoster,
|
|
21
|
+
getMediaProvider,
|
|
22
|
+
hashFileBuffer,
|
|
23
|
+
mimeToExt,
|
|
24
|
+
resolveManifestReferences,
|
|
25
|
+
resolveMedia,
|
|
26
|
+
sanitizeMediaName,
|
|
27
|
+
setMediaProvider
|
|
28
|
+
} from "./chunk-L2JJFOXD.js";
|
|
1
29
|
import {
|
|
2
30
|
AudienceColorSchema,
|
|
3
31
|
AudienceNameSchema,
|
|
@@ -5,8 +33,9 @@ import {
|
|
|
5
33
|
LinkTargetSchema,
|
|
6
34
|
LinkValueSchema,
|
|
7
35
|
MediaGridOptionsSchema,
|
|
36
|
+
isSafeHref,
|
|
8
37
|
slugifyAudienceName
|
|
9
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PYWS3MOJ.js";
|
|
10
39
|
import {
|
|
11
40
|
AudienceSchema,
|
|
12
41
|
RoleSchema,
|
|
@@ -33,7 +62,13 @@ import {
|
|
|
33
62
|
safeRedirect,
|
|
34
63
|
sanitizeHtml,
|
|
35
64
|
toSectionId
|
|
36
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-PRKUXM7E.js";
|
|
66
|
+
import "./chunk-TG43X7JO.js";
|
|
67
|
+
import {
|
|
68
|
+
isSameOriginRequest,
|
|
69
|
+
requireSessionSecret,
|
|
70
|
+
safeNextPath
|
|
71
|
+
} from "./chunk-S2L3BPLS.js";
|
|
37
72
|
import {
|
|
38
73
|
ColorItemSchema,
|
|
39
74
|
ColorSpaceSchema,
|
|
@@ -45,8 +80,24 @@ import {
|
|
|
45
80
|
PageStatusSchema,
|
|
46
81
|
RESERVED_SLUGS,
|
|
47
82
|
SectionMetaSchema,
|
|
83
|
+
SingleMediaReferenceSchema,
|
|
48
84
|
SiteConfigSchema,
|
|
49
85
|
TextLineSchema,
|
|
86
|
+
getSectionContentSchema,
|
|
87
|
+
getSectionSchema,
|
|
88
|
+
normalizeSiteIndex
|
|
89
|
+
} from "./chunk-ICLXLWQ5.js";
|
|
90
|
+
import {
|
|
91
|
+
ImageManifestSchema,
|
|
92
|
+
MediaConfigSchema,
|
|
93
|
+
MediaItemSchema,
|
|
94
|
+
VariantSchema
|
|
95
|
+
} from "./chunk-DKOUFIP6.js";
|
|
96
|
+
import "./chunk-NSCT3AMV.js";
|
|
97
|
+
import {
|
|
98
|
+
env
|
|
99
|
+
} from "./chunk-WKZ7OENC.js";
|
|
100
|
+
import {
|
|
50
101
|
clearRegistry,
|
|
51
102
|
createRegistry,
|
|
52
103
|
defineSection,
|
|
@@ -54,54 +105,9 @@ import {
|
|
|
54
105
|
getAllSections,
|
|
55
106
|
getSchema,
|
|
56
107
|
getSection,
|
|
57
|
-
getSectionContentSchema,
|
|
58
|
-
getSectionSchema,
|
|
59
|
-
normalizeSiteIndex,
|
|
60
108
|
registerSchema,
|
|
61
109
|
registerSection
|
|
62
|
-
} from "./chunk-
|
|
63
|
-
import {
|
|
64
|
-
AUDIENCE_COOKIE,
|
|
65
|
-
AUDIENCE_MAX_AGE_SECONDS,
|
|
66
|
-
LastOwnerError,
|
|
67
|
-
SESSION_COOKIE,
|
|
68
|
-
SESSION_MAX_AGE_SECONDS,
|
|
69
|
-
setSessionCookie,
|
|
70
|
-
signAudienceToken,
|
|
71
|
-
signSessionToken,
|
|
72
|
-
verifyAudienceToken,
|
|
73
|
-
verifySessionToken
|
|
74
|
-
} from "./chunk-XTK4BR27.js";
|
|
75
|
-
import {
|
|
76
|
-
isSameOriginRequest,
|
|
77
|
-
requireSessionSecret,
|
|
78
|
-
safeNextPath
|
|
79
|
-
} from "./chunk-S2L3BPLS.js";
|
|
80
|
-
import {
|
|
81
|
-
env
|
|
82
|
-
} from "./chunk-WKZ7OENC.js";
|
|
83
|
-
import {
|
|
84
|
-
EXT_TO_MIME,
|
|
85
|
-
MIME_TO_EXT,
|
|
86
|
-
ProcessingQueue,
|
|
87
|
-
displayFilename,
|
|
88
|
-
displayFilenameExt,
|
|
89
|
-
formatFileSize,
|
|
90
|
-
generateVideoPoster,
|
|
91
|
-
getMediaProvider,
|
|
92
|
-
hashFileBuffer,
|
|
93
|
-
mimeToExt,
|
|
94
|
-
resolveManifestReferences,
|
|
95
|
-
resolveMedia,
|
|
96
|
-
sanitizeMediaName,
|
|
97
|
-
setMediaProvider
|
|
98
|
-
} from "./chunk-L2JJFOXD.js";
|
|
99
|
-
import {
|
|
100
|
-
ImageManifestSchema,
|
|
101
|
-
MediaConfigSchema,
|
|
102
|
-
MediaItemSchema,
|
|
103
|
-
VariantSchema
|
|
104
|
-
} from "./chunk-DKOUFIP6.js";
|
|
110
|
+
} from "./chunk-VKAGMEKE.js";
|
|
105
111
|
|
|
106
112
|
// src/storage/types.ts
|
|
107
113
|
var StorageConflictError = class extends Error {
|
|
@@ -143,6 +149,7 @@ export {
|
|
|
143
149
|
SESSION_MAX_AGE_SECONDS,
|
|
144
150
|
SectionMetaSchema,
|
|
145
151
|
SessionSchema,
|
|
152
|
+
SingleMediaReferenceSchema,
|
|
146
153
|
SiteConfigSchema,
|
|
147
154
|
SiteUserSchema,
|
|
148
155
|
StorageConflictError,
|
|
@@ -176,6 +183,7 @@ export {
|
|
|
176
183
|
getSectionSchema,
|
|
177
184
|
gridColsClass,
|
|
178
185
|
hashFileBuffer,
|
|
186
|
+
isSafeHref,
|
|
179
187
|
isSameOriginRequest,
|
|
180
188
|
loadSiteContent,
|
|
181
189
|
loadStaticSiteContent,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Edge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
2
|
+
/** The page root behaves like a single-column container (spec §3). */
|
|
3
|
+
export declare const ROOT_CONTAINER_ID = "__root__";
|
|
4
|
+
export interface BlockDragData {
|
|
5
|
+
dragType: "block";
|
|
6
|
+
blockId: string;
|
|
7
|
+
/** Container the block currently lives in: ROOT_CONTAINER_ID or a container section id. */
|
|
8
|
+
containerId: string;
|
|
9
|
+
index: number;
|
|
10
|
+
/** True if the dragged block is itself a container (used for the depth guard). */
|
|
11
|
+
isContainer: boolean;
|
|
12
|
+
[key: string | symbol]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface BlockDropData {
|
|
15
|
+
dropContainerId: string;
|
|
16
|
+
index: number;
|
|
17
|
+
/** When set, a column-targeted drop (ghost/spacer cell): place at this 1-based grid column. */
|
|
18
|
+
toColumn?: number;
|
|
19
|
+
[key: string | symbol]: unknown;
|
|
20
|
+
}
|
|
21
|
+
export declare function buildBlockDragData(args: {
|
|
22
|
+
blockId: string;
|
|
23
|
+
containerId: string;
|
|
24
|
+
index: number;
|
|
25
|
+
isContainer: boolean;
|
|
26
|
+
}): BlockDragData;
|
|
27
|
+
export declare function buildBlockDropData(args: {
|
|
28
|
+
dropContainerId: string;
|
|
29
|
+
index: number;
|
|
30
|
+
toColumn?: number;
|
|
31
|
+
}): BlockDropData;
|
|
32
|
+
export declare function isBlockDragData(data: Record<string | symbol, unknown>): data is BlockDragData;
|
|
33
|
+
/**
|
|
34
|
+
* May `source` drop into `dropContainerId`?
|
|
35
|
+
* - A container block may only land at the page root (v1 one-level nesting → no
|
|
36
|
+
* container-in-container; MAX_BLOCK_DEPTH=2).
|
|
37
|
+
* - Nothing may drop onto itself.
|
|
38
|
+
*/
|
|
39
|
+
export declare function canDropBlock(source: BlockDragData, dropContainerId: string): boolean;
|
|
40
|
+
/** Closest edge → insertion index (before = index, after = index + 1). */
|
|
41
|
+
export declare function resolveDropIndex(targetIndex: number, edge: Edge | null): number;
|
|
42
|
+
//# sourceMappingURL=block-dnd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-dnd.d.ts","sourceRoot":"","sources":["../../src/lib/block-dnd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uDAAuD,CAAC;AAElF,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,WAAW,EAAE,OAAO,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;CACtB,GAAG,aAAa,CAEhB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAErH;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,IAAI,aAAa,CAE7F;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAIpF;AAED,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,CAG/E"}
|