@useinsider/guido 3.18.2-beta.545d1bd → 3.18.2-beta.687c399
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/dist/@types/config/schemas.js +14 -13
- package/dist/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +75 -74
- package/dist/components/organisms/AutoSaveController.vue2.js +10 -8
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
- package/dist/components/organisms/header/EditorActions.vue.js +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +36 -52
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -0
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +32 -23
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
- package/dist/components/organisms/header/RightSlot.vue.js +9 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +54 -36
- package/dist/composables/useAccessibilityApi.js +35 -0
- package/dist/composables/useActionsApi.js +20 -24
- package/dist/composables/useCortexBlueprintBridge.js +54 -115
- package/dist/composables/useCustomInterfaceAppearance.js +29 -28
- package/dist/composables/useEmailTemplateApplier.js +50 -93
- package/dist/config/i18n/en/labels.json.js +36 -4
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/guido.css +1 -1
- package/dist/sprite.svg +6 -0
- package/dist/src/@types/config/schemas.d.ts +2 -0
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +3 -1
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +3 -4
- package/dist/src/composables/useEmailTemplateApplier.d.ts +2 -22
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/src/stores/editor.d.ts +107 -0
- package/dist/src/stores/guido-email-editor.d.ts +7 -29
- package/dist/src/stores/onboarding.d.ts +717 -2
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +5 -0
- package/dist/static/styles/components/accessibility.css.js +234 -0
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/stores/editor.js +7 -4
- package/dist/stores/guido-email-editor.js +1 -5
- package/dist/stores/onboarding.js +68 -46
- package/dist/utils/timeUtil.js +6 -17
- package/package.json +1 -1
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
- /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
|
@@ -1,46 +1,64 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
1
|
+
import { defineComponent as h, computed as r, onMounted as S, watch as e, ref as w } from "vue";
|
|
2
|
+
import T from "./AMPOnboarding.vue.js";
|
|
3
|
+
import y from "./EditorTabBarOnboarding.vue.js";
|
|
4
|
+
import P from "./GenericOnboarding.vue.js";
|
|
5
|
+
import B from "./ItemsOnboarding.vue.js";
|
|
6
|
+
import A from "./NewVersionPopup.vue.js";
|
|
7
|
+
import M from "./TextBlockOnboarding.vue.js";
|
|
8
|
+
import _ from "./VersionHistoryOnboarding.vue.js";
|
|
9
|
+
import { useConfig as H } from "../../../composables/useConfig.js";
|
|
10
|
+
import { usePartner as F } from "../../../composables/usePartner.js";
|
|
11
|
+
import { useEditorStore as V } from "../../../stores/editor.js";
|
|
12
|
+
import { useOnboardingStore as C } from "../../../stores/onboarding.js";
|
|
13
|
+
import { usePreviewStore as x } from "../../../stores/preview.js";
|
|
14
|
+
const L = /* @__PURE__ */ h({
|
|
13
15
|
__name: "OnboardingWrapper",
|
|
14
16
|
emits: ["onboarding-finished"],
|
|
15
|
-
setup(
|
|
16
|
-
const o =
|
|
17
|
-
{ type: "newVersionPopup", component:
|
|
18
|
-
{ type: "genericOnboarding", component:
|
|
19
|
-
{ type: "textBlockOnboarding", component:
|
|
20
|
-
{ type: "versionHistoryOnboarding", component:
|
|
21
|
-
{ type: "ampOnboarding", component:
|
|
22
|
-
{ type: "itemsOnboarding", component:
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
setup(E, { emit: b }) {
|
|
18
|
+
const o = C(), n = V(), c = x(), { isTestPartner: m } = F(), { isFeatureEnabled: g } = H(), s = r(() => n.isStripoInitialized), a = r(() => m()), f = [
|
|
19
|
+
{ type: "newVersionPopup", component: A },
|
|
20
|
+
{ type: "genericOnboarding", component: P },
|
|
21
|
+
{ type: "textBlockOnboarding", component: M },
|
|
22
|
+
{ type: "versionHistoryOnboarding", component: _ },
|
|
23
|
+
{ type: "ampOnboarding", component: T },
|
|
24
|
+
{ type: "itemsOnboarding", component: B },
|
|
25
|
+
{ type: "editorTabBarOnboarding", component: y }
|
|
26
|
+
], O = (i) => a.value || !s.value ? !1 : i === "newVersionPopup" ? o.shouldShowOnboarding(i) : o.isActive(i), l = r(() => f.filter((i) => O(i.type)));
|
|
27
|
+
S(async () => {
|
|
25
28
|
await o.fetchUserModalState();
|
|
26
|
-
}),
|
|
27
|
-
() =>
|
|
28
|
-
(
|
|
29
|
-
|
|
29
|
+
}), e(
|
|
30
|
+
() => n.isVersionHistoryOpen,
|
|
31
|
+
(i, t) => {
|
|
32
|
+
i && !t && (o.isActive("editorTabBarOnboarding") && o.closeForSession("editorTabBarOnboarding"), o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding")), !i && t && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
|
|
30
33
|
}
|
|
31
|
-
),
|
|
32
|
-
() =>
|
|
33
|
-
(
|
|
34
|
-
|
|
34
|
+
), e(
|
|
35
|
+
() => c.emailFormat,
|
|
36
|
+
(i, t) => {
|
|
37
|
+
t !== "AMP" && i === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
|
|
35
38
|
}
|
|
36
|
-
),
|
|
37
|
-
() =>
|
|
38
|
-
(
|
|
39
|
-
!
|
|
39
|
+
), e(
|
|
40
|
+
() => n.isPreviewModeOpen,
|
|
41
|
+
(i) => {
|
|
42
|
+
!i && o.isActive("ampOnboarding") && o.close("ampOnboarding");
|
|
40
43
|
}
|
|
41
|
-
)
|
|
44
|
+
);
|
|
45
|
+
const d = w(!1), v = (i) => {
|
|
46
|
+
i === "newVersionPopup" && (d.value = !0), b("onboarding-finished");
|
|
47
|
+
}, p = r(() => n.isNormalMode && !n.isPreviewModeOpen), u = r(() => s.value && o.isFetched && g("accessibilityTesting") && !a.value && p.value && !(o.shouldShowOnboarding("newVersionPopup") && !d.value) && !o.isOnboardingActive() && !o.closedThisSession.includes("editorTabBarOnboarding") && o.shouldShowOnboarding("editorTabBarOnboarding"));
|
|
48
|
+
return e(
|
|
49
|
+
u,
|
|
50
|
+
(i) => {
|
|
51
|
+
i && o.start("editorTabBarOnboarding");
|
|
52
|
+
},
|
|
53
|
+
{ immediate: !0 }
|
|
54
|
+
), e(
|
|
55
|
+
p,
|
|
56
|
+
(i) => {
|
|
57
|
+
!i && o.isActive("editorTabBarOnboarding") && o.closeForSession("editorTabBarOnboarding");
|
|
58
|
+
}
|
|
59
|
+
), { __sfc: !0, emit: b, onboardingStore: o, editorStore: n, previewStore: c, isTestPartner: m, isFeatureEnabled: g, isStripoReady: s, isTestPartnerActive: a, onboardingConfigs: f, shouldShow: O, visibleOnboardings: l, isNewVersionPopupClosed: d, handleFinished: v, isTourAnchored: p, canStartTabBarTour: u };
|
|
42
60
|
}
|
|
43
61
|
});
|
|
44
62
|
export {
|
|
45
|
-
|
|
63
|
+
L as default
|
|
46
64
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useEditorStore as r } from "../stores/editor.js";
|
|
2
|
+
const A = () => {
|
|
3
|
+
const e = r(), i = () => window.StripoEditorApi.accessibilityApi, s = () => {
|
|
4
|
+
i().openAccessibilityTestingMode(), e.isAccessibilityTestingOpen = !0;
|
|
5
|
+
}, o = () => {
|
|
6
|
+
try {
|
|
7
|
+
i().closeAccessibilityTestingMode();
|
|
8
|
+
} finally {
|
|
9
|
+
e.isAccessibilityTestingOpen = !1, e.imagesHidden = !1, e.colorVisionDeficiency = "";
|
|
10
|
+
}
|
|
11
|
+
}, l = () => e.isAccessibilityTestingOpen ? o() : s(), g = () => i().isAccessibilityTestingModeOpen(), t = () => {
|
|
12
|
+
i().showImages(), e.imagesHidden = !1;
|
|
13
|
+
}, c = () => {
|
|
14
|
+
i().hideImages(), e.imagesHidden = !0;
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
openAccessibilityTestingMode: s,
|
|
18
|
+
closeAccessibilityTestingMode: o,
|
|
19
|
+
toggleAccessibilityTestingMode: l,
|
|
20
|
+
isAccessibilityTestingModeOpen: g,
|
|
21
|
+
showImages: t,
|
|
22
|
+
hideImages: c,
|
|
23
|
+
toggleImages: () => e.imagesHidden ? t() : c(),
|
|
24
|
+
setColorVisionDeficiency: (n) => {
|
|
25
|
+
i().setColorVisionDeficiency(n), e.colorVisionDeficiency = n;
|
|
26
|
+
},
|
|
27
|
+
getColorVisionDeficiency: () => i().getColorVisionDeficiency(),
|
|
28
|
+
switchToDesktopPreview: () => i().switchToDesktopPreview(),
|
|
29
|
+
switchToMobilePreview: () => i().switchToMobilePreview(),
|
|
30
|
+
toggleCodeEditor: () => i().emitToggleCodeEditor()
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
A as useAccessibilityApi
|
|
35
|
+
};
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import { filterAmpErrors as v } from "../utils/ampErrorFilter.js";
|
|
2
2
|
import { useToaster as y } from "./useToaster.js";
|
|
3
|
-
const D = 1e4,
|
|
4
|
-
const
|
|
5
|
-
() =>
|
|
3
|
+
const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
|
|
4
|
+
const w = setTimeout(
|
|
5
|
+
() => m(new Error(`${n} did not report completion within ${l}ms`)),
|
|
6
6
|
l
|
|
7
|
-
),
|
|
8
|
-
clearTimeout(
|
|
7
|
+
), p = (A) => (t) => {
|
|
8
|
+
clearTimeout(w), A(t);
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
w(d(A), d(s));
|
|
12
|
-
} catch (r) {
|
|
13
|
-
clearTimeout(c), s(r instanceof Error ? r : new Error(String(r)));
|
|
14
|
-
}
|
|
10
|
+
u(p(T), p(m));
|
|
15
11
|
}), I = () => {
|
|
16
|
-
const { handleError: n } = y(), l = (t = {}) =>
|
|
12
|
+
const { handleError: n } = y(), l = (t = {}) => s(
|
|
17
13
|
"compileEmail",
|
|
18
|
-
|
|
14
|
+
d,
|
|
19
15
|
(e, a) => {
|
|
20
16
|
const o = { ...{
|
|
21
17
|
minimize: !0,
|
|
@@ -36,9 +32,9 @@ const D = 1e4, T = 3e4, p = (n, l, w) => new Promise((A, s) => {
|
|
|
36
32
|
forceAmp: !1,
|
|
37
33
|
resetDataSavedFlag: !1,
|
|
38
34
|
disableLineHeightsReplace: !0
|
|
39
|
-
}, ...t },
|
|
40
|
-
callback: (
|
|
41
|
-
|
|
35
|
+
}, ...t }, c = {
|
|
36
|
+
callback: (r, C, f, S, g) => {
|
|
37
|
+
r ? a(r) : e({
|
|
42
38
|
html: C,
|
|
43
39
|
ampHtml: f,
|
|
44
40
|
ampErrors: v(S ?? []),
|
|
@@ -47,22 +43,22 @@ const D = 1e4, T = 3e4, p = (n, l, w) => new Promise((A, s) => {
|
|
|
47
43
|
},
|
|
48
44
|
...o
|
|
49
45
|
};
|
|
50
|
-
window.StripoEditorApi.actionsApi.compileEmail(
|
|
46
|
+
window.StripoEditorApi.actionsApi.compileEmail(c);
|
|
51
47
|
}
|
|
52
48
|
);
|
|
53
49
|
return {
|
|
54
50
|
getCompiledEmail: l,
|
|
55
|
-
getTemplateData: () =>
|
|
51
|
+
getTemplateData: () => s(
|
|
56
52
|
"getTemplateData",
|
|
57
|
-
|
|
53
|
+
d,
|
|
58
54
|
(t) => {
|
|
59
|
-
const e = ({ html: a, css: i, width: o, height: E, utmParams:
|
|
55
|
+
const e = ({ html: a, css: i, width: o, height: E, utmParams: c, syncModulesIds: r }) => t({
|
|
60
56
|
html: a,
|
|
61
57
|
css: i,
|
|
62
58
|
width: o,
|
|
63
59
|
height: E,
|
|
64
|
-
utmParams:
|
|
65
|
-
syncModulesIds:
|
|
60
|
+
utmParams: c,
|
|
61
|
+
syncModulesIds: r
|
|
66
62
|
});
|
|
67
63
|
window.StripoEditorApi.actionsApi.getTemplateData(e);
|
|
68
64
|
}
|
|
@@ -109,13 +105,13 @@ const D = 1e4, T = 3e4, p = (n, l, w) => new Promise((A, s) => {
|
|
|
109
105
|
}),
|
|
110
106
|
updateHtmlAndCss: (t, e) => {
|
|
111
107
|
const { actionsApi: a } = window.StripoEditorApi;
|
|
112
|
-
return
|
|
108
|
+
return s("updateHtmlAndCss", D, (i) => {
|
|
113
109
|
a.updateHtmlAndCss(t, e, () => i());
|
|
114
110
|
});
|
|
115
111
|
},
|
|
116
|
-
editorSave: () =>
|
|
112
|
+
editorSave: () => s(
|
|
117
113
|
"save",
|
|
118
|
-
|
|
114
|
+
d,
|
|
119
115
|
(t) => {
|
|
120
116
|
window.StripoEditorApi.actionsApi.save((e) => {
|
|
121
117
|
if (e) {
|
|
@@ -1,131 +1,70 @@
|
|
|
1
|
-
import { useEmailTemplateApplier as
|
|
2
|
-
import { useToaster as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { ToasterTypeOptions as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const W = "email_template", tt = "chat", et = "guido:debug:ai", rt = 2, nt = 500, ot = (A, p) => `${A}:${p ?? 1}`;
|
|
9
|
-
let v = null;
|
|
10
|
-
const it = () => {
|
|
1
|
+
import { useEmailTemplateApplier as w, resetEmailTemplateApplier as _ } from "./useEmailTemplateApplier.js";
|
|
2
|
+
import { useToaster as I } from "./useToaster.js";
|
|
3
|
+
import { useTranslations as P } from "./useTranslations.js";
|
|
4
|
+
import { ToasterTypeOptions as S } from "../enums/toaster.js";
|
|
5
|
+
import { getActivePinia as v } from "pinia";
|
|
6
|
+
import { watch as B, onUnmounted as D } from "vue";
|
|
7
|
+
const x = "email_template", L = "chat", M = "guido:debug:ai", R = () => {
|
|
11
8
|
if (typeof window > "u")
|
|
12
9
|
return !1;
|
|
13
10
|
try {
|
|
14
|
-
return window.localStorage.getItem(
|
|
11
|
+
return window.localStorage.getItem(M) === "1";
|
|
15
12
|
} catch {
|
|
16
13
|
return !1;
|
|
17
14
|
}
|
|
18
|
-
},
|
|
19
|
-
const
|
|
20
|
-
if (!
|
|
15
|
+
}, H = () => {
|
|
16
|
+
const c = v();
|
|
17
|
+
if (!c)
|
|
21
18
|
return;
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
if (
|
|
32
|
-
return;
|
|
33
|
-
const n = p.applyAcks[t], l = Math.max(Date.now(), ((n == null ? void 0 : n.ackAt) ?? 0) + 1), c = { status: e, requestedAt: o, ackAt: l };
|
|
34
|
-
r !== void 0 && (c.error = K(r)), p.$patch((a) => {
|
|
35
|
-
a.applyAcks = { ...a.applyAcks, [t]: c };
|
|
36
|
-
});
|
|
37
|
-
}, B = (t) => (d.get(t) ?? 0) > 0, w = async (t, e, o, r) => {
|
|
38
|
-
var a, i, q;
|
|
39
|
-
const n = ((a = o.blueprintData) == null ? void 0 : a.html) ?? "", l = ((i = o.blueprintData) == null ? void 0 : i.css) ?? "", c = o.applyRequestedAt ?? 0;
|
|
40
|
-
d.set(t, (d.get(t) ?? 0) + 1);
|
|
41
|
-
try {
|
|
42
|
-
const s = r === "debounced" ? await I(e, { html: n, css: l }) : await F(e, { html: n, css: l });
|
|
43
|
-
if (s.status === "superseded")
|
|
44
|
-
return;
|
|
45
|
-
if (s.status === "applied") {
|
|
46
|
-
h.set(e, n), u.delete(t), D(t, "applied", c);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const m = u.get(t);
|
|
50
|
-
u.set(t, { html: n, count: (m == null ? void 0 : m.html) === n ? m.count + 1 : 1 }), D(t, "failed", c, s.error);
|
|
51
|
-
} finally {
|
|
52
|
-
d.set(t, (d.get(t) ?? 1) - 1);
|
|
53
|
-
const s = E.get(t);
|
|
54
|
-
s && !B(t) && (E.delete(t), (((q = s.blueprintData) == null ? void 0 : q.html) ?? "") !== n && w(t, e, s, r));
|
|
55
|
-
}
|
|
56
|
-
}, U = (t) => {
|
|
57
|
-
var a;
|
|
58
|
-
if (t.blueprintType !== W)
|
|
59
|
-
return;
|
|
60
|
-
const { blueprintId: e } = t, o = (a = t.blueprintData) == null ? void 0 : a.html;
|
|
61
|
-
if (!e || !o)
|
|
19
|
+
const l = c._s, p = l == null ? void 0 : l.get(L);
|
|
20
|
+
if (!p)
|
|
21
|
+
return;
|
|
22
|
+
const { markPending: d, applyTemplate: f, applyTemplateDebounced: T } = w(), { showToaster: E } = I(), h = P(), y = (r, t) => {
|
|
23
|
+
const e = h(r);
|
|
24
|
+
return e === r ? t : e;
|
|
25
|
+
}, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), u = R(), A = (r, t) => {
|
|
26
|
+
u && console.debug(`[guido:cortex] msg=${r ?? "?"} type=${(t == null ? void 0 : t.type) ?? "?"}`, t);
|
|
27
|
+
}, b = (r) => {
|
|
28
|
+
if (r.blueprintType !== x)
|
|
62
29
|
return;
|
|
63
|
-
|
|
64
|
-
|
|
30
|
+
const t = r.blueprintId, e = r.blueprintData;
|
|
31
|
+
if (!t || !(e != null && e.html))
|
|
65
32
|
return;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (l === void 0 || n > l) {
|
|
69
|
-
const i = l === void 0;
|
|
70
|
-
if (S.set(r, n), u.delete(r), i && G().has(r)) {
|
|
71
|
-
h.set(e, o);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
w(r, e, t, "immediate");
|
|
33
|
+
if (!r.applyRequested) {
|
|
34
|
+
d(t);
|
|
75
35
|
return;
|
|
76
36
|
}
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
Array.isArray(r) && r.forEach((n) => {
|
|
101
|
-
if (n)
|
|
102
|
-
switch (O(o, n), n.type) {
|
|
103
|
-
case "blueprint":
|
|
104
|
-
U(n);
|
|
105
|
-
break;
|
|
106
|
-
case "error":
|
|
107
|
-
g(o);
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
37
|
+
const o = i.get(t);
|
|
38
|
+
o === void 0 ? (i.set(t, e.html), f(t, e)) : o !== e.html && (i.set(t, e.html), T(t, e));
|
|
39
|
+
}, s = (r) => r === void 0 || a.has(r) ? !1 : (a.add(r), E({
|
|
40
|
+
type: S.Error,
|
|
41
|
+
message: y("newsletter.ai-template-failed", "AI couldn't generate the template. Please try again.")
|
|
42
|
+
}), !0), m = B(
|
|
43
|
+
() => p.messages,
|
|
44
|
+
(r) => {
|
|
45
|
+
Array.isArray(r) && r.forEach((t) => {
|
|
46
|
+
const e = t == null ? void 0 : t.id;
|
|
47
|
+
(t == null ? void 0 : t.isError) === !0 && s(e) && u && console.debug(`[guido:cortex] message-level error id=${e}`, t);
|
|
48
|
+
const o = t == null ? void 0 : t.segments;
|
|
49
|
+
Array.isArray(o) && o.forEach((n) => {
|
|
50
|
+
if (n)
|
|
51
|
+
switch (A(e, n), n.type) {
|
|
52
|
+
case "blueprint":
|
|
53
|
+
b(n);
|
|
54
|
+
break;
|
|
55
|
+
case "error":
|
|
56
|
+
s(e);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
110
60
|
});
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return (t = A._s) == null ? void 0 : t.get(tt);
|
|
117
|
-
}, L = (t) => {
|
|
118
|
-
f = t, b = Z(() => t.messages, Y, { deep: !0, immediate: !0 });
|
|
119
|
-
}, R = $();
|
|
120
|
-
R ? L(R) : T = setInterval(() => {
|
|
121
|
-
const t = $();
|
|
122
|
-
t && (P(), L(t));
|
|
123
|
-
}, nt), V(() => {
|
|
124
|
-
P(), b == null || b(), f = void 0, h.clear(), S.clear(), u.clear(), d.clear(), E.clear(), _.clear(), v === y && (v = null, p.$patch((t) => {
|
|
125
|
-
t.bridgeActive = !1, t.applyAcks = {};
|
|
126
|
-
}), N());
|
|
61
|
+
},
|
|
62
|
+
{ deep: !0, immediate: !0 }
|
|
63
|
+
);
|
|
64
|
+
D(() => {
|
|
65
|
+
m(), i.clear(), a.clear(), _();
|
|
127
66
|
});
|
|
128
67
|
};
|
|
129
68
|
export {
|
|
130
|
-
|
|
69
|
+
H as useCortexBlueprintBridge
|
|
131
70
|
};
|
|
@@ -2,60 +2,61 @@ import S from "../static/assets/icons/line-change.svg.js";
|
|
|
2
2
|
import i from "../static/assets/icons/line-delete.svg.js";
|
|
3
3
|
import n from "../static/assets/icons/line-plus.svg.js";
|
|
4
4
|
import p from "../static/styles/base.css.js";
|
|
5
|
-
import s from "../static/styles/components/
|
|
6
|
-
import C from "../static/styles/components/
|
|
7
|
-
import
|
|
8
|
-
import f from "../static/styles/components/
|
|
9
|
-
import
|
|
10
|
-
import u from "../static/styles/components/
|
|
11
|
-
import l from "../static/styles/components/
|
|
12
|
-
import d from "../static/styles/components/
|
|
13
|
-
import h from "../static/styles/components/
|
|
14
|
-
import g from "../static/styles/components/
|
|
5
|
+
import s from "../static/styles/components/accessibility.css.js";
|
|
6
|
+
import C from "../static/styles/components/alert-message.css.js";
|
|
7
|
+
import c from "../static/styles/components/amp-block.css.js";
|
|
8
|
+
import f from "../static/styles/components/base-input.css.js";
|
|
9
|
+
import a from "../static/styles/components/button-group.css.js";
|
|
10
|
+
import u from "../static/styles/components/button.css.js";
|
|
11
|
+
import l from "../static/styles/components/combobox.css.js";
|
|
12
|
+
import d from "../static/styles/components/counter.css.js";
|
|
13
|
+
import h from "../static/styles/components/dropdown-menu.css.js";
|
|
14
|
+
import g from "../static/styles/components/loader.css.js";
|
|
15
|
+
import y from "../static/styles/components/narrow-panel.css.js";
|
|
15
16
|
import I from "../static/styles/components/popup.css.js";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
17
|
+
import b from "../static/styles/components/recommendation-strategy.css.js";
|
|
18
|
+
import w from "../static/styles/components/switcher.css.js";
|
|
19
|
+
import B from "../static/styles/components/tabs.css.js";
|
|
20
|
+
import $ from "../static/styles/components/tools.css.js";
|
|
21
|
+
import A from "../static/styles/components/version-history.css.js";
|
|
21
22
|
import P from "../static/styles/components/wide-panel.css.js";
|
|
22
23
|
import x from "../static/styles/variables.css.js";
|
|
23
24
|
function r(t, o) {
|
|
24
25
|
return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
+
const R = `:host {
|
|
27
28
|
${r("line-change", S)}
|
|
28
29
|
${r("line-delete", i)}
|
|
29
30
|
${r("line-plus", n)}
|
|
30
|
-
}`,
|
|
31
|
+
}`, V = [
|
|
31
32
|
x,
|
|
32
33
|
// Must be on top
|
|
33
|
-
|
|
34
|
+
R,
|
|
34
35
|
p,
|
|
35
36
|
// Must be on top
|
|
36
|
-
s,
|
|
37
37
|
C,
|
|
38
|
-
a,
|
|
39
|
-
f,
|
|
40
38
|
c,
|
|
39
|
+
f,
|
|
40
|
+
a,
|
|
41
41
|
u,
|
|
42
42
|
l,
|
|
43
43
|
d,
|
|
44
44
|
h,
|
|
45
45
|
g,
|
|
46
|
-
I,
|
|
47
46
|
y,
|
|
48
|
-
|
|
47
|
+
I,
|
|
48
|
+
w,
|
|
49
49
|
B,
|
|
50
50
|
$,
|
|
51
|
+
A,
|
|
51
52
|
P,
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
b,
|
|
54
|
+
s
|
|
54
55
|
].join(`
|
|
55
56
|
|
|
56
|
-
`),
|
|
57
|
+
`), _ = () => ({ importCss: () => {
|
|
57
58
|
const o = new CSSStyleSheet();
|
|
58
|
-
o.replaceSync(
|
|
59
|
+
o.replaceSync(V);
|
|
59
60
|
const e = document.querySelector("ui-editor");
|
|
60
61
|
if (!e)
|
|
61
62
|
return;
|
|
@@ -63,5 +64,5 @@ const A = `:host {
|
|
|
63
64
|
m && (m.adoptedStyleSheets = [o]);
|
|
64
65
|
} });
|
|
65
66
|
export {
|
|
66
|
-
|
|
67
|
+
_ as useCustomInterfaceAppearance
|
|
67
68
|
};
|