pagepilot-visual-editor 1.0.11 → 1.0.13
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/README.md +1 -1
- package/dist/editor/Topbar.d.ts +5 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MenuPickerSidebarPanel.d.ts +2 -0
- package/dist/editor-sample/App/InspectorDrawer/EditorBehavior.d.ts +2 -2
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/repeatRowActions.d.ts +10 -1
- package/dist/editor-sample/documents/blocks/MenuPicker/MenuPropsSchema.d.ts +2 -0
- package/dist/editor-sample/documents/blocks/helpers/documentUtils.d.ts +12 -0
- package/dist/editor-sample/documents/blocks/helpers/responsiveStyle.d.ts +1 -1
- package/dist/editor-sample/documents/editor/core.d.ts +2 -0
- package/dist/email-builder-core/Reader/responsiveCss.d.ts +12 -0
- package/dist/email-builder-core/blocks/MenuPicker/MenuPropsSchema.d.ts +4 -0
- package/dist/index.cjs +241 -237
- package/dist/index.js +22126 -21523
- package/dist/render.cjs +107 -104
- package/dist/render.js +3733 -3506
- package/package.json +1 -1
- package/dist/editor-sample/documents/blocks/helpers/responsiveInstanceCss.d.ts +0 -6
package/README.md
CHANGED
|
@@ -784,7 +784,7 @@ a media-library backend — the URL field is the integration point.
|
|
|
784
784
|
|
|
785
785
|
### Pagepilot AI panel
|
|
786
786
|
|
|
787
|
-
Currently a **Coming soon** placeholder. The tab has the purple `AiPanelIcon` in the rail and opens a centered card that says AI-driven page generation is on the way. When the full generator is ported (prompt input + model picker + voice input, per the ahd-fe reference), the panel body swaps in without any other API changes. Hide the tab entirely via `panels={{
|
|
787
|
+
Currently a **Coming soon** placeholder. The tab has the purple `AiPanelIcon` in the rail and opens a centered card that says AI-driven page generation is on the way. When the full generator is ported (prompt input + model picker + voice input, per the ahd-fe reference), the panel body swaps in without any other API changes. Hide the tab entirely via `panels={{ pagepilotAI: false }}`.
|
|
788
788
|
|
|
789
789
|
### Layout panel
|
|
790
790
|
|
package/dist/editor/Topbar.d.ts
CHANGED
|
@@ -23,9 +23,13 @@ export interface TopbarProps {
|
|
|
23
23
|
onToggleMode?: () => void;
|
|
24
24
|
/** Disables Save Changes when false — the user has nothing to save. */
|
|
25
25
|
isDirty?: boolean;
|
|
26
|
+
/** Shows a spinner in Save Changes and disables it to prevent duplicate saves. */
|
|
27
|
+
isSaving?: boolean;
|
|
28
|
+
/** When true, swaps Save Changes for a transient "Changes saved" success button. */
|
|
29
|
+
changesSaved?: boolean;
|
|
26
30
|
/** Checked state of the Auto Save switch. */
|
|
27
31
|
autoSaveEnabled?: boolean;
|
|
28
32
|
/** Fired when the user toggles the Auto Save switch. */
|
|
29
33
|
onAutoSaveChange?: (enabled: boolean) => void;
|
|
30
34
|
}
|
|
31
|
-
export default function Topbar({ toggles, title, recordTitle, recordStatus, onBack, onSave, onPublish, onPublishMenu, publishSlot, onPreview, onToggleFullscreen, isFullscreen, onOpenMoreMenu, sectionsDropdown, mode, onToggleMode, isDirty, autoSaveEnabled, onAutoSaveChange, }: TopbarProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export default function Topbar({ toggles, title, recordTitle, recordStatus, onBack, onSave, onPublish, onPublishMenu, publishSlot, onPreview, onToggleFullscreen, isFullscreen, onOpenMoreMenu, sectionsDropdown, mode, onToggleMode, isDirty, isSaving, changesSaved, autoSaveEnabled, onAutoSaveChange, }: TopbarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,9 +18,9 @@ export interface EditorPanelToggles {
|
|
|
18
18
|
* Pagepilot AI panel — AI-driven page generation surface. Currently
|
|
19
19
|
* renders a "Coming soon" placeholder; the full generator (prompt +
|
|
20
20
|
* model picker + voice input) will land in a future release. Hidden
|
|
21
|
-
* entirely by passing `
|
|
21
|
+
* entirely by passing `pagepilotAI: false`.
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
pagepilotAI?: boolean;
|
|
24
24
|
}
|
|
25
25
|
interface EditorBehaviorProps {
|
|
26
26
|
record: any;
|
|
@@ -16,9 +16,18 @@ export declare function getContainerCapacity(fieldId: string): {
|
|
|
16
16
|
* and grow their single axis. Commits the resized container to the document.
|
|
17
17
|
*/
|
|
18
18
|
export declare function growFieldContainer(fieldId: string, neededSlots: number, direction: 'rows' | 'columns'): void;
|
|
19
|
+
/**
|
|
20
|
+
* Drop repeat rows beyond `keepRows`, removing each surplus clone's subtree from
|
|
21
|
+
* the document in ONE commit (unlike calling removeContainerRepeatRow per row,
|
|
22
|
+
* which re-renders and resets the tab each time). Row 0 is the source block —
|
|
23
|
+
* `keepRows` is clamped to at least 1 so it always survives.
|
|
24
|
+
*/
|
|
25
|
+
export declare function trimFieldRowsTo(fieldId: string, keepRows: number): void;
|
|
19
26
|
/**
|
|
20
27
|
* Seed a container-repeat field from an array of data objects (the Data
|
|
21
|
-
* Reference flow). One object → one repeated copy:
|
|
28
|
+
* Reference flow). One object → one repeated copy: the row count is SYNCED to
|
|
29
|
+
* the data length — surplus rows from a previous, larger fetch are removed
|
|
30
|
+
* first, then rows are grown by stamping
|
|
22
31
|
* clones (up to available container slots) until there's a row per object, then
|
|
23
32
|
* each object's values are written into its row by MATCHING keys to sub-field
|
|
24
33
|
* ids. Non-matching keys are ignored; unmatched sub-fields keep their existing
|
|
@@ -3,6 +3,8 @@ declare const MenuPropsSchema: z.ZodObject<{
|
|
|
3
3
|
menuId: z.ZodDefault<z.ZodString>;
|
|
4
4
|
useCustomMenu: z.ZodDefault<z.ZodBoolean>;
|
|
5
5
|
stickyNav: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
stickyNavTablet: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
7
|
+
stickyNavMobile: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
6
8
|
position: z.ZodDefault<z.ZodEnum<{
|
|
7
9
|
right: "right";
|
|
8
10
|
left: "left";
|
|
@@ -77,6 +77,18 @@ export declare function writeContainerSlots(block: any, slots: RepeatableSlot[])
|
|
|
77
77
|
* block isn't a repeatable container).
|
|
78
78
|
*/
|
|
79
79
|
export declare function growContainerToFit(documentTree: Record<string, any>, containerId: string, neededSlots: number, direction: 'rows' | 'columns'): Record<string, any>;
|
|
80
|
+
/**
|
|
81
|
+
* Shrink a repeatable container back down to `neededSlots` after a re-seed
|
|
82
|
+
* returned FEWER rows than the previous one. Only trailing EMPTY slots are
|
|
83
|
+
* dropped — a filled slot always stops the shrink, so authored content is never
|
|
84
|
+
* silently deleted. Mirror of growContainerToFit; returns the same document ref
|
|
85
|
+
* when nothing can (or needs to) be removed.
|
|
86
|
+
*
|
|
87
|
+
* Pagination is the case that actually matters visually: its page count is
|
|
88
|
+
* derived from the flat `cells` pool, so leaving 100 cells after a 20-row fetch
|
|
89
|
+
* keeps rendering 9 pager buttons over 80 empty cells.
|
|
90
|
+
*/
|
|
91
|
+
export declare function shrinkContainerToFit(documentTree: Record<string, any>, containerId: string, neededSlots: number): Record<string, any>;
|
|
80
92
|
/**
|
|
81
93
|
* Stamp the subtree rooted at `sourceRootId` (which lives in the container's
|
|
82
94
|
* first filled slot) into the next `count` EMPTY slots. Each stamp is a fresh
|
|
@@ -44,7 +44,7 @@ export declare const RESPONSIVE_PROP_KEYS: readonly ["contentAlignment", "horizo
|
|
|
44
44
|
* {@link nativeKeysForBlock} to get the right set for a block type — never test
|
|
45
45
|
* against this flat list directly.
|
|
46
46
|
*/
|
|
47
|
-
export declare const NATIVE_DEVICE_PROP_KEYS: readonly ["columnsCount", "columnsCountTablet", "columnsCountMobile", "rowsCount", "rowsCountTablet", "rowsCountMobile", "columnsGap", "columnsGapTablet", "columnsGapMobile", "rowsGap", "desktopLayout", "tabletLayout", "mobileLayout", "columnShrink", "columnShrinkTablet", "columnShrinkMobile", "columnsDirection", "columnsDirectionTablet", "columnsDirectionMobile", "widthType", "widthTypeTablet", "widthTypeMobile", "size", "sizeTablet", "sizeMobile", "fixedWidths", "fixedWidthsTablet", "fixedWidthsMobile", "contentAlignmentTablet", "contentAlignmentMobile", "slidesPerView", "slidesPerViewTablet", "slidesPerViewMobile", "width", "widthTablet", "widthMobile", "height", "heightTablet", "heightMobile", "url", "urlTablet", "urlMobile", "iconName", "iconNameTablet", "iconNameMobile", "iconFillColor", "iconFillColorTablet", "iconFillColorMobile", "orientation", "orientationTablet", "orientationMobile", "direction", "directionTablet", "directionMobile", "alignmentTablet", "alignmentMobile", "rotation", "rotationTablet", "rotationMobile", "burgerDropdownBackgroundColor"];
|
|
47
|
+
export declare const NATIVE_DEVICE_PROP_KEYS: readonly ["columnsCount", "columnsCountTablet", "columnsCountMobile", "rowsCount", "rowsCountTablet", "rowsCountMobile", "columnsGap", "columnsGapTablet", "columnsGapMobile", "rowsGap", "desktopLayout", "tabletLayout", "mobileLayout", "columnShrink", "columnShrinkTablet", "columnShrinkMobile", "columnsDirection", "columnsDirectionTablet", "columnsDirectionMobile", "widthType", "widthTypeTablet", "widthTypeMobile", "size", "sizeTablet", "sizeMobile", "fixedWidths", "fixedWidthsTablet", "fixedWidthsMobile", "contentAlignmentTablet", "contentAlignmentMobile", "slidesPerView", "slidesPerViewTablet", "slidesPerViewMobile", "width", "widthTablet", "widthMobile", "height", "heightTablet", "heightMobile", "url", "urlTablet", "urlMobile", "iconName", "iconNameTablet", "iconNameMobile", "iconFillColor", "iconFillColorTablet", "iconFillColorMobile", "orientation", "orientationTablet", "orientationMobile", "direction", "directionTablet", "directionMobile", "alignmentTablet", "alignmentMobile", "rotation", "rotationTablet", "rotationMobile", "burgerDropdownBackgroundColor", "stickyNavTablet", "stickyNavMobile"];
|
|
48
48
|
/**
|
|
49
49
|
* The native per-device prop keys that apply to `blockType`. Unambiguous keys
|
|
50
50
|
* are always native; ambiguous ones only for the block types that actually
|
|
@@ -841,6 +841,8 @@ export declare const EditorBlock: ({ type, data }: import('@usewaypoint/document
|
|
|
841
841
|
menuId: z.ZodDefault<z.ZodString>;
|
|
842
842
|
useCustomMenu: z.ZodDefault<z.ZodBoolean>;
|
|
843
843
|
stickyNav: z.ZodDefault<z.ZodBoolean>;
|
|
844
|
+
stickyNavTablet: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
845
|
+
stickyNavMobile: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
844
846
|
position: z.ZodDefault<z.ZodEnum<{
|
|
845
847
|
right: "right";
|
|
846
848
|
left: "left";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function buildResponsiveStyleCss(elementId: string, responsive: {
|
|
2
|
+
tablet?: {
|
|
3
|
+
style?: Record<string, any>;
|
|
4
|
+
props?: Record<string, any>;
|
|
5
|
+
hidden?: boolean;
|
|
6
|
+
};
|
|
7
|
+
mobile?: {
|
|
8
|
+
style?: Record<string, any>;
|
|
9
|
+
props?: Record<string, any>;
|
|
10
|
+
hidden?: boolean;
|
|
11
|
+
};
|
|
12
|
+
} | null | undefined, baseStyle?: Record<string, any> | null, baseProps?: Record<string, any> | null): string;
|
|
@@ -3,6 +3,8 @@ declare const MenuPropsInnerSchema: z.ZodObject<{
|
|
|
3
3
|
menuId: z.ZodDefault<z.ZodString>;
|
|
4
4
|
useCustomMenu: z.ZodDefault<z.ZodBoolean>;
|
|
5
5
|
stickyNav: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
stickyNavTablet: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
7
|
+
stickyNavMobile: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
6
8
|
position: z.ZodDefault<z.ZodEnum<{
|
|
7
9
|
right: "right";
|
|
8
10
|
left: "left";
|
|
@@ -47,6 +49,8 @@ export declare const MenuPropsSchema: z.ZodObject<{
|
|
|
47
49
|
menuId: z.ZodDefault<z.ZodString>;
|
|
48
50
|
useCustomMenu: z.ZodDefault<z.ZodBoolean>;
|
|
49
51
|
stickyNav: z.ZodDefault<z.ZodBoolean>;
|
|
52
|
+
stickyNavTablet: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
53
|
+
stickyNavMobile: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
50
54
|
position: z.ZodDefault<z.ZodEnum<{
|
|
51
55
|
right: "right";
|
|
52
56
|
left: "left";
|