@aswin.dev/editor 0.7.0 → 0.7.1
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 +3 -3
- package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-COL6Wm7p.js} +37 -37
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DWGPVtvC.js} +68 -68
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-duUFSfDf.js} +22 -22
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-Qs6HtXid.js} +12 -12
- package/dist/CloudEditor-CFldoCOb.js +1207 -0
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bw-lbt61.js} +21 -21
- package/dist/CommentsSidebar-BaD5F53-.js +436 -0
- package/dist/CountdownBlock-DaYGxKqo.js +92 -0
- package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-BSH7uNP_.js} +58 -58
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-Ba2pfF57.js} +2 -2
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-6phxZSKI.js} +80 -80
- package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-BpUzQOJt.js} +87 -87
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DNSzAB-I.js} +182 -182
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CrqPQdnk.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-zMQTpez7.js} +28 -28
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-Do-A5rYU.js} +45 -50
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-CS7o62zS.js} +75 -75
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-DGj_9V1u.js} +28 -28
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-C7IDnAoS.js} +68 -68
- package/dist/{TplModal-BwSfxIHf.js → TplModal-BAsVzcTb.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-C6LDKvmd.js} +19 -5
- package/dist/bundle-stats.json +7 -7
- package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
- package/dist/chevron-right-BqCptpdp.js +10 -0
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-6ZmAvF0j.js} +485 -427
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
- package/dist/{de-Brqvgr43.js → de-DWcgp-7T.js} +209 -1
- package/dist/{dist-BaQIYPsn.js → dist-BUzw1buG.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-BZyY-SS4.js} +1 -1
- package/dist/{dist-D6uC2xhi.js → dist-BadNx4qo.js} +1 -1
- package/dist/{dist-aRzjfSRN.js → dist-BesOh2mk.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-Bz3M4RXG.js} +3 -3
- package/dist/dist-C04s_fLA.js +563 -0
- package/dist/{dist-DDJIWTRY.js → dist-C3T2AKtB.js} +1 -1
- package/dist/{dist-BFawx6IS.js → dist-C9ckKEZL.js} +51 -51
- package/dist/{dist-us-RpCWN.js → dist-CBItRG-Z.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-COSzWQUs.js} +1 -1
- package/dist/dist-CivF9P8b.js +382 -0
- package/dist/{dist-Cp0zXPAD.js → dist-DtiDUrX-.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-Dzt5foyL.js} +1 -1
- package/dist/{en-WDVp87TE.js → en-Cxd4fhNm.js} +209 -1
- package/dist/{extensions-CUcl9Ok4.js → extensions-D__hOlV1.js} +106 -106
- package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
- package/dist/index.d.ts +88 -11
- package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
- package/dist/keys-CvX8D-8C.js +10 -0
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
- package/dist/pencil-BZJPNYWR.js +10 -0
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
- package/dist/{scan-line-D0vcUekt.js → scan-line-CzfFJO1o.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-D2eSo4GH.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-jkpgcC0-.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-Chm5CZfb.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styleConstants-34eUKPOZ.js +55 -0
- package/dist/styles-B4tjX5SP.js +5224 -0
- package/dist/templatical-editor.js +189 -126
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-CzBnJsW8.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-CtK2apEH.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-KpDVNbpn.js} +1 -1
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-DOKSZql1.js} +2 -2
- package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-wslttMH-.js} +2425 -2250
- package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-DX0XG5V9.js} +5 -5
- package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
- package/dist/{x-u2oVmjN_.js → x-BkaOMosX.js} +1 -1
- package/package.json +10 -10
- package/dist/CloudEditor-BCz1ZTYC.js +0 -1172
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +0 -97
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +0 -59
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +0 -33
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +0 -51
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +0 -423
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +0 -544
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +0 -106
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +0 -119
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +0 -171
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
- package/dist/cdn/chunks/de-Ce-LbJ2J.js +0 -89
- package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +0 -1
- package/dist/cdn/chunks/de-D8CnZxV9.js +0 -523
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
- package/dist/cdn/chunks/de-RQrZR56a.js +0 -209
- package/dist/cdn/chunks/de-RQrZR56a.js.map +0 -1
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +0 -19
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +0 -1
- package/dist/cdn/chunks/en-8FHaQv4V.js +0 -523
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
- package/dist/cdn/chunks/en-Bl1ecfRF.js +0 -209
- package/dist/cdn/chunks/en-Bl1ecfRF.js.map +0 -1
- package/dist/cdn/chunks/en-DiCWK5fG.js +0 -89
- package/dist/cdn/chunks/en-DiCWK5fG.js.map +0 -1
- package/dist/cdn/chunks/extensions-DIxF31tA.js +0 -598
- package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js +0 -6814
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/icons-CsLTcirh.js +0 -700
- package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +0 -3279
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
- package/dist/cdn/chunks/media-library-CVaNvhpM.js +0 -6014
- package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
- package/dist/cdn/chunks/pusher-CDbNlZBE.js +0 -2508
- package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +0 -1
- package/dist/cdn/chunks/quality-BaBfc54_.js +0 -1456
- package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +0 -32
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +0 -1
- package/dist/cdn/chunks/renderer-CUxvx7ro.js +0 -548
- package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
- package/dist/cdn/chunks/src-CRaqN-p8.js +0 -497
- package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +0 -14654
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +0 -1
- package/dist/cdn/editor.css +0 -2
- package/dist/cdn/editor.js +0 -250
- package/dist/cdn/editor.js.map +0 -1
- package/dist/dist-B1IR0bpH.js +0 -326
- package/dist/dist-DJmnUmW9.js +0 -362
- package/dist/keys-ciNfSSGj.js +0 -10
- package/dist/styleConstants-fWzlIIwN.js +0 -55
- package/dist/styles-DEXEkBvg.js +0 -3176
- /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-BVAJ4lgT.js} +0 -0
- /package/dist/{de-DCaaCE5s.js → de-GOtR9DwW.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-DXa1uAMh.js} +0 -0
- /package/dist/{emojiData-PQyVa4bU.js → emojiData-DrBuvEoP.js} +0 -0
- /package/dist/{en-DXCyK4-X.js → en-dFFQVzNn.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-BhhO8yCl.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-BvCyLQII.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-DVuzNX1y.js} +0 -0
|
@@ -1,219 +1,270 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { At as e, C as t, Ft as n, M as r, N as i, P as a, T as o, U as s, W as c, _ as l, b as u, et as d, f, g as p, h as m, j as ee, jt as h, l as g, m as _, n as v, st as y, t as te, v as b, x } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
+
import { r as S } from "./timeouts-BSGxjuUF.js";
|
|
3
|
+
import { f as ne, r as re } from "./dist-C04s_fLA.js";
|
|
4
|
+
import { L as C, S as w, t as ie, z as ae } from "./useEditorCore-wslttMH-.js";
|
|
5
|
+
import { w as oe } from "./keys-CvX8D-8C.js";
|
|
6
|
+
import { a as se, c as ce, d as le, f as ue, h as de, i as fe, l as pe, m as me, n as he, o as T, p as E, r as D, s as O, t as k, u as A } from "./styles-B4tjX5SP.js";
|
|
7
|
+
import { t as j } from "./_plugin-vue_export-helper-BVAJ4lgT.js";
|
|
6
8
|
//#region src/Editor.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
9
|
+
var M = ["data-tpl-theme"], N = {
|
|
8
10
|
class: "tpl-header tpl:absolute tpl:top-0 tpl:right-0 tpl:left-0 tpl:z-50 tpl:grid tpl:h-14 tpl:grid-cols-[1fr_auto_1fr] tpl:items-center tpl:px-4 tpl:shadow-[var(--tpl-shadow-md)] tpl:border-b tpl:border-[var(--tpl-border)]",
|
|
9
11
|
style: {
|
|
10
12
|
"background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
|
|
11
13
|
"backdrop-filter": "blur(12px)",
|
|
12
14
|
"-webkit-backdrop-filter": "blur(12px)"
|
|
13
15
|
}
|
|
14
|
-
},
|
|
16
|
+
}, P = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, F = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, I = { class: "tpl:flex tpl:justify-center tpl:p-8" }, L = ["aria-label"], R = /* @__PURE__ */ j(/* @__PURE__ */ t({
|
|
15
17
|
__name: "Editor",
|
|
16
18
|
props: {
|
|
17
19
|
config: {},
|
|
18
20
|
translations: {},
|
|
19
21
|
fontsManager: {}
|
|
20
22
|
},
|
|
21
|
-
setup(
|
|
22
|
-
let
|
|
23
|
-
content:
|
|
24
|
-
templateDefaults:
|
|
25
|
-
}),
|
|
26
|
-
editor:
|
|
23
|
+
setup(t, { expose: o }) {
|
|
24
|
+
let v = d(null), S = t, w = ae({
|
|
25
|
+
content: S.config.content,
|
|
26
|
+
templateDefaults: S.config.templateDefaults
|
|
27
|
+
}), T = ie({
|
|
28
|
+
editor: w,
|
|
27
29
|
config: {
|
|
28
|
-
uiTheme:
|
|
29
|
-
theme:
|
|
30
|
-
blockDefaults:
|
|
31
|
-
customBlocks:
|
|
32
|
-
mergeTags:
|
|
33
|
-
displayConditions:
|
|
34
|
-
onRequestMedia:
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
uiTheme: S.config.uiTheme,
|
|
31
|
+
theme: S.config.theme,
|
|
32
|
+
blockDefaults: S.config.blockDefaults,
|
|
33
|
+
customBlocks: S.config.customBlocks,
|
|
34
|
+
mergeTags: S.config.mergeTags,
|
|
35
|
+
displayConditions: S.config.displayConditions,
|
|
36
|
+
onRequestMedia: S.config.onRequestMedia,
|
|
37
|
+
editorType: S.config.editorType,
|
|
38
|
+
accessibility: me(S.config),
|
|
39
|
+
onSave: S.config.onSave ? () => S.config.onSave(JSON.parse(JSON.stringify(w.state.content))) : void 0
|
|
37
40
|
},
|
|
38
|
-
translations:
|
|
39
|
-
fontsManager:
|
|
40
|
-
autoSaveOptions:
|
|
41
|
+
translations: S.translations,
|
|
42
|
+
fontsManager: S.fontsManager,
|
|
43
|
+
autoSaveOptions: S.config.onChange ? { onChange: () => S.config.onChange(JSON.parse(JSON.stringify(w.state.content))) } : null
|
|
41
44
|
});
|
|
42
|
-
|
|
43
|
-
await
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
ee(async () => {
|
|
46
|
+
if (await S.fontsManager.loadCustomFonts(), C(S.config.editorType) === "popup" && !w.content.value.settings.popup) {
|
|
47
|
+
let e = ne();
|
|
48
|
+
w.updateSettings({
|
|
49
|
+
popup: e,
|
|
50
|
+
width: re[e.design.sizePreset]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}), r(() => {
|
|
54
|
+
S.fontsManager.cleanupFontLinks(), T.destroy();
|
|
55
|
+
});
|
|
56
|
+
let j = d("blocks");
|
|
57
|
+
a(oe, j);
|
|
58
|
+
let R = _(() => C(S.config.editorType) === "popup"), z = _(() => R.value && j.value === "displayRules"), B = _(() => R.value && j.value === "schedule"), V = _(() => j.value === "design"), H = _(() => R.value && (z.value || B.value || V.value)), U = _(() => {
|
|
59
|
+
if (w.state.previewMode) return ["tpl:left-0", "tpl:right-0"];
|
|
60
|
+
if (!R.value) return ["tpl:left-12", "tpl:right-[320px]"];
|
|
61
|
+
let e;
|
|
62
|
+
e = j.value === "blocks" ? "tpl:left-[272px]" : V.value ? "tpl:left-[392px]" : "tpl:left-[72px]";
|
|
63
|
+
let t = H.value ? "tpl:right-0" : "tpl:right-[320px]";
|
|
64
|
+
return [e, t];
|
|
65
|
+
}), W = _(() => z.value || B.value);
|
|
66
|
+
return o({
|
|
67
|
+
getContent: () => w.content.value,
|
|
68
|
+
setContent: (e) => w.setContent(e),
|
|
69
|
+
setTheme: (e) => w.setUiTheme(e),
|
|
70
|
+
renderCustomBlock: T.registry.renderCustomBlock,
|
|
71
|
+
startTour: (e) => v.value?.start(e),
|
|
72
|
+
dismissTour: () => v.value?.dismiss(),
|
|
73
|
+
resetTourDismissed: () => fe(S.config.tour),
|
|
74
|
+
isTourDismissed: () => S.config.tour ? se(S.config.tour) : !0
|
|
75
|
+
}), (r, a) => (i(), b("div", {
|
|
76
|
+
class: e(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": y(w).state.darkMode }]),
|
|
77
|
+
"data-tpl-theme": y(T).resolvedTheme.value,
|
|
78
|
+
style: h(y(T).themeStyles.value)
|
|
55
79
|
}, [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
viewport:
|
|
61
|
-
onChange:
|
|
80
|
+
m("header", N, [
|
|
81
|
+
a[5] ||= m("div", { class: "tpl:flex tpl:items-center tpl:gap-2.5" }, null, -1),
|
|
82
|
+
m("div", P, [
|
|
83
|
+
x(A, {
|
|
84
|
+
viewport: y(w).state.viewport,
|
|
85
|
+
onChange: y(w).setViewport
|
|
62
86
|
}, null, 8, ["viewport", "onChange"]),
|
|
63
|
-
|
|
64
|
-
"dark-mode":
|
|
65
|
-
onChange:
|
|
87
|
+
x(ce, {
|
|
88
|
+
"dark-mode": y(w).state.darkMode,
|
|
89
|
+
onChange: y(w).setDarkMode
|
|
66
90
|
}, null, 8, ["dark-mode", "onChange"]),
|
|
67
|
-
|
|
68
|
-
"preview-mode":
|
|
69
|
-
onChange:
|
|
91
|
+
x(pe, {
|
|
92
|
+
"preview-mode": y(w).state.previewMode,
|
|
93
|
+
onChange: y(w).setPreviewMode
|
|
70
94
|
}, null, 8, ["preview-mode", "onChange"])
|
|
71
95
|
]),
|
|
72
|
-
|
|
96
|
+
a[6] ||= m("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
|
|
73
97
|
]),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
class:
|
|
77
|
-
style: {
|
|
78
|
-
|
|
79
|
-
|
|
98
|
+
c(x(ue, null, null, 512), [[g, !y(w).state.previewMode]]),
|
|
99
|
+
m("div", {
|
|
100
|
+
class: e(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...U.value, "tpl:top-14"]]),
|
|
101
|
+
style: h({
|
|
102
|
+
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
103
|
+
backgroundColor: W.value ? "var(--tpl-bg)" : "var(--tpl-canvas-bg)"
|
|
104
|
+
})
|
|
105
|
+
}, [R.value && j.value === "displayRules" ? (i(), p(he, { key: 0 })) : R.value && j.value === "schedule" ? (i(), p(k, {
|
|
106
|
+
key: 1,
|
|
107
|
+
layout: "standalone"
|
|
108
|
+
})) : (i(), b(f, { key: 2 }, [m("div", F, [x(te, { name: "tpl-restore-btn" }, {
|
|
109
|
+
default: s(() => [y(T).conditionPreview.hasHiddenBlocks.value ? (i(), b("button", {
|
|
80
110
|
key: 0,
|
|
81
111
|
class: "tpl:absolute tpl:left-1/2 tpl:top-2 tpl:-translate-x-1/2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-full tpl:border tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:whitespace-nowrap tpl:shadow-md tpl:hover:opacity-80 tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)] tpl:border-[var(--tpl-warning)]",
|
|
82
112
|
style: { "backdrop-filter": "blur(8px)" },
|
|
83
|
-
onClick:
|
|
84
|
-
}, [
|
|
113
|
+
onClick: a[0] ||= (e) => y(T).conditionPreview.reset()
|
|
114
|
+
}, [x(y(de), {
|
|
85
115
|
size: 13,
|
|
86
116
|
"stroke-width": 2
|
|
87
|
-
}),
|
|
117
|
+
}), u(" " + n(y(T).t.blockSettings.restoreHiddenBlocks), 1)])) : l("", !0)]),
|
|
88
118
|
_: 1
|
|
89
|
-
})]),
|
|
90
|
-
viewport:
|
|
91
|
-
content:
|
|
92
|
-
"selected-block-id":
|
|
93
|
-
"dark-mode":
|
|
94
|
-
"preview-mode":
|
|
95
|
-
|
|
119
|
+
})]), m("div", I, [x(E, {
|
|
120
|
+
viewport: y(w).state.viewport,
|
|
121
|
+
content: y(w).content.value,
|
|
122
|
+
"selected-block-id": y(w).state.selectedBlockId,
|
|
123
|
+
"dark-mode": y(w).state.darkMode,
|
|
124
|
+
"preview-mode": y(w).state.previewMode,
|
|
125
|
+
"multi-page-canvas": t.config.multiPageCanvas ?? !1,
|
|
126
|
+
onSelectBlock: y(w).selectBlock
|
|
96
127
|
}, null, 8, [
|
|
97
128
|
"viewport",
|
|
98
129
|
"content",
|
|
99
130
|
"selected-block-id",
|
|
100
131
|
"dark-mode",
|
|
101
132
|
"preview-mode",
|
|
133
|
+
"multi-page-canvas",
|
|
102
134
|
"onSelectBlock"
|
|
103
|
-
])])],
|
|
104
|
-
|
|
135
|
+
])])], 64))], 6),
|
|
136
|
+
t.config.branding === !1 ? l("", !0) : (i(), p(O, {
|
|
105
137
|
key: 0,
|
|
106
|
-
"position-class":
|
|
138
|
+
"position-class": U.value
|
|
107
139
|
}, null, 8, ["position-class"])),
|
|
108
|
-
|
|
140
|
+
m("div", {
|
|
109
141
|
class: "tpl-sr-only",
|
|
110
142
|
role: "status",
|
|
111
143
|
"aria-live": "polite",
|
|
112
144
|
"aria-atomic": "true",
|
|
113
|
-
"aria-label":
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
"selected-block":
|
|
117
|
-
settings:
|
|
118
|
-
onUpdateBlock:
|
|
119
|
-
onDeleteBlock:
|
|
120
|
-
|
|
145
|
+
"aria-label": y(T).t.landmarks.reorderAnnouncements
|
|
146
|
+
}, n(y(T).keyboardReorder.announcement.value), 9, L),
|
|
147
|
+
c(x(le, {
|
|
148
|
+
"selected-block": y(w).selectedBlock.value,
|
|
149
|
+
settings: y(w).content.value.settings,
|
|
150
|
+
onUpdateBlock: a[1] ||= (e) => y(w).updateBlock(y(w).state.selectedBlockId, e),
|
|
151
|
+
onDeleteBlock: a[2] ||= () => {
|
|
152
|
+
y(w).state.selectedBlockId && y(T).blockActions.deleteBlock(y(w).state.selectedBlockId);
|
|
121
153
|
},
|
|
122
|
-
onDuplicateBlock:
|
|
123
|
-
|
|
154
|
+
onDuplicateBlock: a[3] ||= () => {
|
|
155
|
+
y(w).selectedBlock.value && y(T).blockActions.duplicateBlock(y(w).selectedBlock.value);
|
|
124
156
|
},
|
|
125
|
-
onUpdateSettings:
|
|
126
|
-
}, null, 8, ["selected-block", "settings"]), [[
|
|
127
|
-
|
|
157
|
+
onUpdateSettings: a[4] ||= (e) => y(w).updateSettings(e)
|
|
158
|
+
}, null, 8, ["selected-block", "settings"]), [[g, !y(w).state.previewMode && !H.value]]),
|
|
159
|
+
t.config.tour ? (i(), p(D, {
|
|
160
|
+
key: 1,
|
|
161
|
+
ref_key: "editorTourRef",
|
|
162
|
+
ref: v,
|
|
163
|
+
"tour-config": t.config.tour,
|
|
164
|
+
"dark-mode": y(w).state.darkMode
|
|
165
|
+
}, null, 8, ["tour-config", "dark-mode"])) : l("", !0)
|
|
166
|
+
], 14, M));
|
|
128
167
|
}
|
|
129
|
-
}), [["__scopeId", "data-v-
|
|
130
|
-
"./locales/de.ts": () => import("./de-
|
|
131
|
-
"./locales/en.ts": () => import("./en-
|
|
132
|
-
}),
|
|
133
|
-
"./locales/cloud/de.ts": () => import("./de-
|
|
134
|
-
"./locales/cloud/en.ts": () => import("./en-
|
|
168
|
+
}), [["__scopeId", "data-v-8467ac4c"]]), z = /* @__PURE__ */ Object.assign({
|
|
169
|
+
"./locales/de.ts": () => import("./de-DWcgp-7T.js"),
|
|
170
|
+
"./locales/en.ts": () => import("./en-Cxd4fhNm.js")
|
|
171
|
+
}), B = /* @__PURE__ */ Object.assign({
|
|
172
|
+
"./locales/cloud/de.ts": () => import("./de-GOtR9DwW.js"),
|
|
173
|
+
"./locales/cloud/en.ts": () => import("./en-dFFQVzNn.js")
|
|
135
174
|
});
|
|
136
|
-
function
|
|
175
|
+
function V(e) {
|
|
137
176
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
138
177
|
}
|
|
139
|
-
var
|
|
140
|
-
function
|
|
178
|
+
var H = V(z), U = V(B);
|
|
179
|
+
function W(e) {
|
|
141
180
|
return e.split("-")[0].toLowerCase();
|
|
142
181
|
}
|
|
143
|
-
function
|
|
144
|
-
let n =
|
|
182
|
+
function G(e, t) {
|
|
183
|
+
let n = W(e);
|
|
145
184
|
return t.includes(n) ? n : "en";
|
|
146
185
|
}
|
|
147
|
-
async function
|
|
148
|
-
let t =
|
|
186
|
+
async function K(e) {
|
|
187
|
+
let t = z[`./locales/${G(e, H)}.ts`];
|
|
149
188
|
return (await t()).default;
|
|
150
189
|
}
|
|
151
|
-
async function
|
|
152
|
-
let t =
|
|
190
|
+
async function ge(e) {
|
|
191
|
+
let t = B[`./locales/cloud/${G(e, U)}.ts`];
|
|
153
192
|
return (await t()).default;
|
|
154
193
|
}
|
|
155
194
|
//#endregion
|
|
156
195
|
//#region src/utils/toMjml.ts
|
|
157
|
-
async function
|
|
196
|
+
async function _e(e) {
|
|
158
197
|
let t;
|
|
159
198
|
try {
|
|
160
|
-
t = await import("@
|
|
199
|
+
t = await import("@aswin.dev/renderer");
|
|
161
200
|
} catch {
|
|
162
|
-
throw Error("[Templatical] toMjml() requires the @
|
|
201
|
+
throw Error("[Templatical] toMjml() requires the @aswin.dev/renderer package. Please install it.");
|
|
163
202
|
}
|
|
164
203
|
return t.renderToMjml(e.getContent(), { renderCustomBlock: e.renderCustomBlock });
|
|
165
204
|
}
|
|
166
205
|
//#endregion
|
|
167
206
|
//#region src/index.ts
|
|
168
|
-
var
|
|
169
|
-
async function
|
|
207
|
+
var q = null, J = d(null);
|
|
208
|
+
async function Y(e) {
|
|
170
209
|
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
171
210
|
if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
|
|
172
|
-
let n = await
|
|
173
|
-
|
|
174
|
-
return () =>
|
|
211
|
+
let n = await K(e.locale ?? "en"), r = w(e.fonts);
|
|
212
|
+
q && Q(), q = v({ setup() {
|
|
213
|
+
return () => o(R, {
|
|
175
214
|
config: e,
|
|
176
215
|
translations: n,
|
|
177
216
|
fontsManager: r,
|
|
178
|
-
ref:
|
|
217
|
+
ref: J
|
|
179
218
|
});
|
|
180
|
-
} }),
|
|
219
|
+
} }), q.mount(t);
|
|
181
220
|
let i = {
|
|
182
221
|
getContent() {
|
|
183
|
-
return
|
|
222
|
+
return J.value ? JSON.parse(JSON.stringify(J.value.getContent())) : JSON.parse(JSON.stringify(e.content));
|
|
184
223
|
},
|
|
185
224
|
setContent(t) {
|
|
186
|
-
|
|
225
|
+
J.value && J.value.setContent(t), e.content = t;
|
|
187
226
|
},
|
|
188
227
|
setTheme(e) {
|
|
189
|
-
|
|
228
|
+
J.value && J.value.setTheme(e);
|
|
190
229
|
},
|
|
191
230
|
unmount: Q,
|
|
231
|
+
startTour(e) {
|
|
232
|
+
J.value?.startTour?.(e);
|
|
233
|
+
},
|
|
234
|
+
dismissTour() {
|
|
235
|
+
J.value?.dismissTour?.();
|
|
236
|
+
},
|
|
237
|
+
resetTourDismissed() {
|
|
238
|
+
J.value?.resetTourDismissed?.();
|
|
239
|
+
},
|
|
240
|
+
isTourDismissed() {
|
|
241
|
+
return J.value?.isTourDismissed?.() ?? !0;
|
|
242
|
+
},
|
|
192
243
|
renderCustomBlock(e) {
|
|
193
|
-
return
|
|
244
|
+
return J.value ? J.value.renderCustomBlock(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
|
|
194
245
|
},
|
|
195
|
-
toMjml: () =>
|
|
246
|
+
toMjml: () => _e(i)
|
|
196
247
|
};
|
|
197
248
|
return i;
|
|
198
249
|
}
|
|
199
|
-
var X = null, Z =
|
|
200
|
-
async function
|
|
250
|
+
var X = null, Z = d(null);
|
|
251
|
+
async function ve(e) {
|
|
201
252
|
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
202
253
|
if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
|
|
203
|
-
let { default: n } = await import("./CloudEditor-
|
|
204
|
-
return X && $(), await new Promise((
|
|
205
|
-
let
|
|
206
|
-
|
|
207
|
-
},
|
|
208
|
-
X =
|
|
209
|
-
return () =>
|
|
254
|
+
let { default: n } = await import("./CloudEditor-CFldoCOb.js"), [r, i] = await Promise.all([K(e.locale ?? "en"), ge(e.locale ?? "en")]), a = w(e.fonts);
|
|
255
|
+
return X && $(), await new Promise((s, c) => {
|
|
256
|
+
let l = setTimeout(() => {
|
|
257
|
+
c(/* @__PURE__ */ Error("[Templatical] Cloud editor initialization timed out"));
|
|
258
|
+
}, S);
|
|
259
|
+
X = v({ setup() {
|
|
260
|
+
return () => o(n, {
|
|
210
261
|
config: e,
|
|
211
262
|
translations: r,
|
|
212
263
|
cloudTranslations: i,
|
|
213
264
|
fontsManager: a,
|
|
214
265
|
ref: Z,
|
|
215
266
|
onReady: () => {
|
|
216
|
-
clearTimeout(
|
|
267
|
+
clearTimeout(l), s();
|
|
217
268
|
}
|
|
218
269
|
});
|
|
219
270
|
} }), X.mount(t);
|
|
@@ -228,6 +279,18 @@ async function ae(e) {
|
|
|
228
279
|
Z.value && Z.value.setTheme(e);
|
|
229
280
|
},
|
|
230
281
|
unmount: $,
|
|
282
|
+
startTour(e) {
|
|
283
|
+
Z.value?.startTour?.(e);
|
|
284
|
+
},
|
|
285
|
+
dismissTour() {
|
|
286
|
+
Z.value?.dismissTour?.();
|
|
287
|
+
},
|
|
288
|
+
resetTourDismissed() {
|
|
289
|
+
Z.value?.resetTourDismissed?.();
|
|
290
|
+
},
|
|
291
|
+
isTourDismissed() {
|
|
292
|
+
return Z.value?.isTourDismissed?.() ?? !0;
|
|
293
|
+
},
|
|
231
294
|
create(e) {
|
|
232
295
|
return Z.value ? Z.value.create(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Cloud editor not ready"));
|
|
233
296
|
},
|
|
@@ -240,10 +303,10 @@ async function ae(e) {
|
|
|
240
303
|
};
|
|
241
304
|
}
|
|
242
305
|
function Q() {
|
|
243
|
-
|
|
306
|
+
q && (q.unmount(), q = null, J.value = null);
|
|
244
307
|
}
|
|
245
308
|
function $() {
|
|
246
309
|
X && (X.unmount(), X = null, Z.value = null);
|
|
247
310
|
}
|
|
248
311
|
//#endregion
|
|
249
|
-
export {
|
|
312
|
+
export { T as DEFAULT_EDITOR_TOUR_STORAGE_KEY, Y as init, ve as initCloud, Q as unmount, w as useFonts };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as n } from "./keys-
|
|
1
|
+
import { D as e, Y as t } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
+
import { l as n } from "./keys-CvX8D-8C.js";
|
|
3
3
|
//#region src/composables/useCloudI18n.ts
|
|
4
4
|
function r(e, t) {
|
|
5
5
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|