pagepilot-visual-editor 1.0.13 → 1.0.15
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/blocks-internal/block-button/src/index.d.ts +4 -0
- package/dist/blocks-internal/block-button-group/src/index.d.ts +6 -0
- package/dist/editor/publish/PagePublishDialog.d.ts +1 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Picker.d.ts +3 -1
- package/dist/editor-sample/App/hooks/page/useSaveHandler.d.ts +1 -0
- package/dist/editor-sample/documents/blocks/ButtonGroup/ButtonGroupPropsSchema.d.ts +2 -0
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/saveAsTemplateUtils.d.ts +29 -5
- package/dist/editor-sample/documents/blocks/helpers/fontFamily.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 +8 -0
- package/dist/email-builder-core/blocks/ButtonGroup/ButtonGroupPropsSchema.d.ts +6 -0
- package/dist/email-builder-core/blocks/FlexColumns/FlexColumnsPropsSchema.d.ts +2 -0
- package/dist/email-builder-core/blocks/FlexColumns/flexColumnsHelpers.d.ts +1 -0
- package/dist/email-builder-core/blocks/FormsPicker/FormsReader.d.ts +1 -0
- package/dist/email-builder-core/renderers/renderToStaticMarkup.d.ts +2 -1
- package/dist/index.cjs +1064 -254
- package/dist/index.js +22054 -21055
- package/dist/render-core/combineSections.d.ts +1 -0
- package/dist/render.cjs +917 -104
- package/dist/render.js +5376 -4528
- package/package.json +1 -1
|
@@ -180,6 +180,10 @@ export declare const ButtonPropsSchema: z.ZodObject<{
|
|
|
180
180
|
inset: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
181
181
|
}, z.core.$strip>>>;
|
|
182
182
|
}, z.core.$strip>>>;
|
|
183
|
+
responsive: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
184
|
+
tablet: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
185
|
+
mobile: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
186
|
+
}, z.core.$strip>>>;
|
|
183
187
|
}, z.core.$strip>;
|
|
184
188
|
export type ButtonProps = z.infer<typeof ButtonPropsSchema>;
|
|
185
189
|
export declare const isValidButtonColor: (c: unknown) => c is string;
|
|
@@ -24,6 +24,8 @@ export declare const ButtonGroupPropsSchema: z.ZodObject<{
|
|
|
24
24
|
row: "row";
|
|
25
25
|
}>>>;
|
|
26
26
|
gap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
27
|
+
gapTablet: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
28
|
+
gapMobile: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
27
29
|
alignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
28
30
|
center: "center";
|
|
29
31
|
"space-between": "space-between";
|
|
@@ -45,6 +47,10 @@ export declare const ButtonGroupPropsSchema: z.ZodObject<{
|
|
|
45
47
|
wrap: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
46
48
|
ariaLabel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
49
|
}, z.core.$strip>>>;
|
|
50
|
+
responsive: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
51
|
+
tablet: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
52
|
+
mobile: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
48
54
|
}, z.core.$strip>;
|
|
49
55
|
type TButton = React.JSX.Element | React.JSX.Element[] | null;
|
|
50
56
|
export type ButtonGroupProps = z.infer<typeof ButtonGroupPropsSchema> & {
|
|
@@ -22,6 +22,7 @@ interface PagePublishDialogProps {
|
|
|
22
22
|
};
|
|
23
23
|
injectTabsScrollSyncScript?: boolean;
|
|
24
24
|
injectCarouselScript?: boolean;
|
|
25
|
+
injectAnimationScript?: boolean;
|
|
25
26
|
}) => Promise<boolean>;
|
|
26
27
|
}
|
|
27
28
|
export default function PagePublishDialog({ open, onClose, record, apiClient, onSubmit, }: PagePublishDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -29,6 +29,8 @@ type Props = {
|
|
|
29
29
|
* expose an option that would silently be ignored.
|
|
30
30
|
*/
|
|
31
31
|
solidOnly?: boolean;
|
|
32
|
+
/** Heading rendered in the reserved top strip, aligned with the close button. */
|
|
33
|
+
title?: string;
|
|
32
34
|
};
|
|
33
|
-
export default function Picker({ value, onChange, onApply, onTransparent, onClose, noneLabel, hideBrandColors, defaultValue, stickyActions, bodyMaxHeight, solidOnly }: Props): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export default function Picker({ value, onChange, onApply, onTransparent, onClose, noneLabel, hideBrandColors, defaultValue, stickyActions, bodyMaxHeight, solidOnly, title }: Props): import("react/jsx-runtime").JSX.Element;
|
|
34
36
|
export {};
|
|
@@ -24,6 +24,8 @@ declare const ButtonGroupPropsSchema: z.ZodObject<{
|
|
|
24
24
|
row: "row";
|
|
25
25
|
}>>>;
|
|
26
26
|
gap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
27
|
+
gapTablet: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
28
|
+
gapMobile: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
27
29
|
alignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
28
30
|
center: "center";
|
|
29
31
|
"space-between": "space-between";
|
|
@@ -16,6 +16,15 @@ type FormField = any;
|
|
|
16
16
|
export type BlockTemplateConfiguration = {
|
|
17
17
|
isIndividualBlock: true;
|
|
18
18
|
rootBlockId: string;
|
|
19
|
+
/**
|
|
20
|
+
* Every top-level block id in canvas order. Absent (or single-element)
|
|
21
|
+
* for the classic single-block template shape; populated when the author
|
|
22
|
+
* saved a block template whose canvas had additional top-level blocks
|
|
23
|
+
* alongside the primary source (e.g. a Heading placed above the source
|
|
24
|
+
* container). Applying such a template inserts every listed block, not
|
|
25
|
+
* just `rootBlockId`.
|
|
26
|
+
*/
|
|
27
|
+
childrenIds?: string[];
|
|
19
28
|
blocks: BlockMap;
|
|
20
29
|
formFields: FormField[];
|
|
21
30
|
};
|
|
@@ -41,18 +50,33 @@ export declare function extractFormFieldsFromBlocks(blocks: BlockMap, rootBlockI
|
|
|
41
50
|
*
|
|
42
51
|
* `prefillDefaults` (opt-in) flips this: the field's CURRENT value(s) are
|
|
43
52
|
* carried over as the dialog's default value(s) instead of being stripped.
|
|
44
|
-
* Used by the
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* template and must stay empty-by-default.
|
|
53
|
+
* Used by the canvas "Save as block" action and the Variables-panel
|
|
54
|
+
* "Save as new template" shortcut, both of which capture an already-filled-in
|
|
55
|
+
* instance as the starting template.
|
|
48
56
|
*/
|
|
49
57
|
export declare function toAuthoringField(field: FormField, blockIds: Set<string>, prefillDefaults?: boolean): FormField;
|
|
50
58
|
/**
|
|
51
59
|
* Merge the live root formFields (filtered to this subtree) with fields
|
|
52
60
|
* auto-detected from block text, keeping DEFINITIONS only (or prefilled
|
|
53
61
|
* defaults — see `toAuthoringField`).
|
|
62
|
+
*
|
|
63
|
+
* Relevance rules:
|
|
64
|
+
* • container-repeat (`sourceBlockId`) — always kept iff its source block
|
|
65
|
+
* is in `blockIds` (i.e. the container itself came along in the save).
|
|
66
|
+
* • scalar (no `sourceBlockId`) — see `scopeScalarsToDetected` below.
|
|
67
|
+
*
|
|
68
|
+
* `scopeScalarsToDetected` (opt-in) — when true, a scalar root field only
|
|
69
|
+
* survives if its `{{id}}` token was actually detected inside the saved
|
|
70
|
+
* subtree's text by `extractFormFieldsFromBlocks`. Used exclusively by
|
|
71
|
+
* `buildBlockTemplateConfiguration` (the canvas "Save as block" flow) so a
|
|
72
|
+
* block template captures ONLY the scalars its own subtree renders — not
|
|
73
|
+
* every page-level scalar the author authored elsewhere. Off (default)
|
|
74
|
+
* keeps the historical loose behavior for `deriveFromDocument` (whole-page
|
|
75
|
+
* templates, where any authored scalar is fair game) and for
|
|
76
|
+
* `derivePageInitialFormFields` (which has no document to scan and passes
|
|
77
|
+
* `detectedFields=[]`).
|
|
54
78
|
*/
|
|
55
|
-
export declare function buildTemplateFormFields(rootFormFields: FormField[], detectedFields: FormField[], blockIds: Set<string>, prefillDefaults?: boolean): FormField[];
|
|
79
|
+
export declare function buildTemplateFormFields(rootFormFields: FormField[], detectedFields: FormField[], blockIds: Set<string>, prefillDefaults?: boolean, scopeScalarsToDetected?: boolean): FormField[];
|
|
56
80
|
/** Pull color / font-size out of value HTML (`<font color>` or `style="font-size"`). */
|
|
57
81
|
export declare function extractInlineStyle(html: string): {
|
|
58
82
|
color?: string;
|
|
@@ -30,4 +30,16 @@ export declare const QUILL_FONT_OPTIONS: {
|
|
|
30
30
|
css: string;
|
|
31
31
|
}[];
|
|
32
32
|
export declare const QUILL_FONT_WHITELIST: string[];
|
|
33
|
+
export declare const INTER_FONT_FAMILY_VALUE: string;
|
|
34
|
+
/**
|
|
35
|
+
* Normalize `font-family` styles inside pasted HTML against the font list the
|
|
36
|
+
* rich-text picker actually offers. Any family whose first token is not in
|
|
37
|
+
* FONT_FAMILIES is rewritten to Inter (the editor's default) so the pasted
|
|
38
|
+
* content stays readable and consistent with the rest of the document — and
|
|
39
|
+
* the caller can surface a warning listing what was swapped.
|
|
40
|
+
*/
|
|
41
|
+
export declare function normalizePastedFontFamilies(html: string): {
|
|
42
|
+
html: string;
|
|
43
|
+
unsupportedFonts: string[];
|
|
44
|
+
};
|
|
33
45
|
export declare const QUILL_FONT_CSS: string;
|
|
@@ -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", "stickyNavTablet", "stickyNavMobile"];
|
|
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", "gapTablet", "gapMobile", "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
|
|
@@ -183,6 +183,10 @@ export declare const EditorBlock: ({ type, data }: import('@usewaypoint/document
|
|
|
183
183
|
inset: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
184
184
|
}, z.core.$strip>>>;
|
|
185
185
|
}, z.core.$strip>>>;
|
|
186
|
+
responsive: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
187
|
+
tablet: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
188
|
+
mobile: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
189
|
+
}, z.core.$strip>>>;
|
|
186
190
|
}, z.core.$strip>;
|
|
187
191
|
Container: z.ZodObject<{
|
|
188
192
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -1049,6 +1053,8 @@ export declare const EditorBlock: ({ type, data }: import('@usewaypoint/document
|
|
|
1049
1053
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
1050
1054
|
columnsCount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1051
1055
|
columnsGap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1056
|
+
columnsGapTablet: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1057
|
+
columnsGapMobile: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1052
1058
|
wrap: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
1053
1059
|
desktopLayout: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
1054
1060
|
row: "row";
|
|
@@ -1167,6 +1173,8 @@ export declare const EditorBlock: ({ type, data }: import('@usewaypoint/document
|
|
|
1167
1173
|
row: "row";
|
|
1168
1174
|
}>>>;
|
|
1169
1175
|
gap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1176
|
+
gapTablet: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1177
|
+
gapMobile: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1170
1178
|
alignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
1171
1179
|
center: "center";
|
|
1172
1180
|
"space-between": "space-between";
|
|
@@ -24,6 +24,8 @@ declare const ButtonGroupPropsSchema: z.ZodObject<{
|
|
|
24
24
|
row: "row";
|
|
25
25
|
}>>>;
|
|
26
26
|
gap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
27
|
+
gapTablet: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
28
|
+
gapMobile: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
27
29
|
alignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
28
30
|
center: "center";
|
|
29
31
|
"space-between": "space-between";
|
|
@@ -45,6 +47,10 @@ declare const ButtonGroupPropsSchema: z.ZodObject<{
|
|
|
45
47
|
wrap: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
46
48
|
ariaLabel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
49
|
}, z.core.$strip>>>;
|
|
50
|
+
responsive: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
51
|
+
tablet: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
52
|
+
mobile: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
48
54
|
}, z.core.$strip>;
|
|
49
55
|
export default ButtonGroupPropsSchema;
|
|
50
56
|
export type ButtonGroupReaderProps = z.infer<typeof ButtonGroupPropsSchema>;
|
|
@@ -31,6 +31,8 @@ declare const FlexColumnsPropsSchema: z.ZodObject<{
|
|
|
31
31
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
32
32
|
columnsCount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
33
33
|
columnsGap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
34
|
+
columnsGapTablet: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
35
|
+
columnsGapMobile: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
34
36
|
wrap: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
35
37
|
desktopLayout: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
36
38
|
row: "row";
|
|
@@ -35,7 +35,8 @@ type TOptions = {
|
|
|
35
35
|
isBanner?: boolean;
|
|
36
36
|
injectTabsScrollSyncScript?: boolean;
|
|
37
37
|
injectCarouselScript?: boolean;
|
|
38
|
+
injectAnimationScript?: boolean;
|
|
38
39
|
injectFontAssets?: boolean;
|
|
39
40
|
};
|
|
40
|
-
export default function renderToStaticMarkup(document: TReaderDocument, { rootBlockId, seo, injectElementIds, minifyCss, lang, skipLink, accessibilityTools, includePageCSS, headHtml, bodyBottomHtml, isBanner, injectTabsScrollSyncScript, injectCarouselScript, injectFontAssets, }: TOptions): string;
|
|
41
|
+
export default function renderToStaticMarkup(document: TReaderDocument, { rootBlockId, seo, injectElementIds, minifyCss, lang, skipLink, accessibilityTools, includePageCSS, headHtml, bodyBottomHtml, isBanner, injectTabsScrollSyncScript, injectCarouselScript, injectAnimationScript, injectFontAssets, }: TOptions): string;
|
|
41
42
|
export {};
|