@useinsider/guido 3.18.3-beta.ec88281 → 3.19.0-beta.2854f4f

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 (60) hide show
  1. package/README.md +20 -0
  2. package/dist/components/Guido.vue.js +3 -3
  3. package/dist/components/Guido.vue2.js +30 -30
  4. package/dist/components/organisms/base/Toaster.vue2.js +13 -12
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +74 -57
  7. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +23 -37
  8. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -18
  9. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
  10. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
  11. package/dist/composables/useCustomInterfaceAppearance.js +56 -46
  12. package/dist/composables/useGuidoStateBridge.js +29 -24
  13. package/dist/composables/useHtmlValidator.js +87 -82
  14. package/dist/composables/useRecommendation.js +40 -35
  15. package/dist/composables/useStripo.js +29 -29
  16. package/dist/composables/useToaster.js +14 -20
  17. package/dist/enums/extensions/recommendationBlock.js +38 -31
  18. package/dist/extensions/Blocks/Recommendation/block.js +61 -42
  19. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
  20. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +4 -4
  21. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +40 -35
  22. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +84 -52
  23. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
  24. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +6 -3
  25. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +260 -140
  26. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
  27. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
  28. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
  29. package/dist/guido.css +1 -1
  30. package/dist/library.js +15 -13
  31. package/dist/package.json.js +1 -1
  32. package/dist/public/editorState.js +4 -0
  33. package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
  34. package/dist/src/composables/useGuidoStateBridge.d.ts +11 -7
  35. package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
  36. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
  37. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
  38. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  39. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
  40. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +9 -0
  41. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
  42. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +86 -0
  43. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
  44. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
  45. package/dist/src/library.d.ts +2 -0
  46. package/dist/src/public/editorState.d.ts +14 -0
  47. package/dist/src/public/trackingIds.d.ts +6 -2
  48. package/dist/src/stores/editor.d.ts +25 -0
  49. package/dist/src/stores/guido-email-editor.d.ts +27 -27
  50. package/dist/src/stores/onboarding.d.ts +377 -0
  51. package/dist/src/utils/liquidDynamicContent.d.ts +20 -0
  52. package/dist/static/styles/components/recommendation-strategy.css.js +34 -4
  53. package/dist/static/styles/components/skeleton.css.js +23 -0
  54. package/dist/stores/editor.js +4 -0
  55. package/dist/stores/guido-email-editor.js +0 -4
  56. package/dist/stores/onboarding.js +41 -36
  57. package/dist/utils/genericUtil.js +64 -61
  58. package/dist/utils/liquidDynamicContent.js +15 -0
  59. package/dist/utils/templatePreparation.js +55 -55
  60. package/package.json +10 -6
@@ -4,6 +4,10 @@
4
4
  * Importing from here pulls in nothing else, so the editor never enters a
5
5
  * consumer's module graph. Re-export surface only: this is the contract,
6
6
  * `utils/linkTrackingIds` is the implementation and stays free to move.
7
+ *
8
+ * Relative, not the `@@/Utils/` alias: vue-tsc copies the specifier into the emitted
9
+ * .d.ts verbatim, and a consumer's TypeScript cannot resolve our alias table. A relative
10
+ * path resolves against dist/src/, so the published types actually load.
7
11
  */
8
- export { assignTrackingIds, readTrackFloor, readTrackSeq, TRACK_ID_ATTRIBUTE, TRACK_SEQ_ATTRIBUTE, } from '@@/Utils/linkTrackingIds';
9
- export type { TrackingIdResult } from '@@/Utils/linkTrackingIds';
12
+ export { assignTrackingIds, readTrackFloor, readTrackSeq, TRACK_ID_ATTRIBUTE, TRACK_SEQ_ATTRIBUTE, } from '../utils/linkTrackingIds';
13
+ export type { TrackingIdResult } from '../utils/linkTrackingIds';
@@ -6,6 +6,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
6
6
  isPreviewModeOpen: boolean;
7
7
  editorVisualMode: string;
8
8
  hasChanges: boolean;
9
+ changeSeq: number;
9
10
  isStripoInitialized: boolean;
10
11
  templateId: string;
11
12
  syncModulesEnabled: boolean;
@@ -19,6 +20,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
19
20
  isPreviewModeOpen: boolean;
20
21
  editorVisualMode: string;
21
22
  hasChanges: boolean;
23
+ changeSeq: number;
22
24
  isStripoInitialized: boolean;
23
25
  templateId: string;
24
26
  syncModulesEnabled: boolean;
@@ -31,6 +33,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
31
33
  isPreviewModeOpen: boolean;
32
34
  editorVisualMode: string;
33
35
  hasChanges: boolean;
36
+ changeSeq: number;
34
37
  isStripoInitialized: boolean;
35
38
  templateId: string;
36
39
  syncModulesEnabled: boolean;
@@ -44,6 +47,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
44
47
  isPreviewModeOpen: boolean;
45
48
  editorVisualMode: string;
46
49
  hasChanges: boolean;
50
+ changeSeq: number;
47
51
  isStripoInitialized: boolean;
48
52
  templateId: string;
49
53
  syncModulesEnabled: boolean;
@@ -56,6 +60,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
56
60
  isPreviewModeOpen: boolean;
57
61
  editorVisualMode: string;
58
62
  hasChanges: boolean;
63
+ changeSeq: number;
59
64
  isStripoInitialized: boolean;
60
65
  templateId: string;
61
66
  syncModulesEnabled: boolean;
@@ -69,6 +74,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
69
74
  isPreviewModeOpen: boolean;
70
75
  editorVisualMode: string;
71
76
  hasChanges: boolean;
77
+ changeSeq: number;
72
78
  isStripoInitialized: boolean;
73
79
  templateId: string;
74
80
  syncModulesEnabled: boolean;
@@ -81,6 +87,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
81
87
  isPreviewModeOpen: boolean;
82
88
  editorVisualMode: string;
83
89
  hasChanges: boolean;
90
+ changeSeq: number;
84
91
  isStripoInitialized: boolean;
85
92
  templateId: string;
86
93
  syncModulesEnabled: boolean;
@@ -94,6 +101,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
94
101
  isPreviewModeOpen: boolean;
95
102
  editorVisualMode: string;
96
103
  hasChanges: boolean;
104
+ changeSeq: number;
97
105
  isStripoInitialized: boolean;
98
106
  templateId: string;
99
107
  syncModulesEnabled: boolean;
@@ -106,6 +114,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
106
114
  isPreviewModeOpen: boolean;
107
115
  editorVisualMode: string;
108
116
  hasChanges: boolean;
117
+ changeSeq: number;
109
118
  isStripoInitialized: boolean;
110
119
  templateId: string;
111
120
  syncModulesEnabled: boolean;
@@ -119,6 +128,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
119
128
  isPreviewModeOpen: boolean;
120
129
  editorVisualMode: string;
121
130
  hasChanges: boolean;
131
+ changeSeq: number;
122
132
  isStripoInitialized: boolean;
123
133
  templateId: string;
124
134
  syncModulesEnabled: boolean;
@@ -131,6 +141,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
131
141
  isPreviewModeOpen: boolean;
132
142
  editorVisualMode: string;
133
143
  hasChanges: boolean;
144
+ changeSeq: number;
134
145
  isStripoInitialized: boolean;
135
146
  templateId: string;
136
147
  syncModulesEnabled: boolean;
@@ -144,6 +155,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
144
155
  isPreviewModeOpen: boolean;
145
156
  editorVisualMode: string;
146
157
  hasChanges: boolean;
158
+ changeSeq: number;
147
159
  isStripoInitialized: boolean;
148
160
  templateId: string;
149
161
  syncModulesEnabled: boolean;
@@ -156,6 +168,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
156
168
  isPreviewModeOpen: boolean;
157
169
  editorVisualMode: string;
158
170
  hasChanges: boolean;
171
+ changeSeq: number;
159
172
  isStripoInitialized: boolean;
160
173
  templateId: string;
161
174
  syncModulesEnabled: boolean;
@@ -169,6 +182,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
169
182
  isPreviewModeOpen: boolean;
170
183
  editorVisualMode: string;
171
184
  hasChanges: boolean;
185
+ changeSeq: number;
172
186
  isStripoInitialized: boolean;
173
187
  templateId: string;
174
188
  syncModulesEnabled: boolean;
@@ -181,6 +195,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
181
195
  isPreviewModeOpen: boolean;
182
196
  editorVisualMode: string;
183
197
  hasChanges: boolean;
198
+ changeSeq: number;
184
199
  isStripoInitialized: boolean;
185
200
  templateId: string;
186
201
  syncModulesEnabled: boolean;
@@ -194,6 +209,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
194
209
  isPreviewModeOpen: boolean;
195
210
  editorVisualMode: string;
196
211
  hasChanges: boolean;
212
+ changeSeq: number;
197
213
  isStripoInitialized: boolean;
198
214
  templateId: string;
199
215
  syncModulesEnabled: boolean;
@@ -206,6 +222,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
206
222
  isPreviewModeOpen: boolean;
207
223
  editorVisualMode: string;
208
224
  hasChanges: boolean;
225
+ changeSeq: number;
209
226
  isStripoInitialized: boolean;
210
227
  templateId: string;
211
228
  syncModulesEnabled: boolean;
@@ -219,6 +236,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
219
236
  isPreviewModeOpen: boolean;
220
237
  editorVisualMode: string;
221
238
  hasChanges: boolean;
239
+ changeSeq: number;
222
240
  isStripoInitialized: boolean;
223
241
  templateId: string;
224
242
  syncModulesEnabled: boolean;
@@ -231,6 +249,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
231
249
  isPreviewModeOpen: boolean;
232
250
  editorVisualMode: string;
233
251
  hasChanges: boolean;
252
+ changeSeq: number;
234
253
  isStripoInitialized: boolean;
235
254
  templateId: string;
236
255
  syncModulesEnabled: boolean;
@@ -244,6 +263,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
244
263
  isPreviewModeOpen: boolean;
245
264
  editorVisualMode: string;
246
265
  hasChanges: boolean;
266
+ changeSeq: number;
247
267
  isStripoInitialized: boolean;
248
268
  templateId: string;
249
269
  syncModulesEnabled: boolean;
@@ -256,6 +276,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
256
276
  isPreviewModeOpen: boolean;
257
277
  editorVisualMode: string;
258
278
  hasChanges: boolean;
279
+ changeSeq: number;
259
280
  isStripoInitialized: boolean;
260
281
  templateId: string;
261
282
  syncModulesEnabled: boolean;
@@ -269,6 +290,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
269
290
  isPreviewModeOpen: boolean;
270
291
  editorVisualMode: string;
271
292
  hasChanges: boolean;
293
+ changeSeq: number;
272
294
  isStripoInitialized: boolean;
273
295
  templateId: string;
274
296
  syncModulesEnabled: boolean;
@@ -281,6 +303,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
281
303
  isPreviewModeOpen: boolean;
282
304
  editorVisualMode: string;
283
305
  hasChanges: boolean;
306
+ changeSeq: number;
284
307
  isStripoInitialized: boolean;
285
308
  templateId: string;
286
309
  syncModulesEnabled: boolean;
@@ -294,6 +317,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
294
317
  isPreviewModeOpen: boolean;
295
318
  editorVisualMode: string;
296
319
  hasChanges: boolean;
320
+ changeSeq: number;
297
321
  isStripoInitialized: boolean;
298
322
  templateId: string;
299
323
  syncModulesEnabled: boolean;
@@ -306,6 +330,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
306
330
  isPreviewModeOpen: boolean;
307
331
  editorVisualMode: string;
308
332
  hasChanges: boolean;
333
+ changeSeq: number;
309
334
  isStripoInitialized: boolean;
310
335
  templateId: string;
311
336
  syncModulesEnabled: boolean;
@@ -1,41 +1,41 @@
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", {
1
+ /** The published editor snapshot — the shape a consumer reads off the shared store. */
2
+ export interface GuidoEmailEditorState {
16
3
  /** Current Stripo HTML — stripe tables only, no DOCTYPE/wrapper. */
17
4
  html: string;
18
5
  /** Current Stripo CSS — es-p* utility classes used by the html. */
19
6
  css: string;
20
7
  /** Wall-clock ms when html/css were last written by the bridge. */
21
8
  lastUpdatedAt: number;
22
- /** Template id from the editor config, for cortex-fe to scope per-template. */
9
+ /** Template id from the editor config, so a consumer can scope per-template. */
23
10
  templateId: string;
24
- }, {
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, {
25
34
  /** True once the bridge has published at least one snapshot. */
26
35
  hasSnapshot: (state: {
27
36
  html: string;
28
37
  css: string;
29
38
  lastUpdatedAt: number;
30
39
  templateId: string;
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;
40
+ } & import("pinia").PiniaCustomStateProperties<GuidoEmailEditorState>) => boolean;
41
41
  }, {}>;