pagepilot-visual-editor 1.0.13 → 1.0.14

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.
@@ -22,6 +22,7 @@ interface PagePublishDialogProps {
22
22
  };
23
23
  injectTabsScrollSyncScript?: boolean;
24
24
  injectCarouselScript?: boolean;
25
+ injectAnimationScript?: boolean;
25
26
  }) => Promise<boolean>;
26
27
  }
27
28
  export default function PagePublishDialog({ open, onClose, record, apiClient, onSubmit, }: PagePublishDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -29,6 +29,8 @@ type Props = {
29
29
  * expose an option that would silently be ignored.
30
30
  */
31
31
  solidOnly?: boolean;
32
+ /** Heading rendered in the reserved top strip, aligned with the close button. */
33
+ title?: string;
32
34
  };
33
- export default function Picker({ value, onChange, onApply, onTransparent, onClose, noneLabel, hideBrandColors, defaultValue, stickyActions, bodyMaxHeight, solidOnly }: Props): import("react/jsx-runtime").JSX.Element;
35
+ export default function Picker({ value, onChange, onApply, onTransparent, onClose, noneLabel, hideBrandColors, defaultValue, stickyActions, bodyMaxHeight, solidOnly, title }: Props): import("react/jsx-runtime").JSX.Element;
34
36
  export {};
@@ -2,6 +2,7 @@ type UseSaveHandlerReturn = {
2
2
  onShowHtml: (type: 'live' | 'draft' | null, options?: {
3
3
  injectTabsScrollSyncScript?: boolean;
4
4
  injectCarouselScript?: boolean;
5
+ injectAnimationScript?: boolean;
5
6
  schedule?: {
6
7
  startDate?: Date | null;
7
8
  endDate?: Date | null;
@@ -16,6 +16,15 @@ type FormField = any;
16
16
  export type BlockTemplateConfiguration = {
17
17
  isIndividualBlock: true;
18
18
  rootBlockId: string;
19
+ /**
20
+ * Every top-level block id in canvas order. Absent (or single-element)
21
+ * for the classic single-block template shape; populated when the author
22
+ * saved a block template whose canvas had additional top-level blocks
23
+ * alongside the primary source (e.g. a Heading placed above the source
24
+ * container). Applying such a template inserts every listed block, not
25
+ * just `rootBlockId`.
26
+ */
27
+ childrenIds?: string[];
19
28
  blocks: BlockMap;
20
29
  formFields: FormField[];
21
30
  };
@@ -41,18 +50,33 @@ export declare function extractFormFieldsFromBlocks(blocks: BlockMap, rootBlockI
41
50
  *
42
51
  * `prefillDefaults` (opt-in) flips this: the field's CURRENT value(s) are
43
52
  * carried over as the dialog's default value(s) instead of being stripped.
44
- * Used by the Variables-panel "Save as new template" shortcut, which captures
45
- * one specific (already-filled-in) instance as a starting template unlike
46
- * the canvas "Save as template" action, which authors a blank, reusable
47
- * template and must stay empty-by-default.
53
+ * Used by the canvas "Save as block" action and the Variables-panel
54
+ * "Save as new template" shortcut, both of which capture an already-filled-in
55
+ * instance as the starting template.
48
56
  */
49
57
  export declare function toAuthoringField(field: FormField, blockIds: Set<string>, prefillDefaults?: boolean): FormField;
50
58
  /**
51
59
  * Merge the live root formFields (filtered to this subtree) with fields
52
60
  * auto-detected from block text, keeping DEFINITIONS only (or prefilled
53
61
  * defaults — see `toAuthoringField`).
62
+ *
63
+ * Relevance rules:
64
+ * • container-repeat (`sourceBlockId`) — always kept iff its source block
65
+ * is in `blockIds` (i.e. the container itself came along in the save).
66
+ * • scalar (no `sourceBlockId`) — see `scopeScalarsToDetected` below.
67
+ *
68
+ * `scopeScalarsToDetected` (opt-in) — when true, a scalar root field only
69
+ * survives if its `{{id}}` token was actually detected inside the saved
70
+ * subtree's text by `extractFormFieldsFromBlocks`. Used exclusively by
71
+ * `buildBlockTemplateConfiguration` (the canvas "Save as block" flow) so a
72
+ * block template captures ONLY the scalars its own subtree renders — not
73
+ * every page-level scalar the author authored elsewhere. Off (default)
74
+ * keeps the historical loose behavior for `deriveFromDocument` (whole-page
75
+ * templates, where any authored scalar is fair game) and for
76
+ * `derivePageInitialFormFields` (which has no document to scan and passes
77
+ * `detectedFields=[]`).
54
78
  */
55
- export declare function buildTemplateFormFields(rootFormFields: FormField[], detectedFields: FormField[], blockIds: Set<string>, prefillDefaults?: boolean): FormField[];
79
+ export declare function buildTemplateFormFields(rootFormFields: FormField[], detectedFields: FormField[], blockIds: Set<string>, prefillDefaults?: boolean, scopeScalarsToDetected?: boolean): FormField[];
56
80
  /** Pull color / font-size out of value HTML (`<font color>` or `style="font-size"`). */
57
81
  export declare function extractInlineStyle(html: string): {
58
82
  color?: string;
@@ -30,4 +30,16 @@ export declare const QUILL_FONT_OPTIONS: {
30
30
  css: string;
31
31
  }[];
32
32
  export declare const QUILL_FONT_WHITELIST: string[];
33
+ export declare const INTER_FONT_FAMILY_VALUE: string;
34
+ /**
35
+ * Normalize `font-family` styles inside pasted HTML against the font list the
36
+ * rich-text picker actually offers. Any family whose first token is not in
37
+ * FONT_FAMILIES is rewritten to Inter (the editor's default) so the pasted
38
+ * content stays readable and consistent with the rest of the document — and
39
+ * the caller can surface a warning listing what was swapped.
40
+ */
41
+ export declare function normalizePastedFontFamilies(html: string): {
42
+ html: string;
43
+ unsupportedFonts: string[];
44
+ };
33
45
  export declare const QUILL_FONT_CSS: string;
@@ -35,7 +35,8 @@ type TOptions = {
35
35
  isBanner?: boolean;
36
36
  injectTabsScrollSyncScript?: boolean;
37
37
  injectCarouselScript?: boolean;
38
+ injectAnimationScript?: boolean;
38
39
  injectFontAssets?: boolean;
39
40
  };
40
- export default function renderToStaticMarkup(document: TReaderDocument, { rootBlockId, seo, injectElementIds, minifyCss, lang, skipLink, accessibilityTools, includePageCSS, headHtml, bodyBottomHtml, isBanner, injectTabsScrollSyncScript, injectCarouselScript, injectFontAssets, }: TOptions): string;
41
+ export default function renderToStaticMarkup(document: TReaderDocument, { rootBlockId, seo, injectElementIds, minifyCss, lang, skipLink, accessibilityTools, includePageCSS, headHtml, bodyBottomHtml, isBanner, injectTabsScrollSyncScript, injectCarouselScript, injectAnimationScript, injectFontAssets, }: TOptions): string;
41
42
  export {};