@useinsider/guido 3.1.1-beta.dee5e9c → 3.1.1-beta.e4b695a

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 (49) hide show
  1. package/dist/@types/config/schemas.js +69 -61
  2. package/dist/components/Guido.vue.js +4 -4
  3. package/dist/components/Guido.vue2.js +81 -91
  4. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +7 -7
  5. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +12 -20
  6. package/dist/composables/useHtmlCompiler.js +20 -20
  7. package/dist/composables/usePreviewMode.js +20 -16
  8. package/dist/composables/useSave.js +15 -13
  9. package/dist/config/migrator/checkboxMigrator.js +5 -3
  10. package/dist/config/migrator/radioButtonMigrator.js +14 -12
  11. package/dist/enums/extensions/recommendationBlock.js +14 -11
  12. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +27 -11
  13. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +185 -172
  14. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +94 -92
  15. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +31 -31
  16. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +7 -5
  17. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +30 -29
  18. package/dist/extensions/Blocks/Recommendation/templates/index.js +7 -7
  19. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +3 -1
  20. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +20 -20
  21. package/dist/extensions/Blocks/Recommendation/templates/utils.js +57 -50
  22. package/dist/guido.css +1 -1
  23. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +218 -324
  24. package/dist/package.json.js +1 -1
  25. package/dist/services/recommendationApi.js +15 -15
  26. package/dist/src/@types/config/index.d.ts +1 -1
  27. package/dist/src/@types/config/schemas.d.ts +20 -0
  28. package/dist/src/@types/config/types.d.ts +3 -1
  29. package/dist/src/@types/generic.d.ts +0 -1
  30. package/dist/src/composables/useConfig.d.ts +8 -0
  31. package/dist/src/enums/extensions/recommendationBlock.d.ts +3 -0
  32. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  33. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +5 -0
  34. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +5 -0
  35. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
  36. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
  37. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +20 -3
  38. package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +3 -3
  39. package/dist/src/stores/config.d.ts +72 -0
  40. package/dist/src/stores/preview.d.ts +3 -0
  41. package/dist/src/utils/htmlCompiler.d.ts +2 -1
  42. package/dist/static/styles/base.css.js +2 -7
  43. package/dist/static/styles/components/button.css.js +7 -13
  44. package/dist/static/styles/components/narrow-panel.css.js +0 -52
  45. package/dist/stores/preview.js +4 -3
  46. package/dist/utils/htmlCompiler.js +48 -41
  47. package/dist/utils/templatePreparation.js +20 -20
  48. package/dist/utils/tooltipUtils.js +4 -5
  49. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.59.0" } }, s = {
1
+ const o = { stripo: { version: "2.54.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -1,34 +1,34 @@
1
- import { useHttp as c } from "../composables/useHttp.js";
2
- import { URLS as m } from "../enums/extensions/recommendationBlock.js";
3
- const f = () => {
4
- const { get: o } = c();
1
+ import { useHttp as a } from "../composables/useHttp.js";
2
+ import { QUERY_PARAMS as d, URLS as h } from "../enums/extensions/recommendationBlock.js";
3
+ const y = () => {
4
+ const { get: r } = a(), { get: s } = a({ headers: {} }), m = "6KcLM9TwheVB1mgK";
5
5
  return {
6
6
  fetchRecommendationCreateData: async () => {
7
7
  try {
8
- return (await o("/newsletter/recommendations/create-data")).data;
8
+ return (await r("/newsletter/recommendations/create-data")).data;
9
9
  } catch (e) {
10
10
  throw console.error("fetchUserModalState error:", e), e;
11
11
  }
12
12
  },
13
13
  fetchRecommendationFilters: async () => {
14
14
  try {
15
- const { data: e } = await o("/stripo/email-recommendation-attributes");
15
+ const { data: e } = await r("/stripo/email-recommendation-attributes");
16
16
  return e;
17
17
  } catch (e) {
18
18
  throw console.error("fetchRecommendationFilters error:", e), e;
19
19
  }
20
20
  },
21
- fetchRecommendationProducts: async (e, a) => {
21
+ fetchRecommendationProducts: async (e, i) => {
22
22
  var n;
23
23
  try {
24
- const t = decodeURIComponent(new URLSearchParams(Object.entries(a)).toString());
25
- console.debug("🏁 Recommendation API Query:", t);
26
- const { get: s } = c({
27
- headers: {}
28
- }), r = await s(
29
- `${m.RECOMMENDATION_API_URL}/v2/${e}?${t}`
24
+ const t = new URLSearchParams(Object.entries(i));
25
+ t.set(d.CLIENT_ID, m);
26
+ const c = decodeURIComponent(t.toString());
27
+ console.debug("🏁 Recommendation API Query:", c);
28
+ const o = await s(
29
+ `${h.RECOMMENDATION_API_URL}/v2/${e}?${c}`
30
30
  );
31
- return ((n = r == null ? void 0 : r.data) == null ? void 0 : n.data) ?? [];
31
+ return ((n = o == null ? void 0 : o.data) == null ? void 0 : n.data) ?? [];
32
32
  } catch (t) {
33
33
  throw console.error("fetchRecommendationProducts error:", t), t;
34
34
  }
@@ -36,5 +36,5 @@ const f = () => {
36
36
  };
37
37
  };
38
38
  export {
39
- f as useRecommendationApi
39
+ y as useRecommendationApi
40
40
  };
@@ -8,7 +8,7 @@
8
8
  * - Validation utilities
9
9
  */
10
10
  export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
11
- export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput, ExternalValidationHandler, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
11
+ export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, FallbackFont, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput, ExternalValidationHandler, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
12
12
  export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_EDITOR, DEFAULT_UI, DEFAULT_FEATURES, DEFAULT_BLOCKS, DEFAULT_COMPILER, DEFAULT_PRODUCT_TYPE, DEFAULT_MESSAGE_TYPE, DEFAULT_USERNAME, EDITOR_TYPE, TEST_PARTNERS, isTestPartner, } from './defaults';
13
13
  export { validateConfig, parseConfig, parseConfigSafe, getValidationErrors, isValidConfig, validateIdentity, validatePartner, } from './validator';
14
14
  export type { ValidationResult, ValidationError, } from './validator';
@@ -47,6 +47,12 @@ export declare const IdentitySchema: v.ObjectSchema<{
47
47
  /**
48
48
  * Partner configuration - organization and product context
49
49
  */
50
+ export declare const FallbackFontSchema: v.ObjectSchema<{
51
+ /** Fallback font name (e.g., "Georgia") */
52
+ readonly name: v.StringSchema<undefined>;
53
+ /** Fallback font family (e.g., "serif" or "sans-serif") */
54
+ readonly family: v.StringSchema<undefined>;
55
+ }, undefined>;
50
56
  export declare const PartnerSchema: v.ObjectSchema<{
51
57
  /** Partner/organization name (required) */
52
58
  readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "partner.name is required">]>;
@@ -56,6 +62,13 @@ export declare const PartnerSchema: v.ObjectSchema<{
56
62
  readonly messageType: v.OptionalSchema<v.PicklistSchema<[1, 2], undefined>, 1>;
57
63
  /** Display name for the current user */
58
64
  readonly username: v.OptionalSchema<v.StringSchema<undefined>, "Guido User">;
65
+ /** Fallback font settings from partner settings — used to match backend size calculation */
66
+ readonly fallbackFont: v.OptionalSchema<v.ObjectSchema<{
67
+ /** Fallback font name (e.g., "Georgia") */
68
+ readonly name: v.StringSchema<undefined>;
69
+ /** Fallback font family (e.g., "serif" or "sans-serif") */
70
+ readonly family: v.StringSchema<undefined>;
71
+ }, undefined>, undefined>;
59
72
  }, undefined>;
60
73
  /**
61
74
  * Dynamic content item schema
@@ -403,6 +416,13 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
403
416
  readonly messageType: v.OptionalSchema<v.PicklistSchema<[1, 2], undefined>, 1>;
404
417
  /** Display name for the current user */
405
418
  readonly username: v.OptionalSchema<v.StringSchema<undefined>, "Guido User">;
419
+ /** Fallback font settings from partner settings — used to match backend size calculation */
420
+ readonly fallbackFont: v.OptionalSchema<v.ObjectSchema<{
421
+ /** Fallback font name (e.g., "Georgia") */
422
+ readonly name: v.StringSchema<undefined>;
423
+ /** Fallback font family (e.g., "serif" or "sans-serif") */
424
+ readonly family: v.StringSchema<undefined>;
425
+ }, undefined>, undefined>;
406
426
  }, undefined>;
407
427
  /** Template content and presets */
408
428
  readonly template: v.OptionalSchema<v.ObjectSchema<{
@@ -5,7 +5,7 @@
5
5
  * This ensures type definitions are always in sync with validation.
6
6
  * @module @types/config/types
7
7
  */
8
- import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, ExternalValidationHandler } from './schemas';
8
+ import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, FallbackFontSchema, ExternalValidationHandler } from './schemas';
9
9
  import type * as v from 'valibot';
10
10
  /**
11
11
  * Complete validated Guido configuration.
@@ -29,6 +29,8 @@ export type GuidoConfig = v.InferOutput<typeof GuidoConfigSchema>;
29
29
  export type IdentityConfig = v.InferOutput<typeof IdentitySchema>;
30
30
  /** Partner configuration (name, productType, messageType, username) */
31
31
  export type PartnerConfig = v.InferOutput<typeof PartnerSchema>;
32
+ /** Fallback font settings for backend size calculation alignment */
33
+ export type FallbackFont = v.InferOutput<typeof FallbackFontSchema>;
32
34
  /** Template configuration (html, css, dynamic content, unsubscribe pages) */
33
35
  export type TemplateConfig = v.InferOutput<typeof TemplateSchema>;
34
36
  /** Editor configuration (locale, translations, migration date, email header) */
@@ -44,7 +44,6 @@ export interface TooltipOptions {
44
44
  x: number;
45
45
  y: number;
46
46
  };
47
- preventXss?: boolean;
48
47
  }
49
48
  export type TextValueObject = {
50
49
  text: string;
@@ -17,6 +17,10 @@ export declare const useConfig: () => {
17
17
  productType: 60 | 49 | 97;
18
18
  messageType: 1 | 2;
19
19
  username: string;
20
+ fallbackFont?: {
21
+ name: string;
22
+ family: string;
23
+ } | undefined;
20
24
  };
21
25
  template: {
22
26
  html: string;
@@ -109,6 +113,10 @@ export declare const useConfig: () => {
109
113
  productType: 60 | 49 | 97;
110
114
  messageType: 1 | 2;
111
115
  username: string;
116
+ fallbackFont?: {
117
+ name: string;
118
+ family: string;
119
+ } | undefined;
112
120
  } | null>;
113
121
  template: import("vue").ComputedRef<{
114
122
  html: string;
@@ -3,6 +3,9 @@ import type { RecommendationFeedItem } from '@@/Types/recommendation';
3
3
  export declare const URLS: {
4
4
  RECOMMENDATION_API_URL: string;
5
5
  };
6
+ export declare const QUERY_PARAMS: {
7
+ CLIENT_ID: string;
8
+ };
6
9
  export declare const RecommendationFeedSourceMaps: RecommendationFeedItem[];
7
10
  export declare const PriceAttributes: string[];
8
11
  export declare const currencyLocationMaps: TextValueObject[];
@@ -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, 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, } from './selectors';
11
+ export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, 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';
@@ -50,3 +50,8 @@ export declare const ATTR_CUSTOM_PREFIX = "customAttr:";
50
50
  export declare const ATTR_DATA_CUSTOM_ATTRIBUTES = "data-custom-attributes";
51
51
  /** HTML attribute on <td> elements identifying the product attribute for compiler template variable generation */
52
52
  export declare const ATTR_PRODUCT_ATTR = "product-attr";
53
+ /**
54
+ * Default attribute names that are already represented by built-in composition toggle items.
55
+ * Used to exclude these from the custom attribute dropdown to prevent duplication with toggles.
56
+ */
57
+ export declare const BUILT_IN_DEFAULT_ATTRIBUTES: Set<string>;
@@ -170,6 +170,11 @@ export declare class RecommendationCardCompositionControl extends CommonControl
170
170
  * When filterList changes (e.g. after async fetch), re-renders dropdowns with new options.
171
171
  */
172
172
  private _subscribeToStoreChanges;
173
+ /**
174
+ * Returns filters eligible for the custom attribute dropdown,
175
+ * excluding default attributes already covered by built-in toggle items.
176
+ */
177
+ private _getAddableFilters;
173
178
  /**
174
179
  * Looks up the display name for an attribute from the store's filterList.
175
180
  * Falls back to Title Case conversion of the snake_case attribute name.
@@ -1,4 +1,4 @@
1
- import type { RecommendationProduct } from '@@/Types/recommendation';
1
+ import type { FiltersResponse, RecommendationProduct } from '@@/Types/recommendation';
2
2
  import { type ElementRenderer } from '../utils';
3
3
  /**
4
4
  * Generates attribute-aligned product rows for grid layout.
@@ -9,7 +9,7 @@ import { type ElementRenderer } from '../utils';
9
9
  * @param composition - Array defining order of card elements
10
10
  * @returns HTML string for attribute-aligned rows
11
11
  */
12
- export declare function prepareGridAttributeRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[]): string;
12
+ export declare function prepareGridAttributeRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[], filterList?: FiltersResponse): string;
13
13
  /**
14
14
  * Prepares grid product rows with attribute-aligned structure
15
15
  * Groups products into rows, then generates attribute-aligned HTML for each group
@@ -19,7 +19,7 @@ export declare function prepareGridAttributeRows(products: RecommendationProduct
19
19
  * @param composition - Array defining order of card elements
20
20
  * @returns HTML string for all product rows
21
21
  */
22
- export declare function prepareGridProductRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[]): string;
22
+ export declare function prepareGridProductRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[], filterList?: FiltersResponse): string;
23
23
  /**
24
24
  * Prepares grid product rows with attribute-aligned structure.
25
25
  * Uses row-based rendering where each attribute type forms a single row across all products.
@@ -28,6 +28,6 @@ export declare function prepareGridProductRows(products: RecommendationProduct[]
28
28
  * @param composition - Array defining element order
29
29
  * @returns HTML string for product rows
30
30
  */
31
- export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
31
+ export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[], filterList?: FiltersResponse): string;
32
32
  export declare function getDefaultTemplate(recommendationId?: number): string;
33
33
  export declare function generateBlockTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[], mobileProductsPerRow?: number): string;
@@ -1,4 +1,4 @@
1
- import type { RecommendationProduct } from '@@/Types/recommendation';
1
+ import type { FiltersResponse, RecommendationProduct } from '@@/Types/recommendation';
2
2
  /**
3
3
  * Generates a list product card with 3-column layout
4
4
  * Uses buildElementRenderer to render Image, Info content, and Button
@@ -11,7 +11,7 @@ import type { RecommendationProduct } from '@@/Types/recommendation';
11
11
  * @param composition - Array defining order of card elements
12
12
  * @returns HTML string for a single product card row
13
13
  */
14
- export declare function getListProductCard(product: RecommendationProduct, composition?: string[]): string;
14
+ export declare function getListProductCard(product: RecommendationProduct, composition?: string[], filterList?: FiltersResponse): string;
15
15
  /**
16
16
  * Prepares list product rows
17
17
  * Each product is a full-width row with 3-column layout
@@ -19,6 +19,6 @@ export declare function getListProductCard(product: RecommendationProduct, compo
19
19
  * @param composition - Array defining order of card elements
20
20
  * @returns HTML string for product rows
21
21
  */
22
- export declare function prepareProductRows(products: RecommendationProduct[], composition?: string[]): string;
22
+ export declare function prepareProductRows(products: RecommendationProduct[], composition?: string[], filterList?: FiltersResponse): string;
23
23
  export declare function getDefaultTemplate(): string;
24
24
  export declare function generateBlockTemplate(products: RecommendationProduct[], title?: string, composition?: string[]): string;
@@ -1,15 +1,29 @@
1
- import type { RecommendationProduct } from '@@/Types/recommendation';
1
+ import type { FiltersResponse, RecommendationProduct } from '@@/Types/recommendation';
2
2
  import { ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON } from '../constants';
3
3
  /**
4
4
  * Converts a snake_case attribute name to Title Case display name.
5
5
  * e.g., "rating_star" → "Rating Star"
6
6
  */
7
7
  export declare function toDisplayName(attrName: string): string;
8
+ /**
9
+ * Checks whether an attribute is a default (top-level) product attribute
10
+ * vs a custom product attribute (nested under `product_attributes`).
11
+ * Returns false when filterList is empty or the attribute is not found.
12
+ */
13
+ export declare function isDefaultAttribute(attrName: string, filterList: FiltersResponse): boolean;
14
+ /**
15
+ * Resolves the `product-attr` HTML attribute value based on attribute type from the filter list.
16
+ * - Default attributes → attribute name directly (e.g., "brand") → compiles to `{{1_0_brand}}`
17
+ * - Product attributes → "product_attribute.<name>" (e.g., "product_attribute.rating_star")
18
+ */
19
+ export declare function resolveProductAttrValue(attrName: string, filterList: FiltersResponse): string;
8
20
  /**
9
21
  * Callback that generates the cell HTML for a custom product attribute.
10
22
  * Layout-specific: grid returns `<td>…`, list returns `<tr><td>…</td></tr>`.
23
+ * @param productAttrValue - The resolved `product-attr` value (e.g., "brand" or "product_attribute.rating_star")
24
+ * @param content - The display content for the cell
11
25
  */
12
- export type CustomCellHtmlGetter = (attrName: string, content: string) => string;
26
+ export type CustomCellHtmlGetter = (productAttrValue: string, content: string) => string;
13
27
  /**
14
28
  * Symbol key for embedding custom attribute HTML in an ElementRenderer.
15
29
  * Grid and list renderers store their custom-attribute cell template under this key
@@ -28,8 +42,9 @@ export declare const CUSTOM_CELL_HTML: unique symbol;
28
42
  * alongside built-in ones, so template code can use a uniform lookup for all attributes.
29
43
  * @param baseRenderer - The built-in element renderer (grid or list), must include a [CUSTOM_CELL_HTML] entry
30
44
  * @param composition - Array of attribute keys including `customAttr:*` entries
45
+ * @param filterList - Filter list from the store, used to determine attribute type for correct product-attr resolution
31
46
  */
32
- export declare function buildElementRenderer(baseRenderer: ElementRenderer, composition: string[]): ElementRenderer;
47
+ export declare function buildElementRenderer(baseRenderer: ElementRenderer, composition: string[], filterList?: FiltersResponse): ElementRenderer;
33
48
  export type Orientation = 'list' | 'grid';
34
49
  /**
35
50
  * Options for prepareProductRows unified function
@@ -41,6 +56,8 @@ export interface PrepareProductRowsOptions {
41
56
  mobileProductsPerRow?: number;
42
57
  /** Array defining order of card elements */
43
58
  composition?: string[];
59
+ /** Filter list for attribute type resolution (default vs product attributes) */
60
+ filterList?: FiltersResponse;
44
61
  }
45
62
  /**
46
63
  * Element renderer interface for product card elements.
@@ -15,7 +15,7 @@ export interface NodeWithGetStyle {
15
15
  }
16
16
  /** Interface for nodes with parent method */
17
17
  export interface NodeWithParent {
18
- parent: () => ImmutableHtmlNode | undefined;
18
+ parent: () => ImmutableHtmlNode | null;
19
19
  }
20
20
  /**
21
21
  * Type guard to check if a node has getStyle method
@@ -38,13 +38,13 @@ export declare function isTdNode(node: unknown): node is ImmutableHtmlNode & Nod
38
38
  * @param property - The CSS property name
39
39
  * @returns The style value or null if not accessible
40
40
  */
41
- export declare function safeGetStyle(node: ImmutableHtmlNode | null | undefined, property: string): string | null | undefined;
41
+ export declare function safeGetStyle(node: ImmutableHtmlNode | null, property: string): string | null | undefined;
42
42
  /**
43
43
  * Safely retrieves the parent element of a node
44
44
  * @param node - The node to get the parent from
45
45
  * @returns The parent node or null if not accessible
46
46
  */
47
- export declare function safeGetParent(node: ImmutableHtmlNode | null | undefined): ImmutableHtmlNode | null;
47
+ export declare function safeGetParent(node: ImmutableHtmlNode | null): ImmutableHtmlNode | null;
48
48
  /**
49
49
  * Safely retrieves the tag name from a node.
50
50
  * Handles both standard DOM tagName property and Stripo's getTagName() method.
@@ -22,6 +22,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
22
22
  productType: 60 | 49 | 97;
23
23
  messageType: 1 | 2;
24
24
  username: string;
25
+ fallbackFont?: {
26
+ name: string;
27
+ family: string;
28
+ } | undefined;
25
29
  };
26
30
  template: {
27
31
  html: string;
@@ -120,6 +124,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
120
124
  productType: 60 | 49 | 97;
121
125
  messageType: 1 | 2;
122
126
  username: string;
127
+ fallbackFont?: {
128
+ name: string;
129
+ family: string;
130
+ } | undefined;
123
131
  };
124
132
  template: {
125
133
  html: string;
@@ -218,6 +226,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
218
226
  productType: 60 | 49 | 97;
219
227
  messageType: 1 | 2;
220
228
  username: string;
229
+ fallbackFont?: {
230
+ name: string;
231
+ family: string;
232
+ } | undefined;
221
233
  };
222
234
  template: {
223
235
  html: string;
@@ -316,6 +328,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
316
328
  productType: 60 | 49 | 97;
317
329
  messageType: 1 | 2;
318
330
  username: string;
331
+ fallbackFont?: {
332
+ name: string;
333
+ family: string;
334
+ } | undefined;
319
335
  };
320
336
  template: {
321
337
  html: string;
@@ -414,6 +430,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
414
430
  productType: 60 | 49 | 97;
415
431
  messageType: 1 | 2;
416
432
  username: string;
433
+ fallbackFont?: {
434
+ name: string;
435
+ family: string;
436
+ } | undefined;
417
437
  };
418
438
  template: {
419
439
  html: string;
@@ -512,6 +532,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
512
532
  productType: 60 | 49 | 97;
513
533
  messageType: 1 | 2;
514
534
  username: string;
535
+ fallbackFont?: {
536
+ name: string;
537
+ family: string;
538
+ } | undefined;
515
539
  };
516
540
  template: {
517
541
  html: string;
@@ -610,6 +634,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
610
634
  productType: 60 | 49 | 97;
611
635
  messageType: 1 | 2;
612
636
  username: string;
637
+ fallbackFont?: {
638
+ name: string;
639
+ family: string;
640
+ } | undefined;
613
641
  };
614
642
  template: {
615
643
  html: string;
@@ -708,6 +736,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
708
736
  productType: 60 | 49 | 97;
709
737
  messageType: 1 | 2;
710
738
  username: string;
739
+ fallbackFont?: {
740
+ name: string;
741
+ family: string;
742
+ } | undefined;
711
743
  };
712
744
  template: {
713
745
  html: string;
@@ -806,6 +838,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
806
838
  productType: 60 | 49 | 97;
807
839
  messageType: 1 | 2;
808
840
  username: string;
841
+ fallbackFont?: {
842
+ name: string;
843
+ family: string;
844
+ } | undefined;
809
845
  };
810
846
  template: {
811
847
  html: string;
@@ -904,6 +940,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
904
940
  productType: 60 | 49 | 97;
905
941
  messageType: 1 | 2;
906
942
  username: string;
943
+ fallbackFont?: {
944
+ name: string;
945
+ family: string;
946
+ } | undefined;
907
947
  };
908
948
  template: {
909
949
  html: string;
@@ -1002,6 +1042,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1002
1042
  productType: 60 | 49 | 97;
1003
1043
  messageType: 1 | 2;
1004
1044
  username: string;
1045
+ fallbackFont?: {
1046
+ name: string;
1047
+ family: string;
1048
+ } | undefined;
1005
1049
  };
1006
1050
  template: {
1007
1051
  html: string;
@@ -1100,6 +1144,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1100
1144
  productType: 60 | 49 | 97;
1101
1145
  messageType: 1 | 2;
1102
1146
  username: string;
1147
+ fallbackFont?: {
1148
+ name: string;
1149
+ family: string;
1150
+ } | undefined;
1103
1151
  };
1104
1152
  template: {
1105
1153
  html: string;
@@ -1198,6 +1246,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1198
1246
  productType: 60 | 49 | 97;
1199
1247
  messageType: 1 | 2;
1200
1248
  username: string;
1249
+ fallbackFont?: {
1250
+ name: string;
1251
+ family: string;
1252
+ } | undefined;
1201
1253
  };
1202
1254
  template: {
1203
1255
  html: string;
@@ -1296,6 +1348,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1296
1348
  productType: 60 | 49 | 97;
1297
1349
  messageType: 1 | 2;
1298
1350
  username: string;
1351
+ fallbackFont?: {
1352
+ name: string;
1353
+ family: string;
1354
+ } | undefined;
1299
1355
  };
1300
1356
  template: {
1301
1357
  html: string;
@@ -1394,6 +1450,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1394
1450
  productType: 60 | 49 | 97;
1395
1451
  messageType: 1 | 2;
1396
1452
  username: string;
1453
+ fallbackFont?: {
1454
+ name: string;
1455
+ family: string;
1456
+ } | undefined;
1397
1457
  };
1398
1458
  template: {
1399
1459
  html: string;
@@ -1492,6 +1552,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1492
1552
  productType: 60 | 49 | 97;
1493
1553
  messageType: 1 | 2;
1494
1554
  username: string;
1555
+ fallbackFont?: {
1556
+ name: string;
1557
+ family: string;
1558
+ } | undefined;
1495
1559
  };
1496
1560
  template: {
1497
1561
  html: string;
@@ -1590,6 +1654,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1590
1654
  productType: 60 | 49 | 97;
1591
1655
  messageType: 1 | 2;
1592
1656
  username: string;
1657
+ fallbackFont?: {
1658
+ name: string;
1659
+ family: string;
1660
+ } | undefined;
1593
1661
  };
1594
1662
  template: {
1595
1663
  html: string;
@@ -1688,6 +1756,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1688
1756
  productType: 60 | 49 | 97;
1689
1757
  messageType: 1 | 2;
1690
1758
  username: string;
1759
+ fallbackFont?: {
1760
+ name: string;
1761
+ family: string;
1762
+ } | undefined;
1691
1763
  };
1692
1764
  template: {
1693
1765
  html: string;
@@ -7,6 +7,7 @@ export declare const usePreviewStore: import("pinia").StoreDefinition<"guidoPrev
7
7
  templateHtml: string;
8
8
  isLoaded: boolean;
9
9
  isAMPErrorModalVisible: boolean;
10
+ emailSizeKB: number;
10
11
  } & import("pinia").PiniaCustomStateProperties<PreviewState>) => boolean;
11
12
  previewHtml(): string;
12
13
  hasAMP: (state: {
@@ -16,6 +17,7 @@ export declare const usePreviewStore: import("pinia").StoreDefinition<"guidoPrev
16
17
  templateHtml: string;
17
18
  isLoaded: boolean;
18
19
  isAMPErrorModalVisible: boolean;
20
+ emailSizeKB: number;
19
21
  } & import("pinia").PiniaCustomStateProperties<PreviewState>) => boolean;
20
22
  hasAMPErrors: (state: {
21
23
  emailFormat: EmailFormat;
@@ -24,6 +26,7 @@ export declare const usePreviewStore: import("pinia").StoreDefinition<"guidoPrev
24
26
  templateHtml: string;
25
27
  isLoaded: boolean;
26
28
  isAMPErrorModalVisible: boolean;
29
+ emailSizeKB: number;
27
30
  } & import("pinia").PiniaCustomStateProperties<PreviewState>) => boolean;
28
31
  showAMPErrorButton(): boolean;
29
32
  isAMPResponsive(): boolean;
@@ -1,8 +1,9 @@
1
+ import type { FallbackFont } from '@@/Types/config';
1
2
  import type { CompilerRule, CompilationResult, HtmlCompiler } from '@@/Types/html-compiler';
2
3
  export declare class HtmlCompilerEngine implements HtmlCompiler {
3
4
  private rules;
4
5
  constructor(rules?: CompilerRule[]);
5
- compile(html: string, rules?: CompilerRule[]): CompilationResult;
6
+ compile(html: string, rules?: CompilerRule[], fallbackFont?: FallbackFont): CompilationResult;
6
7
  private applyRule;
7
8
  private applyReplaceRule;
8
9
  private applyRegexRule;
@@ -1,16 +1,11 @@
1
- const n = `.amp-input-list,
1
+ const t = `.amp-input-list,
2
2
  .button,
3
3
  .base-input,
4
4
  ue-stripe-thumb,
5
5
  .ue-stripe-thumb {
6
6
  transition: all .5s ease;
7
7
  }
8
-
9
- :host {
10
- height: 100% !important;
11
- min-height: 0 !important;
12
- }
13
8
  `;
14
9
  export {
15
- n as default
10
+ t as default
16
11
  };
@@ -99,12 +99,18 @@ ue-check-button.checked:not(.flat-white) input:checked + label .icon-button {
99
99
  color: var(--guido-color-primary-500);
100
100
  }
101
101
 
102
+ ue-select.full-width .button {
103
+ border: none !important;
104
+ background-color: var(--guido-color-neutral-200) !important;
105
+ color: var(--guido-color-neutral-800) !important;
106
+ }
107
+
102
108
  ue-select.full-width .button .icon-button {
103
109
  color: var(--guido-color-gray-600) !important;
104
110
  }
105
111
 
106
112
  ue-select.full-width .button:hover:not(:disabled,.disabled) {
107
- background-color: var(--guido-color-gray-0) !important;
113
+ background-color: var(--guido-color-neutral-100) !important;
108
114
  }
109
115
 
110
116
  ue-color {
@@ -124,18 +130,6 @@ ue-select-text-input .select-text-input-toggle .button {
124
130
  justify-content: center;
125
131
  background-color: transparent !important;
126
132
  }
127
-
128
- .control-shadow-wrapper,
129
- ue-button:not(.no-shadow,.flat-white),
130
- ue-toggle:not(.no-shadow,.flat-white),
131
- :is(ue-popover-toggler,ue-toggle-icon-picker,ue-emoji-toggle),
132
- .button-group,
133
- ue-counter:not(.no-shadow),
134
- :is(ue-select,ue-mergetags,ue-font-family-select):not(.no-shadow),
135
- ue-check-button:not(.no-shadow,.flat-white) {
136
- background: none;
137
- padding: 0;
138
- }
139
133
  `;
140
134
  export {
141
135
  o as default