@useinsider/guido 3.18.3-beta.ec88281 → 3.19.0-beta.f02eaa1
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.
- package/README.md +41 -3
- package/dist/@types/config/schemas.js +59 -51
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +55 -53
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +53 -49
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +24 -22
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +28 -24
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +46 -0
- package/dist/composables/useCustomInterfaceAppearance.js +46 -42
- package/dist/composables/useGuidoStateBridge.js +29 -24
- package/dist/composables/useLegacyStrategyConversion.js +61 -0
- package/dist/composables/useStripo.js +7 -7
- package/dist/enums/extensions/recommendationBlock.js +40 -31
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +77 -76
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -28
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +45 -44
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +6 -3
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +110 -46
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +42 -0
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +7 -7
- package/dist/guido.css +1 -1
- package/dist/library.js +15 -13
- package/dist/package.json.js +1 -1
- package/dist/public/editorState.js +4 -0
- package/dist/services/recommendationApi.js +46 -37
- package/dist/src/@types/config/schemas.d.ts +16 -0
- package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useGuidoStateBridge.d.ts +11 -7
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +5 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +70 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +32 -0
- package/dist/src/library.d.ts +2 -0
- package/dist/src/public/editorState.d.ts +14 -0
- package/dist/src/public/trackingIds.d.ts +6 -2
- package/dist/src/services/recommendationApi.d.ts +2 -1
- package/dist/src/stores/config.d.ts +322 -0
- package/dist/src/stores/editor.d.ts +25 -0
- package/dist/src/stores/guido-email-editor.d.ts +27 -27
- package/dist/src/stores/onboarding.d.ts +808 -10
- package/dist/src/utils/liquidDynamicContent.d.ts +20 -0
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
- package/dist/static/assets/icons/line-info.svg.js +5 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +70 -5
- package/dist/stores/config.js +74 -60
- package/dist/stores/editor.js +4 -0
- package/dist/stores/guido-email-editor.js +0 -4
- package/dist/stores/onboarding.js +46 -36
- package/dist/utils/genericUtil.js +64 -61
- package/dist/utils/liquidDynamicContent.js +15 -0
- package/package.json +10 -6
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
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,
|
|
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
|
}, {}>;
|