pagepilot-visual-editor 1.0.29 → 1.0.33

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.
Files changed (194) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +42 -28
  3. package/dist/PagePilotEditor.d.ts +12 -9
  4. package/dist/api/ApiClientContext.d.ts +1 -0
  5. package/dist/api/PagepilotApiClient.d.ts +7 -0
  6. package/dist/assets/aiChatbotIcon.d.ts +1 -0
  7. package/dist/blocks-internal/block-button/src/index.d.ts +6 -0
  8. package/dist/blocks-internal/block-container/src/index.d.ts +1 -1
  9. package/dist/blocks-internal/block-heading/src/index.d.ts +2 -2
  10. package/dist/blocks-internal/block-list/src/index.d.ts +12 -2
  11. package/dist/blocks-internal/block-mdx/src/index.d.ts +47 -0
  12. package/dist/blocks-internal/block-quill/src/index.d.ts +48 -0
  13. package/dist/editor/PagePreviewDialog.d.ts +14 -0
  14. package/dist/editor/Topbar.d.ts +3 -1
  15. package/dist/editor/pageUrls.d.ts +25 -0
  16. package/dist/editor/publish/PageLiveSuccessDialog.d.ts +9 -0
  17. package/dist/editor/publish/PagePublishDialog.d.ts +1 -0
  18. package/dist/editor/publish/PublishAccessibilityPanel.d.ts +8 -0
  19. package/dist/editor/publish/a11yLinter.d.ts +8 -0
  20. package/dist/editor/recordDirty.d.ts +16 -0
  21. package/dist/editor/renderSections.d.ts +2 -2
  22. package/dist/editor/savePipeline.d.ts +40 -0
  23. package/dist/editor/types.d.ts +35 -0
  24. package/dist/editor-sample/App/InspectorDrawer/BehaviourPanel.d.ts +22 -0
  25. package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandColorPalette.d.ts +9 -0
  26. package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandEmptyLink.d.ts +8 -0
  27. package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandPanel.styled.d.ts +22 -0
  28. package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandSection.d.ts +8 -0
  29. package/dist/editor-sample/App/InspectorDrawer/BrandPanel/EmptyText.d.ts +6 -0
  30. package/dist/editor-sample/App/InspectorDrawer/BrandPanel/FontDetailsList.d.ts +6 -0
  31. package/dist/editor-sample/App/InspectorDrawer/BrandPanel/index.d.ts +5 -0
  32. package/dist/editor-sample/App/InspectorDrawer/BrandPanel/useBrandApply.d.ts +9 -0
  33. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/ResponsiveDeviceTabs.d.ts +0 -2
  34. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/blockStyleClipboard.d.ts +2 -8
  35. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/index.d.ts +1 -4
  36. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts +2 -1
  37. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FlexColumns/ColumnSection.d.ts +2 -0
  38. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FormsPickerSidebarPanel.d.ts +2 -1
  39. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MdxSidebarPanel.d.ts +7 -0
  40. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MenuPickerSidebarPanel.d.ts +23 -1
  41. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/QuillSidebarPanel.d.ts +8 -0
  42. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.d.ts +2 -2
  43. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/AnimationSection.d.ts +7 -5
  44. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/HoverEffectSection.d.ts +1 -1
  45. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/imageSizeUnit.d.ts +19 -0
  46. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Picker.d.ts +0 -2
  47. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/VariableLinkHint.d.ts +27 -0
  48. package/dist/editor-sample/App/InspectorDrawer/EditorBehavior.d.ts +8 -2
  49. package/dist/editor-sample/App/InspectorDrawer/LayersPanelStyles.d.ts +2 -2
  50. package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/AiSupportedBadge.d.ts +7 -0
  51. package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/SectionsModal.d.ts +2 -10
  52. package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/icons/index.d.ts +3 -5
  53. package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/templateHelpers.d.ts +198 -0
  54. package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/useDebouncedValue.d.ts +8 -0
  55. package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/AiGenerateButton.d.ts +18 -0
  56. package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/ItemsArrayRepeatSection.d.ts +2 -3
  57. package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/ScalarFieldRow.d.ts +4 -1
  58. package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/VariableGroupDialog.d.ts +19 -0
  59. package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/VariableGroupList.d.ts +5 -0
  60. package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/aiFill.d.ts +75 -0
  61. package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/styles.d.ts +14 -11
  62. package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/upgradeDialog.d.ts +8 -8
  63. package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/useAutoRegisterTokenFields.d.ts +8 -0
  64. package/dist/editor-sample/App/InspectorDrawer/behaviourFields.d.ts +30 -0
  65. package/dist/editor-sample/App/InspectorDrawer/components/RichTextAiButton.d.ts +7 -0
  66. package/dist/editor-sample/App/InspectorDrawer/index.d.ts +8 -1
  67. package/dist/editor-sample/App/InspectorDrawer/publish/BackgroundPanel.d.ts +6 -0
  68. package/dist/editor-sample/App/InspectorDrawer/renderBehaviourField.d.ts +7 -0
  69. package/dist/editor-sample/App/TemplatePanel/hooks/useMainBoxStyles.d.ts +2 -1
  70. package/dist/editor-sample/App/TemplatePanel/index.d.ts +2 -1
  71. package/dist/editor-sample/App/TemplatePanel/minimap/useMiniMapSync.d.ts +2 -2
  72. package/dist/editor-sample/App/TemplatePanel/pageGuide/iframeSrcDoc.d.ts +3 -6
  73. package/dist/editor-sample/App/hooks/page/saveMenuHrefEdits.d.ts +1 -1
  74. package/dist/editor-sample/App/hooks/page/useSaveHandler.d.ts +1 -0
  75. package/dist/editor-sample/App/hooks/useAutosave.d.ts +8 -3
  76. package/dist/editor-sample/App/hooks/useIsTemplateEditorRoute.d.ts +1 -0
  77. package/dist/editor-sample/App/hooks/useStretch.d.ts +9 -0
  78. package/dist/editor-sample/App/shared/PagePreviewFrame.d.ts +17 -2
  79. package/dist/editor-sample/App/shared/UploadImage.d.ts +4 -0
  80. package/dist/editor-sample/App/shared/editor.styles.d.ts +13 -3
  81. package/dist/editor-sample/documents/blocks/Container/ContainerPropsSchema.d.ts +6 -4
  82. package/dist/editor-sample/documents/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +4 -0
  83. package/dist/editor-sample/documents/blocks/FormsPicker/FormsPropsSchema.d.ts +33 -2
  84. package/dist/editor-sample/documents/blocks/List/ListEditor.d.ts +8 -0
  85. package/dist/editor-sample/documents/blocks/Marquee/MarqueePropsSchema.d.ts +4 -0
  86. package/dist/editor-sample/documents/blocks/MenuPicker/MenuPropsSchema.d.ts +11 -0
  87. package/dist/editor-sample/documents/blocks/Table/TableCellEditor.d.ts +2 -1
  88. package/dist/editor-sample/documents/blocks/Table/TableImportDialog.styles.d.ts +15 -5
  89. package/dist/editor-sample/documents/blocks/Table/parseClipboardTable.d.ts +7 -0
  90. package/dist/editor-sample/documents/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
  91. package/dist/editor-sample/documents/blocks/Timer/TimerPropsSchema.d.ts +2 -0
  92. package/dist/editor-sample/documents/blocks/Timer/variants/CircularProgressView.d.ts +2 -1
  93. package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/blockMenuStyles.d.ts +1 -1
  94. package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/brandButtonDefaults.d.ts +1 -4
  95. package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.d.ts +0 -6
  96. package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/dialogs/LinkDialog.d.ts +4 -1
  97. package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useToolbarCommands.d.ts +16 -4
  98. package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/popovers/TableResizeOverlay.d.ts +17 -0
  99. package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/styles.d.ts +2 -2
  100. package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/types.d.ts +2 -4
  101. package/dist/editor-sample/documents/blocks/helpers/block-wrappers/EditorBlockWrapper.d.ts +2 -3
  102. package/dist/editor-sample/documents/blocks/helpers/block-wrappers/TuneMenu.styles.d.ts +17 -0
  103. package/dist/editor-sample/documents/blocks/helpers/block-wrappers/saveAsTemplateUtils.d.ts +37 -7
  104. package/dist/editor-sample/documents/blocks/helpers/documentUtils.d.ts +55 -28
  105. package/dist/editor-sample/documents/blocks/helpers/responsiveStyle.d.ts +1 -1
  106. package/dist/editor-sample/documents/blocks/helpers/variableBinding.d.ts +9 -2
  107. package/dist/editor-sample/documents/editor/EditorBlock.d.ts +2 -6
  108. package/dist/editor-sample/documents/editor/EditorContext.d.ts +87 -20
  109. package/dist/editor-sample/documents/editor/LazyEditorBlock.d.ts +1 -0
  110. package/dist/editor-sample/documents/editor/core.d.ts +510 -390
  111. package/dist/editor-sample/documents/editor/templateVariables.d.ts +178 -25
  112. package/dist/editor-sample/documents/editor/useRootFontFamily.d.ts +10 -0
  113. package/dist/editor-sample/utils/editorStorageKey.d.ts +2 -0
  114. package/dist/editor-sample/utils/localStoragePref.d.ts +2 -0
  115. package/dist/email-builder-core/blocks/Container/ContainerPropsSchema.d.ts +1 -1
  116. package/dist/email-builder-core/blocks/Container/ContainerReader.d.ts +1 -1
  117. package/dist/email-builder-core/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +4 -0
  118. package/dist/email-builder-core/blocks/EmailLayout/EmailLayoutReader.d.ts +1 -1
  119. package/dist/email-builder-core/blocks/FlexColumns/FlexColumnsPropsSchema.d.ts +3 -0
  120. package/dist/email-builder-core/blocks/FlexColumns/flexColumnsHelpers.d.ts +4 -2
  121. package/dist/email-builder-core/blocks/MenuPicker/MenuColumns.d.ts +13 -0
  122. package/dist/email-builder-core/blocks/MenuPicker/MenuPropsSchema.d.ts +10 -0
  123. package/dist/email-builder-core/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
  124. package/dist/email-builder-core/index.d.ts +0 -2
  125. package/dist/email-builder-core/renderers/pageScripts.d.ts +0 -1
  126. package/dist/email-builder-core/renderers/themeTokens.d.ts +94 -132
  127. package/dist/host-stubs/history.d.ts +5 -0
  128. package/dist/host-stubs/hooks/useTenantFeatureCutoff.d.ts +8 -0
  129. package/dist/host-stubs/hooks/useTenantPlan.d.ts +18 -0
  130. package/dist/host-stubs/i18nAhdDefaults.d.ts +1 -0
  131. package/dist/host-stubs/modules/allSlugs/allSlugsActions.d.ts +1 -0
  132. package/dist/host-stubs/modules/allSlugs/allSlugsSelectors.d.ts +1 -0
  133. package/dist/host-stubs/modules/auth/authCurrentTenant.d.ts +6 -0
  134. package/dist/host-stubs/modules/forms/formsService.d.ts +3 -1
  135. package/dist/host-stubs/modules/forms/useFormsList.d.ts +4 -1
  136. package/dist/host-stubs/modules/menu/menuService.d.ts +4 -0
  137. package/dist/host-stubs/modules/page/pageService.d.ts +11 -0
  138. package/dist/host-stubs/modules/settings/settingsActions.d.ts +2 -0
  139. package/dist/host-stubs/modules/settings/settingsSelectors.d.ts +4 -0
  140. package/dist/host-stubs/modules/shared/axios/authAxios.d.ts +17 -0
  141. package/dist/host-stubs/modules/shared/constants.d.ts +14 -0
  142. package/dist/host-stubs/modules/store.d.ts +4 -0
  143. package/dist/host-stubs/modules/template/templateEnumerators.d.ts +19 -0
  144. package/dist/host-stubs/modules/tour/injectTourIntoPage.d.ts +20 -0
  145. package/dist/host-stubs/modules/websiteV2/propagateFromPage.d.ts +4 -0
  146. package/dist/host-stubs/style/icons.d.ts +57 -0
  147. package/dist/host-stubs/utils/dateFormats.d.ts +1 -0
  148. package/dist/host-stubs/view/branding/brandDefaultFont.d.ts +3 -1
  149. package/dist/host-stubs/view/branding/styles/BrandIcons.d.ts +9 -0
  150. package/dist/host-stubs/view/branding/styles/types.d.ts +76 -0
  151. package/dist/host-stubs/view/configurations/ConfigurationIcons.d.ts +9 -0
  152. package/dist/host-stubs/view/demo/DemoIcons.d.ts +9 -0
  153. package/dist/host-stubs/view/images/Icons.d.ts +6 -0
  154. package/dist/host-stubs/view/media/MediaGalleryDialog/types.d.ts +47 -0
  155. package/dist/host-stubs/view/media/MediaGalleryDialog/utils/fileUtils.d.ts +3 -0
  156. package/dist/host-stubs/view/media/MediaGalleryDialog/utils/mediaTypes.d.ts +9 -0
  157. package/dist/host-stubs/view/media/MediaGalleryDialog.d.ts +12 -2
  158. package/dist/host-stubs/view/media/styles/MediaIcons.d.ts +13 -0
  159. package/dist/host-stubs/view/shared/Confetti.d.ts +5 -0
  160. package/dist/host-stubs/view/shared/PagePilotLoader.d.ts +2 -0
  161. package/dist/host-stubs/view/shared/UpgradeDialog/UpgradeDialogContext.d.ts +1 -0
  162. package/dist/host-stubs/view/shared/common/CopyToClipboard.d.ts +7 -0
  163. package/dist/host-stubs/view/shared/editors/MdxEditor.d.ts +8 -0
  164. package/dist/host-stubs/view/shared/editors/QuillEditor.d.ts +3 -0
  165. package/dist/host-stubs/view/shared/editors/sanitize.d.ts +4 -0
  166. package/dist/host-stubs/view/shared/editors/types.d.ts +7 -0
  167. package/dist/host-stubs/view/shared/media/TemplatePreviewMedia.d.ts +29 -0
  168. package/dist/host-stubs/view/shared/modals/ConfigureDialog.d.ts +7 -0
  169. package/dist/host-stubs/view/shared/modals/ManageTemplateModal.d.ts +5 -0
  170. package/dist/host-stubs/view/shared/speech/index.d.ts +17 -0
  171. package/dist/host-stubs/view/shared/styles/Table.styles.d.ts +3 -0
  172. package/dist/host-stubs/view/template/form/TemplateFormModal.d.ts +10 -0
  173. package/dist/host-stubs/view/template/form/fields/types.d.ts +7 -0
  174. package/dist/{index-BN1BduFG.js → index-BONR8bWR.js} +1 -1
  175. package/dist/{index-DojXOBrb.js → index-B_cb-ZLC.js} +88415 -74153
  176. package/dist/index-BfIWhBCR.cjs +1561 -0
  177. package/dist/{index-BRq3RgdO.cjs → index-CFA3aG_U.cjs} +1 -1
  178. package/dist/index.cjs +1 -1
  179. package/dist/index.js +1 -1
  180. package/dist/render-core/combineSections.d.ts +33 -3
  181. package/dist/render-core/dateFormats.d.ts +14 -3
  182. package/dist/render-core/stubs/pickerEmptyState.d.ts +2 -0
  183. package/dist/render-core/stubs/styleIcons.d.ts +1 -0
  184. package/dist/render.cjs +272 -219
  185. package/dist/render.js +9856 -7949
  186. package/dist/style.css +1 -1
  187. package/dist/{xlsx-D2quXLTv.cjs → xlsx-CBpoXUEM.cjs} +1 -1
  188. package/dist/{xlsx-0y4dyiCO.js → xlsx-DSqBw3Em.js} +1 -1
  189. package/package.json +1 -1
  190. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/ResponsiveEditingBanner.d.ts +0 -13
  191. package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/BoxShadowControls.d.ts +0 -19
  192. package/dist/editor-sample/documents/blocks/AppBannerPicker/appBanner.styled.d.ts +0 -2
  193. package/dist/email-builder-core/blocks/boxShadowSchema.d.ts +0 -23
  194. package/dist/index-DEBoxZlq.cjs +0 -1510
@@ -1,15 +1,7 @@
1
1
  interface SectionsModalProps {
2
2
  open: boolean;
3
3
  onClose: () => void;
4
- /**
5
- * Kept for API parity with ahd-fe. Ignored in the standalone build —
6
- * every click goes through `applyIndividualBlockTemplate` /
7
- * `applyFullDocumentTemplate` regardless of caller. The `onInsert`
8
- * splice path in ahd-fe requires a `remapBlocks` step we don't want
9
- * to duplicate here; the helper-based path already handles both
10
- * individual-block and full-doc templates correctly.
11
- */
12
4
  onInsert?: (block: any, preassignedId?: string) => void;
13
5
  }
14
- export default function SectionsModal({ open, onClose }: SectionsModalProps): import("react/jsx-runtime").JSX.Element;
15
- export {};
6
+ declare const SectionsModal: React.FC<SectionsModalProps>;
7
+ export default SectionsModal;
@@ -27,8 +27,10 @@ declare const TabsIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JS
27
27
  declare const AccordionIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
28
28
  declare const YoutubeUrlIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
29
29
  declare const MenuPickerIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
30
+ declare const BreadcrumbIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
30
31
  declare const IframeIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
31
32
  declare const FormIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
33
+ declare const ListBlockIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
32
34
  declare const SkipToMainIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
33
35
  /**
34
36
  * Generic layout-preset glyph: draws one outlined rect per cell, positioned
@@ -48,8 +50,4 @@ export declare const GridPresetIcon: (props: SvgIconProps & {
48
50
  cells: PresetIconCell[];
49
51
  }) => import("react/jsx-runtime").JSX.Element;
50
52
  declare const TableIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
51
- declare const ProgressBarIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
52
- declare const TimerBlockIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
53
- declare const ListBlockIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
54
- declare const BreadcrumbIcon: (props?: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
55
- export { ContainerIcon, GridIcon, ImageIcon, TextIcon, ButtonIcon, HtmlIcon, VideoIcon, DividerIcon, DragIcon, HeadingIcon, StepperIcon, AvatarIcon, SpacerIcon, QuillEditorIcon, MarkDownIcon, VideoBlockIcon, LogoBlockIcon, FlexColumnsIcon, ColumnsIcon, GridBlockIcon, ContainerBlockIcon, SpacerBlockIcon, ButtonBlockIcon, ButtonGroupIcon, TabsIcon, AccordionIcon, YoutubeUrlIcon, MenuPickerIcon, IframeIcon, FormIcon, SkipToMainIcon, TableIcon, ProgressBarIcon, TimerBlockIcon, ListBlockIcon, BreadcrumbIcon, };
53
+ export { ContainerIcon, GridIcon, ImageIcon, TextIcon, ButtonIcon, HtmlIcon, VideoIcon, DividerIcon, DragIcon, HeadingIcon, StepperIcon, AvatarIcon, SpacerIcon, QuillEditorIcon, MarkDownIcon, VideoBlockIcon, LogoBlockIcon, FlexColumnsIcon, ColumnsIcon, GridBlockIcon, ContainerBlockIcon, SpacerBlockIcon, ButtonBlockIcon, ButtonGroupIcon, TabsIcon, AccordionIcon, YoutubeUrlIcon, MenuPickerIcon, BreadcrumbIcon, IframeIcon, FormIcon, SkipToMainIcon, ListBlockIcon, TableIcon, };
@@ -1 +1,199 @@
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
+ * Build the document "Change template" would produce, without touching the
114
+ * editor. `applyChangeTemplate` commits it; the template preview dialog
115
+ * renders it beside the current page.
116
+ */
117
+ export declare const buildChangeTemplateDocument: (configuration: any, document: any, templateRecord?: any) => {
118
+ doc: any;
119
+ fields: any[];
120
+ current: any;
121
+ } | null;
122
+ export declare const applyChangeTemplate: (configuration: any, document: any, resetDocument: (doc: any) => void, templateRecord?: any) => void;
123
+ /**
124
+ * "Use this Styles" for non-tour modules (pages, FAQ, app-banner, tooltip,
125
+ * template). Applies the template's styling — the root canvas AND every
126
+ * individual block (header, buttons, images, …) — while leaving the user's
127
+ * content and structure exactly as they were: text, links, image URLs, layout,
128
+ * block count and order are all untouched. Only visual props move (colours,
129
+ * typography, borders, spacing, alignment).
130
+ *
131
+ * Root: overlays the stricter `STYLE_ONLY_ROOT_KEYS` (typography / colours /
132
+ * border), then re-pins every user-owned root key via `preserveUserRootKeys`
133
+ * so the canvas geometry, background, CTA-existence and block list stay the
134
+ * user's — the page never resizes and no root CTA button appears/moves.
135
+ *
136
+ * Per-block: `overlayBlockStylesFromTemplate` — donor-matching + prop
137
+ * overlay; nothing is added, removed or re-keyed.
138
+ *
139
+ * History: a much older version of this function matched blocks by type,
140
+ * replaced each with the template's, and DELETED every unmatched block —
141
+ * clicking "Use this Styles" silently rewrote button labels / image URLs /
142
+ * column structure. `overlayStyle` + `CONTENT_AND_STRUCTURAL_KEYS` is what
143
+ * keeps the current version content-safe.
144
+ */
145
+ export declare const applyTemplateStylesOnly: (configuration: any, document: any, resetDocument: (doc: any) => void) => void;
146
+ export declare const applyTourTemplateStylesOnly: (configuration: any, record: any, activeStepIndex: number, onUpdateRecord: (record: any) => void, resetDocumentFn: (doc: any, options?: {
147
+ sideEffect?: {
148
+ undo: () => void;
149
+ redo: () => void;
150
+ };
151
+ }) => void) => void;
152
+ /**
153
+ * "Add this section" for a tour template. Replaces the ACTIVE step's
154
+ * document with the template's first step's document, while preserving the
155
+ * existing step's user-configured metadata (title, selector, behaviour,
156
+ * background). Other tour steps are untouched.
157
+ *
158
+ * Why "replace document, keep metadata":
159
+ * - The user has already set up the step's selector / position /
160
+ * behaviour for their app — those describe WHERE the tooltip anchors,
161
+ * not WHAT it says. A new visual design shouldn't lose that.
162
+ * - The template's CONTENT (blocks, layout, root style) is exactly what
163
+ * the user is opting into when they pick a design preview.
164
+ *
165
+ * Falling through to `appendFullDocumentTemplate` here (the previous
166
+ * behaviour) merged the template's blocks INTO the user's existing
167
+ * content, doubling what's on the canvas. "Add this section" should hand
168
+ * over a clean section, not stack two on top of each other.
169
+ */
170
+ export declare const replaceCurrentStepFromTourTemplate: (configuration: any, record: any, activeStepIndex: number, onUpdateRecord: (record: any) => void, resetDocumentFn: (doc: any, options?: {
171
+ sideEffect?: {
172
+ undo: () => void;
173
+ redo: () => void;
174
+ };
175
+ }) => void) => void;
176
+ export declare const applyTourTemplate: (configuration: any, record: any, activeStepIndex: number, onUpdateRecord: (record: any) => void, resetDocumentFn: (doc: any, options?: {
177
+ sideEffect?: {
178
+ undo: () => void;
179
+ redo: () => void;
180
+ };
181
+ }) => void) => void;
182
+ /**
183
+ * "Use this template" for app-banner (carousel) templates. Mirrors
184
+ * `applyTourTemplate` exactly, but keyed on `slides` instead of `steps` —
185
+ * app-banner carousels are multi-slide the same way tours are multi-step,
186
+ * so every slide in the template must land in the record, not just the
187
+ * first one.
188
+ */
189
+ export declare const applyAppBannerTemplate: (configuration: any, record: any, activeStepIndex: number, onUpdateRecord: (record: any) => void, resetDocumentFn: (doc: any, options?: {
190
+ sideEffect?: {
191
+ undo: () => void;
192
+ redo: () => void;
193
+ };
194
+ }) => void) => void;
195
+ export declare const appendFullDocumentTemplate: (configuration: any, document: any, resetDocument: (doc: any) => void) => {
196
+ idMapping: {
197
+ [oldId: string]: string;
198
+ };
199
+ };
@@ -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,18 @@
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
+ /** Overrides the default text-button trigger (label, look) and popover side. */
7
+ label?: string;
8
+ variant?: 'text' | 'outlined';
9
+ popoverBelow?: boolean;
10
+ };
11
+ /**
12
+ * Footer-level "Generate with AI" button for the variable group dialog. One
13
+ * prompt fills every eligible text/textarea field in the group at once — the
14
+ * fields are sent as `context.formFields` and the AI returns the same array
15
+ * back with `value` populated, at `generation.data.response.data.formFields`.
16
+ */
17
+ export default function AiGenerateButton({ fields, onGenerated, label, variant, popoverBelow, }: AiGenerateButtonProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -5,9 +5,8 @@
5
5
  * `TemplateFormField` bound to this block's own items via `itemsBlockId`,
6
6
  * seeded from whatever items already exist.
7
7
  *
8
- * No block type currently opts in (see `ITEMS_ARRAY_BLOCK_TYPES` in
9
- * documentUtils), so this renders for nothing today — kept alongside the
10
- * block-agnostic helpers for the next items-array block.
8
+ * Opt-in list: `ITEMS_ARRAY_BLOCK_TYPES` in documentUtils (today MenuPicker,
9
+ * custom-menu mode).
11
10
  */
12
11
  export default function ItemsArrayRepeatSection({ blockId }: {
13
12
  blockId: string;
@@ -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,75 @@
1
+ import { TemplateArrayRow, 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
+ * Template variables (root.data.formFields) serialized for an AI request's
33
+ * `context.formFields`, so text generation can see field names + current values.
34
+ * Same per-field shape `requestAiFill` sends; array fields also carry their
35
+ * sub-field defs and current rows.
36
+ */
37
+ export declare function toAiFormFieldsContext(forms: TemplateFormField[]): ({
38
+ itemFields: {
39
+ id: string;
40
+ name: string;
41
+ type: TemplateScalarType;
42
+ }[];
43
+ value: TemplateArrayRow[];
44
+ id: string;
45
+ name: string;
46
+ type: import('../../../documents/editor/templateVariables').TemplateFormType;
47
+ defaultValue: string;
48
+ } | {
49
+ value: string;
50
+ id: string;
51
+ name: string;
52
+ type: import('../../../documents/editor/templateVariables').TemplateFormType;
53
+ defaultValue: string;
54
+ })[];
55
+ /**
56
+ * Only the fields whose `{{id}}` (or `{{#each id}}`) token appears in `text` —
57
+ * i.e. the variables a single block actually uses. Same token pattern as
58
+ * templateVariables' collectUsedTokenIds.
59
+ */
60
+ export declare function formFieldsUsedInText(text: string, forms: TemplateFormField[]): TemplateFormField[];
61
+ /**
62
+ * AI-fill only the variables a block's text uses, writing the generated values
63
+ * onto root.data.formFields — the block text itself (with its {{tokens}}) is
64
+ * left untouched. Returns null when the text uses no variables (caller falls
65
+ * back to generating the text), false when the request failed (already
66
+ * toasted), true once values are written.
67
+ */
68
+ export declare function fillTextFormFieldsWithAi(prompt: string, text: string, extraContext?: Record<string, unknown>): Promise<boolean | null>;
69
+ export declare function requestRichTextAi(prompt: string, content: string, fieldId?: string): Promise<string | null>;
70
+ /**
71
+ * One prompt → values for every field. Returns null (after toasting) when the
72
+ * request fails or yields nothing usable; null silently when `signal` aborts it.
73
+ */
74
+ export declare function requestAiFill(prompt: string, fields: AiTargetField[], signal?: AbortSignal, extraContext?: Record<string, unknown>): Promise<AiValue[] | null>;
75
+ 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
- export declare function setUpgradeHandler(handler: (() => void) | null | undefined): void;
2
- /**
3
- * Consumer hook used by every paywall trigger (VariablesPaywall etc.).
4
- * Returns a single `openUpgrade` function that:
5
- * - Delegates to the host callback if one is registered, OR
6
- * - Opens the built-in `<UpgradeDialog>` otherwise.
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,8 @@
1
+ /**
2
+ * A `{{token}}` typed anywhere on the page becomes a variable right away — not
3
+ * only once the page is saved as a template. Appends a field for every scalar
4
+ * token with no matching form field. Once added it's no longer "missing", so
5
+ * this can't loop. Mounted from the always-present inspector drawer so the
6
+ * variable already exists when the Variables tab is opened.
7
+ */
8
+ export default function useAutoRegisterTokenFields(): void;
@@ -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[];
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ content: string;
3
+ fieldId?: string;
4
+ onGenerated: (html: string) => void;
5
+ };
6
+ export default function RichTextAiButton({ content, fieldId, onGenerated }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -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;
@@ -0,0 +1,7 @@
1
+ import { BehaviourField } from './behaviourFields';
2
+ type Props = {
3
+ field: BehaviourField;
4
+ context: any;
5
+ };
6
+ export declare const renderBehaviourField: ({ field, context }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -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 pagepilot's Shell wrapper and ahd-fe's
15
- * `mainBoxSx` both work without the caller having to know.
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,6 +1,3 @@
1
- /**
2
- * Builds the `srcDoc` HTML for the iframe that shows the saved page as the page-tour
3
- * editor backdrop. Strips anything that would execute the live tour on top of the preview
4
- * (our injected integration block, stray <script>/<noscript> tags).
5
- */
6
- export declare function buildIframeSrcDoc(pageHtml: string): string;
1
+ export declare function buildIframeSrcDoc(pageHtml: string, opts?: {
2
+ ppTheme?: 'light' | 'dark';
3
+ }): string;
@@ -1 +1 @@
1
- export declare const saveMenuHrefEdits: (_doc: Record<string, any>) => Promise<void>;
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: () => Promise<any> | void;
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 = 60000;
10
- export default function useAutosave({ isDirty, onSave, enabled, isSaving, intervalMs, }: UseAutosaveOptions): void;
14
+ export declare const AUTOSAVE_INTERVAL_MS = 90000;
15
+ export default function useAutosave({ isDirty, onSave, enabled, isSaving, intervalMs, }: UseAutosaveOptions): UseAutosaveResult;