@useinsider/guido 3.3.0-beta.c1e1d7e → 3.3.0-beta.c66df61

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 (41) hide show
  1. package/dist/components/Guido.vue.js +1 -1
  2. package/dist/components/Guido.vue2.js +42 -40
  3. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +9 -11
  4. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +70 -35
  5. package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
  6. package/dist/composables/useCortexBlueprintBridge.js +66 -0
  7. package/dist/composables/useCustomInterfaceAppearance.js +18 -16
  8. package/dist/composables/useEmailTemplateApplier.js +41 -0
  9. package/dist/composables/useGuidoStateBridge.js +48 -0
  10. package/dist/composables/useHtmlValidator.js +41 -36
  11. package/dist/composables/useRecommendation.js +2 -2
  12. package/dist/composables/useStripo.js +41 -43
  13. package/dist/config/migrator/radioButtonMigrator.js +30 -29
  14. package/dist/enums/extensions/recommendationBlock.js +101 -46
  15. package/dist/enums/unsubscribe.js +25 -24
  16. package/dist/extensions/Blocks/Checkbox/control.js +23 -23
  17. package/dist/extensions/Blocks/RadioButton/control.js +15 -15
  18. package/dist/extensions/Blocks/RadioButton/template.js +6 -6
  19. package/dist/extensions/Blocks/Recommendation/block.js +43 -36
  20. package/dist/extensions/Blocks/Recommendation/services/configService.js +33 -26
  21. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +35 -26
  22. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +25 -12
  23. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +33 -0
  24. package/dist/guido.css +1 -1
  25. package/dist/services/unsubscribeApi.js +6 -6
  26. package/dist/src/composables/useCortexBlueprintBridge.d.ts +25 -0
  27. package/dist/src/composables/useEmailTemplateApplier.d.ts +21 -0
  28. package/dist/src/composables/useGuidoStateBridge.d.ts +22 -0
  29. package/dist/src/enums/extensions/recommendationBlock.d.ts +6 -1
  30. package/dist/src/enums/unsubscribe.d.ts +8 -3
  31. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  32. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +11 -3
  33. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +7 -1
  34. package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +2 -0
  35. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +21 -0
  36. package/dist/src/stores/guido-email-editor.d.ts +41 -0
  37. package/dist/static/styles/components/notification.css.js +74 -0
  38. package/dist/stores/guido-email-editor.js +20 -0
  39. package/package.json +1 -1
  40. package/dist/composables/useStripoNotifications.js +0 -30
  41. package/dist/src/composables/useStripoNotifications.d.ts +0 -4
@@ -0,0 +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", {
16
+ /** Current Stripo HTML — stripe tables only, no DOCTYPE/wrapper. */
17
+ html: string;
18
+ /** Current Stripo CSS — es-p* utility classes used by the html. */
19
+ css: string;
20
+ /** Wall-clock ms when html/css were last written by the bridge. */
21
+ lastUpdatedAt: number;
22
+ /** Template id from the editor config, for cortex-fe to scope per-template. */
23
+ templateId: string;
24
+ }, {
25
+ /** True once the bridge has published at least one snapshot. */
26
+ hasSnapshot: (state: {
27
+ html: string;
28
+ css: string;
29
+ lastUpdatedAt: number;
30
+ 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;
41
+ }, {}>;
@@ -0,0 +1,74 @@
1
+ const n = `ue-notifications-container {
2
+ left: 96px;
3
+ margin: 0;
4
+ bottom: 32px;
5
+ top: unset;
6
+ width: unset;
7
+ position: fixed;
8
+ }
9
+
10
+ ue-notifications-container ue-message + ue-message {
11
+ margin-bottom: 24px;
12
+ }
13
+
14
+ ue-notifications-container .alert-message-wrapper {
15
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
16
+ border: none;
17
+ padding: 16px 24px;
18
+ }
19
+
20
+ ue-notifications-container .alert-message-wrapper.info,
21
+ ue-notifications-container .alert-message-wrapper.loader {
22
+ background-color: var(--guido-color-background-toaster-info) !important;
23
+ color: inherit;
24
+ }
25
+
26
+ .alert-message-wrapper .alert-message-main {
27
+ align-items: center;
28
+ }
29
+
30
+ ue-notifications-container ue-caption .caption {
31
+ color: var(--guido-color-white) !important;
32
+ }
33
+
34
+ ue-block-thumb-hint {
35
+ text-align: left;
36
+ }
37
+
38
+ ue-notifications-container .alert-message-wrapper .alert-message-main .alert-message-content {
39
+ width: calc(100% - 64px);
40
+ }
41
+
42
+ ue-notifications-container .alert-message-wrapper .alert-message-main .alert-message-text {
43
+ font-size: 15px;
44
+ font-weight: 600;
45
+ }
46
+
47
+ ue-notifications-container .alert-message-text,
48
+ ue-notifications-container .alert-message-wrapper ue-icon-component.icon,
49
+ ue-notifications-container .alert-message-wrapper ue-icon-component.icon-button {
50
+ color: var(--guido-color-white);
51
+ }
52
+
53
+ ue-notifications-container ue-message ue-button.close {
54
+ margin: 0 0 0 16px;
55
+ }
56
+
57
+ ue-notifications-container .alert-message-wrapper.success {
58
+ background: var(--guido-color-background-toaster-success);
59
+ color: inherit;
60
+ }
61
+
62
+ ue-notifications-container .alert-message-wrapper.error {
63
+ background: var(--guido-color-background-toaster-error);
64
+ color: inherit;
65
+ }
66
+
67
+ ue-notifications-container .alert-message-wrapper.warn {
68
+ background: var(--guido-color-background-toaster-warn);
69
+ color: inherit;
70
+ }
71
+ `;
72
+ export {
73
+ n as default
74
+ };
@@ -0,0 +1,20 @@
1
+ import { defineStore as e } from "pinia";
2
+ const d = e("guidoEmailEditor", {
3
+ state: () => ({
4
+ /** Current Stripo HTML — stripe tables only, no DOCTYPE/wrapper. */
5
+ html: "",
6
+ /** Current Stripo CSS — es-p* utility classes used by the html. */
7
+ css: "",
8
+ /** Wall-clock ms when html/css were last written by the bridge. */
9
+ lastUpdatedAt: 0,
10
+ /** Template id from the editor config, for cortex-fe to scope per-template. */
11
+ templateId: ""
12
+ }),
13
+ getters: {
14
+ /** True once the bridge has published at least one snapshot. */
15
+ hasSnapshot: (t) => t.lastUpdatedAt > 0 && t.html !== ""
16
+ }
17
+ });
18
+ export {
19
+ d as useGuidoEmailEditorStore
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.3.0-beta.c1e1d7e",
3
+ "version": "3.3.0-beta.c66df61",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -1,30 +0,0 @@
1
- import { useToaster as a } from "./useToaster.js";
2
- import { ToasterTypeOptions as r } from "../enums/toaster.js";
3
- const h = () => {
4
- const { showToaster: l, hideToaster: u } = a();
5
- let e = null, s = null;
6
- const c = (t, o, i, n) => {
7
- if (e === i && s === o)
8
- return;
9
- e = i, s = o;
10
- const f = n != null && n.action ? { text: n.action.label, onClick: n.action.func } : void 0;
11
- l({ type: t, message: o, actionButton: f });
12
- };
13
- return { getStripoNotifications: () => ({
14
- info: (t, o, i) => c(r.Success, t, o, i),
15
- success: (t, o, i) => c(r.Success, t, o, i),
16
- warn: (t, o, i) => c(r.Warning, t, o, i),
17
- error: (t, o, i) => c(r.Alert, t, o, i),
18
- // Stripo emits `loader` for in-progress operations expected to persist until
19
- // explicit hide(id). Available toaster types auto-dismiss at 6s, so showing
20
- // anything here would lie about completion. Skip until a persistent type exists.
21
- loader: () => {
22
- },
23
- hide: (t) => {
24
- e === t && (u(), e = null, s = null);
25
- }
26
- }) };
27
- };
28
- export {
29
- h as useStripoNotifications
30
- };
@@ -1,4 +0,0 @@
1
- import type { StripoNotifications } from '@@/Types/stripo';
2
- export declare const useStripoNotifications: () => {
3
- getStripoNotifications: () => StripoNotifications;
4
- };