@useinsider/guido 3.14.0-beta.1abaa5e → 3.14.0-beta.8d5df20
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 +108 -92
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +91 -85
- package/dist/composables/useActionsApi.js +30 -22
- package/dist/composables/useAllowlist.js +30 -48
- package/dist/composables/useEmailTemplateApplier.js +8 -6
- package/dist/composables/useHtmlCompiler.js +16 -19
- package/dist/composables/useTimerClone.js +21 -19
- package/dist/config/compiler/htmlCompilerRules.js +7 -34
- package/dist/config/migrator/index.js +11 -10
- package/dist/config/migrator/trackIdMigrator.js +11 -0
- package/dist/guido.css +1 -1
- package/dist/library.js +8 -5
- package/dist/node_modules/valibot/dist/index.js +230 -216
- package/dist/src/@types/config/schemas.d.ts +20 -0
- package/dist/src/composables/useActionsApi.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/config/migrator/index.d.ts +6 -1
- package/dist/src/config/migrator/trackIdMigrator.d.ts +6 -0
- package/dist/src/library.d.ts +1 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/dist/src/stores/editor.d.ts +25 -0
- package/dist/src/utils/linkTrackingIds.d.ts +25 -0
- package/dist/stores/editor.js +4 -1
- package/dist/utils/linkTrackingIds.js +46 -0
- package/dist/utils/templatePreparation.js +72 -61
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { filterAmpErrors as
|
|
1
|
+
import { filterAmpErrors as T } from "../utils/ampErrorFilter.js";
|
|
2
2
|
import { useToaster as A } from "./useToaster.js";
|
|
3
|
-
const D = () => {
|
|
4
|
-
const { handleError:
|
|
3
|
+
const p = 1e4, D = () => {
|
|
4
|
+
const { handleError: r } = A(), l = (t = {}) => new Promise((e, a) => {
|
|
5
5
|
const o = { ...{
|
|
6
6
|
minimize: !0,
|
|
7
7
|
utmEntity: {
|
|
@@ -21,29 +21,29 @@ const 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 }, n = {
|
|
25
|
+
callback: (m, d, c, u, w) => {
|
|
26
|
+
m ? a(m) : e({
|
|
27
|
+
html: d,
|
|
28
|
+
ampHtml: c,
|
|
29
|
+
ampErrors: T(u ?? []),
|
|
30
|
+
displayConditions: w
|
|
31
31
|
});
|
|
32
32
|
},
|
|
33
33
|
...o
|
|
34
34
|
};
|
|
35
|
-
window.StripoEditorApi.actionsApi.compileEmail(
|
|
35
|
+
window.StripoEditorApi.actionsApi.compileEmail(n);
|
|
36
36
|
});
|
|
37
37
|
return {
|
|
38
|
-
getCompiledEmail:
|
|
38
|
+
getCompiledEmail: l,
|
|
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: s, utmParams: n, syncModulesIds: m }) => t({
|
|
41
41
|
html: a,
|
|
42
42
|
css: i,
|
|
43
43
|
width: o,
|
|
44
|
-
height:
|
|
45
|
-
utmParams:
|
|
46
|
-
syncModulesIds:
|
|
44
|
+
height: s,
|
|
45
|
+
utmParams: n,
|
|
46
|
+
syncModulesIds: m
|
|
47
47
|
});
|
|
48
48
|
window.StripoEditorApi.actionsApi.getTemplateData(e);
|
|
49
49
|
}),
|
|
@@ -57,7 +57,7 @@ const D = () => {
|
|
|
57
57
|
displayConditions: a,
|
|
58
58
|
ampHtml: i = "",
|
|
59
59
|
ampErrors: o = []
|
|
60
|
-
} = await
|
|
60
|
+
} = await l({ minimize: !1, resetDataSavedFlag: !1, ...t });
|
|
61
61
|
return {
|
|
62
62
|
html: e,
|
|
63
63
|
ampHtml: i,
|
|
@@ -65,7 +65,7 @@ const D = () => {
|
|
|
65
65
|
displayConditions: a
|
|
66
66
|
};
|
|
67
67
|
} catch (e) {
|
|
68
|
-
return
|
|
68
|
+
return r(e, "Error loading preview"), {
|
|
69
69
|
html: "",
|
|
70
70
|
ampHtml: "",
|
|
71
71
|
ampErrors: [],
|
|
@@ -81,19 +81,27 @@ const D = () => {
|
|
|
81
81
|
}
|
|
82
82
|
try {
|
|
83
83
|
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((i, o) => {
|
|
84
|
-
i ? (
|
|
84
|
+
i ? (r(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
|
|
85
85
|
});
|
|
86
86
|
} catch (i) {
|
|
87
|
-
|
|
87
|
+
r(i, "Failed to call updateTimerInClonedTemplate"), t(null);
|
|
88
88
|
}
|
|
89
89
|
}),
|
|
90
90
|
updateHtmlAndCss: (t, e) => {
|
|
91
|
-
window.StripoEditorApi
|
|
91
|
+
const { actionsApi: a } = window.StripoEditorApi;
|
|
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
|
+
});
|
|
92
100
|
},
|
|
93
101
|
editorSave: () => new Promise((t) => {
|
|
94
102
|
window.StripoEditorApi.actionsApi.save((e) => {
|
|
95
103
|
if (e) {
|
|
96
|
-
|
|
104
|
+
r(e, "Failed to save template"), t(!1);
|
|
97
105
|
return;
|
|
98
106
|
}
|
|
99
107
|
t(!0);
|
|
@@ -1,68 +1,50 @@
|
|
|
1
1
|
import { useAllowlistApi as A } from "../services/allowlistApi.js";
|
|
2
|
-
import { base64EncodeWithSpecialChars as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { useUserRole as
|
|
5
|
-
const
|
|
6
|
-
"insider-email",
|
|
7
|
-
"web-image.useinsider.com",
|
|
8
|
-
"image.useinsider.com",
|
|
9
|
-
"panel-assets.useinsider.com",
|
|
10
|
-
"stripo-editor-image"
|
|
11
|
-
], N = ({ hostname: r, pathname: l }) => {
|
|
12
|
-
const n = r.toLowerCase();
|
|
13
|
-
if (n === w) {
|
|
14
|
-
const i = l.split("/")[1].toLowerCase();
|
|
15
|
-
return d.includes(i);
|
|
16
|
-
}
|
|
17
|
-
return d.some((i) => n === `${i}.${w}`);
|
|
18
|
-
}, m = {
|
|
2
|
+
import { base64EncodeWithSpecialChars as p } from "../utils/base64.js";
|
|
3
|
+
import { useTranslations as h } from "./useTranslations.js";
|
|
4
|
+
import { useUserRole as D } from "./useUserRole.js";
|
|
5
|
+
const f = /(?:https?:\/\/|www\.)[^\s"'<>()]+/gi, E = /"\/\//gi, i = {
|
|
19
6
|
MANAGE: "journey-builder.domain-allowlist-warning",
|
|
20
7
|
NON_MANAGE: "settings.allow-list-warning-not-admin-architect",
|
|
21
8
|
ADD_BUTTON: "settings.allow-list-warning-add-button"
|
|
22
|
-
},
|
|
23
|
-
const { checkDomain:
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
const
|
|
9
|
+
}, w = /* @__PURE__ */ new Set(), O = (n) => `/settings?openAddModal=true&type=domain&values=${p(n)}#security`, M = () => {
|
|
10
|
+
const { checkDomain: n } = A(), { getIsManageUser: l } = D(), a = h(), d = (t, s) => {
|
|
11
|
+
const c = `${t || ""} ${s || ""}`.replace(E, "https://").match(f) || [], e = /* @__PURE__ */ new Set();
|
|
12
|
+
return c.forEach((r) => {
|
|
13
|
+
const g = /^https?:\/\//i.test(r) ? r : `https://${r}`;
|
|
27
14
|
try {
|
|
28
|
-
const u = new URL(
|
|
29
|
-
|
|
30
|
-
return;
|
|
31
|
-
u.hostname && s.add(u.hostname.replace(/^www\./i, "").toLowerCase());
|
|
15
|
+
const { hostname: u } = new URL(g);
|
|
16
|
+
u && e.add(u.replace(/^www\./i, "").toLowerCase());
|
|
32
17
|
} catch {
|
|
33
18
|
}
|
|
34
|
-
}), [...
|
|
35
|
-
},
|
|
36
|
-
if (
|
|
19
|
+
}), [...e];
|
|
20
|
+
}, m = async (t) => {
|
|
21
|
+
if (w.has(t))
|
|
37
22
|
return !0;
|
|
38
23
|
try {
|
|
39
|
-
const
|
|
40
|
-
return
|
|
41
|
-
} catch (
|
|
42
|
-
return console.error("[GUIDO_ALLOWLIST] isDomainAllowlisted failed", t,
|
|
24
|
+
const s = await n(t);
|
|
25
|
+
return s && w.add(t), s;
|
|
26
|
+
} catch (s) {
|
|
27
|
+
return console.error("[GUIDO_ALLOWLIST] isDomainAllowlisted failed", t, s), !0;
|
|
43
28
|
}
|
|
44
29
|
};
|
|
45
|
-
return { getBlockedDomains: async (t,
|
|
30
|
+
return { getBlockedDomains: async (t, s) => {
|
|
46
31
|
try {
|
|
47
|
-
const o =
|
|
32
|
+
const o = d(t, s);
|
|
48
33
|
return o.length ? (await Promise.all(
|
|
49
|
-
o.map(async (
|
|
50
|
-
)).filter((
|
|
34
|
+
o.map(async (e) => ({ domain: e, allowlisted: await m(e) }))
|
|
35
|
+
)).filter((e) => !e.allowlisted).map((e) => e.domain) : [];
|
|
51
36
|
} catch (o) {
|
|
52
37
|
return console.error("[GUIDO_ALLOWLIST] getBlockedDomains failed", o), [];
|
|
53
38
|
}
|
|
54
|
-
}, resolveToast: async (t) => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
} : { message: a(n(m.NON_MANAGE)) };
|
|
63
|
-
} };
|
|
39
|
+
}, resolveToast: async (t) => await l() ? {
|
|
40
|
+
message: a(i.MANAGE),
|
|
41
|
+
actionButton: {
|
|
42
|
+
text: a(i.ADD_BUTTON),
|
|
43
|
+
onClick: () => window.open(O(t.join(",")), "_blank")
|
|
44
|
+
}
|
|
45
|
+
} : { message: a(i.NON_MANAGE) } };
|
|
64
46
|
};
|
|
65
47
|
export {
|
|
66
48
|
O as buildAllowlistSettingsUrl,
|
|
67
|
-
|
|
49
|
+
M as useAllowlist
|
|
68
50
|
};
|
|
@@ -3,13 +3,15 @@ import { useToaster as f } from "./useToaster.js";
|
|
|
3
3
|
import { useTranslations as y } from "./useTranslations.js";
|
|
4
4
|
import { ToasterTypeOptions as n } from "../enums/toaster.js";
|
|
5
5
|
import { ref as v } from "vue";
|
|
6
|
-
const
|
|
6
|
+
const h = 250, s = v({}), o = {}, k = () => {
|
|
7
7
|
const { updateHtmlAndCss: l } = T(), { showToaster: p } = f(), i = y(), u = (e) => {
|
|
8
8
|
s.value[e] === void 0 && (s.value = { ...s.value, [e]: "pending" });
|
|
9
9
|
}, c = (e, t, r) => {
|
|
10
10
|
s.value = { ...s.value, [e]: "applying" };
|
|
11
11
|
try {
|
|
12
|
-
l(t, r)
|
|
12
|
+
l(t, r).catch((a) => {
|
|
13
|
+
console.warn("Editor did not acknowledge the template apply.", a);
|
|
14
|
+
}), s.value = { ...s.value, [e]: "applied" }, p({
|
|
13
15
|
type: n.Success,
|
|
14
16
|
message: i("newsletter.ai-template-applied")
|
|
15
17
|
});
|
|
@@ -32,12 +34,12 @@ const E = 250, s = v({}), o = {}, j = () => {
|
|
|
32
34
|
const { html: r } = t, a = t.css ?? "";
|
|
33
35
|
o[e] = setTimeout(() => {
|
|
34
36
|
delete o[e], c(e, r, a);
|
|
35
|
-
},
|
|
37
|
+
}, h);
|
|
36
38
|
} };
|
|
37
|
-
},
|
|
39
|
+
}, S = () => {
|
|
38
40
|
Object.values(o).forEach(clearTimeout), Object.keys(o).forEach((l) => delete o[l]), s.value = {};
|
|
39
41
|
};
|
|
40
42
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
S as resetEmailTemplateApplier,
|
|
44
|
+
k as useEmailTemplateApplier
|
|
43
45
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defaultHtmlCompilerRules as
|
|
2
|
-
import { itemsCompilerRules as
|
|
3
|
-
import { liquidCompilerRules as
|
|
4
|
-
import { outlookCompilerRules as
|
|
1
|
+
import { defaultHtmlCompilerRules as R } from "../config/compiler/htmlCompilerRules.js";
|
|
2
|
+
import { itemsCompilerRules as g } from "../config/compiler/itemsCompilerRules.js";
|
|
3
|
+
import { liquidCompilerRules as C } from "../config/compiler/liquidCompilerRules.js";
|
|
4
|
+
import { outlookCompilerRules as b } from "../config/compiler/outlookCompilerRules.js";
|
|
5
5
|
import { recommendationCompilerRules as v } from "../config/compiler/recommendationCompilerRules.js";
|
|
6
|
-
import { socialCompilerRules as
|
|
7
|
-
import { unsubscribeCompilerRules as
|
|
6
|
+
import { socialCompilerRules as H } from "../config/compiler/socialCompilerRules.js";
|
|
7
|
+
import { unsubscribeCompilerRules as x } from "../config/compiler/unsubscribeCompilerRules.js";
|
|
8
8
|
import { createHtmlCompiler as s } from "../utils/htmlCompiler.js";
|
|
9
|
-
import { useConfig as
|
|
10
|
-
const
|
|
9
|
+
import { useConfig as k } from "./useConfig.js";
|
|
10
|
+
const y = /* @__PURE__ */ new Set([
|
|
11
11
|
// URL/tag encoding fixes — keep merge-tag and placeholder integrity intact.
|
|
12
12
|
"fix-url-encoding-start",
|
|
13
13
|
"fix-url-encoding-end",
|
|
@@ -18,9 +18,6 @@ const h = /* @__PURE__ */ new Set([
|
|
|
18
18
|
// Image domain corrections — plain string replacement.
|
|
19
19
|
"replace-old-image-domain",
|
|
20
20
|
"replace-old-v2-image-domain",
|
|
21
|
-
"replace-s3-path-style-web-image-domain",
|
|
22
|
-
"replace-s3-path-style-image-domain",
|
|
23
|
-
"replace-s3-path-style-panel-assets-domain",
|
|
24
21
|
// Unsubscribe domain — the actual fix: injects the real unsubscribe href in
|
|
25
22
|
// place of the `{{ins-*-unsubscribe-link}}` placeholders, plus related
|
|
26
23
|
// unsubscribe-only cleanups. All pure regex/text, no AMP-forbidden output.
|
|
@@ -35,21 +32,21 @@ const h = /* @__PURE__ */ new Set([
|
|
|
35
32
|
"remove-contenteditable"
|
|
36
33
|
]), M = () => {
|
|
37
34
|
var i, m, r;
|
|
38
|
-
const { compiler: o, isFeatureEnabled:
|
|
39
|
-
...!!((m = o.value) != null && m.ignoreDefaultRules) ? [] :
|
|
35
|
+
const { compiler: o, isFeatureEnabled: n, partner: a } = k(), p = ((i = o.value) == null ? void 0 : i.customRules) || [], l = [
|
|
36
|
+
...!!((m = o.value) != null && m.ignoreDefaultRules) ? [] : R,
|
|
40
37
|
...v,
|
|
38
|
+
...x,
|
|
39
|
+
...g,
|
|
40
|
+
...b,
|
|
41
41
|
...H,
|
|
42
|
-
...
|
|
43
|
-
...C,
|
|
44
|
-
...y,
|
|
45
|
-
...a("liquidSyntax") ? b : [],
|
|
42
|
+
...n("liquidSyntax") ? C : [],
|
|
46
43
|
...p.map((e, f) => ({
|
|
47
44
|
...e,
|
|
48
45
|
priority: e.priority + 1e3 + f
|
|
49
46
|
// Ensure additional rules run after default rules
|
|
50
47
|
}))
|
|
51
|
-
],
|
|
52
|
-
return { compileHtml: (e) =>
|
|
48
|
+
], u = s(l), c = l.filter((e) => y.has(e.id)), d = s(c), t = (r = a.value) == null ? void 0 : r.fallbackFont;
|
|
49
|
+
return { compileHtml: (e) => u.compile(e, void 0, t), compileAmpHtml: (e) => d.compile(e, void 0, t) };
|
|
53
50
|
};
|
|
54
51
|
export {
|
|
55
52
|
M as useHtmlCompiler
|
|
@@ -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 H } from "./useHttp.js";
|
|
3
|
+
import { useToaster as h } from "./useToaster.js";
|
|
4
|
+
import { useStripoApi as k } from "../services/stripoApi.js";
|
|
5
|
+
const S = () => {
|
|
6
|
+
const { handleError: c } = h(), { getToken: l } = k(), { post: p } = H(), { updateHtmlAndCss: u } = f(), s = (t) => /esd-timer-id="(\d+)"/.test(t), i = async (t, e) => {
|
|
7
7
|
try {
|
|
8
|
-
return (await
|
|
8
|
+
return (await p(
|
|
9
9
|
"https://plugins.stripo.email/api/v1/timers/clone",
|
|
10
10
|
{ html: t },
|
|
11
11
|
{
|
|
@@ -25,29 +25,31 @@ const O = () => {
|
|
|
25
25
|
cloneTimersOnSave: async (t) => {
|
|
26
26
|
if (!s(t))
|
|
27
27
|
return t;
|
|
28
|
-
const e = await
|
|
28
|
+
const e = await l();
|
|
29
29
|
return e && await i(t, e) || t;
|
|
30
30
|
},
|
|
31
31
|
updateTimersOnLoad: async (t) => {
|
|
32
|
-
var e, r,
|
|
32
|
+
var e, r, n, d;
|
|
33
33
|
try {
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
34
|
+
const o = (r = (e = window.UIEditor) == null ? void 0 : e.getHtml) == null ? void 0 : r.call(e);
|
|
35
|
+
if (!o || !s(o))
|
|
36
36
|
return;
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
37
|
+
const m = await t();
|
|
38
|
+
if (!m)
|
|
39
39
|
return;
|
|
40
|
-
const a = await i(
|
|
41
|
-
if (!a || a ===
|
|
40
|
+
const a = await i(o, m);
|
|
41
|
+
if (!a || a === o)
|
|
42
42
|
return;
|
|
43
|
-
const T = ((
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
const T = ((d = (n = window.UIEditor) == null ? void 0 : n.getCss) == null ? void 0 : d.call(n)) || "";
|
|
44
|
+
u(a, T).catch((w) => {
|
|
45
|
+
console.warn("Editor did not acknowledge the timer-block update.", w);
|
|
46
|
+
});
|
|
47
|
+
} catch (o) {
|
|
48
|
+
c(o, "Failed to update timer blocks");
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
};
|
|
50
52
|
};
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
S as useTimerClone
|
|
53
55
|
};
|
|
@@ -122,10 +122,10 @@ const d = [
|
|
|
122
122
|
], i = /<head>([\S\s]*)<\/head>/, o = new RegExp(i);
|
|
123
123
|
if (!e.match(o))
|
|
124
124
|
return e;
|
|
125
|
-
let
|
|
126
|
-
return t.forEach((
|
|
127
|
-
|
|
128
|
-
}),
|
|
125
|
+
let r = e;
|
|
126
|
+
return t.forEach((s) => {
|
|
127
|
+
r = r.replace("</head>", `${s}</head>`);
|
|
128
|
+
}), r;
|
|
129
129
|
},
|
|
130
130
|
priority: 30
|
|
131
131
|
},
|
|
@@ -147,33 +147,6 @@ const d = [
|
|
|
147
147
|
replaceAll: !0,
|
|
148
148
|
priority: 41
|
|
149
149
|
},
|
|
150
|
-
{
|
|
151
|
-
id: "replace-s3-path-style-web-image-domain",
|
|
152
|
-
description: "Rewriting path-style S3 asset URLs to the web-image.useinsider.com domain",
|
|
153
|
-
type: "replace",
|
|
154
|
-
search: "s3-eu-west-1.amazonaws.com/web-image.useinsider.com",
|
|
155
|
-
replacement: "web-image.useinsider.com",
|
|
156
|
-
replaceAll: !0,
|
|
157
|
-
priority: 42
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
id: "replace-s3-path-style-image-domain",
|
|
161
|
-
description: "Rewriting path-style S3 asset URLs to the image.useinsider.com domain",
|
|
162
|
-
type: "replace",
|
|
163
|
-
search: "s3-eu-west-1.amazonaws.com/image.useinsider.com",
|
|
164
|
-
replacement: "image.useinsider.com",
|
|
165
|
-
replaceAll: !0,
|
|
166
|
-
priority: 43
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
id: "replace-s3-path-style-panel-assets-domain",
|
|
170
|
-
description: "Rewriting path-style S3 asset URLs to the panel-assets.useinsider.com domain",
|
|
171
|
-
type: "replace",
|
|
172
|
-
search: "s3-eu-west-1.amazonaws.com/panel-assets.useinsider.com",
|
|
173
|
-
replacement: "panel-assets.useinsider.com",
|
|
174
|
-
replaceAll: !0,
|
|
175
|
-
priority: 46
|
|
176
|
-
},
|
|
177
150
|
{
|
|
178
151
|
id: "convert-rgb-to-hex",
|
|
179
152
|
// SD-142395: rgb()/6-digit hex are verbose; hex/3-digit shorthand is byte-identical
|
|
@@ -183,9 +156,9 @@ const d = [
|
|
|
183
156
|
type: "custom",
|
|
184
157
|
processor: (e) => {
|
|
185
158
|
const t = (i) => i.toString(16).padStart(2, "0");
|
|
186
|
-
return e.replace(/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/gi, (i, o,
|
|
187
|
-
const [
|
|
188
|
-
return
|
|
159
|
+
return e.replace(/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/gi, (i, o, n, r) => {
|
|
160
|
+
const [s, a, c] = [Number(o), Number(n), Number(r)];
|
|
161
|
+
return s > 255 || a > 255 || c > 255 ? i : `#${t(s)}${t(a)}${t(c)}`;
|
|
189
162
|
}).replace(/#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3\b/gi, "#$1$2$3");
|
|
190
163
|
},
|
|
191
164
|
priority: 44
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { migrateCheckbox as
|
|
2
|
-
import { migrateCouponBlock as
|
|
1
|
+
import { migrateCheckbox as i } from "./checkboxMigrator.js";
|
|
2
|
+
import { migrateCouponBlock as a } from "./couponBlockMigrator.js";
|
|
3
3
|
import { migrateItemsBlock as e } from "./itemsBlockMigrator.js";
|
|
4
|
-
import { migrateRadioButton as
|
|
5
|
-
import { migrateRecommendation as
|
|
6
|
-
import { migrateSocialIcons as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { migrateRadioButton as c } from "./radioButtonMigrator.js";
|
|
5
|
+
import { migrateRecommendation as g } from "./recommendationMigrator.js";
|
|
6
|
+
import { migrateSocialIcons as n } from "./socialIconMigrator.js";
|
|
7
|
+
import { migrateTrackIds as f } from "./trackIdMigrator.js";
|
|
8
|
+
import { migrateUnsubscribe as p } from "./unsubscribeMigrator.js";
|
|
9
|
+
const x = async (o, t = {}, m = {}) => {
|
|
10
|
+
let r = o;
|
|
11
|
+
return r = i(r), r = c(r), r = await p(r), r = a(r), r = g(r, t), r = e(r), r = n(r), m.linkTrackingIds && (r = f(r, m.trackIdFloor)), r;
|
|
11
12
|
};
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
x as migrate
|
|
14
15
|
};
|
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-840614fd]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-840614fd]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-840614fd]{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,14 +1,17 @@
|
|
|
1
1
|
import { default as a } from "./components/Guido.vue.js";
|
|
2
|
-
import { MessageType as f, ProductType as
|
|
2
|
+
import { MessageType as f, ProductType as s } from "./@types/config/schemas.js";
|
|
3
3
|
import "./@types/config/defaults.js";
|
|
4
|
-
import { getValidationErrors as
|
|
4
|
+
import { getValidationErrors as p, isValidConfig as d, parseConfig as g, parseConfigSafe as n, validateConfig as m } from "./@types/config/validator.js";
|
|
5
|
+
import { assignTrackingIds as x, readTrackSeq as C } from "./utils/linkTrackingIds.js";
|
|
5
6
|
export {
|
|
6
7
|
a as Guido,
|
|
7
8
|
f as MessageType,
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
s as ProductType,
|
|
10
|
+
x as assignTrackingIds,
|
|
11
|
+
p as getValidationErrors,
|
|
10
12
|
d as isValidConfig,
|
|
11
13
|
g as parseConfig,
|
|
12
14
|
n as parseConfigSafe,
|
|
13
|
-
|
|
15
|
+
C as readTrackSeq,
|
|
16
|
+
m as validateConfig
|
|
14
17
|
};
|