pagepilot-visual-editor 1.0.2
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 +64 -0
- package/LICENSE +21 -0
- package/README.md +553 -0
- package/dist/PagePilotEditor.d.ts +17 -0
- package/dist/blocks-internal/block-button/src/NudegeIcons.d.ts +18 -0
- package/dist/blocks-internal/block-button/src/icons.d.ts +5 -0
- package/dist/blocks-internal/block-button/src/index.d.ts +145 -0
- package/dist/blocks-internal/block-button-group/src/index.d.ts +35 -0
- package/dist/blocks-internal/block-columns-container/src/index.d.ts +38 -0
- package/dist/blocks-internal/block-container/src/index.d.ts +72 -0
- package/dist/blocks-internal/block-divider/src/index.d.ts +23 -0
- package/dist/blocks-internal/block-grid/src/index.d.ts +32 -0
- package/dist/blocks-internal/block-heading/src/index.d.ts +99 -0
- package/dist/blocks-internal/block-html/src/index.d.ts +56 -0
- package/dist/blocks-internal/block-iframe/src/index.d.ts +26 -0
- package/dist/blocks-internal/block-image/src/index.d.ts +68 -0
- package/dist/blocks-internal/block-logo/src/index.d.ts +64 -0
- package/dist/blocks-internal/block-stepper/src/index.d.ts +52 -0
- package/dist/blocks-internal/block-text/src/EmailMarkdown.d.ts +8 -0
- package/dist/blocks-internal/block-text/src/index.d.ts +70 -0
- package/dist/blocks-internal/block-video/src/index.d.ts +46 -0
- package/dist/blocks-internal/block-youtube-url/src/index.d.ts +32 -0
- package/dist/editor/Shell.d.ts +6 -0
- package/dist/editor/StatusPill.d.ts +3 -0
- package/dist/editor/Topbar.d.ts +27 -0
- package/dist/editor/blockToggles.d.ts +12 -0
- package/dist/editor/theme.d.ts +10 -0
- package/dist/editor/types.d.ts +128 -0
- package/dist/editor-sample/App/InspectorDrawer/BehaviourPanel.d.ts +1 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/BlockStyleClipboardBar.d.ts +16 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/blockStyleClipboard.d.ts +83 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/index.d.ts +5 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/AccessibilityToolsSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/AccordionSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/AvatarSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/ButtonGroupSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/ButtonSidebarPanel.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/CalendlySidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/CarouselSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/ColumnsContainerSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/ContainerSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/DividerSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FlexColumns/ColumnSection.d.ts +10 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FlexColumnsSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/GridSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/HeadingSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/HtmlSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/IframeSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/ImageSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/LogoSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MarqueeSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/PagePilotLayoutSidebarPanel.d.ts +24 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/PricingAccordionSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/PricingAccordionSidebarPanel.styled.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/RatingSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/SkipLinkSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/SpacerSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/StepperSidebarPanel.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/TabsBlockSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/VideoSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/BaseSidebarPanel.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/CollapsibleSection.d.ts +13 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/ContrastWarning.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/MediaLibraryButton.d.ts +17 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/SectionWrapper.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/contrast.d.ts +10 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/BooleanInput.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/CodeEditor.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/BaseColorInput.d.ts +14 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Picker.d.ts +28 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Swatch.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/index.d.ts +14 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColumnWidthsInput.d.ts +10 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontFamily.d.ts +11 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontSizeInput.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontStyleInput.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/FontWeightInput.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/NumberInput.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/PaddingInput.d.ts +16 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/RadioGroupInput.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/RadiusInput.d.ts +20 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/SliderInput.d.ts +14 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/SwitchInput.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextAlignInput.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextDecorationInput.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextDimensionInput.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/TextInput.d.ts +24 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/WidthInputWithSelect.d.ts +12 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/raw/RawSliderInput.d.ts +13 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/style-inputs/MultiStylePropertyPanel.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/style-inputs/SingleStylePropertyPanel.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/EditorBehavior.d.ts +21 -0
- package/dist/editor-sample/App/InspectorDrawer/LayersPanel.d.ts +2 -0
- package/dist/editor-sample/App/InspectorDrawer/LayersPanelStyles.d.ts +27 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/BlocksPanel.d.ts +3 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/icons/index.d.ts +16 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/index.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/templateHelpers.d.ts +1 -0
- package/dist/editor-sample/App/InspectorDrawer/StylesPanel.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/hooks/useScalarFieldInput.d.ts +23 -0
- package/dist/editor-sample/App/InspectorDrawer/icons/index.d.ts +53 -0
- package/dist/editor-sample/App/InspectorDrawer/index.d.ts +16 -0
- package/dist/editor-sample/App/InspectorDrawer/layerClipboard.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/useLayerNode.d.ts +35 -0
- package/dist/editor-sample/App/SelectionOverlay/index.d.ts +0 -0
- package/dist/editor-sample/App/TemplatePanel/HtmlPanel.d.ts +2 -0
- package/dist/editor-sample/App/TemplatePanel/JsonPanel.d.ts +2 -0
- package/dist/editor-sample/App/TemplatePanel/helper/HighlightedCodePanel.d.ts +7 -0
- package/dist/editor-sample/App/TemplatePanel/helper/highlighters.d.ts +2 -0
- package/dist/editor-sample/App/TemplatePanel/hooks/index.d.ts +3 -0
- package/dist/editor-sample/App/TemplatePanel/hooks/useDragSelection.d.ts +23 -0
- package/dist/editor-sample/App/TemplatePanel/hooks/useMainBoxStyles.d.ts +12 -0
- package/dist/editor-sample/App/TemplatePanel/hooks/usePanelPositioning.d.ts +25 -0
- package/dist/editor-sample/App/TemplatePanel/index.d.ts +17 -0
- package/dist/editor-sample/App/TemplatePanel/pageGuide/AhdMarkerLayer.d.ts +19 -0
- package/dist/editor-sample/App/TemplatePanel/pageGuide/elementBounds.d.ts +24 -0
- package/dist/editor-sample/App/TemplatePanel/pageGuide/iframeSrcDoc.d.ts +6 -0
- package/dist/editor-sample/App/TemplatePanel/pageGuide/useAhdMarkers.d.ts +28 -0
- package/dist/editor-sample/App/TemplatePanel/types.d.ts +36 -0
- package/dist/editor-sample/App/TemplatePanel/utils/index.d.ts +1 -0
- package/dist/editor-sample/App/TemplatePanel/utils/positioningUtils.d.ts +16 -0
- package/dist/editor-sample/App/hooks/constants.d.ts +10 -0
- package/dist/editor-sample/App/hooks/page/menuHrefBaselines.d.ts +10 -0
- package/dist/editor-sample/App/hooks/page/saveMenuHrefEdits.d.ts +1 -0
- package/dist/editor-sample/App/hooks/page/useSaveHandler.d.ts +21 -0
- package/dist/editor-sample/App/hooks/useGetPageType.d.ts +3 -0
- package/dist/editor-sample/App/hooks/usePreviewScreen.d.ts +8 -0
- package/dist/editor-sample/App/shared/AddSectionDialog.d.ts +12 -0
- package/dist/editor-sample/App/shared/PagePreviewFrame.d.ts +16 -0
- package/dist/editor-sample/App/shared/PreviewDialog.d.ts +15 -0
- package/dist/editor-sample/App/shared/SectionsDropdown.d.ts +10 -0
- package/dist/editor-sample/App/shared/editor.styles.d.ts +21 -0
- package/dist/editor-sample/App/shared/multipleSections.styled.d.ts +18 -0
- package/dist/editor-sample/App/shared/pageSections.d.ts +28 -0
- package/dist/editor-sample/documents/blocks/AccessibilityTools/AccessibilityToolsEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/AccessibilityTools/AccessibilityToolsPropsSchema.d.ts +1 -0
- package/dist/editor-sample/documents/blocks/Accordion/AccordionEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/Accordion/AccordionPropsSchema.d.ts +41 -0
- package/dist/editor-sample/documents/blocks/ButtonGroup/ButtonGroupEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/ButtonGroup/ButtonGroupPropsSchema.d.ts +31 -0
- package/dist/editor-sample/documents/blocks/Carousel/CarouselEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/Carousel/CarouselPropsSchema.d.ts +47 -0
- package/dist/editor-sample/documents/blocks/ColumnsContainer/ColumnsContainerEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +49 -0
- package/dist/editor-sample/documents/blocks/Container/ContainerEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/Container/ContainerPropsSchema.d.ts +52 -0
- package/dist/editor-sample/documents/blocks/FlexColumns/FlexColumnsEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/FlexColumns/FlexColumnsPropsSchema.d.ts +1 -0
- package/dist/editor-sample/documents/blocks/Grid/GridEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/Grid/GridPropsSchema.d.ts +48 -0
- package/dist/editor-sample/documents/blocks/Marquee/MarqueeEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/Marquee/MarqueePropsSchema.d.ts +37 -0
- package/dist/editor-sample/documents/blocks/PagePilotLayout/PagePilotLayoutEditor.d.ts +2 -0
- package/dist/editor-sample/documents/blocks/PagePilotLayout/PagePilotLayoutPropsSchema.d.ts +151 -0
- package/dist/editor-sample/documents/blocks/PricingAccordion/PricingAccordionEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/PricingAccordion/PricingAccordionPropsSchema.d.ts +77 -0
- package/dist/editor-sample/documents/blocks/Rating/RatingEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/Rating/RatingPropsSchema.d.ts +31 -0
- package/dist/editor-sample/documents/blocks/SkipLink/SkipLinkEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/SkipLink/SkipLinkPropsSchema.d.ts +1 -0
- package/dist/editor-sample/documents/blocks/TabsBlock/TabsBlockEditor.d.ts +3 -0
- package/dist/editor-sample/documents/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +53 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/BlockButton.d.ts +9 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/BlockInsertAboveContext.d.ts +2 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/BlocksMenu.d.ts +10 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/DividerButton.d.ts +7 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/PlaceholderButton.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/ScopePickerMenu.d.ts +14 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/brandButtonDefaults.d.ts +14 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.d.ts +9 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/index.d.ts +16 -0
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/index.d.ts +16 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineEditableText.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/FullscreenOverlay.d.ts +20 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/constants.d.ts +22 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/dialogs/ImageDialog.d.ts +20 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/dialogs/LinkDialog.d.ts +23 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/dialogs/VideoDialog.d.ts +9 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/dom.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/focusGuard.d.ts +7 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/format.d.ts +19 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useCodeView.d.ts +35 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useFormatPainter.d.ts +18 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useFormatState.d.ts +11 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useFullscreen.d.ts +24 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useToolbarCommands.d.ts +66 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useToolbarDrag.d.ts +21 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useToolbarPosition.d.ts +7 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/index.d.ts +17 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/inlineEditChrome.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/popovers/ColorSwatchPopover.d.ts +21 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/popovers/ImagePopover.d.ts +16 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/popovers/OverflowMenu.d.ts +13 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/popovers/TableGridPicker.d.ts +10 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/Divider.d.ts +8 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/Dropdown.d.ts +27 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/HoverButton.d.ts +27 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/IconBtn.d.ts +16 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/MenuItem.d.ts +32 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/MicIcon.d.ts +7 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/NoteIcon.d.ts +15 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/selection.d.ts +17 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/styles.d.ts +14 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/types.d.ts +36 -0
- package/dist/editor-sample/documents/blocks/helpers/TStyle.d.ts +17 -0
- package/dist/editor-sample/documents/blocks/helpers/TemplateTokenOverlay.d.ts +44 -0
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/EditorBlockWrapper.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/ReaderBlockWrapper.d.ts +8 -0
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/TuneMenu.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/useCanvasDrop.d.ts +18 -0
- package/dist/editor-sample/documents/blocks/helpers/blockVisibility.d.ts +27 -0
- package/dist/editor-sample/documents/blocks/helpers/documentUtils.d.ts +126 -0
- package/dist/editor-sample/documents/blocks/helpers/fontFamily.d.ts +33 -0
- package/dist/editor-sample/documents/blocks/helpers/fontWeight.d.ts +13 -0
- package/dist/editor-sample/documents/blocks/helpers/zod.d.ts +48 -0
- package/dist/editor-sample/documents/editor/EditorBlock.d.ts +13 -0
- package/dist/editor-sample/documents/editor/EditorContext.d.ts +347 -0
- package/dist/editor-sample/documents/editor/EditorVariantContext.d.ts +4 -0
- package/dist/editor-sample/documents/editor/LazyEditorBlock.d.ts +26 -0
- package/dist/editor-sample/documents/editor/core.d.ts +1212 -0
- package/dist/editor-sample/documents/editor/prefillDefaultValues.d.ts +12 -0
- package/dist/editor-sample/documents/editor/templateVariables.d.ts +50 -0
- package/dist/editor-sample/getConfiguration/index.d.ts +1 -0
- package/dist/editor-sample/getConfiguration/sample/empty-email-message.d.ts +3 -0
- package/dist/editor-sample/getConfiguration/sample/one-time-passcode.d.ts +3 -0
- package/dist/editor-sample/getConfiguration/sample/order-ecommerce.d.ts +3 -0
- package/dist/editor-sample/getConfiguration/sample/post-metrics-report.d.ts +3 -0
- package/dist/editor-sample/getConfiguration/sample/reservation-reminder.d.ts +3 -0
- package/dist/editor-sample/getConfiguration/sample/reset-password.d.ts +3 -0
- package/dist/editor-sample/getConfiguration/sample/respond-to-message.d.ts +3 -0
- package/dist/editor-sample/getConfiguration/sample/subscription-receipt.d.ts +3 -0
- package/dist/editor-sample/getConfiguration/sample/welcome.d.ts +3 -0
- package/dist/editor-sample/utils/editorKvStore.d.ts +5 -0
- package/dist/email-builder-core/Reader/ReaderBlockShim.d.ts +10 -0
- package/dist/email-builder-core/Reader/core.d.ts +35 -0
- package/dist/email-builder-core/blocks/AccessibilityTools/AccessibilityToolsPropsSchema.d.ts +79 -0
- package/dist/email-builder-core/blocks/AccessibilityTools/AccessibilityToolsReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/AccessibilityTools/icons.d.ts +4 -0
- package/dist/email-builder-core/blocks/Accordion/AccordionPropsSchema.d.ts +35 -0
- package/dist/email-builder-core/blocks/Accordion/AccordionReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/ButtonGroup/ButtonGroupPropsSchema.d.ts +31 -0
- package/dist/email-builder-core/blocks/ButtonGroup/ButtonGroupReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/Calendly/CalendlyPropsSchema.d.ts +24 -0
- package/dist/email-builder-core/blocks/Calendly/CalendlyReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/Carousel/CarouselPropsSchema.d.ts +47 -0
- package/dist/email-builder-core/blocks/Carousel/CarouselReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +53 -0
- package/dist/email-builder-core/blocks/ColumnsContainer/ColumnsContainerReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/Container/ContainerPropsSchema.d.ts +52 -0
- package/dist/email-builder-core/blocks/Container/ContainerReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/FlexColumns/FlexColumnsPropsSchema.d.ts +44 -0
- package/dist/email-builder-core/blocks/FlexColumns/FlexColumnsReader.d.ts +2 -0
- package/dist/email-builder-core/blocks/FlexColumns/flexColumnsHelpers.d.ts +10 -0
- package/dist/email-builder-core/blocks/Grid/GridPropsSchema.d.ts +48 -0
- package/dist/email-builder-core/blocks/Grid/GridReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/Marquee/MarqueePropsSchema.d.ts +36 -0
- package/dist/email-builder-core/blocks/Marquee/MarqueeReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/PagePilotLayout/PagePilotLayoutPropsSchema.d.ts +103 -0
- package/dist/email-builder-core/blocks/PagePilotLayout/PagePilotLayoutReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/PricingAccordion/PricingAccordionPropsSchema.d.ts +77 -0
- package/dist/email-builder-core/blocks/PricingAccordion/PricingAccordionReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/Rating/RatingPropsSchema.d.ts +30 -0
- package/dist/email-builder-core/blocks/Rating/RatingReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/SkipLink/SkipLinkPropsSchema.d.ts +42 -0
- package/dist/email-builder-core/blocks/SkipLink/SkipLinkReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +53 -0
- package/dist/email-builder-core/blocks/TabsBlock/TabsBlockReader.d.ts +3 -0
- package/dist/email-builder-core/blocks/helpers/blockStyleHelpers.d.ts +15 -0
- package/dist/email-builder-core/helpers/fontFamily.d.ts +33 -0
- package/dist/email-builder-core/helpers/fontWeight.d.ts +13 -0
- package/dist/email-builder-core/helpers/screen.d.ts +13 -0
- package/dist/email-builder-core/helpers/templateVariables.d.ts +14 -0
- package/dist/email-builder-core/index.d.ts +3 -0
- package/dist/email-builder-core/renderers/accessibilityTools.d.ts +35 -0
- package/dist/email-builder-core/renderers/pageScripts.d.ts +7 -0
- package/dist/email-builder-core/renderers/renderDynamicCss.d.ts +1 -0
- package/dist/email-builder-core/renderers/renderToStaticMarkup.d.ts +41 -0
- package/dist/host-stubs/_passthrough.d.ts +2 -0
- package/dist/host-stubs/i18n.d.ts +8 -0
- package/dist/host-stubs/style/menu.styled.d.ts +15 -0
- package/dist/host-stubs/style/styled.d.ts +34 -0
- package/dist/host-stubs/theme/theme.d.ts +2 -0
- package/dist/host-stubs/view/images/Icons.d.ts +649 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog.d.ts +2 -0
- package/dist/host-stubs/view/shared/message.d.ts +11 -0
- package/dist/host-stubs/view/shared/modals/PopupConfirm.d.ts +11 -0
- package/dist/index.cjs +1630 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +168332 -0
- package/dist/style.css +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare function zColor(): z.ZodString;
|
|
3
|
+
export declare function zFontFamily(): z.ZodEnum<{
|
|
4
|
+
MODERN_SANS: "MODERN_SANS";
|
|
5
|
+
BOOK_SANS: "BOOK_SANS";
|
|
6
|
+
ORGANIC_SANS: "ORGANIC_SANS";
|
|
7
|
+
GEOMETRIC_SANS: "GEOMETRIC_SANS";
|
|
8
|
+
HEAVY_SANS: "HEAVY_SANS";
|
|
9
|
+
ROUNDED_SANS: "ROUNDED_SANS";
|
|
10
|
+
MODERN_SERIF: "MODERN_SERIF";
|
|
11
|
+
BOOK_SERIF: "BOOK_SERIF";
|
|
12
|
+
MONOSPACE: "MONOSPACE";
|
|
13
|
+
ROBOTO: "ROBOTO";
|
|
14
|
+
OPEN_SANS: "OPEN_SANS";
|
|
15
|
+
LATO: "LATO";
|
|
16
|
+
POPPINS: "POPPINS";
|
|
17
|
+
INTER: "INTER";
|
|
18
|
+
MONTSERRAT: "MONTSERRAT";
|
|
19
|
+
RALEWAY: "RALEWAY";
|
|
20
|
+
NUNITO: "NUNITO";
|
|
21
|
+
PLAYFAIR_DISPLAY: "PLAYFAIR_DISPLAY";
|
|
22
|
+
MERRIWEATHER: "MERRIWEATHER";
|
|
23
|
+
PT_SANS: "PT_SANS";
|
|
24
|
+
OSWALD: "OSWALD";
|
|
25
|
+
SOURCE_SANS_PRO: "SOURCE_SANS_PRO";
|
|
26
|
+
RUBIK: "RUBIK";
|
|
27
|
+
WORK_SANS: "WORK_SANS";
|
|
28
|
+
NOTO_SANS: "NOTO_SANS";
|
|
29
|
+
DANCING_SCRIPT: "DANCING_SCRIPT";
|
|
30
|
+
PACIFICO: "PACIFICO";
|
|
31
|
+
LOBSTER: "LOBSTER";
|
|
32
|
+
BEBAS_NEUE: "BEBAS_NEUE";
|
|
33
|
+
}>;
|
|
34
|
+
export declare function zFontWeight(): z.ZodEnum<{
|
|
35
|
+
normal: "normal";
|
|
36
|
+
bold: "bold";
|
|
37
|
+
}>;
|
|
38
|
+
export declare function zTextAlign(): z.ZodEnum<{
|
|
39
|
+
right: "right";
|
|
40
|
+
left: "left";
|
|
41
|
+
center: "center";
|
|
42
|
+
}>;
|
|
43
|
+
export declare function zPadding(): z.ZodObject<{
|
|
44
|
+
top: z.ZodNumber;
|
|
45
|
+
bottom: z.ZodNumber;
|
|
46
|
+
right: z.ZodNumber;
|
|
47
|
+
left: z.ZodNumber;
|
|
48
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const useCurrentBlockId: () => string;
|
|
3
|
+
type EditorBlockProps = {
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param id - Block id
|
|
9
|
+
* @returns EditorBlock component that loads data from the EditorDocumentContext
|
|
10
|
+
*/
|
|
11
|
+
declare function EditorBlock({ id }: EditorBlockProps): React.JSX.Element;
|
|
12
|
+
declare const _default: React.MemoExoticComponent<typeof EditorBlock>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { PageTypes } from '../../App/hooks/constants';
|
|
2
|
+
import { TEditorConfiguration } from './core';
|
|
3
|
+
import { TemplateFormField, TemplateArrayRow } from './templateVariables';
|
|
4
|
+
type TValue = {
|
|
5
|
+
document: TEditorConfiguration;
|
|
6
|
+
selectedBlockId: string | null;
|
|
7
|
+
selectedSidebarTab: 'block-configuration' | 'styles' | 'behaviour' | 'layout' | 'settings' | 'background' | 'page-pilot-ai' | 'layers' | 'brand' | 'seo' | 'variables' | 'research';
|
|
8
|
+
selectedMainTab: 'editor' | 'preview' | 'json' | 'html';
|
|
9
|
+
selectedScreenSize: 'desktop' | 'mobile' | 'tablet';
|
|
10
|
+
inspectorDrawerOpen: boolean;
|
|
11
|
+
samplesDrawerOpen: boolean;
|
|
12
|
+
activeStepIndex: number;
|
|
13
|
+
selectors: Array<string | undefined>;
|
|
14
|
+
elementIdError: {
|
|
15
|
+
hasError: boolean;
|
|
16
|
+
stepIndex?: number;
|
|
17
|
+
};
|
|
18
|
+
slugError: boolean;
|
|
19
|
+
stepSavedSnapshots?: Record<number, string | null>;
|
|
20
|
+
panelMeasurements?: {
|
|
21
|
+
panelWidth: number;
|
|
22
|
+
panelHeight: number;
|
|
23
|
+
containerWidth: number;
|
|
24
|
+
containerHeight: number;
|
|
25
|
+
renderWidth?: number;
|
|
26
|
+
renderHeight?: number;
|
|
27
|
+
offsetLeft?: number;
|
|
28
|
+
offsetTop?: number;
|
|
29
|
+
} | null;
|
|
30
|
+
inlineEditing: {
|
|
31
|
+
blockId: string | null;
|
|
32
|
+
draft: string;
|
|
33
|
+
};
|
|
34
|
+
inlineEditingEnabled: boolean;
|
|
35
|
+
hoveredBlockId: string | null;
|
|
36
|
+
copiedBlock: {
|
|
37
|
+
rootBlockId: string;
|
|
38
|
+
blocks: Record<string, any>;
|
|
39
|
+
} | null;
|
|
40
|
+
activeSectionIsExternal: boolean;
|
|
41
|
+
undoStack: HistoryEntry[];
|
|
42
|
+
redoStack: HistoryEntry[];
|
|
43
|
+
stepHistories: Record<number, {
|
|
44
|
+
undoStack: HistoryEntry[];
|
|
45
|
+
redoStack: HistoryEntry[];
|
|
46
|
+
}>;
|
|
47
|
+
isApplyingHistory: boolean;
|
|
48
|
+
currentRecordType: string | null;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* A single undo/redo step. We snapshot the selected block alongside the
|
|
52
|
+
* document so undo/redo can put the user back exactly where they were —
|
|
53
|
+
* losing selection on every undo means having to re-pick the block you were
|
|
54
|
+
* tweaking after each step, which makes rapid trial-and-error painful.
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* Optional callbacks for state that lives OUTSIDE the editor's document —
|
|
58
|
+
* e.g. the tour record's `steps` array, which is held by the parent React
|
|
59
|
+
* tree. The editor only owns the active step's document, so reverting the
|
|
60
|
+
* doc alone after an action like "apply multi-step template" leaves the
|
|
61
|
+
* parent record stuck on the post-action state. The action attaches an
|
|
62
|
+
* `UndoSideEffect` to its undo entry; undo/redo fire `.undo()` / `.redo()`
|
|
63
|
+
* after the editor's own state has settled so the two surfaces stay in sync.
|
|
64
|
+
*/
|
|
65
|
+
export type UndoSideEffect = {
|
|
66
|
+
undo: () => void;
|
|
67
|
+
redo: () => void;
|
|
68
|
+
};
|
|
69
|
+
type HistoryEntry = {
|
|
70
|
+
document: TEditorConfiguration;
|
|
71
|
+
activeStepIndex: number;
|
|
72
|
+
selectedBlockId: string | null;
|
|
73
|
+
selectors: Array<string | undefined>;
|
|
74
|
+
sideEffect?: UndoSideEffect;
|
|
75
|
+
};
|
|
76
|
+
export declare const editorStateStore: import('zustand').UseBoundStore<import('zustand').StoreApi<TValue>>;
|
|
77
|
+
export declare function useDocument(): TEditorConfiguration;
|
|
78
|
+
/**
|
|
79
|
+
* Reactive document view with orphan blocks (the ones handleDeleteClick deliberately
|
|
80
|
+
* leaves behind) pruned out. Use this in save/publish/preview consumers so backend
|
|
81
|
+
* payloads don't keep growing, but stick with useDocument() inside the editor where
|
|
82
|
+
* you may still want to see disconnected blocks.
|
|
83
|
+
*/
|
|
84
|
+
export declare function useDocumentPruned(): TEditorConfiguration;
|
|
85
|
+
/**
|
|
86
|
+
* Subscribe to a SINGLE block by id. The selector returns the block reference
|
|
87
|
+
* directly, so re-renders fire only when that block's reference changes —
|
|
88
|
+
* which, thanks to the per-block short-circuit inside `setDocument`, happens
|
|
89
|
+
* only when that block actually changed. Use this in place of `useDocument()`
|
|
90
|
+
* whenever a component only needs one block's data.
|
|
91
|
+
*/
|
|
92
|
+
export declare function useEditorBlock(id: string): any;
|
|
93
|
+
/**
|
|
94
|
+
* Non-reactive read of the current document. Use inside event handlers / callbacks
|
|
95
|
+
* when you need the latest document but do NOT want the component to re-render
|
|
96
|
+
* every time any block in the document changes.
|
|
97
|
+
*/
|
|
98
|
+
export declare function getDocument(): TValue['document'];
|
|
99
|
+
export declare function useRootFontFamily(): string;
|
|
100
|
+
export declare function useSelectedBlockId(): string;
|
|
101
|
+
/**
|
|
102
|
+
* Boolean selector — returns true only when THIS block is the selected one.
|
|
103
|
+
* Use in per-block components so that switching selection from A to B only
|
|
104
|
+
* re-renders A and B, not every other block on the canvas.
|
|
105
|
+
*/
|
|
106
|
+
export declare function useIsBlockSelected(id: string): boolean;
|
|
107
|
+
export declare function useSelectedScreenSize(): "desktop" | "tablet" | "mobile";
|
|
108
|
+
export declare function useSelectedMainTab(): "html" | "editor" | "preview" | "json";
|
|
109
|
+
export declare function useActiveStepIndex(): number;
|
|
110
|
+
export declare function useSelectors(): string[];
|
|
111
|
+
export declare function usePanelMeasurements(): {
|
|
112
|
+
panelWidth: number;
|
|
113
|
+
panelHeight: number;
|
|
114
|
+
containerWidth: number;
|
|
115
|
+
containerHeight: number;
|
|
116
|
+
renderWidth?: number;
|
|
117
|
+
renderHeight?: number;
|
|
118
|
+
offsetLeft?: number;
|
|
119
|
+
offsetTop?: number;
|
|
120
|
+
};
|
|
121
|
+
export declare function useCurrentRecordType(): string;
|
|
122
|
+
export declare function setCurrentRecordType(type: string | null): void;
|
|
123
|
+
export declare function setPanelMeasurements(measurements: {
|
|
124
|
+
panelWidth: number;
|
|
125
|
+
panelHeight: number;
|
|
126
|
+
containerWidth: number;
|
|
127
|
+
containerHeight: number;
|
|
128
|
+
renderWidth?: number;
|
|
129
|
+
renderHeight?: number;
|
|
130
|
+
offsetLeft?: number;
|
|
131
|
+
offsetTop?: number;
|
|
132
|
+
} | null): void;
|
|
133
|
+
export declare function setSelectors(selectors: Array<string | undefined>): void;
|
|
134
|
+
export declare function setSelectorAt(index: number, selector: string): void;
|
|
135
|
+
/**
|
|
136
|
+
* Per-call options for `setActiveStepIndex`. `skipHistory` lets non-user
|
|
137
|
+
* callers — e.g. the add/delete/duplicate/reorder paths, which are about to
|
|
138
|
+
* push their own undo entry that already captures the pre-action active step
|
|
139
|
+
* via the sideEffect mechanism — change the active step without producing a
|
|
140
|
+
* separate "navigate" entry in the undo stack. Without this opt-out, those
|
|
141
|
+
* structural actions would emit TWO entries (one navigate + one structural),
|
|
142
|
+
* forcing the user to press Undo twice to revert a single conceptual action.
|
|
143
|
+
*
|
|
144
|
+
* Also used during initial load (`useGetTooltip` reading the `?step=N` query
|
|
145
|
+
* param), where the navigation isn't a user edit at all and shouldn't be
|
|
146
|
+
* undoable.
|
|
147
|
+
*/
|
|
148
|
+
type SetActiveStepIndexOptions = {
|
|
149
|
+
skipHistory?: boolean;
|
|
150
|
+
};
|
|
151
|
+
export declare function setActiveStepIndex(activeStepIndex: number, options?: SetActiveStepIndexOptions): void;
|
|
152
|
+
export declare function setSelectedMainTab(selectedMainTab: TValue['selectedMainTab']): void;
|
|
153
|
+
export declare function useSelectedSidebarTab(): "layout" | "background" | "behaviour" | "block-configuration" | "styles" | "settings" | "page-pilot-ai" | "layers" | "brand" | "seo" | "variables" | "research";
|
|
154
|
+
export declare function useInspectorDrawerOpen(): boolean;
|
|
155
|
+
export declare function useSamplesDrawerOpen(): boolean;
|
|
156
|
+
export declare function useInlineEditingEnabled(): boolean;
|
|
157
|
+
export declare function setInlineEditingEnabled(enabled: boolean): void;
|
|
158
|
+
export declare function useInlineEditing(): {
|
|
159
|
+
blockId: string | null;
|
|
160
|
+
draft: string;
|
|
161
|
+
};
|
|
162
|
+
export declare function useHoveredBlockId(): string;
|
|
163
|
+
/**
|
|
164
|
+
* Boolean selector — returns true only when THIS block is the hovered one.
|
|
165
|
+
* See {@link useIsBlockSelected} for rationale.
|
|
166
|
+
*/
|
|
167
|
+
export declare function useIsBlockHovered(id: string): boolean;
|
|
168
|
+
export declare function setHoveredBlockId(hoveredBlockId: string | null): void;
|
|
169
|
+
export declare function useCopiedBlock(): {
|
|
170
|
+
rootBlockId: string;
|
|
171
|
+
blocks: Record<string, any>;
|
|
172
|
+
};
|
|
173
|
+
export declare function getCopiedBlock(): {
|
|
174
|
+
rootBlockId: string;
|
|
175
|
+
blocks: Record<string, any>;
|
|
176
|
+
};
|
|
177
|
+
export declare function setCopiedBlock(config: {
|
|
178
|
+
rootBlockId: string;
|
|
179
|
+
blocks: Record<string, any>;
|
|
180
|
+
}): void;
|
|
181
|
+
export declare function clearCopiedBlock(): void;
|
|
182
|
+
export declare function useActiveSectionIsExternal(): boolean;
|
|
183
|
+
export declare function setActiveSectionIsExternal(value: boolean): void;
|
|
184
|
+
/**
|
|
185
|
+
* Selects a block without changing the active sidebar tab or opening the inspector drawer.
|
|
186
|
+
* Use this when selection should be a "focus" action, not a "navigate to configuration" action.
|
|
187
|
+
*/
|
|
188
|
+
export declare function setSelectedBlockIdKeepTab(selectedBlockId: string | null): void;
|
|
189
|
+
export declare function setSelectedBlockId(selectedBlockId: TValue['selectedBlockId']): void;
|
|
190
|
+
export declare function setSelectedBlockIdOnly(selectedBlockId: TValue['selectedBlockId']): void;
|
|
191
|
+
export declare function setSidebarTab(selectedSidebarTab: TValue['selectedSidebarTab']): void;
|
|
192
|
+
export declare function startInlineEditing(blockId: string, draft: string): void;
|
|
193
|
+
export declare function stopInlineEditing(): void;
|
|
194
|
+
export declare function registerPendingInlineCommit(cb: () => void): () => void;
|
|
195
|
+
/**
|
|
196
|
+
* Public flush so the inline toolbar can demand "this command is its own
|
|
197
|
+
* undo step" immediately, without waiting for blur or the next setDocument.
|
|
198
|
+
*
|
|
199
|
+
* Why: toolbar buttons (Bold, color, font size, list, etc.) mutate the
|
|
200
|
+
* contentEditable via execCommand. Those mutations DO fire input events,
|
|
201
|
+
* but `InlineEditableText.handleInput` only commits on word boundaries /
|
|
202
|
+
* paste / etc. — pure formatting clicks were silently held until the next
|
|
203
|
+
* blur or external setDocument. The result was the bug the user reported:
|
|
204
|
+
* "some tools/settings don't immediately go into undo/redo".
|
|
205
|
+
*/
|
|
206
|
+
export declare function commitPendingInlineEdit(): void;
|
|
207
|
+
export declare function resetDocument(document: TValue['document'], options?: {
|
|
208
|
+
sideEffect?: UndoSideEffect;
|
|
209
|
+
activeStepIndex?: number;
|
|
210
|
+
/**
|
|
211
|
+
* Skip the undo-stack push *and* wipe both stacks. Use when seeding the
|
|
212
|
+
* editor from external state (host record on mount, hot reload, etc.) —
|
|
213
|
+
* the swap isn't a user action and the previous empty doc shouldn't
|
|
214
|
+
* become an Undo target. Without this, the Undo button is already
|
|
215
|
+
* enabled the moment the editor mounts because pushToUndoStack records
|
|
216
|
+
* the pre-seed empty state.
|
|
217
|
+
*/
|
|
218
|
+
skipHistory?: boolean;
|
|
219
|
+
}): void;
|
|
220
|
+
/**
|
|
221
|
+
* Wipe both history stacks without touching the document. Used by the Shell
|
|
222
|
+
* after the initial seed has settled, to swallow any spurious pushes that
|
|
223
|
+
* various block-level useEffects (ButtonGroup auto-seed, layout positioning
|
|
224
|
+
* re-measure, sidebar panels echoing fetched data, etc.) emit between
|
|
225
|
+
* "editor mounted" and "user has actually edited something". Without this
|
|
226
|
+
* guard the Undo button is enabled on first paint and clicking it rolls
|
|
227
|
+
* the canvas back to an empty document.
|
|
228
|
+
*/
|
|
229
|
+
export declare function clearEditorHistory(): void;
|
|
230
|
+
export declare function resetDocumentKeepTab(document: TValue['document'], options?: {
|
|
231
|
+
sideEffect?: UndoSideEffect;
|
|
232
|
+
}): void;
|
|
233
|
+
/**
|
|
234
|
+
* Force the next push to start a fresh entry (no coalescing). Used after
|
|
235
|
+
* undo/redo and step/section switches so a burst from before the navigation
|
|
236
|
+
* can't accidentally merge with the next edit.
|
|
237
|
+
*
|
|
238
|
+
* Also exported for the inline editor's word-boundary commit path: each
|
|
239
|
+
* finished word should become its own undo entry instead of collapsing into
|
|
240
|
+
* the 200ms burst window with neighbouring words.
|
|
241
|
+
*/
|
|
242
|
+
export declare function resetCoalesce(): void;
|
|
243
|
+
export declare function undo(): void;
|
|
244
|
+
export declare function redo(): void;
|
|
245
|
+
/**
|
|
246
|
+
* Load a step / section document into the live editor without touching the
|
|
247
|
+
* global undo stack. Called by the useEffect that fires on activeStepIndex
|
|
248
|
+
* change (useGetTooltip) and by the page-section handlers when the user
|
|
249
|
+
* switches between sections.
|
|
250
|
+
*
|
|
251
|
+
* In the previous per-step history design this function ALSO swapped the live
|
|
252
|
+
* undoStack/redoStack with the per-step `stepHistories[activeStepIndex]`
|
|
253
|
+
* snapshot. With the global linear stack that machinery is gone — every
|
|
254
|
+
* action's undo entry already captures the active step it belonged to via
|
|
255
|
+
* `HistoryEntry.activeStepIndex`, so wiping or swapping stacks here would
|
|
256
|
+
* just throw away cross-step history the user can legitimately undo into.
|
|
257
|
+
*/
|
|
258
|
+
export declare function loadStepDocument(document: TValue['document']): void;
|
|
259
|
+
export declare function insertStepHistorySlot(_insertedIndex: number): void;
|
|
260
|
+
export declare function removeStepHistorySlot(_removedIndex: number): void;
|
|
261
|
+
export declare function swapStepHistoryEntries(_indexA: number, _indexB: number): void;
|
|
262
|
+
export declare function reorderStepHistoryEntries(_sourceIndex: number, _targetIndex: number): void;
|
|
263
|
+
/**
|
|
264
|
+
* Wipe a single step's saved undo/redo history. Use after a destructive
|
|
265
|
+
* step-level operation (e.g. "Replace from template", or a save that should
|
|
266
|
+
* make the current document the new clean baseline) when we want that
|
|
267
|
+
* specific step to lose its history without affecting the others.
|
|
268
|
+
*/
|
|
269
|
+
export declare function clearStepHistory(stepIndex: number): void;
|
|
270
|
+
/**
|
|
271
|
+
* Per-call options for `setDocument`. `skipHistory` lets non-user callers
|
|
272
|
+
* (layout-driven auto-writes like usePanelPositioning's ResizeObserver and
|
|
273
|
+
* initial-position seed) update the document without pushing to the undo
|
|
274
|
+
* stack OR clearing the redo stack.
|
|
275
|
+
*
|
|
276
|
+
* Why this matters for redo correctness: every regular setDocument call
|
|
277
|
+
* wipes the redo stack on the assumption that "if the user just made a
|
|
278
|
+
* forward edit, the forward branch they had via redo is no longer valid."
|
|
279
|
+
* That assumption is correct for USER edits but catastrophic for background
|
|
280
|
+
* effects. A ResizeObserver firing after the canvas reflows from an undo —
|
|
281
|
+
* which happens at the tail of every undo, since the document changed —
|
|
282
|
+
* would call setDocument to re-record the panel's position, clearing the
|
|
283
|
+
* very redo stack the user is about to interact with. The visible bug is
|
|
284
|
+
* "I undo my last edit, then redo, and the edit doesn't come back."
|
|
285
|
+
*
|
|
286
|
+
* Callers that pass skipHistory:true also opt out of flushing pending
|
|
287
|
+
* inline edits, since they're not a logical break in the user's work.
|
|
288
|
+
*/
|
|
289
|
+
export type SetDocumentOptions = {
|
|
290
|
+
skipHistory?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Attach an `UndoSideEffect` to the undo entry this setDocument call
|
|
293
|
+
* pushes. Use this when the user-visible action affects state OUTSIDE
|
|
294
|
+
* the editor's document (e.g. demo background image lives in the
|
|
295
|
+
* parent's React state + the record's per-step `backgroundImage`).
|
|
296
|
+
* The sideEffect's `undo` / `redo` callbacks fire after the editor's
|
|
297
|
+
* own state is restored, in the same try/catch wrapper as the
|
|
298
|
+
* resetDocument flow.
|
|
299
|
+
*
|
|
300
|
+
* Ignored when `skipHistory` is true (no entry is pushed in that case).
|
|
301
|
+
*/
|
|
302
|
+
sideEffect?: UndoSideEffect;
|
|
303
|
+
};
|
|
304
|
+
export declare function setDocument(document: TValue['document'], options?: SetDocumentOptions): void;
|
|
305
|
+
export declare function toggleInspectorDrawerOpen(): void;
|
|
306
|
+
export declare function toggleSamplesDrawerOpen(): void;
|
|
307
|
+
export declare function setSelectedScreenSize(selectedScreenSize: TValue['selectedScreenSize']): void;
|
|
308
|
+
/** Reactive view of the template fields on root.data.formFields. */
|
|
309
|
+
export declare function useTemplateForms(): TemplateFormField[];
|
|
310
|
+
/** Non-reactive read for use inside event handlers / the save transform. */
|
|
311
|
+
export declare function getTemplateFormsState(): TemplateFormField[];
|
|
312
|
+
/**
|
|
313
|
+
* Reactive map of blockId → repeat-row values for every container-repeat array
|
|
314
|
+
* field (array field with a `sourceBlockId`). Recomputed when the document
|
|
315
|
+
* changes. The canvas render path uses it to substitute a repeated container
|
|
316
|
+
* copy's `{{this.subField}}` tokens with that copy's row values.
|
|
317
|
+
*/
|
|
318
|
+
export declare function useRepeatRowIndex(): Map<string, TemplateArrayRow>;
|
|
319
|
+
/** Write the template-fields onto the document root (undoable, live). */
|
|
320
|
+
export declare function setTemplateForms(fields: TemplateFormField[]): void;
|
|
321
|
+
export declare function useElementIdError(): {
|
|
322
|
+
hasError: boolean;
|
|
323
|
+
stepIndex?: number;
|
|
324
|
+
};
|
|
325
|
+
export declare function setElementIdError(elementIdError: TValue['elementIdError']): void;
|
|
326
|
+
export declare function clearElementIdError(): void;
|
|
327
|
+
export declare function useSlugError(): boolean;
|
|
328
|
+
export declare function setSlugError(slugError: boolean): void;
|
|
329
|
+
export declare function clearSlugError(): void;
|
|
330
|
+
export declare function getStepSavedSnapshot(stepIndex: number): string | null;
|
|
331
|
+
export declare function initStepSavedSnapshotIfMissing(stepIndex: number, snapshot: string | null): void;
|
|
332
|
+
export declare function setStepSavedSnapshot(stepIndex: number, snapshot: string | null): void;
|
|
333
|
+
export declare function setStepSavedSnapshotFromStore(stepIndex: number): void;
|
|
334
|
+
export declare function initStepSavedSnapshotIfMissingFromStore(stepIndex: number): void;
|
|
335
|
+
export declare function clearStepSavedSnapshots(): void;
|
|
336
|
+
export declare function resetEditorStateForNewRecord(): void;
|
|
337
|
+
export declare function useIsStepDirty(stepIndex?: number): boolean;
|
|
338
|
+
export declare function pruneOrphanBlocks<T extends Record<string, any>>(doc: T, rootId?: string): T;
|
|
339
|
+
export declare function buildSnapshot({ document, selector, identifier, pageType, }: {
|
|
340
|
+
document?: any;
|
|
341
|
+
selector?: string;
|
|
342
|
+
identifier?: string;
|
|
343
|
+
pageType?: string;
|
|
344
|
+
}): string;
|
|
345
|
+
export declare function useIsTourDirty(record: any, pageType: PageTypes | undefined, initialRecord: any): boolean;
|
|
346
|
+
export declare function persistEditorToLocalStorage(record: any, recordId?: string, pageType?: string, activeStepIndex?: number): void;
|
|
347
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Virtualized wrapper around <EditorBlock>. While the placeholder div is
|
|
7
|
+
* outside the viewport (plus a 600px margin), the real EditorBlock is NOT
|
|
8
|
+
* mounted — no Zustand subscription, no children render, no Container
|
|
9
|
+
* recursion. The moment the placeholder enters that margin, we mount the
|
|
10
|
+
* real block and tear down the observer.
|
|
11
|
+
*
|
|
12
|
+
* Why this exists: when the user appends a heavy template (30+ nested
|
|
13
|
+
* blocks) to a page that already has a heavy template, the previous
|
|
14
|
+
* implementation forced React to mount every new block in one
|
|
15
|
+
* synchronous commit — sometimes locking the page for several seconds.
|
|
16
|
+
* With this wrapper, the click commit only mounts the ~5 blocks that
|
|
17
|
+
* happen to be in the viewport; the rest mount on demand as the user
|
|
18
|
+
* scrolls. Total CPU work is the same, but it's spread across many
|
|
19
|
+
* frames instead of one frozen one.
|
|
20
|
+
*
|
|
21
|
+
* Once mounted, we never unmount — that would lose any per-block state
|
|
22
|
+
* (selection, in-flight edits, etc.). This is "lazy mount", not full
|
|
23
|
+
* windowing, which is the right trade-off for an editor.
|
|
24
|
+
*/
|
|
25
|
+
export default function LazyEditorBlock({ id }: Props): React.JSX.Element;
|
|
26
|
+
export {};
|