@useinsider/guido 3.12.0-beta.00cbb4c → 3.12.0-beta.0c096f0

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 (27) hide show
  1. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
  2. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
  3. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
  4. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
  5. package/dist/components/organisms/header/ViewOptions.vue.js +3 -3
  6. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +1 -1
  7. package/dist/composables/usePreviewInteractionGuard.js +36 -11
  8. package/dist/composables/useRecommendationPreview.js +61 -60
  9. package/dist/config/compiler/outlookCompilerRules.js +21 -8
  10. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  11. package/dist/extensions/Blocks/Recommendation/controls/blockBackground/index.js +10 -0
  12. package/dist/extensions/Blocks/Recommendation/extension.js +23 -21
  13. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +41 -40
  14. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
  15. package/dist/extensions/Blocks/controlFactories.js +125 -75
  16. package/dist/guido.css +1 -1
  17. package/dist/services/stripoApi.js +18 -18
  18. package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
  19. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  20. package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +14 -0
  21. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  22. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
  23. package/dist/src/extensions/Blocks/controlFactories.d.ts +36 -0
  24. package/dist/src/utils/urlSchemes.d.ts +6 -0
  25. package/dist/static/styles/components/base-input.css.js +6 -7
  26. package/dist/utils/urlSchemes.js +4 -0
  27. package/package.json +2 -2
@@ -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
@@ -0,0 +1,6 @@
1
+ /**
2
+ * URL schemes that are safe to follow from partner-authored email HTML. Shared so a
3
+ * future bypass fix lands in one place — the preview guard and the recommendation
4
+ * sanitizer both gate on it. Stored with the trailing colon to match `anchor.protocol`.
5
+ */
6
+ export declare const BASE_SAFE_URL_SCHEMES: readonly string[];
@@ -3,8 +3,12 @@ const n = `.base-input {
3
3
  border-radius: 4px;
4
4
  background-color: var(--guido-color-gray-0);
5
5
  align-items: center;
6
- height: 40px;
7
- max-height: 40px;
6
+ /* 40px is a floor, never a cap: \`.base-input\` is shared by every settings field,
7
+ including Stripo's own auto-height inputs (e.g. the link field) that expand on
8
+ focus. A fixed max-height clamped their inner box; keep 40px only as the floor. */
9
+ min-height: 40px;
10
+ height: auto;
11
+ max-height: none;
8
12
  box-sizing: content-box;
9
13
  outline: none;
10
14
  resize: vertical;
@@ -36,11 +40,6 @@ ue-contenteditable .base-input {
36
40
  line-height: 24px;
37
41
  }
38
42
 
39
- /* Image link input is auto-height; lift the fixed 40px cap so it can grow. */
40
- ue-contenteditable.link-autoheight-contenteditable .base-input {
41
- max-height: none;
42
- }
43
-
44
43
  ue-icon-component.icon-button.icon-clear-input {
45
44
  right: 2px;
46
45
  top: 2px;
@@ -0,0 +1,4 @@
1
+ const t = ["http:", "https:", "mailto:"];
2
+ export {
3
+ t as BASE_SAFE_URL_SCHEMES
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.12.0-beta.00cbb4c",
3
+ "version": "3.12.0-beta.0c096f0",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -44,7 +44,7 @@
44
44
  "license": "ISC",
45
45
  "dependencies": {
46
46
  "@stripoinc/ui-editor-extensions": "3.8.0",
47
- "@useinsider/design-system-vue": "2.0.0",
47
+ "@useinsider/design-system-vue": "1.3.0",
48
48
  "@vueuse/core": "11.3.0",
49
49
  "lodash-es": "4.17.21",
50
50
  "pinia": "2.3.1",