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
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. Format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
5
|
+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [1.0.0] — 2026-07-06
|
|
10
|
+
|
|
11
|
+
Initial public release.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- `<PagePilotEditor>` component — Style / Layout / Inspect / Layers panels
|
|
15
|
+
packaged for standalone use in any React app.
|
|
16
|
+
- Built-in light + dark themes (`pagePilotEditorLightTheme`,
|
|
17
|
+
`pagePilotEditorDarkTheme`) plus a topbar sun/moon toggle that persists
|
|
18
|
+
the user's choice to `localStorage`.
|
|
19
|
+
- `mode` and full `theme` props for host-controlled theming.
|
|
20
|
+
- `translations` prop + `setPagePilotEditorTranslations()` for runtime i18n.
|
|
21
|
+
- `topbar` prop to hide any control (Back, Save, Publish, Undo/Redo,
|
|
22
|
+
Preview, Fullscreen, Theme, More).
|
|
23
|
+
- `blocks` prop to hide individual Add-Block tiles.
|
|
24
|
+
- `panels` prop to hide any of the four sidebar tabs.
|
|
25
|
+
- Multi-section pages via `record.sections[]` with an Add Section dialog,
|
|
26
|
+
a sections dropdown in the topbar (shown when > 1 section), and section
|
|
27
|
+
edit/delete flows.
|
|
28
|
+
- Save Changes button with dirty tracking — disabled until the user makes
|
|
29
|
+
a real edit, re-enables on every subsequent change, and greys out again
|
|
30
|
+
after a successful `onSaveChanges`.
|
|
31
|
+
- Undo / Redo wired to the editor's own history stack with a settle-window
|
|
32
|
+
guard so mount-time echoes don't preload undo entries.
|
|
33
|
+
- Publish flow with three integration points: `onPublish` for a simple
|
|
34
|
+
callback, `onPublishMenu(anchor, payload)` to render the host's own
|
|
35
|
+
dropdown under the split-button arrow, and `renderPublish` to fully
|
|
36
|
+
replace the split-button with a custom control.
|
|
37
|
+
- Add-Block picker with search + empty state.
|
|
38
|
+
- Palette → canvas drag-and-drop: drag any block tile onto the canvas to
|
|
39
|
+
drop it before / after / inside the hovered block, with a live drop
|
|
40
|
+
indicator (line for before/after, tint for inside on single-list
|
|
41
|
+
containers).
|
|
42
|
+
- Copy / Paste Style painter in the Inspect panel with same-type inline
|
|
43
|
+
text markup transfer, cross-type block-level style transfer, and
|
|
44
|
+
in-progress inline-edit safety (flushes the live DOM edit into the store
|
|
45
|
+
before capturing / applying so pending typing isn't lost).
|
|
46
|
+
- Copy / Paste Layer at row-level and page-level, with clipboard-vs-in-memory
|
|
47
|
+
fallback resolution, whole-page validation (`isFullPageDocument` guard)
|
|
48
|
+
and automatic sanitization of clipboard payloads that contain block
|
|
49
|
+
types the standalone editor doesn't ship (e.g. MenuPicker, DemoPicker).
|
|
50
|
+
- Hide-block support in the tune menu — hidden blocks are collapsed on
|
|
51
|
+
the canvas (`display: none`), the preview iframe, the save HTML, and
|
|
52
|
+
the publish HTML. Unhide from the Layers panel.
|
|
53
|
+
- Container block: `alignment` (left / center / right) for non-fill widths
|
|
54
|
+
and an optional `showLink` / `linkHref` / `linkTarget` mode that renders
|
|
55
|
+
the container as a clickable `<a>` wrapper.
|
|
56
|
+
- Grid block: removed the 1–5 column/row cap and added per-device
|
|
57
|
+
overrides (`columnsCountTablet`, `columnsCountMobile`).
|
|
58
|
+
- Toast layer (Snackbar-style) for editor feedback — no antd dependency.
|
|
59
|
+
- Re-exports: `Reader`, `ReaderBlock`, `renderToStaticMarkup`,
|
|
60
|
+
`ReaderBlockSchema`, `ReaderDocumentSchema`, and the full
|
|
61
|
+
`EditorContext` namespace for advanced integration.
|
|
62
|
+
|
|
63
|
+
[Unreleased]: https://github.com/FAB-Builder/pagepilot-visual-editor/compare/v1.0.0...HEAD
|
|
64
|
+
[1.0.0]: https://github.com/FAB-Builder/pagepilot-visual-editor/releases/tag/v1.0.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PagePilot
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
# @pagepilot/visual-editor
|
|
2
|
+
|
|
3
|
+
A standalone, prop-driven **React page-type visual editor**. Drop
|
|
4
|
+
`<PagePilotEditor />` into your host application, pass the host record through
|
|
5
|
+
props, and listen for `onSaveChanges` / `onPublish` callbacks — the editor
|
|
6
|
+
handles the UI, block creation, multi-section management, and HTML rendering.
|
|
7
|
+
|
|
8
|
+
The package is **purely the editor**. No backend calls, no host-app coupling.
|
|
9
|
+
The host owns persistence, navigation, plan gating, theming overrides, and
|
|
10
|
+
everything else.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @pagepilot/visual-editor
|
|
19
|
+
# or
|
|
20
|
+
pnpm add @pagepilot/visual-editor
|
|
21
|
+
# or
|
|
22
|
+
yarn add @pagepilot/visual-editor
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Peer dependencies (your host should provide these):
|
|
26
|
+
|
|
27
|
+
| Peer | Range | Notes |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `react` | `>=18` | React 18 and 19 both supported |
|
|
30
|
+
| `react-dom` | `>=18` | Match your `react` version |
|
|
31
|
+
| `@mui/material` | `>=5` | v6 tested; v5 works |
|
|
32
|
+
| `@mui/icons-material` | `>=5` | |
|
|
33
|
+
| `@emotion/react` | `>=11` | Required by MUI |
|
|
34
|
+
| `@emotion/styled` | `>=11` | Required by MUI |
|
|
35
|
+
|
|
36
|
+
**Also required at runtime** (not currently listed as a peer, but the built
|
|
37
|
+
bundle keeps them external — install these alongside the peers above):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install styled-components zustand
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If you want to render exported types like `TReaderBlockProps` or use the
|
|
44
|
+
`ReaderBlockSchema`, add `zod` too:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install zod
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Quick start
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
import { PagePilotEditor } from "@pagepilot/visual-editor";
|
|
56
|
+
|
|
57
|
+
export default function PageEditorScreen() {
|
|
58
|
+
const [record, setRecord] = useState(initialRecord);
|
|
59
|
+
|
|
60
|
+
// The container MUST have an explicit height (100vh, a fixed pixel value,
|
|
61
|
+
// or a flex parent that gives it space). The editor fills its parent 100%;
|
|
62
|
+
// if the parent has 0 height, so does the editor. `width: 100%` is
|
|
63
|
+
// inherited from the ScopedCssBaseline root inside the component.
|
|
64
|
+
return (
|
|
65
|
+
<div style={{ width: "100%", height: "100vh" }}>
|
|
66
|
+
<PagePilotEditor
|
|
67
|
+
record={record}
|
|
68
|
+
recordTitle={record.title}
|
|
69
|
+
recordStatus={record.status}
|
|
70
|
+
onUpdateRecord={setRecord}
|
|
71
|
+
onSaveChanges={async ({ record, html }) => {
|
|
72
|
+
await api.savePage(record.id, { record, html });
|
|
73
|
+
}}
|
|
74
|
+
onPublish={async ({ record, html }) => {
|
|
75
|
+
await api.publishPage(record.id, { record, html });
|
|
76
|
+
}}
|
|
77
|
+
onBack={() => navigate(-1)}
|
|
78
|
+
/>
|
|
79
|
+
</div>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The editor renders its own MUI `ThemeProvider` + `ScopedCssBaseline`, so it
|
|
85
|
+
works inside hosts that already use MUI — you don't need to import our CSS
|
|
86
|
+
separately. If your host sets a non-default `html { font-size }`, our
|
|
87
|
+
`ScopedCssBaseline` re-anchors REM sizing at 14 px inside the editor so the
|
|
88
|
+
built-in layout doesn't scale unexpectedly.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Anatomy
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
┌──────────────────────────────────────────────────────────────────────────┐
|
|
96
|
+
│ ← Back My Page ● Draft [Section ▾] ↶ ↷ Save ⋮ ⤢ ▶ Publish ▾ │ Topbar
|
|
97
|
+
├──────┬───────────────────┬─────────────────────────────────────────────┤
|
|
98
|
+
│Style │ Appearance │ │
|
|
99
|
+
│Layout│ Color ▢ ... │ (canvas — block-based editor) │
|
|
100
|
+
│Inspct│ Font ▾ │ │
|
|
101
|
+
│Layers│ Radius PX │ │
|
|
102
|
+
│ │ Layout │ │
|
|
103
|
+
│ │ Width 100 % │ │
|
|
104
|
+
└──────┴───────────────────┴─────────────────────────────────────────────┘
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
- **Left rail** — 4 panels: **Style**, **Layout**, **Inspect**, **Layers** (each can be toggled off via the `panels` prop).
|
|
108
|
+
- **Topbar** — every control is individually toggleable via the `topbar` prop.
|
|
109
|
+
- **Canvas** — the block-based page editor. Click the empty-state "Add first section" or the ⋮ → Add Section.
|
|
110
|
+
- **3-dot menu** — currently exposes a single item, **Add Section**. Hidden by default; set `topbar.moreMenu` to `true`.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## `<PagePilotEditor>` props — full reference
|
|
115
|
+
|
|
116
|
+
### 1. Host data
|
|
117
|
+
|
|
118
|
+
| Prop | Type | Default | Behavior |
|
|
119
|
+
|---|---|---|---|
|
|
120
|
+
| `record` | `PageRecord` | `undefined` | The full page record. Mutations are echoed back through `onUpdateRecord`. |
|
|
121
|
+
| `contentMetadata` | `PageRecord["contentMetadata"]` | `undefined` | Top-level override for `record.contentMetadata`. When supplied, wins over `record.contentMetadata`. |
|
|
122
|
+
| `sections` | `PageRecord["sections"]` | `undefined` | Top-level override for `record.sections`. Section array for multi-section pages. |
|
|
123
|
+
| `activeStepIndex` | `number` | `0` | Index of the currently-active section in the canvas. The editor also tracks this internally via the section dropdown. |
|
|
124
|
+
| `behaviour` | `Record<string, any>` | `undefined` | **Passthrough only** — the editor does not consume this. Preserved in the save/publish payload if non-empty so host-owned config survives a round-trip. |
|
|
125
|
+
| `steps` | `PageRecord["steps"]` | `undefined` | **Passthrough only** — legacy shape from the original tour/tooltip editor. The page editor does not read or render `steps`; it's preserved in the save payload when non-empty. |
|
|
126
|
+
|
|
127
|
+
The editor reads `record.contentMetadata.document` (or `record.sections[activeStepIndex].contentMetadata.document` for multi-section pages) and seeds the canvas on first mount. After that the editor owns the document state; the host receives mutations via `onUpdateRecord`.
|
|
128
|
+
|
|
129
|
+
#### `PageRecord` shape
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
interface PageRecord {
|
|
133
|
+
id?: string;
|
|
134
|
+
type?: string; // keep "page" for the page editor
|
|
135
|
+
title?: string; // displayed when `recordTitle` is not set
|
|
136
|
+
name?: string; // fallback for title
|
|
137
|
+
status?: string; // displayed as status pill ("draft" | "live" | ...)
|
|
138
|
+
contentMetadata?: {
|
|
139
|
+
document?: any; // the editor's source-of-truth document tree
|
|
140
|
+
html?: string; // set by the editor on save
|
|
141
|
+
[key: string]: any;
|
|
142
|
+
};
|
|
143
|
+
behaviour?: Record<string, any>;
|
|
144
|
+
steps?: Array<{ // for tour/tooltip flows
|
|
145
|
+
contentMetadata?: { document?: any; [key: string]: any };
|
|
146
|
+
behaviour?: Record<string, any>;
|
|
147
|
+
[key: string]: any;
|
|
148
|
+
}>;
|
|
149
|
+
sections?: PageSection[]; // for multi-section pages
|
|
150
|
+
[key: string]: any; // free-form passthrough
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
interface PageSection {
|
|
154
|
+
_id?: string;
|
|
155
|
+
title?: string;
|
|
156
|
+
identifier?: string;
|
|
157
|
+
sectionType?: "internal" | "external";
|
|
158
|
+
content?: string; // per-section rendered HTML (set by editor on save)
|
|
159
|
+
contentMetadata?: {
|
|
160
|
+
document?: any; // per-section editor document
|
|
161
|
+
[key: string]: any;
|
|
162
|
+
};
|
|
163
|
+
[key: string]: any;
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### 2. UI configuration
|
|
170
|
+
|
|
171
|
+
| Prop | Type | Default | Behavior |
|
|
172
|
+
|---|---|---|---|
|
|
173
|
+
| `panels` | `EditorPanelToggles` | all 4 visible | Toggle the four left-rail panels independently. |
|
|
174
|
+
| `title` | `string` | `"Back"` | Label rendered on the back button. |
|
|
175
|
+
| `recordTitle` | `string` | `record.title ?? record.name` | Text shown after the back button. Hidden when empty. |
|
|
176
|
+
| `recordStatus` | `string` | `record.status` | Pill shown after the title. Built-in color coding for `draft` (orange), `live` / `published` (green), `scheduled` (indigo). Any other string gets a neutral gray pill. |
|
|
177
|
+
| `mode` | `"light"` \| `"dark"` | `"dark"` | Selects the built-in theme. Ignored when `theme` is set. |
|
|
178
|
+
| `theme` | `Theme` (MUI) | `undefined` | Full MUI theme override. Wins over `mode`. |
|
|
179
|
+
| `translations` | `Record<string, string>` | `{}` | Merged on top of the built-in English dictionary. Missing keys fall back to defaults; missing default keys fall back to humanizing the last segment of the key. |
|
|
180
|
+
| `topbar` | `TopbarToggles` | see below | Per-control visibility for the topbar. |
|
|
181
|
+
| `blocks` | `BlockToggles` | all true | Per-tile visibility for the Add-Block menu. |
|
|
182
|
+
| `headerExtra` | `ReactNode` | `undefined` | Rendered immediately below the topbar — use for custom banners/announcement bars. |
|
|
183
|
+
| `children` | `ReactNode` | `undefined` | Rendered after the editor body. |
|
|
184
|
+
|
|
185
|
+
#### `EditorPanelToggles`
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
interface EditorPanelToggles {
|
|
189
|
+
style?: boolean; // default true
|
|
190
|
+
layout?: boolean; // default true
|
|
191
|
+
inspect?: boolean; // default true
|
|
192
|
+
layers?: boolean; // default true
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
#### `TopbarToggles`
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
interface TopbarToggles {
|
|
200
|
+
back?: boolean; // default true
|
|
201
|
+
title?: boolean; // default true — record title
|
|
202
|
+
status?: boolean; // default true — status pill
|
|
203
|
+
sectionsDropdown?: boolean; // default true — still requires sections.length > 1
|
|
204
|
+
undo?: boolean; // default true
|
|
205
|
+
redo?: boolean; // default true
|
|
206
|
+
save?: boolean; // default true
|
|
207
|
+
themeToggle?: boolean; // default true — sun/moon button flipping light/dark
|
|
208
|
+
fullscreen?: boolean; // default true
|
|
209
|
+
preview?: boolean; // default true
|
|
210
|
+
moreMenu?: boolean; // default FALSE
|
|
211
|
+
publish?: boolean; // default FALSE
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Defaults note:** `moreMenu` and `publish` are **off by default** — they only appear when explicitly enabled. Everything else is on by default.
|
|
216
|
+
|
|
217
|
+
#### `BlockToggles`
|
|
218
|
+
|
|
219
|
+
Per-tile visibility for the Add-Block menu. Each key defaults to `true`.
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
type BlockKey =
|
|
223
|
+
| "heading" | "text" | "button" | "image" | "logo" | "video"
|
|
224
|
+
| "avatar" | "divider" | "spacer" | "html"
|
|
225
|
+
| "columns" | "flexColumns" | "grid"
|
|
226
|
+
| "buttonGroup" | "container"
|
|
227
|
+
| "stepper" | "accordion" | "pricingAccordion"
|
|
228
|
+
| "tabs" | "carousel" | "rating" | "marquee"
|
|
229
|
+
| "iframe" | "skipToMain" | "accessibilityTools";
|
|
230
|
+
|
|
231
|
+
type BlockToggles = Partial<Record<BlockKey, boolean>>;
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
```tsx
|
|
235
|
+
<PagePilotEditor
|
|
236
|
+
blocks={{
|
|
237
|
+
iframe: false, // hide the iFrame tile
|
|
238
|
+
accessibilityTools: false,
|
|
239
|
+
marquee: false,
|
|
240
|
+
}}
|
|
241
|
+
/>
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
### 3. Callbacks
|
|
247
|
+
|
|
248
|
+
| Prop | Signature | When it fires |
|
|
249
|
+
|---|---|---|
|
|
250
|
+
| `onUpdateRecord` | `(record: PageRecord) => void` | Whenever the editor mutates the document, adds/removes/reorders sections, etc. The host owns the record state and should call `setState`/equivalent here. |
|
|
251
|
+
| `onChange` | `(document: any) => void` | Lower-level: fires on every document tree mutation. Use when you only need the canvas document, not the full record. |
|
|
252
|
+
| `onSaveChanges` | `(payload: SaveChangesPayload) => Promise<boolean \| void> \| boolean \| void` | Fires when **Save Changes** is clicked. Receives the full payload (record + document + rendered HTML). Return `true` (or void) for success, `false` to indicate the save failed. |
|
|
253
|
+
| `onPublish` | `(payload: SaveChangesPayload) => Promise<void> \| void` | Fires when the **Publish** button is clicked. Same payload as Save. |
|
|
254
|
+
| `onPublishMenu` | `(anchorEl: HTMLElement, payload: SaveChangesPayload) => void` | Fires when the small ▾ arrow next to Publish is clicked. The host can open any custom popover/menu/dialog anchored to `anchorEl`. **Omit to disable the arrow.** |
|
|
255
|
+
| `renderPublish` | `({ payload, onPublish }) => ReactNode` | **Fully replaces** the Publish split-button group with the host's component. When provided, `onPublish` / `onPublishMenu` are ignored — host owns the slot. |
|
|
256
|
+
| `onBack` | `() => void` | Fires when the ← Back button is clicked. |
|
|
257
|
+
| `onTogglePreview` | `(html: string, doc: any) => void` | Optional preview hook. **If provided**, the host owns the preview UI (typically opening its own dialog with `html`). **If omitted**, the editor opens its built-in in-page preview dialog with desktop/tablet/mobile size toggles. |
|
|
258
|
+
| `onBackgroundChange` | `(image: string) => void` | Fires when the page-level background image changes. |
|
|
259
|
+
| `onNavigateBranding` | `() => void` | Fires from the Brand panel (currently stripped from the standalone build — kept for forward-compat). |
|
|
260
|
+
| `onAddSection` | `() => void` | Custom Add-Section handler. **If provided**, the editor delegates entirely to the host — no built-in dialog. **If omitted**, clicking ⋮ → Add Section opens the built-in dialog. |
|
|
261
|
+
|
|
262
|
+
#### `SaveChangesPayload`
|
|
263
|
+
|
|
264
|
+
Every save/publish callback receives this shape:
|
|
265
|
+
|
|
266
|
+
```ts
|
|
267
|
+
interface SaveChangesPayload {
|
|
268
|
+
record: PageRecord; // updated record with sections + html flushed in
|
|
269
|
+
document?: any; // present in single-doc mode; OMITTED in multi-
|
|
270
|
+
// section mode (there's no single page-level doc —
|
|
271
|
+
// read record.sections[i].contentMetadata.document
|
|
272
|
+
// per section instead)
|
|
273
|
+
html: string; // rendered HTML — for multi-section pages, every
|
|
274
|
+
// section's fragment is concatenated inside one
|
|
275
|
+
// <html> shell with viewport meta + base font
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Multi-section deduplication.** When `record.sections[]` is present, the
|
|
280
|
+
payload's `record` is stripped down — the record-level `contentMetadata`
|
|
281
|
+
and any empty `behaviour` / `steps` are removed because sections are the
|
|
282
|
+
source of truth. Non-empty host-provided `behaviour` or `steps` are
|
|
283
|
+
preserved so real host-owned config data isn't dropped.
|
|
284
|
+
|
|
285
|
+
```jsonc
|
|
286
|
+
// multi-section save payload — nothing duplicated
|
|
287
|
+
{
|
|
288
|
+
"record": {
|
|
289
|
+
"id": "demo-1", "type": "page", "title": "My Page", "status": "draft",
|
|
290
|
+
"sections": [
|
|
291
|
+
{
|
|
292
|
+
"title": "Section 1",
|
|
293
|
+
"content": "<div ...>…</div>",
|
|
294
|
+
"contentMetadata": { "document": { /* per-section doc */ } }
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
// no contentMetadata, no empty behaviour, no empty steps
|
|
298
|
+
},
|
|
299
|
+
"html": "<!doctype html>…combined…"
|
|
300
|
+
// no outer document
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Single-doc mode (no `sections`) is unchanged — the payload still carries
|
|
305
|
+
`document` + `record.contentMetadata.document` + `record.contentMetadata.html`.
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Behavior reference
|
|
310
|
+
|
|
311
|
+
### Topbar buttons
|
|
312
|
+
|
|
313
|
+
| Button | Behavior |
|
|
314
|
+
|---|---|
|
|
315
|
+
| **← Back** | Calls `onBack`. The host typically navigates away. |
|
|
316
|
+
| **Page title + status pill** | Display-only. Sourced from `recordTitle` / `recordStatus` (or `record.title / record.name / record.status`). |
|
|
317
|
+
| **Section dropdown** | Only appears when `record.sections.length > 1`. Lets the user pick / edit / delete sections. Switching a section flushes the current canvas edits into the active section, then loads the target section's document onto the canvas. |
|
|
318
|
+
| **Undo / Redo** | Hooked to the editor's internal history stack. Buttons disable when there's nothing to undo/redo. A settle-window guard on mount prevents block-level `useEffect`s (auto-seed, positioning re-measure, etc.) from preloading spurious entries — Undo starts disabled on every fresh load until the user makes a real edit. |
|
|
319
|
+
| **Save Changes** | **Dirty-tracked.** Disabled with tooltip "No unsaved changes" until the user makes their first edit; enables on every subsequent edit; disables again after `onSaveChanges` resolves (unless the handler returns `false`). Builds the payload (renders document → HTML, flushes sections) and calls `onSaveChanges`. |
|
|
320
|
+
| **Theme toggle** ☀/🌙 | Sun/moon icon flips between the built-in light and dark themes. The choice is persisted in `localStorage` under `pagepilot.editor.mode.v1`, so a page reload keeps the user's preference — even if `props.mode` changes. Hidden automatically when the host passes a custom `theme` prop (no `mode` to flip). |
|
|
321
|
+
| **3-dot menu** ⋮ | Single item: **+ Add Section**. Off by default — enable via `topbar.moreMenu`. |
|
|
322
|
+
| **Fullscreen** ⤢ | Toggles the editor's container via the browser Fullscreen API. Icon swaps to "exit fullscreen" while active; pressing `Esc` exits. |
|
|
323
|
+
| **Preview** ▶ | Opens the in-page Preview dialog with desktop/tablet/mobile size toggles. The iframe renders the **same HTML** that's sent to `onSaveChanges` / `onPublish`. If `onTogglePreview` is supplied, that callback fires instead. |
|
|
324
|
+
| **Publish** | Calls `onPublish`. |
|
|
325
|
+
| **Publish ▾** | Calls `onPublishMenu(anchorEl, payload)` so the host can open a custom dialog/popover anchored to the button. |
|
|
326
|
+
|
|
327
|
+
### Add Section flow
|
|
328
|
+
|
|
329
|
+
1. User clicks ⋮ → **+ Add Section** (or the empty-state button).
|
|
330
|
+
2. A modal asks for a **Title**.
|
|
331
|
+
3. On submit:
|
|
332
|
+
- The active section's in-progress canvas document is flushed into `record.sections[activeIndex].contentMetadata.document` (no edits lost).
|
|
333
|
+
- A new section is appended, seeded with a default empty `PagePilotLayout` document.
|
|
334
|
+
- The host receives the updated record via `onUpdateRecord`.
|
|
335
|
+
- The canvas swaps to the new section's document so the user can immediately edit it.
|
|
336
|
+
- The active step index is bumped.
|
|
337
|
+
4. Once there are 2+ sections, the section dropdown appears in the topbar.
|
|
338
|
+
|
|
339
|
+
To take over completely, pass `onAddSection={() => /* your custom flow */}`.
|
|
340
|
+
|
|
341
|
+
### Inline images in a Text block
|
|
342
|
+
|
|
343
|
+
Double-click a **Text** block to open the floating formatting toolbar and
|
|
344
|
+
click the image icon. A dialog prompts for two fields:
|
|
345
|
+
|
|
346
|
+
- **Image URL** — required. Any absolute URL your host serves images from.
|
|
347
|
+
- **Alt text** — optional. Written to the `<img alt="…">` attribute for
|
|
348
|
+
accessibility.
|
|
349
|
+
|
|
350
|
+
The image is inserted at the caret position and can then be resized
|
|
351
|
+
(`100% / 50% / 25%`), floated left/right, or deleted via the popover that
|
|
352
|
+
appears when you click it. The standalone editor deliberately doesn't ship
|
|
353
|
+
a media-library backend — the URL field is the integration point.
|
|
354
|
+
|
|
355
|
+
### Layout panel
|
|
356
|
+
|
|
357
|
+
The Layout panel shows a single tile grid — the **Blocks** picker. The
|
|
358
|
+
Templates and Saved-templates tabs from the Pagepilot host app are
|
|
359
|
+
intentionally omitted; those require the host's team-template backend.
|
|
360
|
+
Add-Block tile visibility is controlled per-block via the `blocks` prop.
|
|
361
|
+
|
|
362
|
+
### Image block sidebar
|
|
363
|
+
|
|
364
|
+
The Image block's Inspect panel exposes a **Media** text input for the
|
|
365
|
+
image URL. There is no Upload Media button — the standalone editor
|
|
366
|
+
doesn't ship a media backend. Consumers who want an upload flow can
|
|
367
|
+
either upload through their own host storage before setting `record.…url`,
|
|
368
|
+
or wrap `<PagePilotEditor>` and inject a custom uploader via `children`
|
|
369
|
+
if the standalone integration model doesn't fit.
|
|
370
|
+
|
|
371
|
+
### Preview
|
|
372
|
+
|
|
373
|
+
- **Default behavior** (no `onTogglePreview`): the editor renders every section through `renderToStaticMarkup`, concatenates the fragments inside a minimal HTML shell (with viewport meta + base font + canvas color from `PagePilotLayout.canvasColor`), and shows it in an in-page MUI dialog with desktop / tablet / mobile size toggles. The iframe uses `srcDoc` (inline HTML) so no network round-trip and no blob-URL flake. The "Open in new tab" header icon is hidden in this mode (nothing to link to — the HTML is inline). A host that supplies a real `previewUrl` (via internal preview server) gets the icon.
|
|
374
|
+
- **Custom UI**: pass `onTogglePreview={(html, doc) => myDialog.open(html)}` to skip the built-in dialog and render your own.
|
|
375
|
+
|
|
376
|
+
### Save / Publish payload generation
|
|
377
|
+
|
|
378
|
+
When the user clicks **Save Changes** or **Publish**, the editor does the following before invoking the callback:
|
|
379
|
+
|
|
380
|
+
1. Reads the current canvas document from the internal store.
|
|
381
|
+
2. If the record has `sections`, flushes the canvas document into `sections[activeIndex].contentMetadata.document` so the active section is up-to-date.
|
|
382
|
+
3. Renders every section's document via `renderToStaticMarkup({ rootBlockId: "root", injectElementIds: true, minifyCss: true, includePageCSS: true, lang, skipLink, accessibilityTools })`.
|
|
383
|
+
4. Per-section HTML is written to `section.content` and per-section documents to `section.contentMetadata.document`.
|
|
384
|
+
5. All section fragments are concatenated inside a single HTML document with viewport meta, base font, and canvas color from `PagePilotLayout`.
|
|
385
|
+
6. **Multi-section payload**: `{ record, html }` with the record's redundant `contentMetadata` / empty `behaviour` / empty `steps` stripped, and the outer `document` key omitted.
|
|
386
|
+
**Single-doc payload**: `{ record, document, html }` where `record.contentMetadata` carries `document` + `html`.
|
|
387
|
+
|
|
388
|
+
This guarantees **Preview ≡ Save Changes ≡ Publish** — all three see the exact same rendered output.
|
|
389
|
+
|
|
390
|
+
### Themes
|
|
391
|
+
|
|
392
|
+
```tsx
|
|
393
|
+
import {
|
|
394
|
+
PagePilotEditor,
|
|
395
|
+
pagePilotEditorDarkTheme,
|
|
396
|
+
pagePilotEditorLightTheme,
|
|
397
|
+
} from "@pagepilot/visual-editor";
|
|
398
|
+
|
|
399
|
+
// Built-in themes — these are full MUI Theme objects.
|
|
400
|
+
<PagePilotEditor mode="dark" />
|
|
401
|
+
<PagePilotEditor mode="light" />
|
|
402
|
+
|
|
403
|
+
// Or pass your own:
|
|
404
|
+
<PagePilotEditor theme={myCustomTheme} />
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Both built-in themes carry the editor's custom palette keys (`performanceHeader`, `moduleIcon`, `moduleListComponentName`, `grayCloseIcon`, `codeBlock`, `brand.blue`) tuned per mode so icons and dividers stay legible. If you pass your own theme, you'll likely want to copy those keys.
|
|
408
|
+
|
|
409
|
+
**Runtime toggle + persistence.** The topbar's sun/moon button lets the
|
|
410
|
+
user flip between the built-in light/dark themes at any time; the choice
|
|
411
|
+
is written to `localStorage["pagepilot.editor.mode.v1"]` and outranks
|
|
412
|
+
subsequent `props.mode` changes so the preference survives page reloads
|
|
413
|
+
and host re-renders. To hand control back to the host, clear that key.
|
|
414
|
+
Hide the toggle entirely with `topbar={{ themeToggle: false }}`.
|
|
415
|
+
|
|
416
|
+
**Isolation from host CSS.** The editor wraps its subtree in a MUI
|
|
417
|
+
`ScopedCssBaseline` (not global `CssBaseline`), so it plays nicely with
|
|
418
|
+
hosts that already run their own MUI theme. `ScopedCssBaseline` anchors
|
|
419
|
+
REM sizing at 14 px inside the editor's subtree, so a host with
|
|
420
|
+
`html { font-size: 12px }` (or any other non-default) doesn't shrink the
|
|
421
|
+
editor's layout. The editor root is flex-pinned to fill its parent
|
|
422
|
+
(width/height 100%, `minHeight: 480` floor) — give it a parent with a
|
|
423
|
+
real height and it fills the rest.
|
|
424
|
+
|
|
425
|
+
### Translations
|
|
426
|
+
|
|
427
|
+
Two ways:
|
|
428
|
+
|
|
429
|
+
**Per-mount via prop:**
|
|
430
|
+
```tsx
|
|
431
|
+
<PagePilotEditor
|
|
432
|
+
translations={{
|
|
433
|
+
"pagePilotEditor.tabs.style": "Stile",
|
|
434
|
+
"pagePilotEditor.tabs.layout": "Layout",
|
|
435
|
+
"pagePilotEditor.templatePanel.mainPanel.page.addFirstSection": "Aggiungi sezione",
|
|
436
|
+
// missing keys fall back to built-in English
|
|
437
|
+
}}
|
|
438
|
+
/>
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**Imperatively (from anywhere outside the component):**
|
|
442
|
+
```ts
|
|
443
|
+
import {
|
|
444
|
+
setPagePilotEditorTranslations,
|
|
445
|
+
resetPagePilotEditorTranslations,
|
|
446
|
+
} from "@pagepilot/visual-editor";
|
|
447
|
+
|
|
448
|
+
setPagePilotEditorTranslations(myDict); // merges on top of defaults
|
|
449
|
+
resetPagePilotEditorTranslations(); // back to English defaults
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
The full set of keys the editor reads is documented inline at `src/host-stubs/i18n.ts` in the package.
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
## Block types
|
|
457
|
+
|
|
458
|
+
Out of the box the Add-Block menu exposes 25 block types:
|
|
459
|
+
|
|
460
|
+
| Layout | Content | Media | Specialized |
|
|
461
|
+
|---|---|---|---|
|
|
462
|
+
| Container | Heading | Image | Stepper |
|
|
463
|
+
| Columns | Text | Logo | Accordion |
|
|
464
|
+
| Flex Columns | Button | Video | Pricing |
|
|
465
|
+
| Grid | Button Group | Avatar | Tabs |
|
|
466
|
+
| Spacer | Html | | Carousel |
|
|
467
|
+
| Divider | | | Rating |
|
|
468
|
+
| | | | Marquee |
|
|
469
|
+
| | | | iFrame |
|
|
470
|
+
| | | | Skip Link |
|
|
471
|
+
| | | | Accessibility |
|
|
472
|
+
|
|
473
|
+
Hide any of them via the `blocks` prop. Tile labels can be re-translated via `translations`.
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## Imperative API (advanced)
|
|
478
|
+
|
|
479
|
+
The original Pagepilot `EditorContext` Zustand store is re-exported under the `EditorContext` namespace so advanced consumers can drive document state imperatively from outside the component:
|
|
480
|
+
|
|
481
|
+
```ts
|
|
482
|
+
import { EditorContext } from "@pagepilot/visual-editor";
|
|
483
|
+
|
|
484
|
+
EditorContext.setDocument({ root: ... });
|
|
485
|
+
EditorContext.resetDocument(myDoc);
|
|
486
|
+
EditorContext.useDocument(); // hook
|
|
487
|
+
EditorContext.editorStateStore; // raw Zustand store
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
The built-in Reader is also re-exported so you can render saved documents outside the editor:
|
|
491
|
+
|
|
492
|
+
```ts
|
|
493
|
+
import { Reader, renderToStaticMarkup } from "@pagepilot/visual-editor";
|
|
494
|
+
|
|
495
|
+
const html = renderToStaticMarkup(myDoc, { rootBlockId: "root" });
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
---
|
|
499
|
+
|
|
500
|
+
## Exports
|
|
501
|
+
|
|
502
|
+
```ts
|
|
503
|
+
// Component + imperative document setters
|
|
504
|
+
export { PagePilotEditor, setDocument, resetDocument } from "@pagepilot/visual-editor";
|
|
505
|
+
|
|
506
|
+
// Themes
|
|
507
|
+
export { pagePilotEditorDarkTheme, pagePilotEditorLightTheme } from "@pagepilot/visual-editor";
|
|
508
|
+
|
|
509
|
+
// Translation helpers
|
|
510
|
+
export {
|
|
511
|
+
setPagePilotEditorTranslations,
|
|
512
|
+
resetPagePilotEditorTranslations,
|
|
513
|
+
} from "@pagepilot/visual-editor";
|
|
514
|
+
|
|
515
|
+
// Reader / renderer
|
|
516
|
+
export {
|
|
517
|
+
Reader, ReaderBlock,
|
|
518
|
+
renderToStaticMarkup,
|
|
519
|
+
ReaderBlockSchema, ReaderDocumentSchema,
|
|
520
|
+
} from "@pagepilot/visual-editor";
|
|
521
|
+
|
|
522
|
+
// Imperative store access
|
|
523
|
+
export * as EditorContext from "@pagepilot/visual-editor";
|
|
524
|
+
|
|
525
|
+
// Types
|
|
526
|
+
export type {
|
|
527
|
+
PagePilotEditorProps, PageRecord, SaveChangesPayload,
|
|
528
|
+
EditorPanelToggles, TopbarToggles,
|
|
529
|
+
BlockKey, BlockToggles,
|
|
530
|
+
TReaderBlock, TReaderDocument, TReaderBlockProps, TReaderProps,
|
|
531
|
+
} from "@pagepilot/visual-editor";
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
## Development
|
|
537
|
+
|
|
538
|
+
```bash
|
|
539
|
+
npm install
|
|
540
|
+
npm run dev # demo at http://localhost:5175
|
|
541
|
+
npm run build # produces dist/index.js + index.cjs + index.d.ts
|
|
542
|
+
npm run typecheck
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
The demo entry is at `example/src/main.tsx` — it shows every prop in action including theme switching, translations, custom Publish-menu popover, and a seeded multi-section record.
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
550
|
+
## License
|
|
551
|
+
|
|
552
|
+
MIT
|
|
553
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PagePilotEditorProps } from './editor/types';
|
|
2
|
+
/**
|
|
3
|
+
* Standalone page-type visual editor.
|
|
4
|
+
*
|
|
5
|
+
* - **Undo / Redo**: wired directly to the editor's history store; buttons
|
|
6
|
+
* disable when their stack is empty.
|
|
7
|
+
* - **Save Changes**: renders the current document (or every section, for
|
|
8
|
+
* multi-section pages) to static HTML via
|
|
9
|
+
* `@usewaypoint/email-builder.renderToStaticMarkup` and hands the host
|
|
10
|
+
* `{ record, document, html }` through the `onSaveChanges` callback.
|
|
11
|
+
* - **Fullscreen**: requests the editor's container via the Fullscreen API.
|
|
12
|
+
* - **Preview**: renders the same HTML into an in-page iframe (or calls
|
|
13
|
+
* `onTogglePreview` if the host provides one).
|
|
14
|
+
* - **Publish**: same payload as Save Changes, routed to `onPublish`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function PagePilotEditor(props: PagePilotEditorProps): import("react").JSX.Element;
|
|
17
|
+
export { setDocument, resetDocument, } from './editor-sample/documents/editor/EditorContext';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const ArrowLeft: (props: any) => import("react").JSX.Element;
|
|
2
|
+
export declare const ArrowNarrowDown: (props: any) => import("react").JSX.Element;
|
|
3
|
+
export declare const ArrowNarrowDownLeft: (props: any) => import("react").JSX.Element;
|
|
4
|
+
export declare const ArrowNarrowDownRight: (props: any) => import("react").JSX.Element;
|
|
5
|
+
export declare const ArrowNarrowLeft: (props: any) => import("react").JSX.Element;
|
|
6
|
+
export declare const ArrowNarrowRight: (props: any) => import("react").JSX.Element;
|
|
7
|
+
export declare const ArrowNarrowUp: (props: any) => import("react").JSX.Element;
|
|
8
|
+
export declare const ArrowNarrowUpLeft: (props: any) => import("react").JSX.Element;
|
|
9
|
+
export declare const ArrowNarrowUpRight: (props: any) => import("react").JSX.Element;
|
|
10
|
+
export declare const ArrowRight: (props: any) => import("react").JSX.Element;
|
|
11
|
+
export declare const ChevronDown: (props: any) => import("react").JSX.Element;
|
|
12
|
+
export declare const ChevronDownDouble: (props: any) => import("react").JSX.Element;
|
|
13
|
+
export declare const ChevronLeft: (props: any) => import("react").JSX.Element;
|
|
14
|
+
export declare const ChevronLeftDouble: (props: any) => import("react").JSX.Element;
|
|
15
|
+
export declare const ChevronRight: (props: any) => import("react").JSX.Element;
|
|
16
|
+
export declare const ChevronRightDouble: (props: any) => import("react").JSX.Element;
|
|
17
|
+
export declare const ChevronUp: (props: any) => import("react").JSX.Element;
|
|
18
|
+
export declare const ChevronUpDouble: (props: any) => import("react").JSX.Element;
|