@useinsider/guido 3.17.0-beta.3ff6ea0 → 3.17.0-beta.6255bfc

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 (76) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +12 -6
  3. package/dist/components/Guido.vue.js +2 -2
  4. package/dist/components/Guido.vue2.js +31 -30
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +18 -0
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +66 -0
  7. package/dist/composables/useCustomInterfaceAppearance.js +52 -38
  8. package/dist/composables/useRecommendation.js +52 -44
  9. package/dist/composables/useStripo.js +14 -14
  10. package/dist/config/migrator/index.js +8 -9
  11. package/dist/config/migrator/recommendation/compositionMapper.js +20 -20
  12. package/dist/config/migrator/recommendation/extractors.js +24 -29
  13. package/dist/config/migrator/recommendation/htmlBuilder.js +130 -116
  14. package/dist/config/migrator/recommendation/settingsMapper.js +19 -17
  15. package/dist/config/migrator/recommendationMigrator.js +15 -16
  16. package/dist/enums/academy.js +2 -1
  17. package/dist/enums/date.js +4 -3
  18. package/dist/enums/extensions/recommendationBlock.js +4 -1
  19. package/dist/extensions/Blocks/Recommendation/block.js +26 -21
  20. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +1 -1
  21. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  22. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +26 -25
  23. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +28 -34
  24. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +256 -323
  25. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +178 -165
  26. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +142 -0
  27. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +0 -1
  28. package/dist/extensions/Blocks/Recommendation/extension.js +29 -31
  29. package/dist/extensions/Blocks/Recommendation/services/configService.js +35 -35
  30. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +4 -23
  31. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +251 -110
  32. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
  33. package/dist/extensions/Blocks/Recommendation/templates/utils.js +107 -85
  34. package/dist/extensions/Blocks/common-control.js +22 -19
  35. package/dist/guido.css +1 -1
  36. package/dist/services/recommendationApi.js +75 -30
  37. package/dist/src/@types/config/schemas.d.ts +12 -0
  38. package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +3 -0
  39. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  40. package/dist/src/composables/useConfig.d.ts +2 -0
  41. package/dist/src/composables/useRecommendation.d.ts +1 -0
  42. package/dist/src/config/migrator/recommendation/extractors.d.ts +0 -8
  43. package/dist/src/enums/academy.d.ts +1 -0
  44. package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
  45. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +1 -2
  46. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +0 -7
  47. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +7 -7
  48. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +2 -2
  49. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -10
  50. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +0 -10
  51. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +0 -1
  52. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +15 -3
  53. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +30 -0
  54. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -1
  55. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +206 -10
  56. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
  57. package/dist/src/extensions/Blocks/common-control.d.ts +4 -1
  58. package/dist/src/mock/api/recommendation-strategies.d.ts +63 -0
  59. package/dist/src/services/recommendationApi.d.ts +4 -1
  60. package/dist/src/stores/config.d.ts +18 -0
  61. package/dist/src/utils/strategyInfoBox.d.ts +22 -0
  62. package/dist/static/assets/icons/line-change.svg.js +5 -0
  63. package/dist/static/assets/icons/line-delete.svg.js +5 -0
  64. package/dist/static/assets/icons/line-plus.svg.js +5 -0
  65. package/dist/static/styles/components/recommendation-strategy.css.js +188 -0
  66. package/dist/static/styles/customEditorStyle.css.js +1 -3
  67. package/dist/utils/dateUtil.js +29 -10
  68. package/dist/utils/strategyInfoBox.js +37 -0
  69. package/dist/utils/templatePreparation.js +37 -34
  70. package/package.json +2 -1
  71. package/dist/config/migrator/recommendationTitleMigrator.js +0 -119
  72. package/dist/extensions/Blocks/Recommendation/controls/title/index.js +0 -44
  73. package/dist/extensions/Blocks/Recommendation/templates/titleRows.js +0 -33
  74. package/dist/src/config/migrator/recommendationTitleMigrator.d.ts +0 -5
  75. package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +0 -86
  76. package/dist/src/extensions/Blocks/Recommendation/templates/titleRows.d.ts +0 -13
@@ -1,7 +1,7 @@
1
1
  import { useActionsApi as k } from "../composables/useActionsApi.js";
2
2
  import { useConfig as U } from "../composables/useConfig.js";
3
3
  import { useHtmlCompiler as x } from "../composables/useHtmlCompiler.js";
4
- import { DEFAULT_CURRENCY as d, DEFAULT_NODE_CONFIG as s } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
4
+ import { DEFAULT_CURRENCY as d, DEFAULT_NODE_CONFIG as a } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
5
5
  import { useRecommendationExtensionStore as C } from "../extensions/Blocks/Recommendation/store/recommendation.js";
6
6
  import { mapLegacyStrategy as L } from "../extensions/Blocks/Recommendation/utils/legacyStrategyMap.js";
7
7
  import { DATA_ATTRIBUTES as A } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
@@ -11,20 +11,20 @@ import { useEditorStore as z } from "../stores/editor.js";
11
11
  import { useUnsubscribeStore as _ } from "../stores/unsubscribe.js";
12
12
  import { assignTrackingIds as v } from "./linkTrackingIds.js";
13
13
  function O(m) {
14
- const n = new DOMParser().parseFromString(m, "text/html").querySelectorAll(`[${A.PAGE_LIST}]`), t = [];
15
- return n.forEach((i) => {
16
- const o = i.getAttribute(A.PAGE_LIST);
14
+ const i = new DOMParser().parseFromString(m, "text/html").querySelectorAll(`[${A.PAGE_LIST}]`), t = [];
15
+ return i.forEach((s) => {
16
+ const o = s.getAttribute(A.PAGE_LIST);
17
17
  o && t.push(...R(o));
18
18
  }), [...new Set(t)];
19
19
  }
20
20
  async function M(m) {
21
- const a = new DOMParser().parseFromString(m, "text/html").querySelectorAll(".recommendation-block-v2");
22
- if (a.length === 0)
21
+ const n = new DOMParser().parseFromString(m, "text/html").querySelectorAll(".recommendation-block-v2");
22
+ if (n.length === 0)
23
23
  return;
24
- const n = C();
25
- a.forEach((t) => {
24
+ const i = C();
25
+ n.forEach((t) => {
26
26
  var r, l, g, f, c;
27
- const i = t.getAttribute("recommendation-id"), o = i ? Number(i) : NaN;
27
+ const s = t.getAttribute("recommendation-id"), o = s ? Number(s) : NaN;
28
28
  if (!Number.isFinite(o))
29
29
  return;
30
30
  const p = t.getAttribute("esd-ext-config");
@@ -42,24 +42,27 @@ async function M(m) {
42
42
  // Normalize legacy strategy keys (e.g. `mostViewed` → `mostPopular`) so
43
43
  // already-saved blocks that never re-run the migrator don't emit a
44
44
  // strategy-less campaign URL. `||` also catches '' / undefined (SD-144882).
45
- strategy: L(e.strategy) || s.strategy,
46
- language: e.language ?? s.language,
47
- size: e.size ?? s.size,
45
+ strategy: L(e.strategy) || a.strategy,
46
+ // esd-ext-config is the source of truth for the assigned RRS —
47
+ // a strategy-backed block must survive save/reopen from it alone.
48
+ strategyId: e.strategyId ?? a.strategyId,
49
+ language: e.language ?? a.language,
50
+ size: e.size ?? a.size,
48
51
  // Spread the default arrays so each block gets a fresh reference
49
52
  // instead of sharing the singleton in DEFAULT_NODE_CONFIG.
50
- productIds: e.productIds ?? [...s.productIds],
51
- filters: e.filters ?? [...s.filters],
52
- shuffleProducts: e.shuffleProducts ?? s.shuffleProducts,
53
+ productIds: e.productIds ?? [...a.productIds],
54
+ filters: e.filters ?? [...a.filters],
55
+ shuffleProducts: e.shuffleProducts ?? a.shuffleProducts,
53
56
  currencyCode: ((r = e.currency) == null ? void 0 : r.code) ?? d.code,
54
57
  currencyAlignment: ((l = e.currency) == null ? void 0 : l.alignment) ?? d.alignment,
55
58
  currencyDecimalCount: ((g = e.currency) == null ? void 0 : g.decimalCount) ?? d.decimalCount,
56
59
  currencyDecimalSeparator: ((f = e.currency) == null ? void 0 : f.decimalSeparator) ?? d.decimalSeparator,
57
60
  currencyThousandSeparator: ((c = e.currency) == null ? void 0 : c.thousandSeparator) ?? d.thousandSeparator
58
61
  };
59
- n.seedBlockUrlConfig(o, h);
62
+ i.seedBlockUrlConfig(o, h);
60
63
  });
61
64
  try {
62
- await n.fetchRecommendationCreateData();
65
+ await i.fetchRecommendationCreateData();
63
66
  } catch (t) {
64
67
  console.warn(
65
68
  "Recommendation reference data pre-load failed; validator will skip the availability check.",
@@ -68,39 +71,39 @@ async function M(m) {
68
71
  }
69
72
  }
70
73
  const Z = () => {
71
- const m = N(), u = z(), a = _(), { getCompiledEmail: n, getTemplateData: t, updateHtmlAndCss: i } = k(), { compileHtml: o, compileAmpHtml: p } = x(), { isFeatureEnabled: e } = U();
74
+ const m = N(), u = z(), n = _(), { getCompiledEmail: i, getTemplateData: t, updateHtmlAndCss: s } = k(), { compileHtml: o, compileAmpHtml: p } = x(), { isFeatureEnabled: e } = U();
72
75
  return {
73
76
  prepareTemplateDetails: async () => {
74
77
  let { html: r, css: l, syncModulesIds: g = [] } = await t();
75
78
  if (e("linkTrackingIds"))
76
79
  try {
77
- const { html: y, changed: H, nextSeq: I } = v(r, u.trackIdSessionFloor);
78
- u.trackIdSessionFloor = I, H && (r = y, await i(y, l));
79
- } catch (y) {
80
- console.error("Tracking-id step failed, saving anyway:", y);
80
+ const { html: S, changed: F, nextSeq: H } = v(r, u.trackIdSessionFloor);
81
+ u.trackIdSessionFloor = H, F && (r = S, await s(S, l));
82
+ } catch (S) {
83
+ console.error("Tracking-id step failed, saving anyway:", S);
81
84
  }
82
- const { html: f, ampHtml: c = "", ampErrors: T = [] } = await n({
85
+ const { html: f, ampHtml: c = "", ampErrors: T = [] } = await i({
83
86
  minimize: !0,
84
87
  resetDataSavedFlag: !1
85
88
  });
86
- a.selectedUnsubscribePages.length && await a.fetchTemplates(), await M(r);
87
- const { compiledHtml: w, stats: S, appliedRules: D } = o(f), E = c && p(c).compiledHtml, P = m.getSelectedDynamicContentList, F = C(), b = O(r);
89
+ n.selectedUnsubscribePages.length && await n.fetchTemplates(), await M(r);
90
+ const { compiledHtml: I, stats: y, appliedRules: w } = o(f), D = c && p(c).compiledHtml, E = m.getSelectedDynamicContentList, P = C(), b = O(r);
88
91
  return console.debug("HTML Compilation Stats:", {
89
- originalSize: S.originalSize,
90
- compiledSize: S.compiledSize,
91
- reduction: `${S.reductionPercentage.toFixed(2)}%`,
92
- appliedRules: D,
93
- executionTime: `${S.executionTime.toFixed(2)}ms`
92
+ originalSize: y.originalSize,
93
+ compiledSize: y.compiledSize,
94
+ reduction: `${y.reductionPercentage.toFixed(2)}%`,
95
+ appliedRules: w,
96
+ executionTime: `${y.executionTime.toFixed(2)}ms`
94
97
  }), {
95
- dynamicContentList: P,
96
- compiledHtml: w,
98
+ dynamicContentList: E,
99
+ compiledHtml: I,
97
100
  rawHtml: r,
98
101
  css: l,
99
- ampHtml: E,
102
+ ampHtml: D,
100
103
  ampErrors: T,
101
104
  modules: g.map(Number),
102
105
  recommendation: {
103
- campaignUrls: F.recommendationCampaignUrls,
106
+ campaignUrls: P.recommendationCampaignUrls,
104
107
  configs: {}
105
108
  },
106
109
  unsubscribe: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.17.0-beta.3ff6ea0",
3
+ "version": "3.17.0-beta.6255bfc",
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",
@@ -48,6 +48,7 @@
48
48
  "license": "ISC",
49
49
  "dependencies": {
50
50
  "@stripoinc/ui-editor-extensions": "3.9.0",
51
+ "@useinsider/design-system-organisms": "0.0.3-beta.fc2c160",
51
52
  "@useinsider/design-system-vue": "1.5.0",
52
53
  "@vueuse/core": "11.3.0",
53
54
  "lodash-es": "4.17.21",
@@ -1,119 +0,0 @@
1
- var R = Object.defineProperty;
2
- var f = (s, t, e) => t in s ? R(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var a = (s, t, e) => f(s, typeof t != "symbol" ? t + "" : t, e);
4
- import { RecommendationBlockId as d } from "../../extensions/Blocks/Recommendation/constants/blockIds.js";
5
- import { BLOCK_ROOT_SELECTOR as u, CSS_CLASS_SKIP_COMPILE as m, ATTR_DATA_ATTRIBUTE_TYPE as S, ATTR_RECOMMENDATION_TITLE as l, CONTAINER_SELECTOR as E, CSS_CLASS_TITLE_CELL as c, CSS_CLASS_SPACER as C, CSS_CLASS_ATTRIBUTE_ROW as A, ATTR_DATA_VISIBILITY as L } from "../../extensions/Blocks/Recommendation/constants/selectors.js";
6
- const p = u.slice(1), g = `${u}:not(.${m})`, O = `[${S}="${l}"]`, h = "td.esd-block-text", _ = "table.container > tbody", T = "esd-ext-config";
7
- class y {
8
- constructor() {
9
- a(this, "parser");
10
- this.parser = new DOMParser();
11
- }
12
- migrate(t) {
13
- try {
14
- if (!t.includes(p))
15
- return t;
16
- const e = this.parser.parseFromString(t, "text/html");
17
- return Array.from(e.querySelectorAll(g)).reduce(
18
- (n, o) => this._migrateBlock(o) || n,
19
- !1
20
- ) ? e.documentElement.outerHTML : t;
21
- } catch (e) {
22
- return console.error("RecommendationTitleMigrator failed:", e), t;
23
- }
24
- }
25
- /** Migrates one block. Returns `true` when the block was changed. */
26
- _migrateBlock(t) {
27
- if (t.querySelector(O) || this._hasRecordedTitleState(t))
28
- return !1;
29
- const e = this._findTitleCell(t), i = e !== null && (e.textContent ?? "").trim().length > 0;
30
- return i ? this._tagExistingTitle(t, e) : this._removeTitleRemnants(t, e), this._writeVisibility(t, i), !0;
31
- }
32
- /** The only `esd-block-text` cell outside the product containers is the title. */
33
- _findTitleCell(t) {
34
- return Array.from(t.querySelectorAll(h)).find((e) => !e.closest(E) && this._isTitlePosition(t, e)) ?? null;
35
- }
36
- _isTitlePosition(t, e) {
37
- var r;
38
- const i = this._wrapperRowOf(t, e);
39
- return e.classList.contains(c) || i !== null && i === ((r = i.parentElement) == null ? void 0 : r.firstElementChild);
40
- }
41
- /**
42
- * Stamps the attribute-row tagging onto the title's wrapper row and the spacer
43
- * below it, so one toggle governs the pair and the compiler drops both when off.
44
- */
45
- _tagExistingTitle(t, e) {
46
- e.classList.add(c), e.setAttribute("esd-extension-block-id", d.TITLE);
47
- const i = this._wrapperRowOf(t, e);
48
- if (!i)
49
- return;
50
- this._tagRow(i);
51
- const r = i.nextElementSibling;
52
- r && this._isSpacerRow(r) && this._tagRow(r);
53
- }
54
- /** The `<tr>` inside `table.container > tbody` that wraps the title's own table. */
55
- _wrapperRowOf(t, e) {
56
- if (!e)
57
- return null;
58
- const i = t.querySelector(_);
59
- return Array.from((i == null ? void 0 : i.children) ?? []).find((r) => r.contains(e)) ?? null;
60
- }
61
- /**
62
- * Direct children only — a product-container row holds spacer cells further down,
63
- * and `querySelector` would happily reach them. (`:scope >` is unsupported in happy-dom.)
64
- */
65
- _isSpacerRow(t) {
66
- return Array.from(t.children).some((e) => e.classList.contains(C));
67
- }
68
- _tagRow(t) {
69
- t.classList.add(A), t.setAttribute(S, l), t.setAttribute(L, "1");
70
- }
71
- /**
72
- * A deleted title leaves nothing to tag — the toggle re-injects the markup only
73
- * when the user switches it back on. Its leftovers (an emptied wrapper row, the
74
- * spacer that trailed it) would otherwise render as blank padding on top.
75
- */
76
- _removeTitleRemnants(t, e) {
77
- var o;
78
- const i = this._wrapperRowOf(t, e), r = i == null ? void 0 : i.nextElementSibling;
79
- if (r && this._isSpacerRow(r) && r.remove(), i) {
80
- i.remove();
81
- return;
82
- }
83
- const n = (o = t.querySelector(_)) == null ? void 0 : o.firstElementChild;
84
- n && this._isSpacerRow(n) && n.remove();
85
- }
86
- /**
87
- * Mirrors the resolved state into the persisted config blob, so a saved module
88
- * whose `data-*` attributes Stripo strips on re-drop still restores the toggle.
89
- */
90
- _writeVisibility(t, e) {
91
- const i = this._readConfig(t);
92
- if (!i)
93
- return;
94
- const r = typeof i.visibility == "object" && i.visibility !== null ? i.visibility : {};
95
- i.visibility = { ...r, [l]: e }, t.setAttribute(T, JSON.stringify(i));
96
- }
97
- _hasRecordedTitleState(t) {
98
- var i;
99
- const e = (i = this._readConfig(t)) == null ? void 0 : i.visibility;
100
- return typeof e == "object" && e !== null && l in e;
101
- }
102
- _readConfig(t) {
103
- const e = t.getAttribute(T);
104
- if (!e)
105
- return null;
106
- try {
107
- const i = JSON.parse(e);
108
- return typeof i == "object" && i !== null ? i : null;
109
- } catch {
110
- return null;
111
- }
112
- }
113
- }
114
- function v(s) {
115
- return new y().migrate(s);
116
- }
117
- export {
118
- v as migrateRecommendationTitle
119
- };
@@ -1,44 +0,0 @@
1
- import { createPaddingsControl as r, createTextBackgroundColorControl as T, createTextFontFamilyControl as e, createTextStyleControl as l, createTextSizeControl as C, createTextColorControl as c, createTextAlignControl as I } from "../../../controlFactories.js";
2
- import { RecommendationBlockId as o } from "../../constants/blockIds.js";
3
- import { RecommendationControlId as t } from "../../constants/controlIds.js";
4
- import { BLOCK_ROOT_SELECTOR as n } from "../../constants/selectors.js";
5
- const L = I(
6
- t.TITLE_ALIGN,
7
- o.TITLE,
8
- n
9
- ), a = c(
10
- t.TITLE_COLOR,
11
- o.TITLE,
12
- n
13
- ), i = C(
14
- t.TITLE_SIZE,
15
- o.TITLE,
16
- n
17
- ), E = l(
18
- t.TITLE_STYLE,
19
- o.TITLE,
20
- n
21
- ), m = e(
22
- t.TITLE_FONT_FAMILY,
23
- o.TITLE,
24
- n
25
- ), s = T(
26
- t.TITLE_BACKGROUND,
27
- o.TITLE,
28
- n
29
- ), d = r(
30
- t.TITLE_PADDINGS,
31
- o.TITLE,
32
- n
33
- ), x = {
34
- align: L,
35
- color: a,
36
- size: i,
37
- style: E,
38
- fontFamily: m,
39
- background: s,
40
- paddings: d
41
- };
42
- export {
43
- x as TitleControls
44
- };
@@ -1,33 +0,0 @@
1
- import { RecommendationBlockId as r } from "../constants/blockIds.js";
2
- import { DEFAULT_ROW_SPACING as l } from "../constants/layout.js";
3
- import { CSS_CLASS_ATTRIBUTE_ROW as d, ATTR_RECOMMENDATION_TITLE as n, ATTR_DATA_VISIBILITY as A, CSS_CLASS_TITLE_CELL as _, CSS_CLASS_SPACER as c } from "../constants/selectors.js";
4
- const a = "You May Also Like!", i = '<p style="font-size: 28px; color: #333333;"><strong>{-{-TITLE-}-}</strong></p>';
5
- function E(s = i, t = !0, T = l) {
6
- const e = `class="${d}" data-attribute-type="${n}" ${A}="${t ? "1" : "0"}"`, o = t ? "" : ' style="display: none;"';
7
- return `
8
- <tr ${e}${o}>
9
- <td>
10
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
11
- <tbody>
12
- <tr>
13
- <td
14
- class="esd-block-text ${_} es-p10t es-p10b es-p20l es-p20r"
15
- align="center"
16
- esd-extension-block-id="${r.TITLE}">
17
- ${s}
18
- </td>
19
- </tr>
20
- </tbody>
21
- </table>
22
- </td>
23
- </tr>
24
- <tr ${e}${o}>
25
- <td class="${c}" style="height: ${T}px;"></td>
26
- </tr>
27
- `;
28
- }
29
- export {
30
- i as DEFAULT_TITLE_PARAGRAPH,
31
- a as DEFAULT_TITLE_TEXT,
32
- E as buildTitleRows
33
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * Runs before the document reaches the editor, so a legacy title is already a
3
- * composition item on the first render — no post-load adoption pass.
4
- */
5
- export declare function migrateRecommendationTitle(html: string): string;
@@ -1,86 +0,0 @@
1
- export declare const TitleControls: {
2
- readonly align: {
3
- new (): {
4
- getId(): string;
5
- getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
6
- getParentControlId(): string;
7
- api: import("@stripoinc/ui-editor-extensions").ControlApi;
8
- getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
9
- getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
10
- 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;
11
- isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
12
- };
13
- };
14
- readonly color: {
15
- new (): {
16
- getId(): string;
17
- getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
18
- getParentControlId(): string;
19
- api: import("@stripoinc/ui-editor-extensions").ControlApi;
20
- getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
21
- getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
22
- 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;
23
- isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
24
- };
25
- };
26
- readonly size: {
27
- new (): {
28
- getId(): string;
29
- getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
30
- getParentControlId(): string;
31
- api: import("@stripoinc/ui-editor-extensions").ControlApi;
32
- getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
33
- getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
34
- 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;
35
- isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
36
- };
37
- };
38
- readonly style: {
39
- new (): {
40
- getId(): string;
41
- getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
42
- getParentControlId(): string;
43
- api: import("@stripoinc/ui-editor-extensions").ControlApi;
44
- getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
45
- getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
46
- 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;
47
- isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
48
- };
49
- };
50
- readonly fontFamily: {
51
- new (): {
52
- getId(): string;
53
- getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
54
- getParentControlId(): string;
55
- api: import("@stripoinc/ui-editor-extensions").ControlApi;
56
- getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
57
- getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
58
- 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;
59
- isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
60
- };
61
- };
62
- readonly background: {
63
- new (): {
64
- getId(): string;
65
- getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
66
- 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;
67
- getParentControlId(): string;
68
- api: import("@stripoinc/ui-editor-extensions").ControlApi;
69
- getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
70
- getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
71
- isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
72
- };
73
- };
74
- readonly paddings: {
75
- new (): {
76
- getId(): string;
77
- getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
78
- getParentControlId(): string;
79
- api: import("@stripoinc/ui-editor-extensions").ControlApi;
80
- getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
81
- getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
82
- 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;
83
- isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
84
- };
85
- };
86
- };
@@ -1,13 +0,0 @@
1
- export declare const DEFAULT_TITLE_TEXT = "You May Also Like!";
2
- export declare const DEFAULT_TITLE_PARAGRAPH: string;
3
- /**
4
- * Builds the two block-level title rows: the title itself and the spacer below it.
5
- * Both carry the same `recommendation-attribute-row` tagging a card attribute row has,
6
- * so the Card Composition toggle hides the pair together and the compiler's
7
- * `[data-visibility="0"]` sweep drops both — no leading gap when the title is off.
8
- * @param paragraphHtml - Full `<p>` markup rendered inside the title cell
9
- * @param visible - Whether the title starts visible
10
- * @param spacerHeightPx - Height of the spacer row below the title
11
- * @returns HTML string with the title row followed by its spacer row
12
- */
13
- export declare function buildTitleRows(paragraphHtml?: string, visible?: boolean, spacerHeightPx?: number): string;