@useinsider/guido 3.25.0 → 3.26.0-beta.017ecf8

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 +11 -0
  2. package/dist/@types/config/schemas.js +106 -100
  3. package/dist/@types/display-condition.js +25 -0
  4. package/dist/components/Guido.vue.js +7 -7
  5. package/dist/components/Guido.vue2.js +113 -104
  6. package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +17 -0
  7. package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +41 -0
  8. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +30 -0
  9. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +81 -0
  10. package/dist/components/organisms/display-conditions/DisplayConditionListState.vue.js +17 -0
  11. package/dist/components/organisms/display-conditions/DisplayConditionListState.vue2.js +45 -0
  12. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +36 -0
  13. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +63 -0
  14. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +17 -0
  15. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +22 -0
  16. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js +17 -0
  17. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue2.js +30 -0
  18. package/dist/composables/useBlocksConfig.js +29 -20
  19. package/dist/composables/useDisplayConditions.js +116 -0
  20. package/dist/composables/useModuleRepair.js +33 -24
  21. package/dist/composables/useSave.js +57 -52
  22. package/dist/composables/useSaveValidation.js +118 -110
  23. package/dist/composables/useTranslations.js +2 -1
  24. package/dist/composables/validators/useUnsubscribeBlockValidator.js +48 -33
  25. package/dist/config/compiler/utils/itemsCompilerUtils.js +43 -42
  26. package/dist/config/compiler/utils/recommendationCompilerUtils.js +67 -64
  27. package/dist/config/migrator/index.js +8 -7
  28. package/dist/config/migrator/legacyUnsubscribeTextMigrator.js +16 -0
  29. package/dist/enums/academy.js +3 -1
  30. package/dist/enums/display-condition.js +12 -0
  31. package/dist/enums/save-validation.js +1 -1
  32. package/dist/extensions/DisplayConditions/bridge.js +25 -0
  33. package/dist/extensions/DisplayConditions/constants.js +26 -0
  34. package/dist/extensions/DisplayConditions/control.js +215 -0
  35. package/dist/extensions/DisplayConditions/display-conditions.css.js +226 -0
  36. package/dist/extensions/DisplayConditions/extension.js +28 -0
  37. package/dist/extensions/DisplayConditions/iconsRegistry.js +20 -0
  38. package/dist/extensions/DisplayConditions/library.js +30 -0
  39. package/dist/extensions/DisplayConditions/settingsPanel.js +17 -0
  40. package/dist/guido.css +1 -1
  41. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +93 -92
  42. package/dist/node_modules/valibot/dist/index.js +297 -261
  43. package/dist/package.json.js +2 -2
  44. package/dist/services/displayConditionApi.js +39 -0
  45. package/dist/src/@types/config/schemas.d.ts +12 -0
  46. package/dist/src/@types/display-condition.d.ts +61 -0
  47. package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +43 -0
  48. package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +2 -0
  49. package/dist/src/components/organisms/display-conditions/DisplayConditionListState.vue.d.ts +18 -0
  50. package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +2 -0
  51. package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +2 -0
  52. package/dist/src/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.d.ts +2 -0
  53. package/dist/src/composables/useConfig.d.ts +6 -0
  54. package/dist/src/composables/useDisplayConditions.d.ts +18 -0
  55. package/dist/src/composables/useModuleRepair.d.ts +2 -11
  56. package/dist/src/composables/useSaveValidation.d.ts +1 -1
  57. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +4 -0
  58. package/dist/src/config/migrator/legacyUnsubscribeTextMigrator.d.ts +1 -0
  59. package/dist/src/enums/academy.d.ts +2 -0
  60. package/dist/src/enums/display-condition.d.ts +15 -0
  61. package/dist/src/enums/save-validation.d.ts +2 -1
  62. package/dist/src/extensions/DisplayConditions/bridge.d.ts +7 -0
  63. package/dist/src/extensions/DisplayConditions/constants.d.ts +23 -0
  64. package/dist/src/extensions/DisplayConditions/control.d.ts +25 -0
  65. package/dist/src/extensions/DisplayConditions/extension.d.ts +2 -0
  66. package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +4 -0
  67. package/dist/src/extensions/DisplayConditions/library.d.ts +8 -0
  68. package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +5 -0
  69. package/dist/src/mock/api/display-conditions.d.ts +2 -0
  70. package/dist/src/services/displayConditionApi.d.ts +8 -0
  71. package/dist/src/stores/config.d.ts +210 -0
  72. package/dist/src/stores/display-condition.d.ts +86 -0
  73. package/dist/src/stores/editor.d.ts +27 -0
  74. package/dist/src/utils/displayCondition.d.ts +11 -0
  75. package/dist/src/utils/legacyUnsubscribeConversion.d.ts +10 -0
  76. package/dist/src/utils/protectTableText.d.ts +2 -0
  77. package/dist/static/stripo-runtime-manifest.json.js +1 -1
  78. package/dist/static/styles/variables.css.js +1 -0
  79. package/dist/stores/config.js +13 -6
  80. package/dist/stores/display-condition.js +29 -0
  81. package/dist/stores/editor.js +1 -0
  82. package/dist/utils/displayCondition.js +29 -0
  83. package/dist/utils/legacyUnsubscribeConversion.js +49 -0
  84. package/dist/utils/pairProductVariables.js +29 -28
  85. package/dist/utils/protectTableText.js +22 -0
  86. package/package.json +2 -2
package/README.md CHANGED
@@ -155,6 +155,7 @@ const config: GuidoConfigInput = {
155
155
  ui?: {
156
156
  showHeader?: boolean, // Default: true
157
157
  backButtonLabel?: string,
158
+ externalDisplayConditions?: boolean, // Default: false - Replace Stripo's display-condition UI with a Conditions tab in the settings panel and create/select drawers for reusable Liquid/Pongo display conditions.
158
159
  },
159
160
 
160
161
  // Optional: Feature toggles (defaults apply once initialized — see `ready` prop below)
@@ -171,8 +172,10 @@ const config: GuidoConfigInput = {
171
172
  allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
172
173
  allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
173
174
  reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
175
+ legacyUnsubscribeConversion?: boolean, // Default: false - Convert legacy unsubscribe blocks that have no unsubscribe link into text blocks (on load and on module drop/copy) and show a warning modal.
174
176
  accessibilityTesting?: boolean, // Default: false - Show the Accessibility Test entry in the header kebab menu (Stripo's checker: contrast, image alternatives, colour-vision simulation) and the tab-bar onboarding tour that points at it.
175
177
  itemsPriceFormatting?: boolean, // Default: false - Items block price formatting: thousand/decimal separator + decimal count on the block root, raw price tags in the export (formatted at send time).
178
+ blockUnsubscribeLinks?: boolean, // Default: false - Warn on save when the design carries an Insider unsubscribe link or code ({{ins-*-unsubscribe-link}}, <%asm_*_raw_url%>, <%unsub%>): the legacy save is rejected with a warning toaster; with the validation drawer on it is a warning row that "Save and Continue" can skip. Launch blocking is up to the host. Set true for accounts whose unsubscribes are managed outside Insider (SFMC).
176
179
  },
177
180
 
178
181
  // Optional: Callbacks
@@ -705,6 +708,14 @@ multiple partners (e.g. architect) should key by partner and place the active pa
705
708
  first. Omit the prop and the repair is a safe no-op — nothing is rewritten and no
706
709
  toaster fires (useful before the host has wired the catalog).
707
710
 
711
+ With `features.legacyUnsubscribeConversion: true`, a dropped or copied module's legacy
712
+ unsubscribe block that has no unsubscribe link (the old editor reused it as plain text,
713
+ e.g. a company address) becomes a plain text block that keeps its content, and a warning
714
+ modal explains it. The same conversion runs when a template is opened. Register these
715
+ keys host-side: `email-editor.legacy-unsubscribe-converted-modal-title`,
716
+ `email-editor.legacy-unsubscribe-converted-modal-message` and
717
+ `email-editor.legacy-unsubscribe-converted-modal-visit-academy` (OK reuses `action-builder.ok`).
718
+
708
719
  ---
709
720
 
710
721
  ## Development
@@ -1,6 +1,6 @@
1
- import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
- import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as b, custom as k, boolean as o, array as c, transform as y, unknown as r, record as g, fallback as R, literal as u, looseObject as C, variant as T, union as h, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
- const p = {
1
+ import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
+ import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as k, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, looseObject as C, variant as T, union as h, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
+ const b = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
6
6
  /** Transactional/system emails */
@@ -12,16 +12,16 @@ const p = {
12
12
  ARCHITECT: 49,
13
13
  /** Unsubscribe page builder */
14
14
  UNSUBSCRIBE_PAGES: 97
15
- }, A = a({
15
+ }, A = o({
16
16
  /** Unique identifier for the template being edited */
17
- templateId: i(
17
+ templateId: r(
18
18
  t(),
19
- b(1, "templateId is required")
19
+ p(1, "templateId is required")
20
20
  ),
21
21
  /** Unique identifier for the user editing the template */
22
- userId: i(
22
+ userId: r(
23
23
  t(),
24
- b(1, "userId is required")
24
+ p(1, "userId is required")
25
25
  ),
26
26
  /** Optional variation ID for A/B testing */
27
27
  variationId: e(t()),
@@ -33,16 +33,16 @@ const p = {
33
33
  * Stripo doc id) and is never an endpoint id.
34
34
  */
35
35
  templateLibraryId: e(t())
36
- }), L = a({
36
+ }), L = o({
37
37
  /** Fallback font name (e.g., "Georgia") */
38
38
  name: t(),
39
39
  /** Fallback font family (e.g., "serif" or "sans-serif") */
40
40
  family: t()
41
- }), E = a({
41
+ }), E = o({
42
42
  /** Partner/organization name (required) */
43
- name: i(
43
+ name: r(
44
44
  t(),
45
- b(1, "partner.name is required")
45
+ p(1, "partner.name is required")
46
46
  ),
47
47
  /** Product type identifier */
48
48
  productType: e(
@@ -55,14 +55,14 @@ const p = {
55
55
  ),
56
56
  /** Message type (promotional or transactional) */
57
57
  messageType: e(
58
- m([p.PROMOTIONAL, p.TRANSACTIONAL]),
59
- p.PROMOTIONAL
58
+ m([b.PROMOTIONAL, b.TRANSACTIONAL]),
59
+ b.PROMOTIONAL
60
60
  ),
61
61
  /** Display name for the current user */
62
62
  username: e(t(), "Guido User"),
63
63
  /** Fallback font settings from partner settings — used to match backend size calculation */
64
64
  fallbackFont: e(L)
65
- }), M = a({
65
+ }), M = o({
66
66
  /** Display text for the dynamic content */
67
67
  text: t(),
68
68
  /** Template variable value (e.g., {{username}}) */
@@ -71,7 +71,7 @@ const p = {
71
71
  fallback: e(t()),
72
72
  /** Optional formatting options */
73
73
  format: e(
74
- a({
74
+ o({
75
75
  key: t(),
76
76
  value: t()
77
77
  })
@@ -81,58 +81,58 @@ const p = {
81
81
  // eslint-disable-next-line camelcase -- backend field name
82
82
  tag_text: e(t()),
83
83
  value: e(t()),
84
- children: e(c(f)),
84
+ children: e(n(f)),
85
85
  // eslint-disable-next-line camelcase -- backend field name
86
- select_items: e(c(f))
86
+ select_items: e(n(f))
87
87
  })), P = g(
88
88
  t(),
89
- R(c(f), [])
90
- ), N = C({
89
+ R(n(f), [])
90
+ ), v = C({
91
91
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
92
- id: e(s()),
92
+ id: e(c()),
93
93
  /** Decimal places for price display (legacy data may use string or number) */
94
- decimalCount: e(h([t(), s()])),
94
+ decimalCount: e(h([t(), c()])),
95
95
  /** Pinned product IDs (empty array when filter-driven) */
96
- productIds: e(c(r())),
96
+ productIds: e(n(i())),
97
97
  /** Whether the block requested live products at send time */
98
- sendProductRequestFlag: e(o()),
98
+ sendProductRequestFlag: e(a()),
99
99
  /** Whether to randomize product order */
100
- shuffleProducts: e(o()),
100
+ shuffleProducts: e(a()),
101
101
  /** Filter rules driving product selection */
102
- filters: e(c(r())),
102
+ filters: e(n(i())),
103
103
  /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
104
104
  currency: e(t()),
105
105
  /** Currency display settings (separators, alignment, decimals) */
106
- currencySettings: e(r()),
106
+ currencySettings: e(i()),
107
107
  /** Locale (e.g. 'nl_NL') */
108
108
  language: e(t()),
109
109
  /** Recommendation strategy key (e.g. 'newArrivals') */
110
110
  strategy: e(t()),
111
111
  /** Snapshot of products as rendered by the legacy block */
112
- recommendedProducts: e(c(r())),
112
+ recommendedProducts: e(n(i())),
113
113
  /** Number of product cards per row */
114
- cardsInRow: e(s()),
114
+ cardsInRow: e(c()),
115
115
  /** Mobile-only padding (right) */
116
- mobileRightPadding: e(s()),
116
+ mobileRightPadding: e(c()),
117
117
  /** Mobile-only padding (left) */
118
- mobileLeftPadding: e(s()),
118
+ mobileLeftPadding: e(c()),
119
119
  /** Disable responsive scaling */
120
- unresponsive: e(o()),
120
+ unresponsive: e(a()),
121
121
  /** Layout orientation ('vertical' | 'horizontal') */
122
122
  orientation: e(t()),
123
123
  /** Whether long text is trimmed */
124
- textTrimming: e(o()),
124
+ textTrimming: e(a()),
125
125
  /** Block type marker used by some legacy variants */
126
126
  blockType: e(t()),
127
127
  /** Size variant marker (legacy data may use string or number) */
128
- size: e(h([t(), s()])),
128
+ size: e(h([t(), c()])),
129
129
  /** Vertical responsiveness flag (legacy size=1 variants) */
130
- verticalResponsiveness: e(o()),
130
+ verticalResponsiveness: e(a()),
131
131
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
132
- isPriceMovedToNextLine: e(o()),
132
+ isPriceMovedToNextLine: e(a()),
133
133
  /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
134
- isPriceDeletedForZeroSale: e(o())
135
- }), v = a({
134
+ isPriceDeletedForZeroSale: e(a())
135
+ }), x = o({
136
136
  /**
137
137
  * Legacy recommendation block configs keyed by block ID.
138
138
  * Pass this when loading a template authored with the v1
@@ -140,17 +140,17 @@ const p = {
140
140
  * strategy, currency, locale, and layout data.
141
141
  */
142
142
  recommendationConfigs: e(
143
- g(t(), N),
143
+ g(t(), v),
144
144
  {}
145
145
  )
146
- }), x = a({
146
+ }), D = o({
147
147
  /** Initial HTML content */
148
148
  html: e(t(), ""),
149
149
  /** Initial CSS content */
150
150
  css: e(t(), ""),
151
151
  /** Preselected dynamic content items */
152
152
  preselectedDynamicContent: e(
153
- c(M),
153
+ n(M),
154
154
  []
155
155
  ),
156
156
  /**
@@ -161,11 +161,11 @@ const p = {
161
161
  */
162
162
  dynamicContentList: e(P, {}),
163
163
  /** Valid custom field attribute names from the partner's categorized fields */
164
- customFieldAttributes: e(c(t()), []),
164
+ customFieldAttributes: e(n(t()), []),
165
165
  /** Selected unsubscribe page IDs */
166
- selectedUnsubscribePages: e(c(s()), []),
166
+ selectedUnsubscribePages: e(n(c()), []),
167
167
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
168
- forceRecreate: e(o(), !1),
168
+ forceRecreate: e(a(), !1),
169
169
  /**
170
170
  * Consumer-persisted tracking-id high-water mark (SD-141414). Used as the id floor
171
171
  * during migration so a rolled-back document never re-mints retired tracking ids.
@@ -174,9 +174,9 @@ const p = {
174
174
  * mount. Non-numbers still fail, like every other field in this schema.
175
175
  */
176
176
  trackIdCounter: e(
177
- i(
178
- s(),
179
- y((n) => Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0)
177
+ r(
178
+ c(),
179
+ S((s) => Number.isFinite(s) ? Math.max(0, Math.floor(s)) : 0)
180
180
  ),
181
181
  0
182
182
  ),
@@ -188,65 +188,71 @@ const p = {
188
188
  * cannot be undone. Hosts send `[]` for an empty map.
189
189
  */
190
190
  recommendationCampaignUrls: e(
191
- i(
192
- r(),
193
- y((n) => n && typeof n == "object" ? { ...n } : void 0)
191
+ r(
192
+ i(),
193
+ S((s) => s && typeof s == "object" ? { ...s } : void 0)
194
194
  )
195
195
  ),
196
196
  /** Migration-only inputs (legacy block configs) */
197
- migration: e(v, {})
198
- }), D = a({
197
+ migration: e(x, {})
198
+ }), N = o({
199
199
  /** Sender display name */
200
200
  senderName: e(t(), ""),
201
201
  /** Email subject line */
202
202
  subject: e(t(), "")
203
- }), O = a({
203
+ }), O = o({
204
204
  /** Locale for the editor UI */
205
205
  locale: e(t(), "en"),
206
206
  /** Path to translations object */
207
207
  translationsPath: e(t(), "window.trans[Object.keys(window.trans)[0]]"),
208
208
  /** Migration date for template compatibility */
209
- migrationDate: e(s(), 1759696858),
209
+ migrationDate: e(c(), 1759696858),
210
210
  /** Email header settings */
211
- emailHeader: e(D, { senderName: "", subject: "" }),
211
+ emailHeader: e(N, { senderName: "", subject: "" }),
212
212
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
213
- savedModulesFolderName: e(t(), S.SAVED_MODULES),
213
+ savedModulesFolderName: e(t(), y.SAVED_MODULES),
214
214
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
215
- defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
216
- }), F = a({
215
+ defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
216
+ }), F = o({
217
217
  /** Whether to show the header bar */
218
- showHeader: e(o(), !0),
218
+ showHeader: e(a(), !0),
219
219
  /** Custom label for back button (if shown) */
220
- backButtonLabel: e(t())
221
- }), U = a({
220
+ backButtonLabel: e(t()),
221
+ /** Replace Stripo's display-condition UI with the Conditions tab and create/select drawers */
222
+ externalDisplayConditions: e(a(), !1)
223
+ }), U = o({
222
224
  /** Enable dynamic content insertion */
223
- dynamicContent: e(o(), !0),
225
+ dynamicContent: e(a(), !0),
224
226
  /** Enable save as template functionality */
225
- saveAsTemplate: e(o(), !0),
227
+ saveAsTemplate: e(a(), !0),
226
228
  /** Enable version history */
227
- versionHistory: e(o(), !0),
229
+ versionHistory: e(a(), !0),
228
230
  /** Enable test message sending */
229
- testMessage: e(o(), !0),
231
+ testMessage: e(a(), !0),
230
232
  /** Enable display conditions */
231
- displayConditions: e(o(), !0),
233
+ displayConditions: e(a(), !0),
232
234
  /** Enable unsubscribe block */
233
- unsubscribe: e(o(), !0),
235
+ unsubscribe: e(a(), !0),
234
236
  /** Disable modules panel in the editor */
235
- modulesDisabled: e(o(), !1),
237
+ modulesDisabled: e(a(), !1),
236
238
  /** Enable Liquid template syntax */
237
- liquidSyntax: e(o(), !1),
239
+ liquidSyntax: e(a(), !1),
238
240
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
239
- autosave: e(o(), !1),
240
- accessibilityTesting: e(o(), !1),
241
+ autosave: e(a(), !1),
242
+ accessibilityTesting: e(a(), !1),
241
243
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
242
- allowlistEnabled: e(o(), !1),
244
+ allowlistEnabled: e(a(), !1),
243
245
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
244
- linkTrackingIds: e(o(), !1),
246
+ linkTrackingIds: e(a(), !1),
245
247
  /** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
246
- allowSaveWithErrors: e(o(), !0),
247
- reusableRecommendationStrategy: e(o(), !1),
248
+ allowSaveWithErrors: e(a(), !0),
249
+ reusableRecommendationStrategy: e(a(), !1),
250
+ /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
251
+ legacyUnsubscribeConversion: e(a(), !1),
248
252
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
249
- itemsPriceFormatting: e(o(), !1)
253
+ itemsPriceFormatting: e(a(), !1),
254
+ /** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
255
+ blockUnsubscribeLinks: e(a(), !1)
250
256
  }), w = m([
251
257
  "amp-accordion",
252
258
  "amp-carousel",
@@ -269,25 +275,25 @@ const p = {
269
275
  "unsubscribe-block",
270
276
  "coupon-block",
271
277
  "items-block"
272
- ]), j = a({
278
+ ]), j = o({
273
279
  /** Default blocks to exclude from the editor */
274
280
  excludeDefaults: e(
275
- c(w),
281
+ n(w),
276
282
  []
277
283
  ),
278
284
  /** Custom blocks to include in the editor */
279
285
  includeCustoms: e(
280
- c(B),
286
+ n(B),
281
287
  []
282
288
  )
283
- }), d = a({
289
+ }), d = o({
284
290
  /** Unique identifier for the rule */
285
291
  id: t(),
286
292
  /** Human-readable description */
287
293
  description: e(t()),
288
294
  /** Priority for rule ordering (lower = earlier) */
289
- priority: s()
290
- }), H = a({
295
+ priority: c()
296
+ }), H = o({
291
297
  ...d.entries,
292
298
  type: u("replace"),
293
299
  /** String to search for */
@@ -295,8 +301,8 @@ const p = {
295
301
  /** Replacement string */
296
302
  replacement: t(),
297
303
  /** Replace all occurrences (default: false) */
298
- replaceAll: e(o())
299
- }), _ = a({
304
+ replaceAll: e(a())
305
+ }), _ = o({
300
306
  ...d.entries,
301
307
  type: u("regex"),
302
308
  /** Regex pattern string */
@@ -305,17 +311,17 @@ const p = {
305
311
  replacement: t(),
306
312
  /** Regex flags (e.g., 'gi') */
307
313
  flags: e(t())
308
- }), q = a({
314
+ }), q = o({
309
315
  ...d.entries,
310
316
  type: u("remove"),
311
317
  /** Strings or patterns to remove */
312
- targets: c(t())
313
- }), G = a({
318
+ targets: n(t())
319
+ }), G = o({
314
320
  ...d.entries,
315
321
  type: u("custom"),
316
322
  /** Custom processor function */
317
323
  processor: k(
318
- (n) => typeof n == "function",
324
+ (s) => typeof s == "function",
319
325
  "processor must be a function"
320
326
  )
321
327
  }), V = T("type", [
@@ -323,23 +329,23 @@ const p = {
323
329
  _,
324
330
  q,
325
331
  G
326
- ]), z = a({
332
+ ]), z = o({
327
333
  /** Custom compiler rules to apply */
328
- customRules: e(c(V), []),
334
+ customRules: e(n(V), []),
329
335
  /** Skip default compiler rules */
330
- ignoreDefaultRules: e(o(), !1)
331
- }), W = a({
336
+ ignoreDefaultRules: e(a(), !1)
337
+ }), W = o({
332
338
  /**
333
339
  * External validation handler called before save completes.
334
340
  * Return false to cancel the save operation.
335
341
  */
336
342
  externalValidation: e(
337
343
  k(
338
- (n) => typeof n == "function",
344
+ (s) => typeof s == "function",
339
345
  "externalValidation must be a function"
340
346
  )
341
347
  )
342
- }), K = a({
348
+ }), K = o({
343
349
  // Required sections
344
350
  /** Identity configuration (required) */
345
351
  identity: A,
@@ -347,7 +353,7 @@ const p = {
347
353
  partner: E,
348
354
  // Optional sections (with defaults)
349
355
  /** Template content and presets */
350
- template: e(x, {}),
356
+ template: e(D, {}),
351
357
  /** Editor settings */
352
358
  editor: e(O, {}),
353
359
  /** UI configuration */
@@ -373,19 +379,19 @@ export {
373
379
  f as DynamicContentNodeSchema,
374
380
  M as DynamicContentSchema,
375
381
  O as EditorSchema,
376
- D as EmailHeaderSchema,
382
+ N as EmailHeaderSchema,
377
383
  L as FallbackFontSchema,
378
384
  U as FeaturesSchema,
379
385
  K as GuidoConfigSchema,
380
386
  A as IdentitySchema,
381
- N as LegacyRecommendationConfigSchema,
382
- p as MessageType,
387
+ v as LegacyRecommendationConfigSchema,
388
+ b as MessageType,
383
389
  E as PartnerSchema,
384
390
  l as ProductType,
385
391
  _ as RegexRuleSchema,
386
392
  q as RemoveRuleSchema,
387
393
  H as ReplaceRuleSchema,
388
- v as TemplateMigrationSchema,
389
- x as TemplateSchema,
394
+ x as TemplateMigrationSchema,
395
+ D as TemplateSchema,
390
396
  F as UISchema
391
397
  };
@@ -0,0 +1,25 @@
1
+ import { object as e, optional as a, string as o, nullish as i, number as t, picklist as n, array as c } from "../node_modules/valibot/dist/index.js";
2
+ const s = n(["liquid", "pongo"]), d = n(["codeOnly", "logicBuilder"]), r = e({
3
+ id: t(),
4
+ name: o(),
5
+ description: i(o(), ""),
6
+ syntax: s,
7
+ method: d,
8
+ codeBefore: o(),
9
+ codeAfter: i(o(), ""),
10
+ createdAt: a(o())
11
+ }), p = e({
12
+ data: c(r),
13
+ meta: e({
14
+ totalCount: t(),
15
+ perPage: t(),
16
+ currentPage: t(),
17
+ lastPage: t()
18
+ })
19
+ });
20
+ export {
21
+ p as DisplayConditionListResponseSchema,
22
+ d as DisplayConditionMethodSchema,
23
+ s as DisplayConditionSyntaxSchema,
24
+ r as SavedDisplayConditionSchema
25
+ };
@@ -1,20 +1,20 @@
1
1
  import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
- var t = function() {
4
+ var s = function() {
5
5
  var a = this, r = a._self._c, e = a._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), e.isLegacyUnsubscribeConversionEnabled ? r(e.LegacyUnsubscribeConvertedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isExternalDisplayConditionsEnabled ? r(e.DisplayConditionsHost) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(l) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
- }, s = [], n = /* @__PURE__ */ i(
9
+ }, t = [], n = /* @__PURE__ */ i(
10
10
  o,
11
- t,
12
11
  s,
12
+ t,
13
13
  !1,
14
14
  null,
15
- "98b59f91"
15
+ "ed74fdf8"
16
16
  );
17
- const c = n.exports;
17
+ const v = n.exports;
18
18
  export {
19
- c as default
19
+ v as default
20
20
  };