@useinsider/guido 3.1.1-beta.c728f08 → 3.1.1-beta.cdcd41d

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.
@@ -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 {
@@ -163,6 +163,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
163
163
  readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
164
164
  /** Disable modules panel in the editor */
165
165
  readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
166
+ /** Enable Liquid template syntax */
167
+ readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
166
168
  }, undefined>;
167
169
  /**
168
170
  * Default block types available in Stripo
@@ -477,6 +479,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
477
479
  readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
478
480
  /** Disable modules panel in the editor */
479
481
  readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
482
+ /** Enable Liquid template syntax */
483
+ readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
480
484
  }, undefined>, {}>;
481
485
  /** Block configuration */
482
486
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -57,6 +57,7 @@ export declare const useConfig: () => {
57
57
  displayConditions: boolean;
58
58
  unsubscribe: boolean;
59
59
  modulesDisabled: boolean;
60
+ liquidSyntax: boolean;
60
61
  };
61
62
  blocks: {
62
63
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -149,6 +150,7 @@ export declare const useConfig: () => {
149
150
  displayConditions: boolean;
150
151
  unsubscribe: boolean;
151
152
  modulesDisabled: boolean;
153
+ liquidSyntax: boolean;
152
154
  } | null>;
153
155
  blocks: import("vue").ComputedRef<{
154
156
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -6,7 +6,7 @@
6
6
  * @param alignment - Currency alignment from block config: 'before' or 'after'
7
7
  * @returns Formatted price string with currency variable in correct position
8
8
  */
9
- export declare function formatPriceVariable(campaignId: string, productIndex: number, attribute: string, alignment: string): string;
9
+ export declare function formatPriceVariable(campaignId: string, productIndex: number, attribute: string, alignment: string, prefix?: string): string;
10
10
  /**
11
11
  * Transforms recommendation block HTML by replacing product data with
12
12
  * template variables.
@@ -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.
@@ -62,6 +62,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
62
62
  displayConditions: boolean;
63
63
  unsubscribe: boolean;
64
64
  modulesDisabled: boolean;
65
+ liquidSyntax: boolean;
65
66
  };
66
67
  blocks: {
67
68
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -160,6 +161,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
160
161
  displayConditions: boolean;
161
162
  unsubscribe: boolean;
162
163
  modulesDisabled: boolean;
164
+ liquidSyntax: boolean;
163
165
  };
164
166
  blocks: {
165
167
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -258,6 +260,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
258
260
  displayConditions: boolean;
259
261
  unsubscribe: boolean;
260
262
  modulesDisabled: boolean;
263
+ liquidSyntax: boolean;
261
264
  };
262
265
  blocks: {
263
266
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -356,6 +359,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
356
359
  displayConditions: boolean;
357
360
  unsubscribe: boolean;
358
361
  modulesDisabled: boolean;
362
+ liquidSyntax: boolean;
359
363
  };
360
364
  blocks: {
361
365
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -454,6 +458,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
454
458
  displayConditions: boolean;
455
459
  unsubscribe: boolean;
456
460
  modulesDisabled: boolean;
461
+ liquidSyntax: boolean;
457
462
  };
458
463
  blocks: {
459
464
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -552,6 +557,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
552
557
  displayConditions: boolean;
553
558
  unsubscribe: boolean;
554
559
  modulesDisabled: boolean;
560
+ liquidSyntax: boolean;
555
561
  };
556
562
  blocks: {
557
563
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -650,6 +656,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
650
656
  displayConditions: boolean;
651
657
  unsubscribe: boolean;
652
658
  modulesDisabled: boolean;
659
+ liquidSyntax: boolean;
653
660
  };
654
661
  blocks: {
655
662
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -748,6 +755,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
748
755
  displayConditions: boolean;
749
756
  unsubscribe: boolean;
750
757
  modulesDisabled: boolean;
758
+ liquidSyntax: boolean;
751
759
  };
752
760
  blocks: {
753
761
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -846,6 +854,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
846
854
  displayConditions: boolean;
847
855
  unsubscribe: boolean;
848
856
  modulesDisabled: boolean;
857
+ liquidSyntax: boolean;
849
858
  };
850
859
  blocks: {
851
860
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -944,6 +953,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
944
953
  displayConditions: boolean;
945
954
  unsubscribe: boolean;
946
955
  modulesDisabled: boolean;
956
+ liquidSyntax: boolean;
947
957
  };
948
958
  blocks: {
949
959
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1042,6 +1052,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1042
1052
  displayConditions: boolean;
1043
1053
  unsubscribe: boolean;
1044
1054
  modulesDisabled: boolean;
1055
+ liquidSyntax: boolean;
1045
1056
  };
1046
1057
  blocks: {
1047
1058
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1140,6 +1151,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1140
1151
  displayConditions: boolean;
1141
1152
  unsubscribe: boolean;
1142
1153
  modulesDisabled: boolean;
1154
+ liquidSyntax: boolean;
1143
1155
  };
1144
1156
  blocks: {
1145
1157
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1238,6 +1250,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1238
1250
  displayConditions: boolean;
1239
1251
  unsubscribe: boolean;
1240
1252
  modulesDisabled: boolean;
1253
+ liquidSyntax: boolean;
1241
1254
  };
1242
1255
  blocks: {
1243
1256
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1336,6 +1349,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1336
1349
  displayConditions: boolean;
1337
1350
  unsubscribe: boolean;
1338
1351
  modulesDisabled: boolean;
1352
+ liquidSyntax: boolean;
1339
1353
  };
1340
1354
  blocks: {
1341
1355
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1434,6 +1448,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1434
1448
  displayConditions: boolean;
1435
1449
  unsubscribe: boolean;
1436
1450
  modulesDisabled: boolean;
1451
+ liquidSyntax: boolean;
1437
1452
  };
1438
1453
  blocks: {
1439
1454
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1532,6 +1547,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1532
1547
  displayConditions: boolean;
1533
1548
  unsubscribe: boolean;
1534
1549
  modulesDisabled: boolean;
1550
+ liquidSyntax: boolean;
1535
1551
  };
1536
1552
  blocks: {
1537
1553
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1630,6 +1646,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1630
1646
  displayConditions: boolean;
1631
1647
  unsubscribe: boolean;
1632
1648
  modulesDisabled: boolean;
1649
+ liquidSyntax: boolean;
1633
1650
  };
1634
1651
  blocks: {
1635
1652
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1728,6 +1745,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1728
1745
  displayConditions: boolean;
1729
1746
  unsubscribe: boolean;
1730
1747
  modulesDisabled: boolean;
1748
+ liquidSyntax: boolean;
1731
1749
  };
1732
1750
  blocks: {
1733
1751
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -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
@@ -28,58 +28,6 @@ ue-stripe-thumb:hover:not(.disabled),
28
28
  border-color: var(--guido-color-primary-500);
29
29
  }
30
30
 
31
- /* Module search — initial */
32
- .module-search-container {
33
- background-color: var(--guido-color-gray-0);
34
- border: 1px solid var(--guido-color-gray-300);
35
- border-radius: 4px;
36
- }
37
-
38
- .module-search-container .service-element {
39
- background-color: unset;
40
- }
41
-
42
- .module-filter-toggle {
43
- top: -1px !important;
44
- right: -1px !important;
45
- }
46
-
47
- .module-filter-toggle > .button,
48
- .module-search-container:hover .module-filter-toggle > .button {
49
- border: none;
50
- background: transparent;
51
- }
52
-
53
- /* Module search — hover */
54
- .module-search-container:has(.module-search-chip-input:hover) {
55
- border-color: var(--guido-color-primary-500);
56
- }
57
-
58
- .module-search-container .module-search-chip-input .service-element:hover {
59
- background-color: var(--guido-color-gray-0);
60
- border-radius: 4px;
61
- }
62
-
63
- .module-search-container .module-filter-toggle:hover > .button {
64
- background-color: var(--guido-color-gray-1);
65
- }
66
-
67
- /* Module search — selected (.on) */
68
- .module-search-container:has(.module-search-chip-input.on),
69
- .module-search-container:has(.module-search-chip-input.on):hover {
70
- border-color: var(--guido-color-primary-500);
71
- box-shadow: 0 0 0 3px var(--guido-color-primary-200) !important;
72
- }
73
-
74
- .module-search-container .module-search-chip-input.on .input-section {
75
- background-color: unset;
76
- box-shadow: unset;
77
- }
78
-
79
- .module-categories-list .menu-item {
80
- padding: 8px 20px !important;
81
- }
82
-
83
31
  .modules-layout-wrapper {
84
32
  padding: 0 16px 16px;
85
33
  grid-row-gap: 16px;
@@ -3,22 +3,24 @@ import { useHtmlCompiler as C } from "../composables/useHtmlCompiler.js";
3
3
  import { useRecommendationExtensionStore as T } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
4
  import { useDynamicContentStore as x } from "../stores/dynamic-content.js";
5
5
  import { useUnsubscribeStore as y } from "../stores/unsubscribe.js";
6
- const E = () => {
7
- const o = x(), t = y(), { getCompiledEmail: i, getTemplateData: n, editorSave: s } = f(), { compileHtml: m } = C();
6
+ const w = () => {
7
+ const o = x(), e = y(), { getCompiledEmail: i, getTemplateData: s, editorSave: n } = f(), { compileHtml: a } = C();
8
8
  return {
9
9
  prepareTemplateDetails: async () => {
10
- const { html: a, ampHtml: r = "", ampErrors: c = [] } = await i({
10
+ const { html: m, ampHtml: r = "", ampErrors: c = [] } = await i({
11
11
  minimize: !0,
12
12
  resetDataSavedFlag: !1
13
- }), { html: l, css: p, syncModulesIds: u = [] } = await n(), { compiledHtml: d, stats: e, appliedRules: S } = m(a), g = o.getSelectedDynamicContentList, b = T();
14
- return s(), console.debug("HTML Compilation Stats:", {
15
- originalSize: e.originalSize,
16
- compiledSize: e.compiledSize,
17
- reduction: `${e.reductionPercentage.toFixed(2)}%`,
18
- appliedRules: S,
19
- executionTime: `${e.executionTime.toFixed(2)}ms`
13
+ }), { html: l, css: p, syncModulesIds: u = [] } = await s();
14
+ e.selectedUnsubscribePages.length && await e.fetchTemplates();
15
+ const { compiledHtml: d, stats: t, appliedRules: g } = a(m), S = o.getSelectedDynamicContentList, b = T();
16
+ return n(), console.debug("HTML Compilation Stats:", {
17
+ originalSize: t.originalSize,
18
+ compiledSize: t.compiledSize,
19
+ reduction: `${t.reductionPercentage.toFixed(2)}%`,
20
+ appliedRules: g,
21
+ executionTime: `${t.executionTime.toFixed(2)}ms`
20
22
  }), {
21
- dynamicContentList: g,
23
+ dynamicContentList: S,
22
24
  compiledHtml: d,
23
25
  rawHtml: l,
24
26
  css: p,
@@ -30,13 +32,13 @@ const E = () => {
30
32
  configs: {}
31
33
  },
32
34
  unsubscribe: {
33
- status: t.unsubscribePagesStatus,
34
- config: t.selectedUnsubscribePages
35
+ status: e.unsubscribePagesStatus,
36
+ config: e.selectedUnsubscribePages
35
37
  }
36
38
  };
37
39
  }
38
40
  };
39
41
  };
40
42
  export {
41
- E as useTemplatePreparation
43
+ w as useTemplatePreparation
42
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.1.1-beta.c728f08",
3
+ "version": "3.1.1-beta.cdcd41d",
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",
@@ -32,7 +32,7 @@
32
32
  "author": "",
33
33
  "license": "ISC",
34
34
  "dependencies": {
35
- "@stripoinc/ui-editor-extensions": "3.7.0",
35
+ "@stripoinc/ui-editor-extensions": "3.5.0",
36
36
  "@useinsider/design-system-vue": "0.14.28",
37
37
  "@vueuse/core": "11.3.0",
38
38
  "lodash-es": "4.17.21",
@@ -86,7 +86,7 @@
86
86
  },
87
87
  "guido": {
88
88
  "stripo": {
89
- "version": "2.59.0"
89
+ "version": "2.54.0"
90
90
  }
91
91
  }
92
92
  }