pagepilot-visual-editor 1.0.7 → 1.0.9
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 +304 -17
- package/dist/blocks-internal/block-button/src/index.d.ts +15 -9
- package/dist/blocks-internal/block-button-group/src/index.d.ts +6 -6
- package/dist/blocks-internal/block-columns-container/src/index.d.ts +3 -3
- package/dist/blocks-internal/block-container/src/index.d.ts +11 -11
- package/dist/blocks-internal/block-grid/src/index.d.ts +1 -1
- package/dist/blocks-internal/block-heading/src/index.d.ts +11 -5
- package/dist/blocks-internal/block-html/src/index.d.ts +2 -2
- package/dist/blocks-internal/block-iframe/src/index.d.ts +2 -2
- package/dist/blocks-internal/block-image/src/index.d.ts +3 -3
- package/dist/blocks-internal/block-list/src/index.d.ts +90 -0
- package/dist/blocks-internal/block-logo/src/index.d.ts +2 -2
- package/dist/blocks-internal/block-stepper/src/index.d.ts +10 -4
- package/dist/blocks-internal/block-text/src/index.d.ts +9 -3
- package/dist/blocks-internal/block-video/src/index.d.ts +3 -3
- package/dist/blocks-internal/block-youtube-url/src/index.d.ts +3 -3
- package/dist/editor/Shell.d.ts +1 -1
- package/dist/editor/Topbar.d.ts +5 -1
- package/dist/editor/blockToggles.d.ts +1 -1
- package/dist/editor/publish/PagePublishDialog.d.ts +7 -0
- package/dist/editor/renderSections.d.ts +68 -0
- package/dist/editor/types.d.ts +28 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/AppBannerPickerSidebarPanel.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FaqPickerSidebarPanel.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/ListSidebarPanel.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/LayersPanelStyles.d.ts +2 -2
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/TemplatesList.d.ts +19 -4
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/templateApplyHelpers.d.ts +25 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/UpgradeDialogView.d.ts +1 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/upgradeDialog.d.ts +15 -0
- package/dist/editor-sample/App/InspectorDrawer/useLayerNode.d.ts +1 -2
- package/dist/editor-sample/App/TemplatePanel/minimap/MiniMap.d.ts +6 -0
- package/dist/editor-sample/App/TemplatePanel/minimap/MiniMapFrame.d.ts +17 -0
- package/dist/editor-sample/App/TemplatePanel/minimap/useMiniMapSync.d.ts +24 -0
- package/dist/editor-sample/App/TemplatePanel/minimap/useMiniMapThumbnail.d.ts +8 -0
- package/dist/editor-sample/App/hooks/useAutosave.d.ts +10 -0
- package/dist/editor-sample/App/shared/editor.styles.d.ts +3 -3
- package/dist/editor-sample/documents/blocks/Accordion/AccordionPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/AppBannerPicker/AppBannerEditor.d.ts +7 -0
- package/dist/editor-sample/documents/blocks/AppBannerPicker/AppBannerPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/ButtonGroup/ButtonGroupPropsSchema.d.ts +6 -6
- package/dist/editor-sample/documents/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +3 -3
- package/dist/editor-sample/documents/blocks/Container/ContainerPropsSchema.d.ts +11 -11
- package/dist/editor-sample/documents/blocks/DemoPicker/DemoPropsSchema.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +3 -3
- package/dist/editor-sample/documents/blocks/FaqPicker/FaqEditor.d.ts +7 -0
- package/dist/editor-sample/documents/blocks/FaqPicker/FaqPickerPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/FormsPicker/FormsPropsSchema.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/Grid/GridPropsSchema.d.ts +3 -3
- package/dist/editor-sample/documents/blocks/Marquee/MarqueePropsSchema.d.ts +6 -1
- package/dist/editor-sample/documents/blocks/MenuPicker/MenuPropsSchema.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/PricingAccordion/PricingAccordionPropsSchema.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/Rating/RatingPropsSchema.d.ts +8 -2
- package/dist/editor-sample/documents/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/Timer/TimerPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/index.d.ts +4 -1
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/EditorBlockWrapper.d.ts +3 -2
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/useCanvasDrop.d.ts +14 -8
- package/dist/editor-sample/documents/blocks/helpers/documentUtils.d.ts +1 -0
- package/dist/editor-sample/documents/blocks/helpers/zod.d.ts +2 -2
- package/dist/editor-sample/documents/editor/EditorBlock.d.ts +6 -2
- package/dist/editor-sample/documents/editor/EditorContext.d.ts +15 -1
- package/dist/editor-sample/documents/editor/core.d.ts +246 -85
- package/dist/email-builder-core/blocks/AccessibilityTools/AccessibilityToolsPropsSchema.d.ts +21 -3
- package/dist/email-builder-core/blocks/Accordion/AccordionPropsSchema.d.ts +6 -0
- package/dist/email-builder-core/blocks/AppBannerPicker/AppBannerPropsSchema.d.ts +6 -0
- package/dist/email-builder-core/blocks/ButtonGroup/ButtonGroupPropsSchema.d.ts +6 -6
- package/dist/email-builder-core/blocks/Calendly/CalendlyPropsSchema.d.ts +8 -2
- package/dist/email-builder-core/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +3 -3
- package/dist/email-builder-core/blocks/Container/ContainerPropsSchema.d.ts +11 -11
- package/dist/email-builder-core/blocks/DemoPicker/DemoPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +5 -5
- package/dist/email-builder-core/blocks/FaqPicker/FaqPickerPropsSchema.d.ts +6 -0
- package/dist/email-builder-core/blocks/FlexColumns/FlexColumnsPropsSchema.d.ts +5 -5
- package/dist/email-builder-core/blocks/FormsPicker/FormsPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/Grid/GridPropsSchema.d.ts +3 -3
- package/dist/email-builder-core/blocks/Marquee/MarqueePropsSchema.d.ts +6 -1
- package/dist/email-builder-core/blocks/Marquee/marqueeMotion.d.ts +3 -1
- package/dist/email-builder-core/blocks/MenuPicker/MenuPropsSchema.d.ts +4 -4
- package/dist/email-builder-core/blocks/Pagination/PaginationPropsSchema.d.ts +5 -5
- package/dist/email-builder-core/blocks/PricingAccordion/PricingAccordionPropsSchema.d.ts +2 -2
- package/dist/email-builder-core/blocks/Rating/RatingPropsSchema.d.ts +8 -2
- package/dist/email-builder-core/blocks/SkipLink/SkipLinkPropsSchema.d.ts +12 -2
- package/dist/email-builder-core/blocks/Table/TablePropsSchema.d.ts +8 -2
- package/dist/email-builder-core/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
- package/dist/email-builder-core/blocks/Timer/TimerPropsSchema.d.ts +6 -0
- package/dist/email-builder-core/blocks/helpers/blockStyleHelpers.d.ts +1 -0
- package/dist/email-builder-core/renderers/pageScripts.d.ts +8 -0
- package/dist/host-stubs/i18n.d.ts +1 -1
- package/dist/host-stubs/style/menu.styled.d.ts +7 -1
- package/dist/host-stubs/view/shared/modals/PopupConfirm.d.ts +8 -6
- package/dist/index.cjs +273 -268
- package/dist/index.d.ts +2 -0
- package/dist/index.js +33402 -30448
- package/dist/renderToStaticHtml.d.ts +107 -0
- package/package.json +11 -10
|
@@ -24,8 +24,8 @@ export declare const GridPropsSchema: z.ZodObject<{
|
|
|
24
24
|
columnsGap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
25
25
|
rowsGap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
26
26
|
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
27
|
-
top: "top";
|
|
28
27
|
bottom: "bottom";
|
|
28
|
+
top: "top";
|
|
29
29
|
middle: "middle";
|
|
30
30
|
}>>>;
|
|
31
31
|
}, z.core.$strip>>>;
|
|
@@ -56,11 +56,11 @@ export declare const HeadingPropsSchema: z.ZodObject<{
|
|
|
56
56
|
fontSize: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
57
57
|
fontWeight: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
58
58
|
bold: "bold";
|
|
59
|
+
normal: "normal";
|
|
59
60
|
400: "400";
|
|
60
61
|
500: "500";
|
|
61
62
|
600: "600";
|
|
62
63
|
700: "700";
|
|
63
|
-
normal: "normal";
|
|
64
64
|
}>>>;
|
|
65
65
|
fontStyle: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
66
66
|
normal: "normal";
|
|
@@ -68,14 +68,14 @@ export declare const HeadingPropsSchema: z.ZodObject<{
|
|
|
68
68
|
}>>>;
|
|
69
69
|
textDecoration: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
70
70
|
none: "none";
|
|
71
|
-
underline: "underline";
|
|
72
71
|
"line-through": "line-through";
|
|
72
|
+
underline: "underline";
|
|
73
73
|
"underline line-through": "underline line-through";
|
|
74
74
|
}>>>;
|
|
75
75
|
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
76
|
-
right: "right";
|
|
77
|
-
left: "left";
|
|
78
76
|
center: "center";
|
|
77
|
+
left: "left";
|
|
78
|
+
right: "right";
|
|
79
79
|
}>>>;
|
|
80
80
|
padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
81
81
|
top: z.ZodNumber;
|
|
@@ -83,6 +83,12 @@ export declare const HeadingPropsSchema: z.ZodObject<{
|
|
|
83
83
|
right: z.ZodNumber;
|
|
84
84
|
left: z.ZodNumber;
|
|
85
85
|
}, z.core.$strip>>>;
|
|
86
|
+
margin: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
87
|
+
top: z.ZodNumber;
|
|
88
|
+
bottom: z.ZodNumber;
|
|
89
|
+
right: z.ZodNumber;
|
|
90
|
+
left: z.ZodNumber;
|
|
91
|
+
}, z.core.$strip>>>;
|
|
86
92
|
}, z.core.$strip>>>;
|
|
87
93
|
}, z.core.$strip>;
|
|
88
94
|
export type HeadingProps = z.infer<typeof HeadingPropsSchema>;
|
|
@@ -96,4 +102,4 @@ export declare const HeadingPropsDefaults: {
|
|
|
96
102
|
readonly openInNewTab: false;
|
|
97
103
|
};
|
|
98
104
|
export declare function Heading({ props, style }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
99
|
-
export declare function getFontSize(level: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'): 16 |
|
|
105
|
+
export declare function getFontSize(level: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'): 14 | 16 | 18 | 20 | 24 | 32;
|
|
@@ -36,9 +36,9 @@ export declare const HtmlPropsSchema: z.ZodObject<{
|
|
|
36
36
|
}>>>;
|
|
37
37
|
fontSize: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
38
38
|
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
39
|
-
right: "right";
|
|
40
|
-
left: "left";
|
|
41
39
|
center: "center";
|
|
40
|
+
left: "left";
|
|
41
|
+
right: "right";
|
|
42
42
|
}>>>;
|
|
43
43
|
padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
44
44
|
top: z.ZodNumber;
|
|
@@ -12,9 +12,9 @@ export declare const IframePropsSchema: z.ZodObject<{
|
|
|
12
12
|
left: z.ZodNumber;
|
|
13
13
|
}, z.core.$strip>>>;
|
|
14
14
|
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
15
|
-
right: "right";
|
|
16
|
-
left: "left";
|
|
17
15
|
center: "center";
|
|
16
|
+
left: "left";
|
|
17
|
+
right: "right";
|
|
18
18
|
}>>>;
|
|
19
19
|
}, z.core.$strip>>>;
|
|
20
20
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -9,9 +9,9 @@ export declare const ImagePropsSchema: z.ZodObject<{
|
|
|
9
9
|
}, z.core.$strip>>>;
|
|
10
10
|
backgroundColor: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>>;
|
|
11
11
|
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
12
|
-
right: "right";
|
|
13
|
-
left: "left";
|
|
14
12
|
center: "center";
|
|
13
|
+
left: "left";
|
|
14
|
+
right: "right";
|
|
15
15
|
}>>>;
|
|
16
16
|
}, z.core.$strip>>>;
|
|
17
17
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -37,8 +37,8 @@ export declare const ImagePropsSchema: z.ZodObject<{
|
|
|
37
37
|
decorative: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
38
38
|
linkHref: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
39
39
|
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
40
|
-
top: "top";
|
|
41
40
|
bottom: "bottom";
|
|
41
|
+
top: "top";
|
|
42
42
|
middle: "middle";
|
|
43
43
|
}>>>;
|
|
44
44
|
borderRadius: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const UNORDERED_MARKERS: readonly ["disc", "circle", "square", "dash", "arrow", "check", "cross", "none"];
|
|
3
|
+
export declare const ORDERED_MARKERS: readonly ["decimal", "decimal-zero", "lower-alpha", "upper-alpha", "lower-roman", "upper-roman"];
|
|
4
|
+
declare const ITEM_SCHEMA: z.ZodObject<{
|
|
5
|
+
text: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const ListPropsSchema: z.ZodObject<{
|
|
8
|
+
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
9
|
+
color: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>;
|
|
10
|
+
backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>;
|
|
11
|
+
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
center: "center";
|
|
13
|
+
left: "left";
|
|
14
|
+
right: "right";
|
|
15
|
+
}>>>;
|
|
16
|
+
fontSize: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
17
|
+
fontFamily: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
18
|
+
fontWeight: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
19
|
+
lineHeight: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
20
|
+
padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
21
|
+
top: z.ZodNumber;
|
|
22
|
+
bottom: z.ZodNumber;
|
|
23
|
+
right: z.ZodNumber;
|
|
24
|
+
left: z.ZodNumber;
|
|
25
|
+
}, z.core.$strip>>>;
|
|
26
|
+
margin: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
27
|
+
top: z.ZodNumber;
|
|
28
|
+
bottom: z.ZodNumber;
|
|
29
|
+
right: z.ZodNumber;
|
|
30
|
+
left: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>>>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
34
|
+
listType: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
35
|
+
ordered: "ordered";
|
|
36
|
+
unordered: "unordered";
|
|
37
|
+
}>>>;
|
|
38
|
+
marker: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
39
|
+
circle: "circle";
|
|
40
|
+
none: "none";
|
|
41
|
+
square: "square";
|
|
42
|
+
check: "check";
|
|
43
|
+
disc: "disc";
|
|
44
|
+
dash: "dash";
|
|
45
|
+
arrow: "arrow";
|
|
46
|
+
cross: "cross";
|
|
47
|
+
decimal: "decimal";
|
|
48
|
+
"decimal-zero": "decimal-zero";
|
|
49
|
+
"lower-alpha": "lower-alpha";
|
|
50
|
+
"upper-alpha": "upper-alpha";
|
|
51
|
+
"lower-roman": "lower-roman";
|
|
52
|
+
"upper-roman": "upper-roman";
|
|
53
|
+
}>>>;
|
|
54
|
+
numberSuffix: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
".": ".";
|
|
56
|
+
")": ")";
|
|
57
|
+
}>>>;
|
|
58
|
+
startNumber: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
59
|
+
markerColor: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>;
|
|
60
|
+
markerSize: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
61
|
+
itemGap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
62
|
+
items: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
63
|
+
text: z.ZodString;
|
|
64
|
+
}, z.core.$strip>>>>;
|
|
65
|
+
}, z.core.$strip>>>;
|
|
66
|
+
responsive: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
67
|
+
tablet: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
68
|
+
mobile: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
69
|
+
}, z.core.$strip>>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export type ListProps = z.infer<typeof ListPropsSchema>;
|
|
72
|
+
export type ListItem = z.infer<typeof ITEM_SCHEMA>;
|
|
73
|
+
export declare const ListPropsDefaults: {
|
|
74
|
+
readonly listType: "unordered";
|
|
75
|
+
readonly marker: "disc";
|
|
76
|
+
readonly numberSuffix: ".";
|
|
77
|
+
readonly startNumber: 1;
|
|
78
|
+
readonly markerColor: any;
|
|
79
|
+
readonly markerSize: 16;
|
|
80
|
+
readonly itemGap: 8;
|
|
81
|
+
readonly items: readonly [{
|
|
82
|
+
readonly text: "First list item";
|
|
83
|
+
}, {
|
|
84
|
+
readonly text: "Second list item";
|
|
85
|
+
}, {
|
|
86
|
+
readonly text: "Third list item";
|
|
87
|
+
}];
|
|
88
|
+
};
|
|
89
|
+
export declare function List({ style, props }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
90
|
+
export {};
|
|
@@ -9,9 +9,9 @@ export declare const LogoPropsSchema: z.ZodObject<{
|
|
|
9
9
|
}, z.core.$strip>>>;
|
|
10
10
|
backgroundColor: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>>;
|
|
11
11
|
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
12
|
-
right: "right";
|
|
13
|
-
left: "left";
|
|
14
12
|
center: "center";
|
|
13
|
+
left: "left";
|
|
14
|
+
right: "right";
|
|
15
15
|
}>>>;
|
|
16
16
|
}, z.core.$strip>>>;
|
|
17
17
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -3,9 +3,9 @@ export declare const StepperPropsSchema: z.ZodObject<{
|
|
|
3
3
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
4
4
|
backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>;
|
|
5
5
|
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
6
|
-
right: "right";
|
|
7
|
-
left: "left";
|
|
8
6
|
center: "center";
|
|
7
|
+
left: "left";
|
|
8
|
+
right: "right";
|
|
9
9
|
}>>>;
|
|
10
10
|
padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
11
11
|
top: z.ZodNumber;
|
|
@@ -13,12 +13,18 @@ export declare const StepperPropsSchema: z.ZodObject<{
|
|
|
13
13
|
right: z.ZodNumber;
|
|
14
14
|
left: z.ZodNumber;
|
|
15
15
|
}, z.core.$strip>>>;
|
|
16
|
+
margin: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
17
|
+
top: z.ZodNumber;
|
|
18
|
+
bottom: z.ZodNumber;
|
|
19
|
+
right: z.ZodNumber;
|
|
20
|
+
left: z.ZodNumber;
|
|
21
|
+
}, z.core.$strip>>>;
|
|
16
22
|
}, z.core.$strip>>>;
|
|
17
23
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
18
24
|
stepperType: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
both: "both";
|
|
19
26
|
dots: "dots";
|
|
20
27
|
numeric: "numeric";
|
|
21
|
-
both: "both";
|
|
22
28
|
}>>>;
|
|
23
29
|
totalDots: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
24
30
|
activeIndex: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -29,8 +35,8 @@ export declare const StepperPropsSchema: z.ZodObject<{
|
|
|
29
35
|
numericColor: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>;
|
|
30
36
|
numericFontSize: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
31
37
|
numericPosition: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
32
|
-
right: "right";
|
|
33
38
|
left: "left";
|
|
39
|
+
right: "right";
|
|
34
40
|
above: "above";
|
|
35
41
|
below: "below";
|
|
36
42
|
}>>>;
|
|
@@ -37,16 +37,16 @@ export declare const TextPropsSchema: z.ZodObject<{
|
|
|
37
37
|
}>>>;
|
|
38
38
|
fontWeight: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
39
39
|
bold: "bold";
|
|
40
|
+
normal: "normal";
|
|
40
41
|
400: "400";
|
|
41
42
|
500: "500";
|
|
42
43
|
600: "600";
|
|
43
44
|
700: "700";
|
|
44
|
-
normal: "normal";
|
|
45
45
|
}>>>;
|
|
46
46
|
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
47
|
-
right: "right";
|
|
48
|
-
left: "left";
|
|
49
47
|
center: "center";
|
|
48
|
+
left: "left";
|
|
49
|
+
right: "right";
|
|
50
50
|
}>>>;
|
|
51
51
|
padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
52
52
|
top: z.ZodNumber;
|
|
@@ -54,6 +54,12 @@ export declare const TextPropsSchema: z.ZodObject<{
|
|
|
54
54
|
right: z.ZodNumber;
|
|
55
55
|
left: z.ZodNumber;
|
|
56
56
|
}, z.core.$strip>>>;
|
|
57
|
+
margin: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
58
|
+
top: z.ZodNumber;
|
|
59
|
+
bottom: z.ZodNumber;
|
|
60
|
+
right: z.ZodNumber;
|
|
61
|
+
left: z.ZodNumber;
|
|
62
|
+
}, z.core.$strip>>>;
|
|
57
63
|
}, z.core.$strip>>>;
|
|
58
64
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
59
65
|
text: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -9,9 +9,9 @@ export declare const VideoPropsSchema: z.ZodObject<{
|
|
|
9
9
|
}, z.core.$strip>>>;
|
|
10
10
|
backgroundColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
11
11
|
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
12
|
-
right: "right";
|
|
13
|
-
left: "left";
|
|
14
12
|
center: "center";
|
|
13
|
+
left: "left";
|
|
14
|
+
right: "right";
|
|
15
15
|
}>>>;
|
|
16
16
|
}, z.core.$strip>>>;
|
|
17
17
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -25,8 +25,8 @@ export declare const VideoPropsSchema: z.ZodObject<{
|
|
|
25
25
|
alt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
26
26
|
linkHref: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
27
27
|
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
28
|
-
top: "top";
|
|
29
28
|
bottom: "bottom";
|
|
29
|
+
top: "top";
|
|
30
30
|
middle: "middle";
|
|
31
31
|
}>>>;
|
|
32
32
|
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -9,9 +9,9 @@ export declare const YouTubeUrlPropsSchema: z.ZodObject<{
|
|
|
9
9
|
}, z.core.$strip>>>;
|
|
10
10
|
backgroundColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
11
11
|
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
12
|
-
right: "right";
|
|
13
|
-
left: "left";
|
|
14
12
|
center: "center";
|
|
13
|
+
left: "left";
|
|
14
|
+
right: "right";
|
|
15
15
|
}>>>;
|
|
16
16
|
}, z.core.$strip>>>;
|
|
17
17
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -25,8 +25,8 @@ export declare const YouTubeUrlPropsSchema: z.ZodObject<{
|
|
|
25
25
|
alt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
26
26
|
linkHref: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
27
27
|
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
28
|
-
top: "top";
|
|
29
28
|
bottom: "bottom";
|
|
29
|
+
top: "top";
|
|
30
30
|
middle: "middle";
|
|
31
31
|
}>>>;
|
|
32
32
|
}, z.core.$strip>>>;
|
package/dist/editor/Shell.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PagePilotEditorProps } from './types';
|
|
2
|
-
export default function Shell({ record, contentMetadata, behaviour, steps, sections, activeStepIndex, panels, title, recordTitle, recordStatus, headerExtra, children, onUpdateRecord, onChange, onSaveChanges, onPublish, onPublishMenu, renderPublish, onBack, onTogglePreview, onBackgroundChange, onNavigateBranding, onAddSection, onApiError, topbar, mode, onToggleMode, }: PagePilotEditorProps & {
|
|
2
|
+
export default function Shell({ record, contentMetadata, behaviour, steps, sections, activeStepIndex, panels, title, recordTitle, recordStatus, headerExtra, children, onUpdateRecord, onChange, onSaveChanges, onPublish, onPublishMenu, renderPublish, onBack, onTogglePreview, onBackgroundChange, onNavigateBranding, onAddSection, onApiError, topbar, mode, onToggleMode, autoSaveEnabled: autoSaveEnabledProp, onAutoSaveChange, autoSaveIntervalMs, }: PagePilotEditorProps & {
|
|
3
3
|
mode?: "light" | "dark";
|
|
4
4
|
onToggleMode?: () => void;
|
|
5
5
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/editor/Topbar.d.ts
CHANGED
|
@@ -23,5 +23,9 @@ 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
|
+
/** Checked state of the Auto Save switch. */
|
|
27
|
+
autoSaveEnabled?: boolean;
|
|
28
|
+
/** Fired when the user toggles the Auto Save switch. */
|
|
29
|
+
onAutoSaveChange?: (enabled: boolean) => void;
|
|
26
30
|
}
|
|
27
|
-
export default function Topbar({ toggles, title, recordTitle, recordStatus, onBack, onSave, onPublish, onPublishMenu, publishSlot, onPreview, onToggleFullscreen, isFullscreen, onOpenMoreMenu, sectionsDropdown, mode, onToggleMode, isDirty, }: TopbarProps): import("react/jsx-runtime").JSX.Element;
|
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** All block tile keys exposed in the Add-Block menu. */
|
|
2
|
-
export type BlockKey = "heading" | "text" | "button" | "image" | "logo" | "video" | "avatar" | "divider" | "spacer" | "html" | "columns" | "flexColumns" | "grid" | "buttonGroup" | "container" | "stepper" | "accordion" | "pricingAccordion" | "tabs" | "carousel" | "rating" | "marquee" | "iframe" | "skipToMain" | "accessibilityTools" | "timer" | "pagination" | "table" | "demoPicker" | "menuPicker" | "formsPicker" | "appBannerPicker" | "faqPicker";
|
|
2
|
+
export type BlockKey = "heading" | "list" | "text" | "button" | "image" | "logo" | "video" | "avatar" | "divider" | "spacer" | "html" | "columns" | "flexColumns" | "grid" | "buttonGroup" | "container" | "stepper" | "accordion" | "pricingAccordion" | "tabs" | "carousel" | "rating" | "marquee" | "iframe" | "skipToMain" | "accessibilityTools" | "timer" | "pagination" | "table" | "demoPicker" | "menuPicker" | "formsPicker" | "appBannerPicker" | "faqPicker";
|
|
3
3
|
export type BlockToggles = Partial<Record<BlockKey, boolean>>;
|
|
4
4
|
/** Maps a block's `type` string to the BlockKey that controls its tile. */
|
|
5
5
|
export declare const BLOCK_TYPE_TO_KEY: Record<string, BlockKey>;
|
|
@@ -9,12 +9,19 @@ interface PagePublishDialogProps {
|
|
|
9
9
|
* Called when the user hits Save Draft or Publish. Should trigger the
|
|
10
10
|
* matching Shell action (`runPublishAction`) — the dialog awaits it and
|
|
11
11
|
* only closes on `true`.
|
|
12
|
+
*
|
|
13
|
+
* `injectTabsScrollSyncScript` / `injectCarouselScript` come from the
|
|
14
|
+
* Scripts & Styles tab and default to `true` (matching the published-HTML
|
|
15
|
+
* default in `renderToStaticMarkup`). Turning either OFF causes Shell to
|
|
16
|
+
* re-render the payload without inlining that runtime.
|
|
12
17
|
*/
|
|
13
18
|
onSubmit: (action: "save" | "publish", opts: {
|
|
14
19
|
schedule: {
|
|
15
20
|
startDate: Date | null;
|
|
16
21
|
endDate: Date | null;
|
|
17
22
|
};
|
|
23
|
+
injectTabsScrollSyncScript?: boolean;
|
|
24
|
+
injectCarouselScript?: boolean;
|
|
18
25
|
}) => Promise<boolean>;
|
|
19
26
|
}
|
|
20
27
|
export default function PagePublishDialog({ open, onClose, record, apiClient, onSubmit, }: PagePublishDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export interface SectionForRender {
|
|
2
|
+
sectionType?: "internal" | "external" | string;
|
|
3
|
+
content?: string;
|
|
4
|
+
contentMetadata?: {
|
|
5
|
+
document?: any;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface RenderDocumentForSaveOptions {
|
|
11
|
+
rootBlockId?: string;
|
|
12
|
+
injectTabsScrollSyncScript?: boolean;
|
|
13
|
+
injectCarouselScript?: boolean;
|
|
14
|
+
injectFontAssets?: boolean;
|
|
15
|
+
headHtml?: string;
|
|
16
|
+
bodyBottomHtml?: string;
|
|
17
|
+
isBanner?: boolean;
|
|
18
|
+
seo?: any;
|
|
19
|
+
}
|
|
20
|
+
export declare function isExternalSection(section: SectionForRender | undefined): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Same call `Shell.buildPayload` makes: `renderToStaticMarkup` with the
|
|
23
|
+
* defaults the editor persists on Save Changes (root id, ids injected,
|
|
24
|
+
* page CSS included, css minified, lang / skipLink / accessibilityTools
|
|
25
|
+
* auto-derived from the document's root data).
|
|
26
|
+
*/
|
|
27
|
+
export declare function renderDocumentForSave(document: any, options?: RenderDocumentForSaveOptions): string;
|
|
28
|
+
export interface CombineSectionsOptions extends RenderDocumentForSaveOptions {
|
|
29
|
+
/**
|
|
30
|
+
* External sections come from the API as stored `content` strings —
|
|
31
|
+
* usually `<div id="…"></div>` anchor placeholders. When true (default),
|
|
32
|
+
* that content is passed through. When false, external sections are
|
|
33
|
+
* skipped entirely.
|
|
34
|
+
*/
|
|
35
|
+
includeExternalSections?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* When false, only the concatenated fragments are returned — no
|
|
38
|
+
* `<!doctype html>` shell. Defaults to true, matching Shell.buildPayload.
|
|
39
|
+
*/
|
|
40
|
+
wrapInDocumentShell?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Overrides for the outer shell. When omitted, values come from the
|
|
43
|
+
* first internal section's EmailLayout root data.
|
|
44
|
+
*/
|
|
45
|
+
lang?: string;
|
|
46
|
+
canvasColor?: string;
|
|
47
|
+
fontFamily?: string;
|
|
48
|
+
seoTitle?: string;
|
|
49
|
+
seoDescription?: string;
|
|
50
|
+
extraHead?: string;
|
|
51
|
+
extraBodyBottom?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Render each section's document to a fragment, then stitch them into the
|
|
55
|
+
* same `<!doctype html>` shell Shell.tsx uses on Save Changes.
|
|
56
|
+
*
|
|
57
|
+
* Returns `{ html, sectionHtml, flushedSections }`:
|
|
58
|
+
* - `html`: combined document (or bare fragments when `wrapInDocumentShell` is false).
|
|
59
|
+
* - `sectionHtml`: per-section fragments in input order.
|
|
60
|
+
* - `flushedSections`: input sections with their re-rendered `content` field
|
|
61
|
+
* written back — matches the shape `Shell.buildPayload` persists in
|
|
62
|
+
* `SaveChangesPayload.record.sections`.
|
|
63
|
+
*/
|
|
64
|
+
export declare function combineSectionsToHtml(sections: SectionForRender[], options?: CombineSectionsOptions): {
|
|
65
|
+
html: string;
|
|
66
|
+
sectionHtml: string[];
|
|
67
|
+
flushedSections: SectionForRender[];
|
|
68
|
+
};
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -83,6 +83,15 @@ export interface TopbarToggles {
|
|
|
83
83
|
*/
|
|
84
84
|
unselect?: boolean;
|
|
85
85
|
save?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* "Auto Save" switch in the topbar. When on, the editor persists
|
|
88
|
+
* unsaved changes on a fixed interval by re-running the same handler
|
|
89
|
+
* the Save Changes button uses. Defaults to `false` — hosts opt in
|
|
90
|
+
* per-editor. Whether the switch is *checked* is controlled by
|
|
91
|
+
* `autoSaveEnabled` (or the built-in localStorage fallback when the
|
|
92
|
+
* host leaves it unset).
|
|
93
|
+
*/
|
|
94
|
+
autoSave?: boolean;
|
|
86
95
|
/**
|
|
87
96
|
* Desktop / Tablet / Mobile icon toggle that constrains the canvas
|
|
88
97
|
* preview width and keeps the sidebar's per-device tabs in sync. Same
|
|
@@ -192,6 +201,25 @@ export interface PagePilotEditorProps {
|
|
|
192
201
|
onBackgroundChange?: (image: string) => void;
|
|
193
202
|
onNavigateBranding?: () => void;
|
|
194
203
|
onAddSection?: () => void;
|
|
204
|
+
/**
|
|
205
|
+
* Controlled value for the Auto Save switch. When set, the host owns
|
|
206
|
+
* the checked state and must update it via `onAutoSaveChange`. When
|
|
207
|
+
* left `undefined`, the switch runs uncontrolled with a localStorage-
|
|
208
|
+
* backed default so the user's choice survives a reload.
|
|
209
|
+
*/
|
|
210
|
+
autoSaveEnabled?: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Fired when the user flips the Auto Save switch. Receives the new
|
|
213
|
+
* checked state. Called for both controlled and uncontrolled use so
|
|
214
|
+
* hosts can persist / mirror the flag if they want to.
|
|
215
|
+
*/
|
|
216
|
+
onAutoSaveChange?: (enabled: boolean) => void;
|
|
217
|
+
/**
|
|
218
|
+
* Autosave interval in milliseconds. Defaults to 60000 (60s), matching
|
|
219
|
+
* ahd-fe. Set to `0` to disable the interval while still showing the
|
|
220
|
+
* switch — useful for tests.
|
|
221
|
+
*/
|
|
222
|
+
autoSaveIntervalMs?: number;
|
|
195
223
|
headerExtra?: ReactNode;
|
|
196
224
|
children?: ReactNode;
|
|
197
225
|
}
|
|
@@ -4,6 +4,12 @@ type PaddingValue = {
|
|
|
4
4
|
bottom: number;
|
|
5
5
|
left: number;
|
|
6
6
|
};
|
|
7
|
+
type MarginValue = {
|
|
8
|
+
top: number;
|
|
9
|
+
right: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
left: number;
|
|
12
|
+
};
|
|
7
13
|
type Props = {
|
|
8
14
|
data: {
|
|
9
15
|
props: {
|
|
@@ -11,6 +17,7 @@ type Props = {
|
|
|
11
17
|
bannerName?: string | null;
|
|
12
18
|
contentHtml?: string | null;
|
|
13
19
|
padding?: PaddingValue | null;
|
|
20
|
+
margin?: MarginValue | null;
|
|
14
21
|
};
|
|
15
22
|
};
|
|
16
23
|
setData: (data: any) => void;
|
|
@@ -4,12 +4,19 @@ type PaddingValue = {
|
|
|
4
4
|
bottom: number;
|
|
5
5
|
left: number;
|
|
6
6
|
};
|
|
7
|
+
type MarginValue = {
|
|
8
|
+
top: number;
|
|
9
|
+
right: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
left: number;
|
|
12
|
+
};
|
|
7
13
|
type Props = {
|
|
8
14
|
data: {
|
|
9
15
|
props: {
|
|
10
16
|
faqGroupId: string;
|
|
11
17
|
faqGroupName?: string | null;
|
|
12
18
|
padding?: PaddingValue | null;
|
|
19
|
+
margin?: MarginValue | null;
|
|
13
20
|
};
|
|
14
21
|
};
|
|
15
22
|
setData: (data: any) => void;
|
package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/ListSidebarPanel.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ListProps } from '../../../../../blocks-internal/block-list/src/index.tsx';
|
|
2
|
+
type Props = {
|
|
3
|
+
data: ListProps;
|
|
4
|
+
setData: (value: ListProps) => void;
|
|
5
|
+
};
|
|
6
|
+
export default function ListSidebarPanel({ data, setData }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -4,10 +4,10 @@ export declare const PanelRoot: import('@emotion/styled').StyledComponent<import
|
|
|
4
4
|
export declare const PanelHeader: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<Theme>> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
5
5
|
export declare const PanelContent: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<Theme>> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
6
6
|
export declare const HeaderBox: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<Theme>> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
7
|
-
export declare const HeaderTitle: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "children" | "
|
|
7
|
+
export declare const HeaderTitle: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "children" | "className" | "style" | "classes" | "color" | "fontSize" | "sx" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
8
8
|
export declare const ClipboardBar: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<Theme>> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
9
9
|
export declare const ActionSpan: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
10
|
-
export declare const ActionButton: import('@emotion/styled').StyledComponent<import('@mui/material').ButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "
|
|
10
|
+
export declare const ActionButton: import('@emotion/styled').StyledComponent<import('@mui/material').ButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "className" | "style" | "classes" | "color" | "sx" | "tabIndex" | "href" | "action" | "disabled" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "loading" | "loadingIndicator" | "disableElevation" | "endIcon" | "fullWidth" | "loadingPosition" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
11
11
|
export declare const connectorVLineSx: (depth: number, isLast: boolean, INDENT: number) => SxProps<Theme>;
|
|
12
12
|
export declare const connectorHLineSx: (depth: number, INDENT: number) => SxProps<Theme>;
|
|
13
13
|
export declare const rowSx: (depth: number, INDENT: number, isSelected: boolean, dropPos: "before" | "after" | "inside" | null) => SxProps<Theme>;
|
|
@@ -10,8 +10,13 @@ export interface TemplateRow {
|
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
}
|
|
12
12
|
interface TemplatesListProps {
|
|
13
|
-
/** Fetch a paginated slice from the templates endpoint.
|
|
14
|
-
|
|
13
|
+
/** Fetch a paginated slice from the templates endpoint. The `opts.blocksOnly`
|
|
14
|
+
* flag is toggled by the Templates/Blocks switch above the list — callers
|
|
15
|
+
* translate it into whichever `type` filter their backend expects
|
|
16
|
+
* (typically `type: 'block'` vs `type: 'page'`). */
|
|
17
|
+
fetchPage: (offset: number, limit: number, opts?: {
|
|
18
|
+
blocksOnly?: boolean;
|
|
19
|
+
}) => Promise<PageListResponse>;
|
|
15
20
|
/** Fetch a single template's full record (with `configuration`). */
|
|
16
21
|
fetchOne: (id: string) => Promise<TemplateRow>;
|
|
17
22
|
/** Optional delete handler — shown as a hover-icon on each card. */
|
|
@@ -22,8 +27,16 @@ interface TemplatesListProps {
|
|
|
22
27
|
emptyMessage?: string;
|
|
23
28
|
/** Empty-state message when a search returned no results. */
|
|
24
29
|
emptySearchMessage?: string;
|
|
30
|
+
/** Show the Templates/Blocks toggle above the list. Only useful for the
|
|
31
|
+
* global templates catalog (blocks aren't a concept on the Saved tab). */
|
|
32
|
+
showBlocksToggle?: boolean;
|
|
33
|
+
/** Enables sessionStorage caching for rows. Distinct callers (global vs
|
|
34
|
+
* saved) should pass distinct keys so their lists don't clobber each
|
|
35
|
+
* other. The current viewMode (templates/blocks) is folded in
|
|
36
|
+
* automatically. */
|
|
37
|
+
cacheKey?: string;
|
|
25
38
|
}
|
|
26
|
-
export default function TemplatesList({ fetchPage, fetchOne, onDelete, searchPlaceholder, emptyMessage, emptySearchMessage, }: TemplatesListProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export default function TemplatesList({ fetchPage, fetchOne, onDelete, searchPlaceholder, emptyMessage, emptySearchMessage, showBlocksToggle, cacheKey, }: TemplatesListProps): import("react/jsx-runtime").JSX.Element;
|
|
27
40
|
/**
|
|
28
41
|
* Bind a TemplatesList to the global-template endpoint. Filters to
|
|
29
42
|
* `type: 'page'` on the wire so the browsable list only shows templates
|
|
@@ -38,7 +51,9 @@ export default function TemplatesList({ fetchPage, fetchOne, onDelete, searchPla
|
|
|
38
51
|
export declare function GlobalTemplatesList({ client, }: {
|
|
39
52
|
client?: PagepilotApiClient | null;
|
|
40
53
|
}): import("react/jsx-runtime").JSX.Element;
|
|
41
|
-
/** Bind a TemplatesList to the per-tenant
|
|
54
|
+
/** Bind a TemplatesList to the per-tenant private templates endpoint. Mirrors
|
|
55
|
+
* ahd-fe's `useInfinitePrivateTemplates`, which hits `/tenant/:id/template`
|
|
56
|
+
* with `visibility: 'private'` (NOT `/mytemplate`). */
|
|
42
57
|
export declare function SavedTemplatesList({ client }: {
|
|
43
58
|
client: PagepilotApiClient;
|
|
44
59
|
}): import("react/jsx-runtime").JSX.Element;
|