@drawnagency/primitives 0.1.55 → 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/auth/cookies.d.ts.map +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-24SUF2BC.js → chunk-ICLXLWQ5.js} +13 -74
- package/dist/chunk-NSCT3AMV.js +32 -0
- package/dist/{chunk-KDGYHU36.js → chunk-PRKUXM7E.js} +35 -10
- package/dist/{chunk-PUNXQK4M.js → chunk-PYWS3MOJ.js} +12 -2
- package/dist/chunk-TG43X7JO.js +123 -0
- package/dist/chunk-VKAGMEKE.js +90 -0
- package/dist/{chunk-B5VYSTPB.js → chunk-XTK4BR27.js} +1 -1
- 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 +140 -0
- package/dist/components/sections/all-sections.d.ts.map +1 -0
- package/dist/components/sections/register-schemas.d.ts.map +1 -1
- package/dist/components/sections/register.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 +2 -1
- 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/hooks/useEditorPublish.d.ts +2 -1
- package/dist/hooks/useEditorPublish.d.ts.map +1 -1
- package/dist/index.js +69 -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 +12 -1
- package/dist/lib/dexie.d.ts.map +1 -1
- package/dist/lib/dexie.js +28 -3
- 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 -2
- package/dist/lib/registry.d.ts.map +1 -1
- package/dist/lib/registry.js +26 -0
- package/dist/lib/sanitize.d.ts.map +1 -1
- 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 +10 -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 +31 -0
- package/dist/schemas/shared.d.ts.map +1 -1
- package/dist/storage/index.d.ts +1 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/types.d.ts +13 -1
- package/dist/storage/types.d.ts.map +1 -1
- package/package.json +13 -1
- package/src/auth/cookies.ts +6 -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 +40 -0
- package/src/components/sections/register-schemas.ts +13 -18
- package/src/components/sections/register.ts +3 -17
- package/src/components/shared/Tabs.tsx +63 -0
- package/src/components/shell/EditorShell.tsx +147 -18
- 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/hooks/useEditorPublish.ts +17 -4
- 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 +47 -0
- package/src/lib/loader.ts +16 -4
- package/src/lib/migrate-sections-transform.ts +147 -0
- package/src/lib/registry.ts +48 -2
- package/src/lib/sanitize.ts +22 -1
- 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 +16 -0
- package/src/schemas/site-config.ts +3 -3
- package/src/storage/index.ts +1 -0
- package/src/storage/types.ts +17 -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
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,10 +62,17 @@ 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,
|
|
75
|
+
FontNameSchema,
|
|
40
76
|
HexColorSchema,
|
|
41
77
|
IndexSchema,
|
|
42
78
|
MediaReferenceSchema,
|
|
@@ -44,8 +80,24 @@ import {
|
|
|
44
80
|
PageStatusSchema,
|
|
45
81
|
RESERVED_SLUGS,
|
|
46
82
|
SectionMetaSchema,
|
|
83
|
+
SingleMediaReferenceSchema,
|
|
47
84
|
SiteConfigSchema,
|
|
48
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 {
|
|
49
101
|
clearRegistry,
|
|
50
102
|
createRegistry,
|
|
51
103
|
defineSection,
|
|
@@ -53,54 +105,19 @@ import {
|
|
|
53
105
|
getAllSections,
|
|
54
106
|
getSchema,
|
|
55
107
|
getSection,
|
|
56
|
-
getSectionContentSchema,
|
|
57
|
-
getSectionSchema,
|
|
58
|
-
normalizeSiteIndex,
|
|
59
108
|
registerSchema,
|
|
60
109
|
registerSection
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
verifySessionToken
|
|
73
|
-
} from "./chunk-B5VYSTPB.js";
|
|
74
|
-
import {
|
|
75
|
-
isSameOriginRequest,
|
|
76
|
-
requireSessionSecret,
|
|
77
|
-
safeNextPath
|
|
78
|
-
} from "./chunk-S2L3BPLS.js";
|
|
79
|
-
import {
|
|
80
|
-
env
|
|
81
|
-
} from "./chunk-WKZ7OENC.js";
|
|
82
|
-
import {
|
|
83
|
-
EXT_TO_MIME,
|
|
84
|
-
MIME_TO_EXT,
|
|
85
|
-
ProcessingQueue,
|
|
86
|
-
displayFilename,
|
|
87
|
-
displayFilenameExt,
|
|
88
|
-
formatFileSize,
|
|
89
|
-
generateVideoPoster,
|
|
90
|
-
getMediaProvider,
|
|
91
|
-
hashFileBuffer,
|
|
92
|
-
mimeToExt,
|
|
93
|
-
resolveManifestReferences,
|
|
94
|
-
resolveMedia,
|
|
95
|
-
sanitizeMediaName,
|
|
96
|
-
setMediaProvider
|
|
97
|
-
} from "./chunk-L2JJFOXD.js";
|
|
98
|
-
import {
|
|
99
|
-
ImageManifestSchema,
|
|
100
|
-
MediaConfigSchema,
|
|
101
|
-
MediaItemSchema,
|
|
102
|
-
VariantSchema
|
|
103
|
-
} from "./chunk-DKOUFIP6.js";
|
|
110
|
+
} from "./chunk-VKAGMEKE.js";
|
|
111
|
+
|
|
112
|
+
// src/storage/types.ts
|
|
113
|
+
var StorageConflictError = class extends Error {
|
|
114
|
+
constructor(currentVersion) {
|
|
115
|
+
super("Draft has been modified since it was loaded");
|
|
116
|
+
this.currentVersion = currentVersion;
|
|
117
|
+
this.name = "StorageConflictError";
|
|
118
|
+
}
|
|
119
|
+
currentVersion;
|
|
120
|
+
};
|
|
104
121
|
export {
|
|
105
122
|
AUDIENCE_COOKIE,
|
|
106
123
|
AUDIENCE_MAX_AGE_SECONDS,
|
|
@@ -111,6 +128,7 @@ export {
|
|
|
111
128
|
ColorSpaceSchema,
|
|
112
129
|
DEFAULT_LINK,
|
|
113
130
|
EXT_TO_MIME,
|
|
131
|
+
FontNameSchema,
|
|
114
132
|
HexColorSchema,
|
|
115
133
|
ImageManifestSchema,
|
|
116
134
|
IndexSchema,
|
|
@@ -131,8 +149,10 @@ export {
|
|
|
131
149
|
SESSION_MAX_AGE_SECONDS,
|
|
132
150
|
SectionMetaSchema,
|
|
133
151
|
SessionSchema,
|
|
152
|
+
SingleMediaReferenceSchema,
|
|
134
153
|
SiteConfigSchema,
|
|
135
154
|
SiteUserSchema,
|
|
155
|
+
StorageConflictError,
|
|
136
156
|
TextLineSchema,
|
|
137
157
|
VariantSchema,
|
|
138
158
|
buildGoogleFontsUrl,
|
|
@@ -163,6 +183,7 @@ export {
|
|
|
163
183
|
getSectionSchema,
|
|
164
184
|
gridColsClass,
|
|
165
185
|
hashFileBuffer,
|
|
186
|
+
isSafeHref,
|
|
166
187
|
isSameOriginRequest,
|
|
167
188
|
loadSiteContent,
|
|
168
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"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { LoadedSection } from "./loader";
|
|
2
|
+
import type { SiteIndex } from "../schemas/site-config";
|
|
3
|
+
export interface BlockMoveState {
|
|
4
|
+
sections: LoadedSection[];
|
|
5
|
+
index: SiteIndex;
|
|
6
|
+
rootPageId: string;
|
|
7
|
+
}
|
|
8
|
+
export interface BlockMove {
|
|
9
|
+
blockId: string;
|
|
10
|
+
fromContainerId: string;
|
|
11
|
+
fromIndex: number;
|
|
12
|
+
toContainerId: string;
|
|
13
|
+
/** Raw insertion index in the ORIGINAL (pre-removal) array, 0..len — as resolveDropIndex returns. applyBlockMove shifts it for same-container moves. */
|
|
14
|
+
toIndex: number;
|
|
15
|
+
/** When set, place at this 1-based grid column (ghost/spacer drop) instead of toIndex. */
|
|
16
|
+
toColumn?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface BlockMoveEffects {
|
|
19
|
+
markDirtySectionIds: string[];
|
|
20
|
+
indexDirty: boolean;
|
|
21
|
+
deleteSectionIds: string[];
|
|
22
|
+
createSectionIds: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface BlockMoveResult {
|
|
25
|
+
sections: LoadedSection[];
|
|
26
|
+
index: SiteIndex;
|
|
27
|
+
effects: BlockMoveEffects;
|
|
28
|
+
changed: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare function applyBlockMove(state: BlockMoveState, move: BlockMove, newId?: () => string): BlockMoveResult;
|
|
31
|
+
//# sourceMappingURL=block-move.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-move.d.ts","sourceRoot":"","sources":["../../src/lib/block-move.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,wBAAwB,CAAC;AAKrE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,wJAAwJ;IACxJ,OAAO,EAAE,MAAM,CAAC;IAChB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AA2BD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,SAAS,EACf,KAAK,GAAE,MAAM,MAAqB,GACjC,eAAe,CAsFjB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Max columns a container exposes in v1 (covers halves/thirds/sixths via spans). */
|
|
2
|
+
export declare const MAX_CONTAINER_COLUMNS = 6;
|
|
3
|
+
/**
|
|
4
|
+
* Column count -> grid-cols classes that collapse by the CONTAINER's own width
|
|
5
|
+
* (Tailwind 4 container-query `@` variants), not the viewport. Full static
|
|
6
|
+
* strings so Tailwind's source scan generates them (no interpolation/purge gap).
|
|
7
|
+
*/
|
|
8
|
+
export declare const containerGridClass: Record<number, string>;
|
|
9
|
+
/**
|
|
10
|
+
* Per-child colSpan -> col-span classes, keyed [columns][span]. A child's span
|
|
11
|
+
* must clamp to the columns AVAILABLE at each container-query breakpoint, and the
|
|
12
|
+
* collapse curve differs per column count — so the class depends on BOTH the
|
|
13
|
+
* parent's column count and the child's span, not span alone. At every breakpoint
|
|
14
|
+
* the emitted span = min(span, columns-at-that-breakpoint), guaranteeing a span
|
|
15
|
+
* never exceeds the tracks that exist (no phantom column). Span 1 needs no class.
|
|
16
|
+
* Full static strings so Tailwind's source scan generates them.
|
|
17
|
+
*/
|
|
18
|
+
export declare const colSpanClass: Record<number, Record<number, string>>;
|
|
19
|
+
/** Gap token -> Tailwind gap class. Retained as a utility; the container now uses a
|
|
20
|
+
* fixed gap (the Gap setting was removed), but the map stays for general use. */
|
|
21
|
+
export declare const gapClass: Record<string, string>;
|
|
22
|
+
/**
|
|
23
|
+
* Per-column-count container-query classes that HIDE a spacer cell once the container
|
|
24
|
+
* collapses to a single column (mobile). Mirrors `containerGridClass`'s collapse curve:
|
|
25
|
+
* hidden at base width, shown at the first breakpoint where the grid has ≥2 columns.
|
|
26
|
+
* Static strings so Tailwind's source scan generates them.
|
|
27
|
+
*/
|
|
28
|
+
export declare const spacerHiddenClass: Record<number, string>;
|
|
29
|
+
//# sourceMappingURL=container-grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-grid.d.ts","sourceRoot":"","sources":["../../src/lib/container-grid.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOrD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAO/D,CAAC;AAEF;kFACkF;AAClF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAK3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOpD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { Section } from "../schemas/sections";
|
|
3
|
+
/** A container is any block whose `content.children` is an array. */
|
|
4
|
+
export declare function getContainerChildren(block: Section): Section[];
|
|
5
|
+
export declare function reorderChild(container: Section, from: number, to: number): Section;
|
|
6
|
+
/**
|
|
7
|
+
* Block types insertable as a container CHILD — excludes `container` itself
|
|
8
|
+
* (v1 enforces one level of container nesting). Shared so the depth guard has a
|
|
9
|
+
* single, testable source of truth (the container toolbar's "+" picker uses it).
|
|
10
|
+
*/
|
|
11
|
+
export declare function childInsertableTypes(): {
|
|
12
|
+
type: string;
|
|
13
|
+
label: string;
|
|
14
|
+
icon: ReactNode;
|
|
15
|
+
}[];
|
|
16
|
+
export declare function insertChildAt(container: Section, child: Section, index: number): Section;
|
|
17
|
+
export declare function removeChildAt(container: Section, index: number): {
|
|
18
|
+
container: Section;
|
|
19
|
+
removed: Section | null;
|
|
20
|
+
};
|
|
21
|
+
export declare function duplicateChildAt(container: Section, index: number, newId: () => string): Section;
|
|
22
|
+
/** Set a child's colSpan, clamped to the container's columns. Span 1 removes `layout`. */
|
|
23
|
+
export declare function setChildColSpan(container: Section, index: number, span: number): Section;
|
|
24
|
+
/** A spacer is the empty gap-filler block. */
|
|
25
|
+
export declare function isSpacer(child: Section): boolean;
|
|
26
|
+
/** Mint a fresh empty spacer block. */
|
|
27
|
+
export declare function makeSpacer(newId: () => string): Section;
|
|
28
|
+
/** Grid tracks occupied by a container's children (real child = clamped colSpan, spacer = 1). */
|
|
29
|
+
export declare function occupiedColumns(children: Section[], columns: number): number;
|
|
30
|
+
/** Remove spacer children after the last non-spacer child (a trailing gap is meaningless). */
|
|
31
|
+
export declare function trimTrailingSpacers(container: Section): Section;
|
|
32
|
+
/**
|
|
33
|
+
* Place `block` at 1-based grid column `K` of `container`. If a spacer already holds column
|
|
34
|
+
* `K`, replace it; otherwise pad intervening empty columns with spacers and append the block.
|
|
35
|
+
* Trailing spacers are trimmed. `columns` clamps colSpan accounting; `newId` mints spacer ids.
|
|
36
|
+
*
|
|
37
|
+
* Precondition: `K` addresses an EMPTY column — a trailing empty column or one held by a
|
|
38
|
+
* spacer. The editor's drop targets (ghost/spacer cells) only ever address empty columns, so
|
|
39
|
+
* callers never target a column consumed by a real block. Defensive: out-of-range `K`
|
|
40
|
+
* (`K < 1 || K > columns`) or a spacer `block` returns the container unchanged. A `block` with
|
|
41
|
+
* `colSpan > 1` dropped onto a single spacer keeps its span; CSS grid reflows it (v1).
|
|
42
|
+
*/
|
|
43
|
+
export declare function placeBlockAtColumn(container: Section, block: Section, K: number, columns: number, newId: () => string): Section;
|
|
44
|
+
//# sourceMappingURL=container-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-ops.d.ts","sourceRoot":"","sources":["../../src/lib/container-ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAWnD,qEAAqE;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AAgB,kBAAkB,CAChC,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,OAAO,EACd,CAAC,EAAE,MAAM,EACT,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,MAAM,GAClB,OAAO,CAiBT"}
|
package/dist/lib/dexie.d.ts
CHANGED
|
@@ -57,13 +57,24 @@ export declare function getBranchShas(): Promise<{
|
|
|
57
57
|
mainSha: string | null;
|
|
58
58
|
} | null>;
|
|
59
59
|
export declare function getDeletedSections(): Promise<string[]>;
|
|
60
|
-
export declare function cacheContent(sha: string, sections: LoadedSection[], index: SiteIndex, siteConfig: Record<string, unknown
|
|
60
|
+
export declare function cacheContent(sha: string, sections: LoadedSection[], index: SiteIndex, siteConfig: Record<string, unknown>, diff?: {
|
|
61
|
+
savedBranchSha: string | null;
|
|
62
|
+
changedSectionIds: string[];
|
|
63
|
+
mainIndex: SiteIndex | null;
|
|
64
|
+
}): Promise<void>;
|
|
61
65
|
export declare function getCachedContent(): Promise<{
|
|
62
66
|
sha: string;
|
|
63
67
|
sections: LoadedSection[];
|
|
64
68
|
index: SiteIndex;
|
|
65
69
|
siteConfig: Record<string, unknown>;
|
|
70
|
+
savedBranchSha: string | null;
|
|
71
|
+
changedSectionIds: string[];
|
|
72
|
+
mainIndex: SiteIndex | null;
|
|
66
73
|
} | null>;
|
|
74
|
+
/** Invalidate only the cached content snapshot (e.g. after a publish removes the
|
|
75
|
+
* draft), forcing the next editor load to refetch rather than serve stale diff
|
|
76
|
+
* state. Narrower than discardSavedChanges, which also clears index/meta/config. */
|
|
77
|
+
export declare function clearContentCache(): Promise<void>;
|
|
67
78
|
export declare function persistMediaManifest(manifest: MediaManifest): Promise<void>;
|
|
68
79
|
export declare function getMediaManifest(): Promise<MediaManifest | null>;
|
|
69
80
|
export declare function addPendingMediaItem(item: MediaItem, localUrls?: Record<string, string>, blobs?: Record<string, Blob>): Promise<void>;
|
package/dist/lib/dexie.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dexie.d.ts","sourceRoot":"","sources":["../../src/lib/dexie.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAe,UAAU,EAAQ,MAAM,wBAAwB,CAAC;AACvF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"dexie.d.ts","sourceRoot":"","sources":["../../src/lib/dexie.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAe,UAAU,EAAQ,MAAM,wBAAwB,CAAC;AACvF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AA4K/D,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED,wBAAsB,oBAAoB,IAAI,OAAO,CAAC;IAAE,eAAe,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAcxF;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC;IACnD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACzC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC,CAsBD;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAUzD;AAED,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,eAAe,GAAE,MAAM,EAAO,GAAG,OAAO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,CAAC,CAGf;AAED,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAGjE;AAED,wBAAsB,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAGjG;AAED,wBAAsB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,CAG3F;AAED,wBAAsB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE;AAED,wBAAsB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvE;AAED,wBAAsB,0BAA0B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1E;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAGlE;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAMvD;AAMD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EAAE,EACjB,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
package/dist/lib/dexie.js
CHANGED
|
@@ -74,6 +74,19 @@ var EditorDatabase = class extends Dexie {
|
|
|
74
74
|
await tx.table("siteIndex").clear();
|
|
75
75
|
await tx.table("contentCache").clear();
|
|
76
76
|
});
|
|
77
|
+
this.version(8).stores({
|
|
78
|
+
sections: "sectionId",
|
|
79
|
+
siteIndex: "key",
|
|
80
|
+
meta: "key",
|
|
81
|
+
siteConfig: "key",
|
|
82
|
+
contentCache: "key",
|
|
83
|
+
mediaManifest: "key",
|
|
84
|
+
pendingMedia: "id",
|
|
85
|
+
pendingMediaDeletions: "id"
|
|
86
|
+
}).upgrade(async (tx) => {
|
|
87
|
+
await tx.table("siteIndex").clear();
|
|
88
|
+
await tx.table("contentCache").clear();
|
|
89
|
+
});
|
|
77
90
|
}
|
|
78
91
|
};
|
|
79
92
|
var db = null;
|
|
@@ -263,7 +276,7 @@ async function getDeletedSections() {
|
|
|
263
276
|
const row = await getDb().siteIndex.get("current");
|
|
264
277
|
return row?.deletedSections ?? [];
|
|
265
278
|
}
|
|
266
|
-
async function cacheContent(sha, sections, index, siteConfig) {
|
|
279
|
+
async function cacheContent(sha, sections, index, siteConfig, diff) {
|
|
267
280
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
268
281
|
await getDb().contentCache.put({
|
|
269
282
|
key: "current",
|
|
@@ -271,7 +284,10 @@ async function cacheContent(sha, sections, index, siteConfig) {
|
|
|
271
284
|
sections,
|
|
272
285
|
index,
|
|
273
286
|
siteConfig,
|
|
274
|
-
updatedAt: now
|
|
287
|
+
updatedAt: now,
|
|
288
|
+
savedBranchSha: diff?.savedBranchSha ?? null,
|
|
289
|
+
changedSectionIds: diff?.changedSectionIds ?? [],
|
|
290
|
+
mainIndex: diff?.mainIndex ?? null
|
|
275
291
|
});
|
|
276
292
|
}
|
|
277
293
|
async function getCachedContent() {
|
|
@@ -281,9 +297,17 @@ async function getCachedContent() {
|
|
|
281
297
|
sha: row.sha,
|
|
282
298
|
sections: row.sections,
|
|
283
299
|
index: row.index,
|
|
284
|
-
siteConfig: row.siteConfig
|
|
300
|
+
siteConfig: row.siteConfig,
|
|
301
|
+
savedBranchSha: row.savedBranchSha ?? null,
|
|
302
|
+
changedSectionIds: row.changedSectionIds ?? [],
|
|
303
|
+
// No stored mainIndex (e.g. legacy or post-publish cache) means "no draft",
|
|
304
|
+
// so the published index equals the current index.
|
|
305
|
+
mainIndex: row.mainIndex ?? row.index
|
|
285
306
|
};
|
|
286
307
|
}
|
|
308
|
+
async function clearContentCache() {
|
|
309
|
+
await getDb().contentCache.clear();
|
|
310
|
+
}
|
|
287
311
|
async function persistMediaManifest(manifest) {
|
|
288
312
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
289
313
|
await getDb().mediaManifest.put({ key: "current", manifest, updatedAt: now });
|
|
@@ -341,6 +365,7 @@ export {
|
|
|
341
365
|
addPendingMediaItem,
|
|
342
366
|
cacheContent,
|
|
343
367
|
checkForLocalChanges,
|
|
368
|
+
clearContentCache,
|
|
344
369
|
clearPendingMedia,
|
|
345
370
|
clearPendingMediaByIds,
|
|
346
371
|
deleteSectionRows,
|
package/dist/lib/index.js
CHANGED
|
@@ -18,7 +18,15 @@ import {
|
|
|
18
18
|
safeRedirect,
|
|
19
19
|
sanitizeHtml,
|
|
20
20
|
toSectionId
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-PRKUXM7E.js";
|
|
22
|
+
import "../chunk-TG43X7JO.js";
|
|
23
|
+
import "../chunk-S2L3BPLS.js";
|
|
24
|
+
import "../chunk-ICLXLWQ5.js";
|
|
25
|
+
import "../chunk-DKOUFIP6.js";
|
|
26
|
+
import "../chunk-NSCT3AMV.js";
|
|
27
|
+
import {
|
|
28
|
+
env
|
|
29
|
+
} from "../chunk-WKZ7OENC.js";
|
|
22
30
|
import {
|
|
23
31
|
clearRegistry,
|
|
24
32
|
createRegistry,
|
|
@@ -29,12 +37,7 @@ import {
|
|
|
29
37
|
getSection,
|
|
30
38
|
registerSchema,
|
|
31
39
|
registerSection
|
|
32
|
-
} from "../chunk-
|
|
33
|
-
import "../chunk-S2L3BPLS.js";
|
|
34
|
-
import {
|
|
35
|
-
env
|
|
36
|
-
} from "../chunk-WKZ7OENC.js";
|
|
37
|
-
import "../chunk-DKOUFIP6.js";
|
|
40
|
+
} from "../chunk-VKAGMEKE.js";
|
|
38
41
|
export {
|
|
39
42
|
buildGoogleFontsUrl,
|
|
40
43
|
clearRegistry,
|
package/dist/lib/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/lib/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAe,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/lib/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAe,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAKvF,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC,WAAW,CAuCb;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,WAAW,CAQb;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAe9E"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure, browser-safe transform that rewrites the three legacy "layout-as-content"
|
|
3
|
+
* section types into the recursive `container` block. Used by BOTH the loader
|
|
4
|
+
* fallback (mergeSiteContent) and the codemod (scripts/migrate-sections.ts), so
|
|
5
|
+
* it must stay free of Node APIs and registry/schema imports.
|
|
6
|
+
*
|
|
7
|
+
* Structural only — it never sanitizes. Output is emitted in schema-normal form
|
|
8
|
+
* (every defaulted key explicit, only known ref fields carried) so that
|
|
9
|
+
* `transform(raw)` deep-equals `safeParse(transform(raw))` (convergence).
|
|
10
|
+
*/
|
|
11
|
+
export declare function upgradeLegacySection(raw: unknown): unknown;
|
|
12
|
+
//# sourceMappingURL=migrate-sections-transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-sections-transform.d.ts","sourceRoot":"","sources":["../../src/lib/migrate-sections-transform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAO1D"}
|
package/dist/lib/registry.d.ts
CHANGED
|
@@ -26,6 +26,11 @@ export type SettingsFieldDef = {
|
|
|
26
26
|
default: string;
|
|
27
27
|
target?: "content" | "options";
|
|
28
28
|
coerce?: "number";
|
|
29
|
+
/** When set, an empty-string ("") selection is normalized to `undefined`
|
|
30
|
+
* before the content/options split, so an optional-enum field clears cleanly
|
|
31
|
+
* (e.g. Media `dodont`, whose enum is strictly ["do","dont"]). Opt-in so other
|
|
32
|
+
* selects keep their "" value. */
|
|
33
|
+
emptyIsUndefined?: boolean;
|
|
29
34
|
options: {
|
|
30
35
|
label: string;
|
|
31
36
|
value: string;
|
|
@@ -68,6 +73,8 @@ export interface WrapperProps {
|
|
|
68
73
|
dirty?: boolean;
|
|
69
74
|
index: number;
|
|
70
75
|
isLast: boolean;
|
|
76
|
+
containerId: string;
|
|
77
|
+
isContainerBlock: boolean;
|
|
71
78
|
definition: SectionDefinition;
|
|
72
79
|
options?: Record<string, unknown>;
|
|
73
80
|
audiences: Audience[];
|
|
@@ -79,6 +86,7 @@ export interface WrapperProps {
|
|
|
79
86
|
onRequestInsert?: (index: number) => void;
|
|
80
87
|
onDelete?: () => void;
|
|
81
88
|
onMoveSection?: () => void;
|
|
89
|
+
onAddChild?: () => void;
|
|
82
90
|
mainStatus?: string | null;
|
|
83
91
|
contentDiffersFromMain?: boolean;
|
|
84
92
|
isLocalOnly?: boolean;
|
|
@@ -91,12 +99,27 @@ export interface SectionDefinition<T = unknown> {
|
|
|
91
99
|
schema: ZodType<T>;
|
|
92
100
|
component: ComponentType<SectionProps<T>>;
|
|
93
101
|
defaults: () => T;
|
|
94
|
-
wrapper?: ComponentType<WrapperProps>;
|
|
95
102
|
settings?: SettingsSchema;
|
|
96
103
|
settingsForm?: ComponentType<any>;
|
|
97
104
|
getLabel?(content: T): string;
|
|
98
105
|
getThumbnails?(content: T): Thumbnail[];
|
|
99
106
|
navRole?: "h1" | "h2" | "h3";
|
|
107
|
+
/** content-relative field paths that hold HTML rich text (for the sanitizer). */
|
|
108
|
+
richTextFields?: readonly string[];
|
|
109
|
+
/**
|
|
110
|
+
* Option keys (under this type's `options`) that a parent container may set as a
|
|
111
|
+
* default for all children via `content.childDefaults`. v1: typed primitives only.
|
|
112
|
+
*/
|
|
113
|
+
inheritableSettings?: readonly string[];
|
|
114
|
+
/**
|
|
115
|
+
* Optional grouping of `settings` fields into labeled tabs for the settings modal;
|
|
116
|
+
* presentation-only — does not change content/options routing; omitted fields fall
|
|
117
|
+
* into a trailing 'Other' tab.
|
|
118
|
+
*/
|
|
119
|
+
settingsTabs?: {
|
|
120
|
+
label: string;
|
|
121
|
+
fields: string[];
|
|
122
|
+
}[];
|
|
100
123
|
}
|
|
101
124
|
type DefineSectionInput<S extends ZodType> = {
|
|
102
125
|
type: string;
|
|
@@ -105,12 +128,22 @@ type DefineSectionInput<S extends ZodType> = {
|
|
|
105
128
|
schema: S;
|
|
106
129
|
component: ComponentType<SectionProps<z.infer<S>>>;
|
|
107
130
|
defaults: () => z.infer<S>;
|
|
108
|
-
wrapper?: ComponentType<WrapperProps>;
|
|
109
131
|
settings?: SettingsSchema;
|
|
110
132
|
settingsForm?: ComponentType<any>;
|
|
111
133
|
getLabel?(content: z.infer<S>): string;
|
|
112
134
|
getThumbnails?(content: z.infer<S>): Thumbnail[];
|
|
113
135
|
navRole?: "h1" | "h2" | "h3";
|
|
136
|
+
richTextFields?: readonly string[];
|
|
137
|
+
inheritableSettings?: readonly string[];
|
|
138
|
+
/**
|
|
139
|
+
* Optional grouping of `settings` fields into labeled tabs for the settings modal;
|
|
140
|
+
* presentation-only — does not change content/options routing; omitted fields fall
|
|
141
|
+
* into a trailing 'Other' tab.
|
|
142
|
+
*/
|
|
143
|
+
settingsTabs?: {
|
|
144
|
+
label: string;
|
|
145
|
+
fields: string[];
|
|
146
|
+
}[];
|
|
114
147
|
};
|
|
115
148
|
export declare function defineSection<S extends ZodType>(def: DefineSectionInput<S>): SectionDefinition<z.infer<S>>;
|
|
116
149
|
export interface SectionRegistry {
|
|
@@ -120,11 +153,15 @@ export interface SectionRegistry {
|
|
|
120
153
|
getSchema(type: string): ZodType | undefined;
|
|
121
154
|
getAllSections(): SectionDefinition[];
|
|
122
155
|
getAllSchemas(): ZodType[];
|
|
156
|
+
registerRichText(type: string, fields: readonly string[]): void;
|
|
157
|
+
getRichTextFields(type: string): readonly string[];
|
|
123
158
|
clearRegistry(): void;
|
|
124
159
|
}
|
|
125
160
|
export declare function createRegistry(): SectionRegistry;
|
|
126
161
|
export declare function registerSection(def: SectionDefinition<any>): void;
|
|
127
162
|
export declare function registerSchema(type: string, schema: ZodType): void;
|
|
163
|
+
export declare function registerRichText(type: string, fields: readonly string[]): void;
|
|
164
|
+
export declare function getRichTextFields(type: string): readonly string[];
|
|
128
165
|
export declare function getSection(type: string): SectionDefinition | undefined;
|
|
129
166
|
export declare function getSchema(type: string): ZodType | undefined;
|
|
130
167
|
export declare function getAllSections(): SectionDefinition[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/lib/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,i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