@useinsider/guido 3.2.0-beta.e01b42a → 3.2.0-beta.e0e56ef

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 (152) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +164 -96
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +91 -80
  5. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +7 -7
  6. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +12 -20
  7. package/dist/components/organisms/header/EditorActions.vue.js +2 -2
  8. package/dist/components/organisms/header/EditorActions.vue2.js +51 -36
  9. package/dist/components/organisms/header/RightSlot.vue.js +10 -10
  10. package/dist/components/organisms/header/RightSlot.vue2.js +16 -13
  11. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
  12. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  13. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
  14. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
  15. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
  16. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  17. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
  18. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
  19. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +18 -17
  20. package/dist/composables/useActionsApi.js +4 -4
  21. package/dist/composables/useFullStoryBridge.js +14 -0
  22. package/dist/composables/useHtmlCompiler.js +23 -21
  23. package/dist/composables/useHtmlValidator.js +40 -38
  24. package/dist/composables/usePreviewMode.js +20 -16
  25. package/dist/composables/useRibbonOffset.js +21 -0
  26. package/dist/composables/useSave.js +23 -15
  27. package/dist/composables/useStripo.js +52 -47
  28. package/dist/composables/validators/useLiquidValidator.js +42 -0
  29. package/dist/config/compiler/liquidCompilerRules.js +15 -0
  30. package/dist/config/compiler/recommendationCompilerRules.js +162 -43
  31. package/dist/config/compiler/unsubscribeCompilerRules.js +48 -45
  32. package/dist/config/compiler/utils/recommendationCompilerUtils.js +52 -46
  33. package/dist/config/migrator/checkboxMigrator.js +5 -3
  34. package/dist/config/migrator/index.js +9 -9
  35. package/dist/config/migrator/radioButtonMigrator.js +14 -12
  36. package/dist/config/migrator/recommendation/compositionMapper.js +98 -0
  37. package/dist/config/migrator/recommendation/extractors.js +27 -0
  38. package/dist/config/migrator/recommendation/htmlBuilder.js +496 -0
  39. package/dist/config/migrator/recommendation/parseLegacyConfig.js +33 -0
  40. package/dist/config/migrator/recommendation/settingsMapper.js +78 -0
  41. package/dist/config/migrator/recommendation/themeMapper.js +93 -0
  42. package/dist/config/migrator/recommendationMigrator.js +74 -290
  43. package/dist/enums/extensions/recommendationBlock.js +16 -12
  44. package/dist/enums/onboarding.js +7 -2
  45. package/dist/enums/recommendation.js +2 -2
  46. package/dist/enums/unsubscribe.js +34 -27
  47. package/dist/extensions/Blocks/CouponBlock/template.js +24 -13
  48. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +38 -38
  49. package/dist/extensions/Blocks/Items/enums/productEnums.js +19 -7
  50. package/dist/extensions/Blocks/Recommendation/block.js +35 -32
  51. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  52. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +5 -5
  53. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +27 -11
  54. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +185 -172
  55. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
  56. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
  57. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +6 -6
  58. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
  59. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +211 -162
  60. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
  61. package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
  62. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +31 -31
  63. package/dist/extensions/Blocks/Recommendation/services/configService.js +65 -29
  64. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
  65. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +29 -25
  66. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +7 -5
  67. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +30 -29
  68. package/dist/extensions/Blocks/Recommendation/templates/index.js +7 -7
  69. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +3 -1
  70. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +21 -21
  71. package/dist/extensions/Blocks/Recommendation/templates/utils.js +57 -50
  72. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
  73. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +13 -22
  74. package/dist/extensions/Blocks/Unsubscribe/block.js +11 -11
  75. package/dist/extensions/DynamicContent/dynamic-content.js +17 -12
  76. package/dist/guido.css +1 -1
  77. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -235
  78. package/dist/node_modules/valibot/dist/index.js +450 -235
  79. package/dist/package.json.js +1 -1
  80. package/dist/services/recommendationApi.js +15 -15
  81. package/dist/services/stripoApi.js +9 -9
  82. package/dist/services/templateLibraryApi.js +48 -46
  83. package/dist/src/@types/config/defaults.d.ts +5 -1
  84. package/dist/src/@types/config/index.d.ts +3 -3
  85. package/dist/src/@types/config/schemas.d.ts +241 -0
  86. package/dist/src/@types/config/types.d.ts +11 -1
  87. package/dist/src/@types/generic.d.ts +0 -1
  88. package/dist/src/@types/save-as-template.d.ts +1 -0
  89. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  90. package/dist/src/composables/useActionsApi.d.ts +1 -1
  91. package/dist/src/composables/useConfig.d.ts +68 -0
  92. package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
  93. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  94. package/dist/src/composables/validators/useLiquidValidator.d.ts +3 -0
  95. package/dist/src/config/compiler/liquidCompilerRules.d.ts +2 -0
  96. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +1 -1
  97. package/dist/src/config/migrator/index.d.ts +2 -1
  98. package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +2 -0
  99. package/dist/src/config/migrator/recommendation/compositionMapper.test.d.ts +1 -0
  100. package/dist/src/config/migrator/recommendation/extractors.d.ts +7 -0
  101. package/dist/src/config/migrator/recommendation/extractors.test.d.ts +1 -0
  102. package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +11 -0
  103. package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +15 -0
  104. package/dist/src/config/migrator/recommendation/parseLegacyConfig.test.d.ts +1 -0
  105. package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +7 -0
  106. package/dist/src/config/migrator/recommendation/settingsMapper.test.d.ts +1 -0
  107. package/dist/src/config/migrator/recommendation/themeMapper.d.ts +5 -0
  108. package/dist/src/config/migrator/recommendation/themeMapper.test.d.ts +1 -0
  109. package/dist/src/config/migrator/recommendation/types.d.ts +205 -0
  110. package/dist/src/config/migrator/recommendationMigrator.d.ts +13 -1
  111. package/dist/src/config/migrator/recommendationMigrator.test.d.ts +1 -0
  112. package/dist/src/enums/extensions/recommendationBlock.d.ts +3 -0
  113. package/dist/src/enums/onboarding.d.ts +6 -0
  114. package/dist/src/enums/unsubscribe.d.ts +5 -0
  115. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +2 -0
  116. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  117. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  118. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +5 -0
  119. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +5 -0
  120. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
  121. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
  122. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.test.d.ts +1 -0
  123. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
  124. package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
  125. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +10 -0
  126. package/dist/src/extensions/Blocks/Recommendation/services/configService.test.d.ts +1 -0
  127. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
  128. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
  129. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +20 -3
  130. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -1
  131. package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -3
  132. package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +3 -3
  133. package/dist/src/services/templateLibraryApi.d.ts +1 -1
  134. package/dist/src/stores/config.d.ts +612 -0
  135. package/dist/src/stores/onboarding.d.ts +4 -0
  136. package/dist/src/stores/preview.d.ts +3 -0
  137. package/dist/src/utils/genericUtil.d.ts +1 -1
  138. package/dist/src/utils/htmlCompiler.d.ts +2 -1
  139. package/dist/src/utils/htmlEscape.d.ts +5 -0
  140. package/dist/src/utils/htmlEscape.test.d.ts +1 -0
  141. package/dist/static/styles/base.css.js +7 -2
  142. package/dist/static/styles/components/button.css.js +3 -2
  143. package/dist/static/styles/components/loader.css.js +4 -0
  144. package/dist/stores/onboarding.js +4 -0
  145. package/dist/stores/preview.js +4 -3
  146. package/dist/utils/genericUtil.js +42 -20
  147. package/dist/utils/htmlCompiler.js +48 -41
  148. package/dist/utils/htmlEscape.js +13 -0
  149. package/dist/utils/templatePreparation.js +36 -25
  150. package/dist/utils/tooltipUtils.js +4 -5
  151. package/package.json +8 -4
  152. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Shared Text Trim CSS Rule Management
3
+ *
4
+ * Extracted from NameTextTrimControl to be reused by CustomAttributeTextTrimControl.
5
+ * Follows the same pattern as controls/mobileLayout/cssRules.ts — standalone
6
+ * functions that accept an API parameter, importable by any control class.
7
+ *
8
+ * The CSS rules are document-scoped (shared across all recommendation blocks).
9
+ * Once injected, they persist until the template is closed.
10
+ */
11
+ import type { ImmutableCssNode } from '@stripoinc/ui-editor-extensions';
12
+ import { ModificationDescription } from '@stripoinc/ui-editor-extensions';
13
+ export declare const CSS_CLASS_TEXT_TRIM = "text-trim-enabled";
14
+ interface CssCapableApi {
15
+ getDocumentRootCssNode: () => ImmutableCssNode | null;
16
+ getDocumentModifier: () => {
17
+ modifyCss: (node: ImmutableCssNode) => {
18
+ appendRule: (rule: string) => void;
19
+ };
20
+ apply: (desc: ModificationDescription) => void;
21
+ };
22
+ }
23
+ /**
24
+ * Ensures the text-trim CSS rules exist in the document stylesheet.
25
+ * Only adds rules if they don't already exist (prevents duplicates across blocks).
26
+ * Calls getDocumentRootCssNode once and passes it to both checks.
27
+ */
28
+ export declare function ensureTextTrimCssRulesExist(api: CssCapableApi): void;
29
+ export {};
@@ -119,6 +119,16 @@ export declare class RecommendationConfigService {
119
119
  *
120
120
  * Reads existing data-attributes and creates a proper node config.
121
121
  * Used when loading templates created before node config was implemented.
122
+ *
123
+ * Sources, in priority order (later overrides earlier):
124
+ * 1. `esd-ext-config` JSON blob — emitted by the recommendation migrator and
125
+ * by hand-authored new templates. Carries the full RecommendationNodeConfig
126
+ * (strategy, language, currency, filters, productIds, etc.) which the
127
+ * discrete data-* attrs below cannot capture.
128
+ * 2. Discrete `data-*` attributes — runtime source of truth for
129
+ * layout/composition/spacing; controls keep these in sync as the user
130
+ * edits, so we let them override the JSON blob if they disagree.
131
+ * 3. `currency-*` attributes — durable currency source on the block element.
122
132
  * @param api - Stripo extension API with document modifier
123
133
  * @param node - The block node to migrate
124
134
  * @returns The migrated configuration
@@ -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.
@@ -24,7 +24,7 @@ export interface CurrencyConfig {
24
24
  /** Number of decimal places (-1 for no formatting) */
25
25
  decimalCount: number;
26
26
  /** Character used for decimal separation */
27
- decimalSeparator: '.' | ',';
27
+ decimalSeparator: '.' | ',' | ' ';
28
28
  /** Character used for thousands separation */
29
29
  thousandSeparator: '.' | ',' | ' ' | '';
30
30
  }
@@ -1,6 +1,3 @@
1
- /**
2
- * Utility for preserving text styling when updating innerHTML
3
- */
4
1
  import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
5
2
  /**
6
3
  * Preserves existing style tags when updating text content
@@ -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.
@@ -3,5 +3,5 @@ export declare const useTemplateLibraryApi: () => {
3
3
  getCategories: () => Promise<Category[]>;
4
4
  checkTemplateNameAvailability: (value: string) => Promise<boolean>;
5
5
  createCategory: (category: string) => Promise<string>;
6
- createTemplate: () => Promise<void>;
6
+ createTemplate: () => Promise<boolean>;
7
7
  };