@maildeno/editor 0.4.5 → 0.4.7
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 +83 -0
- package/dist/DatePicker-DIaGGAVI.js +5347 -0
- package/dist/DatePicker-DmMga5gQ.js +5347 -0
- package/dist/Dialog-GTfGtduh.js +6294 -0
- package/dist/HealthIndicator--ScSxVRA.js +1216 -0
- package/dist/HealthIndicator-BraAh2Aj.js +1217 -0
- package/dist/Icon-BYmOM482.js +2537 -0
- package/dist/Icon-c2SPT3-6.js +2577 -0
- package/dist/PreviewCanvas-C1-rP9-B.js +533 -0
- package/dist/PreviewCanvas-Nro7tNCn.js +533 -0
- package/dist/RichTextEditor-CrYhiAOo.js +12217 -0
- package/dist/RichTextEditor-D7Itx0fL.js +12218 -0
- package/dist/RowPreviewChildren-B66HbFdX.js +4 -0
- package/dist/RowPreviewChildren-DvrE9HTT.js +4 -0
- package/dist/{RowPreviewLegacyComponent-DVxrCJ14.js → RowPreviewLegacyComponent-CPqaWwsE.js} +1 -1
- package/dist/{RowPreviewRow-0pEQLmS4.js → RowPreviewRow-B91YPfoz.js} +1 -1
- package/dist/{RowPreviewRow-Eum1wh1W.js → RowPreviewRow-MaA-9ApX.js} +2 -2
- package/dist/SavedRowsPanel-CF-7R3q_.js +492 -0
- package/dist/SavedRowsPanel-TLOEvs3Z.js +491 -0
- package/dist/_plugin-vue_export-helper-Dj7HTbfw.js +8 -0
- package/dist/components/features/emailBuilder/EmailEditor.vue.d.ts +3 -3
- package/dist/composables/emailBuilder/transform/pipeline/optimize.d.ts +4 -4
- package/dist/editor.css +1 -1
- package/dist/element-CeRQDEn3.js +21396 -0
- package/dist/element.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8220 -41805
- package/dist/init.js +17 -16
- package/dist/mergeTagDefinitions-Cler19nv.js +27 -0
- package/dist/useEmailBuilder-CjJoxzTi.js +4893 -0
- package/dist/useEmailBuilder-gOc8otd8.js +4893 -0
- package/dist/useToast-DeNMwkP3.js +194 -0
- package/dist/{vue.runtime.esm-bundler-CsdyQceJ.js → vue.runtime.esm-bundler-D2AjRP90.js} +0 -1
- package/package.json +4 -2
- package/dist/adapters/index.d.ts +0 -38
- package/dist/baseStyles.d.ts +0 -13
- package/dist/blocks/canvasStyleHelpers.d.ts +0 -17
- package/dist/blocks/definitions/anchor.d.ts +0 -2
- package/dist/blocks/definitions/button.d.ts +0 -2
- package/dist/blocks/definitions/divider.d.ts +0 -2
- package/dist/blocks/definitions/heading.d.ts +0 -2
- package/dist/blocks/definitions/image.d.ts +0 -2
- package/dist/blocks/definitions/list.d.ts +0 -2
- package/dist/blocks/definitions/menu.d.ts +0 -2
- package/dist/blocks/definitions/paragraph.d.ts +0 -2
- package/dist/blocks/definitions/socials.d.ts +0 -2
- package/dist/blocks/definitions/spacer.d.ts +0 -2
- package/dist/blocks/definitions/video.d.ts +0 -2
- package/dist/blocks/index.d.ts +0 -8
- package/dist/brand.d.ts +0 -15
- package/dist/components/DesktopOnlyNotice.vue.d.ts +0 -20
- package/dist/components/features/emailBuilder/assistant/AssistantPanel.vue.d.ts +0 -37
- package/dist/components/features/emailBuilder/blocks/AnchorBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/ButtonBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/DividerBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/HeadingBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/ImageBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/ListBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/MenuBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/ParagraphBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/SocialsBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/SpacerBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/blocks/VideoBlock.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/canvas/Canvas.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/canvas/CanvasColumn.vue.d.ts +0 -49
- package/dist/components/features/emailBuilder/canvas/CanvasComponent.vue.d.ts +0 -56
- package/dist/components/features/emailBuilder/canvas/CanvasElement.vue.d.ts +0 -21
- package/dist/components/features/emailBuilder/canvas/CanvasRow.vue.d.ts +0 -49
- package/dist/components/features/emailBuilder/canvas/CanvasRowSpacer.vue.d.ts +0 -40
- package/dist/components/features/emailBuilder/health/HealthIndicator.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/layout/Header.vue.d.ts +0 -54
- package/dist/components/features/emailBuilder/layout/SendEmail.vue.d.ts +0 -21
- package/dist/components/features/emailBuilder/layout/SidebarLeft.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/layout/SidebarRight.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/AnchorPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/ButtonPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/DividerPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/HeadingPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/ImagePanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/ListPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/MenuPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/ParagraphPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/RowColumnPanel.vue.d.ts +0 -13
- package/dist/components/features/emailBuilder/panels/RowPanel.vue.d.ts +0 -13
- package/dist/components/features/emailBuilder/panels/RowSpacerPanel.vue.d.ts +0 -13
- package/dist/components/features/emailBuilder/panels/SocialsPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/SpacerPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/VideoPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/panels/shared/DeviceTabs.vue.d.ts +0 -19
- package/dist/components/features/emailBuilder/panels/shared/LinkFieldMergeTags.vue.d.ts +0 -31
- package/dist/components/features/emailBuilder/panels/shared/OverrideBadge.vue.d.ts +0 -9
- package/dist/components/features/emailBuilder/panels/shared/PreviewBadge.vue.d.ts +0 -11
- package/dist/components/features/emailBuilder/panels/shared/TextFieldMergeTags.vue.d.ts +0 -25
- package/dist/components/features/emailBuilder/panels/ui/BoxStylingSection.vue.d.ts +0 -7
- package/dist/components/features/emailBuilder/panels/ui/PropertyAlignment.vue.d.ts +0 -30
- package/dist/components/features/emailBuilder/panels/ui/PropertyColor.vue.d.ts +0 -75
- package/dist/components/features/emailBuilder/panels/ui/PropertyGradientColor.vue.d.ts +0 -27
- package/dist/components/features/emailBuilder/panels/ui/PropertyNumberSlider.vue.d.ts +0 -74
- package/dist/components/features/emailBuilder/panels/ui/PropertySection.vue.d.ts +0 -17
- package/dist/components/features/emailBuilder/panels/ui/PropertySelect.vue.d.ts +0 -74
- package/dist/components/features/emailBuilder/panels/ui/PropertyTextStyle.vue.d.ts +0 -52
- package/dist/components/features/emailBuilder/panels/ui/PropertyTextStylePanel.vue.d.ts +0 -72
- package/dist/components/features/emailBuilder/panels/ui/PropertyToggle.vue.d.ts +0 -45
- package/dist/components/features/emailBuilder/panels/ui/PropertyVisibility.vue.d.ts +0 -32
- package/dist/components/features/emailBuilder/panels/ui/SpacingControl.vue.d.ts +0 -19
- package/dist/components/features/emailBuilder/panels/ui/color-picker/AlphaSlider.vue.d.ts +0 -28
- package/dist/components/features/emailBuilder/panels/ui/color-picker/ColorPickerPanel.vue.d.ts +0 -31
- package/dist/components/features/emailBuilder/panels/ui/color-picker/HueSlider.vue.d.ts +0 -19
- package/dist/components/features/emailBuilder/panels/ui/color-picker/RecentColors.vue.d.ts +0 -20
- package/dist/components/features/emailBuilder/panels/ui/color-picker/SVPanel.vue.d.ts +0 -39
- package/dist/components/features/emailBuilder/panels/ui/visibility-rule/Rule.vue.d.ts +0 -28
- package/dist/components/features/emailBuilder/preview/PreviewScreen.vue.d.ts +0 -7
- package/dist/components/features/emailBuilder/preview/ui/PreviewCanvas.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/preview/ui/PreviewCapabilityBadges.vue.d.ts +0 -12
- package/dist/components/features/emailBuilder/preview/ui/PreviewClientCard.vue.d.ts +0 -20
- package/dist/components/features/emailBuilder/preview/ui/PreviewClientList.vue.d.ts +0 -21
- package/dist/components/features/emailBuilder/preview/ui/PreviewClientPicker.vue.d.ts +0 -16
- package/dist/components/features/emailBuilder/preview/ui/PreviewComponent.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/preview/ui/PreviewDetailView.vue.d.ts +0 -41
- package/dist/components/features/emailBuilder/preview/ui/PreviewRendered.vue.d.ts +0 -8
- package/dist/components/features/emailBuilder/product/RowPreview.vue.d.ts +0 -8
- package/dist/components/features/emailBuilder/product/RowPreviewChildren.vue.d.ts +0 -14
- package/dist/components/features/emailBuilder/product/RowPreviewLegacyComponent.vue.d.ts +0 -14
- package/dist/components/features/emailBuilder/product/RowPreviewRow.vue.d.ts +0 -9
- package/dist/components/features/emailBuilder/product/SavedRowsPanel.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/product/SavedTemplatesPanel.vue.d.ts +0 -13
- package/dist/components/features/emailBuilder/product/VersionHistoryPanel.vue.d.ts +0 -14
- package/dist/components/features/emailBuilder/sidebar/SidebarBlockButton.vue.d.ts +0 -35
- package/dist/components/features/emailBuilder/tabs/GeneralTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/LayoutTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/content/ContentTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/content/LayersPanel.vue.d.ts +0 -7
- package/dist/components/features/emailBuilder/tabs/general/MergeTagsTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/general/StylesTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/general/VisibilityTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/general/VisibilityWrapESPTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/general/merge-tags/LinkTagTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/tabs/general/merge-tags/MergeTagTab.vue.d.ts +0 -3
- package/dist/components/features/emailBuilder/ui/LinkInputDialog.vue.d.ts +0 -17
- package/dist/components/features/emailBuilder/ui/canvas/CanvasRowDropZone.vue.d.ts +0 -12
- package/dist/components/features/emailBuilder/ui/canvas/DropZone.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/canvas/Loader.vue.d.ts +0 -19
- package/dist/components/features/emailBuilder/ui/layers-panel/ComponentIcon.vue.d.ts +0 -7
- package/dist/components/features/emailBuilder/ui/layers-panel/LayerColumnChildren.vue.d.ts +0 -42
- package/dist/components/features/emailBuilder/ui/layers-panel/LayerDropLine.vue.d.ts +0 -8
- package/dist/components/features/emailBuilder/ui/renderers/AnchorRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/DividerRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/HeadingRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/ImageRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/ListRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/MenuRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/ParagraphRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/SocialsRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/SpacerRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/renderers/VideoRenderer.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/rich-text-editor/RichTextEditor.vue.d.ts +0 -12
- package/dist/components/features/emailBuilder/ui/rich-text-editor/pickers/MergeTagPicker.vue.d.ts +0 -18
- package/dist/components/features/emailBuilder/ui/rich-text-editor/pickers/RichTextColorPicker.vue.d.ts +0 -15
- package/dist/components/features/emailBuilder/ui/visibility/SupportBadge.vue.d.ts +0 -10
- package/dist/components/features/emailBuilder/ui/visibility/VisibilityPopover.vue.d.ts +0 -45
- package/dist/components/ui/ConfirmDialog.vue.d.ts +0 -3
- package/dist/components/ui/Icon.vue.d.ts +0 -33
- package/dist/components/ui/InfoDialog.vue.d.ts +0 -12
- package/dist/components/ui/Loading.vue.d.ts +0 -6
- package/dist/components/ui/ShadowSafeToast.vue.d.ts +0 -3
- package/dist/components/ui/primitives/Button.vue.d.ts +0 -23
- package/dist/components/ui/primitives/DatePicker.vue.d.ts +0 -16
- package/dist/components/ui/primitives/Dialog.vue.d.ts +0 -34
- package/dist/components/ui/primitives/InputText.vue.d.ts +0 -29
- package/dist/components/ui/primitives/Message.vue.d.ts +0 -20
- package/dist/components/ui/primitives/Select.vue.d.ts +0 -22
- package/dist/composables/emailBuilder/components/useComponentStyleEditor.d.ts +0 -72
- package/dist/composables/emailBuilder/components/useProductRowActions.d.ts +0 -3
- package/dist/composables/emailBuilder/components/useProductRows.d.ts +0 -59
- package/dist/composables/emailBuilder/components/useSystemRows.d.ts +0 -22
- package/dist/composables/emailBuilder/core/config/componentConfig.d.ts +0 -29
- package/dist/composables/emailBuilder/core/link-tags/useLinkTagInsert.d.ts +0 -13
- package/dist/composables/emailBuilder/core/merge-tags/mergeTagDefinitions.d.ts +0 -64
- package/dist/composables/emailBuilder/core/merge-tags/resolveMergeTags.d.ts +0 -27
- package/dist/composables/emailBuilder/core/ui/useLayerHoverScroll.d.ts +0 -20
- package/dist/composables/emailBuilder/core/ui/useLayoutDrag.d.ts +0 -85
- package/dist/composables/emailBuilder/core/ui/useRichTextEditors.d.ts +0 -6
- package/dist/composables/emailBuilder/core/ui/visibilityBadgeHelpers.d.ts +0 -22
- package/dist/composables/emailBuilder/core/useEmailBuilder.d.ts +0 -292
- package/dist/composables/emailBuilder/core/useEmailBuilderDefault.d.ts +0 -507
- package/dist/composables/emailBuilder/core/useEmailBuilderOperations.d.ts +0 -31
- package/dist/composables/emailBuilder/core/useEmailBuilderVisibility.d.ts +0 -31
- package/dist/composables/emailBuilder/export/actions/download.d.ts +0 -24
- package/dist/composables/emailBuilder/export/generators/html.d.ts +0 -3
- package/dist/composables/emailBuilder/export/generators/mjml.d.ts +0 -6
- package/dist/composables/emailBuilder/export/generators/react-email.d.ts +0 -61
- package/dist/composables/emailBuilder/export/helpers/generatorHelpers.d.ts +0 -53
- package/dist/composables/emailBuilder/export/logic/reactLogicWrapper.d.ts +0 -31
- package/dist/composables/emailBuilder/export/merge-tags/mergeTagMapper.d.ts +0 -42
- package/dist/composables/emailBuilder/export/merge-tags/reactMergeTagMapper.d.ts +0 -26
- package/dist/composables/emailBuilder/export/shared/containers.d.ts +0 -18
- package/dist/composables/emailBuilder/export/shared/styles.d.ts +0 -12
- package/dist/composables/emailBuilder/export/shared/tagIdentifier.d.ts +0 -1
- package/dist/composables/emailBuilder/export/targets/htmlExport.d.ts +0 -20
- package/dist/composables/emailBuilder/export/targets/jsonExport.d.ts +0 -28
- package/dist/composables/emailBuilder/export/targets/mjmlExport.d.ts +0 -19
- package/dist/composables/emailBuilder/export/targets/reactEmailExport.d.ts +0 -20
- package/dist/composables/emailBuilder/export/targets/templateSnapshot.d.ts +0 -24
- package/dist/composables/emailBuilder/export/transformers/espWrapper.d.ts +0 -2
- package/dist/composables/emailBuilder/export/transformers/formatting.d.ts +0 -3
- package/dist/composables/emailBuilder/export/transformers/minify.d.ts +0 -33
- package/dist/composables/emailBuilder/export/transformers/tagMapper.d.ts +0 -29
- package/dist/composables/emailBuilder/export/types/export.d.ts +0 -24
- package/dist/composables/emailBuilder/export/useEmailExportEngine.d.ts +0 -63
- package/dist/composables/emailBuilder/export/useEmailExportMobileStyles.d.ts +0 -3
- package/dist/composables/emailBuilder/export/useExportSettings.d.ts +0 -5
- package/dist/composables/emailBuilder/health/accessibilityChecker.d.ts +0 -64
- package/dist/composables/emailBuilder/health/healthIndicator.d.ts +0 -19
- package/dist/composables/emailBuilder/history/useEmailBuilderHistory.d.ts +0 -26
- package/dist/composables/emailBuilder/history/useHistory.d.ts +0 -16
- package/dist/composables/emailBuilder/preview/useClientPreview.d.ts +0 -127
- package/dist/composables/emailBuilder/transform/pipeline/hydrate.d.ts +0 -54
- package/dist/composables/emailBuilder/types/emailBuilder.d.ts +0 -79
- package/dist/composables/system/useColor.d.ts +0 -26
- package/dist/composables/system/useDeviceDetection.d.ts +0 -5
- package/dist/composables/system/useGoogleFonts.d.ts +0 -11
- package/dist/composables/system/useImageUpload.d.ts +0 -23
- package/dist/composables/system/useSavedRowsPanel.d.ts +0 -35
- package/dist/composables/ui/useConfirm.d.ts +0 -33
- package/dist/composables/ui/useInfoDialog.d.ts +0 -22
- package/dist/composables/ui/useTeleportTarget.d.ts +0 -49
- package/dist/composables/ui/useToast.d.ts +0 -32
- package/dist/devStyleMirror.d.ts +0 -20
- package/dist/documentScopedStyles.d.ts +0 -39
- package/dist/element-Dq6bmt2l.js +0 -48454
- package/dist/lightDom.d.ts +0 -30
- package/dist/shadowStyles.d.ts +0 -8
- package/dist/utils/generateId.d.ts +0 -1
- package/dist/utils/shadowDom.d.ts +0 -30
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export declare const safeUrl: (url: string) => string;
|
|
2
|
-
/**
|
|
3
|
-
* Escape a string for safe insertion into HTML text content.
|
|
4
|
-
* Handles: & < > " '
|
|
5
|
-
*
|
|
6
|
-
* Use for anything going between tags, e.g. `<td>${escapeHtml(props.text)}</td>`.
|
|
7
|
-
*/
|
|
8
|
-
export declare const escapeHtml: (value: unknown) => string;
|
|
9
|
-
/**
|
|
10
|
-
* Escape a string for safe insertion into an HTML attribute value.
|
|
11
|
-
* The attribute delimiter in your templates is `"`, so at minimum we must
|
|
12
|
-
* escape `&` and `"`. We escape `<` and `>` too as a belt-and-braces measure
|
|
13
|
-
* against parser quirks in older email clients.
|
|
14
|
-
*
|
|
15
|
-
* Use for user-supplied values going into attributes, e.g.
|
|
16
|
-
* `<img alt="${escapeAttr(iconAlt)}" />`
|
|
17
|
-
*/
|
|
18
|
-
export declare const escapeAttr: (value: unknown) => string;
|
|
19
|
-
/**
|
|
20
|
-
* Normalize rich-text HTML coming out of the editor before it's interpolated
|
|
21
|
-
* into the exported email body (paragraph, heading, list `props.content`).
|
|
22
|
-
*
|
|
23
|
-
* Why this exists
|
|
24
|
-
* ───────────────
|
|
25
|
-
* The editor lives inside an `<x contenteditable>` and serializes inline
|
|
26
|
-
* styles via the browser's `Element.outerHTML`. Because the resulting markup
|
|
27
|
-
* is itself placed inside a `style="…"` attribute downstream, the browser
|
|
28
|
-
* escapes every embedded double-quote as `"`. So a font pick of
|
|
29
|
-
* `Comic Sans MS` round-trips as:
|
|
30
|
-
*
|
|
31
|
-
* <span style="font-family: "Comic Sans MS";">…</span>
|
|
32
|
-
*
|
|
33
|
-
* That's *valid* — email clients will decode it — but it's noisy in the
|
|
34
|
-
* exported source and looks broken to anyone inspecting the output. We
|
|
35
|
-
* rewrite those entity-encoded double quotes inside `style="…"` blocks to
|
|
36
|
-
* single quotes:
|
|
37
|
-
*
|
|
38
|
-
* <span style="font-family: 'Comic Sans MS';">…</span>
|
|
39
|
-
*
|
|
40
|
-
* Design constraints
|
|
41
|
-
* ──────────────────
|
|
42
|
-
* 1. ONLY touch `style="…"` attribute values. We must not rewrite
|
|
43
|
-
* `"` that legitimately appears in visible text content
|
|
44
|
-
* (escaped quotes the user typed) or in non-style attributes.
|
|
45
|
-
* 2. ONLY touch the inner contents of the attribute, not its delimiter.
|
|
46
|
-
* The surrounding `style="…"` keeps its double-quote delimiters so
|
|
47
|
-
* the HTML stays well-formed.
|
|
48
|
-
* 3. Idempotent — running it twice produces the same output.
|
|
49
|
-
* 4. SSR-safe — pure string transformation, no DOM access. This runs
|
|
50
|
-
* from generator code that may execute during export pipelines
|
|
51
|
-
* where `document` is not guaranteed.
|
|
52
|
-
*/
|
|
53
|
-
export declare const normalizeRichTextContent: (html: unknown) => string;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { VisibilityConfig } from '../../core/useEmailBuilderVisibility';
|
|
2
|
-
/**
|
|
3
|
-
* Wraps `content` (a JSX string) in a React logical AND conditional expression
|
|
4
|
-
* derived from `config`.
|
|
5
|
-
*
|
|
6
|
-
* Returns `content` unchanged when:
|
|
7
|
-
* • config is undefined / null
|
|
8
|
-
* • config.enabled is false
|
|
9
|
-
* • config has no rules and no groups
|
|
10
|
-
*
|
|
11
|
-
* Output format:
|
|
12
|
-
* {condition && (
|
|
13
|
-
* <original content>
|
|
14
|
-
* )}
|
|
15
|
-
*
|
|
16
|
-
* The outer `{ }` makes it a valid JSX expression. The inner parentheses
|
|
17
|
-
* group multi-line content so the logical AND binds correctly.
|
|
18
|
-
*
|
|
19
|
-
* @param content JSX string to conditionally render (e.g. a <Row>…</Row>).
|
|
20
|
-
* @param config VisibilityConfig from the row/column/component.
|
|
21
|
-
*/
|
|
22
|
-
export declare const wrapWithReactLogic: (content: string, config: VisibilityConfig | undefined | null) => string;
|
|
23
|
-
/**
|
|
24
|
-
* Preview the generated condition expression without actual content.
|
|
25
|
-
* Useful for rendering a live preview in the VisibilityWrapESP component
|
|
26
|
-
* when the selected syntax is "react".
|
|
27
|
-
*
|
|
28
|
-
* @param config VisibilityConfig to preview.
|
|
29
|
-
* @returns The JS condition string, or null if config is empty/disabled.
|
|
30
|
-
*/
|
|
31
|
-
export declare const previewReactCondition: (config: VisibilityConfig | undefined | null) => string | null;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ESPSyntax } from '../logic/espLogicWrapper';
|
|
2
|
-
/**
|
|
3
|
-
* Transforms a single canonical tag ID into the target ESP's native token.
|
|
4
|
-
*
|
|
5
|
-
* Resolution order:
|
|
6
|
-
* 1. SYSTEM_TAG_MAP lookup — use the ESP-specific hard-coded token as the
|
|
7
|
-
* base, then embed any inline fallback using applyFallbackToSystemToken.
|
|
8
|
-
* 2. transformCustomTag — generic rules for unknown/custom tags (includes
|
|
9
|
-
* full fallback support).
|
|
10
|
-
*
|
|
11
|
-
* Previously, returned the bare system token and silently discarded
|
|
12
|
-
* the fallback. Now the fallback is threaded through for all ESPs that have
|
|
13
|
-
* a wire-format mechanism for it.
|
|
14
|
-
*
|
|
15
|
-
* @param tagId Canonical tag name as stored inside {{ … }}.
|
|
16
|
-
* @param syntax Target ESP.
|
|
17
|
-
* @param fallback Optional default value to embed where the ESP supports it.
|
|
18
|
-
*/
|
|
19
|
-
export declare const transformToken: (tagId: string, syntax: ESPSyntax, fallback?: string) => string;
|
|
20
|
-
/**
|
|
21
|
-
* Transforms ALL {{ tag }} / {{ tag|'default' }} placeholders in an HTML
|
|
22
|
-
* string to the target ESP's native merge tag syntax in one pass.
|
|
23
|
-
*
|
|
24
|
-
* Also handles TipTap-produced
|
|
25
|
-
* <span data-merge="tag" data-merge-default="value">…</span> nodes.
|
|
26
|
-
*
|
|
27
|
-
* The `//s` flag on the span regex handles multiline rich-text nodes.
|
|
28
|
-
*
|
|
29
|
-
* @param html Raw HTML string (from the email builder export).
|
|
30
|
-
* @param syntax Target ESP syntax.
|
|
31
|
-
*/
|
|
32
|
-
export declare const transformHTML: (html: string, syntax: ESPSyntax) => string;
|
|
33
|
-
/**
|
|
34
|
-
* Returns the list of all system tag canonical IDs.
|
|
35
|
-
* Use this to render a "Common tags" palette in the UI.
|
|
36
|
-
*/
|
|
37
|
-
export declare const getSystemTagIds: () => string[];
|
|
38
|
-
/**
|
|
39
|
-
* Returns the system token for a tag + syntax pair, or null if not a system
|
|
40
|
-
* tag for that ESP. Useful for tooltip/preview rendering.
|
|
41
|
-
*/
|
|
42
|
-
export declare const getSystemToken: (tagId: string, syntax: ESPSyntax) => string | null;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const transformTokenForReact: (tagId: string, fallback?: string) => string;
|
|
2
|
-
export declare const transformHTMLForReact: (tsx: string) => string;
|
|
3
|
-
export interface ReactEmailPropsResult {
|
|
4
|
-
propsInterface: string;
|
|
5
|
-
propsDestructure: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const buildReactEmailProps: (tags: Array<{
|
|
8
|
-
tagId: string;
|
|
9
|
-
fallback?: string;
|
|
10
|
-
}>) => ReactEmailPropsResult;
|
|
11
|
-
export declare const extractReactTags: (html: string) => Array<{
|
|
12
|
-
tagId: string;
|
|
13
|
-
fallback?: string;
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Walks every row (and its columns and children) in the rows array and
|
|
17
|
-
* collects every unique tag ID referenced in any VisibilityRule.
|
|
18
|
-
*
|
|
19
|
-
* Supports the recursive children[] tree with nested rows, row-spacers,
|
|
20
|
-
* and the legacy flat col.components[] shape via children ?? components.
|
|
21
|
-
*
|
|
22
|
-
* @param rows The raw rows array from the email builder store.
|
|
23
|
-
* @returns Deduplicated array of tag IDs found in any visibility rule.
|
|
24
|
-
*/
|
|
25
|
-
export declare const extractVisibilityTags: (rows: any[]) => string[];
|
|
26
|
-
export declare const buildReactEmailConsts: (tagIds: string[]) => string;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified container wrapper for rows and columns (HTML export).
|
|
3
|
-
*
|
|
4
|
-
* Industry standard approach for email templates:
|
|
5
|
-
* - Background colors stay on td elements for proper equal-height stretching
|
|
6
|
-
* - Border-radius requires a nested div with overflow:hidden for clipping
|
|
7
|
-
* - Simple borders can stay on td or div depending on context
|
|
8
|
-
*
|
|
9
|
-
* Strategy:
|
|
10
|
-
* - Background: ALWAYS on parent td (ensures columns stretch equally)
|
|
11
|
-
* - Padding: Applied via inner div (keeps content away from borders)
|
|
12
|
-
* - Border-radius: Outer div wrapper with overflow:hidden + border
|
|
13
|
-
* - Simple border (no radius): Can stay on td or inner div
|
|
14
|
-
*
|
|
15
|
-
* This matches how MJML, Foundation for Emails, and major email frameworks work.
|
|
16
|
-
*/
|
|
17
|
-
export declare const wrapWithContainerDiv: (content: string, border: any, backgroundStyles?: string[], padding?: any) => string;
|
|
18
|
-
export declare const wrapWithContainerDivReact: (content: string, border: any, backgroundStyles?: Record<string, string>, padding?: any, applyBorder?: boolean) => string;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const buildGradientCss: (bg: any) => string;
|
|
2
|
-
/**
|
|
3
|
-
* Returns the background CSS strings for a row, column, or spacer (HTML format).
|
|
4
|
-
* Handles solid colour, gradient (with Outlook solid fallback), and image.
|
|
5
|
-
*/
|
|
6
|
-
export declare const buildBackgroundStyles: (obj: any) => string[];
|
|
7
|
-
/**
|
|
8
|
-
* React-style version of buildBackgroundStyles.
|
|
9
|
-
* Returns a camelCase style object (suitable for JSX style={{ }}).
|
|
10
|
-
*/
|
|
11
|
-
export declare const buildBackgroundStylesReact: (obj: any) => Record<string, string>;
|
|
12
|
-
export declare const buildMobileStackGapCSS: (rows: any[]) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const tagToIdentifier: (tag: string) => string;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { ESPSyntax } from '../transformers/espWrapper';
|
|
3
|
-
import { ExportMode, TagSubstitutionOptions, GeneratorBundle } from '../types/export';
|
|
4
|
-
interface Deps {
|
|
5
|
-
rows: Ref<any[]>;
|
|
6
|
-
canvasStyles: Ref<any>;
|
|
7
|
-
generators: GeneratorBundle;
|
|
8
|
-
espSyntax: Ref<ESPSyntax>;
|
|
9
|
-
visibilityContext: Ref<Record<string, string>> | undefined;
|
|
10
|
-
tagSubstitution: Ref<TagSubstitutionOptions> | undefined;
|
|
11
|
-
guardEmpty: (label: string) => boolean;
|
|
12
|
-
collectFonts: (mode: ExportMode, ctx: Record<string, string>) => Set<string>;
|
|
13
|
-
collectMobileCSS: (mode: ExportMode, ctx: Record<string, string>, emailMobileStyles: (comp: any, uid: string) => string) => string[];
|
|
14
|
-
buildMobileStyleBlock: (mobileBreakpoint: number, mobileOverrides: string[]) => string;
|
|
15
|
-
}
|
|
16
|
-
export declare const htmlExport: (deps: Deps) => {
|
|
17
|
-
export: (mode?: ExportMode, templateNameParam?: string) => Promise<void>;
|
|
18
|
-
getHTML: (mode?: ExportMode, templateNameParam?: string) => string | null;
|
|
19
|
-
};
|
|
20
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
interface Deps {
|
|
3
|
-
rows: Ref<any[]>;
|
|
4
|
-
canvasStyles: Ref<any>;
|
|
5
|
-
saveToHistoryFn: (action: string) => void;
|
|
6
|
-
guardEmpty: (label: string) => boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Reports an import failure to the user.
|
|
9
|
-
*
|
|
10
|
-
* Passed in rather than imported so this module stays free of UI concerns
|
|
11
|
-
* and remains testable without a component tree. Falls back to console
|
|
12
|
-
* output if a host wires the export engine up without one, so a failure is
|
|
13
|
-
* never silent.
|
|
14
|
-
*/
|
|
15
|
-
notify?: (message: string, header?: string) => void;
|
|
16
|
-
}
|
|
17
|
-
export declare const jsonExport: (deps: Deps) => {
|
|
18
|
-
export: (templateNameParam?: string) => void;
|
|
19
|
-
import: (file: File, selectedId: any) => void;
|
|
20
|
-
getJSON: (templateNameParam?: string) => {
|
|
21
|
-
template_id: string;
|
|
22
|
-
template_name: string;
|
|
23
|
-
canvas: Partial<import('../../transform/pipeline/optimize').Canvas>;
|
|
24
|
-
rows: Partial<import('../../transform/pipeline/optimize').NestedRow | import('../../transform/pipeline/optimize').RowSpacer>[];
|
|
25
|
-
schema_version: string;
|
|
26
|
-
} | null;
|
|
27
|
-
};
|
|
28
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { ESPSyntax } from '../transformers/espWrapper';
|
|
3
|
-
import { ExportMode, TagSubstitutionOptions, GeneratorBundle } from '../types/export';
|
|
4
|
-
interface Deps {
|
|
5
|
-
rows: Ref<any[]>;
|
|
6
|
-
canvasStyles: Ref<any>;
|
|
7
|
-
generators: GeneratorBundle;
|
|
8
|
-
espSyntax: Ref<ESPSyntax>;
|
|
9
|
-
visibilityContext: Ref<Record<string, string>> | undefined;
|
|
10
|
-
tagSubstitution: Ref<TagSubstitutionOptions> | undefined;
|
|
11
|
-
guardEmpty: (label: string) => boolean;
|
|
12
|
-
collectFonts: (mode: ExportMode, ctx: Record<string, string>) => Set<string>;
|
|
13
|
-
collectMobileCSS: (mode: ExportMode, ctx: Record<string, string>, emailMobileStyles: (comp: any, uid: string) => string) => string[];
|
|
14
|
-
}
|
|
15
|
-
export declare const mjmlExport: (deps: Deps) => {
|
|
16
|
-
export: (mode?: ExportMode, templateNameParam?: string) => Promise<void>;
|
|
17
|
-
getMJML: (mode?: ExportMode, templateNameParam?: string) => string | null;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { ESPSyntax } from '../transformers/espWrapper';
|
|
3
|
-
import { ExportMode, TagSubstitutionOptions, GeneratorBundle } from '../types/export';
|
|
4
|
-
interface Deps {
|
|
5
|
-
rows: Ref<any[]>;
|
|
6
|
-
canvasStyles: Ref<any>;
|
|
7
|
-
generators: GeneratorBundle;
|
|
8
|
-
espSyntax: Ref<ESPSyntax>;
|
|
9
|
-
visibilityContext: Ref<Record<string, string>> | undefined;
|
|
10
|
-
tagSubstitution: Ref<TagSubstitutionOptions> | undefined;
|
|
11
|
-
guardEmpty: (label: string) => boolean;
|
|
12
|
-
collectFonts: (mode: ExportMode, ctx: Record<string, string>) => Set<string>;
|
|
13
|
-
collectMobileCSS: (mode: ExportMode, ctx: Record<string, string>, emailMobileStyles: (comp: any, uid: string) => string) => string[];
|
|
14
|
-
buildMobileStyleBlock: (mobileBreakpoint: number, mobileOverrides: string[]) => string;
|
|
15
|
-
}
|
|
16
|
-
export declare const reactEmailExport: (deps: Deps) => {
|
|
17
|
-
export: (mode?: ExportMode, templateNameParam?: string) => Promise<void>;
|
|
18
|
-
getReactEmail: (mode?: ExportMode, templateNameParam?: string) => string | null;
|
|
19
|
-
};
|
|
20
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const CURRENT_SCHEMA_VERSION = "1.0";
|
|
2
|
-
/**
|
|
3
|
-
* The canonical snapshot shape — exactly what `getJson()` returns, which is
|
|
4
|
-
* what makes `setJson(getJson())` a lossless round-trip.
|
|
5
|
-
*/
|
|
6
|
-
export interface TemplateSnapshotJson {
|
|
7
|
-
template_id: string;
|
|
8
|
-
template_name: string;
|
|
9
|
-
canvas: any;
|
|
10
|
-
rows: any[];
|
|
11
|
-
schema_version: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const toTemplateId: (name: string) => string;
|
|
14
|
-
/**
|
|
15
|
-
* Normalizes any recognized template shape onto the current one.
|
|
16
|
-
*
|
|
17
|
-
* Throws with a specific message rather than returning null: callers surface
|
|
18
|
-
* `error.message` directly to the user, and "Unrecognized template file
|
|
19
|
-
* format" is more use than a silent failure. The major-version guard is the
|
|
20
|
-
* one case worth failing loudly on — a newer schema may contain block types
|
|
21
|
-
* this build cannot render, and silently dropping them would corrupt the
|
|
22
|
-
* user's design on the next save.
|
|
23
|
-
*/
|
|
24
|
-
export declare function normalizeTemplateSnapshot(data: any): TemplateSnapshotJson;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export type MinifyTarget = "html" | "mjml" | "react-email";
|
|
2
|
-
/**
|
|
3
|
-
* Collapse whitespace in a rendered HTML string.
|
|
4
|
-
*
|
|
5
|
-
* Only whitespace is touched — all quotes, attribute values, comments,
|
|
6
|
-
* and CSS/JS content are preserved exactly as the SDK produced them.
|
|
7
|
-
*/
|
|
8
|
-
export declare function minifyHtmlOutput(source: string): string;
|
|
9
|
-
/**
|
|
10
|
-
* Collapse whitespace in a rendered MJML string.
|
|
11
|
-
*
|
|
12
|
-
* Identical strategy to HTML — inter-tag whitespace collapsed, special
|
|
13
|
-
* blocks (style/script/comments) compacted line-by-line only.
|
|
14
|
-
*/
|
|
15
|
-
export declare function minifyMjmlOutput(source: string): string;
|
|
16
|
-
/**
|
|
17
|
-
* Collapse whitespace in a rendered React-email (TSX/JSX) string.
|
|
18
|
-
*
|
|
19
|
-
* Strips leading/trailing spaces per line and collapses runs of blank
|
|
20
|
-
* lines to one. Indentation inside JSX expressions and string literals
|
|
21
|
-
* is not touched.
|
|
22
|
-
*/
|
|
23
|
-
export declare function minifyReactOutput(source: string): string;
|
|
24
|
-
/**
|
|
25
|
-
* Route `source` to the correct whitespace compactor for `target`.
|
|
26
|
-
*
|
|
27
|
-
* @param target One of `"html"`, `"mjml"`, `"react-email"`.
|
|
28
|
-
* @param source Raw string returned by the SDK build function.
|
|
29
|
-
* @returns Whitespace-compacted string. If `target` is unknown the
|
|
30
|
-
* original string is returned unchanged so callers never
|
|
31
|
-
* receive `undefined`.
|
|
32
|
-
*/
|
|
33
|
-
export declare function minifyOutput(target: MinifyTarget, source: string): string;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ExportMode, TagSubstitutionOptions } from '../types/export';
|
|
2
|
-
import { ESPSyntax } from '../logic/espLogicWrapper';
|
|
3
|
-
export { resolveAllTags } from '../../core/merge-tags/resolveMergeTags';
|
|
4
|
-
export { transformHTML } from '../merge-tags/mergeTagMapper';
|
|
5
|
-
export { transformHTMLForReact, extractReactTags, buildReactEmailProps, extractVisibilityTags, buildReactEmailConsts, } from '../merge-tags/reactMergeTagMapper';
|
|
6
|
-
/**
|
|
7
|
-
* Applies the correct tag transformation strategy to a finalised output string.
|
|
8
|
-
*
|
|
9
|
-
* ┌─────────┬──────────────┬──────────────────────┬────────────────────────────────────────────────┐
|
|
10
|
-
* │ mode │ preview │ resolveDocumentLevel │ action │
|
|
11
|
-
* ├─────────┼──────────────┼──────────────────────┼────────────────────────────────────────────────┤
|
|
12
|
-
* │ wrap │ any │ any │ transformHTML → ESP tokens (file goes to ESP) │
|
|
13
|
-
* │ prune │ preview OFF │ any │ transformHTML → ESP tokens (no literal values) │
|
|
14
|
-
* │ prune │ preview ON │ false (default) │ no-op → literals substituted per-component │
|
|
15
|
-
* │ prune │ preview ON │ true │ resolveAllTags → document-level substitution │
|
|
16
|
-
* └─────────┴──────────────┴──────────────────────┴────────────────────────────────────────────────┘
|
|
17
|
-
*
|
|
18
|
-
* @param resolveDocumentLevel Pass `true` for exporters that skip
|
|
19
|
-
* applyComponentTagSubstitution per-component (currently: MJML). HTML and
|
|
20
|
-
* React exports leave this as the default `false` because they already
|
|
21
|
-
* substituted tags per-component and the prune+previewON branch is a no-op
|
|
22
|
-
* for them.
|
|
23
|
-
*/
|
|
24
|
-
export declare const applyTagTransform: (output: string, mode: ExportMode, espSyntax: ESPSyntax, tagSubstitution?: TagSubstitutionOptions, resolveDocumentLevel?: boolean) => string;
|
|
25
|
-
/**
|
|
26
|
-
* Applies tag substitution at the component level (during generation).
|
|
27
|
-
* Only active in prune mode when a preview context is live.
|
|
28
|
-
*/
|
|
29
|
-
export declare const applyComponentTagSubstitution: (raw: string, mode: ExportMode, tagSubstitution?: TagSubstitutionOptions) => string;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* "prune" — Evaluate visibility against the current preview context and
|
|
3
|
-
* OMIT rows / columns / components that do not match.
|
|
4
|
-
* Use this for one-time audience snapshots.
|
|
5
|
-
*
|
|
6
|
-
* "wrap" — Include ALL rows / components regardless of visibility and
|
|
7
|
-
* WRAP matching rows in ESP conditional tags so the mail server
|
|
8
|
-
* evaluates them at send time.
|
|
9
|
-
* Use this for master templates uploaded to your ESP.
|
|
10
|
-
*/
|
|
11
|
-
export type ExportMode = "prune" | "wrap";
|
|
12
|
-
export interface TagSubstitutionOptions {
|
|
13
|
-
/** Values from MergeTagTab. Only applied when mergeTagActive is true. */
|
|
14
|
-
mergeTagContext: Record<string, string>;
|
|
15
|
-
mergeTagActive: boolean;
|
|
16
|
-
/** Values from LinkTagTab. Only applied when linkTagActive is true. */
|
|
17
|
-
linkTagContext: Record<string, string>;
|
|
18
|
-
linkTagActive: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface GeneratorBundle {
|
|
21
|
-
html: (comp: any) => string;
|
|
22
|
-
react: (comp: any) => string;
|
|
23
|
-
mjml: (comp: any) => string;
|
|
24
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { useInfoDialog } from '../../ui/useInfoDialog';
|
|
3
|
-
import { ESPSyntax } from './transformers/espWrapper';
|
|
4
|
-
import { ExportMode, TagSubstitutionOptions, GeneratorBundle } from './types/export';
|
|
5
|
-
export type { ExportMode };
|
|
6
|
-
export declare const useEmailExportEngine: (rows: any, canvasStyles: any,
|
|
7
|
-
/**
|
|
8
|
-
* Generator bundle injected by useEmailBuilder.
|
|
9
|
-
* Accepts both the new object form and the legacy positional signatures
|
|
10
|
-
* so existing call-sites do not break during the migration period.
|
|
11
|
-
*
|
|
12
|
-
* New (preferred):
|
|
13
|
-
* useEmailExportEngine(rows, canvas, { html, react, mjml }, ...)
|
|
14
|
-
*
|
|
15
|
-
* Legacy (still supported):
|
|
16
|
-
* useEmailExportEngine(rows, canvas, htmlFn, reactFn, mjmlFn, ...)
|
|
17
|
-
*/
|
|
18
|
-
generatorsOrHtmlFn: GeneratorBundle | ((comp: any) => string), reactFnOrSaveHistory?: ((comp: any) => string) | ((action: string) => void), mjmlFnOrVisibilityContext?: ((comp: any) => string) | Ref<Record<string, string>>, saveToHistoryFnOrTagSub?: ((action: string) => void) | Ref<TagSubstitutionOptions>, visibilityContextOrUndefined?: Ref<Record<string, string>>, tagSubstitutionOrUndefined?: Ref<TagSubstitutionOptions>,
|
|
19
|
-
/**
|
|
20
|
-
* Shared espConfig ref, created once by createEmailBuilderInstance() in
|
|
21
|
-
* useEmailBuilder.ts. Read unconditionally below, regardless of which of
|
|
22
|
-
* the two calling conventions above was used — this parameter isn't part
|
|
23
|
-
* of that legacy/new-form migration, it's new. Falls back to a fresh
|
|
24
|
-
* local ref if omitted, so this still works if called any other way.
|
|
25
|
-
*/
|
|
26
|
-
espConfigRef?: Ref<{
|
|
27
|
-
syntax: ESPSyntax;
|
|
28
|
-
}>,
|
|
29
|
-
/**
|
|
30
|
-
* Same reasoning as espConfigRef above, and for a more fundamental
|
|
31
|
-
* reason than convenience: inject() never looks at a component's own
|
|
32
|
-
* provides — only its parent's (or app context, for the root). A
|
|
33
|
-
* component can never inject what it itself just provided, in any Vue
|
|
34
|
-
* app, by design. createEmailBuilderInstance() runs inside
|
|
35
|
-
* EmailEditor.vue's own setup(), the same instance that calls
|
|
36
|
-
* provideInfoDialog() — so useInfoDialog() called from anywhere in that
|
|
37
|
-
* call chain would always fail, regardless of ordering. Passing the
|
|
38
|
-
* already-created instance directly sidesteps inject() for this case
|
|
39
|
-
* entirely. Falls back to useInfoDialog() if omitted, for any future
|
|
40
|
-
* caller with a genuine parent-child relationship to the provider.
|
|
41
|
-
*/
|
|
42
|
-
infoDialogInstance?: ReturnType<typeof useInfoDialog>) => {
|
|
43
|
-
exportHTML: (mode?: ExportMode, templateNameParam?: string) => Promise<void>;
|
|
44
|
-
getExportedHTML: (mode?: ExportMode, templateNameParam?: string) => string | null;
|
|
45
|
-
exportReactEmail: (mode?: ExportMode, templateNameParam?: string) => Promise<void>;
|
|
46
|
-
getExportedReactEmail: (mode?: ExportMode, templateNameParam?: string) => string | null;
|
|
47
|
-
exportMJML: (mode?: ExportMode, templateNameParam?: string) => Promise<void>;
|
|
48
|
-
getExportedMJML: (mode?: ExportMode, templateNameParam?: string) => string | null;
|
|
49
|
-
exportJSON: (templateNameParam?: string) => void;
|
|
50
|
-
getExportedJSON: (templateNameParam?: string) => {
|
|
51
|
-
template_id: string;
|
|
52
|
-
template_name: string;
|
|
53
|
-
canvas: Partial<import('../transform/pipeline/optimize').Canvas>;
|
|
54
|
-
rows: Partial<import('../transform/pipeline/optimize').NestedRow | import('../transform/pipeline/optimize').RowSpacer>[];
|
|
55
|
-
schema_version: string;
|
|
56
|
-
} | null;
|
|
57
|
-
importJSON: (file: File, selectedId: any) => void;
|
|
58
|
-
espConfig: Ref<{
|
|
59
|
-
syntax: ESPSyntax;
|
|
60
|
-
}, {
|
|
61
|
-
syntax: ESPSyntax;
|
|
62
|
-
}>;
|
|
63
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
export type Severity = "critical" | "serious";
|
|
3
|
-
export type IssueStatus = "failed" | "passed" | "ignored";
|
|
4
|
-
export interface AccessibilityIssue {
|
|
5
|
-
/** Stable ID — `${ruleId}:${componentId}` so suppressions persist across runs. */
|
|
6
|
-
id: string;
|
|
7
|
-
ruleId: string;
|
|
8
|
-
severity: Severity;
|
|
9
|
-
status: IssueStatus;
|
|
10
|
-
/** Short rule name, e.g. "Image missing alt text". */
|
|
11
|
-
rule: string;
|
|
12
|
-
/** One-line, user-facing description of what's wrong (or what passed). */
|
|
13
|
-
message: string;
|
|
14
|
-
/** Why it matters — WCAG reference + practical impact. */
|
|
15
|
-
info: string;
|
|
16
|
-
/** Component / row reference for future deep-linking. */
|
|
17
|
-
componentRef?: {
|
|
18
|
-
type: string;
|
|
19
|
-
id?: string;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export interface AccessibilitySummary {
|
|
23
|
-
failed: AccessibilityIssue[];
|
|
24
|
-
passed: AccessibilityIssue[];
|
|
25
|
-
ignored: AccessibilityIssue[];
|
|
26
|
-
failedCount: number;
|
|
27
|
-
passedCount: number;
|
|
28
|
-
ignoredCount: number;
|
|
29
|
-
criticalCount: number;
|
|
30
|
-
seriousCount: number;
|
|
31
|
-
/** Overall status mirrors healthIndicator's good/warn/bad vocabulary. */
|
|
32
|
-
status: "good" | "warn" | "bad";
|
|
33
|
-
/** Short headline message for the card summary row. */
|
|
34
|
-
summaryMessage: string;
|
|
35
|
-
}
|
|
36
|
-
export declare function accessibilityChecker(rows: Ref<any[]>, options?: {
|
|
37
|
-
/**
|
|
38
|
-
* Body background color. Accept Ref<string> so contrast checks against
|
|
39
|
-
* transparent rows update reactively when the user changes the canvas.
|
|
40
|
-
*/
|
|
41
|
-
bodyBg?: Ref<string | undefined> | string;
|
|
42
|
-
emailMeta?: Ref<any> | any;
|
|
43
|
-
/**
|
|
44
|
-
* Merge-tag context (general text). Same shape useEmailBuilder exposes
|
|
45
|
-
* as `mergeTagPreviewContext`. Pass it as a Ref so resolution updates
|
|
46
|
-
* reactively as the user edits preview values.
|
|
47
|
-
*/
|
|
48
|
-
mergeTagContext?: Ref<Record<string, string>> | Record<string, string>;
|
|
49
|
-
/**
|
|
50
|
-
* Link-tag context (URL/href fields and anchor leaves). Same shape as
|
|
51
|
-
* `linkTagPreviewContext`.
|
|
52
|
-
*/
|
|
53
|
-
linkTagContext?: Ref<Record<string, string>> | Record<string, string>;
|
|
54
|
-
/**
|
|
55
|
-
* True when the user has merge/link preview toggled on. When false,
|
|
56
|
-
* tag resolution is a no-op so the checker sees the raw `{{ tag }}`.
|
|
57
|
-
*/
|
|
58
|
-
previewActive?: Ref<boolean> | boolean;
|
|
59
|
-
}): {
|
|
60
|
-
summary: import('vue').ComputedRef<AccessibilitySummary>;
|
|
61
|
-
ignoreIssue: (issueId: string) => void;
|
|
62
|
-
restoreIssue: (issueId: string) => void;
|
|
63
|
-
clearIgnored: () => void;
|
|
64
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare function healthIndicator(rows: any): {
|
|
2
|
-
metrics: import('vue').ComputedRef<{
|
|
3
|
-
textChars: number;
|
|
4
|
-
textCompCount: number;
|
|
5
|
-
imageCompCount: number;
|
|
6
|
-
socialIconCount: number;
|
|
7
|
-
buttonIconCount: number;
|
|
8
|
-
textRatio: number;
|
|
9
|
-
imageRatio: number;
|
|
10
|
-
estimatedKB: number;
|
|
11
|
-
estimatedLow: number;
|
|
12
|
-
estimatedHigh: number;
|
|
13
|
-
ratioStatus: "warn" | "good" | "bad";
|
|
14
|
-
kbStatus: "warn" | "good" | "bad";
|
|
15
|
-
ratioTip: string;
|
|
16
|
-
kbTip: string;
|
|
17
|
-
isEmpty: boolean;
|
|
18
|
-
}>;
|
|
19
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* The document state captured in a history snapshot.
|
|
4
|
-
*
|
|
5
|
-
* Notably absent: selectedId, selectedRowId, selectedColumn. See the header
|
|
6
|
-
* comment above for why.
|
|
7
|
-
*/
|
|
8
|
-
export interface EmailBuilderState {
|
|
9
|
-
rows: any[];
|
|
10
|
-
canvasStyles: Record<string, any>;
|
|
11
|
-
}
|
|
12
|
-
export declare const useEmailBuilderHistory: () => {
|
|
13
|
-
getCurrentState: (rows: Ref<any[]>, canvasStyles: Ref<Record<string, any>>) => EmailBuilderState;
|
|
14
|
-
restoreState: (state: EmailBuilderState | null, rows: Ref<any[]>, canvasStyles: Ref<Record<string, any>>, selectedId: Ref<string | null>, selectedRowId: Ref<string | null>, selectedColumn: Ref<{
|
|
15
|
-
rowId: string;
|
|
16
|
-
columnId: string;
|
|
17
|
-
} | null>) => void;
|
|
18
|
-
saveToHistory: (getCurrentStateFn: () => EmailBuilderState, action?: string, immediate?: boolean) => void;
|
|
19
|
-
undo: (restoreStateFn: (state: EmailBuilderState | null) => void) => EmailBuilderState | null;
|
|
20
|
-
redo: (restoreStateFn: (state: EmailBuilderState | null) => void) => EmailBuilderState | null;
|
|
21
|
-
canUndo: import('vue').ComputedRef<boolean>;
|
|
22
|
-
canRedo: import('vue').ComputedRef<boolean>;
|
|
23
|
-
historyStatus: import('vue').ComputedRef<string>;
|
|
24
|
-
initialize: (currentState: EmailBuilderState) => void;
|
|
25
|
-
version: Ref<number, number>;
|
|
26
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface HistorySnapshot<T> {
|
|
2
|
-
state: T;
|
|
3
|
-
action: string;
|
|
4
|
-
timestamp: number;
|
|
5
|
-
}
|
|
6
|
-
export declare const useHistory: <T = unknown>() => {
|
|
7
|
-
canUndo: import('vue').ComputedRef<boolean>;
|
|
8
|
-
canRedo: import('vue').ComputedRef<boolean>;
|
|
9
|
-
historyStatus: import('vue').ComputedRef<string>;
|
|
10
|
-
saveState: (state: T, action?: string, immediate?: boolean) => void;
|
|
11
|
-
undo: () => T | null;
|
|
12
|
-
redo: () => T | null;
|
|
13
|
-
clearHistory: () => void;
|
|
14
|
-
initHistory: (initialState: T) => void;
|
|
15
|
-
version: import('vue').Ref<number, number>;
|
|
16
|
-
};
|