pagepilot-visual-editor 1.0.29 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +116 -0
- package/README.md +42 -28
- package/dist/PagePilotEditor.d.ts +12 -9
- package/dist/api/ApiClientContext.d.ts +1 -0
- package/dist/api/PagepilotApiClient.d.ts +7 -0
- package/dist/assets/aiChatbotIcon.d.ts +1 -0
- package/dist/blocks-internal/block-button/src/index.d.ts +6 -0
- package/dist/blocks-internal/block-container/src/index.d.ts +1 -1
- package/dist/blocks-internal/block-heading/src/index.d.ts +2 -2
- package/dist/blocks-internal/block-list/src/index.d.ts +12 -2
- package/dist/blocks-internal/block-mdx/src/index.d.ts +47 -0
- package/dist/blocks-internal/block-quill/src/index.d.ts +48 -0
- package/dist/editor/PagePreviewDialog.d.ts +14 -0
- package/dist/editor/Topbar.d.ts +3 -1
- package/dist/editor/pageUrls.d.ts +25 -0
- package/dist/editor/publish/PageLiveSuccessDialog.d.ts +9 -0
- package/dist/editor/publish/PagePublishDialog.d.ts +1 -0
- package/dist/editor/publish/PublishAccessibilityPanel.d.ts +8 -0
- package/dist/editor/publish/a11yLinter.d.ts +8 -0
- package/dist/editor/recordDirty.d.ts +16 -0
- package/dist/editor/renderSections.d.ts +2 -2
- package/dist/editor/savePipeline.d.ts +40 -0
- package/dist/editor/types.d.ts +35 -0
- package/dist/editor-sample/App/InspectorDrawer/BehaviourPanel.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandColorPalette.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandEmptyLink.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandPanel.styled.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandSection.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/EmptyText.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/FontDetailsList.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/index.d.ts +5 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/useBrandApply.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/ResponsiveDeviceTabs.d.ts +0 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/blockStyleClipboard.d.ts +2 -8
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/index.d.ts +1 -4
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts +2 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FlexColumns/ColumnSection.d.ts +2 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FormsPickerSidebarPanel.d.ts +2 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MdxSidebarPanel.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MenuPickerSidebarPanel.d.ts +23 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/QuillSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.d.ts +2 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/AnimationSection.d.ts +7 -5
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/HoverEffectSection.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/imageSizeUnit.d.ts +19 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Picker.d.ts +0 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/VariableLinkHint.d.ts +27 -0
- package/dist/editor-sample/App/InspectorDrawer/EditorBehavior.d.ts +8 -2
- package/dist/editor-sample/App/InspectorDrawer/LayersPanelStyles.d.ts +2 -2
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/AiSupportedBadge.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/SectionsModal.d.ts +2 -10
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/icons/index.d.ts +3 -5
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/templateHelpers.d.ts +198 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/useDebouncedValue.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/AiGenerateButton.d.ts +18 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/ItemsArrayRepeatSection.d.ts +2 -3
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/ScalarFieldRow.d.ts +4 -1
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/VariableGroupDialog.d.ts +19 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/VariableGroupList.d.ts +5 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/aiFill.d.ts +75 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/styles.d.ts +14 -11
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/upgradeDialog.d.ts +8 -8
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/useAutoRegisterTokenFields.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/behaviourFields.d.ts +30 -0
- package/dist/editor-sample/App/InspectorDrawer/components/RichTextAiButton.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/index.d.ts +8 -1
- package/dist/editor-sample/App/InspectorDrawer/publish/BackgroundPanel.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/renderBehaviourField.d.ts +7 -0
- package/dist/editor-sample/App/TemplatePanel/hooks/useMainBoxStyles.d.ts +2 -1
- package/dist/editor-sample/App/TemplatePanel/index.d.ts +2 -1
- package/dist/editor-sample/App/TemplatePanel/minimap/useMiniMapSync.d.ts +2 -2
- package/dist/editor-sample/App/TemplatePanel/pageGuide/iframeSrcDoc.d.ts +3 -6
- package/dist/editor-sample/App/hooks/page/saveMenuHrefEdits.d.ts +1 -1
- package/dist/editor-sample/App/hooks/page/useSaveHandler.d.ts +1 -0
- package/dist/editor-sample/App/hooks/useAutosave.d.ts +8 -3
- package/dist/editor-sample/App/hooks/useIsTemplateEditorRoute.d.ts +1 -0
- package/dist/editor-sample/App/hooks/useStretch.d.ts +9 -0
- package/dist/editor-sample/App/shared/PagePreviewFrame.d.ts +17 -2
- package/dist/editor-sample/App/shared/UploadImage.d.ts +4 -0
- package/dist/editor-sample/App/shared/editor.styles.d.ts +13 -3
- package/dist/editor-sample/documents/blocks/Container/ContainerPropsSchema.d.ts +6 -4
- package/dist/editor-sample/documents/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +4 -0
- package/dist/editor-sample/documents/blocks/FormsPicker/FormsPropsSchema.d.ts +33 -2
- package/dist/editor-sample/documents/blocks/List/ListEditor.d.ts +8 -0
- package/dist/editor-sample/documents/blocks/Marquee/MarqueePropsSchema.d.ts +4 -0
- package/dist/editor-sample/documents/blocks/MenuPicker/MenuPropsSchema.d.ts +11 -0
- package/dist/editor-sample/documents/blocks/Table/TableCellEditor.d.ts +2 -1
- package/dist/editor-sample/documents/blocks/Table/TableImportDialog.styles.d.ts +15 -5
- package/dist/editor-sample/documents/blocks/Table/parseClipboardTable.d.ts +7 -0
- package/dist/editor-sample/documents/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/Timer/TimerPropsSchema.d.ts +2 -0
- package/dist/editor-sample/documents/blocks/Timer/variants/CircularProgressView.d.ts +2 -1
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/blockMenuStyles.d.ts +1 -1
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/brandButtonDefaults.d.ts +1 -4
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.d.ts +0 -6
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/dialogs/LinkDialog.d.ts +4 -1
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useToolbarCommands.d.ts +16 -4
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/popovers/TableResizeOverlay.d.ts +17 -0
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/styles.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/types.d.ts +2 -4
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/EditorBlockWrapper.d.ts +2 -3
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/TuneMenu.styles.d.ts +17 -0
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/saveAsTemplateUtils.d.ts +37 -7
- package/dist/editor-sample/documents/blocks/helpers/documentUtils.d.ts +55 -28
- package/dist/editor-sample/documents/blocks/helpers/responsiveStyle.d.ts +1 -1
- package/dist/editor-sample/documents/blocks/helpers/variableBinding.d.ts +9 -2
- package/dist/editor-sample/documents/editor/EditorBlock.d.ts +2 -6
- package/dist/editor-sample/documents/editor/EditorContext.d.ts +87 -20
- package/dist/editor-sample/documents/editor/LazyEditorBlock.d.ts +1 -0
- package/dist/editor-sample/documents/editor/core.d.ts +510 -390
- package/dist/editor-sample/documents/editor/templateVariables.d.ts +178 -25
- package/dist/editor-sample/documents/editor/useRootFontFamily.d.ts +10 -0
- package/dist/editor-sample/utils/editorStorageKey.d.ts +2 -0
- package/dist/editor-sample/utils/localStoragePref.d.ts +2 -0
- package/dist/email-builder-core/blocks/Container/ContainerPropsSchema.d.ts +1 -1
- package/dist/email-builder-core/blocks/Container/ContainerReader.d.ts +1 -1
- package/dist/email-builder-core/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +4 -0
- package/dist/email-builder-core/blocks/EmailLayout/EmailLayoutReader.d.ts +1 -1
- package/dist/email-builder-core/blocks/FlexColumns/FlexColumnsPropsSchema.d.ts +3 -0
- package/dist/email-builder-core/blocks/FlexColumns/flexColumnsHelpers.d.ts +4 -2
- package/dist/email-builder-core/blocks/MenuPicker/MenuColumns.d.ts +13 -0
- package/dist/email-builder-core/blocks/MenuPicker/MenuPropsSchema.d.ts +10 -0
- package/dist/email-builder-core/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
- package/dist/email-builder-core/index.d.ts +0 -2
- package/dist/email-builder-core/renderers/pageScripts.d.ts +0 -1
- package/dist/email-builder-core/renderers/themeTokens.d.ts +94 -132
- package/dist/host-stubs/history.d.ts +5 -0
- package/dist/host-stubs/hooks/useTenantFeatureCutoff.d.ts +8 -0
- package/dist/host-stubs/hooks/useTenantPlan.d.ts +18 -0
- package/dist/host-stubs/i18nAhdDefaults.d.ts +1 -0
- package/dist/host-stubs/modules/allSlugs/allSlugsActions.d.ts +1 -0
- package/dist/host-stubs/modules/allSlugs/allSlugsSelectors.d.ts +1 -0
- package/dist/host-stubs/modules/auth/authCurrentTenant.d.ts +6 -0
- package/dist/host-stubs/modules/forms/formsService.d.ts +3 -1
- package/dist/host-stubs/modules/forms/useFormsList.d.ts +4 -1
- package/dist/host-stubs/modules/menu/menuService.d.ts +4 -0
- package/dist/host-stubs/modules/page/pageService.d.ts +11 -0
- package/dist/host-stubs/modules/settings/settingsActions.d.ts +2 -0
- package/dist/host-stubs/modules/settings/settingsSelectors.d.ts +4 -0
- package/dist/host-stubs/modules/shared/axios/authAxios.d.ts +17 -0
- package/dist/host-stubs/modules/shared/constants.d.ts +14 -0
- package/dist/host-stubs/modules/store.d.ts +4 -0
- package/dist/host-stubs/modules/template/templateEnumerators.d.ts +19 -0
- package/dist/host-stubs/modules/tour/injectTourIntoPage.d.ts +20 -0
- package/dist/host-stubs/modules/websiteV2/propagateFromPage.d.ts +4 -0
- package/dist/host-stubs/style/icons.d.ts +57 -0
- package/dist/host-stubs/utils/dateFormats.d.ts +1 -0
- package/dist/host-stubs/view/branding/brandDefaultFont.d.ts +3 -1
- package/dist/host-stubs/view/branding/styles/BrandIcons.d.ts +9 -0
- package/dist/host-stubs/view/branding/styles/types.d.ts +76 -0
- package/dist/host-stubs/view/configurations/ConfigurationIcons.d.ts +9 -0
- package/dist/host-stubs/view/demo/DemoIcons.d.ts +9 -0
- package/dist/host-stubs/view/images/Icons.d.ts +6 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/types.d.ts +47 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/utils/fileUtils.d.ts +3 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/utils/mediaTypes.d.ts +9 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog.d.ts +12 -2
- package/dist/host-stubs/view/media/styles/MediaIcons.d.ts +13 -0
- package/dist/host-stubs/view/shared/Confetti.d.ts +5 -0
- package/dist/host-stubs/view/shared/PagePilotLoader.d.ts +2 -0
- package/dist/host-stubs/view/shared/UpgradeDialog/UpgradeDialogContext.d.ts +1 -0
- package/dist/host-stubs/view/shared/common/CopyToClipboard.d.ts +7 -0
- package/dist/host-stubs/view/shared/editors/MdxEditor.d.ts +8 -0
- package/dist/host-stubs/view/shared/editors/QuillEditor.d.ts +3 -0
- package/dist/host-stubs/view/shared/editors/sanitize.d.ts +4 -0
- package/dist/host-stubs/view/shared/editors/types.d.ts +7 -0
- package/dist/host-stubs/view/shared/media/TemplatePreviewMedia.d.ts +29 -0
- package/dist/host-stubs/view/shared/modals/ConfigureDialog.d.ts +7 -0
- package/dist/host-stubs/view/shared/modals/ManageTemplateModal.d.ts +5 -0
- package/dist/host-stubs/view/shared/speech/index.d.ts +17 -0
- package/dist/host-stubs/view/shared/styles/Table.styles.d.ts +3 -0
- package/dist/host-stubs/view/template/form/TemplateFormModal.d.ts +10 -0
- package/dist/host-stubs/view/template/form/fields/types.d.ts +7 -0
- package/dist/{index-BN1BduFG.js → index-BONR8bWR.js} +1 -1
- package/dist/{index-DojXOBrb.js → index-B_cb-ZLC.js} +88415 -74153
- package/dist/index-BfIWhBCR.cjs +1561 -0
- package/dist/{index-BRq3RgdO.cjs → index-CFA3aG_U.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/render-core/combineSections.d.ts +33 -3
- package/dist/render-core/dateFormats.d.ts +14 -3
- package/dist/render-core/stubs/pickerEmptyState.d.ts +2 -0
- package/dist/render-core/stubs/styleIcons.d.ts +1 -0
- package/dist/render.cjs +272 -219
- package/dist/render.js +9856 -7949
- package/dist/style.css +1 -1
- package/dist/{xlsx-D2quXLTv.cjs → xlsx-CBpoXUEM.cjs} +1 -1
- package/dist/{xlsx-0y4dyiCO.js → xlsx-DSqBw3Em.js} +1 -1
- package/package.json +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/ResponsiveEditingBanner.d.ts +0 -13
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/BoxShadowControls.d.ts +0 -19
- package/dist/editor-sample/documents/blocks/AppBannerPicker/appBanner.styled.d.ts +0 -2
- package/dist/email-builder-core/blocks/boxShadowSchema.d.ts +0 -23
- package/dist/index-DEBoxZlq.cjs +0 -1510
|
@@ -1,9 +1,146 @@
|
|
|
1
1
|
import { TEditorConfiguration } from './core';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { DateFormatPreset, TimeFormatPreset } from '../../../host-stubs/utils/dateFormats';
|
|
3
|
+
/**
|
|
4
|
+
* The kinds of single-value template field. `array` is repeatable and handled
|
|
5
|
+
* separately. `text` / `textarea` substitute as plain strings, `number` as a
|
|
6
|
+
* numeric string, `image` as an image URL (used in Image/Avatar/Logo blocks),
|
|
7
|
+
* `date` an ISO date string rendered through a display format (see `dateFormat`).
|
|
8
|
+
* `time` an ISO date string rendered as just its time portion (see `timeFormat`).
|
|
9
|
+
* `datetime` one ISO string exposing TWO sub-tokens — `{{id.date}}` (formatted
|
|
10
|
+
* via `dateFormat`) and `{{id.time}}` (via `timeFormat`) — so a single value /
|
|
11
|
+
* API mapping can print its date and time in separate blocks.
|
|
12
|
+
*/
|
|
13
|
+
export type TemplateScalarType = 'text' | 'textarea' | 'number' | 'image' | 'date' | 'time' | 'datetime';
|
|
14
|
+
export type TemplateFormType = TemplateScalarType | 'array';
|
|
15
|
+
/** All scalar types — used by both top-level fields and array sub-fields. */
|
|
16
|
+
export declare const TEMPLATE_SCALAR_TYPES: TemplateScalarType[];
|
|
17
|
+
export type TemplateItemFieldDef = {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
/** Sub-field input kind. Defaults to `text` when absent (legacy rows). */
|
|
21
|
+
type?: TemplateScalarType;
|
|
22
|
+
/** Author-set default value, used to prefill the row when a template is applied. */
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
/** `date` sub-fields only — see the same fields on TemplateFormField. */
|
|
25
|
+
dateFormat?: DateFormatPreset;
|
|
26
|
+
/** `time` sub-fields only — 24h / AM/PM. Timezone reuses `dateTz`. */
|
|
27
|
+
timeFormat?: TimeFormatPreset;
|
|
28
|
+
dateTz?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Items-array fields only: the block item key this sub-field writes to
|
|
31
|
+
* (e.g. MenuPicker `name` / `href`), so the variable id can be anything the
|
|
32
|
+
* author likes (`navLabel`). Falls back to `id` when absent.
|
|
33
|
+
*/
|
|
34
|
+
mapsTo?: string;
|
|
35
|
+
};
|
|
36
|
+
export type TemplateArrayRow = Record<string, string>;
|
|
37
|
+
export type TemplateFormField = {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
type: TemplateFormType;
|
|
41
|
+
value?: string | TemplateArrayRow[];
|
|
42
|
+
defaultValue?: string;
|
|
43
|
+
itemFields?: TemplateItemFieldDef[];
|
|
44
|
+
sourceBlockId?: string;
|
|
45
|
+
rowIds?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* `date` fields only. How the ISO `value` is displayed:
|
|
48
|
+
* - `relative` (default) → "Today" / "Tomorrow" / "Mar 25", recomputed in the
|
|
49
|
+
* reader's browser at view time (emitted as a `data-ahd-date` marker span,
|
|
50
|
+
* NOT baked to a fixed string). Uses the reader's local timezone.
|
|
51
|
+
* - any absolute preset → a fixed string ("9th Sep 2026" …) resolved at bake
|
|
52
|
+
* time in `dateTz`.
|
|
53
|
+
* See src/utils/dateFormats.ts for the preset list.
|
|
54
|
+
*/
|
|
55
|
+
dateFormat?: DateFormatPreset;
|
|
56
|
+
/**
|
|
57
|
+
* `time` fields only. How the ISO `value`'s time portion is displayed:
|
|
58
|
+
* - `24h` (default) → "20:42"
|
|
59
|
+
* - `12h` → "8:42 PM"
|
|
60
|
+
* Always baked to a fixed string (no relative mode). Rendered in `dateTz`.
|
|
61
|
+
*/
|
|
62
|
+
timeFormat?: TimeFormatPreset;
|
|
63
|
+
/**
|
|
64
|
+
* `date` fields with an absolute `dateFormat`, and all `time` fields. IANA
|
|
65
|
+
* timezone the value is rendered in (e.g. "America/New_York"). Ignored by
|
|
66
|
+
* `date`'s `relative` preset.
|
|
67
|
+
*/
|
|
68
|
+
dateTz?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Set on a container-repeat array field driven from the Variables tab's
|
|
71
|
+
* "Repeatable container" flow: the id of the Grid/FlexColumns/ColumnsContainer
|
|
72
|
+
* whose EMPTY slots get stamped with clones of `sourceBlockId`'s subtree.
|
|
73
|
+
* (`sourceBlockId` = the block sitting in the container's first filled slot;
|
|
74
|
+
* `rowIds` = the stamped clones' roots, one per filled empty slot.)
|
|
75
|
+
*/
|
|
76
|
+
containerId?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Set on a direct items-array data-source field: the id of
|
|
79
|
+
* the block whose OWN `data.props.items` gets seeded straight from the Data
|
|
80
|
+
* Reference source. Unlike `sourceBlockId`, there's no cloned subtree —
|
|
81
|
+
* `itemsBlockId` points at the block itself, and rows write directly into
|
|
82
|
+
* its `items` array. Presence of `itemsBlockId` (instead of `sourceBlockId`)
|
|
83
|
+
* is what routes ArrayFieldEditor/DataReferencePanel down the items-array
|
|
84
|
+
* path instead of the container-repeat path.
|
|
85
|
+
*/
|
|
86
|
+
itemsBlockId?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Author flag set from "Set template details" → Template Fields: marks this
|
|
89
|
+
* field's content as intended to be repeated once the template is applied
|
|
90
|
+
* (e.g. across grid cells / carousel slides). Pure metadata — carried through
|
|
91
|
+
* from the saved template record, doesn't drive any runtime behavior itself.
|
|
92
|
+
*/
|
|
93
|
+
repeatable?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* The id of the block template this repeatable field is bound to — captured
|
|
96
|
+
* when the field's block is saved via the Variables-panel "Save as New
|
|
97
|
+
* Template" shortcut. Gives a reference to WHICH template drives this grid so
|
|
98
|
+
* the "Change Template" flow can key-match form fields on replace, and the
|
|
99
|
+
* Data Reference tab knows the source template.
|
|
100
|
+
*/
|
|
101
|
+
templateId?: string;
|
|
102
|
+
/**
|
|
103
|
+
* "Data Reference" binding for a repeatable field: where the repetition data
|
|
104
|
+
* comes from. `custom` = the manual rows editor (default). `api`/`menu` pull
|
|
105
|
+
* an array of objects whose keys map to this field's sub-field ids; each
|
|
106
|
+
* object seeds one repeated copy. `customJson` holds the pasted JSON text for
|
|
107
|
+
* the `custom-json` source. Only meaningful when `repeatable` is set.
|
|
108
|
+
*/
|
|
109
|
+
dataSource?: {
|
|
110
|
+
/** `api` = fetch an array of objects from a REST endpoint. */
|
|
111
|
+
type: 'custom' | 'custom-json' | 'api' | 'menu';
|
|
112
|
+
/** Raw JSON text for `custom-json`. */
|
|
113
|
+
customJson?: string;
|
|
114
|
+
/** Endpoint URL for the `api` source. Persisted in config. */
|
|
115
|
+
apiUrl?: string;
|
|
116
|
+
/** HTTP method for the `api` source. Only GET works today; POST is planned. */
|
|
117
|
+
apiMethod?: 'GET' | 'POST';
|
|
118
|
+
/**
|
|
119
|
+
* Optional dot-path (e.g. "data.ALL.games") into the response body where
|
|
120
|
+
* the array of objects lives. When empty, the array is auto-detected from
|
|
121
|
+
* common wrapper keys (data / rows / results / items / records).
|
|
122
|
+
*/
|
|
123
|
+
apiResponsePath?: string;
|
|
124
|
+
/**
|
|
125
|
+
* REPEATABLE fields: optional dot-path applied to EACH array element before
|
|
126
|
+
* its keys are matched to sub-field ids. Use it when the fields you want are
|
|
127
|
+
* nested inside a wrapper on every row, e.g. `[{ "event": { "nextStart": … } }]`
|
|
128
|
+
* → set `apiItemPath: "event"` so `nextStart` maps directly.
|
|
129
|
+
* Works for the `api` and `custom-json` sources.
|
|
130
|
+
*/
|
|
131
|
+
apiItemPath?: string;
|
|
132
|
+
/** Selected menu id for `menu`. */
|
|
133
|
+
menuId?: string;
|
|
134
|
+
/**
|
|
135
|
+
* SCALAR fields only: dot-path into the fetched object for THIS field's
|
|
136
|
+
* value, overriding the default key lookup by field id. e.g. field `name`
|
|
137
|
+
* with `apiObjectPath: "user.fullName"` reads `body.user.fullName`.
|
|
138
|
+
* (`apiResponsePath` still points at the object itself within the response.)
|
|
139
|
+
*/
|
|
140
|
+
apiObjectPath?: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
export declare function buildRepeatRowIndex(document: TEditorConfiguration | null | undefined, fields: TemplateFormField[] | null | undefined): Map<string, TemplateArrayRow>;
|
|
7
144
|
/**
|
|
8
145
|
* Apply `sourceHtml`'s formatting shell to `targetHtml`'s text. If the source
|
|
9
146
|
* has no formatting, returns the target unchanged (keeps the copy's text as-is).
|
|
@@ -15,15 +152,6 @@ export declare function applyRowFormatting(sourceHtml: string, targetHtml: strin
|
|
|
15
152
|
* each row's text). Returns a new `fields` array; unrelated fields pass through.
|
|
16
153
|
*/
|
|
17
154
|
export declare function syncRepeatRowFormatting(fields: TemplateFormField[], document: TEditorConfiguration | null | undefined, sourceRootId: string): TemplateFormField[];
|
|
18
|
-
/**
|
|
19
|
-
* Split the HTML around a `{{token}}` into the wrapper the block put around it
|
|
20
|
-
* (the opening tags/styles before the token) and the trailing wrapper (the
|
|
21
|
-
* closing tags after it). Used by the sidebar's mini-rich-text editor so a
|
|
22
|
-
* value edited inside the popover can be re-composed back into the wrapping
|
|
23
|
-
* `<font color=...><span style=...>…</span></font>` chain the inline editor
|
|
24
|
-
* committed the token with — otherwise the sidebar edit would strip that
|
|
25
|
-
* formatting on save. Returns empty prefix+suffix if no token is present.
|
|
26
|
-
*/
|
|
27
155
|
export declare function splitTokenWrapper(rawText: string): {
|
|
28
156
|
prefix: string;
|
|
29
157
|
suffix: string;
|
|
@@ -37,6 +165,21 @@ export declare function stripTokenWrapper(html: string, { prefix, suffix }: {
|
|
|
37
165
|
prefix: string;
|
|
38
166
|
suffix: string;
|
|
39
167
|
}): string;
|
|
168
|
+
/**
|
|
169
|
+
* Like stripTokenWrapper, but also returns the EDITED wrapper (outermost
|
|
170
|
+
* layer) so toolbar changes made on it — e.g. clearing tablet/mobile
|
|
171
|
+
* `data-fs-*` on the wrapper span — can be written back to the block instead
|
|
172
|
+
* of being discarded with the strip. `prefix`/`suffix` are null when the
|
|
173
|
+
* wrapper couldn't be matched structurally.
|
|
174
|
+
*/
|
|
175
|
+
export declare function splitEditedTokenHtml(html: string, wrapper: {
|
|
176
|
+
prefix: string;
|
|
177
|
+
suffix: string;
|
|
178
|
+
}): {
|
|
179
|
+
value: string;
|
|
180
|
+
prefix: string | null;
|
|
181
|
+
suffix: string | null;
|
|
182
|
+
};
|
|
40
183
|
/**
|
|
41
184
|
* When a Text/Heading/Button block's text is a SINGLE template token
|
|
42
185
|
* (`{{description}}` for a scalar field, or `{{this.sub}}` for a row sub-field
|
|
@@ -57,18 +200,28 @@ export declare function resolveEditableTokenField(rawText: string, blockId: stri
|
|
|
57
200
|
value: string;
|
|
58
201
|
apply: (next: string, forms: TemplateFormField[]) => TemplateFormField[];
|
|
59
202
|
} | null;
|
|
203
|
+
/** Drop stale MenuPicker container-repeat fields. Same reference when none. */
|
|
204
|
+
export declare function dropStaleMenuRepeatFields(document: TEditorConfiguration | null | undefined, fields: TemplateFormField[]): TemplateFormField[];
|
|
205
|
+
export declare function pruneOrphanFormFields(document: TEditorConfiguration | null | undefined, fields: TemplateFormField[] | null | undefined): TemplateFormField[];
|
|
206
|
+
export declare function getTextFieldsForType(type: string | undefined): string[] | undefined;
|
|
207
|
+
export declare function getTemplateForms(document: TEditorConfiguration | null | undefined): TemplateFormField[];
|
|
208
|
+
export declare function applyVariables(input: string | null | undefined, fields: TemplateFormField[] | null | undefined, rowContext?: TemplateArrayRow | null): string;
|
|
60
209
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
*
|
|
69
|
-
*
|
|
210
|
+
* Resolve {{tokens}} in MenuPicker `menuItems[]` (name/label/href, recursing
|
|
211
|
+
* into `children[]`). Returns the SAME array reference when nothing changed.
|
|
212
|
+
*/
|
|
213
|
+
export declare function substituteMenuItems(items: any[] | null | undefined, fields: TemplateFormField[] | null | undefined, rowContext?: TemplateArrayRow | null): any[] | null | undefined;
|
|
214
|
+
export declare function htmlToPlainText(html: string): string;
|
|
215
|
+
export declare function substituteBlockText(block: any, fields: TemplateFormField[] | null | undefined, rowContext?: TemplateArrayRow | null, rowIndex?: Map<string, TemplateArrayRow> | null): any;
|
|
216
|
+
/**
|
|
217
|
+
* Permanently substitute every token into the document and drop `formFields`
|
|
218
|
+
* from `root.data`. Used on publish/save.
|
|
70
219
|
*
|
|
71
|
-
*
|
|
220
|
+
* One deliberate exception to "bake = final text": a `date` field whose
|
|
221
|
+
* `dateFormat` is `relative` bakes to a `<span data-ahd-date="<iso>" …>` marker
|
|
222
|
+
* (via `buildContext` → `markDateVar`), not to "Today". The saved-HTML runtime
|
|
223
|
+
* in `renderers/pageScripts.ts` formats it in the reader's browser so the label
|
|
224
|
+
* stays correct on any later view. Absolute date formats bake to a fixed string.
|
|
72
225
|
*/
|
|
73
|
-
export declare function
|
|
226
|
+
export declare function bakeTemplateValues<T extends TEditorConfiguration>(document: T, fields: TemplateFormField[] | null | undefined): T;
|
|
74
227
|
export declare function withPersistedFormFields<T extends TEditorConfiguration>(document: T, fields: TemplateFormField[] | null | undefined): T;
|
|
@@ -1 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Font every block inherits when it has no explicit `fontFamily` of its own:
|
|
3
|
+
* the page root's font, else the workspace brand default.
|
|
4
|
+
*
|
|
5
|
+
* Deliberately NOT in EditorContext. That module is the editor's store and is
|
|
6
|
+
* imported by nearly every editor component; pulling the redux-backed brand
|
|
7
|
+
* lookup into it formed an import cycle that left EditorContext partially
|
|
8
|
+
* initialised at eval time (which is what broke the add-block "+" button).
|
|
9
|
+
* Keeping the resolution in its own leaf module breaks the cycle.
|
|
10
|
+
*/
|
|
1
11
|
export declare function useRootFontFamily(): string;
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const ContainerPropsSchema: z.ZodObject<{
|
|
3
3
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
4
4
|
backgroundColor: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>>;
|
|
5
|
-
backgroundImage: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
5
|
+
backgroundImage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodString]>>>;
|
|
6
6
|
backgroundSize: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
7
|
backgroundRepeat: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
8
8
|
repeat: "repeat";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ContainerProps } from './ContainerPropsSchema';
|
|
2
|
-
export default function ContainerReader({ style, props, blockId }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function ContainerReader({ style, props, responsive, blockId }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,6 +11,10 @@ export declare const EmailLayoutPropsSchema: z.ZodObject<{
|
|
|
11
11
|
borderRadius: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
12
12
|
canvasColor: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>>;
|
|
13
13
|
textColor: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>;
|
|
14
|
+
hostTheme: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
light: "light";
|
|
16
|
+
follow: "follow";
|
|
17
|
+
}>>>;
|
|
14
18
|
fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
15
19
|
MODERN_SANS: "MODERN_SANS";
|
|
16
20
|
BOOK_SANS: "BOOK_SANS";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { EmailLayoutProps } from './EmailLayoutPropsSchema';
|
|
3
|
-
export default function EmailLayoutReader(props: EmailLayoutProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode
|
|
3
|
+
export default function EmailLayoutReader(props: EmailLayoutProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>>;
|
|
@@ -49,6 +49,9 @@ declare const FlexColumnsPropsSchema: z.ZodObject<{
|
|
|
49
49
|
columnShrink: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodBoolean>>>;
|
|
50
50
|
columnShrinkTablet: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodBoolean>>>;
|
|
51
51
|
columnShrinkMobile: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodBoolean>>>;
|
|
52
|
+
columnSpan: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodNumber>>>>;
|
|
53
|
+
columnSpanTablet: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodNumber>>>>;
|
|
54
|
+
columnSpanMobile: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodNumber>>>>;
|
|
52
55
|
equalColumns: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
53
56
|
columns: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
57
|
childrenIds: z.ZodArray<z.ZodString>;
|
|
@@ -40,6 +40,8 @@ export type DeviceLayout = {
|
|
|
40
40
|
layout: FlexRowLayout;
|
|
41
41
|
/** Per-column shrink-to-content flags, one entry per column. */
|
|
42
42
|
shrink: boolean[];
|
|
43
|
+
/** Per-column 12-grid span, one entry per column; null = no span. */
|
|
44
|
+
span: (number | null)[];
|
|
43
45
|
/** All non-shrink columns share the row width equally. */
|
|
44
46
|
equalColumns: boolean;
|
|
45
47
|
reverseColumns: boolean;
|
|
@@ -58,7 +60,7 @@ export declare function resolveDeviceLayout(props: FlexProps, device: FlexDevice
|
|
|
58
60
|
* equal — take an identical share of the row, whatever the content
|
|
59
61
|
* plain — grow from natural width
|
|
60
62
|
*/
|
|
61
|
-
export type ColumnKind = 'plain' | 'equal' | 'shrink';
|
|
63
|
+
export type ColumnKind = 'plain' | 'equal' | 'shrink' | 'span';
|
|
62
64
|
/**
|
|
63
65
|
* The block's complete stylesheet: structure, then one fully-restated sizing block
|
|
64
66
|
* per device in ascending-specificity-free source order (desktop → tablet → mobile).
|
|
@@ -75,7 +77,7 @@ export declare function buildResponsiveRowCss(instanceClass: string, opts: {
|
|
|
75
77
|
* owns that at every breakpoint. Kept for the editor canvas, which renders without
|
|
76
78
|
* the stylesheet and needs the active device's sizing directly.
|
|
77
79
|
*/
|
|
78
|
-
export declare function buildColumnStyle(kind: ColumnKind, stacked: boolean): CSSProperties;
|
|
80
|
+
export declare function buildColumnStyle(kind: ColumnKind, stacked: boolean, span?: number | null, gap?: number): CSSProperties;
|
|
79
81
|
/** The kind of a column on a given device — shared by the editor and the reader. */
|
|
80
82
|
export declare function columnKindFor(index: number, device: DeviceLayout): ColumnKind;
|
|
81
83
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
p: any;
|
|
4
|
+
menuItems: any[];
|
|
5
|
+
menuKey: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
fontFamily?: string;
|
|
9
|
+
start?: React.ReactNode;
|
|
10
|
+
end?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
declare const MenuColumns: ({ p, menuItems, menuKey, textColor, backgroundColor, fontFamily, start, end }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default MenuColumns;
|
|
@@ -2,6 +2,10 @@ import { z } from 'zod';
|
|
|
2
2
|
declare const MenuPropsInnerSchema: z.ZodObject<{
|
|
3
3
|
menuId: z.ZodDefault<z.ZodString>;
|
|
4
4
|
useCustomMenu: z.ZodDefault<z.ZodBoolean>;
|
|
5
|
+
navRole: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
footer: "footer";
|
|
7
|
+
header: "header";
|
|
8
|
+
}>>>;
|
|
5
9
|
stickyNav: z.ZodDefault<z.ZodBoolean>;
|
|
6
10
|
stickyNavTablet: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
7
11
|
stickyNavMobile: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -13,6 +17,7 @@ declare const MenuPropsInnerSchema: z.ZodObject<{
|
|
|
13
17
|
orientation: z.ZodDefault<z.ZodEnum<{
|
|
14
18
|
vertical: "vertical";
|
|
15
19
|
horizontal: "horizontal";
|
|
20
|
+
columns: "columns";
|
|
16
21
|
}>>;
|
|
17
22
|
menuItems: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
18
23
|
startChildrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
@@ -71,6 +76,10 @@ export declare const MenuPropsSchema: z.ZodObject<{
|
|
|
71
76
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
72
77
|
menuId: z.ZodDefault<z.ZodString>;
|
|
73
78
|
useCustomMenu: z.ZodDefault<z.ZodBoolean>;
|
|
79
|
+
navRole: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
80
|
+
footer: "footer";
|
|
81
|
+
header: "header";
|
|
82
|
+
}>>>;
|
|
74
83
|
stickyNav: z.ZodDefault<z.ZodBoolean>;
|
|
75
84
|
stickyNavTablet: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
76
85
|
stickyNavMobile: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -82,6 +91,7 @@ export declare const MenuPropsSchema: z.ZodObject<{
|
|
|
82
91
|
orientation: z.ZodDefault<z.ZodEnum<{
|
|
83
92
|
vertical: "vertical";
|
|
84
93
|
horizontal: "horizontal";
|
|
94
|
+
columns: "columns";
|
|
85
95
|
}>>;
|
|
86
96
|
menuItems: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>>;
|
|
87
97
|
startChildrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
@@ -12,6 +12,12 @@ export declare const TabsBlockPropsSchema: z.ZodObject<{
|
|
|
12
12
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
13
13
|
backgroundColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
14
14
|
borderColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
15
|
+
borderWidth: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
16
|
+
top: z.ZodNumber;
|
|
17
|
+
right: z.ZodNumber;
|
|
18
|
+
bottom: z.ZodNumber;
|
|
19
|
+
left: z.ZodNumber;
|
|
20
|
+
}, z.core.$strip>>>;
|
|
15
21
|
borderRadius: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodObject<{
|
|
16
22
|
topLeft: z.ZodNumber;
|
|
17
23
|
topRight: z.ZodNumber;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export { default as renderToStaticMarkup } from './renderers/renderToStaticMarkup';
|
|
2
2
|
export type { TReaderBlock, TReaderDocument, TReaderBlockProps, TReaderProps, } from './Reader/core';
|
|
3
3
|
export { ReaderBlockSchema, ReaderDocumentSchema, ReaderBlock, default as Reader, } from './Reader/core';
|
|
4
|
-
export { buildGeneratedThemeMarkup } from './renderers/pageScripts';
|
|
5
|
-
export { GENERATED_THEME_ATTR, GENERATED_THEME_AUTO } from './renderers/themeTokens';
|
|
@@ -13,4 +13,3 @@ export declare const PAGINATION_SCRIPT_URL = "https://pagepilot.fabbuilder.com/s
|
|
|
13
13
|
export declare const DEMO_SCALE_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotDemoScale.js";
|
|
14
14
|
export declare const TIMER_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotTimer.js";
|
|
15
15
|
export declare const ANIMATION_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotAnimation.js";
|
|
16
|
-
export declare const buildGeneratedThemeMarkup: () => string;
|