@useinsider/guido 3.15.0-beta.4e52059 → 3.15.0-beta.62e4f60
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 +92 -108
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +72 -75
- package/dist/composables/useActionsApi.js +22 -30
- package/dist/composables/useCortexBlueprintBridge.js +79 -43
- package/dist/composables/useEmailTemplateApplier.js +83 -45
- package/dist/composables/useTimerClone.js +19 -21
- package/dist/guido.css +1 -1
- package/dist/library.js +7 -11
- package/dist/node_modules/valibot/dist/index.js +216 -230
- package/dist/src/@types/config/schemas.d.ts +0 -20
- package/dist/src/composables/useActionsApi.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +0 -4
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +12 -5
- package/dist/src/composables/useEmailTemplateApplier.d.ts +20 -2
- package/dist/src/library.d.ts +0 -1
- package/dist/src/stores/config.d.ts +0 -36
- package/dist/src/stores/editor.d.ts +0 -25
- package/dist/src/stores/guido-email-editor.d.ts +32 -0
- package/dist/stores/editor.js +1 -4
- package/dist/stores/guido-email-editor.js +9 -1
- package/dist/utils/templatePreparation.js +61 -72
- package/package.json +1 -5
- package/dist/public/trackingIds.js +0 -8
- package/dist/src/public/trackingIds.d.ts +0 -9
- package/dist/src/utils/linkTrackingIds.d.ts +0 -30
- package/dist/utils/linkTrackingIds.js +0 -56
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { filterAmpErrors as
|
|
1
|
+
import { filterAmpErrors as w } from "../utils/ampErrorFilter.js";
|
|
2
2
|
import { useToaster as A } from "./useToaster.js";
|
|
3
|
-
const
|
|
4
|
-
const { handleError:
|
|
3
|
+
const D = () => {
|
|
4
|
+
const { handleError: n } = A(), s = (t = {}) => new Promise((e, a) => {
|
|
5
5
|
const o = { ...{
|
|
6
6
|
minimize: !0,
|
|
7
7
|
utmEntity: {
|
|
@@ -21,29 +21,29 @@ const p = 1e4, D = () => {
|
|
|
21
21
|
forceAmp: !1,
|
|
22
22
|
resetDataSavedFlag: !1,
|
|
23
23
|
disableLineHeightsReplace: !0
|
|
24
|
-
}, ...t },
|
|
25
|
-
callback: (
|
|
26
|
-
|
|
27
|
-
html:
|
|
28
|
-
ampHtml:
|
|
29
|
-
ampErrors:
|
|
30
|
-
displayConditions:
|
|
24
|
+
}, ...t }, l = {
|
|
25
|
+
callback: (r, p, d, c, u) => {
|
|
26
|
+
r ? a(r) : e({
|
|
27
|
+
html: p,
|
|
28
|
+
ampHtml: d,
|
|
29
|
+
ampErrors: w(c ?? []),
|
|
30
|
+
displayConditions: u
|
|
31
31
|
});
|
|
32
32
|
},
|
|
33
33
|
...o
|
|
34
34
|
};
|
|
35
|
-
window.StripoEditorApi.actionsApi.compileEmail(
|
|
35
|
+
window.StripoEditorApi.actionsApi.compileEmail(l);
|
|
36
36
|
});
|
|
37
37
|
return {
|
|
38
|
-
getCompiledEmail:
|
|
38
|
+
getCompiledEmail: s,
|
|
39
39
|
getTemplateData: () => new Promise((t) => {
|
|
40
|
-
const e = ({ html: a, css: i, width: o, height:
|
|
40
|
+
const e = ({ html: a, css: i, width: o, height: m, utmParams: l, syncModulesIds: r }) => t({
|
|
41
41
|
html: a,
|
|
42
42
|
css: i,
|
|
43
43
|
width: o,
|
|
44
|
-
height:
|
|
45
|
-
utmParams:
|
|
46
|
-
syncModulesIds:
|
|
44
|
+
height: m,
|
|
45
|
+
utmParams: l,
|
|
46
|
+
syncModulesIds: r
|
|
47
47
|
});
|
|
48
48
|
window.StripoEditorApi.actionsApi.getTemplateData(e);
|
|
49
49
|
}),
|
|
@@ -57,7 +57,7 @@ const p = 1e4, D = () => {
|
|
|
57
57
|
displayConditions: a,
|
|
58
58
|
ampHtml: i = "",
|
|
59
59
|
ampErrors: o = []
|
|
60
|
-
} = await
|
|
60
|
+
} = await s({ minimize: !1, resetDataSavedFlag: !1, ...t });
|
|
61
61
|
return {
|
|
62
62
|
html: e,
|
|
63
63
|
ampHtml: i,
|
|
@@ -65,7 +65,7 @@ const p = 1e4, D = () => {
|
|
|
65
65
|
displayConditions: a
|
|
66
66
|
};
|
|
67
67
|
} catch (e) {
|
|
68
|
-
return
|
|
68
|
+
return n(e, "Error loading preview"), {
|
|
69
69
|
html: "",
|
|
70
70
|
ampHtml: "",
|
|
71
71
|
ampErrors: [],
|
|
@@ -81,27 +81,19 @@ const p = 1e4, D = () => {
|
|
|
81
81
|
}
|
|
82
82
|
try {
|
|
83
83
|
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((i, o) => {
|
|
84
|
-
i ? (
|
|
84
|
+
i ? (n(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
|
|
85
85
|
});
|
|
86
86
|
} catch (i) {
|
|
87
|
-
|
|
87
|
+
n(i, "Failed to call updateTimerInClonedTemplate"), t(null);
|
|
88
88
|
}
|
|
89
89
|
}),
|
|
90
90
|
updateHtmlAndCss: (t, e) => {
|
|
91
|
-
|
|
92
|
-
return new Promise((i, o) => {
|
|
93
|
-
const s = new Error(
|
|
94
|
-
`updateHtmlAndCss did not report completion within ${p}ms`
|
|
95
|
-
), n = setTimeout(() => o(s), p);
|
|
96
|
-
a.updateHtmlAndCss(t, e, () => {
|
|
97
|
-
clearTimeout(n), i();
|
|
98
|
-
});
|
|
99
|
-
});
|
|
91
|
+
window.StripoEditorApi.actionsApi.updateHtmlAndCss(t, e);
|
|
100
92
|
},
|
|
101
93
|
editorSave: () => new Promise((t) => {
|
|
102
94
|
window.StripoEditorApi.actionsApi.save((e) => {
|
|
103
95
|
if (e) {
|
|
104
|
-
|
|
96
|
+
n(e, "Failed to save template"), t(!1);
|
|
105
97
|
return;
|
|
106
98
|
}
|
|
107
99
|
t(!0);
|
|
@@ -1,59 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useToaster as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { ToasterTypeOptions as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { resetEmailTemplateApplier as R, useEmailTemplateApplier as q } from "./useEmailTemplateApplier.js";
|
|
2
|
+
import { useToaster as x } from "./useToaster.js";
|
|
3
|
+
import { useTranslations as H } from "./useTranslations.js";
|
|
4
|
+
import { ToasterTypeOptions as K } from "../enums/toaster.js";
|
|
5
|
+
import { useGuidoEmailEditorStore as L } from "../stores/guido-email-editor.js";
|
|
6
|
+
import { getActivePinia as g } from "pinia";
|
|
7
|
+
import { onUnmounted as k, watch as G } from "vue";
|
|
8
|
+
const U = "email_template", C = "chat", F = "guido:debug:ai", O = () => {
|
|
8
9
|
if (typeof window > "u")
|
|
9
10
|
return !1;
|
|
10
11
|
try {
|
|
11
|
-
return window.localStorage.getItem(
|
|
12
|
+
return window.localStorage.getItem(F) === "1";
|
|
12
13
|
} catch {
|
|
13
14
|
return !1;
|
|
14
15
|
}
|
|
15
|
-
},
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
16
|
+
}, X = () => {
|
|
17
|
+
const T = g();
|
|
18
|
+
if (!T)
|
|
18
19
|
return;
|
|
19
|
-
const
|
|
20
|
-
|
|
20
|
+
const s = L();
|
|
21
|
+
s.$patch((e) => {
|
|
22
|
+
e.bridgeActive = !0, e.applyAcks = {};
|
|
23
|
+
}), k(() => {
|
|
24
|
+
s.$patch((e) => {
|
|
25
|
+
e.bridgeActive = !1, e.applyAcks = {};
|
|
26
|
+
}), R();
|
|
27
|
+
});
|
|
28
|
+
const u = T._s, d = u == null ? void 0 : u.get(C);
|
|
29
|
+
if (!d)
|
|
21
30
|
return;
|
|
22
|
-
const { markPending:
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
31
|
+
const { markPending: v, applyTemplate: _, applyTemplateDebounced: S } = q(), { showToaster: $ } = x(), M = H(), B = (e, t) => {
|
|
32
|
+
const i = M(e);
|
|
33
|
+
return i === e ? t : i;
|
|
34
|
+
}, l = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Set(), b = O(), D = (e, t) => {
|
|
35
|
+
b && console.debug(`[guido:cortex] msg=${e ?? "?"} type=${(t == null ? void 0 : t.type) ?? "?"}`, t);
|
|
36
|
+
}, A = (e, t, i, r) => {
|
|
37
|
+
s.$patch((n) => {
|
|
38
|
+
const o = n.applyAcks[e], c = Math.max(Date.now(), ((o == null ? void 0 : o.ackAt) ?? 0) + 1);
|
|
39
|
+
n.applyAcks = {
|
|
40
|
+
...n.applyAcks,
|
|
41
|
+
[e]: { status: t, ackAt: c, requestedAt: i, ...r !== void 0 ? { error: r } : {} }
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
}, I = (e) => {
|
|
45
|
+
if (e.blueprintType !== U)
|
|
46
|
+
return;
|
|
47
|
+
const t = e.blueprintId, i = e.blueprintData;
|
|
48
|
+
if (!t || !(i != null && i.html))
|
|
29
49
|
return;
|
|
30
|
-
|
|
31
|
-
|
|
50
|
+
if (!e.applyRequested) {
|
|
51
|
+
v(t);
|
|
32
52
|
return;
|
|
33
|
-
|
|
34
|
-
|
|
53
|
+
}
|
|
54
|
+
const r = `${t}:${e.version ?? 1}`, n = e.applyRequestedAt ?? 0, { html: o } = i, c = l.get(t), y = p.get(r);
|
|
55
|
+
if (y === void 0 && (d.appliedBlueprintKeys ?? []).includes(r)) {
|
|
56
|
+
l.set(t, o), p.set(r, n), a.set(r, o);
|
|
35
57
|
return;
|
|
36
58
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
const h = (m) => {
|
|
60
|
+
if (a.set(r, o), c === o) {
|
|
61
|
+
A(r, "applied", n);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
(m ? _(t, i) : S(t, i)).then((E) => {
|
|
65
|
+
if (E.status !== "superseded") {
|
|
66
|
+
if (E.status === "applied") {
|
|
67
|
+
l.set(t, o), A(r, "applied", n);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
A(r, "failed", n, E.error);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
y === void 0 || n > y ? (p.set(r, n), h(!0)) : c !== o && a.get(r) !== o && h(!1);
|
|
75
|
+
}, w = (e) => e === void 0 || f.has(e) ? !1 : (f.add(e), $({
|
|
76
|
+
type: K.Error,
|
|
77
|
+
message: B("newsletter.ai-template-failed", "AI couldn't generate the template. Please try again.")
|
|
78
|
+
}), !0), P = G(
|
|
79
|
+
() => d.messages,
|
|
80
|
+
(e) => {
|
|
81
|
+
Array.isArray(e) && e.forEach((t) => {
|
|
82
|
+
const i = t == null ? void 0 : t.id;
|
|
83
|
+
(t == null ? void 0 : t.isError) === !0 && w(i) && b && console.debug(`[guido:cortex] message-level error id=${i}`, t);
|
|
84
|
+
const r = t == null ? void 0 : t.segments;
|
|
85
|
+
Array.isArray(r) && r.forEach((n) => {
|
|
50
86
|
if (n)
|
|
51
|
-
switch (
|
|
87
|
+
switch (D(i, n), n.type) {
|
|
52
88
|
case "blueprint":
|
|
53
|
-
|
|
89
|
+
I(n);
|
|
54
90
|
break;
|
|
55
91
|
case "error":
|
|
56
|
-
|
|
92
|
+
w(i);
|
|
57
93
|
break;
|
|
58
94
|
}
|
|
59
95
|
});
|
|
@@ -61,10 +97,10 @@ const x = "email_template", L = "chat", M = "guido:debug:ai", R = () => {
|
|
|
61
97
|
},
|
|
62
98
|
{ deep: !0, immediate: !0 }
|
|
63
99
|
);
|
|
64
|
-
|
|
65
|
-
|
|
100
|
+
k(() => {
|
|
101
|
+
P(), l.clear(), p.clear(), a.clear(), f.clear();
|
|
66
102
|
});
|
|
67
103
|
};
|
|
68
104
|
export {
|
|
69
|
-
|
|
105
|
+
X as useCortexBlueprintBridge
|
|
70
106
|
};
|
|
@@ -1,59 +1,97 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { ToasterTypeOptions as
|
|
6
|
-
import { useDynamicContentStore as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { useActionsApi as P } from "./useActionsApi.js";
|
|
2
|
+
import { useConfig as U } from "./useConfig.js";
|
|
3
|
+
import { useToaster as O } from "./useToaster.js";
|
|
4
|
+
import { useTranslations as M } from "./useTranslations.js";
|
|
5
|
+
import { ToasterTypeOptions as p } from "../enums/toaster.js";
|
|
6
|
+
import { useDynamicContentStore as Q } from "../stores/dynamic-content.js";
|
|
7
|
+
import { useEditorStore as _ } from "../stores/editor.js";
|
|
8
|
+
import { flattenDynamicContentList as k } from "../utils/genericUtil.js";
|
|
9
|
+
import { extractUsedDynamicContent as z } from "../utils/registerUsedDynamicContent.js";
|
|
10
|
+
import { ref as H, watch as N } from "vue";
|
|
11
|
+
const j = 250, x = 12e4, o = H({}), m = {}, n = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), B = () => {
|
|
12
|
+
var r, l;
|
|
13
|
+
return typeof ((l = (r = window.StripoEditorApi) == null ? void 0 : r.actionsApi) == null ? void 0 : l.updateHtmlAndCss) == "function";
|
|
14
|
+
}, b = () => {
|
|
15
|
+
const { updateHtmlAndCss: r } = P(), { showToaster: l } = O(), h = M(), { template: C } = U(), w = Q(), u = _(), f = (e, t) => {
|
|
16
|
+
const s = h(e);
|
|
17
|
+
return s === e ? t : s;
|
|
18
|
+
}, A = (e) => {
|
|
15
19
|
o.value[e] === void 0 && (o.value = { ...o.value, [e]: "pending" });
|
|
16
|
-
},
|
|
20
|
+
}, d = (e, t, s) => {
|
|
17
21
|
var c;
|
|
18
22
|
o.value = { ...o.value, [e]: "applying" };
|
|
19
23
|
try {
|
|
20
|
-
r(t,
|
|
21
|
-
console.warn("Editor did not acknowledge the template apply.", n);
|
|
22
|
-
}), o.value = { ...o.value, [e]: "applied" };
|
|
24
|
+
r(t, s), o.value = { ...o.value, [e]: "applied" };
|
|
23
25
|
try {
|
|
24
|
-
const
|
|
25
|
-
i.length > 0 &&
|
|
26
|
+
const a = k((c = C.value) == null ? void 0 : c.dynamicContentList), i = z(t, a);
|
|
27
|
+
i.length > 0 && w.registerDynamicContent(i);
|
|
26
28
|
} catch {
|
|
27
29
|
}
|
|
28
|
-
|
|
29
|
-
type:
|
|
30
|
-
message:
|
|
31
|
-
}));
|
|
32
|
-
} catch (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
return g.get(e) !== t && (g.set(e, t), l({
|
|
31
|
+
type: p.Success,
|
|
32
|
+
message: f("newsletter.ai-template-applied", "Template applied to the editor")
|
|
33
|
+
})), { status: "applied" };
|
|
34
|
+
} catch (a) {
|
|
35
|
+
const i = a instanceof Error ? a.message : "Failed to apply template";
|
|
36
|
+
return o.value = { ...o.value, [e]: "failed" }, l({
|
|
37
|
+
type: p.Error,
|
|
38
|
+
message: i
|
|
39
|
+
}), { status: "failed", error: i };
|
|
37
40
|
}
|
|
38
|
-
},
|
|
39
|
-
const t =
|
|
40
|
-
t && (clearTimeout(t),
|
|
41
|
+
}, y = (e) => {
|
|
42
|
+
const t = n.get(e);
|
|
43
|
+
t && (n.delete(e), clearTimeout(t.timeoutTimer), t.resolve({ status: "superseded" }));
|
|
44
|
+
}, S = (e, t, s) => (y(e), new Promise((c) => {
|
|
45
|
+
const a = setTimeout(() => {
|
|
46
|
+
n.delete(e), o.value = { ...o.value, [e]: "failed" };
|
|
47
|
+
const i = f(
|
|
48
|
+
"newsletter.ai-template-apply-timeout",
|
|
49
|
+
"The editor took too long to load. Please try applying again."
|
|
50
|
+
);
|
|
51
|
+
l({ type: p.Error, message: i }), c({ status: "failed", error: i });
|
|
52
|
+
}, x);
|
|
53
|
+
n.set(e, { html: t, css: s, resolve: c, timeoutTimer: a });
|
|
54
|
+
})), T = () => u.isStripoInitialized && B(), D = () => {
|
|
55
|
+
if (!T() || n.size === 0)
|
|
56
|
+
return;
|
|
57
|
+
const e = [...n.entries()];
|
|
58
|
+
n.clear(), e.forEach(([t, s]) => {
|
|
59
|
+
clearTimeout(s.timeoutTimer), s.resolve(d(t, s.html, s.css));
|
|
60
|
+
});
|
|
41
61
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
62
|
+
N(
|
|
63
|
+
() => u.isStripoInitialized,
|
|
64
|
+
(e) => {
|
|
65
|
+
e && D();
|
|
66
|
+
},
|
|
67
|
+
{ immediate: !0 }
|
|
68
|
+
);
|
|
69
|
+
const v = (e) => {
|
|
70
|
+
const t = m[e];
|
|
71
|
+
t && (clearTimeout(t.timer), delete m[e], t.resolve({ status: "superseded" }));
|
|
72
|
+
}, E = (e, t, s) => T() ? (y(e), Promise.resolve(d(e, t, s))) : S(e, t, s);
|
|
73
|
+
return { applyStatus: o, markPending: A, applyTemplate: (e, t) => t.html ? (v(e), E(e, t.html, t.css ?? "")) : Promise.resolve({ status: "superseded" }), applyTemplateDebounced: (e, t) => {
|
|
45
74
|
if (!t.html)
|
|
46
|
-
return;
|
|
47
|
-
|
|
48
|
-
const { html:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
75
|
+
return Promise.resolve({ status: "superseded" });
|
|
76
|
+
v(e);
|
|
77
|
+
const { html: s } = t, c = t.css ?? "";
|
|
78
|
+
return new Promise((a) => {
|
|
79
|
+
m[e] = {
|
|
80
|
+
resolve: a,
|
|
81
|
+
timer: setTimeout(() => {
|
|
82
|
+
delete m[e], a(E(e, s, c));
|
|
83
|
+
}, j)
|
|
84
|
+
};
|
|
85
|
+
});
|
|
52
86
|
} };
|
|
53
|
-
},
|
|
54
|
-
Object.values(
|
|
87
|
+
}, I = () => {
|
|
88
|
+
Object.values(m).forEach((r) => {
|
|
89
|
+
clearTimeout(r.timer), r.resolve({ status: "superseded" });
|
|
90
|
+
}), Object.keys(m).forEach((r) => delete m[r]), n.forEach((r) => {
|
|
91
|
+
clearTimeout(r.timeoutTimer), r.resolve({ status: "superseded" });
|
|
92
|
+
}), n.clear(), o.value = {};
|
|
55
93
|
};
|
|
56
94
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
95
|
+
I as resetEmailTemplateApplier,
|
|
96
|
+
b as useEmailTemplateApplier
|
|
59
97
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useActionsApi as f } from "./useActionsApi.js";
|
|
2
|
-
import { useHttp as
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useStripoApi as
|
|
5
|
-
const
|
|
6
|
-
const { handleError: c } =
|
|
2
|
+
import { useHttp as w } from "./useHttp.js";
|
|
3
|
+
import { useToaster as H } from "./useToaster.js";
|
|
4
|
+
import { useStripoApi as y } from "../services/stripoApi.js";
|
|
5
|
+
const O = () => {
|
|
6
|
+
const { handleError: c } = H(), { getToken: u } = y(), { post: d } = w(), { updateHtmlAndCss: l } = f(), s = (t) => /esd-timer-id="(\d+)"/.test(t), i = async (t, e) => {
|
|
7
7
|
try {
|
|
8
|
-
return (await
|
|
8
|
+
return (await d(
|
|
9
9
|
"https://plugins.stripo.email/api/v1/timers/clone",
|
|
10
10
|
{ html: t },
|
|
11
11
|
{
|
|
@@ -25,31 +25,29 @@ const S = () => {
|
|
|
25
25
|
cloneTimersOnSave: async (t) => {
|
|
26
26
|
if (!s(t))
|
|
27
27
|
return t;
|
|
28
|
-
const e = await
|
|
28
|
+
const e = await u();
|
|
29
29
|
return e && await i(t, e) || t;
|
|
30
30
|
},
|
|
31
31
|
updateTimersOnLoad: async (t) => {
|
|
32
|
-
var e, r,
|
|
32
|
+
var e, r, o, m;
|
|
33
33
|
try {
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
34
|
+
const n = (r = (e = window.UIEditor) == null ? void 0 : e.getHtml) == null ? void 0 : r.call(e);
|
|
35
|
+
if (!n || !s(n))
|
|
36
36
|
return;
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
37
|
+
const p = await t();
|
|
38
|
+
if (!p)
|
|
39
39
|
return;
|
|
40
|
-
const a = await i(
|
|
41
|
-
if (!a || a ===
|
|
40
|
+
const a = await i(n, p);
|
|
41
|
+
if (!a || a === n)
|
|
42
42
|
return;
|
|
43
|
-
const T = ((
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} catch (o) {
|
|
48
|
-
c(o, "Failed to update timer blocks");
|
|
43
|
+
const T = ((m = (o = window.UIEditor) == null ? void 0 : o.getCss) == null ? void 0 : m.call(o)) || "";
|
|
44
|
+
l(a, T);
|
|
45
|
+
} catch (n) {
|
|
46
|
+
c(n, "Failed to update timer blocks");
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
49
|
};
|
|
52
50
|
};
|
|
53
51
|
export {
|
|
54
|
-
|
|
52
|
+
O as useTimerClone
|
|
55
53
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-
|
|
1
|
+
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-4316a203]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-4316a203]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-4316a203]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}
|
package/dist/library.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { MessageType as f, ProductType as
|
|
1
|
+
import { default as a } from "./components/Guido.vue.js";
|
|
2
|
+
import { MessageType as f, ProductType as t } from "./@types/config/schemas.js";
|
|
3
3
|
import "./@types/config/defaults.js";
|
|
4
|
-
import { getValidationErrors as
|
|
5
|
-
import { assignTrackingIds as T, readTrackFloor as c, readTrackSeq as x } from "./utils/linkTrackingIds.js";
|
|
4
|
+
import { getValidationErrors as s, isValidConfig as d, parseConfig as g, parseConfigSafe as n, validateConfig as l } from "./@types/config/validator.js";
|
|
6
5
|
export {
|
|
7
|
-
|
|
6
|
+
a as Guido,
|
|
8
7
|
f as MessageType,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
d as
|
|
12
|
-
p as isValidConfig,
|
|
8
|
+
t as ProductType,
|
|
9
|
+
s as getValidationErrors,
|
|
10
|
+
d as isValidConfig,
|
|
13
11
|
g as parseConfig,
|
|
14
12
|
n as parseConfigSafe,
|
|
15
|
-
c as readTrackFloor,
|
|
16
|
-
x as readTrackSeq,
|
|
17
13
|
l as validateConfig
|
|
18
14
|
};
|