pagepilot-visual-editor 1.0.30 → 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 +20 -0
- package/dist/blocks-internal/block-button/src/index.d.ts +6 -0
- package/dist/blocks-internal/block-heading/src/index.d.ts +2 -2
- package/dist/blocks-internal/block-list/src/index.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/BehaviourPanel.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MenuPickerSidebarPanel.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/VariableLinkHint.d.ts +22 -3
- package/dist/editor-sample/App/InspectorDrawer/LayersPanelStyles.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/templateHelpers.d.ts +11 -39
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/AiGenerateButton.d.ts +5 -1
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/ItemsArrayRepeatSection.d.ts +2 -3
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/aiFill.d.ts +42 -3
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/useAutoRegisterTokenFields.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/components/RichTextAiButton.d.ts +7 -0
- package/dist/editor-sample/App/TemplatePanel/pageGuide/iframeSrcDoc.d.ts +3 -6
- package/dist/editor-sample/App/shared/PagePreviewFrame.d.ts +17 -2
- package/dist/editor-sample/App/shared/editor.styles.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +4 -0
- package/dist/editor-sample/documents/blocks/MenuPicker/MenuPropsSchema.d.ts +5 -0
- package/dist/editor-sample/documents/blocks/Table/TableImportDialog.styles.d.ts +6 -6
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/popovers/TableResizeOverlay.d.ts +17 -0
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/saveAsTemplateUtils.d.ts +8 -6
- package/dist/editor-sample/documents/blocks/helpers/documentUtils.d.ts +22 -2
- package/dist/editor-sample/documents/blocks/helpers/responsiveStyle.d.ts +1 -1
- package/dist/editor-sample/documents/blocks/helpers/variableBinding.d.ts +0 -2
- package/dist/editor-sample/documents/editor/EditorContext.d.ts +10 -0
- package/dist/editor-sample/documents/editor/core.d.ts +20 -2
- package/dist/editor-sample/documents/editor/templateVariables.d.ts +29 -13
- 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/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/renderers/themeTokens.d.ts +100 -4
- 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/shared/axios/authAxios.d.ts +1 -0
- package/dist/host-stubs/modules/websiteV2/propagateFromPage.d.ts +4 -0
- package/dist/host-stubs/view/shared/styles/Table.styles.d.ts +1 -1
- package/dist/{index-CStZQ7E0.js → index-BONR8bWR.js} +1 -1
- package/dist/{index-B8pdGALF.js → index-B_cb-ZLC.js} +32297 -30421
- package/dist/{index-DVx38kGU.cjs → index-BfIWhBCR.cjs} +321 -313
- package/dist/{index-C-KL2oQP.cjs → index-CFA3aG_U.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/render.cjs +157 -149
- package/dist/render.js +4332 -3948
- package/dist/{xlsx-DUs4Mvqq.cjs → xlsx-CBpoXUEM.cjs} +1 -1
- package/dist/{xlsx-bYU68TCR.js → xlsx-DSqBw3Em.js} +1 -1
- package/package.json +1 -1
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/AiFillAllDialog.d.ts +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,26 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
9
|
### Changed
|
|
10
|
+
- Re-synced the vendored editor with ahd-fe `master` (9661ba36b), on top of
|
|
11
|
+
the 82ec6ec4b sync below. Upstream behaviour pulled in includes:
|
|
12
|
+
- Host-application theme support (theme slots, surface lock, dark-host
|
|
13
|
+
`light-dark()` adaptation) across readers, the canvas and previews.
|
|
14
|
+
- Selecting a block no longer switches the sidebar tab; a variable-bound
|
|
15
|
+
block highlights its variable for the Variables tab.
|
|
16
|
+
- AI: per-field `RichTextAiButton` / `AiGenerateButton` (the AI Fill All
|
|
17
|
+
dialog is removed), and scalar `{{token}}` fields are auto-registered.
|
|
18
|
+
- Token editing inside inline text keeps `{{token}}` wrappers intact
|
|
19
|
+
(`splitEditedTokenHtml`, `htmlToPlainText`).
|
|
20
|
+
- Inline toolbar table resizing, MenuPicker items-array / columns plus a
|
|
21
|
+
page-link picker, FlexColumns column widths, container responsive
|
|
22
|
+
height, removing a repeat row deletes its subtree.
|
|
23
|
+
- Section Library defaults to "My templates" when the tenant has any.
|
|
24
|
+
- Debounced inputs and fewer re-renders in the sidebar and minimap.
|
|
25
|
+
- Host stubs: `modules/allSlugs` (empty list) and
|
|
26
|
+
`modules/websiteV2/propagateFromPage` (no-op), and `authAxios` accepts
|
|
27
|
+
`signal` so AI requests can be cancelled without axios.
|
|
28
|
+
- ahd-fe-only template-switch UI (Templates / SavedTemplates / compare
|
|
29
|
+
dialogs) is not vendored.
|
|
10
30
|
- Re-synced the vendored editor (`editor-sample/`, `email-builder-core/`,
|
|
11
31
|
`blocks-internal/`) with ahd-fe `master` (82ec6ec4b). 358 of 453 shared
|
|
12
32
|
files are now byte-identical. The rest differ only where the standalone
|
|
@@ -42,6 +42,12 @@ export declare const ButtonPropsSchema: z.ZodObject<{
|
|
|
42
42
|
normal: "normal";
|
|
43
43
|
bold: "bold";
|
|
44
44
|
}>>>;
|
|
45
|
+
textDecoration: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
none: "none";
|
|
47
|
+
underline: "underline";
|
|
48
|
+
"line-through": "line-through";
|
|
49
|
+
"underline line-through": "underline line-through";
|
|
50
|
+
}>>>;
|
|
45
51
|
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
46
52
|
right: "right";
|
|
47
53
|
left: "left";
|
|
@@ -11,8 +11,8 @@ export declare const HeadingPropsSchema: z.ZodObject<{
|
|
|
11
11
|
h6: "h6";
|
|
12
12
|
}>>>;
|
|
13
13
|
linkType: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
14
|
-
link: "link";
|
|
15
14
|
text: "text";
|
|
15
|
+
link: "link";
|
|
16
16
|
}>>>;
|
|
17
17
|
url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
18
18
|
openInNewTab: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -132,4 +132,4 @@ export declare const HeadingPropsDefaults: {
|
|
|
132
132
|
readonly openInNewTab: false;
|
|
133
133
|
};
|
|
134
134
|
export declare function Heading({ props, style }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
135
|
-
export declare function getFontSize(level: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'): 32 | 24 | 19 |
|
|
135
|
+
export declare function getFontSize(level: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'): 16 | 32 | 24 | 19 | 13 | 11;
|
|
@@ -53,8 +53,8 @@ export declare const ListPropsSchema: z.ZodObject<{
|
|
|
53
53
|
"upper-roman": "upper-roman";
|
|
54
54
|
}>>>;
|
|
55
55
|
numberSuffix: z.ZodPreprocess<z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
56
|
-
".": ".";
|
|
57
56
|
")": ")";
|
|
57
|
+
".": ".";
|
|
58
58
|
}>>>>;
|
|
59
59
|
startNumber: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
60
60
|
markerColor: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>;
|
|
@@ -5,7 +5,7 @@ export declare const gridContainerSx: {
|
|
|
5
5
|
py: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const StyledElementIdContainer: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
8
|
-
export declare const StyledDivider: import('@emotion/styled').StyledComponent<import('@mui/material').DividerOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "style" | "children" | "className" | "textAlign" | "orientation" | "
|
|
8
|
+
export declare const StyledDivider: import('@emotion/styled').StyledComponent<import('@mui/material').DividerOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "light" | "style" | "children" | "className" | "textAlign" | "orientation" | "absolute" | "variant" | "classes" | "sx" | "flexItem"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
9
9
|
export declare const StyledPositionGrid: any;
|
|
10
10
|
export declare const StyledTriggerGrid: any;
|
|
11
11
|
export declare const StyledAnimationGrid: any;
|
|
@@ -8,7 +8,7 @@ type Props = {
|
|
|
8
8
|
stickyNavTablet?: boolean | null;
|
|
9
9
|
stickyNavMobile?: boolean | null;
|
|
10
10
|
position: 'left' | 'center' | 'right';
|
|
11
|
-
orientation: 'horizontal' | 'vertical';
|
|
11
|
+
orientation: 'horizontal' | 'vertical' | 'columns';
|
|
12
12
|
menuItems?: any[];
|
|
13
13
|
layout?: 'menu-only' | 'logo-menu' | 'menu-cta' | 'logo-menu-cta';
|
|
14
14
|
startChildrenIds?: string[];
|
|
@@ -1,8 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Wraps a locked, variable-bound input so clicking anywhere on it jumps to the
|
|
4
|
+
* Variables tab (a disabled input swallows clicks itself, so its own pointer
|
|
5
|
+
* events are switched off and the wrapper catches them). Passes children
|
|
6
|
+
* through untouched when not bound.
|
|
7
|
+
*/
|
|
8
|
+
export declare function VariableBoundClickArea({ bound, value, fieldId, children, }: {
|
|
9
|
+
bound: boolean;
|
|
10
|
+
value: string;
|
|
11
|
+
/** Known owning field (e.g. a menu's items-array) when `value` has no token. */
|
|
12
|
+
fieldId?: string;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
1
15
|
/** Compact icon (fits inside an input) linking a locked, variable-bound value to its variable. */
|
|
2
16
|
export declare function VariableLinkIcon({ value }: {
|
|
3
17
|
value: string;
|
|
4
18
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Text hint shown under a locked, variable-bound input — jumps to the variable.
|
|
21
|
+
* Pass `fieldId` when the variable is known directly (e.g. a repeatable block's
|
|
22
|
+
* array field) instead of being derived from a `{{token}}` in `value`.
|
|
23
|
+
*/
|
|
24
|
+
export default function VariableLinkHint({ value, fieldId }: {
|
|
25
|
+
value?: string;
|
|
26
|
+
fieldId?: string;
|
|
8
27
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,7 @@ export declare const PanelRoot: import('@emotion/styled').StyledComponent<import
|
|
|
4
4
|
export declare const PanelHeader: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<Theme>> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
5
5
|
export declare const PanelContent: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<Theme>> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
6
6
|
export declare const HeaderBox: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<Theme>> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
7
|
-
export declare const HeaderTitle: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "
|
|
7
|
+
export declare const HeaderTitle: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "border" | "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "paddingBottom" | "align" | "bgcolor" | "borderTop" | "px" | "boxShadow" | "overflow" | "variant" | "paddingX" | "paddingY" | "marginX" | "marginY" | "maxWidth" | "maxHeight" | "classes" | "sx" | "letterSpacing" | "order" | "visibility" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderLeft" | "borderRight" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "py" | "typography" | "displayPrint" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
8
8
|
export declare const ClipboardBar: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<Theme>> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
9
9
|
export declare const ActionSpan: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
10
10
|
export declare const ActionButton: import('@emotion/styled').StyledComponent<import('@mui/material').ButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "children" | "className" | "size" | "color" | "disabled" | "action" | "href" | "tabIndex" | "fullWidth" | "variant" | "classes" | "sx" | "loading" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "loadingIndicator" | "disableElevation" | "endIcon" | "loadingPosition" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<Theme>, {}, {}>;
|
|
@@ -110,44 +110,16 @@ export declare function appendTemplateFormFields(templateRecord: any, idMapping?
|
|
|
110
110
|
}): void;
|
|
111
111
|
export declare const applyFullDocumentTemplate: (configuration: any, document: any, resetDocument: (doc: any) => void) => void;
|
|
112
112
|
/**
|
|
113
|
-
* "Change template"
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* Root overlay: root-level style keys copied via `PURE_STYLE_KEYS` (the wide
|
|
118
|
-
* list — "Change template" is the confirm-gated aggressive restyle).
|
|
119
|
-
* Per-block overlay: `overlayBlockStylesFromTemplate`.
|
|
120
|
-
*
|
|
121
|
-
* Confirmation copy the user sees before this fires:
|
|
122
|
-
* "You can change the template, but please note that only the common
|
|
123
|
-
* fields will be retained; any unused data will be removed."
|
|
124
|
-
* "Common fields" is the form-fields half — see
|
|
125
|
-
* `mergeTemplateFormFieldsPreservingValues`.
|
|
126
|
-
*/
|
|
127
|
-
export declare const applyChangeTemplate: (configuration: any, document: any, resetDocument: (doc: any) => void) => void;
|
|
128
|
-
/**
|
|
129
|
-
* Sidebar-side counterpart to `applyChangeTemplate`. The user's blocks
|
|
130
|
-
* stay on the canvas, so any `{{token}}` they already contain must keep
|
|
131
|
-
* a matching form-field entry — otherwise the token renders as an unbound
|
|
132
|
-
* "Add X" pill. This helper therefore takes the union approach:
|
|
133
|
-
*
|
|
134
|
-
* - Every existing form field the user has is retained VERBATIM (id,
|
|
135
|
-
* type, value, everything). Tokens keep resolving to the values the
|
|
136
|
-
* user typed.
|
|
137
|
-
* - Any field the incoming template defines that the user doesn't
|
|
138
|
-
* already have is appended with its prefilled default. New template
|
|
139
|
-
* structure that references brand-new tokens still lights up.
|
|
140
|
-
* - Nothing is deleted. "Unused data will be removed" from the confirm
|
|
141
|
-
* copy cannot apply here: removing a field whose token still lives
|
|
142
|
-
* on the canvas would break the very content we just promised not
|
|
143
|
-
* to touch.
|
|
144
|
-
*
|
|
145
|
-
* Container-repeat fields (`type === 'array'` with `sourceBlockId`)
|
|
146
|
-
* follow the same "already there? keep it" rule; the underlying
|
|
147
|
-
* container blocks weren't remapped by `applyChangeTemplate`, so
|
|
148
|
-
* `sourceBlockId` and `rowIds` stay valid.
|
|
113
|
+
* Build the document "Change template" would produce, without touching the
|
|
114
|
+
* editor. `applyChangeTemplate` commits it; the template preview dialog
|
|
115
|
+
* renders it beside the current page.
|
|
149
116
|
*/
|
|
150
|
-
export declare
|
|
117
|
+
export declare const buildChangeTemplateDocument: (configuration: any, document: any, templateRecord?: any) => {
|
|
118
|
+
doc: any;
|
|
119
|
+
fields: any[];
|
|
120
|
+
current: any;
|
|
121
|
+
} | null;
|
|
122
|
+
export declare const applyChangeTemplate: (configuration: any, document: any, resetDocument: (doc: any) => void, templateRecord?: any) => void;
|
|
151
123
|
/**
|
|
152
124
|
* "Use this Styles" for non-tour modules (pages, FAQ, app-banner, tooltip,
|
|
153
125
|
* template). Applies the template's styling — the root canvas AND every
|
|
@@ -161,8 +133,8 @@ export declare function mergeTemplateFormFieldsPreservingValues(templateRecord:
|
|
|
161
133
|
* so the canvas geometry, background, CTA-existence and block list stay the
|
|
162
134
|
* user's — the page never resizes and no root CTA button appears/moves.
|
|
163
135
|
*
|
|
164
|
-
* Per-block: `overlayBlockStylesFromTemplate` —
|
|
165
|
-
* overlay
|
|
136
|
+
* Per-block: `overlayBlockStylesFromTemplate` — donor-matching + prop
|
|
137
|
+
* overlay; nothing is added, removed or re-keyed.
|
|
166
138
|
*
|
|
167
139
|
* History: a much older version of this function matched blocks by type,
|
|
168
140
|
* replaced each with the template's, and DELETED every unmatched block —
|
|
@@ -3,6 +3,10 @@ type AiGenerateButtonProps = {
|
|
|
3
3
|
/** The fields eligible for AI fill — id/name/type. */
|
|
4
4
|
fields: AiTargetField[];
|
|
5
5
|
onGenerated: (values: AiValue[]) => void;
|
|
6
|
+
/** Overrides the default text-button trigger (label, look) and popover side. */
|
|
7
|
+
label?: string;
|
|
8
|
+
variant?: 'text' | 'outlined';
|
|
9
|
+
popoverBelow?: boolean;
|
|
6
10
|
};
|
|
7
11
|
/**
|
|
8
12
|
* Footer-level "Generate with AI" button for the variable group dialog. One
|
|
@@ -10,5 +14,5 @@ type AiGenerateButtonProps = {
|
|
|
10
14
|
* fields are sent as `context.formFields` and the AI returns the same array
|
|
11
15
|
* back with `value` populated, at `generation.data.response.data.formFields`.
|
|
12
16
|
*/
|
|
13
|
-
export default function AiGenerateButton({ fields, onGenerated }: AiGenerateButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default function AiGenerateButton({ fields, onGenerated, label, variant, popoverBelow, }: AiGenerateButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
14
18
|
export {};
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* `TemplateFormField` bound to this block's own items via `itemsBlockId`,
|
|
6
6
|
* seeded from whatever items already exist.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* block-agnostic helpers for the next items-array block.
|
|
8
|
+
* Opt-in list: `ITEMS_ARRAY_BLOCK_TYPES` in documentUtils (today MenuPicker,
|
|
9
|
+
* custom-menu mode).
|
|
11
10
|
*/
|
|
12
11
|
export default function ItemsArrayRepeatSection({ blockId }: {
|
|
13
12
|
blockId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TemplateFormField, TemplateScalarType } from '../../../documents/editor/templateVariables';
|
|
1
|
+
import { TemplateArrayRow, TemplateFormField, TemplateScalarType } from '../../../documents/editor/templateVariables';
|
|
2
2
|
export type VisibleForm = {
|
|
3
3
|
field: TemplateFormField;
|
|
4
4
|
index: number;
|
|
@@ -28,9 +28,48 @@ export declare function buildAiFields(visibleForms: VisibleForm[]): {
|
|
|
28
28
|
};
|
|
29
29
|
/** Writes generated values back onto scalar fields and array rows. */
|
|
30
30
|
export declare function applyAiValues(values: AiValue[], visibleForms: VisibleForm[], scalarIndexById: Map<string, number>, updateFields: UpdateFields): void;
|
|
31
|
+
/**
|
|
32
|
+
* Template variables (root.data.formFields) serialized for an AI request's
|
|
33
|
+
* `context.formFields`, so text generation can see field names + current values.
|
|
34
|
+
* Same per-field shape `requestAiFill` sends; array fields also carry their
|
|
35
|
+
* sub-field defs and current rows.
|
|
36
|
+
*/
|
|
37
|
+
export declare function toAiFormFieldsContext(forms: TemplateFormField[]): ({
|
|
38
|
+
itemFields: {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
type: TemplateScalarType;
|
|
42
|
+
}[];
|
|
43
|
+
value: TemplateArrayRow[];
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
type: import('../../../documents/editor/templateVariables').TemplateFormType;
|
|
47
|
+
defaultValue: string;
|
|
48
|
+
} | {
|
|
49
|
+
value: string;
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
type: import('../../../documents/editor/templateVariables').TemplateFormType;
|
|
53
|
+
defaultValue: string;
|
|
54
|
+
})[];
|
|
55
|
+
/**
|
|
56
|
+
* Only the fields whose `{{id}}` (or `{{#each id}}`) token appears in `text` —
|
|
57
|
+
* i.e. the variables a single block actually uses. Same token pattern as
|
|
58
|
+
* templateVariables' collectUsedTokenIds.
|
|
59
|
+
*/
|
|
60
|
+
export declare function formFieldsUsedInText(text: string, forms: TemplateFormField[]): TemplateFormField[];
|
|
61
|
+
/**
|
|
62
|
+
* AI-fill only the variables a block's text uses, writing the generated values
|
|
63
|
+
* onto root.data.formFields — the block text itself (with its {{tokens}}) is
|
|
64
|
+
* left untouched. Returns null when the text uses no variables (caller falls
|
|
65
|
+
* back to generating the text), false when the request failed (already
|
|
66
|
+
* toasted), true once values are written.
|
|
67
|
+
*/
|
|
68
|
+
export declare function fillTextFormFieldsWithAi(prompt: string, text: string, extraContext?: Record<string, unknown>): Promise<boolean | null>;
|
|
69
|
+
export declare function requestRichTextAi(prompt: string, content: string, fieldId?: string): Promise<string | null>;
|
|
31
70
|
/**
|
|
32
71
|
* One prompt → values for every field. Returns null (after toasting) when the
|
|
33
|
-
* request fails or yields nothing usable.
|
|
72
|
+
* request fails or yields nothing usable; null silently when `signal` aborts it.
|
|
34
73
|
*/
|
|
35
|
-
export declare function requestAiFill(prompt: string, fields: AiTargetField[]): Promise<AiValue[] | null>;
|
|
74
|
+
export declare function requestAiFill(prompt: string, fields: AiTargetField[], signal?: AbortSignal, extraContext?: Record<string, unknown>): Promise<AiValue[] | null>;
|
|
36
75
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A `{{token}}` typed anywhere on the page becomes a variable right away — not
|
|
3
|
+
* only once the page is saved as a template. Appends a field for every scalar
|
|
4
|
+
* token with no matching form field. Once added it's no longer "missing", so
|
|
5
|
+
* this can't loop. Mounted from the always-present inspector drawer so the
|
|
6
|
+
* variable already exists when the Variables tab is opened.
|
|
7
|
+
*/
|
|
8
|
+
export default function useAutoRegisterTokenFields(): void;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* (our injected integration block, stray <script>/<noscript> tags).
|
|
5
|
-
*/
|
|
6
|
-
export declare function buildIframeSrcDoc(pageHtml: string): string;
|
|
1
|
+
export declare function buildIframeSrcDoc(pageHtml: string, opts?: {
|
|
2
|
+
ppTheme?: 'light' | 'dark';
|
|
3
|
+
}): string;
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { TReaderDocument } from '../../../email-builder-core/index.ts';
|
|
2
|
-
export
|
|
2
|
+
export type PreviewPpTheme = 'light' | 'dark';
|
|
3
|
+
/** Resolve the editor preview preference to a concrete theme for iframes (they cannot inherit). */
|
|
4
|
+
export declare function resolvePreviewTheme(pref: 'light' | 'dark' | 'follow'): PreviewPpTheme;
|
|
5
|
+
/**
|
|
6
|
+
* `resolvePreviewTheme` for components that bake the result into an iframe's
|
|
7
|
+
* HTML. In `follow` mode the plain function reads `<html data-theme>` only once
|
|
8
|
+
* per render, so a memoized srcDoc keeps the OLD theme after the app switches
|
|
9
|
+
* light/dark (the live canvas updates, the static iframe doesn't). Reading the
|
|
10
|
+
* MUI palette mode makes the caller re-render — and the HTML rebuild — whenever
|
|
11
|
+
* the app theme changes.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useResolvedPreviewTheme(): PreviewPpTheme;
|
|
14
|
+
export declare function ensureFullHtmlDocument(html: string, opts?: {
|
|
15
|
+
ppTheme?: PreviewPpTheme;
|
|
16
|
+
}): string;
|
|
3
17
|
export declare function getBodyMarkup(html: string): string;
|
|
4
|
-
export declare function PagePreviewFrame({ savedContent, document, fallbackHeight, }: {
|
|
18
|
+
export declare function PagePreviewFrame({ savedContent, document, fallbackHeight, onInternalNavigate, }: {
|
|
5
19
|
savedContent?: string | null;
|
|
6
20
|
document: TReaderDocument;
|
|
7
21
|
fallbackHeight?: number | string;
|
|
22
|
+
onInternalNavigate?: (href: string) => void;
|
|
8
23
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
24
|
export default PagePreviewFrame;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const TruncatedEditorTitle: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "
|
|
2
|
-
export declare const SettingLabelTypography: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "
|
|
1
|
+
export declare const TruncatedEditorTitle: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "border" | "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "paddingBottom" | "align" | "bgcolor" | "borderTop" | "px" | "boxShadow" | "overflow" | "variant" | "paddingX" | "paddingY" | "marginX" | "marginY" | "maxWidth" | "maxHeight" | "classes" | "sx" | "letterSpacing" | "order" | "visibility" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderLeft" | "borderRight" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "py" | "typography" | "displayPrint" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
2
|
+
export declare const SettingLabelTypography: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "border" | "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "paddingBottom" | "align" | "bgcolor" | "borderTop" | "px" | "boxShadow" | "overflow" | "variant" | "paddingX" | "paddingY" | "marginX" | "marginY" | "maxWidth" | "maxHeight" | "classes" | "sx" | "letterSpacing" | "order" | "visibility" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderLeft" | "borderRight" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "py" | "typography" | "displayPrint" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
3
3
|
export declare const widthUnitSelectSx: {
|
|
4
4
|
'& .MuiOutlinedInput-notchedOutline': {
|
|
5
5
|
border: string;
|
|
@@ -100,6 +100,10 @@ declare const EmailLayoutPropsSchema: z.ZodObject<{
|
|
|
100
100
|
}, z.core.$strip>>>;
|
|
101
101
|
canvasColor: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>>;
|
|
102
102
|
textColor: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>;
|
|
103
|
+
hostTheme: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
104
|
+
light: "light";
|
|
105
|
+
follow: "follow";
|
|
106
|
+
}>>>;
|
|
103
107
|
fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
104
108
|
MODERN_SANS: "MODERN_SANS";
|
|
105
109
|
BOOK_SANS: "BOOK_SANS";
|
|
@@ -2,6 +2,10 @@ import { z } from 'zod';
|
|
|
2
2
|
declare const MenuPropsSchema: 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 MenuPropsSchema: 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>>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare const StyledDialog: import('@emotion/styled').StyledComponent<import('@mui/material').DialogProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
2
|
-
export declare const StyledDialogTitle: import('@emotion/styled').StyledComponent<import('@mui/material').DialogTitleOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "
|
|
2
|
+
export declare const StyledDialogTitle: import('@emotion/styled').StyledComponent<import('@mui/material').DialogTitleOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "border" | "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "paddingBottom" | "align" | "bgcolor" | "borderTop" | "px" | "boxShadow" | "overflow" | "variant" | "paddingX" | "paddingY" | "marginX" | "marginY" | "maxWidth" | "maxHeight" | "classes" | "sx" | "letterSpacing" | "order" | "visibility" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderLeft" | "borderRight" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "py" | "typography" | "displayPrint" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
3
3
|
export declare const CloseButton: import('@emotion/styled').StyledComponent<import('@mui/material').SvgIconOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').SVGProps<SVGSVGElement>, "style" | "children" | "className" | "fontSize" | "color" | "classes" | "htmlColor" | "inheritViewBox" | "shapeRendering" | "sx" | "titleAccess" | "viewBox"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
4
4
|
export declare const TabsBar: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
5
5
|
export declare const StyledTabs: import('@emotion/styled').StyledComponent<import('@mui/material').TabsOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "value" | "style" | "children" | "className" | "orientation" | "textColor" | "action" | "variant" | "classes" | "sx" | "aria-label" | "aria-labelledby" | "onChange" | "slots" | "slotProps" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "visibleScrollbar"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
6
6
|
export declare const StyledDialogContent: import('@emotion/styled').StyledComponent<import('@mui/material').DialogContentProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
7
|
-
export declare const HelperText: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "
|
|
8
|
-
export declare const FileSummaryText: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "
|
|
7
|
+
export declare const HelperText: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "border" | "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "paddingBottom" | "align" | "bgcolor" | "borderTop" | "px" | "boxShadow" | "overflow" | "variant" | "paddingX" | "paddingY" | "marginX" | "marginY" | "maxWidth" | "maxHeight" | "classes" | "sx" | "letterSpacing" | "order" | "visibility" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderLeft" | "borderRight" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "py" | "typography" | "displayPrint" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
8
|
+
export declare const FileSummaryText: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "border" | "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "paddingBottom" | "align" | "bgcolor" | "borderTop" | "px" | "boxShadow" | "overflow" | "variant" | "paddingX" | "paddingY" | "marginX" | "marginY" | "maxWidth" | "maxHeight" | "classes" | "sx" | "letterSpacing" | "order" | "visibility" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderLeft" | "borderRight" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "py" | "typography" | "displayPrint" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
9
9
|
export declare const ErrorAlert: import('@emotion/styled').StyledComponent<import('@mui/material').AlertProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
10
10
|
export declare const PasteTextFieldSx: {
|
|
11
11
|
readonly '& textarea': {
|
|
@@ -15,15 +15,15 @@ export declare const PasteTextFieldSx: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const UploadDropzone: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
17
17
|
export declare const UploadIcon: import('@emotion/styled').StyledComponent<import('@mui/material').SvgIconOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').SVGProps<SVGSVGElement>, "style" | "children" | "className" | "fontSize" | "color" | "classes" | "htmlColor" | "inheritViewBox" | "shapeRendering" | "sx" | "titleAccess" | "viewBox"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
18
|
-
export declare const ChooseFileLabel: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "
|
|
18
|
+
export declare const ChooseFileLabel: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "border" | "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "paddingBottom" | "align" | "bgcolor" | "borderTop" | "px" | "boxShadow" | "overflow" | "variant" | "paddingX" | "paddingY" | "marginX" | "marginY" | "maxWidth" | "maxHeight" | "classes" | "sx" | "letterSpacing" | "order" | "visibility" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderLeft" | "borderRight" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "py" | "typography" | "displayPrint" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
19
19
|
export declare const SheetPickerWrap: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
20
20
|
export declare const SheetPickerCard: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
|
|
21
21
|
selected?: boolean;
|
|
22
22
|
}, {}, {}>;
|
|
23
|
-
export declare const SheetPickerLabel: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "
|
|
23
|
+
export declare const SheetPickerLabel: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "border" | "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "paddingBottom" | "align" | "bgcolor" | "borderTop" | "px" | "boxShadow" | "overflow" | "variant" | "paddingX" | "paddingY" | "marginX" | "marginY" | "maxWidth" | "maxHeight" | "classes" | "sx" | "letterSpacing" | "order" | "visibility" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderLeft" | "borderRight" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "py" | "typography" | "displayPrint" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
|
|
24
24
|
selected?: boolean;
|
|
25
25
|
}, {}, {}>;
|
|
26
|
-
export declare const SheetPickerMeta: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "
|
|
26
|
+
export declare const SheetPickerMeta: import('@emotion/styled').StyledComponent<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "border" | "top" | "bottom" | "right" | "left" | "padding" | "margin" | "style" | "lineHeight" | "children" | "className" | "fontSize" | "fontFamily" | "fontWeight" | "fontStyle" | "textAlign" | "marginBottom" | "width" | "height" | "borderRadius" | "borderColor" | "gap" | "p" | "color" | "flex" | "display" | "position" | "paddingBottom" | "align" | "bgcolor" | "borderTop" | "px" | "boxShadow" | "overflow" | "variant" | "paddingX" | "paddingY" | "marginX" | "marginY" | "maxWidth" | "maxHeight" | "classes" | "sx" | "letterSpacing" | "order" | "visibility" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderLeft" | "borderRight" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "py" | "typography" | "displayPrint" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
|
|
27
27
|
selected?: boolean;
|
|
28
28
|
}, {}, {}>;
|
|
29
29
|
export declare const StyledDialogActions: import('@emotion/styled').StyledComponent<import('@mui/material').DialogActionsProps & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
* Resize handles for <table>s inside the rich-text editor: drag a column
|
|
10
|
+
* border to resize the two adjacent columns, drag the right edge to resize
|
|
11
|
+
* the whole table, or use the width presets under the table. Column widths
|
|
12
|
+
* live on the first row's cells with `table-layout: fixed`, so every row
|
|
13
|
+
* follows them and the stored HTML renders the same once published.
|
|
14
|
+
* Portal'd to document.body so it escapes overflow/transform parents.
|
|
15
|
+
*/
|
|
16
|
+
export declare function TableResizeOverlay({ editorEl, open, onMutate }: Props): React.ReactPortal;
|
|
17
|
+
export {};
|
|
@@ -33,14 +33,16 @@ export type BlockTemplateConfiguration = {
|
|
|
33
33
|
* type's own child-id layout) into a flat `{ id: block }` map.
|
|
34
34
|
*/
|
|
35
35
|
export declare function collectBlockSubtree(document: BlockMap, rootBlockId: string): BlockMap;
|
|
36
|
+
export declare function extractFormFieldsFromBlocks(blocks: BlockMap, rootBlockId: string): FormField[];
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
38
|
+
* Scalar `{{id}}` tokens present in the live document that have no matching
|
|
39
|
+
* root form field yet — returned as ready-to-append field objects. Lets the
|
|
40
|
+
* Variables panel surface a freshly-typed token immediately instead of only
|
|
41
|
+
* after "Save as template" runs `extractFormFieldsFromBlocks`.
|
|
42
|
+
* Repeat (array) fields are never auto-created here; they come from the
|
|
43
|
+
* explicit repeatable-container flow.
|
|
42
44
|
*/
|
|
43
|
-
export declare function
|
|
45
|
+
export declare function detectMissingScalarFields(document: BlockMap, forms: FormField[]): FormField[];
|
|
44
46
|
/**
|
|
45
47
|
* Convert one live root field into an authoring field for the template dialog.
|
|
46
48
|
* Only the DEFINITION is kept (id, name, type, itemFields, target blocks);
|