@useinsider/guido 3.6.0-beta.7ac8612 → 3.6.0-beta.dc3a2aa

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 (34) hide show
  1. package/dist/composables/useHtmlValidator.js +102 -131
  2. package/dist/config/compiler/utils/recommendationCompilerUtils.js +27 -28
  3. package/dist/config/migrator/recommendation/extractors.js +22 -44
  4. package/dist/config/migrator/recommendation/htmlBuilder.js +169 -175
  5. package/dist/config/migrator/recommendationMigrator.js +31 -30
  6. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +15 -21
  7. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +24 -38
  8. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +38 -39
  9. package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +35 -45
  10. package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +2 -3
  11. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +52 -62
  12. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +67 -74
  13. package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +6 -7
  14. package/dist/extensions/Blocks/Recommendation/extension.js +5 -6
  15. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +2 -3
  16. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +2 -3
  17. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +6 -4
  18. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +2 -3
  19. package/dist/extensions/Blocks/Recommendation/templates/index.js +4 -5
  20. package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +19 -19
  21. package/dist/src/composables/useHtmlValidator.d.ts +0 -9
  22. package/dist/src/config/migrator/recommendation/extractors.d.ts +0 -15
  23. package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +0 -8
  24. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  25. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -21
  26. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +0 -7
  27. package/dist/src/extensions/Blocks/Recommendation/controls/main/layoutOrientation.d.ts +0 -5
  28. package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +0 -6
  29. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -9
  30. package/package.json +1 -1
  31. package/dist/config/compiler/utils/recommendationIgnoreUtils.js +0 -15
  32. package/dist/src/config/compiler/utils/recommendationIgnoreUtils.d.ts +0 -17
  33. package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +0 -1
  34. /package/dist/src/{composables/useHtmlValidator.test.d.ts → extensions/Blocks/Recommendation/utils/priceFormatter.test.d.ts} +0 -0
@@ -1,14 +1,13 @@
1
1
  import { ExtensionBuilder as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { RecommendationBlock as m } from "./block.js";
3
3
  import { RecommendationBlockControl as n } from "./controls/main/index.js";
4
- import "./constants/selectors.js";
5
4
  import "./store/recommendation.js";
6
5
  import { NameControls as i } from "./controls/name/index.js";
7
6
  import { PriceControls as e } from "./controls/price/index.js";
8
7
  import { OldPriceControls as s } from "./controls/oldPrice/index.js";
9
8
  import { OmnibusPriceControls as l } from "./controls/omnibusPrice/index.js";
10
- import { OmnibusDiscountControls as p } from "./controls/omnibusDiscount/index.js";
11
- import { ButtonControls as a } from "./controls/button/index.js";
9
+ import { OmnibusDiscountControls as a } from "./controls/omnibusDiscount/index.js";
10
+ import { ButtonControls as p } from "./controls/button/index.js";
12
11
  import { ImageControls as c } from "./controls/image/index.js";
13
12
  import { CustomAttributeControls as C } from "./controls/customAttribute/index.js";
14
13
  import { SpacingControl as f } from "./controls/spacing/index.js";
@@ -23,8 +22,8 @@ const b = [
23
22
  e,
24
23
  s,
25
24
  l,
26
- p,
27
25
  a,
26
+ p,
28
27
  c,
29
28
  C
30
29
  ], P = [
@@ -36,10 +35,10 @@ const b = [
36
35
  ], S = [
37
36
  ...P,
38
37
  ...b.flatMap((o) => Object.values(o))
39
- ], L = S.reduce(
38
+ ], K = S.reduce(
40
39
  (o, t) => o.addControl(t),
41
40
  new r().addBlock(m).withSettingsPanelRegistry(B)
42
41
  ).addStyles(y).withIconsRegistry(R).build();
43
42
  export {
44
- L as default
43
+ K as default
45
44
  };
@@ -2,7 +2,6 @@ import { SettingsPanelRegistry as E, SettingsPanelTab as _, SettingsTab as O, Co
2
2
  import { BLOCK_ID as U } from "./block.js";
3
3
  import { RecommendationBlockId as S } from "./constants/blockIds.js";
4
4
  import { RecommendationControlId as T } from "./constants/controlIds.js";
5
- import "./constants/selectors.js";
6
5
  import { CONTROL_BLOCK_ID as A } from "./controls/main/index.js";
7
6
  import "./store/recommendation.js";
8
7
  import "./controls/name/index.js";
@@ -16,7 +15,7 @@ import { SPACING_CONTROL_ID as L } from "./controls/spacing/index.js";
16
15
  import { CARD_BACKGROUND_COLOR_CONTROL_ID as D } from "./controls/cardBackground/index.js";
17
16
  import { COMPOSITION_CONTROL_BLOCK_ID as B } from "./controls/cardComposition/index.js";
18
17
  import { SYNC_INFO_MESSAGE_CONTROL_ID as N } from "./controls/syncInfoMessage.js";
19
- class a extends E {
18
+ class Z extends E {
20
19
  registerBlockControls(I) {
21
20
  I[U] = [
22
21
  new _(
@@ -195,5 +194,5 @@ class a extends E {
195
194
  }
196
195
  }
197
196
  export {
198
- a as SettingsPanel
197
+ Z as SettingsPanel
199
198
  };
@@ -2,7 +2,6 @@ import { getRecommendationFeedSourceMaps as g, getOperatorOptions as R, PriceAtt
2
2
  import { useRecommendationApi as y } from "../../../../services/recommendationApi.js";
3
3
  import { useConfigStore as G } from "../../../../stores/config.js";
4
4
  import { defineStore as P } from "pinia";
5
- import "../constants/selectors.js";
6
5
  import { DEFAULT_CARDS_IN_ROW as F } from "../constants/layout.js";
7
6
  import { EXCLUDED_ALGORITHM_IDS as D } from "../constants/defaultConfig.js";
8
7
  import { getDefaultProducts as S } from "../templates/utils.js";
@@ -59,7 +58,7 @@ const N = () => ({
59
58
  blockStates: {},
60
59
  currentRecommendationId: null,
61
60
  configVersion: 0
62
- }), j = P("guidoRecommendationExtension", {
61
+ }), M = P("guidoRecommendationExtension", {
63
62
  state: () => N(),
64
63
  getters: {
65
64
  // ====================================================================
@@ -472,5 +471,5 @@ const N = () => ({
472
471
  }
473
472
  });
474
473
  export {
475
- j as useRecommendationExtensionStore
474
+ M as useRecommendationExtensionStore
476
475
  };
@@ -1,5 +1,5 @@
1
1
  import { RecommendationBlockId as s } from "../../constants/blockIds.js";
2
- import { ATTR_PRODUCT_ATTR as u, CSS_CLASS_RECO_BUTTON as p, ATTR_PRODUCT_BUTTON as m, ATTR_PRODUCT_OMNIBUS_DISCOUNT as h, ATTR_PRODUCT_OMNIBUS_PRICE as y, ATTR_PRODUCT_OLD_PRICE as T, ATTR_PRODUCT_PRICE as f, ATTR_PRODUCT_NAME as _, ATTR_PRODUCT_IMAGE as x } from "../../constants/selectors.js";
2
+ import { ATTR_PRODUCT_ATTR as u, CSS_CLASS_RECO_BUTTON as p, ATTR_PRODUCT_BUTTON as m, ATTR_PRODUCT_OMNIBUS_DISCOUNT as h, ATTR_PRODUCT_OMNIBUS_PRICE as y, ATTR_PRODUCT_OLD_PRICE as T, ATTR_PRODUCT_PRICE as f, ATTR_PRODUCT_NAME as x, ATTR_PRODUCT_IMAGE as _ } from "../../constants/selectors.js";
3
3
  import { useRecommendationExtensionStore as $ } from "../../store/recommendation.js";
4
4
  import { formatPrice as C } from "../../utils/priceFormatter.js";
5
5
  import { CUSTOM_CELL_HTML as R, sanitizeImageUrl as O } from "../utils.js";
@@ -23,7 +23,7 @@ function i(t, e = "price") {
23
23
  });
24
24
  }
25
25
  const S = {
26
- [x]: (t) => `
26
+ [_]: (t) => `
27
27
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
28
28
  <table
29
29
  class="product-card-segment"
@@ -51,7 +51,7 @@ const S = {
51
51
  </table>
52
52
  </td>
53
53
  `,
54
- [_]: (t) => `
54
+ [x]: (t) => `
55
55
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="middle">
56
56
  <table
57
57
  class="product-card-segment"
@@ -115,7 +115,9 @@ const S = {
115
115
  class="esd-block-text product-old-price es-p15l es-p15r"
116
116
  align="center"
117
117
  esd-extension-block-id="${s.OLD_PRICE}">
118
- <p contenteditable="false" style="font-size: 14px; color: #999999;">
118
+ <p
119
+ contenteditable="false"
120
+ style="font-size: 14px; color: #999999; text-decoration: line-through;">
119
121
  <strong>${i(t, "original_price")}</strong>
120
122
  </p>
121
123
  </td>
@@ -1,4 +1,3 @@
1
- import "../../constants/selectors.js";
2
1
  import { DEFAULT_PRODUCTS_PER_ROW as L } from "../../constants/layout.js";
3
2
  import { getDefaultProducts as E, DEFAULTS as I, createBlockTemplate as _, DEFAULT_CARD_COMPOSITION as S, spacer as b, buildElementRenderer as A, DEFAULT_CARD_VISIBILITY as f } from "../utils.js";
4
3
  import { ATTRIBUTE_CELL_CLASS as w, DEFAULT_CELL_PADDING as D, gridElementRenderer as C } from "./elementRenderer.js";
@@ -53,12 +52,12 @@ function U(t, e, o, r, n = {}) {
53
52
  function h(t, e, o, r = {}) {
54
53
  return U(t, e, C, o, r);
55
54
  }
56
- function H(t) {
55
+ function F(t) {
57
56
  const e = t ? `ins-recommendation-v3-block-${t}` : void 0, o = _("grid", e), r = E(), n = h(r, L);
58
57
  return o.replace("{-{-TITLE-}-}", I.TITLE).replace("{-{-PRODUCT_ROWS-}-}", n).replace("{-{-MOBILE_PRODUCT_ROWS-}-}", "");
59
58
  }
60
59
  export {
61
- H as getDefaultTemplate,
60
+ F as getDefaultTemplate,
62
61
  P as prepareGridAttributeRows,
63
62
  U as prepareGridProductRows,
64
63
  h as prepareProductRows
@@ -1,13 +1,12 @@
1
- import "../constants/selectors.js";
2
1
  import { DEFAULT_PRODUCTS_PER_ROW as s } from "../constants/layout.js";
3
2
  import { prepareProductRows as c } from "./grid/template.js";
4
- import { prepareProductRows as m } from "./list/template.js";
5
- function f(o, t, r = {}) {
3
+ import { prepareProductRows as R } from "./list/template.js";
4
+ function a(o, t, r = {}) {
6
5
  if (t === "list")
7
- return m(o, r.composition, r.filterList);
6
+ return R(o, r.composition, r.filterList);
8
7
  const { productsPerRow: e = s, composition: p, filterList: i } = r;
9
8
  return c(o, e, p, i);
10
9
  }
11
10
  export {
12
- f as prepareProductRows
11
+ a as prepareProductRows
13
12
  };
@@ -1,29 +1,29 @@
1
- function d(a, t) {
2
- const { thousandSeparator: s, decimalSeparator: e, decimalCount: r } = t, u = Math.abs(a).toFixed(r), [c, o] = u.split("."), n = c.replace(
1
+ function $(a, e) {
2
+ const { thousandSeparator: u, decimalSeparator: t, decimalCount: r } = e, m = Number(Math.abs(a).toPrecision(15)), [c, i = ""] = String(m).split("."), n = i.padEnd(r, "0"), s = c.replace(
3
3
  /\B(?=(\d{3})+(?!\d))/g,
4
- s
5
- ), i = a < 0 ? "-" : "";
6
- return r > 0 && o ? `${i}${n}${e}${o}` : `${i}${n}`;
4
+ u
5
+ ), o = a < 0 ? "-" : "";
6
+ return r > 0 && n ? `${o}${s}${t}${n}` : `${o}${s}`;
7
7
  }
8
- function m(a) {
9
- const { price: t, currency: s } = a, {
10
- symbol: e,
8
+ function d(a) {
9
+ const { price: e, currency: u } = a, {
10
+ symbol: t,
11
11
  alignment: r,
12
- thousandSeparator: u,
12
+ thousandSeparator: m,
13
13
  decimalSeparator: c,
14
- decimalCount: o
15
- } = s;
16
- if (typeof t != "number" || Number.isNaN(t)) {
17
- const i = "0".repeat(o), $ = `0${c}${i}`;
18
- return r === "before" ? `${e} ${$}` : `${$} ${e}`;
14
+ decimalCount: i
15
+ } = u;
16
+ if (typeof e != "number" || Number.isNaN(e)) {
17
+ const s = "0".repeat(i), o = `0${c}${s}`;
18
+ return r === "before" ? `${t} ${o}` : `${o} ${t}`;
19
19
  }
20
- const n = d(t, {
21
- thousandSeparator: u,
20
+ const n = $(e, {
21
+ thousandSeparator: m,
22
22
  decimalSeparator: c,
23
- decimalCount: o
23
+ decimalCount: i
24
24
  });
25
- return r === "before" ? `${e} ${n}` : `${n} ${e}`;
25
+ return r === "before" ? `${t} ${n}` : `${n} ${t}`;
26
26
  }
27
27
  export {
28
- m as formatPrice
28
+ d as formatPrice
29
29
  };
@@ -1,13 +1,4 @@
1
1
  import type { DynamicContent } from '@@/Types/generic';
2
- /**
3
- * Parses a `{{recoId_index_attributeName}}` variable (already stripped of the
4
- * braces/whitespace) into its recommendation id and attribute name. Returns
5
- * null for anything that isn't a well-formed recommendation variable.
6
- */
7
- export declare function parseRecommendationVariable(field: string): {
8
- recoId: string;
9
- attribute: string;
10
- } | null;
11
2
  export declare const useHtmlValidator: () => {
12
3
  validateHtml: (html: string, customFields: DynamicContent[], isOnSaveValidation?: boolean) => Promise<boolean>;
13
4
  };
@@ -5,18 +5,3 @@ export declare function extractTitleText(block: Element): string;
5
5
  * the caller treats that as "no segment background".
6
6
  */
7
7
  export declare function extractCardBgColor(block: Element): string;
8
- /**
9
- * Reads the legacy block's own `currency-*` attributes into a
10
- * `currencySettings`-shaped object that `mapCurrency` understands. Used as a
11
- * fallback when the external recommendationConfigs map has no entry for this
12
- * block, so the migrated block keeps its real currency instead of defaulting.
13
- * Returns undefined when the block carries no `currency` attribute.
14
- */
15
- export declare function extractCurrencyFromBlock(block: Element): Record<string, string> | undefined;
16
- /**
17
- * A legacy block whose inner markup already carries `{{...}}` template
18
- * variables was hand-customized by the partner. Detected before rebuild so the
19
- * migrator can preserve the content (and tag the block `ins-skip-compile`)
20
- * instead of regenerating it and wiping the partner's variables.
21
- */
22
- export declare function isCustomizedBlock(block: Element): boolean;
@@ -8,12 +8,4 @@ export declare function buildBlockHtml(params: {
8
8
  extraClasses?: string;
9
9
  legacyId?: string;
10
10
  legacyBgColor?: string;
11
- /**
12
- * When set, the block's existing inner HTML is preserved verbatim instead
13
- * of regenerating product rows — used for partner-customized blocks so
14
- * their hand-authored `{{...}}` variables survive migration.
15
- */
16
- preserveInnerHtml?: string;
17
- /** Adds the `ins-skip-compile` opt-out class to the migrated block. */
18
- skipCompile?: boolean;
19
11
  }): string;
@@ -8,6 +8,6 @@
8
8
  */
9
9
  export { RecommendationBlockId } from './blockIds';
10
10
  export { RecommendationControlId } from './controlIds';
11
- export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CSS_CLASS_RECO_BUTTON, CSS_CLASS_SKIP_COMPILE, RECOMMENDATION_VARIABLE_BUILTIN_ATTRIBUTES, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_CUSTOM_PREFIX, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, BUILT_IN_DEFAULT_ATTRIBUTES, } from './selectors';
11
+ export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CSS_CLASS_RECO_BUTTON, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_CUSTOM_PREFIX, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, BUILT_IN_DEFAULT_ATTRIBUTES, } from './selectors';
12
12
  export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, DEFAULT_MOBILE_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, MAX_MOBILE_PRODUCTS_PER_ROW, MIN_MOBILE_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, DEFAULT_MOBILE_COLUMN_SPACING, DEFAULT_MOBILE_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
13
13
  export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
@@ -23,18 +23,6 @@ export declare const MOBILE_ROW_SELECTOR = ".ins-recommendation-mobile-row";
23
23
  * `{{cId_pIdx_url}}` template variable.
24
24
  */
25
25
  export declare const CSS_CLASS_RECO_BUTTON = "reco-v3-button";
26
- /**
27
- * Opt-out class for partners who want to inject their own template variables
28
- * into a recommendation block. When present on `.recommendation-block-v2`,
29
- * Guido skips ONLY its product-data → template-variable substitution
30
- * (`replaceProductAttributes`) for that block — partners author their own
31
- * `{{recoId_index_attribute}}` variables. Everything else (campaign URL
32
- * building, hidden-row removal, Outlook image widths, text-trim CSS, discount
33
- * conditions, store hydration, store-level config validation, and general HTML
34
- * optimizations) still applies. The class is preserved in the final compiled
35
- * output so partners may use it for their own styling.
36
- */
37
- export declare const CSS_CLASS_SKIP_COMPILE = "ins-skip-compile";
38
26
  /**
39
27
  * Currency HTML attributes set on the block element
40
28
  * These are read by the HTML compiler at runtime to format prices
@@ -73,12 +61,3 @@ export declare const ATTR_PRODUCT_ATTR = "product-attr";
73
61
  * Used to exclude these from the custom attribute dropdown to prevent duplication with toggles.
74
62
  */
75
63
  export declare const BUILT_IN_DEFAULT_ATTRIBUTES: Set<string>;
76
- /**
77
- * Attribute names valid inside a `{{recoId_index_attributeName}}` template
78
- * variable regardless of the account's custom attribute list. Every built-in
79
- * composition attribute is valid, plus `currency` and `discount` which the
80
- * compiler emits but are not composition toggles. Custom attributes are
81
- * validated separately against the account's fetched attribute list
82
- * (`stripo/email-recommendation-attributes`).
83
- */
84
- export declare const RECOMMENDATION_VARIABLE_BUILTIN_ATTRIBUTES: Set<string>;
@@ -17,13 +17,6 @@ export declare class RecommendationCardCompositionControl extends CommonControl
17
17
  getId(): string;
18
18
  getTemplate(): string;
19
19
  onRender(): void;
20
- /**
21
- * Card composition restructures the block (toggles/reorders/adds attribute
22
- * cells), which would corrupt a partner-managed (`ins-skip-compile`) block's
23
- * preserved markup. There is no native tab-disable API, so the whole control
24
- * container is rendered inert (greyed + non-interactive) instead.
25
- */
26
- _syncDisabledState(): void;
27
20
  onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
28
21
  onDestroy(): void;
29
22
  private _initializeComposition;
@@ -21,11 +21,6 @@ export declare class LayoutOrientationControl extends CommonControl {
21
21
  getTemplate(): string;
22
22
  onRender(): void;
23
23
  onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
24
- /**
25
- * Layout orientation restructures the whole block, which is meaningless for
26
- * partner-managed (`ins-skip-compile`) blocks — disable the control there.
27
- */
28
- _syncDisabledState(): void;
29
24
  _setFormValues(): void;
30
25
  /**
31
26
  * Handles layout change
@@ -30,12 +30,6 @@ export declare class ProductLayoutControl extends CommonControl {
30
30
  getTemplate(): string;
31
31
  onRender(): void;
32
32
  onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
33
- /**
34
- * Products-per-row and mobile-layout restructure the block, which is
35
- * meaningless for partner-managed (`ins-skip-compile`) blocks — disable
36
- * these inputs there. Disabling coexists with the visibility logic above.
37
- */
38
- _syncDisabledState(): void;
39
33
  onDestroy(): void;
40
34
  _setFormValues(): void;
41
35
  /**
@@ -35,15 +35,6 @@ interface DocumentModifier {
35
35
  * @returns The block element or null if not found
36
36
  */
37
37
  export declare function getBlockElement(currentNode: ImmutableHtmlNode | null | undefined): ImmutableHtmlNode | null;
38
- /**
39
- * True when the recommendation block has opted out of Guido's content
40
- * regeneration via the `ins-skip-compile` class. Partner-managed blocks carry
41
- * hand-authored `{{...}}` variables in their cells, so Guido must never
42
- * overwrite their content with product data (regenerate / in-place update).
43
- * @param currentNode - The current template node
44
- * @returns True if the block opted out of content regeneration
45
- */
46
- export declare function isPartnerManagedBlock(currentNode: ImmutableHtmlNode | null | undefined): boolean;
47
38
  /**
48
39
  * Gets the current layout orientation from the block's data attribute
49
40
  * Supports both old (horizontal/vertical) and new (list/grid) values for backward compatibility
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.6.0-beta.7ac8612",
3
+ "version": "3.6.0-beta.dc3a2aa",
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",
@@ -1,15 +0,0 @@
1
- import { CSS_CLASS_SKIP_COMPILE as n, BLOCK_ROOT_SELECTOR as i } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
2
- function m(o) {
3
- return o.classList.contains(n);
4
- }
5
- function a(o) {
6
- const r = new DOMParser().parseFromString(o, "text/html").querySelectorAll(`${i}.${n}`), t = /* @__PURE__ */ new Set();
7
- return r.forEach((c) => {
8
- const e = c.getAttribute("recommendation-id");
9
- e && t.add(e);
10
- }), t;
11
- }
12
- export {
13
- a as getIgnoredRecommendationBlockIds,
14
- m as isIgnoredRecommendationBlock
15
- };
@@ -1,17 +0,0 @@
1
- /**
2
- * Returns true when a recommendation block has opted out of Guido's
3
- * product-data → template-variable substitution. Partners signal opt-out by
4
- * adding the `ins-skip-compile` class on the `.recommendation-block-v2`
5
- * element. Only the variable substitution is skipped — campaign URL building,
6
- * hidden-row removal, Outlook image widths, discount conditions, text-trim CSS
7
- * and general HTML optimizations still apply. See `CSS_CLASS_SKIP_COMPILE` for
8
- * the full scope.
9
- */
10
- export declare function isIgnoredRecommendationBlock(block: Element): boolean;
11
- /**
12
- * DOM-parses the HTML once and returns the set of `recommendation-id`
13
- * values that belong to ignored blocks. Use this in regex/string-based
14
- * compiler rules where the rule processes flat matches and only has the
15
- * extracted block ID rather than a DOM Element reference.
16
- */
17
- export declare function getIgnoredRecommendationBlockIds(html: string): Set<string>;