@useinsider/guido 3.18.1-beta.178a3ec → 3.18.1-beta.20bdab6

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.
@@ -21,7 +21,7 @@ ${s.map((o) => ` - ${o}`).join(`
21
21
  * This validation runs only once per class type and results are cached.
22
22
  */
23
23
  validateImplementation(t, r) {
24
- var y;
24
+ var P;
25
25
  const s = [], o = r.name, W = Object.getPrototypeOf(this);
26
26
  t.forEach((u) => {
27
27
  if (typeof this[u] != "function") {
@@ -29,7 +29,7 @@ ${s.map((o) => ` - ${o}`).join(`
29
29
  return;
30
30
  }
31
31
  W[u] === r.prototype[u] && s.push(`Method ${u}() must be implemented (currently using base class error-throwing implementation)`);
32
- }), d.validatedClasses.add(r), s.length > 0 ? (d.validationErrors.set(r, s), console.error(`[${o} Validation] ${o} validation failed:`, s)) : typeof process < "u" && ((y = process.env) == null ? void 0 : y.NODE_ENV) === "development" && console.log(`[${o} Validation] ✅ ${o} validated successfully`);
32
+ }), d.validatedClasses.add(r), s.length > 0 ? (d.validationErrors.set(r, s), console.error(`[${o} Validation] ${o} validation failed:`, s)) : typeof process < "u" && ((P = process.env) == null ? void 0 : P.NODE_ENV) === "development" && console.log(`[${o} Validation] ✅ ${o} validated successfully`);
33
33
  }
34
34
  /**
35
35
  * Lifecycle method for cleaning up resources (e.g., removing DOM artifacts from document.body).
@@ -41,9 +41,9 @@ ${s.map((o) => ` - ${o}`).join(`
41
41
  };
42
42
  v.validatedClasses = /* @__PURE__ */ new Set();
43
43
  v.validationErrors = /* @__PURE__ */ new Map();
44
- var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e))(z || {}), P = class T extends i {
44
+ var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e))(z || {}), y = class c extends i {
45
45
  constructor() {
46
- super(T.REQUIRED_METHODS, T);
46
+ super(c.REQUIRED_METHODS, c);
47
47
  }
48
48
  /**
49
49
  * Determines if the block should be available for use in the editor.
@@ -221,10 +221,10 @@ var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAI
221
221
  throw new Error("Method getDescription() must be implemented by the subclass");
222
222
  }
223
223
  };
224
- P.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
225
- var qe = P, Z = class c extends i {
224
+ y.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
225
+ var qe = y, Z = class T extends i {
226
226
  constructor() {
227
- super(c.REQUIRED_METHODS, c);
227
+ super(T.REQUIRED_METHODS, T);
228
228
  }
229
229
  /**
230
230
  * @deprecated - use {@link getPreviewInnerHtml} instead
@@ -339,12 +339,12 @@ var j = {
339
339
  height: "height"
340
340
  }, Je = {
341
341
  BLOCK_IMAGE: j
342
- }, U = "esd-block-button", w = "esd-block-text", K = "esd-block-image", J = "esd-structure", ee = "esd-block-video", te = "esd-block-social", re = "esd-block-banner", ae = "esd-block-timer", ne = "esd-block-menu", se = "esd-block-html", ie = "esd-block-spacer", le = "esd-container-frame", Ee = "esd-stripe", oe = "esd-amp-form", I = ((e) => (e.BUTTON = `.${U}`, e.TEXT = `.${w}`, e.IMAGE = `.${K}`, e.STRUCTURE = `.${J}`, e.VIDEO = `.${ee}`, e.SOCIAL = `.${te}`, e.BANNER = `.${re}`, e.TIMER = `.${ae}`, e.MENU = `.${ne}`, e.HTML = `.${se}`, e.SPACER = `.${ie}`, e.CONTAINER = `.${le}`, e.STRIPE = `.${Ee}`, e.FORM = `.${oe}`, e))(I || {}), de = /* @__PURE__ */ ((e) => (e.BLOCK_IMAGE = "BLOCK_IMAGE", e.BLOCK_TEXT = "BLOCK_TEXT", e.BLOCK_BUTTON = "BLOCK_BUTTON", e.BLOCK_SPACER = "BLOCK_SPACER", e.BLOCK_VIDEO = "BLOCK_VIDEO", e.BLOCK_SOCIAL = "BLOCK_SOCIAL", e.BLOCK_BANNER = "BLOCK_BANNER", e.BLOCK_TIMER = "BLOCK_TIMER", e.BLOCK_MENU = "BLOCK_MENU", e.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", e.BLOCK_HTML = "BLOCK_HTML", e.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", e.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", e.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", e.CONTAINER = "CONTAINER", e.FORM_CONTAINER = "FORM_CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e.EMPTY_CONTAINER = "EMPTY_CONTAINER", e.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", e.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", e.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT", e))(de || {}), F = /* @__PURE__ */ ((e) => (e.ANCHOR_LINK_CONTAINER = "anchorLinkFormContainer", e.APPLY_CONDITION = "applyCondition", e.APPLY_CONDITION_SWITCHER = "applyConditionSwitcher", e.BACKGROUND_COLOR = "backgroundColor", e.BACKGROUND_IMAGE = "generalImageContainer", e.TEXT_COLOR = "textColor", e.TEXT_STYLE = "textStyle", e.TEXT_SIZE = "textSize", e.TEXT_LINE_SPACING = "textLineSpacing", e.TEXT_ALIGN = "textAlign", e.FIXED_HEIGHT_SWITCHER = "fixedHeightSwitcherForm", e.HIDDEN_NODE = "hiddenNode", e.SMART_BLOCK = "smartBlock", e.SYNCHRONIZED_MODULE = "synchronizedModuleForm", e.FONT_FAMILY = "generalFontFamilyForm", e.BLOCK_INTERNAL_INDENTS = "generalBlockInternalIndents", e.STRUCTURE_INTERNAL_INDENTS = "generalStructureInternalIndents", e))(F || {}), H = /* @__PURE__ */ ((e) => (e.ADJUST_TO_WIDTH = "adjustToWidth", e.ALIGNMENT = "buttonAlignment", e.BORDER = "buttonBorder", e.BORDER_RADIUS = "buttonBorderRadius", e.COLOR = "buttonColor", e.BUTTON_BLOCK_BACKGROUND_COLOR = "buttonBlockBackgroundColor", e.EXTERNAL_INDENTS = "buttonExternalIndents", e.FIXED_HEIGHT = "buttonFixedHeightForm", e.FONT_COLOR = "buttonFontColor", e.FONT_FAMILY = "buttonFontFamily", e.FONT_SIZE = "buttonFontSize", e.FONT_WEIGHT = "buttonFontWeight", e.ICON = "buttonIconContainer", e.ICON_ALIGN = "buttonIconAlign", e.ICON_INDENT = "buttonIconIndent", e.ICON_WIDTH = "buttonIconWidth", e.IMAGE = "buttonImageForm", e.INTERNAL_INDENTS = "buttonInternalIndents", e.LINK = "buttonLink", e.MIME_TYPE = "buttonMimeTypeForm", e.SWITCHER_HOVERED_STYLES = "buttonSwitcherHoveredStylesForm", e.TEXT = "buttonText", e.TEXT_STYLE_AND_COLOR = "buttonTextStyleAndColorForm", e.HOVERED_BORDER_COLOR = "hoveredStyleBorderButtonForm", e.HOVERED_COLOR = "hoveredButtonColorForm", e.HOVERED_TEXT_COLOR = "hoveredButtonTextColorForm", e))(H || {}), k = /* @__PURE__ */ ((e) => (e.HIDDEN_NODE = "hiddenNodeText", e.PARAGRAPH_STYLE = "paragraphStyleForm", e.ALIGN = "textAlignmentForm", e.ANCHOR_CONTAINER = "textAnchorForm", e.FONT_BACKGROUND_COLOR = "textBlockFontBackgroundColor", e.TEXT_BLOCK_BACKGROUND_COLOR = "textBlockBackgroundColor", e.FONT_COLOR = "textBlockFontColor", e.TEXT_BLOCK_FONT_FAMILY = "textBlockFontFamily", e.FONT_FAMILY = "textFontFamily", e.FONT_SIZE = "textBlockFontSize", e.FONT_WEIGHT = "textBlockFontWeight", e.DIRECTION = "textBlockDirectionForm", e.INSERT_FORM = "textBlockInsertForm", e.LINK_DATA = "textBlockLinkDataForm", e.FORMAT = "textBlockTextFormatForm", e.FIXED_HEIGHT = "textFixedHeightForm", e.INTERNAL_INDENTS = "textInternalIndents", e.LINE_HEIGHT = "textLineHeightForm", e.MIME_TYPE = "textMimeTypeForm", e.NO_LINE_WRAPS = "textNoLineWrapsForm", e))(k || {}), p = /* @__PURE__ */ ((e) => (e.ALT_TEXT = "altText", e.LINK = "blockLink", e.ALIGNMENT = "imageAlignment", e.ANCHOR_LINK_CONTAINER = "imageAnchorLinkContainerForm", e.BORDER_RADIUS = "imageBorderRadiusForm", e.IMAGE = "imageImageForm", e.EXTERNAL_INDENTS = "imageExternalIndents", e.MIME_TYPE = "imageMimeTypeForm", e.RESPONSIVE = "imageResponsive", e.ROLLOVER_IMAGE = "imageRolloverImageForm", e.ROLLOVER_SWITCHER = "imageRolloverSwitcherForm", e.SIZE = "imageSizeContainer", e))(p || {}), ue = /* @__PURE__ */ ((e) => (e.BACKGROUND_COLOR = "containerBackgroundColorForm", e.BORDER_FORM = "containerBorderForm", e.BORDER_RADIUS = "containerBorderRadiusForm", e.EXTERNAL_INDENTS = "containerExternalIndentsForm", e.IMAGE_CONTAINER = "containerImageContainerForm", e.MIME_TYPE = "containerMimeTypeForm", e.DISPLAY_CONDITIONS = "displayConditions", e.HIDDEN_NODE = "containerHiddenNodeForm", e))(ue || {}), n = {
342
+ }, U = "esd-block-button", w = "esd-block-text", K = "esd-block-image", J = "esd-structure", ee = "esd-block-video", te = "esd-block-social", re = "esd-block-banner", ae = "esd-block-timer", ne = "esd-block-menu", se = "esd-block-html", ie = "esd-block-spacer", le = "esd-container-frame", Ee = "esd-stripe", oe = "esd-amp-form", I = ((e) => (e.BUTTON = `.${U}`, e.TEXT = `.${w}`, e.IMAGE = `.${K}`, e.STRUCTURE = `.${J}`, e.VIDEO = `.${ee}`, e.SOCIAL = `.${te}`, e.BANNER = `.${re}`, e.TIMER = `.${ae}`, e.MENU = `.${ne}`, e.HTML = `.${se}`, e.SPACER = `.${ie}`, e.CONTAINER = `.${le}`, e.STRIPE = `.${Ee}`, e.FORM = `.${oe}`, e))(I || {}), de = /* @__PURE__ */ ((e) => (e.BLOCK_IMAGE = "BLOCK_IMAGE", e.BLOCK_TEXT = "BLOCK_TEXT", e.BLOCK_BUTTON = "BLOCK_BUTTON", e.BLOCK_SPACER = "BLOCK_SPACER", e.BLOCK_VIDEO = "BLOCK_VIDEO", e.BLOCK_SOCIAL = "BLOCK_SOCIAL", e.BLOCK_BANNER = "BLOCK_BANNER", e.BLOCK_TIMER = "BLOCK_TIMER", e.BLOCK_MENU = "BLOCK_MENU", e.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", e.BLOCK_HTML = "BLOCK_HTML", e.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", e.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", e.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", e.CONTAINER = "CONTAINER", e.FORM_CONTAINER = "FORM_CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e.EMPTY_CONTAINER = "EMPTY_CONTAINER", e.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", e.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", e.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT", e))(de || {}), F = /* @__PURE__ */ ((e) => (e.ANCHOR_LINK_CONTAINER = "anchorLinkFormContainer", e.APPLY_CONDITION = "applyCondition", e.APPLY_CONDITION_SWITCHER = "applyConditionSwitcher", e.BACKGROUND_COLOR = "backgroundColor", e.BACKGROUND_IMAGE = "generalImageContainer", e.TEXT_COLOR = "textColor", e.TEXT_STYLE = "textStyle", e.TEXT_SIZE = "textSize", e.TEXT_LINE_SPACING = "textLineSpacing", e.TEXT_ALIGN = "textAlign", e.FIXED_HEIGHT_SWITCHER = "fixedHeightSwitcherForm", e.HIDDEN_NODE = "hiddenNode", e.SMART_BLOCK = "smartBlock", e.SYNCHRONIZED_MODULE = "synchronizedModuleForm", e.FONT_FAMILY = "generalFontFamilyForm", e.BLOCK_INTERNAL_INDENTS = "generalBlockInternalIndents", e.STRUCTURE_INTERNAL_INDENTS = "generalStructureInternalIndents", e))(F || {}), H = /* @__PURE__ */ ((e) => (e.ADJUST_TO_WIDTH = "adjustToWidth", e.ALIGNMENT = "buttonAlignment", e.BORDER = "buttonBorder", e.BORDER_RADIUS = "buttonBorderRadius", e.COLOR = "buttonColor", e.BUTTON_BLOCK_BACKGROUND_COLOR = "buttonBlockBackgroundColor", e.EXTERNAL_INDENTS = "buttonExternalIndents", e.FIXED_HEIGHT = "buttonFixedHeightForm", e.FONT_COLOR = "buttonFontColor", e.FONT_FAMILY = "buttonFontFamily", e.FONT_SIZE = "buttonFontSize", e.FONT_WEIGHT = "buttonFontWeight", e.ICON = "buttonIconContainer", e.ICON_ALIGN = "buttonIconAlign", e.ICON_INDENT = "buttonIconIndent", e.ICON_WIDTH = "buttonIconWidth", e.IMAGE = "buttonImageForm", e.INTERNAL_INDENTS = "buttonInternalIndents", e.LINK = "buttonLink", e.MIME_TYPE = "buttonMimeTypeForm", e.SWITCHER_HOVERED_STYLES = "buttonSwitcherHoveredStylesForm", e.TEXT = "buttonText", e.TEXT_STYLE_AND_COLOR = "buttonTextStyleAndColorForm", e.HOVERED_BORDER_COLOR = "hoveredStyleBorderButtonForm", e.HOVERED_COLOR = "hoveredButtonColorForm", e.HOVERED_TEXT_COLOR = "hoveredButtonTextColorForm", e))(H || {}), k = /* @__PURE__ */ ((e) => (e.HIDDEN_NODE = "hiddenNodeText", e.PARAGRAPH_STYLE = "paragraphStyleForm", e.ALIGN = "textAlignmentForm", e.ANCHOR_CONTAINER = "textAnchorForm", e.FONT_BACKGROUND_COLOR = "textBlockFontBackgroundColor", e.TEXT_BLOCK_BACKGROUND_COLOR = "textBlockBackgroundColor", e.FONT_COLOR = "textBlockFontColor", e.TEXT_BLOCK_FONT_FAMILY = "textBlockFontFamily", e.FONT_FAMILY = "textFontFamily", e.FONT_SIZE = "textBlockFontSize", e.FONT_WEIGHT = "textBlockFontWeight", e.DIRECTION = "textBlockDirectionForm", e.INSERT_FORM = "textBlockInsertForm", e.LETTER_SPACING = "textBlockLetterSpacing", e.LINK_DATA = "textBlockLinkDataForm", e.FORMAT = "textBlockTextFormatForm", e.FIXED_HEIGHT = "textFixedHeightForm", e.INTERNAL_INDENTS = "textInternalIndents", e.LINE_HEIGHT = "textLineHeightForm", e.MIME_TYPE = "textMimeTypeForm", e.NO_LINE_WRAPS = "textNoLineWrapsForm", e))(k || {}), X = /* @__PURE__ */ ((e) => (e.ALT_TEXT = "altText", e.LINK = "blockLink", e.ALIGNMENT = "imageAlignment", e.ANCHOR_LINK_CONTAINER = "imageAnchorLinkContainerForm", e.BORDER_RADIUS = "imageBorderRadiusForm", e.IMAGE = "imageImageForm", e.EXTERNAL_INDENTS = "imageExternalIndents", e.MIME_TYPE = "imageMimeTypeForm", e.RESPONSIVE = "imageResponsive", e.ROLLOVER_IMAGE = "imageRolloverImageForm", e.ROLLOVER_SWITCHER = "imageRolloverSwitcherForm", e.SIZE = "imageSizeContainer", e))(X || {}), ue = /* @__PURE__ */ ((e) => (e.BACKGROUND_COLOR = "containerBackgroundColorForm", e.BORDER_FORM = "containerBorderForm", e.BORDER_RADIUS = "containerBorderRadiusForm", e.EXTERNAL_INDENTS = "containerExternalIndentsForm", e.IMAGE_CONTAINER = "containerImageContainerForm", e.MIME_TYPE = "containerMimeTypeForm", e.DISPLAY_CONDITIONS = "displayConditions", e.HIDDEN_NODE = "containerHiddenNodeForm", e))(ue || {}), n = {
343
343
  BLOCK_BUTTON: H,
344
344
  BLOCK_TEXT: k,
345
- BLOCK_IMAGE: p,
345
+ BLOCK_IMAGE: X,
346
346
  GENERAL: F
347
- }, Ie = /* @__PURE__ */ ((e) => (e.SAVE_AS_MODULE = "saveAsModule", e.IMPROVE_WITH_AI = "improveWithAI", e.MOVE = "move", e.COPY = "copy", e.REMOVE = "remove", e.CLEAR_CONTAINER = "clearContainer", e.EXTERNAL_DISPLAY_CONDITION = "externalDisplayCondition", e))(Ie || {}), Te = /* @__PURE__ */ ((e) => (e.previewDeviceMode = "previewDeviceMode", e.panelPosition = "panelPosition", e.themeMode = "themeMode", e))(Te || {}), ce = /* @__PURE__ */ ((e) => (e.DESKTOP = "DESKTOP", e.MOBILE = "MOBILE", e))(ce || {}), be = /* @__PURE__ */ ((e) => (e.SETTINGS = "settings", e.STYLES = "styles", e.DATA = "data", e))(be || {}), a = {
347
+ }, Ie = /* @__PURE__ */ ((e) => (e.SAVE_AS_MODULE = "saveAsModule", e.IMPROVE_WITH_AI = "improveWithAI", e.MOVE = "move", e.COPY = "copy", e.REMOVE = "remove", e.CLEAR_CONTAINER = "clearContainer", e.EXTERNAL_DISPLAY_CONDITION = "externalDisplayCondition", e))(Ie || {}), ce = /* @__PURE__ */ ((e) => (e.previewDeviceMode = "previewDeviceMode", e.panelPosition = "panelPosition", e.themeMode = "themeMode", e))(ce || {}), Te = /* @__PURE__ */ ((e) => (e.DESKTOP = "DESKTOP", e.MOBILE = "MOBILE", e))(Te || {}), be = /* @__PURE__ */ ((e) => (e.SETTINGS = "settings", e.STYLES = "styles", e.DATA = "data", e))(be || {}), a = {
348
348
  name: "name",
349
349
  disabled: "disabled"
350
350
  }, he = {
@@ -369,18 +369,19 @@ var j = {
369
369
  hint: "hint"
370
370
  }, Le = {
371
371
  ...a,
372
- type: "type"
372
+ type: "type",
373
+ icon: "icon"
373
374
  }, _e = {
374
375
  ...a,
375
376
  buttons: "buttons"
376
- }, X = {
377
+ }, p = {
377
378
  ...a,
378
379
  searchable: "searchable",
379
380
  multiSelect: "multi-select",
380
381
  placeholder: "placeholder",
381
382
  items: "items"
382
383
  }, Ce = {
383
- ...X,
384
+ ...p,
384
385
  addCustomFontOption: "add-custom-font-option"
385
386
  }, Ae = {
386
387
  ...a,
@@ -422,10 +423,10 @@ var j = {
422
423
  }, xe = {
423
424
  ...a,
424
425
  controlId: "control-id"
425
- }, ye = {
426
+ }, Pe = {
426
427
  ...a,
427
428
  expanded: "expanded"
428
- }, Pe = {
429
+ }, ye = {
429
430
  ...a,
430
431
  icon: "icon",
431
432
  position: "position"
@@ -455,7 +456,7 @@ var j = {
455
456
  LABEL: Re,
456
457
  MESSAGE: Le,
457
458
  RADIO_BUTTONS: _e,
458
- SELECTPICKER: X,
459
+ SELECTPICKER: p,
459
460
  FONT_FAMILY_SELECT: Ce,
460
461
  SWITCHER: a,
461
462
  TEXT: Me,
@@ -465,15 +466,15 @@ var j = {
465
466
  SELECT_ITEM: Ae,
466
467
  RADIO_ITEM: Se,
467
468
  NESTED_CONTROL: xe,
468
- EXPANDABLE: ye,
469
- ORDERABLE: Pe,
469
+ EXPANDABLE: Pe,
470
+ ORDERABLE: ye,
470
471
  ORDERABLE_ITEM: Ue,
471
472
  ORDERABLE_ICON: we,
472
473
  REPEATABLE: Ke,
473
474
  DRAGGABLE_BLOCK: Fe,
474
475
  AMP_FORM_SERVICE_PICKER: He,
475
476
  MULTIPLE_SELECT: ke
476
- }, pe = /* @__PURE__ */ ((e) => (e.BUTTON = "UE-BUTTON", e.CHECKBOX = "UE-CHECKBOX", e.CHECK_BUTTONS = "UE-CHECK-BUTTONS", e.COLOR = "UE-COLOR", e.COUNTER = "UE-COUNTER", e.DATEPICKER = "UE-DATEPICKER", e.LABEL = "UE-LABEL", e.MESSAGE = "UE-MESSAGE", e.RADIO_BUTTONS = "UE-RADIO-BUTTONS", e.SELECTPICKER = "UE-SELECT", e.SWITCHER = "UE-SWITCHER", e.TEXT = "UE-TEXT", e.TEXTAREA = "UE-TEXTAREA", e.CHECK_ITEM = "UE-CHECK-ITEM", e.RADIO_ITEM = "UE-RADIO-ITEM", e.SELECT_ITEM = "UE-SELECT-ITEM", e.ICON = "UE-ICON", e.MERGETAGS = "UE-MERGETAGS", e.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", e.NESTED_CONTROL = "UE-NESTED-CONTROL", e.EXPANDABLE = "UE-EXPANDABLE", e.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", e.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", e.ORDERABLE = "UE-ORDERABLE", e.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", e.ORDERABLE_ICON = "UE-ORDERABLE-ICON", e.REPEATABLE = "UE-REPEATABLE", e.DRAGGABLE_BLOCK = "UE-DRAGGABLE-BLOCK", e.AMP_FORM_SERVICE_PICKER = "UE-AMP-FORM-SERVICE-PICKER", e.MULTIPLE_SELECT = "UE-MULTIPLE_SELECT", e.SCROLLABLE = "UE-SCROLLABLE-CONTAINER", e))(pe || {}), x = class {
477
+ }, Xe = /* @__PURE__ */ ((e) => (e.BUTTON = "UE-BUTTON", e.CHECKBOX = "UE-CHECKBOX", e.CHECK_BUTTONS = "UE-CHECK-BUTTONS", e.COLOR = "UE-COLOR", e.COUNTER = "UE-COUNTER", e.DATEPICKER = "UE-DATEPICKER", e.LABEL = "UE-LABEL", e.MESSAGE = "UE-MESSAGE", e.RADIO_BUTTONS = "UE-RADIO-BUTTONS", e.SELECTPICKER = "UE-SELECT", e.SWITCHER = "UE-SWITCHER", e.TEXT = "UE-TEXT", e.RICH_TEXT = "UE-RICH-TEXT", e.TEXTAREA = "UE-TEXTAREA", e.CHECK_ITEM = "UE-CHECK-ITEM", e.RADIO_ITEM = "UE-RADIO-ITEM", e.SELECT_ITEM = "UE-SELECT-ITEM", e.ICON = "UE-ICON", e.MERGETAGS = "UE-MERGETAGS", e.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", e.NESTED_CONTROL = "UE-NESTED-CONTROL", e.EXPANDABLE = "UE-EXPANDABLE", e.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", e.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", e.ORDERABLE = "UE-ORDERABLE", e.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", e.ORDERABLE_ICON = "UE-ORDERABLE-ICON", e.REPEATABLE = "UE-REPEATABLE", e.DRAGGABLE_BLOCK = "UE-DRAGGABLE-BLOCK", e.AMP_FORM_SERVICE_PICKER = "UE-AMP-FORM-SERVICE-PICKER", e.MULTIPLE_SELECT = "UE-MULTIPLE_SELECT", e.SCROLLABLE = "UE-SCROLLABLE-CONTAINER", e.POPUP_PANEL = "UE-POPUP-PANEL", e))(Xe || {}), x = class {
477
478
  /**
478
479
  * @description returns map of nodes parent control operates on
479
480
  */
@@ -619,7 +620,7 @@ var j = {
619
620
  }
620
621
  };
621
622
  G.REQUIRED_METHODS = ["getId", "getTemplate"];
622
- var Tt = G, Xe = class m extends i {
623
+ var ct = G, pe = class m extends i {
623
624
  constructor() {
624
625
  super(m.REQUIRED_METHODS, m);
625
626
  }
@@ -688,13 +689,13 @@ var Tt = G, Xe = class m extends i {
688
689
  onDestroy() {
689
690
  }
690
691
  };
691
- Xe.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
692
+ pe.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
692
693
  var V = class extends x {
693
694
  getTargetNodes(e) {
694
695
  const t = e.querySelectorAll(I.IMAGE), r = e.asElement().hasClass(K) ? [e] : [];
695
696
  return t.length ? t : r;
696
697
  }
697
- }, ct = class extends V {
698
+ }, Tt = class extends V {
698
699
  getParentControlId() {
699
700
  return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
700
701
  }
@@ -1215,17 +1216,17 @@ export {
1215
1216
  It as ButtonTextStyleAndFontColorBuiltInControl,
1216
1217
  ue as ContainerControls,
1217
1218
  Ie as ContextActionType,
1218
- Tt as Control,
1219
- Te as EditorStatePropertyType,
1219
+ ct as Control,
1220
+ ce as EditorStatePropertyType,
1220
1221
  Ve as Extension,
1221
1222
  Nt as ExtensionBuilder,
1222
1223
  F as GeneralControls,
1223
1224
  Dt as IconsRegistry,
1224
- p as ImageControls,
1225
- ct as ImageMarginsBuiltInControl,
1225
+ X as ImageControls,
1226
+ Tt as ImageMarginsBuiltInControl,
1226
1227
  bt as ImageSizeBuiltInControl,
1227
1228
  St as ModificationDescription,
1228
- ce as PreviewDeviceMode,
1229
+ Te as PreviewDeviceMode,
1229
1230
  ht as SettingsPanelRegistry,
1230
1231
  mt as SettingsPanelTab,
1231
1232
  be as SettingsTab,
@@ -1240,5 +1241,5 @@ export {
1240
1241
  et as UEAttr,
1241
1242
  Mt as UIElement,
1242
1243
  Bt as UIElementTagRegistry,
1243
- pe as UIElementType
1244
+ Xe as UIElementType
1244
1245
  };
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.73.0" } }, s = {
1
+ const o = { stripo: { version: "2.76.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -39,17 +39,14 @@ export declare const productPairs: {
39
39
  CART_ITEMS: {
40
40
  ATTR: string;
41
41
  DEFAULT: string;
42
- LEGACY_DEFAULTS: readonly string[];
43
42
  };
44
43
  BROWSED_ITEMS: {
45
44
  ATTR: string;
46
45
  DEFAULT: string;
47
- LEGACY_DEFAULTS: readonly string[];
48
46
  };
49
47
  PURCHASED_ITEMS: {
50
48
  ATTR: string;
51
49
  DEFAULT: string;
52
- LEGACY_DEFAULTS: readonly string[];
53
50
  };
54
51
  };
55
52
  price: {
@@ -37,25 +37,6 @@ type TemplateParameters = {
37
37
  /** Price orientation within the card ('vertical' = stacked, 'horizontal' = side-by-side) */
38
38
  priceOrientation?: PriceOrientationType;
39
39
  };
40
- /**
41
- * Applies price orientation styles to the generated HTML template.
42
- *
43
- * For Vertical Layout:
44
- * - vertical price orientation: both cells 100% (stacked)
45
- * - horizontal price orientation with both visible: both cells 50% (side-by-side)
46
- * - horizontal price orientation with one hidden: visible cell 100%
47
- *
48
- * For Horizontal Layout:
49
- * - horizontal price orientation: .horizontal-price visible, .vertical-price hidden
50
- * - vertical price orientation: .horizontal-price hidden, .vertical-price visible
51
- * @param html - The HTML template string with placeholders replaced
52
- * @param layoutOrientation - The card layout orientation ('vertical' or 'horizontal')
53
- * @param priceOrientation - The price orientation within the card ('vertical' or 'horizontal')
54
- * @param isPriceVisible - Whether the price element is visible
55
- * @param isOriginalPriceVisible - Whether the original price element is visible
56
- * @returns HTML string with price orientation styles applied
57
- */
58
- export declare const applyPriceOrientationStyles: (html: string, layoutOrientation: OrientationType, priceOrientation: PriceOrientationType, isPriceVisible?: boolean, isOriginalPriceVisible?: boolean) => string;
59
40
  /**
60
41
  * Generates the default template for the Items Block.
61
42
  * @param params - Template parameters including orientation, items type, item ID, and formatting options
@@ -1,100 +1,100 @@
1
- import { ITEMS_CURRENCY_ATTR as x, isCustomCurrencySymbol as Y } from "../extensions/Blocks/Items/constants/currency.js";
2
- import { productPairs as w } from "../extensions/Blocks/Items/enums/productEnums.js";
1
+ import { ITEMS_CURRENCY_ATTR as D, isCustomCurrencySymbol as G } from "../extensions/Blocks/Items/constants/currency.js";
2
+ import { productPairs as L } from "../extensions/Blocks/Items/enums/productEnums.js";
3
3
  import { escapeReplacement as X } from "../extensions/Blocks/Items/utils/nodeConfigUtils.js";
4
- import { preserveTextStyles as P } from "./preserveTextStyles.js";
5
- import { unwrapProductNameLinks as v } from "./unwrapProductNameLink.js";
6
- const O = {
4
+ import { preserveTextStyles as F } from "./preserveTextStyles.js";
5
+ import { unwrapProductNameLinks as Y } from "./unwrapProductNameLink.js";
6
+ const x = {
7
7
  CART_ITEMS: "ins_apr",
8
8
  BROWSED_ITEMS: "browsed_item",
9
9
  PURCHASED_ITEMS: "purchased_item"
10
- }, q = (S) => S.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->");
11
- function B(S, y, b) {
10
+ }, O = (S) => S.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->");
11
+ function v(S, y, b) {
12
12
  let h = y;
13
13
  for (; h > 0 && /\s/.test(S[h - 1]); )
14
14
  h -= 1;
15
15
  return b.some((I) => S.endsWith(I, h));
16
16
  }
17
- function Z(S) {
18
- const y = q(S), b = new DOMParser().parseFromString(y, "text/html");
19
- v(b);
20
- const h = w.PAIRS_FOR_EXTENSION;
17
+ function K(S) {
18
+ const y = O(S), b = new DOMParser().parseFromString(y, "text/html");
19
+ Y(b);
20
+ const h = L.PAIRS_FOR_EXTENSION;
21
21
  Object.entries(h).forEach(([n, d]) => {
22
22
  b.querySelectorAll(".ins-product-td").forEach((r) => {
23
23
  const E = r.getAttribute("data-number") || "1", m = r.getAttribute("data-type") || "CART_ITEMS";
24
24
  r.querySelectorAll(`[product-attr="${n}"]`).forEach((t) => {
25
- var $, F, D, N;
26
- const g = t.getAttribute("data-type") || m, o = t.getAttribute("data-number") || E, f = d[g];
27
- if (f)
25
+ var $, H, N;
26
+ const g = t.getAttribute("data-type") || m, o = t.getAttribute("data-number") || E, u = d[g];
27
+ if (u)
28
28
  switch (n) {
29
29
  case "imageSrc": {
30
- let e = null, a = null;
31
- if (t.tagName === "IMG" ? (e = t, a = e.closest("a")) : (e = t.querySelector("img"), a = t.querySelector("a") || t.closest("a")), !e)
30
+ let e = null, s = null;
31
+ if (t.tagName === "IMG" ? (e = t, s = e.closest("a")) : (e = t.querySelector("img"), s = t.querySelector("a") || t.closest("a")), !e)
32
32
  break;
33
- const l = f.DEFAULT, c = f.ATTR;
34
- if (l && e.src) {
35
- const s = e.src;
36
- l.some((R) => {
37
- const u = R.split("/").pop() || "", H = s.split("/").pop() || "";
38
- return s.includes(R) || s.includes(u) || H === u;
39
- }) && (e.src = `{{${c}_${o}}}`);
33
+ const a = u.DEFAULT, l = u.ATTR;
34
+ if (a && e.src) {
35
+ const i = e.src;
36
+ a.some((_) => {
37
+ const f = _.split("/").pop() || "", P = i.split("/").pop() || "";
38
+ return i.includes(_) || i.includes(f) || P === f;
39
+ }) && (e.src = `{{${l}_${o}}}`);
40
40
  }
41
- const i = (F = ($ = h.name) == null ? void 0 : $[g]) == null ? void 0 : F.ATTR;
42
- if (i && e.setAttribute("alt", `{{${i}_${o}}}`), a) {
43
- const s = (D = h.itemLink) == null ? void 0 : D[g];
44
- if (s) {
45
- const _ = s.HREF, R = s.DEFAULT_HREF || "#!", u = a.href;
46
- (u === "#" || u === "" || u.endsWith("#!") || u.endsWith(R) || u === `${window.location.href}${R}` || !u || u === window.location.href) && (a.href = `{{${_}_${o}}}`);
41
+ const c = (H = ($ = h.name) == null ? void 0 : $[g]) == null ? void 0 : H.ATTR;
42
+ if (c && e.setAttribute("alt", `{{${c}_${o}}}`), s) {
43
+ const i = (N = h.itemLink) == null ? void 0 : N[g];
44
+ if (i) {
45
+ const R = i.HREF, _ = i.DEFAULT_HREF || "#!", f = s.href;
46
+ (f === "#" || f === "" || f.endsWith("#!") || f.endsWith(_) || f === `${window.location.href}${_}` || !f || f === window.location.href) && (s.href = `{{${R}_${o}}}`);
47
47
  }
48
48
  }
49
49
  break;
50
50
  }
51
51
  case "name": {
52
- const e = f, a = e.ATTR, l = e.DEFAULT_HREF || "#!", c = e.HREF;
53
- t.textContent && (t.innerHTML = P(t, `{{${a}_${o}}}`));
54
- const i = t.closest("a") || (t.tagName === "A" ? t : null);
55
- if (i && c) {
56
- const s = i.href, _ = `${window.location.href}${l}`;
57
- (s === _ || s.endsWith(l)) && (i.href = `{{${c}_${o}}}`);
52
+ const e = u, s = e.ATTR, a = e.DEFAULT_HREF || "#!", l = e.HREF;
53
+ t.textContent && (t.innerHTML = F(t, `{{${s}_${o}}}`));
54
+ const c = t.closest("a") || (t.tagName === "A" ? t : null);
55
+ if (c && l) {
56
+ const i = c.href, R = `${window.location.href}${a}`;
57
+ (i === R || i.endsWith(a)) && (c.href = `{{${l}_${o}}}`);
58
58
  }
59
59
  break;
60
60
  }
61
61
  case "price":
62
62
  case "originalPrice": {
63
- const e = f, a = t.getAttribute("data-formated"), l = t.getAttribute("data-single_price"), c = a === "true", i = l === "true", s = t.getAttribute(x.POSITION) || "before";
64
- let _;
65
- i ? _ = c ? e.SINGLE_PRICE_FORMATTED : e.SINGLE_PRICE : _ = c ? e.PRICE_FORMATTED : e.PRICE;
66
- const R = e.CURRENCY;
67
- let u = `{{${_}_${o}}}`;
68
- const H = (t.getAttribute(x.SYMBOL) || "").trim(), G = Y(H);
63
+ const e = u, s = t.getAttribute("data-formated"), a = t.getAttribute("data-single_price"), l = s === "true", c = a === "true", i = t.getAttribute(D.POSITION) || "before";
64
+ let R;
65
+ c ? R = l ? e.SINGLE_PRICE_FORMATTED : e.SINGLE_PRICE : R = l ? e.PRICE_FORMATTED : e.PRICE;
66
+ const _ = e.CURRENCY;
67
+ let f = `{{${R}_${o}}}`;
68
+ const P = (t.getAttribute(D.SYMBOL) || "").trim(), V = G(P);
69
69
  let C = "";
70
- G ? C = H : R && (C = `{{${R}_${o}}}`), C && (u = s === "after" ? `${u} ${C}` : `${C} ${u}`), t.innerHTML = P(t, u);
70
+ V ? C = P : _ && (C = `{{${_}_${o}}}`), C && (f = i === "after" ? `${f} ${C}` : `${C} ${f}`), t.innerHTML = F(t, f);
71
71
  break;
72
72
  }
73
73
  case "quantity": {
74
- const e = f, a = e.ATTR, l = [e.DEFAULT, ...e.LEGACY_DEFAULTS], c = (N = t.textContent) == null ? void 0 : N.trim();
75
- c && l.includes(c) && (t.innerHTML = P(t, `{{${a}_${o}}}`));
74
+ const e = u, s = e.ATTR, a = e.DEFAULT;
75
+ t.textContent && t.textContent.trim() === a && (t.innerHTML = F(t, `{{${s}_${o}}}`));
76
76
  break;
77
77
  }
78
78
  case "button": {
79
- const e = f, a = e.HREF, l = e.DEFAULT_HREF || "#!", c = t.tagName === "A" ? t : t.querySelector("a");
80
- if (c) {
81
- const i = c.href || "", s = `${window.location.href}${l}`;
82
- (i === "" || i === "#" || i === s || i.endsWith(l) || i.endsWith("#!") || i === window.location.href) && (c.href = `{{${a}_${o}}}`);
79
+ const e = u, s = e.HREF, a = e.DEFAULT_HREF || "#!", l = t.tagName === "A" ? t : t.querySelector("a");
80
+ if (l) {
81
+ const c = l.href || "", i = `${window.location.href}${a}`;
82
+ (c === "" || c === "#" || c === i || c.endsWith(a) || c.endsWith("#!") || c === window.location.href) && (l.href = `{{${s}_${o}}}`);
83
83
  }
84
84
  break;
85
85
  }
86
86
  case "itemLink": {
87
- const e = f, a = e.HREF, l = e.DEFAULT_HREF || "#!", c = t;
88
- if (c.href) {
89
- const i = c.href, s = `${window.location.href}${l}`;
90
- (i === s || i.endsWith(l)) && (c.href = `{{${a}_${o}}}`);
87
+ const e = u, s = e.HREF, a = e.DEFAULT_HREF || "#!", l = t;
88
+ if (l.href) {
89
+ const c = l.href, i = `${window.location.href}${a}`;
90
+ (c === i || c.endsWith(a)) && (l.href = `{{${s}_${o}}}`);
91
91
  }
92
92
  break;
93
93
  }
94
94
  default: {
95
- if ("ATTR" in f) {
96
- const e = f.ATTR;
97
- t.textContent && (t.innerHTML = P(t, `{{${e}_${o}}}`));
95
+ if ("ATTR" in u) {
96
+ const e = u.ATTR;
97
+ t.textContent && (t.innerHTML = F(t, `{{${e}_${o}}}`));
98
98
  }
99
99
  break;
100
100
  }
@@ -102,9 +102,9 @@ function Z(S) {
102
102
  });
103
103
  });
104
104
  });
105
- const I = y.match(/<!DOCTYPE[^>]*>/i), U = I ? `${I[0]}
106
- ` : "", W = b.querySelectorAll(".ins-product-td"), M = [];
107
- W.forEach((n) => {
105
+ const I = y.match(/<!DOCTYPE[^>]*>/i), q = I ? `${I[0]}
106
+ ` : "", U = b.querySelectorAll(".ins-product-td"), M = [];
107
+ U.forEach((n) => {
108
108
  const d = n.getAttribute("data-type") || "CART_ITEMS", p = n.getAttribute("data-number") || "1", r = n.outerHTML;
109
109
  M.push({
110
110
  element: n,
@@ -113,38 +113,38 @@ function Z(S) {
113
113
  number: p
114
114
  });
115
115
  });
116
- let A = U + b.documentElement.outerHTML;
116
+ let A = q + b.documentElement.outerHTML;
117
117
  M.reverse().forEach(({ outerHtml: n, type: d, number: p }) => {
118
- const r = O[d], E = r ? `${r}_total_product_kind` : "";
118
+ const r = x[d], E = r ? `${r}_total_product_kind` : "";
119
119
  if (E) {
120
120
  const T = parseInt(p) - 1, o = `${`{% if ${E} > ${T} %}`}${n}{% endif %}`;
121
121
  A = A.replace(n, X(o));
122
122
  }
123
123
  });
124
- const V = b.querySelectorAll('[product-attr="originalPrice"][data-type]'), L = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Set();
125
- return V.forEach((n) => {
124
+ const W = b.querySelectorAll('[product-attr="originalPrice"][data-type]'), w = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Set();
125
+ return W.forEach((n) => {
126
126
  var t;
127
127
  const d = n.getAttribute("data-number"), p = n.getAttribute("data-type");
128
- if (!d || !O[p])
128
+ if (!d || !x[p])
129
129
  return;
130
130
  const r = n.closest(".product-original-price-class");
131
131
  if (!r || k.has(r))
132
132
  return;
133
133
  k.add(r);
134
- const E = r.outerHTML, m = (t = n.closest(".ins-product-td")) == null ? void 0 : t.getAttribute("data-nodup"), T = L.get(E) ?? { number: d, type: p, wrap: [] };
135
- T.wrap.push(m !== "false"), L.set(E, T);
136
- }), L.forEach(({ number: n, type: d, wrap: p }, r) => {
134
+ const E = r.outerHTML, m = (t = n.closest(".ins-product-td")) == null ? void 0 : t.getAttribute("data-nodup"), T = w.get(E) ?? { number: d, type: p, wrap: [] };
135
+ T.wrap.push(m !== "false"), w.set(E, T);
136
+ }), w.forEach(({ number: n, type: d, wrap: p }, r) => {
137
137
  if (r.includes("{% if") || !p.some(Boolean))
138
138
  return;
139
- const E = w.PAIRS_FOR_EXTENSION.price[d].PRICE, m = w.PAIRS_FOR_EXTENSION.originalPrice[d].PRICE, T = `{% if ${E}_${n} != ${m}_${n} %}`, t = [T, q(T)];
140
- let g = "", o = 0, f = 0, $ = A.indexOf(r);
139
+ const E = L.PAIRS_FOR_EXTENSION.price[d].PRICE, m = L.PAIRS_FOR_EXTENSION.originalPrice[d].PRICE, T = `{% if ${E}_${n} != ${m}_${n} %}`, t = [T, O(T)];
140
+ let g = "", o = 0, u = 0, $ = A.indexOf(r);
141
141
  for (; $ !== -1; ) {
142
- const F = p[f] === !0 && !B(A, $, t);
143
- g += A.slice(o, $) + (F ? `${T}${r}{% endif %}` : r), o = $ + r.length, f += 1, $ = A.indexOf(r, o);
142
+ const H = p[u] === !0 && !v(A, $, t);
143
+ g += A.slice(o, $) + (H ? `${T}${r}{% endif %}` : r), o = $ + r.length, u += 1, $ = A.indexOf(r, o);
144
144
  }
145
145
  A = g + A.slice(o);
146
146
  }), A.replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
147
147
  }
148
148
  export {
149
- Z as pairProductVariables
149
+ K as pairProductVariables
150
150
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.18.1-beta.178a3ec",
3
+ "version": "3.18.1-beta.20bdab6",
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",
@@ -47,7 +47,7 @@
47
47
  "author": "",
48
48
  "license": "ISC",
49
49
  "dependencies": {
50
- "@stripoinc/ui-editor-extensions": "3.9.0",
50
+ "@stripoinc/ui-editor-extensions": "3.10.0",
51
51
  "@useinsider/design-system-organisms": "0.0.3-beta.d816f06",
52
52
  "@useinsider/design-system-vue": "1.5.0",
53
53
  "@vueuse/core": "11.3.0",
@@ -118,7 +118,7 @@
118
118
  },
119
119
  "guido": {
120
120
  "stripo": {
121
- "version": "2.73.0"
121
+ "version": "2.76.0"
122
122
  }
123
123
  }
124
124
  }
@@ -1,20 +0,0 @@
1
- import { SETTINGS_ENUMS as r } from "../enums/settingsEnums.js";
2
- const I = "130px", L = "100%", R = (e) => e === r.ORIENTATION.HORIZONTAL ? I : L, n = {
3
- VERTICAL: "es-p5b es-p5t",
4
- HORIZONTAL: "es-p5l es-p5r"
5
- }, o = "data-items-cell-pad", d = (e) => `${o}="${e ? "v" : "h"}"`, t = (e) => e ? ` ${n.VERTICAL}` : ` ${n.HORIZONTAL}`, E = (e, A) => {
6
- if (!e.includes(o))
7
- return e;
8
- const T = A ? n.HORIZONTAL : n.VERTICAL, s = A ? n.VERTICAL : n.HORIZONTAL, c = A ? "v" : "h";
9
- return e.includes(T) ? e.replace(T, s).replace(new RegExp(`${o}="[hv]"`), `${o}="${c}"`) : e;
10
- };
11
- export {
12
- n as BLOCK_CELL_PADDING,
13
- o as BLOCK_CELL_PAD_ATTR,
14
- I as NAME_HORIZONTAL_MAX_WIDTH,
15
- L as NAME_VERTICAL_MAX_WIDTH,
16
- d as blockCellPadMarker,
17
- t as blockCellPaddingFor,
18
- R as nameMaxWidthFor,
19
- E as reorientBlockCellPadding
20
- };
@@ -1,44 +0,0 @@
1
- /**
2
- * Single owner for the Items card orientation-dependent layout contract (SD-149368).
3
- *
4
- * Two things depend on a card's orientation and are written across several layers:
5
- *
6
- * 1. Name column width — a horizontal card lays the name in a narrow side-by-side
7
- * column, so it is capped; a vertical card gives it a full-width row.
8
- * 2. Block-cell padding — the collapsible price / original-price block-cell carries its
9
- * own inter-cell spacing (horizontal cards pad left/right, vertical cards pad
10
- * top/bottom) so a hidden element removes its own spacing instead of leaving a gap.
11
- *
12
- * Every layer that writes these — template render, layouts/horizontal.html,
13
- * NameTrimmingControl (trimming toggle) and settingsControl (orientation change) — MUST
14
- * derive them here, or a migrated / re-toggled card silently drifts out of sync with
15
- * freshly generated markup (convention B1: cross-layer literals live in one module).
16
- */
17
- export declare const NAME_HORIZONTAL_MAX_WIDTH = "130px";
18
- export declare const NAME_VERTICAL_MAX_WIDTH = "100%";
19
- /** Name max-width for a card orientation. Non-horizontal (incl. undefined) → full width. */
20
- export declare const nameMaxWidthFor: (orientation?: string) => string;
21
- /** Orientation-dependent inter-cell padding classes for a collapsible block-cell. */
22
- export declare const BLOCK_CELL_PADDING: {
23
- readonly VERTICAL: "es-p5b es-p5t";
24
- readonly HORIZONTAL: "es-p5l es-p5r";
25
- };
26
- /**
27
- * Attribute the block-cell carries to mark its LAYOUT-owned padding orientation ('v'|'h').
28
- * The orientation toggle keys off this marker so it only ever rewrites the padding the
29
- * layout itself baked — a user's own es-p* padding classes are never matched or clobbered
30
- * (SD-149368 F1), and a cell without the marker is left untouched rather than mis-swapped.
31
- */
32
- export declare const BLOCK_CELL_PAD_ATTR = "data-items-cell-pad";
33
- /** Marker attribute (`data-items-cell-pad="v|h"`) for a block-cell in the given orientation. */
34
- export declare const blockCellPadMarker: (isVertical: boolean) => string;
35
- /** Padding classes (leading space included) for a block-cell in the given orientation. */
36
- export declare const blockCellPaddingFor: (isVertical: boolean) => string;
37
- /**
38
- * Rewrites a block-cell's LAYOUT-owned padding classes to the target orientation, keyed off
39
- * the BLOCK_CELL_PAD_ATTR marker. The orientation-change rebuild re-injects existing cells
40
- * via getOuterHTML(), which still carry the previous orientation's padding — swap only the
41
- * layout pair (and flip the marker) so price/original-price cells stay padded after a toggle
42
- * (SD-149368 F3), while a user's own padding and any unmarked cell are left alone (F1).
43
- */
44
- export declare const reorientBlockCellPadding: (html: string, toVertical: boolean) => string;