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/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useToolbarPosition.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ToolbarPosition } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Computes the toolbar's anchored position (just above the edited block,
|
|
4
|
+
* flipped below if there's no room). A non-null `manualOffset` overrides the
|
|
5
|
+
* auto-position so the user's drag is preserved.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useToolbarPosition(editorEl: HTMLElement | null, open: boolean, toolbarEl: HTMLElement | null, manualOffset: ToolbarPosition | null): ToolbarPosition | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InlineTextToolbarProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Floating rich-text toolbar that anchors above the block being inline-edited.
|
|
5
|
+
* The toolbar is rendered via portal at document.body so it can escape the
|
|
6
|
+
* editor's overflow/transform contexts and float anywhere on screen.
|
|
7
|
+
*
|
|
8
|
+
* Each major concern is extracted into a dedicated module under this folder:
|
|
9
|
+
* - positioning → hooks/useToolbarPosition
|
|
10
|
+
* - drag handle → hooks/useToolbarDrag
|
|
11
|
+
* - active states → hooks/useFormatState
|
|
12
|
+
* - all exec commands → hooks/useToolbarCommands
|
|
13
|
+
* - speech-to-text → hooks/useSpeechRecognition
|
|
14
|
+
* - dialogs / popovers → ./dialogs/* and ./popovers/*
|
|
15
|
+
* - primitives → ./primitives/*
|
|
16
|
+
*/
|
|
17
|
+
export default function InlineTextToolbar({ editorEl, open }: InlineTextToolbarProps): React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when `target` (typically a focus event's relatedTarget) sits inside
|
|
3
|
+
* any of the inline-edit chromes. Used by blur handlers to decide whether
|
|
4
|
+
* the focus loss is "external" (commit / dismiss) or "internal" (keep open).
|
|
5
|
+
*/
|
|
6
|
+
export declare function isInInlineEditChrome(target: EventTarget | null): boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
/** Trigger aria-label (e.g. "Text color"). */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Trigger icon (e.g. the "A" or fill bucket). */
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
/** Popover heading ("Text Color" / "Background Color"). */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Label for the no-color row at the top ("Transparent" / "Use Default"). */
|
|
10
|
+
noneLabel: string;
|
|
11
|
+
/** Value passed to onPick when the no-color row is clicked. */
|
|
12
|
+
noneValue: string;
|
|
13
|
+
onPick: (color: string) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Read the color currently applied at the caret, so the picker opens on the
|
|
16
|
+
* active color instead of a fixed default. Called each time the popover opens.
|
|
17
|
+
*/
|
|
18
|
+
getCurrentColor?: () => string;
|
|
19
|
+
};
|
|
20
|
+
export declare function ColorSwatchPopover({ label, icon, title, noneLabel, noneValue, onPick, getCurrentColor }: Props): React.JSX.Element;
|
|
21
|
+
export {};
|
package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/popovers/ImagePopover.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
editorEl: HTMLElement | null;
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Called after any DOM mutation so the editor can sync localDraft. */
|
|
6
|
+
onMutate: () => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Mirrors Summernote-Lite's image popover: percentage resize, original-size
|
|
10
|
+
* restore, float-left/right/clear, delete, and a live dimensions readout
|
|
11
|
+
* ("{w}x{h} (Original: {nw}x{nh})"). Anchored above whichever <img> the user
|
|
12
|
+
* clicked inside the editor; portal'd to document.body so it escapes any
|
|
13
|
+
* overflow/transform parents.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ImagePopover({ editorEl, open, onMutate }: Props): React.ReactPortal;
|
|
16
|
+
export {};
|
package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/popovers/OverflowMenu.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* "…" overflow popover used when the toolbar collapses on narrow canvases.
|
|
4
|
+
* Renders whatever children the toolbar tucks behind it, wrapped in a
|
|
5
|
+
* horizontal flex so the buttons look identical to their inline placement.
|
|
6
|
+
*
|
|
7
|
+
* Flips upward when there's not enough room below the trigger — the toolbar
|
|
8
|
+
* itself can sit anywhere on the canvas, so a fixed downward popover would
|
|
9
|
+
* fall off-screen when the toolbar is positioned near the bottom.
|
|
10
|
+
*/
|
|
11
|
+
export declare function OverflowMenu({ children }: {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}): React.JSX.Element;
|
package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/popovers/TableGridPicker.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
onPick: (rows: number, cols: number) => void;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* 8×8 hover-grid for picking table dimensions. Hover a cell to highlight the
|
|
7
|
+
* implied rows × cols and read out the size below; click commits.
|
|
8
|
+
*/
|
|
9
|
+
export declare function TableGridPicker({ onPick }: Props): React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Hairline divider. Vertical by default (between toolbar groups); pass
|
|
4
|
+
* `horizontal` to separate rows inside a dropdown menu.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Divider({ horizontal }: {
|
|
7
|
+
horizontal?: boolean;
|
|
8
|
+
}): React.JSX.Element;
|
package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/Dropdown.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type DropdownProps = {
|
|
3
|
+
/** Text label (for "Normal" / "Inter" / "16"). Mutually exclusive with `icon`. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Icon trigger (for alignment / heading / table / color buttons). */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/** Required when `icon` is used so the trigger is accessible. */
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
width?: number;
|
|
10
|
+
children: (close: () => void) => React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A trigger button + portal popover. Two visual modes:
|
|
14
|
+
* - **Label mode** (passes `label`): white select-style pill with caret.
|
|
15
|
+
* Used by Normal / Inter / 16 etc.
|
|
16
|
+
* - **Icon mode** (passes `icon`): transparent icon button + small caret.
|
|
17
|
+
* Used by align / heading / table / color buttons.
|
|
18
|
+
*
|
|
19
|
+
* Children are a render-prop receiving a `close` callback so menu items can
|
|
20
|
+
* trigger an action AND dismiss the popover in one click.
|
|
21
|
+
*
|
|
22
|
+
* The popover flips to open upward when there isn't enough room below the
|
|
23
|
+
* trigger — the inline toolbar can sit anywhere on the canvas, so a fixed
|
|
24
|
+
* downward popover would overflow off-screen for low-positioned toolbars.
|
|
25
|
+
*/
|
|
26
|
+
export declare function Dropdown({ label, icon, ariaLabel, width, children }: DropdownProps): React.JSX.Element;
|
|
27
|
+
export {};
|
package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/HoverButton.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type HoverButtonProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
/** Extra style merged on top of btnBase / btnActive. */
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
/** Cursor override (the drag handle uses 'grab' / 'grabbing'). */
|
|
9
|
+
cursor?: React.CSSProperties['cursor'];
|
|
10
|
+
/** Receives the synthetic event so callers can call preventDefault etc. */
|
|
11
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
|
+
onMouseDown?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A `<button>` with the toolbar's "hover wash" interaction baked in:
|
|
17
|
+
* - `onMouseDown={stopFocusSteal}` so clicking never steals focus from the
|
|
18
|
+
* contentEditable being edited
|
|
19
|
+
* - default click handler calls preventDefault (callers extend via onClick)
|
|
20
|
+
* - hover background is HOVER_TINT unless the button is `active`
|
|
21
|
+
* - active styling merges btnActive on top of btnBase
|
|
22
|
+
*
|
|
23
|
+
* Used directly for non-icon affordances (drag handle, alignment dropdown
|
|
24
|
+
* items). `IconBtn` is the icon-only specialization.
|
|
25
|
+
*/
|
|
26
|
+
export declare function HoverButton({ title, ariaLabel, active, style, cursor, onClick, onMouseDown, children, }: HoverButtonProps): React.JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type IconBtnProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
onDoubleClick?: () => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
['data-codeview-keep']?: boolean | string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Generic icon-only toolbar button. Handles the active/pressed style and the
|
|
12
|
+
* hover wash, and (critically) calls preventDefault on mousedown so clicking
|
|
13
|
+
* never steals focus from the contentEditable being edited.
|
|
14
|
+
*/
|
|
15
|
+
export declare function IconBtn({ title, active, onClick, onDoubleClick, children, ...rest }: IconBtnProps): React.JSX.Element;
|
|
16
|
+
export {};
|
package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/MenuItem.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type MenuItemProps = {
|
|
3
|
+
/** Style overrides merged on top of menuItemStyle (e.g. a font-family preview). */
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
/** Invoked on click; menu closing is the caller's responsibility (see `close`). */
|
|
6
|
+
onSelect: () => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* One row inside a Dropdown menu. Wraps the repeated pattern
|
|
11
|
+
* <button
|
|
12
|
+
* onMouseDown={stopFocusSteal}
|
|
13
|
+
* onClick={(e) => { e.preventDefault(); cmd.runCommand(...); close(); }}
|
|
14
|
+
* style={menuItemStyle}
|
|
15
|
+
* >
|
|
16
|
+
* that block-style / heading / alignment / font menus all duplicated.
|
|
17
|
+
*
|
|
18
|
+
* Caller composes the close-on-pick behavior in `onSelect`:
|
|
19
|
+
* <MenuItem onSelect={() => { cmd.runCommand('formatBlock', '<h1>'); close(); }} />
|
|
20
|
+
*/
|
|
21
|
+
export declare function MenuItem({ style, onSelect, children }: MenuItemProps): React.JSX.Element;
|
|
22
|
+
type CheckedMenuItemProps = MenuItemProps & {
|
|
23
|
+
/** Renders a leading check-mark gutter; the check icon shows when `selected`. */
|
|
24
|
+
selected: boolean;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* MenuItem variant with a leading check-mark gutter — used by the font-name
|
|
28
|
+
* and font-size dropdowns to flag the currently-applied value. The gutter
|
|
29
|
+
* keeps text aligned whether or not the row is selected.
|
|
30
|
+
*/
|
|
31
|
+
export declare function CheckedMenuItem({ style, selected, onSelect, children }: CheckedMenuItemProps): React.JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Microphone glyph for the voice-input button. Summernote-Lite's `note-icon`
|
|
4
|
+
* font ships no microphone, so we inline the same SVG that the sidebar's
|
|
5
|
+
* SpeechToTextButton uses — keeping the two editors visually identical.
|
|
6
|
+
*/
|
|
7
|
+
export declare function MicIcon(): React.JSX.Element;
|
package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/primitives/NoteIcon.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
/** The icon suffix, e.g. "bold" -> `note-icon-bold`. */
|
|
4
|
+
name: string;
|
|
5
|
+
size?: number;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Renders one of Summernote's built-in glyphs (the same icon font the
|
|
10
|
+
* left-sidebar Text panel uses). Wrapping `<i className="note-icon-…" />`
|
|
11
|
+
* in a component so the toolbar JSX reads the same way it did with MUI
|
|
12
|
+
* icons, and so the inline styling stays consistent across every button.
|
|
13
|
+
*/
|
|
14
|
+
export declare function NoteIcon({ name, size, style }: Props): React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selection save/restore helpers.
|
|
3
|
+
*
|
|
4
|
+
* All formatting commands (execCommand and Range-based operations alike) act
|
|
5
|
+
* on whatever selection happens to be live in the DOM. When the user opens a
|
|
6
|
+
* dropdown, picks a color from a native <input type="color"> dialog, or uses
|
|
7
|
+
* the speech recognition popup, the browser can collapse the selection — so
|
|
8
|
+
* by the time our onClick runs, execCommand has nothing to act on.
|
|
9
|
+
*
|
|
10
|
+
* We mirror the last known selection *inside the editor* and restore it just
|
|
11
|
+
* before each command. preventDefault on mousedown alone isn't enough in
|
|
12
|
+
* every browser/scenario, and this is the standard belt-and-braces fix.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isRangeInside(range: Range | null, el: HTMLElement | null): boolean;
|
|
15
|
+
export declare function saveSelectionInside(el: HTMLElement | null): Range | null;
|
|
16
|
+
export declare function restoreSelection(range: Range | null, el: HTMLElement | null): void;
|
|
17
|
+
export declare function insertTextAtSelection(text: string): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const iconSx: {
|
|
3
|
+
readonly fontSize: 18;
|
|
4
|
+
};
|
|
5
|
+
export declare const btnBase: React.CSSProperties;
|
|
6
|
+
export declare const btnActive: React.CSSProperties;
|
|
7
|
+
export declare const popoverStyle: React.CSSProperties;
|
|
8
|
+
export declare const menuListStyle: React.CSSProperties;
|
|
9
|
+
export declare const menuItemStyle: React.CSSProperties;
|
|
10
|
+
/** Hover-tint applied to icon-style buttons. */
|
|
11
|
+
export declare const HOVER_TINT = "rgba(15,23,42,0.06)";
|
|
12
|
+
export declare const TOOLBAR_Z_INDEX = 1400;
|
|
13
|
+
export declare const TOOLBAR_POPOVER_Z_INDEX = 1410;
|
|
14
|
+
export declare const TOOLBAR_DIALOG_Z_INDEX = 1500;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type ToolbarPosition = {
|
|
2
|
+
top: number;
|
|
3
|
+
left: number;
|
|
4
|
+
};
|
|
5
|
+
export type FormatSnapshot = {
|
|
6
|
+
bold: boolean;
|
|
7
|
+
italic: boolean;
|
|
8
|
+
underline: boolean;
|
|
9
|
+
strike: boolean;
|
|
10
|
+
sup: boolean;
|
|
11
|
+
sub: boolean;
|
|
12
|
+
ul: boolean;
|
|
13
|
+
ol: boolean;
|
|
14
|
+
alignLeft: boolean;
|
|
15
|
+
alignCenter: boolean;
|
|
16
|
+
alignRight: boolean;
|
|
17
|
+
alignJustify: boolean;
|
|
18
|
+
blockLabel: string;
|
|
19
|
+
fontName: string;
|
|
20
|
+
fontSize: string;
|
|
21
|
+
/** Unitless multiplier (e.g. "1.5") if the block carries an inline
|
|
22
|
+
* line-height; empty string when the block inherits its default. */
|
|
23
|
+
lineHeight: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const DEFAULT_FORMAT: FormatSnapshot;
|
|
26
|
+
export type InlineTextToolbarProps = {
|
|
27
|
+
/** The contentEditable element the toolbar acts on. */
|
|
28
|
+
editorEl: HTMLElement | null;
|
|
29
|
+
/** Visibility — usually mirrors the inline-editing state. */
|
|
30
|
+
open: boolean;
|
|
31
|
+
};
|
|
32
|
+
export type LinkInsertParams = {
|
|
33
|
+
text: string;
|
|
34
|
+
url: string;
|
|
35
|
+
newWindow: boolean;
|
|
36
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type TStyle = {
|
|
2
|
+
backgroundColor?: any;
|
|
3
|
+
backgroundImage?: any;
|
|
4
|
+
backgroundSize?: any;
|
|
5
|
+
borderColor?: any;
|
|
6
|
+
borderRadius?: any;
|
|
7
|
+
color?: any;
|
|
8
|
+
textColor?: any;
|
|
9
|
+
fontFamily?: any;
|
|
10
|
+
fontSize?: any;
|
|
11
|
+
fontWeight?: any;
|
|
12
|
+
fontStyle?: any;
|
|
13
|
+
textDecoration?: any;
|
|
14
|
+
padding?: any;
|
|
15
|
+
textAlign?: any;
|
|
16
|
+
buttonTextAlign?: any;
|
|
17
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Utility: parse a raw block string and render it with unfilled Handlebars
|
|
4
|
+
* tokens replaced by styled React pill chips. Used by every editable block
|
|
5
|
+
* type (Heading, Text, Button, Html) so the canvas never shows raw
|
|
6
|
+
* `{{syntax}}` to the end user.
|
|
7
|
+
*
|
|
8
|
+
* Rules:
|
|
9
|
+
* {{#each X}}...{{/each}} → teal "↻ X" chip (inner body collapsed)
|
|
10
|
+
* {{token}} → purple "◈ token" chip
|
|
11
|
+
*
|
|
12
|
+
* A block that has NO unfilled tokens (either because it has no `{{` at all,
|
|
13
|
+
* or because applyVariables already substituted all of them) never reaches
|
|
14
|
+
* this component — callers short-circuit before rendering.
|
|
15
|
+
*/
|
|
16
|
+
interface TokenSegment {
|
|
17
|
+
type: 'text' | 'var' | 'loop';
|
|
18
|
+
value: string;
|
|
19
|
+
}
|
|
20
|
+
/** Split raw Handlebars source into alternating text / token / loop segments. */
|
|
21
|
+
export declare function parseTokenSegments(raw: string): TokenSegment[];
|
|
22
|
+
/** True when the raw string contains at least one Handlebars token. */
|
|
23
|
+
export declare function hasUnfilledTokens(raw: string): boolean;
|
|
24
|
+
interface TokenPillsProps {
|
|
25
|
+
raw: string;
|
|
26
|
+
/** Inherit the block's text styles so chips sit inline naturally. */
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
/**
|
|
29
|
+
* Called with the token id when a chip is clicked. Used to jump the user to
|
|
30
|
+
* the Variables tab so they can fill the value. When provided, chips become
|
|
31
|
+
* clickable (pointer cursor + "click to fill" tooltip).
|
|
32
|
+
*/
|
|
33
|
+
onTokenClick?: (id: string) => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Renders a raw Handlebars string as React with inline pill chips for
|
|
37
|
+
* unfilled tokens. Safe to embed inside any block type — uses no innerHTML.
|
|
38
|
+
*
|
|
39
|
+
* Chips read as an actionable prompt ("✎ Add First Name") rather than a raw
|
|
40
|
+
* token, so a user who just applied a template immediately understands the
|
|
41
|
+
* slot needs a value and (when clickable) where to fill it.
|
|
42
|
+
*/
|
|
43
|
+
export declare function TokenPills({ raw, style, onTokenClick }: TokenPillsProps): React.JSX.Element;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TStyle } from '../TStyle';
|
|
3
|
+
type TReaderBlockWrapperProps = {
|
|
4
|
+
style: TStyle;
|
|
5
|
+
children: React.JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default function ReaderBlockWrapper({ style, children }: TReaderBlockWrapperProps): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DropPosition } from '../documentUtils';
|
|
2
|
+
/**
|
|
3
|
+
* Canvas-side counterpart to the Layers panel's drag logic (useLayerNode). Lets
|
|
4
|
+
* a tile dragged from the left BlocksPanel palette be DROPPED onto a specific
|
|
5
|
+
* on-canvas block, so the new block lands exactly under the cursor (before /
|
|
6
|
+
* after the hovered block, or inside it when it's a container) instead of always
|
|
7
|
+
* being appended to the bottom.
|
|
8
|
+
*
|
|
9
|
+
* Returns the current drop position (for rendering the indicator) plus the three
|
|
10
|
+
* drag handlers to spread onto the block wrapper. Only reacts to the palette
|
|
11
|
+
* drag MIME so it never interferes with text selection or other drags.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useCanvasDrop(blockId: string): {
|
|
14
|
+
dropPos: DropPosition;
|
|
15
|
+
handleDragOver: (e: React.DragEvent) => void;
|
|
16
|
+
handleDragLeave: (e: React.DragEvent) => void;
|
|
17
|
+
handleDrop: (e: React.DragEvent) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Block hide/unhide ("visibility") helpers.
|
|
3
|
+
*
|
|
4
|
+
* A block is hidden by setting a boolean `hidden` flag on its `data` object.
|
|
5
|
+
* `data` exists on every block type (`{ data: { props, style, ... } }`), so a
|
|
6
|
+
* single flag works uniformly for Text/Heading/Button and every container/leaf
|
|
7
|
+
* block without per-type branching.
|
|
8
|
+
*
|
|
9
|
+
* Semantics:
|
|
10
|
+
* - Editor canvas: a hidden block is collapsed out of view (display:none) but
|
|
11
|
+
* still appears in the Layers panel so the user can unhide it.
|
|
12
|
+
* - Published HTML: the block is rendered with `display:none` (kept in the DOM
|
|
13
|
+
* but not visible) — see ReaderBlock in email-builder/src/Reader/core.tsx.
|
|
14
|
+
*
|
|
15
|
+
* Hiding a container hides its whole subtree automatically: the wrapper element
|
|
16
|
+
* carrying display:none contains the descendants, so they collapse with it.
|
|
17
|
+
*/
|
|
18
|
+
/** Read the hidden flag off a block (defensive against undefined/null blocks). */
|
|
19
|
+
export declare function isBlockHidden(block: any): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Return a new block object with `data.hidden` set to `hidden`.
|
|
22
|
+
* Immutable — the original block is left untouched. When unhiding we delete the
|
|
23
|
+
* key rather than store `false` so documents stay clean and diff-friendly.
|
|
24
|
+
*/
|
|
25
|
+
export declare function setBlockHidden<T extends {
|
|
26
|
+
data?: any;
|
|
27
|
+
}>(block: T, hidden: boolean): T;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export declare const insertDocument: (documentTree: Record<string, any>, targetChildId: string, insertedChildId: string) => {
|
|
2
|
+
parentId: string;
|
|
3
|
+
updatedParent: any;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Walk a block subtree (the block + every nested child across all container-style
|
|
7
|
+
* props) and return the ordered list of block ids that compose it. Shared by the
|
|
8
|
+
* container-repeat engine and the template-variable row index.
|
|
9
|
+
*/
|
|
10
|
+
export declare function collectSubtreeIds(documentTree: Record<string, any>, rootId: string): string[];
|
|
11
|
+
/**
|
|
12
|
+
* Deep-clone a subtree under fresh block ids. Returns the new blocks keyed by
|
|
13
|
+
* new id, the idMap (oldId → newId) and the new root id. Pure — caller splices.
|
|
14
|
+
*/
|
|
15
|
+
export declare function cloneSubtree(documentTree: Record<string, any>, rootId: string): {
|
|
16
|
+
newBlocks: Record<string, any>;
|
|
17
|
+
idMap: Record<string, string>;
|
|
18
|
+
newRootId: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Materialize one repeat row: clone the `sourceBlockId` subtree and place the
|
|
22
|
+
* clone after `afterBlockId` (the previous row's block). Returns the updated
|
|
23
|
+
* document + the new clone's root id (store it in the field's rowIds).
|
|
24
|
+
*
|
|
25
|
+
* Grid-aware: if the previous block sits in a Grid cell, the clone is dropped
|
|
26
|
+
* into the grid's NEXT EMPTY cell (so copies flow across the grid's columns/rows
|
|
27
|
+
* instead of stacking inside one cell). When every cell is already full the grid
|
|
28
|
+
* can't grow on its own — returns null so the caller can surface that.
|
|
29
|
+
*/
|
|
30
|
+
export declare const addRepeatRow: (documentTree: Record<string, any>, sourceBlockId: string, afterBlockId: string) => {
|
|
31
|
+
updatedDocument: Record<string, any>;
|
|
32
|
+
newRootId: string;
|
|
33
|
+
} | null;
|
|
34
|
+
/**
|
|
35
|
+
* Remove a set of block ids and filter them out of every parent's child-id
|
|
36
|
+
* arrays. Used to delete a repeat row's cloned container subtree.
|
|
37
|
+
*/
|
|
38
|
+
export declare function removeSubtree(documentTree: Record<string, any>, idsToRemove: Set<string>): Record<string, any>;
|
|
39
|
+
export type DropPosition = 'before' | 'after' | 'inside';
|
|
40
|
+
export declare const PALETTE_DRAG_MIME = "application/x-ahd-palette-block";
|
|
41
|
+
/**
|
|
42
|
+
* Move `draggedId` relative to `targetId`:
|
|
43
|
+
* - 'before' / 'after' → place it as a sibling of the target in the target's
|
|
44
|
+
* parent list, just before/after the target.
|
|
45
|
+
* - 'inside' → append it as the last child of the target container.
|
|
46
|
+
*
|
|
47
|
+
* Returns null for invalid moves (dropping a block onto itself or into its own
|
|
48
|
+
* descendant, or a target/insert slot that can't be found).
|
|
49
|
+
*/
|
|
50
|
+
export declare function moveBlock(documentTree: Record<string, any>, draggedId: string, targetId: string, position: DropPosition): Record<string, any> | null;
|
|
51
|
+
/**
|
|
52
|
+
* Insert a BRAND-NEW block (not an existing one) into the document relative to a
|
|
53
|
+
* drop target. Sibling of `moveBlock`, but there's no detach step — the new
|
|
54
|
+
* block is added to the flat map under `newBlockId`, then wired into a child-id
|
|
55
|
+
* list:
|
|
56
|
+
* - 'before' / 'after' → placed as a sibling of `targetId` in its parent list.
|
|
57
|
+
* - 'inside' → appended as the last child of the `targetId` container.
|
|
58
|
+
*
|
|
59
|
+
* Used by the palette → canvas drop flow so a dropped tile lands exactly where
|
|
60
|
+
* the cursor was, instead of always appending to the bottom. Returns the updated
|
|
61
|
+
* document, or null when the target slot can't be found / the block can't hold
|
|
62
|
+
* children (caller can fall back to append-to-root).
|
|
63
|
+
*/
|
|
64
|
+
export declare function insertBlockAt(documentTree: Record<string, any>, newBlockId: string, newBlock: any, targetId: string, position: DropPosition): Record<string, any> | null;
|
|
65
|
+
/** True when a block type can contain children (a valid 'inside' drop target). */
|
|
66
|
+
export declare function isContainerBlock(block: any): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* True when a block holds its children in ONE unambiguous list (Container,
|
|
69
|
+
* ButtonGroup, EmailLayout) — so a whole-block "inside" drop has an obvious
|
|
70
|
+
* destination.
|
|
71
|
+
*
|
|
72
|
+
* Multi-slot containers (ColumnsContainer / FlexColumns / Grid / Accordion /
|
|
73
|
+
* Tabs / …) are deliberately excluded: each of their columns/cells/items renders
|
|
74
|
+
* its OWN EditorChildrenIds, which are the real drop zones. Offering a whole-block
|
|
75
|
+
* "inside" tint there is misleading (it'd silently land in slot 0) and looks like
|
|
76
|
+
* a stray highlight over the multi-column layout. For those, the outer wrapper
|
|
77
|
+
* only offers before/after; dropping into a specific slot goes through that slot.
|
|
78
|
+
*/
|
|
79
|
+
export declare function isSingleListContainer(block: any): boolean;
|
|
80
|
+
export declare function syncStepperInSteps(steps: any[]): any[];
|
|
81
|
+
export declare const duplicateBlock: (documentTree: Record<string, any>, rootId: string) => {
|
|
82
|
+
updatedDocument: Record<string, any>;
|
|
83
|
+
newRootId: string;
|
|
84
|
+
};
|
|
85
|
+
export declare const cloneCopiedBlocks: (copiedConfig: {
|
|
86
|
+
rootBlockId: string;
|
|
87
|
+
blocks: Record<string, any>;
|
|
88
|
+
}) => {
|
|
89
|
+
newBlocks: Record<string, any>;
|
|
90
|
+
newRootId: string;
|
|
91
|
+
};
|
|
92
|
+
export declare const pasteBlockAsNew: (documentTree: Record<string, any>, copiedConfig: {
|
|
93
|
+
rootBlockId: string;
|
|
94
|
+
blocks: Record<string, any>;
|
|
95
|
+
}) => {
|
|
96
|
+
updatedDocument: {
|
|
97
|
+
[x: string]: any;
|
|
98
|
+
};
|
|
99
|
+
newRootId: string;
|
|
100
|
+
};
|
|
101
|
+
export declare const pasteBlock: (documentTree: Record<string, any>, targetBlockId: string, copiedConfig: {
|
|
102
|
+
rootBlockId: string;
|
|
103
|
+
blocks: Record<string, any>;
|
|
104
|
+
}) => {
|
|
105
|
+
updatedDocument: Record<string, any>;
|
|
106
|
+
newRootId: string;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Strip blocks whose `type` isn't in `knownTypes` from a document and unlink
|
|
110
|
+
* them from every parent's children list (root.data.childrenIds, container
|
|
111
|
+
* props.childrenIds, columns/cells, accordion/tabs/carousel/marquee items,
|
|
112
|
+
* MenuPicker start/end children). Used when pasting an external payload —
|
|
113
|
+
* the standalone editor doesn't ship every host-only block type (MenuPicker,
|
|
114
|
+
* DemoPicker, Mdx, …), so removing them gracefully lets the rest paste
|
|
115
|
+
* instead of crashing the canvas inside `BlockComponent` (which throws
|
|
116
|
+
* "Cannot read properties of undefined (reading 'Component')" the moment an
|
|
117
|
+
* unknown type tries to render).
|
|
118
|
+
*
|
|
119
|
+
* Returns the sanitized document, the de-duped list of removed type names
|
|
120
|
+
* (for a user-facing toast), and whether any pruning happened.
|
|
121
|
+
*/
|
|
122
|
+
export declare function sanitizeAgainstKnownTypes(doc: Record<string, any>, knownTypes: ReadonlySet<string>): {
|
|
123
|
+
sanitized: Record<string, any>;
|
|
124
|
+
removedTypes: string[];
|
|
125
|
+
changed: boolean;
|
|
126
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const FONT_FAMILIES: {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const FONT_FAMILY_NAMES: readonly ["MODERN_SANS", "BOOK_SANS", "ORGANIC_SANS", "GEOMETRIC_SANS", "HEAVY_SANS", "ROUNDED_SANS", "MODERN_SERIF", "BOOK_SERIF", "MONOSPACE", "ROBOTO", "OPEN_SANS", "LATO", "POPPINS", "INTER", "MONTSERRAT", "RALEWAY", "NUNITO", "PLAYFAIR_DISPLAY", "MERRIWEATHER", "PT_SANS", "OSWALD", "SOURCE_SANS_PRO", "RUBIK", "WORK_SANS", "NOTO_SANS", "DANCING_SCRIPT", "PACIFICO", "LOBSTER", "BEBAS_NEUE"];
|
|
7
|
+
/**
|
|
8
|
+
* Maps each Google Font we expose in the picker to the weight cuts Google
|
|
9
|
+
* actually publishes for it. Single-cut display faces (Pacifico, Lobster, etc.)
|
|
10
|
+
* use [400] — Google Fonts rejects a `:wght@...` clause for them.
|
|
11
|
+
*
|
|
12
|
+
* This is the single source of truth: the editor canvas, the published page
|
|
13
|
+
* renderer, and the SPA shell all derive their `<link>` URLs from this config.
|
|
14
|
+
*/
|
|
15
|
+
export declare const GOOGLE_FONT_CONFIG: Record<string, number[]>;
|
|
16
|
+
export declare const GOOGLE_FONTS_URL: string;
|
|
17
|
+
/**
|
|
18
|
+
* Quill writes the chosen font as an inline `style="font-family: ..."` via
|
|
19
|
+
* the Style attributor, so the saved HTML is self-contained — no extra CSS
|
|
20
|
+
* needs to ship alongside the page. The toolbar picker still needs CSS to
|
|
21
|
+
* (a) render each option in its own face and (b) show a human-readable
|
|
22
|
+
* label instead of the raw CSS stack the attributor writes into data-value.
|
|
23
|
+
* Both rules live ONLY inside QuillEditor's <style>, never in the published
|
|
24
|
+
* HTML.
|
|
25
|
+
*
|
|
26
|
+
* 'inherit' is the default (no inline style) so it's excluded from the whitelist.
|
|
27
|
+
*/
|
|
28
|
+
export declare const QUILL_FONT_OPTIONS: {
|
|
29
|
+
label: string;
|
|
30
|
+
css: string;
|
|
31
|
+
}[];
|
|
32
|
+
export declare const QUILL_FONT_WHITELIST: string[];
|
|
33
|
+
export declare const QUILL_FONT_CSS: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const FONT_WEIGHTS: {
|
|
2
|
+
readonly REGULAR: "400";
|
|
3
|
+
readonly MEDIUM: "500";
|
|
4
|
+
readonly SEMIBOLD: "600";
|
|
5
|
+
readonly BOLD: "700";
|
|
6
|
+
};
|
|
7
|
+
export type FontWeight = (typeof FONT_WEIGHTS)[keyof typeof FONT_WEIGHTS];
|
|
8
|
+
export declare const FONT_WEIGHT_VALUES: [FontWeight, ...FontWeight[]];
|
|
9
|
+
export declare const FONT_WEIGHT_OPTIONS: {
|
|
10
|
+
value: FontWeight;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare function normalizeFontWeight(value?: string | null): FontWeight;
|