@useinsider/guido 3.26.0 → 3.27.0-beta.0dd857f

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 (124) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +93 -91
  3. package/dist/@types/display-condition.js +25 -0
  4. package/dist/@types/email-be/html-validation.js +28 -0
  5. package/dist/components/Guido.vue.js +5 -5
  6. package/dist/components/Guido.vue2.js +104 -98
  7. package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +17 -0
  8. package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +41 -0
  9. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +30 -0
  10. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +81 -0
  11. package/dist/components/organisms/display-conditions/DisplayConditionListState.vue.js +17 -0
  12. package/dist/components/organisms/display-conditions/DisplayConditionListState.vue2.js +45 -0
  13. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +36 -0
  14. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +63 -0
  15. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +17 -0
  16. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +22 -0
  17. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +5 -5
  18. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +15 -15
  19. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +6 -6
  20. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +28 -27
  21. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +3 -3
  22. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +42 -27
  23. package/dist/composables/useBlocksConfig.js +29 -20
  24. package/dist/composables/useCustomInterfaceAppearance.js +50 -50
  25. package/dist/composables/useDisplayConditions.js +116 -0
  26. package/dist/composables/useFullStoryBridge.js +10 -9
  27. package/dist/composables/useSave.js +19 -17
  28. package/dist/composables/useSaveValidation.js +134 -252
  29. package/dist/composables/useTranslations.js +14 -8
  30. package/dist/config/compiler/utils/itemsCompilerUtils.js +43 -42
  31. package/dist/config/compiler/utils/recommendationCompilerUtils.js +67 -64
  32. package/dist/enums/academy.js +1 -0
  33. package/dist/enums/display-condition.js +12 -0
  34. package/dist/enums/email-be.js +27 -0
  35. package/dist/enums/save-validation.js +2 -2
  36. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +14 -14
  37. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +52 -40
  38. package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +15 -15
  39. package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +17 -15
  40. package/dist/extensions/Blocks/common-control.js +25 -25
  41. package/dist/extensions/DisplayConditions/bridge.js +25 -0
  42. package/dist/extensions/DisplayConditions/constants.js +26 -0
  43. package/dist/extensions/DisplayConditions/control.js +215 -0
  44. package/dist/extensions/DisplayConditions/display-conditions.css.js +226 -0
  45. package/dist/extensions/DisplayConditions/extension.js +28 -0
  46. package/dist/extensions/DisplayConditions/iconsRegistry.js +20 -0
  47. package/dist/extensions/DisplayConditions/library.js +30 -0
  48. package/dist/extensions/DisplayConditions/settingsPanel.js +17 -0
  49. package/dist/extensions/DynamicContent/dynamic-content.js +15 -17
  50. package/dist/guido.css +1 -1
  51. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +93 -92
  52. package/dist/node_modules/valibot/dist/index.js +405 -291
  53. package/dist/package.json.js +2 -2
  54. package/dist/services/displayConditionApi.js +39 -0
  55. package/dist/services/emailBe/errors/ApiError.js +50 -0
  56. package/dist/services/emailBe/errors/handleApiError.js +31 -0
  57. package/dist/services/emailBe/errors/toApiError.js +71 -0
  58. package/dist/services/emailBe/html/HtmlValidationService.js +35 -0
  59. package/dist/services/emailBe/html/index.js +6 -0
  60. package/dist/services/emailBe/http/HttpManager.js +68 -0
  61. package/dist/services/emailBe/http/RetryStack.js +24 -0
  62. package/dist/services/emailBe/http/client.js +61 -0
  63. package/dist/services/emailBe/http/index.js +10 -0
  64. package/dist/services/emailBe/http/transportErrors.js +20 -0
  65. package/dist/src/@types/config/schemas.d.ts +4 -0
  66. package/dist/src/@types/display-condition.d.ts +61 -0
  67. package/dist/src/@types/email-be/html-validation.d.ts +51 -0
  68. package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +43 -0
  69. package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +2 -0
  70. package/dist/src/components/organisms/display-conditions/DisplayConditionListState.vue.d.ts +18 -0
  71. package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +2 -0
  72. package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +2 -0
  73. package/dist/src/composables/useConfig.d.ts +2 -0
  74. package/dist/src/composables/useDisplayConditions.d.ts +18 -0
  75. package/dist/src/composables/useSaveValidation.d.ts +2 -2
  76. package/dist/src/enums/academy.d.ts +1 -0
  77. package/dist/src/enums/display-condition.d.ts +15 -0
  78. package/dist/src/enums/email-be.d.ts +26 -0
  79. package/dist/src/enums/save-validation.d.ts +3 -15
  80. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +2 -0
  81. package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
  82. package/dist/src/extensions/DisplayConditions/bridge.d.ts +7 -0
  83. package/dist/src/extensions/DisplayConditions/constants.d.ts +23 -0
  84. package/dist/src/extensions/DisplayConditions/control.d.ts +25 -0
  85. package/dist/src/extensions/{Blocks/_Boilerplate → DisplayConditions}/iconsRegistry.d.ts +1 -1
  86. package/dist/src/extensions/DisplayConditions/library.d.ts +8 -0
  87. package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +5 -0
  88. package/dist/src/mock/api/display-conditions.d.ts +2 -0
  89. package/dist/src/services/displayConditionApi.d.ts +8 -0
  90. package/dist/src/services/emailBe/errors/ApiError.d.ts +40 -0
  91. package/dist/src/services/emailBe/errors/handleApiError.d.ts +11 -0
  92. package/dist/src/services/emailBe/errors/toApiError.d.ts +2 -0
  93. package/dist/src/services/emailBe/html/HtmlValidationService.d.ts +8 -0
  94. package/dist/src/services/emailBe/html/index.d.ts +2 -0
  95. package/dist/src/services/emailBe/http/HttpManager.d.ts +13 -0
  96. package/dist/src/services/emailBe/http/RetryStack.d.ts +6 -0
  97. package/dist/src/services/emailBe/http/client.d.ts +3 -0
  98. package/dist/src/services/emailBe/http/index.d.ts +2 -0
  99. package/dist/src/services/emailBe/http/transportErrors.d.ts +15 -0
  100. package/dist/src/services/emailBe/http/types.d.ts +46 -0
  101. package/dist/src/stores/config.d.ts +170 -0
  102. package/dist/src/stores/display-condition.d.ts +86 -0
  103. package/dist/src/stores/onboarding.d.ts +1 -0
  104. package/dist/src/utils/displayCondition.d.ts +11 -0
  105. package/dist/src/utils/editorShadowRoot.d.ts +1 -0
  106. package/dist/src/utils/protectTableText.d.ts +2 -0
  107. package/dist/static/styles/variables.css.js +1 -0
  108. package/dist/stores/config.js +13 -6
  109. package/dist/stores/display-condition.js +29 -0
  110. package/dist/stores/onboarding.js +4 -1
  111. package/dist/utils/displayCondition.js +29 -0
  112. package/dist/utils/editorShadowRoot.js +8 -0
  113. package/dist/utils/pairProductVariables.js +29 -28
  114. package/dist/utils/protectTableText.js +22 -0
  115. package/package.json +10 -2
  116. package/dist/src/extensions/Blocks/_Boilerplate/block.d.ts +0 -11
  117. package/dist/src/extensions/Blocks/_Boilerplate/constants/controlIds.d.ts +0 -7
  118. package/dist/src/extensions/Blocks/_Boilerplate/constants/index.d.ts +0 -10
  119. package/dist/src/extensions/Blocks/_Boilerplate/constants/selectors.d.ts +0 -16
  120. package/dist/src/extensions/Blocks/_Boilerplate/control.d.ts +0 -17
  121. package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +0 -15
  122. package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
  123. package/dist/src/extensions/Blocks/_Boilerplate/template.d.ts +0 -6
  124. /package/dist/src/extensions/{Blocks/_Boilerplate → DisplayConditions}/extension.d.ts +0 -0
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)
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as y } 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 p, custom as k, boolean as o, array as c, transform as S, 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";
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, lazy as T, looseObject as C, variant as I, union as h } from "../../node_modules/valibot/dist/index.js";
3
3
  const b = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -12,14 +12,14 @@ const b = {
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
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
24
  p(1, "userId is required")
25
25
  ),
@@ -33,14 +33,14 @@ const b = {
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
45
  p(1, "partner.name is required")
46
46
  ),
@@ -62,7 +62,7 @@ const b = {
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,68 +71,68 @@ const b = {
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
  })
78
78
  )
79
- }), f = I(() => C({
79
+ }), f = T(() => C({
80
80
  text: e(t()),
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), [])
89
+ R(n(f), [])
90
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
- }), N = 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
@@ -143,14 +143,14 @@ const b = {
143
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 b = {
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 b = {
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
- S((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,69 +188,71 @@ const b = {
188
188
  * cannot be undone. Hosts send `[]` for an empty map.
189
189
  */
190
190
  recommendationCampaignUrls: e(
191
- i(
192
- r(),
193
- S((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(N, {})
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
213
  savedModulesFolderName: e(t(), y.SAVED_MODULES),
214
214
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
215
215
  defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
216
- }), F = a({
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),
248
250
  /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
249
- legacyUnsubscribeConversion: e(o(), !1),
251
+ legacyUnsubscribeConversion: e(a(), !1),
250
252
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
251
- itemsPriceFormatting: e(o(), !1),
253
+ itemsPriceFormatting: e(a(), !1),
252
254
  /** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
253
- blockUnsubscribeLinks: e(o(), !1)
255
+ blockUnsubscribeLinks: e(a(), !1)
254
256
  }), w = m([
255
257
  "amp-accordion",
256
258
  "amp-carousel",
@@ -273,25 +275,25 @@ const b = {
273
275
  "unsubscribe-block",
274
276
  "coupon-block",
275
277
  "items-block"
276
- ]), j = a({
278
+ ]), j = o({
277
279
  /** Default blocks to exclude from the editor */
278
280
  excludeDefaults: e(
279
- c(w),
281
+ n(w),
280
282
  []
281
283
  ),
282
284
  /** Custom blocks to include in the editor */
283
285
  includeCustoms: e(
284
- c(B),
286
+ n(B),
285
287
  []
286
288
  )
287
- }), d = a({
289
+ }), d = o({
288
290
  /** Unique identifier for the rule */
289
291
  id: t(),
290
292
  /** Human-readable description */
291
293
  description: e(t()),
292
294
  /** Priority for rule ordering (lower = earlier) */
293
- priority: s()
294
- }), H = a({
295
+ priority: c()
296
+ }), H = o({
295
297
  ...d.entries,
296
298
  type: u("replace"),
297
299
  /** String to search for */
@@ -299,8 +301,8 @@ const b = {
299
301
  /** Replacement string */
300
302
  replacement: t(),
301
303
  /** Replace all occurrences (default: false) */
302
- replaceAll: e(o())
303
- }), _ = a({
304
+ replaceAll: e(a())
305
+ }), _ = o({
304
306
  ...d.entries,
305
307
  type: u("regex"),
306
308
  /** Regex pattern string */
@@ -309,41 +311,41 @@ const b = {
309
311
  replacement: t(),
310
312
  /** Regex flags (e.g., 'gi') */
311
313
  flags: e(t())
312
- }), q = a({
314
+ }), q = o({
313
315
  ...d.entries,
314
316
  type: u("remove"),
315
317
  /** Strings or patterns to remove */
316
- targets: c(t())
317
- }), G = a({
318
+ targets: n(t())
319
+ }), G = o({
318
320
  ...d.entries,
319
321
  type: u("custom"),
320
322
  /** Custom processor function */
321
323
  processor: k(
322
- (n) => typeof n == "function",
324
+ (s) => typeof s == "function",
323
325
  "processor must be a function"
324
326
  )
325
- }), V = T("type", [
327
+ }), V = I("type", [
326
328
  H,
327
329
  _,
328
330
  q,
329
331
  G
330
- ]), z = a({
332
+ ]), z = o({
331
333
  /** Custom compiler rules to apply */
332
- customRules: e(c(V), []),
334
+ customRules: e(n(V), []),
333
335
  /** Skip default compiler rules */
334
- ignoreDefaultRules: e(o(), !1)
335
- }), W = a({
336
+ ignoreDefaultRules: e(a(), !1)
337
+ }), W = o({
336
338
  /**
337
339
  * External validation handler called before save completes.
338
340
  * Return false to cancel the save operation.
339
341
  */
340
342
  externalValidation: e(
341
343
  k(
342
- (n) => typeof n == "function",
344
+ (s) => typeof s == "function",
343
345
  "externalValidation must be a function"
344
346
  )
345
347
  )
346
- }), K = a({
348
+ }), K = o({
347
349
  // Required sections
348
350
  /** Identity configuration (required) */
349
351
  identity: A,
@@ -351,7 +353,7 @@ const b = {
351
353
  partner: E,
352
354
  // Optional sections (with defaults)
353
355
  /** Template content and presets */
354
- template: e(x, {}),
356
+ template: e(D, {}),
355
357
  /** Editor settings */
356
358
  editor: e(O, {}),
357
359
  /** UI configuration */
@@ -377,7 +379,7 @@ export {
377
379
  f as DynamicContentNodeSchema,
378
380
  M as DynamicContentSchema,
379
381
  O as EditorSchema,
380
- D as EmailHeaderSchema,
382
+ N as EmailHeaderSchema,
381
383
  L as FallbackFontSchema,
382
384
  U as FeaturesSchema,
383
385
  K as GuidoConfigSchema,
@@ -389,7 +391,7 @@ export {
389
391
  _ as RegexRuleSchema,
390
392
  q as RemoveRuleSchema,
391
393
  H as ReplaceRuleSchema,
392
- N as TemplateMigrationSchema,
393
- x as TemplateSchema,
394
+ x as TemplateMigrationSchema,
395
+ D as TemplateSchema,
394
396
  F as UISchema
395
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
+ };
@@ -0,0 +1,28 @@
1
+ import { pipe as o, check as i, object as r, array as l, boolean as s, string as e, fallback as m, union as t, nullable as d, record as h, number as a, transform as u, tuple as p } from "../../node_modules/valibot/dist/index.js";
2
+ const b = r({
3
+ code: e(),
4
+ trans: r({
5
+ key: e(),
6
+ // PHP serializes an empty associative array as `[]`, so an empty list means "no placeholders".
7
+ replace: t([
8
+ h(e(), t([e(), a()])),
9
+ o(p([]), u(() => ({})))
10
+ ])
11
+ }),
12
+ // Not rendered yet, so drift here must not block Save.
13
+ anchor: m(d(r({
14
+ selector: e(),
15
+ indexes: l(a())
16
+ })), null),
17
+ details: l(e())
18
+ }), k = o(
19
+ r({
20
+ valid: s(),
21
+ errors: l(b)
22
+ }),
23
+ i(({ valid: n, errors: c }) => n === !c.length, "valid must match the error list")
24
+ );
25
+ export {
26
+ b as HtmlValidationErrorSchema,
27
+ k as HtmlValidationResultSchema
28
+ };
@@ -1,18 +1,18 @@
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(), e.isLegacyUnsubscribeConversionEnabled ? r(e.LegacyUnsubscribeConvertedModal) : 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
- "415cfac1"
15
+ "8fc59697"
16
16
  );
17
17
  const v = n.exports;
18
18
  export {