pagepilot-visual-editor 1.0.28 → 1.0.30
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/CHANGELOG.md +96 -0
- package/README.md +42 -28
- package/dist/PagePilotEditor.d.ts +12 -9
- package/dist/api/ApiClientContext.d.ts +1 -0
- package/dist/api/PagepilotApiClient.d.ts +7 -0
- package/dist/assets/aiChatbotIcon.d.ts +1 -0
- package/dist/blocks-internal/block-container/src/index.d.ts +1 -1
- package/dist/blocks-internal/block-heading/src/index.d.ts +1 -1
- package/dist/blocks-internal/block-list/src/index.d.ts +11 -1
- package/dist/blocks-internal/block-mdx/src/index.d.ts +47 -0
- package/dist/blocks-internal/block-quill/src/index.d.ts +48 -0
- package/dist/editor/PagePreviewDialog.d.ts +14 -0
- package/dist/editor/Topbar.d.ts +3 -1
- package/dist/editor/pageUrls.d.ts +25 -0
- package/dist/editor/publish/PageLiveSuccessDialog.d.ts +9 -0
- package/dist/editor/publish/PagePublishDialog.d.ts +1 -0
- package/dist/editor/publish/PublishAccessibilityPanel.d.ts +8 -0
- package/dist/editor/publish/a11yLinter.d.ts +8 -0
- package/dist/editor/recordDirty.d.ts +16 -0
- package/dist/editor/renderSections.d.ts +2 -2
- package/dist/editor/savePipeline.d.ts +40 -0
- package/dist/editor/types.d.ts +35 -0
- package/dist/editor-sample/App/InspectorDrawer/BehaviourPanel.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandColorPalette.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandEmptyLink.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandPanel.styled.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandSection.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/EmptyText.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/FontDetailsList.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/index.d.ts +5 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/useBrandApply.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/ResponsiveDeviceTabs.d.ts +0 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/blockStyleClipboard.d.ts +2 -8
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/index.d.ts +1 -4
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts +2 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FlexColumns/ColumnSection.d.ts +2 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FormsPickerSidebarPanel.d.ts +2 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MdxSidebarPanel.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MenuPickerSidebarPanel.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/QuillSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.d.ts +2 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/AnimationSection.d.ts +7 -5
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/HoverEffectSection.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/imageSizeUnit.d.ts +19 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Picker.d.ts +0 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/VariableLinkHint.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/EditorBehavior.d.ts +8 -2
- package/dist/editor-sample/App/InspectorDrawer/LayersPanelStyles.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/AiSupportedBadge.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/SectionsModal.d.ts +2 -10
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/icons/index.d.ts +3 -5
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/templateHelpers.d.ts +226 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/useDebouncedValue.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/AiFillAllDialog.d.ts +21 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/AiGenerateButton.d.ts +14 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/ScalarFieldRow.d.ts +4 -1
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/VariableGroupDialog.d.ts +19 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/VariableGroupList.d.ts +5 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/aiFill.d.ts +36 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/styles.d.ts +14 -11
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/upgradeDialog.d.ts +8 -8
- package/dist/editor-sample/App/InspectorDrawer/behaviourFields.d.ts +30 -0
- package/dist/editor-sample/App/InspectorDrawer/index.d.ts +8 -1
- package/dist/editor-sample/App/InspectorDrawer/publish/BackgroundPanel.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/renderBehaviourField.d.ts +7 -0
- package/dist/editor-sample/App/TemplatePanel/hooks/useMainBoxStyles.d.ts +2 -1
- package/dist/editor-sample/App/TemplatePanel/index.d.ts +2 -1
- package/dist/editor-sample/App/TemplatePanel/minimap/useMiniMapSync.d.ts +2 -2
- package/dist/editor-sample/App/hooks/page/saveMenuHrefEdits.d.ts +1 -1
- package/dist/editor-sample/App/hooks/page/useSaveHandler.d.ts +1 -0
- package/dist/editor-sample/App/hooks/useAutosave.d.ts +8 -3
- package/dist/editor-sample/App/hooks/useIsTemplateEditorRoute.d.ts +1 -0
- package/dist/editor-sample/App/hooks/useStretch.d.ts +9 -0
- package/dist/editor-sample/App/shared/UploadImage.d.ts +4 -0
- package/dist/editor-sample/App/shared/editor.styles.d.ts +11 -1
- package/dist/editor-sample/documents/blocks/Container/ContainerPropsSchema.d.ts +6 -4
- package/dist/editor-sample/documents/blocks/FormsPicker/FormsPropsSchema.d.ts +33 -2
- package/dist/editor-sample/documents/blocks/List/ListEditor.d.ts +8 -0
- package/dist/editor-sample/documents/blocks/Marquee/MarqueePropsSchema.d.ts +4 -0
- package/dist/editor-sample/documents/blocks/MenuPicker/MenuPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/Table/TableCellEditor.d.ts +2 -1
- package/dist/editor-sample/documents/blocks/Table/TableImportDialog.styles.d.ts +11 -1
- package/dist/editor-sample/documents/blocks/Table/parseClipboardTable.d.ts +7 -0
- package/dist/editor-sample/documents/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/Timer/TimerPropsSchema.d.ts +2 -0
- package/dist/editor-sample/documents/blocks/Timer/variants/CircularProgressView.d.ts +2 -1
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/blockMenuStyles.d.ts +1 -1
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/brandButtonDefaults.d.ts +1 -4
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.d.ts +0 -6
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/dialogs/LinkDialog.d.ts +4 -1
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useToolbarCommands.d.ts +16 -4
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/styles.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/types.d.ts +2 -4
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/EditorBlockWrapper.d.ts +2 -3
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/TuneMenu.styles.d.ts +17 -0
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/saveAsTemplateUtils.d.ts +29 -1
- package/dist/editor-sample/documents/blocks/helpers/documentUtils.d.ts +33 -26
- package/dist/editor-sample/documents/blocks/helpers/variableBinding.d.ts +9 -0
- package/dist/editor-sample/documents/editor/EditorBlock.d.ts +2 -6
- package/dist/editor-sample/documents/editor/EditorContext.d.ts +77 -20
- package/dist/editor-sample/documents/editor/LazyEditorBlock.d.ts +1 -0
- package/dist/editor-sample/documents/editor/core.d.ts +492 -390
- package/dist/editor-sample/documents/editor/templateVariables.d.ts +151 -14
- package/dist/editor-sample/documents/editor/useRootFontFamily.d.ts +10 -0
- package/dist/editor-sample/utils/editorStorageKey.d.ts +2 -0
- package/dist/editor-sample/utils/localStoragePref.d.ts +2 -0
- package/dist/email-builder-core/blocks/Container/ContainerPropsSchema.d.ts +1 -1
- package/dist/email-builder-core/blocks/EmailLayout/EmailLayoutReader.d.ts +1 -1
- package/dist/email-builder-core/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
- package/dist/email-builder-core/blocks/Timer/variants/CircularProgressView.d.ts +5 -1
- package/dist/email-builder-core/blocks/Timer/variants/DigitalFlipView.d.ts +4 -1
- package/dist/email-builder-core/blocks/Timer/variants/TextInlineView.d.ts +3 -1
- package/dist/email-builder-core/blocks/helpers/blockStyleHelpers.d.ts +22 -0
- package/dist/email-builder-core/renderers/pageScripts.d.ts +0 -1
- package/dist/email-builder-core/renderers/themeTokens.d.ts +5 -126
- package/dist/host-stubs/history.d.ts +5 -0
- package/dist/host-stubs/hooks/useTenantFeatureCutoff.d.ts +8 -0
- package/dist/host-stubs/hooks/useTenantPlan.d.ts +18 -0
- package/dist/host-stubs/i18nAhdDefaults.d.ts +1 -0
- package/dist/host-stubs/modules/auth/authCurrentTenant.d.ts +6 -0
- package/dist/host-stubs/modules/forms/formsService.d.ts +3 -1
- package/dist/host-stubs/modules/forms/useFormsList.d.ts +4 -1
- package/dist/host-stubs/modules/menu/menuService.d.ts +4 -0
- package/dist/host-stubs/modules/page/pageService.d.ts +11 -0
- package/dist/host-stubs/modules/settings/settingsActions.d.ts +2 -0
- package/dist/host-stubs/modules/settings/settingsSelectors.d.ts +4 -0
- package/dist/host-stubs/modules/shared/axios/authAxios.d.ts +16 -0
- package/dist/host-stubs/modules/shared/constants.d.ts +14 -0
- package/dist/host-stubs/modules/store.d.ts +4 -0
- package/dist/host-stubs/modules/template/templateEnumerators.d.ts +19 -0
- package/dist/host-stubs/modules/tour/injectTourIntoPage.d.ts +20 -0
- package/dist/host-stubs/style/icons.d.ts +57 -0
- package/dist/host-stubs/utils/dateFormats.d.ts +1 -0
- package/dist/host-stubs/view/branding/brandDefaultFont.d.ts +3 -1
- package/dist/host-stubs/view/branding/styles/BrandIcons.d.ts +9 -0
- package/dist/host-stubs/view/branding/styles/types.d.ts +76 -0
- package/dist/host-stubs/view/configurations/ConfigurationIcons.d.ts +9 -0
- package/dist/host-stubs/view/demo/DemoIcons.d.ts +9 -0
- package/dist/host-stubs/view/images/Icons.d.ts +6 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/types.d.ts +47 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/utils/fileUtils.d.ts +3 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/utils/mediaTypes.d.ts +9 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog.d.ts +12 -2
- package/dist/host-stubs/view/media/styles/MediaIcons.d.ts +13 -0
- package/dist/host-stubs/view/shared/Confetti.d.ts +5 -0
- package/dist/host-stubs/view/shared/PagePilotLoader.d.ts +2 -0
- package/dist/host-stubs/view/shared/UpgradeDialog/UpgradeDialogContext.d.ts +1 -0
- package/dist/host-stubs/view/shared/common/CopyToClipboard.d.ts +7 -0
- package/dist/host-stubs/view/shared/editors/MdxEditor.d.ts +8 -0
- package/dist/host-stubs/view/shared/editors/QuillEditor.d.ts +3 -0
- package/dist/host-stubs/view/shared/editors/sanitize.d.ts +4 -0
- package/dist/host-stubs/view/shared/editors/types.d.ts +7 -0
- package/dist/host-stubs/view/shared/media/TemplatePreviewMedia.d.ts +29 -0
- package/dist/host-stubs/view/shared/modals/ConfigureDialog.d.ts +7 -0
- package/dist/host-stubs/view/shared/modals/ManageTemplateModal.d.ts +5 -0
- package/dist/host-stubs/view/shared/speech/index.d.ts +17 -0
- package/dist/host-stubs/view/shared/styles/Table.styles.d.ts +3 -0
- package/dist/host-stubs/view/template/form/TemplateFormModal.d.ts +10 -0
- package/dist/host-stubs/view/template/form/fields/types.d.ts +7 -0
- package/dist/{index-DcN8zC8_.js → index-B8pdGALF.js} +86258 -73803
- package/dist/{index-SYmY8c1I.cjs → index-C-KL2oQP.cjs} +1 -1
- package/dist/{index-Cp5AeqH5.js → index-CStZQ7E0.js} +1 -1
- package/dist/index-DVx38kGU.cjs +1553 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/render-core/combineSections.d.ts +33 -3
- package/dist/render-core/dateFormats.d.ts +14 -3
- package/dist/render-core/stubs/pickerEmptyState.d.ts +2 -0
- package/dist/render-core/stubs/styleIcons.d.ts +1 -0
- package/dist/render.cjs +281 -219
- package/dist/render.js +9858 -8266
- package/dist/style.css +1 -1
- package/dist/{xlsx-vznvhtjT.cjs → xlsx-DUs4Mvqq.cjs} +1 -1
- package/dist/{xlsx-Bk2GErZO.js → xlsx-bYU68TCR.js} +1 -1
- package/package.json +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/ResponsiveEditingBanner.d.ts +0 -13
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/BoxShadowControls.d.ts +0 -19
- package/dist/editor-sample/documents/blocks/AppBannerPicker/appBanner.styled.d.ts +0 -2
- package/dist/email-builder-core/blocks/boxShadowSchema.d.ts +0 -23
- package/dist/index-Br_dDd3Z.cjs +0 -1493
|
@@ -1 +1,227 @@
|
|
|
1
1
|
export declare const generateBlockId: () => string;
|
|
2
|
+
/**
|
|
3
|
+
* Return the authored `formFields` for a template record no matter where the
|
|
4
|
+
* record stashes them. The save flow now writes fields exclusively inside
|
|
5
|
+
* `configuration` — page templates on `configuration.root.data.formFields`,
|
|
6
|
+
* block templates on `configuration.formFields`, tour/demo per step under
|
|
7
|
+
* `configuration.steps[i].contentMetadata.document.root.data.formFields`,
|
|
8
|
+
* tooltip on `configuration.step.contentMetadata.document.root.data.formFields`,
|
|
9
|
+
* and carousel per slide under `configuration.slides[i].…`. Older templates
|
|
10
|
+
* still keep a top-level `templateRecord.formFields` mirror; we check that as
|
|
11
|
+
* a fallback so applying legacy records keeps working. The order below
|
|
12
|
+
* matters: the fresher, configuration-scoped location wins over the legacy
|
|
13
|
+
* mirror. Multi-slot shapes concatenate every slot's fields (dedup by id)
|
|
14
|
+
* because apply operates on the whole template, not one step at a time.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveTemplateFormFields(templateRecord: any): any[];
|
|
17
|
+
/**
|
|
18
|
+
* Unwraps a saved template's `configuration` down to the raw document
|
|
19
|
+
* (`{root, ...}`) that `applyFullDocumentTemplate`/`applyTemplateStylesOnly`
|
|
20
|
+
* expect. Saved templates for multi-slide/step types wrap the document as
|
|
21
|
+
* `{type, slides: [{contentMetadata}]}` (app-banner — slides is an array) or
|
|
22
|
+
* `{type, step: {contentMetadata}}` (tooltip — step is a single object, not
|
|
23
|
+
* an array); page/faq wrap it as `{type, content: {contentMetadata}}`. Tour
|
|
24
|
+
* templates are handled separately via applyTourTemplate and never reach
|
|
25
|
+
* this helper.
|
|
26
|
+
*
|
|
27
|
+
* Backward compatible with templates saved before this wrapping existed,
|
|
28
|
+
* where `configuration` was already the raw document (or, briefly, a full
|
|
29
|
+
* un-trimmed step/slide object carrying `contentMetadata` alongside other
|
|
30
|
+
* fields) — every branch checks `configuration.root` first and returns it
|
|
31
|
+
* as-is before attempting to unwrap, so older records are never mistaken
|
|
32
|
+
* for the new wrapped shape.
|
|
33
|
+
*/
|
|
34
|
+
export declare const normalizeTemplateConfiguration: (configuration: any, effectivePageType: string, isTypeDemo: boolean) => any;
|
|
35
|
+
/**
|
|
36
|
+
* Rewrite all internal child-id references inside a single block using `idMapping`.
|
|
37
|
+
* Exported so callers (e.g. SectionsModal) can reuse the same remapping logic
|
|
38
|
+
* without duplicating the switch/case.
|
|
39
|
+
*/
|
|
40
|
+
export declare function remapBlockChildIds(block: any, idMapping: Record<string, string>): any;
|
|
41
|
+
/**
|
|
42
|
+
* Given a `blocks` map and an `idMapping` (oldId → newId), deep-clone every
|
|
43
|
+
* block, remap its child references, and return the new blocks map.
|
|
44
|
+
*/
|
|
45
|
+
export declare function remapBlocks(blocks: Record<string, any>, idMapping: Record<string, string>): Record<string, any>;
|
|
46
|
+
export declare const applyIndividualBlockTemplate: (configuration: any, document: any, resetDocument: (doc: any) => void, replace?: boolean) => {
|
|
47
|
+
idMapping: {
|
|
48
|
+
[oldId: string]: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Remap a saved template's container-repeat fields onto a destination document.
|
|
53
|
+
* `sourceBlockId` is rewritten to the new (remapped) block id.
|
|
54
|
+
*
|
|
55
|
+
* `rowIds` carry the OTHER existing container blocks the author wired as extra
|
|
56
|
+
* rows (e.g. grid cell 2, carousel slide 3 — "Other blocks already on the
|
|
57
|
+
* canvas"). They are remapped through `idMapping` too so each pre-existing block
|
|
58
|
+
* keeps its own row + default values after apply. Any rowId not in the mapping
|
|
59
|
+
* (its block didn't come along) is dropped, and its matching `value` row with it.
|
|
60
|
+
*
|
|
61
|
+
* Non-repeat fields pass through unchanged. Repeat fields whose source isn't in
|
|
62
|
+
* the idMapping are dropped (their block didn't come along).
|
|
63
|
+
*/
|
|
64
|
+
export declare function remapTemplateFormFields(formFields: any, idMapping: {
|
|
65
|
+
[oldId: string]: string;
|
|
66
|
+
}): any[];
|
|
67
|
+
/**
|
|
68
|
+
* Replace the current session's formFields with the incoming template's fields,
|
|
69
|
+
* then jump to the Variables tab. Used by "Choose design" / full template apply
|
|
70
|
+
* — a fresh slate. Shared by SavedTemplates, Templates, and SectionsModal so the
|
|
71
|
+
* Variables panel reliably surfaces the fields (it only renders what's written
|
|
72
|
+
* into editor state via setTemplateForms — not fields sitting on the API record).
|
|
73
|
+
*
|
|
74
|
+
* `idMapping` is required when the apply path remaps block ids (individual-block
|
|
75
|
+
* apply); it rewrites container-repeat fields' `sourceBlockId` so the applied
|
|
76
|
+
* container stays repeatable from the Variables tab.
|
|
77
|
+
*/
|
|
78
|
+
export declare function mergeTemplateFormFields(templateRecord: any, idMapping?: {
|
|
79
|
+
[oldId: string]: string;
|
|
80
|
+
}): void;
|
|
81
|
+
/**
|
|
82
|
+
* Merge incoming formFields into the existing ones. Used by "Add this section"
|
|
83
|
+
* so adding Template B that shares {{name}} with Template A keeps the typed
|
|
84
|
+
* value and only appends B's new fields. Then jumps to Variables.
|
|
85
|
+
*
|
|
86
|
+
* Two dedupe rules — different because these fields mean different things:
|
|
87
|
+
*
|
|
88
|
+
* - Scalar / plain-array fields are dedupe'd by `id`. A page-level `{{name}}`
|
|
89
|
+
* is a single slot; inserting Template B that also references `{{name}}`
|
|
90
|
+
* should reuse Template A's (possibly user-filled) value, not stomp it.
|
|
91
|
+
*
|
|
92
|
+
* - Container-repeat fields (`type === 'array' && sourceBlockId`) are dedupe'd
|
|
93
|
+
* by `sourceBlockId`. Each such field is scoped to ONE container instance
|
|
94
|
+
* (a specific Grid / FlexColumns / Carousel), and its `sourceBlockId` gets
|
|
95
|
+
* remapped per insertion. Inserting a testimonial section twice produces
|
|
96
|
+
* two independent grid instances; BOTH need their own field or the second
|
|
97
|
+
* grid's `{{this.subField}}` tokens can't find their row in
|
|
98
|
+
* `buildRepeatRowIndex` (which keys off sourceBlockId/rowIds) and render as
|
|
99
|
+
* bare pills. Same-token-id but different sourceBlockId → different field.
|
|
100
|
+
*
|
|
101
|
+
* When a new container-repeat field's id collides with an already-registered
|
|
102
|
+
* field (either a scalar sharing that name, or the same section inserted
|
|
103
|
+
* before), we suffix the id with its sourceBlockId so `buildContext` doesn't
|
|
104
|
+
* silently overwrite the earlier field. Sub-field tokens (`{{this.X}}`) are
|
|
105
|
+
* resolved via the row index by block id, so they don't care about the outer
|
|
106
|
+
* field's id.
|
|
107
|
+
*/
|
|
108
|
+
export declare function appendTemplateFormFields(templateRecord: any, idMapping?: {
|
|
109
|
+
[oldId: string]: string;
|
|
110
|
+
}): void;
|
|
111
|
+
export declare const applyFullDocumentTemplate: (configuration: any, document: any, resetDocument: (doc: any) => void) => void;
|
|
112
|
+
/**
|
|
113
|
+
* "Change template": apply the incoming template's styling — both the root
|
|
114
|
+
* canvas AND every individual block (menu, header, buttons, images, etc.) —
|
|
115
|
+
* while leaving user content and structure exactly as they were.
|
|
116
|
+
*
|
|
117
|
+
* Root overlay: root-level style keys copied via `PURE_STYLE_KEYS` (the wide
|
|
118
|
+
* list — "Change template" is the confirm-gated aggressive restyle).
|
|
119
|
+
* Per-block overlay: `overlayBlockStylesFromTemplate`.
|
|
120
|
+
*
|
|
121
|
+
* Confirmation copy the user sees before this fires:
|
|
122
|
+
* "You can change the template, but please note that only the common
|
|
123
|
+
* fields will be retained; any unused data will be removed."
|
|
124
|
+
* "Common fields" is the form-fields half — see
|
|
125
|
+
* `mergeTemplateFormFieldsPreservingValues`.
|
|
126
|
+
*/
|
|
127
|
+
export declare const applyChangeTemplate: (configuration: any, document: any, resetDocument: (doc: any) => void) => void;
|
|
128
|
+
/**
|
|
129
|
+
* Sidebar-side counterpart to `applyChangeTemplate`. The user's blocks
|
|
130
|
+
* stay on the canvas, so any `{{token}}` they already contain must keep
|
|
131
|
+
* a matching form-field entry — otherwise the token renders as an unbound
|
|
132
|
+
* "Add X" pill. This helper therefore takes the union approach:
|
|
133
|
+
*
|
|
134
|
+
* - Every existing form field the user has is retained VERBATIM (id,
|
|
135
|
+
* type, value, everything). Tokens keep resolving to the values the
|
|
136
|
+
* user typed.
|
|
137
|
+
* - Any field the incoming template defines that the user doesn't
|
|
138
|
+
* already have is appended with its prefilled default. New template
|
|
139
|
+
* structure that references brand-new tokens still lights up.
|
|
140
|
+
* - Nothing is deleted. "Unused data will be removed" from the confirm
|
|
141
|
+
* copy cannot apply here: removing a field whose token still lives
|
|
142
|
+
* on the canvas would break the very content we just promised not
|
|
143
|
+
* to touch.
|
|
144
|
+
*
|
|
145
|
+
* Container-repeat fields (`type === 'array'` with `sourceBlockId`)
|
|
146
|
+
* follow the same "already there? keep it" rule; the underlying
|
|
147
|
+
* container blocks weren't remapped by `applyChangeTemplate`, so
|
|
148
|
+
* `sourceBlockId` and `rowIds` stay valid.
|
|
149
|
+
*/
|
|
150
|
+
export declare function mergeTemplateFormFieldsPreservingValues(templateRecord: any): void;
|
|
151
|
+
/**
|
|
152
|
+
* "Use this Styles" for non-tour modules (pages, FAQ, app-banner, tooltip,
|
|
153
|
+
* template). Applies the template's styling — the root canvas AND every
|
|
154
|
+
* individual block (header, buttons, images, …) — while leaving the user's
|
|
155
|
+
* content and structure exactly as they were: text, links, image URLs, layout,
|
|
156
|
+
* block count and order are all untouched. Only visual props move (colours,
|
|
157
|
+
* typography, borders, spacing, alignment).
|
|
158
|
+
*
|
|
159
|
+
* Root: overlays the stricter `STYLE_ONLY_ROOT_KEYS` (typography / colours /
|
|
160
|
+
* border), then re-pins every user-owned root key via `preserveUserRootKeys`
|
|
161
|
+
* so the canvas geometry, background, CTA-existence and block list stay the
|
|
162
|
+
* user's — the page never resizes and no root CTA button appears/moves.
|
|
163
|
+
*
|
|
164
|
+
* Per-block: `overlayBlockStylesFromTemplate` — same donor-matching + prop
|
|
165
|
+
* overlay "Change template" uses; nothing is added, removed or re-keyed.
|
|
166
|
+
*
|
|
167
|
+
* History: a much older version of this function matched blocks by type,
|
|
168
|
+
* replaced each with the template's, and DELETED every unmatched block —
|
|
169
|
+
* clicking "Use this Styles" silently rewrote button labels / image URLs /
|
|
170
|
+
* column structure. `overlayStyle` + `CONTENT_AND_STRUCTURAL_KEYS` is what
|
|
171
|
+
* keeps the current version content-safe.
|
|
172
|
+
*/
|
|
173
|
+
export declare const applyTemplateStylesOnly: (configuration: any, document: any, resetDocument: (doc: any) => void) => void;
|
|
174
|
+
export declare const applyTourTemplateStylesOnly: (configuration: any, record: any, activeStepIndex: number, onUpdateRecord: (record: any) => void, resetDocumentFn: (doc: any, options?: {
|
|
175
|
+
sideEffect?: {
|
|
176
|
+
undo: () => void;
|
|
177
|
+
redo: () => void;
|
|
178
|
+
};
|
|
179
|
+
}) => void) => void;
|
|
180
|
+
/**
|
|
181
|
+
* "Add this section" for a tour template. Replaces the ACTIVE step's
|
|
182
|
+
* document with the template's first step's document, while preserving the
|
|
183
|
+
* existing step's user-configured metadata (title, selector, behaviour,
|
|
184
|
+
* background). Other tour steps are untouched.
|
|
185
|
+
*
|
|
186
|
+
* Why "replace document, keep metadata":
|
|
187
|
+
* - The user has already set up the step's selector / position /
|
|
188
|
+
* behaviour for their app — those describe WHERE the tooltip anchors,
|
|
189
|
+
* not WHAT it says. A new visual design shouldn't lose that.
|
|
190
|
+
* - The template's CONTENT (blocks, layout, root style) is exactly what
|
|
191
|
+
* the user is opting into when they pick a design preview.
|
|
192
|
+
*
|
|
193
|
+
* Falling through to `appendFullDocumentTemplate` here (the previous
|
|
194
|
+
* behaviour) merged the template's blocks INTO the user's existing
|
|
195
|
+
* content, doubling what's on the canvas. "Add this section" should hand
|
|
196
|
+
* over a clean section, not stack two on top of each other.
|
|
197
|
+
*/
|
|
198
|
+
export declare const replaceCurrentStepFromTourTemplate: (configuration: any, record: any, activeStepIndex: number, onUpdateRecord: (record: any) => void, resetDocumentFn: (doc: any, options?: {
|
|
199
|
+
sideEffect?: {
|
|
200
|
+
undo: () => void;
|
|
201
|
+
redo: () => void;
|
|
202
|
+
};
|
|
203
|
+
}) => void) => void;
|
|
204
|
+
export declare const applyTourTemplate: (configuration: any, record: any, activeStepIndex: number, onUpdateRecord: (record: any) => void, resetDocumentFn: (doc: any, options?: {
|
|
205
|
+
sideEffect?: {
|
|
206
|
+
undo: () => void;
|
|
207
|
+
redo: () => void;
|
|
208
|
+
};
|
|
209
|
+
}) => void) => void;
|
|
210
|
+
/**
|
|
211
|
+
* "Use this template" for app-banner (carousel) templates. Mirrors
|
|
212
|
+
* `applyTourTemplate` exactly, but keyed on `slides` instead of `steps` —
|
|
213
|
+
* app-banner carousels are multi-slide the same way tours are multi-step,
|
|
214
|
+
* so every slide in the template must land in the record, not just the
|
|
215
|
+
* first one.
|
|
216
|
+
*/
|
|
217
|
+
export declare const applyAppBannerTemplate: (configuration: any, record: any, activeStepIndex: number, onUpdateRecord: (record: any) => void, resetDocumentFn: (doc: any, options?: {
|
|
218
|
+
sideEffect?: {
|
|
219
|
+
undo: () => void;
|
|
220
|
+
redo: () => void;
|
|
221
|
+
};
|
|
222
|
+
}) => void) => void;
|
|
223
|
+
export declare const appendFullDocumentTemplate: (configuration: any, document: any, resetDocument: (doc: any) => void) => {
|
|
224
|
+
idMapping: {
|
|
225
|
+
[oldId: string]: string;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns `value` delayed by `delay` ms, resetting the timer on every change.
|
|
3
|
+
*
|
|
4
|
+
* Used to keep server-side template search from firing a request per keystroke:
|
|
5
|
+
* the debounced value feeds the react-query `filter` (part of the query key),
|
|
6
|
+
* so a new request only goes out once typing pauses.
|
|
7
|
+
*/
|
|
8
|
+
export default function useDebouncedValue<T>(value: T, delay?: number): T;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TemplateFormField } from '../../../documents/editor/templateVariables';
|
|
2
|
+
import { VariableGroup } from '../../../documents/blocks/helpers/documentUtils';
|
|
3
|
+
type Props = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
groups: VariableGroup[];
|
|
7
|
+
forms: TemplateFormField[];
|
|
8
|
+
document: any;
|
|
9
|
+
updateField: (index: number, patch: Partial<TemplateFormField>) => void;
|
|
10
|
+
updateFields: (patches: {
|
|
11
|
+
index: number;
|
|
12
|
+
patch: Partial<TemplateFormField>;
|
|
13
|
+
}[]) => void;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Every variable group's fields in one dialog, with a single "Generate with AI"
|
|
17
|
+
* that fills them all. Mirrors VariableGroupDialog: edits apply live, Cancel
|
|
18
|
+
* restores the snapshot taken on open, Save keeps them.
|
|
19
|
+
*/
|
|
20
|
+
export default function AiFillAllDialog({ open, onClose, groups, forms, document, updateField, updateFields, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AiTargetField, AiValue } from './aiFill';
|
|
2
|
+
type AiGenerateButtonProps = {
|
|
3
|
+
/** The fields eligible for AI fill — id/name/type. */
|
|
4
|
+
fields: AiTargetField[];
|
|
5
|
+
onGenerated: (values: AiValue[]) => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Footer-level "Generate with AI" button for the variable group dialog. One
|
|
9
|
+
* prompt fills every eligible text/textarea field in the group at once — the
|
|
10
|
+
* fields are sent as `context.formFields` and the AI returns the same array
|
|
11
|
+
* back with `value` populated, at `generation.data.response.data.formFields`.
|
|
12
|
+
*/
|
|
13
|
+
export default function AiGenerateButton({ fields, onGenerated }: AiGenerateButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { TemplateFormField } from '../../../documents/editor/templateVariables';
|
|
2
3
|
type Props = {
|
|
3
4
|
field: TemplateFormField;
|
|
4
5
|
onPatch: (patch: Partial<TemplateFormField>) => void;
|
|
6
|
+
/** Optional control rendered at the right of the label row (e.g. "locate in canvas"). */
|
|
7
|
+
headerAction?: ReactNode;
|
|
5
8
|
};
|
|
6
9
|
/**
|
|
7
10
|
* One scalar variable row: name, a type selector (Text / Number / Date / Time /
|
|
8
11
|
* Image), the value input, and — for `date` / `time` — the format + timezone
|
|
9
12
|
* controls.
|
|
10
13
|
*/
|
|
11
|
-
export default function ScalarFieldRow({ field, onPatch }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default function ScalarFieldRow({ field, onPatch, headerAction }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
15
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TemplateFormField } from '../../../documents/editor/templateVariables';
|
|
2
|
+
import { VariableGroup } from '../../../documents/blocks/helpers/documentUtils';
|
|
3
|
+
import { VisibleForm } from './aiFill';
|
|
4
|
+
type VariableGroupDialogProps = {
|
|
5
|
+
open: boolean;
|
|
6
|
+
group: VariableGroup | null;
|
|
7
|
+
groups: VariableGroup[];
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
containerId: string | null;
|
|
10
|
+
itemsArrayBlockId: string | null;
|
|
11
|
+
visibleForms: VisibleForm[];
|
|
12
|
+
updateField: (index: number, patch: Partial<TemplateFormField>) => void;
|
|
13
|
+
updateFields: (patches: {
|
|
14
|
+
index: number;
|
|
15
|
+
patch: Partial<TemplateFormField>;
|
|
16
|
+
}[]) => void;
|
|
17
|
+
};
|
|
18
|
+
export default function VariableGroupDialog({ open, group, groups, onClose, containerId, itemsArrayBlockId, visibleForms, updateField, updateFields, }: VariableGroupDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { VariableGroup } from '../../../documents/blocks/helpers/documentUtils';
|
|
2
|
+
export declare function groupIcon(group: VariableGroup): import('@mui/material/OverridableComponent').OverridableComponent<import('@mui/material').SvgIconTypeMap<{}, "svg">> & {
|
|
3
|
+
muiName: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function groupLabel(group: VariableGroup, groups: VariableGroup[]): string;
|
|
6
|
+
export declare function groupSubtitle(group: VariableGroup): string;
|
|
2
7
|
type Props = {
|
|
3
8
|
groups: VariableGroup[];
|
|
4
9
|
onOpen: (group: VariableGroup) => void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { TemplateFormField, TemplateScalarType } from '../../../documents/editor/templateVariables';
|
|
2
|
+
export type VisibleForm = {
|
|
3
|
+
field: TemplateFormField;
|
|
4
|
+
index: number;
|
|
5
|
+
};
|
|
6
|
+
export type AiTargetField = {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
type?: TemplateScalarType;
|
|
10
|
+
};
|
|
11
|
+
export type AiValue = {
|
|
12
|
+
id: string;
|
|
13
|
+
value: string;
|
|
14
|
+
};
|
|
15
|
+
type UpdateFields = (patches: {
|
|
16
|
+
index: number;
|
|
17
|
+
patch: Partial<TemplateFormField>;
|
|
18
|
+
}[]) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Fields eligible for AI fill. Scalars keep their own id. Repeated-block
|
|
21
|
+
* (array) fields get one entry per row/sub-field, id namespaced as
|
|
22
|
+
* "<fieldIndex>::<rowIndex>::<subFieldId>" so same-named sub-fields across
|
|
23
|
+
* rows/blocks don't collide in the flat AI response.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildAiFields(visibleForms: VisibleForm[]): {
|
|
26
|
+
aiFields: AiTargetField[];
|
|
27
|
+
scalarIndexById: Map<string, number>;
|
|
28
|
+
};
|
|
29
|
+
/** Writes generated values back onto scalar fields and array rows. */
|
|
30
|
+
export declare function applyAiValues(values: AiValue[], visibleForms: VisibleForm[], scalarIndexById: Map<string, number>, updateFields: UpdateFields): void;
|
|
31
|
+
/**
|
|
32
|
+
* One prompt → values for every field. Returns null (after toasting) when the
|
|
33
|
+
* request fails or yields nothing usable.
|
|
34
|
+
*/
|
|
35
|
+
export declare function requestAiFill(prompt: string, fields: AiTargetField[]): Promise<AiValue[] | null>;
|
|
36
|
+
export {};
|
|
@@ -6,7 +6,19 @@ export declare const panelDescription: SxProps<Theme>;
|
|
|
6
6
|
export declare const panelContent: SxProps<Theme>;
|
|
7
7
|
export declare const panelLearnMore: SxProps<Theme>;
|
|
8
8
|
export declare const emptyState: SxProps<Theme>;
|
|
9
|
+
export declare const paywallOverlay: SxProps<Theme>;
|
|
10
|
+
export declare const paywallGhostContent: SxProps<Theme>;
|
|
11
|
+
export declare const paywallGhostHeader: SxProps<Theme>;
|
|
12
|
+
export declare const paywallGhostTitleText: SxProps<Theme>;
|
|
13
|
+
export declare const paywallGhostSubText: SxProps<Theme>;
|
|
14
|
+
export declare const paywallGhostFieldLabel: SxProps<Theme>;
|
|
15
|
+
export declare const paywallGhostInput: SxProps<Theme>;
|
|
16
|
+
export declare const paywallTitle: SxProps<Theme>;
|
|
17
|
+
export declare const paywallDescription: SxProps<Theme>;
|
|
18
|
+
export declare const paywallButton: SxProps<Theme>;
|
|
19
|
+
export declare const paywallLearnMore: SxProps<Theme>;
|
|
9
20
|
export declare const groupListWrap: SxProps<Theme>;
|
|
21
|
+
export declare const standaloneFieldsWrap: SxProps<Theme>;
|
|
10
22
|
export declare const groupListCaption: SxProps<Theme>;
|
|
11
23
|
export declare const groupCard: SxProps<Theme>;
|
|
12
24
|
export declare const groupCardHead: SxProps<Theme>;
|
|
@@ -26,19 +38,10 @@ export declare const groupRowChevron: SxProps<Theme>;
|
|
|
26
38
|
export declare const backRow: SxProps<Theme>;
|
|
27
39
|
export declare const backIcon: SxProps<Theme>;
|
|
28
40
|
export declare const backLabel: SxProps<Theme>;
|
|
29
|
-
export declare const paywallOverlay: SxProps<Theme>;
|
|
30
|
-
export declare const paywallGhostContent: SxProps<Theme>;
|
|
31
|
-
export declare const paywallGhostHeader: SxProps<Theme>;
|
|
32
|
-
export declare const paywallGhostTitleText: SxProps<Theme>;
|
|
33
|
-
export declare const paywallGhostSubText: SxProps<Theme>;
|
|
34
|
-
export declare const paywallGhostFieldLabel: SxProps<Theme>;
|
|
35
|
-
export declare const paywallGhostInput: SxProps<Theme>;
|
|
36
|
-
export declare const paywallTitle: SxProps<Theme>;
|
|
37
|
-
export declare const paywallDescription: SxProps<Theme>;
|
|
38
|
-
export declare const paywallButton: SxProps<Theme>;
|
|
39
|
-
export declare const paywallLearnMore: SxProps<Theme>;
|
|
40
41
|
export declare const arrayFieldWrap: SxProps<Theme>;
|
|
41
42
|
export declare const scalarFieldWrap: SxProps<Theme>;
|
|
43
|
+
export declare const variableRowHighlightColor: (theme: Theme) => string;
|
|
44
|
+
export declare const locateFieldButton: SxProps<Theme>;
|
|
42
45
|
export declare const fieldLabel: SxProps<Theme>;
|
|
43
46
|
export declare const containerSection: SxProps<Theme>;
|
|
44
47
|
export declare const containerHeaderIcon: SxProps<Theme>;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
1
|
+
/** Optional copy for the dialog — same shape as ahd-fe's `UpgradeDialogContent`. */
|
|
2
|
+
export type UpgradeDialogContent = {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function setUpgradeHandler(handler: ((content?: UpgradeDialogContent) => void) | null | undefined): void;
|
|
8
7
|
export declare function useUpgradeDialog(): {
|
|
9
|
-
openUpgrade: () => void;
|
|
8
|
+
openUpgrade: (content?: UpgradeDialogContent | unknown) => void;
|
|
10
9
|
};
|
|
11
10
|
/**
|
|
12
11
|
* Reader hook used by the built-in `<UpgradeDialog>` mount to subscribe to
|
|
@@ -15,5 +14,6 @@ export declare function useUpgradeDialog(): {
|
|
|
15
14
|
*/
|
|
16
15
|
export declare function useUpgradeStore(): {
|
|
17
16
|
open: boolean;
|
|
17
|
+
content: UpgradeDialogContent | undefined;
|
|
18
18
|
close: () => void;
|
|
19
19
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const BehaviourFieldTypes: {
|
|
2
|
+
ELEMENT_ID: string;
|
|
3
|
+
LINK: string;
|
|
4
|
+
POSITION: string;
|
|
5
|
+
TRIGGER_BEHAVIOUR: string;
|
|
6
|
+
TRIGGER_MODE: string;
|
|
7
|
+
TRIGGER_LABEL: string;
|
|
8
|
+
TRIGGER_ICON: string;
|
|
9
|
+
ANIMATION: string;
|
|
10
|
+
SHOW_STEP: string;
|
|
11
|
+
DELAY: string;
|
|
12
|
+
NAVIGATION_MODE: string;
|
|
13
|
+
DISMISS_SETTINGS: string;
|
|
14
|
+
ICON_CLOSE_COLOR: string;
|
|
15
|
+
SHOW_CLOSE_ICON: string;
|
|
16
|
+
VISIBILITY: string;
|
|
17
|
+
TOOLTIP_ADDONS: string;
|
|
18
|
+
FLOATER_POSITION: string;
|
|
19
|
+
FLOATER_OFFSET: string;
|
|
20
|
+
};
|
|
21
|
+
export type BehaviourFieldType = (typeof BehaviourFieldTypes)[keyof typeof BehaviourFieldTypes];
|
|
22
|
+
export type BehaviourField = {
|
|
23
|
+
type: BehaviourFieldType;
|
|
24
|
+
label?: string;
|
|
25
|
+
sectionLabel?: string;
|
|
26
|
+
valueFrom?: string;
|
|
27
|
+
updateKey?: string;
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const getBehaviourFields: (pageType?: string, subType?: string) => BehaviourField[];
|
|
@@ -2,6 +2,8 @@ import { EditorPanelToggles } from './EditorBehavior';
|
|
|
2
2
|
export declare const INSPECTOR_DRAWER_WIDTH = 413;
|
|
3
3
|
interface InspectorDrawerProps {
|
|
4
4
|
record: any;
|
|
5
|
+
needsAiSync?: boolean;
|
|
6
|
+
onAiSynced?: () => void;
|
|
5
7
|
onTogglePreview: () => void;
|
|
6
8
|
activeStepIndex: number;
|
|
7
9
|
onBackgroundChange: (image: string) => void;
|
|
@@ -11,6 +13,11 @@ interface InspectorDrawerProps {
|
|
|
11
13
|
onNavigateBranding?: () => void;
|
|
12
14
|
/** Toggle visibility of the four side panels. */
|
|
13
15
|
panels?: EditorPanelToggles;
|
|
16
|
+
inspectorWidth: number;
|
|
17
|
+
handleMouseDown: (e: React.MouseEvent) => void;
|
|
18
|
+
isPanelCollapsed: boolean;
|
|
19
|
+
toggleCollapsed: () => void;
|
|
20
|
+
handleOpenPanel: () => void;
|
|
14
21
|
}
|
|
15
|
-
export default function InspectorDrawer({ record, onTogglePreview, activeStepIndex, onBackgroundChange, onUpdateRecord, onSaveChanges, isExternalSection, onNavigateBranding, panels, }: InspectorDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default function InspectorDrawer({ record, needsAiSync, onAiSynced, onTogglePreview, activeStepIndex, onBackgroundChange, onUpdateRecord, onSaveChanges, isExternalSection, onNavigateBranding, panels, inspectorWidth, handleMouseDown, isPanelCollapsed, toggleCollapsed, handleOpenPanel, }: InspectorDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
23
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface BackgroundPanelProps {
|
|
2
|
+
record?: any;
|
|
3
|
+
onBackgroundChange?: (url: string | null) => void;
|
|
4
|
+
}
|
|
5
|
+
declare const BackgroundPanel: ({ record, onBackgroundChange }: BackgroundPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default BackgroundPanel;
|
|
@@ -7,6 +7,7 @@ interface GetMainBoxSxProps {
|
|
|
7
7
|
isPreviewOpen: boolean;
|
|
8
8
|
selectedScreenSize: string;
|
|
9
9
|
layoutData: any;
|
|
10
|
+
isPageType?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare const useMainBoxStyles: ({ pageType, backgroundImage, pageHtml, isPreviewOpen, selectedScreenSize, layoutData, }: GetMainBoxSxProps) => SxProps;
|
|
12
|
+
export declare const useMainBoxStyles: ({ pageType, backgroundImage, pageHtml, isPreviewOpen, selectedScreenSize, layoutData, isPageType: isPageTypeProp, }: GetMainBoxSxProps) => SxProps;
|
|
12
13
|
export {};
|
|
@@ -11,6 +11,7 @@ interface TemplatePanelProps {
|
|
|
11
11
|
activeSection?: PageSection;
|
|
12
12
|
activeSectionIndex?: number;
|
|
13
13
|
onAddSection?: () => void;
|
|
14
|
+
sidebarWidth?: number;
|
|
14
15
|
}
|
|
15
|
-
export default function TemplatePanel({ record, isPreviewOpen, activeStepIndex, fetchTooltip, backgroundImage, pageHtml, isPageHtmlFetching, loading, activeSectionIndex, onAddSection, }: TemplatePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default function TemplatePanel({ record, isPreviewOpen, activeStepIndex, fetchTooltip, backgroundImage, pageHtml, isPageHtmlFetching, loading, activeSectionIndex, onAddSection, sidebarWidth, }: TemplatePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -11,8 +11,8 @@ type Options = {
|
|
|
11
11
|
* Reads scroll geometry off whichever element is actually scrolling in the
|
|
12
12
|
* host DOM. The resolved element is locked onto the first real scroll
|
|
13
13
|
* event received on the page and kept until it either leaves the DOM or
|
|
14
|
-
* stops being scrollable — so
|
|
15
|
-
*
|
|
14
|
+
* stops being scrollable — so both ahd-fe's `mainBoxSx` and pagepilot's
|
|
15
|
+
* Shell wrapper work without the caller having to know which is which.
|
|
16
16
|
*/
|
|
17
17
|
export declare function useMiniMapSync({ scrollBoxRef, contentRef, enabled }: Options): {
|
|
18
18
|
viewportRect: ViewportRect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const saveMenuHrefEdits: (
|
|
1
|
+
export declare const saveMenuHrefEdits: (document: Record<string, any>) => Promise<void>;
|
|
@@ -2,6 +2,7 @@ type UseSaveHandlerReturn = {
|
|
|
2
2
|
onShowHtml: (type: 'live' | 'draft' | null, options?: {
|
|
3
3
|
injectTabsScrollSyncScript?: boolean;
|
|
4
4
|
injectCarouselScript?: boolean;
|
|
5
|
+
injectPaginationScript?: boolean;
|
|
5
6
|
injectAnimationScript?: boolean;
|
|
6
7
|
schedule?: {
|
|
7
8
|
startDate?: Date | null;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
export type UseAutosaveOptions = {
|
|
2
2
|
isDirty: boolean;
|
|
3
|
-
onSave: () =>
|
|
3
|
+
onSave: () => void | Promise<unknown>;
|
|
4
4
|
enabled?: boolean;
|
|
5
5
|
isSaving?: boolean;
|
|
6
6
|
intervalMs?: number;
|
|
7
7
|
};
|
|
8
|
+
export type UseAutosaveResult = {
|
|
9
|
+
contentEnabled: boolean;
|
|
10
|
+
contentToggleLoading: boolean;
|
|
11
|
+
toggleContentEnabled: (checked: boolean) => Promise<void>;
|
|
12
|
+
};
|
|
8
13
|
export declare const AUTOSAVE_ENABLED = true;
|
|
9
|
-
export declare const AUTOSAVE_INTERVAL_MS =
|
|
10
|
-
export default function useAutosave({ isDirty, onSave, enabled, isSaving, intervalMs, }: UseAutosaveOptions):
|
|
14
|
+
export declare const AUTOSAVE_INTERVAL_MS = 90000;
|
|
15
|
+
export default function useAutosave({ isDirty, onSave, enabled, isSaving, intervalMs, }: UseAutosaveOptions): UseAutosaveResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useIsTemplateEditorRoute(): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const INSPECTOR_RAIL_WIDTH = 88;
|
|
2
|
+
declare const useStretch: () => {
|
|
3
|
+
inspectorWidth: number;
|
|
4
|
+
handleMouseDown: (e: React.MouseEvent) => void;
|
|
5
|
+
isPanelCollapsed: boolean;
|
|
6
|
+
toggleCollapsed: () => void;
|
|
7
|
+
handleOpenPanel: () => void;
|
|
8
|
+
};
|
|
9
|
+
export default useStretch;
|
|
@@ -18,4 +18,14 @@ export declare const widthUnitSelectSx: {
|
|
|
18
18
|
paddingBottom: string;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
export declare const BorderedIconButton: import('@emotion/styled').StyledComponent<import('@mui/material').IconButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "children" | "className" | "size" | "color" | "disabled" | "action" | "tabIndex" | "
|
|
21
|
+
export declare const BorderedIconButton: import('@emotion/styled').StyledComponent<import('@mui/material').IconButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "children" | "className" | "size" | "color" | "disabled" | "action" | "tabIndex" | "classes" | "sx" | "loading" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loadingIndicator"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
22
|
+
export declare const zoomButtonSx: {
|
|
23
|
+
borderRadius: string;
|
|
24
|
+
transition: string;
|
|
25
|
+
'&:hover': {
|
|
26
|
+
backgroundColor: string;
|
|
27
|
+
boxShadow: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const AutoSaveContentToggleWrapper: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
31
|
+
export declare const AutoSaveContentIndicatorBox: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
declare const ContainerPropsSchema: z.ZodObject<{
|
|
3
3
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
4
4
|
backgroundColor: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>>;
|
|
5
|
-
backgroundImage: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
5
|
+
backgroundImage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodString]>>>;
|
|
6
6
|
backgroundSize: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
7
|
backgroundRepeat: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
8
8
|
repeat: "repeat";
|
|
@@ -71,8 +71,8 @@ declare const ContainerPropsSchema: z.ZodObject<{
|
|
|
71
71
|
widthTablet: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
72
72
|
widthMobile: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
73
73
|
height: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
74
|
-
heightTablet: z.ZodNullable<z.ZodOptional<z.ZodNumber
|
|
75
|
-
heightMobile: z.ZodNullable<z.ZodOptional<z.ZodNumber
|
|
74
|
+
heightTablet: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"auto">]>>>;
|
|
75
|
+
heightMobile: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"auto">]>>>;
|
|
76
76
|
overflow: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
77
77
|
alignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
78
78
|
right: "right";
|
|
@@ -147,4 +147,6 @@ declare const ContainerPropsSchema: z.ZodObject<{
|
|
|
147
147
|
}, z.core.$strip>>>;
|
|
148
148
|
}, z.core.$strip>;
|
|
149
149
|
export default ContainerPropsSchema;
|
|
150
|
-
export type ContainerProps = z.infer<typeof ContainerPropsSchema
|
|
150
|
+
export type ContainerProps = z.infer<typeof ContainerPropsSchema> & {
|
|
151
|
+
blockId?: string;
|
|
152
|
+
};
|