@useinsider/guido 3.18.2-beta.83b62a8 → 3.18.2-beta.963f84e

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 (58) hide show
  1. package/README.md +0 -20
  2. package/dist/components/Guido.vue.js +3 -3
  3. package/dist/components/Guido.vue2.js +30 -30
  4. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +70 -51
  6. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +23 -37
  7. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -18
  8. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
  9. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
  10. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +34 -34
  11. package/dist/composables/useCustomInterfaceAppearance.js +56 -46
  12. package/dist/composables/useGuidoStateBridge.js +24 -29
  13. package/dist/composables/useHtmlValidator.js +87 -82
  14. package/dist/composables/useHttp.js +24 -22
  15. package/dist/composables/useRecommendation.js +40 -35
  16. package/dist/composables/useStripo.js +31 -31
  17. package/dist/enums/extensions/recommendationBlock.js +38 -31
  18. package/dist/extensions/Blocks/Recommendation/block.js +43 -39
  19. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
  20. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +40 -35
  21. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +84 -52
  22. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
  23. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +189 -90
  24. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
  25. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
  26. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
  27. package/dist/guido.css +1 -1
  28. package/dist/library.js +13 -15
  29. package/dist/services/templateLibraryApi.js +17 -14
  30. package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
  31. package/dist/src/composables/useGuidoStateBridge.d.ts +7 -11
  32. package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
  33. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
  34. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  35. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
  36. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +9 -0
  37. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
  38. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +75 -0
  39. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
  40. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
  41. package/dist/src/library.d.ts +0 -2
  42. package/dist/src/public/trackingIds.d.ts +2 -6
  43. package/dist/src/stores/editor.d.ts +0 -25
  44. package/dist/src/stores/guido-email-editor.d.ts +27 -27
  45. package/dist/src/stores/onboarding.d.ts +377 -0
  46. package/dist/src/utils/genericUtil.d.ts +6 -0
  47. package/dist/src/utils/liquidDynamicContent.d.ts +20 -0
  48. package/dist/static/styles/components/recommendation-strategy.css.js +34 -4
  49. package/dist/static/styles/components/skeleton.css.js +23 -0
  50. package/dist/stores/editor.js +0 -4
  51. package/dist/stores/guido-email-editor.js +4 -0
  52. package/dist/stores/onboarding.js +41 -36
  53. package/dist/utils/genericUtil.js +63 -54
  54. package/dist/utils/liquidDynamicContent.js +15 -0
  55. package/dist/utils/templatePreparation.js +61 -60
  56. package/package.json +1 -5
  57. package/dist/public/editorState.js +0 -4
  58. package/dist/src/public/editorState.d.ts +0 -14
@@ -6,7 +6,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
6
6
  isPreviewModeOpen: boolean;
7
7
  editorVisualMode: string;
8
8
  hasChanges: boolean;
9
- changeSeq: number;
10
9
  isStripoInitialized: boolean;
11
10
  templateId: string;
12
11
  syncModulesEnabled: boolean;
@@ -20,7 +19,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
20
19
  isPreviewModeOpen: boolean;
21
20
  editorVisualMode: string;
22
21
  hasChanges: boolean;
23
- changeSeq: number;
24
22
  isStripoInitialized: boolean;
25
23
  templateId: string;
26
24
  syncModulesEnabled: boolean;
@@ -33,7 +31,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
33
31
  isPreviewModeOpen: boolean;
34
32
  editorVisualMode: string;
35
33
  hasChanges: boolean;
36
- changeSeq: number;
37
34
  isStripoInitialized: boolean;
38
35
  templateId: string;
39
36
  syncModulesEnabled: boolean;
@@ -47,7 +44,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
47
44
  isPreviewModeOpen: boolean;
48
45
  editorVisualMode: string;
49
46
  hasChanges: boolean;
50
- changeSeq: number;
51
47
  isStripoInitialized: boolean;
52
48
  templateId: string;
53
49
  syncModulesEnabled: boolean;
@@ -60,7 +56,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
60
56
  isPreviewModeOpen: boolean;
61
57
  editorVisualMode: string;
62
58
  hasChanges: boolean;
63
- changeSeq: number;
64
59
  isStripoInitialized: boolean;
65
60
  templateId: string;
66
61
  syncModulesEnabled: boolean;
@@ -74,7 +69,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
74
69
  isPreviewModeOpen: boolean;
75
70
  editorVisualMode: string;
76
71
  hasChanges: boolean;
77
- changeSeq: number;
78
72
  isStripoInitialized: boolean;
79
73
  templateId: string;
80
74
  syncModulesEnabled: boolean;
@@ -87,7 +81,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
87
81
  isPreviewModeOpen: boolean;
88
82
  editorVisualMode: string;
89
83
  hasChanges: boolean;
90
- changeSeq: number;
91
84
  isStripoInitialized: boolean;
92
85
  templateId: string;
93
86
  syncModulesEnabled: boolean;
@@ -101,7 +94,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
101
94
  isPreviewModeOpen: boolean;
102
95
  editorVisualMode: string;
103
96
  hasChanges: boolean;
104
- changeSeq: number;
105
97
  isStripoInitialized: boolean;
106
98
  templateId: string;
107
99
  syncModulesEnabled: boolean;
@@ -114,7 +106,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
114
106
  isPreviewModeOpen: boolean;
115
107
  editorVisualMode: string;
116
108
  hasChanges: boolean;
117
- changeSeq: number;
118
109
  isStripoInitialized: boolean;
119
110
  templateId: string;
120
111
  syncModulesEnabled: boolean;
@@ -128,7 +119,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
128
119
  isPreviewModeOpen: boolean;
129
120
  editorVisualMode: string;
130
121
  hasChanges: boolean;
131
- changeSeq: number;
132
122
  isStripoInitialized: boolean;
133
123
  templateId: string;
134
124
  syncModulesEnabled: boolean;
@@ -141,7 +131,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
141
131
  isPreviewModeOpen: boolean;
142
132
  editorVisualMode: string;
143
133
  hasChanges: boolean;
144
- changeSeq: number;
145
134
  isStripoInitialized: boolean;
146
135
  templateId: string;
147
136
  syncModulesEnabled: boolean;
@@ -155,7 +144,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
155
144
  isPreviewModeOpen: boolean;
156
145
  editorVisualMode: string;
157
146
  hasChanges: boolean;
158
- changeSeq: number;
159
147
  isStripoInitialized: boolean;
160
148
  templateId: string;
161
149
  syncModulesEnabled: boolean;
@@ -168,7 +156,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
168
156
  isPreviewModeOpen: boolean;
169
157
  editorVisualMode: string;
170
158
  hasChanges: boolean;
171
- changeSeq: number;
172
159
  isStripoInitialized: boolean;
173
160
  templateId: string;
174
161
  syncModulesEnabled: boolean;
@@ -182,7 +169,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
182
169
  isPreviewModeOpen: boolean;
183
170
  editorVisualMode: string;
184
171
  hasChanges: boolean;
185
- changeSeq: number;
186
172
  isStripoInitialized: boolean;
187
173
  templateId: string;
188
174
  syncModulesEnabled: boolean;
@@ -195,7 +181,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
195
181
  isPreviewModeOpen: boolean;
196
182
  editorVisualMode: string;
197
183
  hasChanges: boolean;
198
- changeSeq: number;
199
184
  isStripoInitialized: boolean;
200
185
  templateId: string;
201
186
  syncModulesEnabled: boolean;
@@ -209,7 +194,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
209
194
  isPreviewModeOpen: boolean;
210
195
  editorVisualMode: string;
211
196
  hasChanges: boolean;
212
- changeSeq: number;
213
197
  isStripoInitialized: boolean;
214
198
  templateId: string;
215
199
  syncModulesEnabled: boolean;
@@ -222,7 +206,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
222
206
  isPreviewModeOpen: boolean;
223
207
  editorVisualMode: string;
224
208
  hasChanges: boolean;
225
- changeSeq: number;
226
209
  isStripoInitialized: boolean;
227
210
  templateId: string;
228
211
  syncModulesEnabled: boolean;
@@ -236,7 +219,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
236
219
  isPreviewModeOpen: boolean;
237
220
  editorVisualMode: string;
238
221
  hasChanges: boolean;
239
- changeSeq: number;
240
222
  isStripoInitialized: boolean;
241
223
  templateId: string;
242
224
  syncModulesEnabled: boolean;
@@ -249,7 +231,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
249
231
  isPreviewModeOpen: boolean;
250
232
  editorVisualMode: string;
251
233
  hasChanges: boolean;
252
- changeSeq: number;
253
234
  isStripoInitialized: boolean;
254
235
  templateId: string;
255
236
  syncModulesEnabled: boolean;
@@ -263,7 +244,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
263
244
  isPreviewModeOpen: boolean;
264
245
  editorVisualMode: string;
265
246
  hasChanges: boolean;
266
- changeSeq: number;
267
247
  isStripoInitialized: boolean;
268
248
  templateId: string;
269
249
  syncModulesEnabled: boolean;
@@ -276,7 +256,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
276
256
  isPreviewModeOpen: boolean;
277
257
  editorVisualMode: string;
278
258
  hasChanges: boolean;
279
- changeSeq: number;
280
259
  isStripoInitialized: boolean;
281
260
  templateId: string;
282
261
  syncModulesEnabled: boolean;
@@ -290,7 +269,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
290
269
  isPreviewModeOpen: boolean;
291
270
  editorVisualMode: string;
292
271
  hasChanges: boolean;
293
- changeSeq: number;
294
272
  isStripoInitialized: boolean;
295
273
  templateId: string;
296
274
  syncModulesEnabled: boolean;
@@ -303,7 +281,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
303
281
  isPreviewModeOpen: boolean;
304
282
  editorVisualMode: string;
305
283
  hasChanges: boolean;
306
- changeSeq: number;
307
284
  isStripoInitialized: boolean;
308
285
  templateId: string;
309
286
  syncModulesEnabled: boolean;
@@ -317,7 +294,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
317
294
  isPreviewModeOpen: boolean;
318
295
  editorVisualMode: string;
319
296
  hasChanges: boolean;
320
- changeSeq: number;
321
297
  isStripoInitialized: boolean;
322
298
  templateId: string;
323
299
  syncModulesEnabled: boolean;
@@ -330,7 +306,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
330
306
  isPreviewModeOpen: boolean;
331
307
  editorVisualMode: string;
332
308
  hasChanges: boolean;
333
- changeSeq: number;
334
309
  isStripoInitialized: boolean;
335
310
  templateId: string;
336
311
  syncModulesEnabled: boolean;
@@ -1,41 +1,41 @@
1
- /** The published editor snapshot — the shape a consumer reads off the shared store. */
2
- export interface GuidoEmailEditorState {
1
+ /**
2
+ * Outbound contract Guido publishes to the host's shared Pinia singleton so
3
+ * cortex-fe can pick up the current editor state and forward it as
4
+ * `clientState.editor` on the next chat-stream POST.
5
+ *
6
+ * State + getters only — `useGuidoStateBridge` writes via `$patch`, no actions
7
+ * live here (architecture invariant).
8
+ *
9
+ * Store id `guidoEmailEditor` is cross-MFE: cortex-fe reads it via
10
+ * `pinia._s.get('guidoEmailEditor')` at runtime. The internal Guido editor
11
+ * store keeps id `guidoEditor` — these are intentionally separate. The
12
+ * internal store carries UI state that cortex-fe should not see; this public
13
+ * store carries the contract Guido is willing to share.
14
+ */
15
+ export declare const useGuidoEmailEditorStore: import("pinia").StoreDefinition<"guidoEmailEditor", {
3
16
  /** Current Stripo HTML — stripe tables only, no DOCTYPE/wrapper. */
4
17
  html: string;
5
18
  /** Current Stripo CSS — es-p* utility classes used by the html. */
6
19
  css: string;
7
20
  /** Wall-clock ms when html/css were last written by the bridge. */
8
21
  lastUpdatedAt: number;
9
- /** Template id from the editor config, so a consumer can scope per-template. */
22
+ /** Template id from the editor config, for cortex-fe to scope per-template. */
10
23
  templateId: string;
11
- }
12
- /**
13
- * Outbound contract Guido publishes to the host's shared Pinia singleton so a
14
- * consumer can read the current editor state: cortex-fe forwards it as
15
- * `clientState.editor` on the next chat-stream POST, email-fe scans it for the
16
- * Array of Objects lock.
17
- *
18
- * Published as `@useinsider/guido/editor-state` and from the root barrel, so a
19
- * consumer imports this store instead of re-declaring one under the same id.
20
- *
21
- * State + getters only, no actions. `useGuidoStateBridge` is the only intended
22
- * writer, but that is Guido's own convention rather than something the store
23
- * enforces: publishing the definition hands a consumer `$patch` as well, exactly
24
- * as the runtime `pinia._s` probe always did.
25
- *
26
- * Store id `guidoEmailEditor` is cross-MFE: cortex-fe reads it via
27
- * `pinia._s.get('guidoEmailEditor')` at runtime rather than importing it, so the
28
- * id stays part of the contract. The internal Guido editor store keeps id
29
- * `guidoEditor` — these are intentionally separate. The internal store carries
30
- * UI state a consumer should not see; this public store carries the contract
31
- * Guido is willing to share.
32
- */
33
- export declare const useGuidoEmailEditorStore: import("pinia").StoreDefinition<"guidoEmailEditor", GuidoEmailEditorState, {
24
+ }, {
34
25
  /** True once the bridge has published at least one snapshot. */
35
26
  hasSnapshot: (state: {
36
27
  html: string;
37
28
  css: string;
38
29
  lastUpdatedAt: number;
39
30
  templateId: string;
40
- } & import("pinia").PiniaCustomStateProperties<GuidoEmailEditorState>) => boolean;
31
+ } & import("pinia").PiniaCustomStateProperties<{
32
+ /** Current Stripo HTML — stripe tables only, no DOCTYPE/wrapper. */
33
+ html: string;
34
+ /** Current Stripo CSS — es-p* utility classes used by the html. */
35
+ css: string;
36
+ /** Wall-clock ms when html/css were last written by the bridge. */
37
+ lastUpdatedAt: number;
38
+ /** Template id from the editor config, for cortex-fe to scope per-template. */
39
+ templateId: string;
40
+ }>) => boolean;
41
41
  }, {}>;