@useinsider/guido 3.11.0 → 3.12.0-beta.1b68f97

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.
Files changed (66) hide show
  1. package/README.md +33 -0
  2. package/dist/@types/config/schemas.js +131 -98
  3. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
  4. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
  5. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
  6. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
  7. package/dist/components/organisms/header/EditorActions.vue.js +1 -1
  8. package/dist/components/organisms/header/HeaderWrapper.vue.js +3 -3
  9. package/dist/components/organisms/header/HeaderWrapper.vue2.js +2 -0
  10. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
  11. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +11 -10
  12. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  13. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +6 -6
  14. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +20 -23
  15. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  16. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +8 -7
  17. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
  18. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +2 -2
  19. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  20. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +9 -9
  21. package/dist/composables/useModuleDynamicContentRepair.js +37 -0
  22. package/dist/composables/usePreviewInteractionGuard.js +36 -11
  23. package/dist/composables/useRecommendationPreview.js +61 -60
  24. package/dist/composables/useSave.js +43 -24
  25. package/dist/composables/useStripo.js +70 -67
  26. package/dist/composables/validators/useAllowlistValidator.js +31 -0
  27. package/dist/config/migrator/index.js +7 -6
  28. package/dist/config/migrator/socialIconMigrator.js +29 -0
  29. package/dist/enums/academy.js +1 -1
  30. package/dist/enums/date.js +3 -4
  31. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +43 -41
  32. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  33. package/dist/extensions/Blocks/Recommendation/controls/blockBackground/index.js +10 -0
  34. package/dist/extensions/Blocks/Recommendation/extension.js +23 -21
  35. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +41 -40
  36. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
  37. package/dist/extensions/Blocks/controlFactories.js +125 -75
  38. package/dist/guido.css +1 -1
  39. package/dist/node_modules/valibot/dist/index.js +148 -112
  40. package/dist/src/@types/config/schemas.d.ts +59 -0
  41. package/dist/src/@types/generic.d.ts +18 -0
  42. package/dist/src/composables/useConfig.d.ts +10 -0
  43. package/dist/src/composables/useModuleDynamicContentRepair.d.ts +18 -0
  44. package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
  45. package/dist/src/composables/validators/useAllowlistValidator.d.ts +9 -0
  46. package/dist/src/config/migrator/socialIconMigrator.d.ts +1 -0
  47. package/dist/src/enums/academy.d.ts +3 -3
  48. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  49. package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +14 -0
  50. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  51. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
  52. package/dist/src/extensions/Blocks/controlFactories.d.ts +36 -0
  53. package/dist/src/library.d.ts +1 -1
  54. package/dist/src/stores/config.d.ts +90 -0
  55. package/dist/src/utils/dynamicContentConverter.d.ts +27 -0
  56. package/dist/src/utils/environmentUtil.d.ts +5 -2
  57. package/dist/src/utils/genericUtil.d.ts +18 -1
  58. package/dist/src/utils/urlSchemes.d.ts +6 -0
  59. package/dist/utils/dateUtil.js +10 -23
  60. package/dist/utils/dynamicContentConverter.js +31 -0
  61. package/dist/utils/environmentUtil.js +3 -2
  62. package/dist/utils/genericUtil.js +42 -21
  63. package/dist/utils/urlSchemes.js +4 -0
  64. package/package.json +10 -1
  65. package/dist/src/composables/useHtmlValidator.test.d.ts +0 -1
  66. package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +0 -1
@@ -5,7 +5,9 @@
5
5
  * All types are inferred from these schemas to ensure single source of truth.
6
6
  * @module @types/config/schemas
7
7
  */
8
+ import type { DynamicContentNode } from '../generic';
8
9
  import type { SavedTemplateDetails } from '../stripo';
10
+ import type { ActionButton } from '../toaster';
9
11
  import * as v from 'valibot';
10
12
  /**
11
13
  * Handler function for external validation before save
@@ -13,6 +15,18 @@ import * as v from 'valibot';
13
15
  * @returns Promise<boolean> - true if valid, false to cancel save
14
16
  */
15
17
  export type ExternalValidationHandler = (data: Omit<SavedTemplateDetails, 'metadata'>) => Promise<boolean>;
18
+ /**
19
+ * Content for the domain-allowlist block toaster, supplied by the host. The host owns
20
+ * role-gating, the settings deep-link, and translated copy; Guido renders the result via
21
+ * its own toaster. `actionButton.onClick` runs the host action (e.g. the "Add to allowlist"
22
+ * deep-link). Returning null/void blocks the save with no toaster.
23
+ * @param blockedDomains - the non-allowlisted domains found in the template
24
+ */
25
+ export interface AllowlistToastContent {
26
+ message: string;
27
+ actionButton?: ActionButton;
28
+ }
29
+ export type ResolveAllowlistToastHandler = (blockedDomains: string[]) => AllowlistToastContent | null | void;
16
30
  /**
17
31
  * Message type constants for email templates
18
32
  */
@@ -86,6 +100,21 @@ export declare const DynamicContentSchema: v.ObjectSchema<{
86
100
  readonly value: v.StringSchema<undefined>;
87
101
  }, undefined>, undefined>;
88
102
  }, undefined>;
103
+ /**
104
+ * A node in the partner-keyed dynamic-content tree (backend categorized-fields
105
+ * shape). Loose so the many extra backend fields pass through untouched; Guido
106
+ * only reads text/tag_text/value and recurses children/select_items.
107
+ */
108
+ export declare const DynamicContentNodeSchema: v.GenericSchema<DynamicContentNode>;
109
+ /**
110
+ * Partner-keyed dynamic-content list: `{ [partnerName]: DynamicContentNode[] }`.
111
+ * Architect is multi-partner, so the raw structure is keyed by partner name.
112
+ *
113
+ * Per-entry `fallback`: the raw backend payload may carry non-array metadata
114
+ * keys, so a value that is not a node array degrades to `[]` instead of failing
115
+ * the whole config validation (the repair feature is fail-open).
116
+ */
117
+ export declare const DynamicContentListSchema: v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithFallback<v.ArraySchema<v.GenericSchema<DynamicContentNode>, undefined>, readonly []>, undefined>;
89
118
  /**
90
119
  * Legacy recommendation block config (v1 format) keyed by block ID.
91
120
  *
@@ -227,6 +256,13 @@ export declare const TemplateSchema: v.ObjectSchema<{
227
256
  readonly value: v.StringSchema<undefined>;
228
257
  }, undefined>, undefined>;
229
258
  }, undefined>, undefined>, readonly []>;
259
+ /**
260
+ * Partner-keyed set of dynamic-content items the account offers, e.g.
261
+ * `{ [partnerName]: [{ text, value, children }] }`. Guido flattens the active
262
+ * (first) partner's leaf attributes into the label→token map that repairs
263
+ * label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
264
+ */
265
+ readonly dynamicContentList: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithFallback<v.ArraySchema<v.GenericSchema<DynamicContentNode>, undefined>, readonly []>, undefined>, {}>;
230
266
  /** Valid custom field attribute names from the partner's categorized fields */
231
267
  readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
232
268
  /** Selected unsubscribe page IDs */
@@ -354,6 +390,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
354
390
  readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
355
391
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
356
392
  readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
393
+ /** Enable pre-save domain-allowlist validation (opt-in; host supplies the block toaster via callbacks.resolveAllowlistToast) */
394
+ readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
357
395
  }, undefined>;
358
396
  /**
359
397
  * Default block types available in Stripo
@@ -559,6 +597,12 @@ export declare const CallbacksSchema: v.ObjectSchema<{
559
597
  * Return false to cancel the save operation.
560
598
  */
561
599
  readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
600
+ /**
601
+ * Resolves the block toaster's content when the domain-allowlist check (features.allowlistEnabled)
602
+ * blocks a save. Host-supplied so role-gating, the settings deep-link, and copy stay host-side.
603
+ * Returning null/void blocks the save with no toaster.
604
+ */
605
+ readonly resolveAllowlistToast: v.OptionalSchema<v.CustomSchema<ResolveAllowlistToastHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
562
606
  }, undefined>;
563
607
  /**
564
608
  * Complete Guido configuration schema
@@ -622,6 +666,13 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
622
666
  readonly value: v.StringSchema<undefined>;
623
667
  }, undefined>, undefined>;
624
668
  }, undefined>, undefined>, readonly []>;
669
+ /**
670
+ * Partner-keyed set of dynamic-content items the account offers, e.g.
671
+ * `{ [partnerName]: [{ text, value, children }] }`. Guido flattens the active
672
+ * (first) partner's leaf attributes into the label→token map that repairs
673
+ * label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
674
+ */
675
+ readonly dynamicContentList: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithFallback<v.ArraySchema<v.GenericSchema<DynamicContentNode>, undefined>, readonly []>, undefined>, {}>;
625
676
  /** Valid custom field attribute names from the partner's categorized fields */
626
677
  readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
627
678
  /** Selected unsubscribe page IDs */
@@ -734,6 +785,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
734
785
  readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
735
786
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
736
787
  readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
788
+ /** Enable pre-save domain-allowlist validation (opt-in; host supplies the block toaster via callbacks.resolveAllowlistToast) */
789
+ readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
737
790
  }, undefined>, {}>;
738
791
  /** Block configuration */
739
792
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -804,5 +857,11 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
804
857
  * Return false to cancel the save operation.
805
858
  */
806
859
  readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
860
+ /**
861
+ * Resolves the block toaster's content when the domain-allowlist check (features.allowlistEnabled)
862
+ * blocks a save. Host-supplied so role-gating, the settings deep-link, and copy stay host-side.
863
+ * Returning null/void blocks the save with no toaster.
864
+ */
865
+ readonly resolveAllowlistToast: v.OptionalSchema<v.CustomSchema<ResolveAllowlistToastHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
807
866
  }, undefined>, {}>;
808
867
  }, undefined>;
@@ -13,6 +13,24 @@ export type BaseDynamicContent = {
13
13
  export type DynamicContent = BaseDynamicContent & {
14
14
  text: string;
15
15
  };
16
+ /**
17
+ * A node in the partner-keyed dynamic-content tree (backend categorized-fields
18
+ * shape). Category nodes carry `children`/`select_items`; leaf nodes are the
19
+ * real attributes. Extra backend fields are allowed and ignored.
20
+ */
21
+ export type DynamicContentNode = {
22
+ text?: string;
23
+ tag_text?: string;
24
+ value?: string;
25
+ children?: DynamicContentNode[];
26
+ select_items?: DynamicContentNode[];
27
+ };
28
+ /**
29
+ * Partner-keyed dynamic-content list. Architect is multi-partner, so the map is
30
+ * keyed by partner name; each entry is that partner's category tree. Guido
31
+ * flattens the active (first) partner's leaf attributes into a `DynamicContent[]`.
32
+ */
33
+ export type DynamicContentList = Record<string, DynamicContentNode[]>;
16
34
  export type MergeTag = BaseDynamicContent & {
17
35
  label: string;
18
36
  selStart?: number;
@@ -34,6 +34,9 @@ export declare const useConfig: () => {
34
34
  value: string;
35
35
  } | undefined;
36
36
  }[];
37
+ dynamicContentList: {
38
+ [x: string]: import("../library").DynamicContentNode[];
39
+ };
37
40
  customFieldAttributes: string[];
38
41
  selectedUnsubscribePages: number[];
39
42
  forceRecreate: boolean;
@@ -93,6 +96,7 @@ export declare const useConfig: () => {
93
96
  modulesDisabled: boolean;
94
97
  liquidSyntax: boolean;
95
98
  autosave: boolean;
99
+ allowlistEnabled: boolean;
96
100
  };
97
101
  blocks: {
98
102
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -132,6 +136,7 @@ export declare const useConfig: () => {
132
136
  };
133
137
  callbacks: {
134
138
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
139
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
135
140
  };
136
141
  } | null>;
137
142
  initialized: import("vue").Ref<boolean>;
@@ -162,6 +167,9 @@ export declare const useConfig: () => {
162
167
  value: string;
163
168
  } | undefined;
164
169
  }[];
170
+ dynamicContentList: {
171
+ [x: string]: import("../library").DynamicContentNode[];
172
+ };
165
173
  customFieldAttributes: string[];
166
174
  selectedUnsubscribePages: number[];
167
175
  forceRecreate: boolean;
@@ -221,6 +229,7 @@ export declare const useConfig: () => {
221
229
  modulesDisabled: boolean;
222
230
  liquidSyntax: boolean;
223
231
  autosave: boolean;
232
+ allowlistEnabled: boolean;
224
233
  } | null>;
225
234
  blocks: import("vue").ComputedRef<{
226
235
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -260,6 +269,7 @@ export declare const useConfig: () => {
260
269
  } | null>;
261
270
  callbacks: import("vue").ComputedRef<{
262
271
  externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
272
+ resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
263
273
  } | null>;
264
274
  templateId: import("vue").ComputedRef<string>;
265
275
  userId: import("vue").ComputedRef<string>;
@@ -0,0 +1,18 @@
1
+ import type { ModuleAddData, ModuleModifier } from '@@/Types/stripo';
2
+ /**
3
+ * Host-registered translation key for the "some attributes could not be
4
+ * converted" toaster. Guido resolves it against the host's `window.trans.en`;
5
+ * the copy is registered host-side.
6
+ */
7
+ export declare const UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY = "dynamic-content.unresolved-attributes-on-drop";
8
+ /**
9
+ * Repairs label-form dynamic-content tokens in saved modules as they are dropped
10
+ * or copied into the editor. Saved modules serialize merge-tag chips by their
11
+ * display label (`{{ Phone Number }}`); this maps them back to their canonical
12
+ * token (`{{phone_number}}`) using the account's dynamic-content list.
13
+ *
14
+ * Wired into Stripo via the `onModuleAdd` init callback (see `useStripo`).
15
+ */
16
+ export declare const useModuleDynamicContentRepair: () => {
17
+ handleModuleAdd: (data: ModuleAddData, modifier: ModuleModifier) => void;
18
+ };
@@ -1,3 +1,3 @@
1
1
  export declare const usePreviewInteractionGuard: () => {
2
- blockPreviewInteractions: (iframe: HTMLIFrameElement) => void;
2
+ guardPreviewInteractions: (iframe: HTMLIFrameElement) => void;
3
3
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Pre-save domain-allowlist validation. Extracts every external domain from the compiled
3
+ * HTML/CSS and asks the backend whether each is allowlisted, so an un-allowlisted link can
4
+ * block the save BEFORE anything is persisted. Gated by `features.allowlistEnabled` in
5
+ * `useSave`; the block toaster is rendered by Guido from host-supplied content.
6
+ */
7
+ export declare const useAllowlistValidator: () => {
8
+ getBlockedDomains: (html: string, css: string) => Promise<string[]>;
9
+ };
@@ -0,0 +1 @@
1
+ export declare function migrateSocialIcons(html: string): string;
@@ -5,8 +5,8 @@
5
5
  * for easy maintenance and domain migration.
6
6
  */
7
7
  export declare const ACADEMY_LINKS: {
8
- readonly EMAIL_EDITOR: "https://academy.insiderone.com//docs/email-drag-and-drop-editor";
9
- readonly GLOBAL_UNSUBSCRIBE: "https://academy.insiderone.com//docs/global-unsubscribe-preference-center";
10
- readonly AMP_FOR_EMAILS: "https://academy.insiderone.com//docs/amp-for-emails";
8
+ readonly EMAIL_EDITOR: "https://academy.insiderone.com/docs/email-drag-and-drop-editor";
9
+ readonly GLOBAL_UNSUBSCRIBE: "https://academy.insiderone.com/docs/global-unsubscribe-preference-center";
10
+ readonly AMP_FOR_EMAILS: "https://academy.insiderone.com/docs/amp-for-emails";
11
11
  };
12
12
  export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
@@ -3,6 +3,7 @@
3
3
  * These IDs are returned by the getId() method of each control
4
4
  */
5
5
  export declare enum RecommendationControlId {
6
+ BLOCK_BACKGROUND = "recommendation-block-background-color-control",
6
7
  BUTTON_ALIGN = "recommendation-block-button-align-control",
7
8
  BUTTON_BORDER = "recommendation-block-button-border-control",
8
9
  BUTTON_BORDER_RADIUS = "recommendation-block-button-border-radius-control",
@@ -0,0 +1,14 @@
1
+ export declare const BlockBackgroundColorControl: {
2
+ new (): {
3
+ getId(): string;
4
+ getLabels(): {
5
+ title: string;
6
+ };
7
+ getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
8
+ getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
9
+ getParentControlId(): string;
10
+ api: import("@stripoinc/ui-editor-extensions").ControlApi;
11
+ getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
12
+ isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
13
+ };
14
+ };
@@ -20,6 +20,7 @@ export { ButtonControls } from './button';
20
20
  export { ImageControls } from './image';
21
21
  export { CustomAttributeControls } from './customAttribute';
22
22
  export { SpacingControl, SPACING_CONTROL_ID } from './spacing';
23
+ export { BlockBackgroundColorControl } from './blockBackground';
23
24
  export { CardBackgroundColorControl, CARD_BACKGROUND_COLOR_CONTROL_ID } from './cardBackground';
24
25
  export { RecommendationCardCompositionControl, COMPOSITION_CONTROL_BLOCK_ID } from './cardComposition';
25
26
  export { SyncInfoMessageControl, SYNC_INFO_MESSAGE_CONTROL_ID } from './syncInfoMessage';
@@ -9,3 +9,4 @@ export declare const DATA_ATTRIBUTES: {
9
9
  readonly BLOCK_ID: "data-unsubscribe-block-id";
10
10
  };
11
11
  export declare const UNSUBSCRIBE_BLOCK_SELECTOR = ".unsubscribe-block-v2";
12
+ export declare const UNSUBSCRIBE_LINK_SELECTOR = "a[data-unsubscribe-link=\"true\"], a.unsubscribe-link";
@@ -115,6 +115,42 @@ export declare function createTextBackgroundColorControl(controlId: string, targ
115
115
  isVisible(_node: ImmutableHtmlNode): boolean;
116
116
  };
117
117
  };
118
+ /**
119
+ * Factory for a background-color control that paints a whole extension block (SD-145082).
120
+ *
121
+ * Base is `ButtonBackgroundColorBuiltInControl` because its `GENERAL.BACKGROUND_COLOR` form key
122
+ * round-trips through `getValues()`; the block-text base (`TextBlockBackgroundBuiltInControl`, the
123
+ * built-in this replaces) reports `textBlockBackgroundColor`, which our read path never sees. That
124
+ * borrowed base targets the block's Buy buttons, so `getTargetNodes` here is a GUARD that keeps it
125
+ * off the buttons — not the write path.
126
+ *
127
+ * The write is entirely ours (`getAdditionalModifications`): Stripo's built-in emits a stylesheet
128
+ * rule that inline styles from regeneration outrank (SD-143023), so it would silently no-op on the
129
+ * next edit. We write inline `background-color` + `bgcolor` on the block `<td>` instead — surviving
130
+ * regeneration and reaching Outlook, matching the migrator's convention.
131
+ */
132
+ export declare function createBlockBackgroundColorControl(controlId: string, blockRootSelector?: string): {
133
+ new (): {
134
+ getId(): string;
135
+ /** The parent control renders its own generic title; restore the block-level wording. */
136
+ getLabels(): {
137
+ title: string;
138
+ };
139
+ /** Guard: redirect the borrowed button parent onto the block `<td>` so it never paints the Buy buttons. */
140
+ getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
141
+ /**
142
+ * Writes the picked background onto the block as an inline style plus a `bgcolor`
143
+ * attribute. This is the whole mechanism, not a mirror: the parent control's own
144
+ * write never reaches the block element (verified at runtime). `bgcolor` is the
145
+ * channel Outlook honours on a `<td>`, and matches what the migrator emits.
146
+ */
147
+ getAdditionalModifications(root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
148
+ getParentControlId(): string;
149
+ api: import("@stripoinc/ui-editor-extensions").ControlApi;
150
+ getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
151
+ isVisible(_node: ImmutableHtmlNode): boolean;
152
+ };
153
+ };
118
154
  /**
119
155
  * Factory function to create paddings controls for different block elements
120
156
  * When targetBlockId and containerSelector are not provided, applies directly to root
@@ -2,4 +2,4 @@ export { default as Guido } from './components/Guido.vue';
2
2
  export type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, TemplateMigrationConfig, LegacyRecommendationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, DynamicContent, EmailHeader, DefaultBlockType, CustomBlockType, ValidationResult, ValidationError, } from './@types/config';
3
3
  export { validateConfig, parseConfig, parseConfigSafe, isValidConfig, getValidationErrors, MessageType, ProductType, } from './@types/config';
4
4
  export type { StripoEventType } from './@types/events';
5
- export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
5
+ export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';