@useinsider/guido 3.24.0-beta.89982ef → 3.24.0-beta.8e9f4e2

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 (86) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +37 -39
  3. package/dist/components/Guido.vue.js +2 -2
  4. package/dist/components/Guido.vue2.js +92 -98
  5. package/dist/composables/useActionsApi.js +2 -2
  6. package/dist/composables/useBlocksConfig.js +20 -31
  7. package/dist/composables/useEditorTrackingIds.js +49 -0
  8. package/dist/composables/useTranslations.js +1 -2
  9. package/dist/config/compiler/utils/itemsCompilerUtils.js +42 -43
  10. package/dist/config/compiler/utils/recommendationCompilerUtils.js +64 -67
  11. package/dist/config/migrator/recommendation/inferLegacyConfig.js +133 -0
  12. package/dist/config/migrator/recommendationMigrator.js +69 -63
  13. package/dist/enums/academy.js +0 -1
  14. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +10 -8
  15. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +28 -24
  16. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +23 -22
  17. package/dist/guido.css +1 -1
  18. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +92 -93
  19. package/dist/node_modules/valibot/dist/index.js +261 -297
  20. package/dist/package.json.js +4 -4
  21. package/dist/services/templateLibraryApi.js +39 -36
  22. package/dist/src/@types/config/schemas.d.ts +0 -4
  23. package/dist/src/composables/useConfig.d.ts +0 -2
  24. package/dist/src/composables/useEditorTrackingIds.d.ts +7 -0
  25. package/dist/src/config/migrator/recommendation/inferLegacyConfig.d.ts +6 -0
  26. package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +1 -1
  27. package/dist/src/config/migrator/recommendationMigrator.d.ts +1 -5
  28. package/dist/src/enums/academy.d.ts +0 -1
  29. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +2 -0
  30. package/dist/src/stores/config.d.ts +0 -167
  31. package/dist/src/utils/linkTrackingIds.d.ts +24 -22
  32. package/dist/static/styles/variables.css.js +0 -1
  33. package/dist/stores/config.js +6 -13
  34. package/dist/utils/linkTrackingIds.js +72 -72
  35. package/dist/utils/pairProductVariables.js +29 -30
  36. package/dist/utils/templatePreparation.js +59 -72
  37. package/package.json +1 -1
  38. package/dist/@types/display-condition.js +0 -25
  39. package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +0 -17
  40. package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +0 -41
  41. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +0 -30
  42. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +0 -81
  43. package/dist/components/organisms/display-conditions/DisplayConditionListState.vue.js +0 -17
  44. package/dist/components/organisms/display-conditions/DisplayConditionListState.vue2.js +0 -45
  45. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +0 -36
  46. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +0 -63
  47. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +0 -17
  48. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +0 -22
  49. package/dist/composables/useDisplayConditions.js +0 -117
  50. package/dist/enums/display-condition.js +0 -12
  51. package/dist/extensions/DisplayConditions/bridge.js +0 -25
  52. package/dist/extensions/DisplayConditions/constants.js +0 -26
  53. package/dist/extensions/DisplayConditions/control.js +0 -215
  54. package/dist/extensions/DisplayConditions/display-conditions.css.js +0 -226
  55. package/dist/extensions/DisplayConditions/extension.js +0 -28
  56. package/dist/extensions/DisplayConditions/iconsRegistry.js +0 -20
  57. package/dist/extensions/DisplayConditions/library.js +0 -30
  58. package/dist/extensions/DisplayConditions/settingsPanel.js +0 -17
  59. package/dist/extensions/LinkTracking/extension.js +0 -17
  60. package/dist/extensions/LinkTracking/writer.js +0 -41
  61. package/dist/services/displayConditionApi.js +0 -39
  62. package/dist/src/@types/display-condition.d.ts +0 -61
  63. package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +0 -43
  64. package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +0 -2
  65. package/dist/src/components/organisms/display-conditions/DisplayConditionListState.vue.d.ts +0 -18
  66. package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +0 -2
  67. package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +0 -2
  68. package/dist/src/composables/useDisplayConditions.d.ts +0 -18
  69. package/dist/src/enums/display-condition.d.ts +0 -15
  70. package/dist/src/extensions/DisplayConditions/bridge.d.ts +0 -7
  71. package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -23
  72. package/dist/src/extensions/DisplayConditions/control.d.ts +0 -25
  73. package/dist/src/extensions/DisplayConditions/extension.d.ts +0 -2
  74. package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +0 -4
  75. package/dist/src/extensions/DisplayConditions/library.d.ts +0 -8
  76. package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +0 -5
  77. package/dist/src/extensions/LinkTracking/extension.d.ts +0 -2
  78. package/dist/src/extensions/LinkTracking/writer.d.ts +0 -13
  79. package/dist/src/mock/api/display-conditions.d.ts +0 -2
  80. package/dist/src/services/displayConditionApi.d.ts +0 -8
  81. package/dist/src/stores/display-condition.d.ts +0 -86
  82. package/dist/src/utils/displayCondition.d.ts +0 -11
  83. package/dist/src/utils/protectTableText.d.ts +0 -2
  84. package/dist/stores/display-condition.js +0 -29
  85. package/dist/utils/displayCondition.js +0 -29
  86. package/dist/utils/protectTableText.js +0 -22
@@ -1,9 +1,9 @@
1
- const o = "3.24.0-beta.89982ef", s = { stripo: { version: "2.83.1" } }, e = {
1
+ const o = "3.24.0-beta.8e9f4e2", e = { stripo: { version: "2.83.1" } }, s = {
2
2
  version: o,
3
- guido: s
3
+ guido: e
4
4
  };
5
5
  export {
6
- e as default,
7
- s as guido,
6
+ s as default,
7
+ e as guido,
8
8
  o as version
9
9
  };
@@ -1,60 +1,63 @@
1
- import { useActionsApi as h } from "../composables/useActionsApi.js";
1
+ import { useActionsApi as A } from "../composables/useActionsApi.js";
2
2
  import { useConfig as S } from "../composables/useConfig.js";
3
- import { useHttp as v } from "../composables/useHttp.js";
3
+ import { useHttp as E } from "../composables/useHttp.js";
4
4
  import { useToaster as x } from "../composables/useToaster.js";
5
- import { useTranslations as A } from "../composables/useTranslations.js";
6
- import { useHtmlDocumentCountValidator as E } from "../composables/validators/useHtmlDocumentCountValidator.js";
5
+ import { useTranslations as P } from "../composables/useTranslations.js";
6
+ import { useHtmlDocumentCountValidator as L } from "../composables/validators/useHtmlDocumentCountValidator.js";
7
7
  import { useLiquidValidator as N } from "../composables/validators/useLiquidValidator.js";
8
8
  import { EditorType as H } from "../enums/defaults.js";
9
- import { ToasterTypeOptions as P } from "../enums/toaster.js";
9
+ import { ToasterTypeOptions as T } from "../enums/toaster.js";
10
10
  import { useRecommendationExtensionStore as D } from "../extensions/Blocks/Recommendation/store/recommendation.js";
11
- import { useSaveAsTemplateStore as L } from "../stores/save-as-template.js";
11
+ import { useSaveAsTemplateStore as q } from "../stores/save-as-template.js";
12
12
  import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
13
- import { isPlainObject as q } from "../utils/genericUtil.js";
13
+ import { isPlainObject as w } from "../utils/genericUtil.js";
14
14
  import { useTemplatePreparation as F } from "../utils/templatePreparation.js";
15
15
  const Z = () => {
16
- const { get: n, post: m } = v(), { handleError: s, showToaster: l } = x(), { config: c, isFeatureEnabled: p } = S(), { validateLiquidSyntax: T } = N(), { validateSingleHtmlDocument: w } = E(), { getTemplateData: b } = h(), u = A();
16
+ const { get: l, post: c } = E(), { handleError: o, showToaster: i } = x(), { config: p, isFeatureEnabled: u } = S(), { validateLiquidSyntax: b } = N(), { validateSingleHtmlDocument: C } = L(), { getTemplateData: h } = A(), n = P();
17
17
  return {
18
18
  getCategories: async () => {
19
19
  try {
20
- const { data: e = [] } = await n("/newsletter/template-library/get-template-categories");
21
- return e;
20
+ const { data: e } = await l("/newsletter/template-library/get-template-categories");
21
+ return Array.isArray(e) ? e : ((!w(e) || e.type !== "alert") && console.error("[TEMPLATE_LIBRARY_API] Unexpected get-template-categories response", e), i({
22
+ message: n("newsletter.template-library-service-error"),
23
+ type: T.Error
24
+ }), []);
22
25
  } catch (e) {
23
- return s(e, "Failed to fetch template categories"), [];
26
+ return o(e, "Failed to fetch template categories"), [];
24
27
  }
25
28
  },
26
29
  checkTemplateNameAvailability: async (e) => {
27
- const { data: { status: t = !1 } } = await n(
30
+ const { data: { status: t = !1 } } = await l(
28
31
  `/newsletter/template-library/template-name-exists?name=${e}`
29
32
  );
30
33
  return !t;
31
34
  },
32
35
  createCategory: async (e) => {
33
36
  try {
34
- const { data: { id: t } } = await m(
37
+ const { data: { id: t } } = await c(
35
38
  "/newsletter/template-library/create-category",
36
39
  { name: e }
37
40
  );
38
41
  return t.toString();
39
42
  } catch (t) {
40
- return s(t, "Failed to create category"), "";
43
+ return o(t, "Failed to create category"), "";
41
44
  }
42
45
  },
43
46
  createTemplate: async () => {
44
47
  var e, t, d, y;
45
48
  try {
46
- const { prepareTemplateDetails: i } = F(), o = L(), g = await b();
47
- if (!w(g.html))
49
+ const { prepareTemplateDetails: m } = F(), s = q(), g = await h();
50
+ if (!C(g.html))
48
51
  return !1;
49
- const a = await i(g);
50
- if (p("liquidSyntax") && !await T(a.compiledHtml))
52
+ const a = await m(g);
53
+ if (u("liquidSyntax") && !await b(a.compiledHtml))
51
54
  return !1;
52
- const C = {
53
- name: o.getTemplateName,
54
- categories: o.getSelectedCategoryIds,
55
- productId: ((t = (e = c.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
55
+ const v = {
56
+ name: s.getTemplateName,
57
+ categories: s.getSelectedCategoryIds,
58
+ productId: ((t = (e = p.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
56
59
  editorType: H,
57
- messageType: ((y = (d = c.value) == null ? void 0 : d.partner) == null ? void 0 : y.messageType) || 0,
60
+ messageType: ((y = (d = p.value) == null ? void 0 : d.partner) == null ? void 0 : y.messageType) || 0,
58
61
  content: r(a.compiledHtml),
59
62
  css: r(a.css),
60
63
  unsubscriptionPreferencePageStatus: !1,
@@ -65,34 +68,34 @@ const Z = () => {
65
68
  recommendationConfigs: r({}),
66
69
  isGuido: !0,
67
70
  // eslint-disable-next-line camelcase
68
- template_engine: p("liquidSyntax") ? 1 : 0,
71
+ template_engine: u("liquidSyntax") ? 1 : 0,
69
72
  stripoConfig: r({
70
73
  editor: "stripo",
71
74
  html: a.rawHtml,
72
75
  css: a.css,
73
76
  dynamicContentList: a.dynamicContentList
74
77
  })
75
- }, { data: f } = await m(
78
+ }, { data: f } = await c(
76
79
  "/newsletter/template-library/create-template",
77
- C
80
+ v
78
81
  );
79
- if (!q(f))
82
+ if (!w(f))
80
83
  throw new Error("Unexpected create-template response");
81
- return f.type === "alert" ? (l({
82
- message: u(
84
+ return f.type === "alert" ? (i({
85
+ message: n(
83
86
  "newsletter.template-library-save-alert",
84
- { templateName: o.getTemplateName }
87
+ { templateName: s.getTemplateName }
85
88
  ),
86
- type: P.Error
87
- }), !1) : (l({
88
- message: u(
89
+ type: T.Error
90
+ }), !1) : (i({
91
+ message: n(
89
92
  "newsletter.template-library-save-success",
90
- { templateName: o.getTemplateName }
93
+ { templateName: s.getTemplateName }
91
94
  ),
92
95
  type: "success"
93
96
  }), !0);
94
- } catch (i) {
95
- return s(i, "Failed to create template"), !1;
97
+ } catch (m) {
98
+ return o(m, "Failed to create template"), !1;
96
99
  }
97
100
  }
98
101
  };
@@ -384,8 +384,6 @@ export declare const UISchema: v.ObjectSchema<{
384
384
  readonly showHeader: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
385
385
  /** Custom label for back button (if shown) */
386
386
  readonly backButtonLabel: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
387
- /** Replace Stripo's display-condition UI with the Conditions tab and create/select drawers */
388
- readonly externalDisplayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
389
387
  }, undefined>;
390
388
  /**
391
389
  * Features configuration - enable/disable editor features
@@ -807,8 +805,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
807
805
  readonly showHeader: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
808
806
  /** Custom label for back button (if shown) */
809
807
  readonly backButtonLabel: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
810
- /** Replace Stripo's display-condition UI with the Conditions tab and create/select drawers */
811
- readonly externalDisplayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
812
808
  }, undefined>, {}>;
813
809
  /** Feature toggles */
814
810
  readonly features: v.OptionalSchema<v.ObjectSchema<{
@@ -89,7 +89,6 @@ export declare const useConfig: () => {
89
89
  ui: {
90
90
  showHeader: boolean;
91
91
  backButtonLabel?: string | undefined;
92
- externalDisplayConditions: boolean;
93
92
  };
94
93
  features: {
95
94
  dynamicContent: boolean;
@@ -230,7 +229,6 @@ export declare const useConfig: () => {
230
229
  ui: import("vue").ComputedRef<{
231
230
  showHeader: boolean;
232
231
  backButtonLabel?: string | undefined;
233
- externalDisplayConditions: boolean;
234
232
  } | null>;
235
233
  features: import("vue").ComputedRef<{
236
234
  dynamicContent: boolean;
@@ -0,0 +1,7 @@
1
+ export interface EditorTrackingIdsResult {
2
+ changed: boolean;
3
+ nextSeq: number;
4
+ }
5
+ export declare const useEditorTrackingIds: () => {
6
+ writeTrackingIds: (floor: number) => EditorTrackingIdsResult;
7
+ };
@@ -0,0 +1,6 @@
1
+ import type { LegacyProductConfig } from './types';
2
+ /**
3
+ * Rebuilds the `esd-dev-product-config` a pre-Guido block never carried from what it rendered.
4
+ * Null when no product card renders or a card cell cannot be mapped (the rebuild would lose it); other fields default.
5
+ */
6
+ export declare function inferLegacyConfig(block: Element, id: number): LegacyProductConfig | null;
@@ -3,7 +3,7 @@ import type { LegacyProductConfig } from './types';
3
3
  * `esd-dev-product-config` is double-HTML-encoded JSON: serialization
4
4
  * escapes once to embed inside the attribute, and Stripo's templating
5
5
  * layer escapes a second time when round-tripping. Returns `null` when
6
- * the attribute is missing or unable to be parsed — the caller treats
6
+ * the attribute is empty or unable to be parsed — the caller treats
7
7
  * either case as an abort.
8
8
  */
9
9
  export declare function parseLegacyConfig(block: Element): LegacyProductConfig | null;
@@ -1,8 +1,4 @@
1
- /**
2
- * Idempotent: the selector matches only blocks that have
3
- * `esd-dev-product-config` AND lack `recommendation-block-v2`, so
4
- * re-running on a migrated template is a no-op.
5
- */
1
+ /** Idempotent: the selector excludes `recommendation-block-v2`, so re-running on a migrated template is a no-op. */
6
2
  import type { LegacyRecommendationConfig } from '@@/Types/config';
7
3
  /**
8
4
  * Migrate all legacy Recommendation Blocks in the given HTML string.
@@ -8,7 +8,6 @@ export declare const ACADEMY_LINKS: {
8
8
  readonly EMAIL_EDITOR: "https://academy.insiderone.com/docs/email-drag-and-drop-editor";
9
9
  readonly GLOBAL_UNSUBSCRIBE: "https://academy.insiderone.com/docs/global-unsubscribe-preference-center";
10
10
  readonly AMP_FOR_EMAILS: "https://academy.insiderone.com/docs/amp-for-emails";
11
- readonly EMAIL_DISPLAY_CONDITIONS: "https://academy.insiderone.com/docs/new-editor-add-display-conditions-to-an-email";
12
11
  readonly EMAIL_RECOMMENDATION_BLOCK: "https://academy.insiderone.com/docs/new-editor-email-recommendation-block";
13
12
  };
14
13
  export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
@@ -57,6 +57,7 @@ interface PerBlockState {
57
57
  legacyConversionLoading: boolean;
58
58
  configVersion: number;
59
59
  adoptedSizeVersion: number;
60
+ drawnProducts: RecommendationProduct[] | null;
60
61
  }
61
62
  /**
62
63
  * Persisted-config subset used by `seedBlockUrlConfig` to reconstruct
@@ -491,6 +492,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
491
492
  * (SD-149916).
492
493
  */
493
494
  cloneBlockState(sourceId: number, newId: number): void;
495
+ markProductsDrawn(id: number, products: RecommendationProduct[]): void;
494
496
  /**
495
497
  * Marks a block as initialized (initial API data has been fetched).
496
498
  * Automatically cleaned up when removeBlockState deletes the block entry.
@@ -94,7 +94,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
94
94
  ui: {
95
95
  showHeader: boolean;
96
96
  backButtonLabel?: string | undefined;
97
- externalDisplayConditions: boolean;
98
97
  };
99
98
  features: {
100
99
  dynamicContent: boolean;
@@ -241,7 +240,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
241
240
  ui: {
242
241
  showHeader: boolean;
243
242
  backButtonLabel?: string | undefined;
244
- externalDisplayConditions: boolean;
245
243
  };
246
244
  features: {
247
245
  dynamicContent: boolean;
@@ -388,7 +386,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
388
386
  ui: {
389
387
  showHeader: boolean;
390
388
  backButtonLabel?: string | undefined;
391
- externalDisplayConditions: boolean;
392
389
  };
393
390
  features: {
394
391
  dynamicContent: boolean;
@@ -535,7 +532,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
535
532
  ui: {
536
533
  showHeader: boolean;
537
534
  backButtonLabel?: string | undefined;
538
- externalDisplayConditions: boolean;
539
535
  };
540
536
  features: {
541
537
  dynamicContent: boolean;
@@ -682,7 +678,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
682
678
  ui: {
683
679
  showHeader: boolean;
684
680
  backButtonLabel?: string | undefined;
685
- externalDisplayConditions: boolean;
686
681
  };
687
682
  features: {
688
683
  dynamicContent: boolean;
@@ -829,7 +824,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
829
824
  ui: {
830
825
  showHeader: boolean;
831
826
  backButtonLabel?: string | undefined;
832
- externalDisplayConditions: boolean;
833
827
  };
834
828
  features: {
835
829
  dynamicContent: boolean;
@@ -976,7 +970,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
976
970
  ui: {
977
971
  showHeader: boolean;
978
972
  backButtonLabel?: string | undefined;
979
- externalDisplayConditions: boolean;
980
973
  };
981
974
  features: {
982
975
  dynamicContent: boolean;
@@ -1123,7 +1116,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1123
1116
  ui: {
1124
1117
  showHeader: boolean;
1125
1118
  backButtonLabel?: string | undefined;
1126
- externalDisplayConditions: boolean;
1127
1119
  };
1128
1120
  features: {
1129
1121
  dynamicContent: boolean;
@@ -1270,7 +1262,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1270
1262
  ui: {
1271
1263
  showHeader: boolean;
1272
1264
  backButtonLabel?: string | undefined;
1273
- externalDisplayConditions: boolean;
1274
1265
  };
1275
1266
  features: {
1276
1267
  dynamicContent: boolean;
@@ -1417,7 +1408,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1417
1408
  ui: {
1418
1409
  showHeader: boolean;
1419
1410
  backButtonLabel?: string | undefined;
1420
- externalDisplayConditions: boolean;
1421
1411
  };
1422
1412
  features: {
1423
1413
  dynamicContent: boolean;
@@ -1564,7 +1554,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1564
1554
  ui: {
1565
1555
  showHeader: boolean;
1566
1556
  backButtonLabel?: string | undefined;
1567
- externalDisplayConditions: boolean;
1568
1557
  };
1569
1558
  features: {
1570
1559
  dynamicContent: boolean;
@@ -1711,7 +1700,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1711
1700
  ui: {
1712
1701
  showHeader: boolean;
1713
1702
  backButtonLabel?: string | undefined;
1714
- externalDisplayConditions: boolean;
1715
1703
  };
1716
1704
  features: {
1717
1705
  dynamicContent: boolean;
@@ -1858,7 +1846,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1858
1846
  ui: {
1859
1847
  showHeader: boolean;
1860
1848
  backButtonLabel?: string | undefined;
1861
- externalDisplayConditions: boolean;
1862
1849
  };
1863
1850
  features: {
1864
1851
  dynamicContent: boolean;
@@ -2005,7 +1992,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2005
1992
  ui: {
2006
1993
  showHeader: boolean;
2007
1994
  backButtonLabel?: string | undefined;
2008
- externalDisplayConditions: boolean;
2009
1995
  };
2010
1996
  features: {
2011
1997
  dynamicContent: boolean;
@@ -2152,7 +2138,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2152
2138
  ui: {
2153
2139
  showHeader: boolean;
2154
2140
  backButtonLabel?: string | undefined;
2155
- externalDisplayConditions: boolean;
2156
2141
  };
2157
2142
  features: {
2158
2143
  dynamicContent: boolean;
@@ -2299,7 +2284,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2299
2284
  ui: {
2300
2285
  showHeader: boolean;
2301
2286
  backButtonLabel?: string | undefined;
2302
- externalDisplayConditions: boolean;
2303
2287
  };
2304
2288
  features: {
2305
2289
  dynamicContent: boolean;
@@ -2446,7 +2430,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2446
2430
  ui: {
2447
2431
  showHeader: boolean;
2448
2432
  backButtonLabel?: string | undefined;
2449
- externalDisplayConditions: boolean;
2450
2433
  };
2451
2434
  features: {
2452
2435
  dynamicContent: boolean;
@@ -2605,7 +2588,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2605
2588
  ui: {
2606
2589
  showHeader: boolean;
2607
2590
  backButtonLabel?: string | undefined;
2608
- externalDisplayConditions: boolean;
2609
2591
  };
2610
2592
  features: {
2611
2593
  dynamicContent: boolean;
@@ -2752,154 +2734,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2752
2734
  ui: {
2753
2735
  showHeader: boolean;
2754
2736
  backButtonLabel?: string | undefined;
2755
- externalDisplayConditions: boolean;
2756
- };
2757
- features: {
2758
- dynamicContent: boolean;
2759
- saveAsTemplate: boolean;
2760
- versionHistory: boolean;
2761
- testMessage: boolean;
2762
- displayConditions: boolean;
2763
- unsubscribe: boolean;
2764
- modulesDisabled: boolean;
2765
- liquidSyntax: boolean;
2766
- autosave: boolean;
2767
- accessibilityTesting: boolean;
2768
- allowlistEnabled: boolean;
2769
- linkTrackingIds: boolean;
2770
- allowSaveWithErrors: boolean;
2771
- reusableRecommendationStrategy: boolean;
2772
- };
2773
- blocks: {
2774
- 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")[];
2775
- includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
2776
- };
2777
- compiler: {
2778
- customRules: ({
2779
- type: "replace";
2780
- search: string;
2781
- replacement: string;
2782
- replaceAll?: boolean | undefined;
2783
- id: string;
2784
- description?: string | undefined;
2785
- priority: number;
2786
- } | {
2787
- type: "regex";
2788
- pattern: string;
2789
- replacement: string;
2790
- flags?: string | undefined;
2791
- id: string;
2792
- description?: string | undefined;
2793
- priority: number;
2794
- } | {
2795
- type: "remove";
2796
- targets: string[];
2797
- id: string;
2798
- description?: string | undefined;
2799
- priority: number;
2800
- } | {
2801
- type: "custom";
2802
- processor: (html: string) => string;
2803
- id: string;
2804
- description?: string | undefined;
2805
- priority: number;
2806
- })[];
2807
- ignoreDefaultRules: boolean;
2808
- };
2809
- callbacks: {
2810
- externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
2811
- };
2812
- } | null;
2813
- } & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
2814
- /**
2815
- * Check if the Insider display-condition UI replaces Stripo's
2816
- */
2817
- externalDisplayConditions: (state: {
2818
- initialized: boolean;
2819
- config: {
2820
- identity: {
2821
- templateId: string;
2822
- userId: string;
2823
- variationId?: string | undefined;
2824
- campaignId?: string | undefined;
2825
- templateLibraryId?: string | undefined;
2826
- };
2827
- partner: {
2828
- name: string;
2829
- productType: 60 | 49 | 97;
2830
- messageType: 1 | 2;
2831
- username: string;
2832
- fallbackFont?: {
2833
- name: string;
2834
- family: string;
2835
- } | undefined;
2836
- };
2837
- template: {
2838
- html: string;
2839
- css: string;
2840
- preselectedDynamicContent: {
2841
- text: string;
2842
- value: string;
2843
- fallback?: string | undefined;
2844
- format?: {
2845
- key: string;
2846
- value: string;
2847
- } | undefined;
2848
- }[];
2849
- dynamicContentList: {
2850
- [x: string]: import("../library").DynamicContentNode[];
2851
- };
2852
- customFieldAttributes: string[];
2853
- selectedUnsubscribePages: number[];
2854
- forceRecreate: boolean;
2855
- trackIdCounter: number;
2856
- recommendationCampaignUrls?: Record<string, unknown> | undefined;
2857
- migration: {
2858
- recommendationConfigs: {
2859
- [x: string]: {
2860
- id?: number | undefined;
2861
- decimalCount?: string | number | undefined;
2862
- productIds?: unknown[] | undefined;
2863
- sendProductRequestFlag?: boolean | undefined;
2864
- shuffleProducts?: boolean | undefined;
2865
- filters?: unknown[] | undefined;
2866
- currency?: string | undefined;
2867
- currencySettings?: unknown;
2868
- language?: string | undefined;
2869
- strategy?: string | undefined;
2870
- recommendedProducts?: unknown[] | undefined;
2871
- cardsInRow?: number | undefined;
2872
- mobileRightPadding?: number | undefined;
2873
- mobileLeftPadding?: number | undefined;
2874
- unresponsive?: boolean | undefined;
2875
- orientation?: string | undefined;
2876
- textTrimming?: boolean | undefined;
2877
- blockType?: string | undefined;
2878
- size?: string | number | undefined;
2879
- verticalResponsiveness?: boolean | undefined;
2880
- isPriceMovedToNextLine?: boolean | undefined;
2881
- isPriceDeletedForZeroSale?: boolean | undefined;
2882
- } & {
2883
- [key: string]: unknown;
2884
- };
2885
- };
2886
- };
2887
- };
2888
- editor: {
2889
- locale: string;
2890
- translationsPath: string;
2891
- migrationDate: number;
2892
- emailHeader: {
2893
- senderName: string;
2894
- subject: string;
2895
- };
2896
- savedModulesFolderName: string;
2897
- defaultModulesFolderName: string;
2898
- };
2899
- ui: {
2900
- showHeader: boolean;
2901
- backButtonLabel?: string | undefined;
2902
- externalDisplayConditions: boolean;
2903
2737
  };
2904
2738
  features: {
2905
2739
  dynamicContent: boolean;
@@ -3048,7 +2882,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
3048
2882
  ui: {
3049
2883
  showHeader: boolean;
3050
2884
  backButtonLabel?: string | undefined;
3051
- externalDisplayConditions: boolean;
3052
2885
  };
3053
2886
  features: {
3054
2887
  dynamicContent: boolean;
@@ -10,13 +10,6 @@ export interface TrackingIdResult {
10
10
  changed: boolean;
11
11
  nextSeq: number;
12
12
  }
13
- export interface TrackingIdPlan {
14
- /** Anchor index in document order → id to write. Anchors keeping their id are absent. */
15
- assignments: Map<number, number>;
16
- nextSeq: number;
17
- seqChanged: boolean;
18
- changed: boolean;
19
- }
20
13
  /**
21
14
  * Reads the persisted id high-water mark: <body> attr, then <html> attr,
22
15
  * then the leading comment fallback. Returns 0 when absent.
@@ -27,21 +20,30 @@ export declare function readTrackSeq(html: string): number;
27
20
  * Scans the document because a rewrite can strip the seq host but keep the ids.
28
21
  */
29
22
  export declare function readTrackFloor(html: string, persistedCounter?: number): number;
23
+ export interface TrackingIdPlan {
24
+ /** Final id per anchor, in the order the raw values were given. */
25
+ ids: number[];
26
+ reassigned: boolean[];
27
+ nextSeq: number;
28
+ seqChanged: boolean;
29
+ changed: boolean;
30
+ }
30
31
  /**
31
- * Mints ids above max(persisted seq, max id seen, floor) so a deleted id is never reused;
32
- * invalid or duplicate values are reassigned, the first duplicate in document order keeps its id.
32
+ * The id rule shared by the string transform and the editor-model writer: `rawIds` are the
33
+ * anchors' current `data-ins-track-id` values in document order ('' when absent).
34
+ */
35
+ export declare function planTrackingIds(rawIds: readonly string[], persistedSeq: number, floor?: number): TrackingIdPlan;
36
+ /** Reads a `data-ins-track-seq` attribute value the way readTrackSeq reads it from HTML. */
37
+ export declare function parseTrackSeq(value: string | null): number;
38
+ /** The `data-ins-track-id` value of every `<a>` opening tag in `html`, in order ('' when absent). */
39
+ export declare function readAnchorTrackIds(html: string): string[];
40
+ /** Writes `ids[i]` onto the i-th `<a>` opening tag of `html`; `null` or a missing entry leaves it untouched. */
41
+ export declare function writeAnchorTrackIds(html: string, ids: readonly (number | null)[]): string;
42
+ /**
43
+ * Ensures every <a> opening tag carries a unique positive-integer id and the
44
+ * document records the id high-water mark. Ids are minted above
45
+ * max(persisted seq, max id in document, floor) so deleted ids are never
46
+ * reused — even after a version restore or paste-over (floor = session floor).
47
+ * Idempotent: a document already normalized returns changed=false.
33
48
  */
34
- export declare function planTrackingIds(rawIds: (string | null)[], persistedSeq: number, floor?: number): TrackingIdPlan;
35
- export interface DocumentTrackingIdPlan {
36
- /** data-ins-track-id per anchor in document order; '' when absent. */
37
- anchorIds: string[];
38
- /** Per anchor: inside an HTML comment (e.g. Stripo's `<!--[if mso]>` button copy), absent from the node tree. */
39
- inComment: boolean[];
40
- plan: TrackingIdPlan;
41
- }
42
- /** Plans the ids for an HTML document without rewriting it. */
43
- export declare function planDocumentTrackingIds(html: string, floor?: number): DocumentTrackingIdPlan;
44
- /** Writes a plan into the HTML string: anchor ids by document order, then the seq host. */
45
- export declare function renderTrackingIdPlan(html: string, { plan }: DocumentTrackingIdPlan): string;
46
- /** Gives every <a> a unique positive-integer id and records the high-water mark; idempotent. */
47
49
  export declare function assignTrackingIds(html: string, floor?: number): TrackingIdResult;
@@ -12,7 +12,6 @@ const o = `:host {
12
12
  --guido-color-gray-100: #F5F5F5;
13
13
  --guido-color-gray-1: #F0F0F0;
14
14
  --guido-color-gray-0: #F9F9F9;
15
- --guido-color-neutral-900: #0A0F19;
16
15
  --guido-color-neutral-800: #222938;
17
16
  --guido-color-neutral-700: #2C3546;
18
17
  --guido-color-neutral-500: #5D6980;
@@ -1,8 +1,8 @@
1
- import { MessageType as a } from "../@types/config/schemas.js";
1
+ import { MessageType as r } from "../@types/config/schemas.js";
2
2
  import "../@types/config/defaults.js";
3
- import { parseConfig as o } from "../@types/config/validator.js";
4
- import { defineStore as l } from "pinia";
5
- const g = l("guido-config", {
3
+ import { parseConfig as a } from "../@types/config/validator.js";
4
+ import { defineStore as o } from "pinia";
5
+ const g = o("guido-config", {
6
6
  state: () => ({
7
7
  initialized: !1,
8
8
  config: null
@@ -132,7 +132,7 @@ const g = l("guido-config", {
132
132
  * consumers stay safe in setup where a raw config read snapshots null (SD-147945).
133
133
  */
134
134
  isTransactional() {
135
- return this.messageType === a.TRANSACTIONAL;
135
+ return this.messageType === r.TRANSACTIONAL;
136
136
  },
137
137
  /**
138
138
  * Soft-save policy: may the editor persist a template with validation errors?
@@ -158,13 +158,6 @@ const g = l("guido-config", {
158
158
  var e, t;
159
159
  return ((t = (e = i.config) == null ? void 0 : e.ui) == null ? void 0 : t.showHeader) ?? !0;
160
160
  },
161
- /**
162
- * Check if the Insider display-condition UI replaces Stripo's
163
- */
164
- externalDisplayConditions: (i) => {
165
- var e, t, n, r;
166
- return (((t = (e = i.config) == null ? void 0 : e.ui) == null ? void 0 : t.externalDisplayConditions) ?? !1) && (((r = (n = i.config) == null ? void 0 : n.features) == null ? void 0 : r.displayConditions) ?? !0);
167
- },
168
161
  /**
169
162
  * Check if a specific feature is enabled.
170
163
  * Returns false before init (config null) so header controls don't
@@ -181,7 +174,7 @@ const g = l("guido-config", {
181
174
  * Initialize the config store with validated configuration
182
175
  */
183
176
  init(i) {
184
- const e = o(i);
177
+ const e = a(i);
185
178
  this.config = e, this.initialized = !0;
186
179
  },
187
180
  /**