@templatical/editor 0.6.4 → 0.6.6
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/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-B2MT0M58.js} +34 -34
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-w5ek3Z76.js} +62 -62
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-ChlAWywJ.js} +20 -20
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-C0S6kPC4.js} +12 -12
- package/dist/{CloudEditor-nzrRhHIi.js → CloudEditor-DYYaScFe.js} +441 -441
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bo8vtPId.js} +20 -20
- package/dist/CommentsSidebar-BQROg36f.js +441 -0
- package/dist/{cdn/chunks/CountdownBlock-5YdT1uUu.js → CountdownBlock-Bxqe7zwL.js} +21 -22
- package/dist/CountdownToolbar-CpFAnjSo.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-CfqpcWX6.js} +52 -52
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-CFkDkjBb.js} +1 -1
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-CKhsaPnA.js} +79 -79
- package/dist/{ModulePreviewCanvas-CHdOwV_4.js → ModulePreviewCanvas-Cw9GeGus.js} +29 -29
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Dw8dN1Pt.js} +88 -88
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DjDiUzmv.js} +218 -218
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CK3Om7ES.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-CSUPmfRP.js} +34 -34
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DwX2fj6N.js} +33 -33
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-BIAeCAEP.js} +82 -82
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-CIlBvWWn.js} +30 -30
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-BCV5k6wj.js} +67 -67
- package/dist/{TplModal-BwSfxIHf.js → TplModal-C3Hq9b58.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BgUEA-Ai.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-iUurP50H.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-AQD2ygU6.js} +34 -34
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-AQD2ygU6.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-CDh9ifC8.js} +16 -16
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js.map → AiFeatureMenu-CDh9ifC8.js.map} +1 -1
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-BxZr3s7T.js} +10 -10
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-BxZr3s7T.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js → CloudEditor-Fg7pQ9IQ.js} +425 -425
- package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js.map → CloudEditor-Fg7pQ9IQ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-B5a8eBXN.js} +20 -20
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js.map → CollaboratorBar-B5a8eBXN.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-BeHkO19t.js +93 -0
- package/dist/cdn/chunks/{CountdownBlock-5YdT1uUu.js.map → CountdownBlock-BeHkO19t.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-8UfW0jb1.js +212 -0
- package/dist/cdn/chunks/{CountdownToolbar-DXPXrbAA.js.map → CountdownToolbar-8UfW0jb1.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js → ModuleBrowserModal-BMUyAmmj.js} +43 -43
- package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js.map → ModuleBrowserModal-BMUyAmmj.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js → ModulePreviewCanvas-CxSc7Pvd.js} +23 -23
- package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js.map → ModulePreviewCanvas-CxSc7Pvd.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-BSOUOUCL.js} +108 -108
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-BSOUOUCL.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-S1bpgxe5.js} +187 -187
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-S1bpgxe5.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-ByehRfEA.js} +33 -33
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-ByehRfEA.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-5CNMvgYL.js} +27 -27
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js.map → SaveModuleDialog-5CNMvgYL.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-BASWPsCM.js} +66 -66
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js.map → TitleEditor-BASWPsCM.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js → blockTypeIcons-DfOffaYP.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js.map → blockTypeIcons-DfOffaYP.js.map} +1 -1
- package/dist/cdn/chunks/draggable-CNhyCGIO.js +4804 -0
- package/dist/cdn/chunks/draggable-CNhyCGIO.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BJOV1jre.js} +95 -95
- package/dist/cdn/chunks/{extensions-DIxF31tA.js.map → extensions-BJOV1jre.js.map} +1 -1
- package/dist/cdn/chunks/{features-DEMb13KS.js → features-D6FoOm8v.js} +2272 -2269
- package/dist/cdn/chunks/features-D6FoOm8v.js.map +1 -0
- package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-CpsjWPU-.js} +2 -2
- package/dist/cdn/chunks/{icons-CsLTcirh.js.map → icons-CpsjWPU-.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-CEd7Lqxk.js} +1397 -1397
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js.map → media-library-CEd7Lqxk.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CDbNlZBE.js → pusher-bjpcqCZG.js} +2 -2
- package/dist/cdn/chunks/{pusher-CDbNlZBE.js.map → pusher-bjpcqCZG.js.map} +1 -1
- package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-Bx1oORXQ.js} +3 -3
- package/dist/cdn/chunks/{quality-BaBfc54_.js.map → quality-Bx1oORXQ.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-CwxCisa-.js} +3 -3
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js.map → renderer-CwxCisa-.js.map} +1 -1
- package/dist/{rolldown-runtime-BZGGJVDF.js → cdn/chunks/rolldown-runtime-C266TIVP.js} +5 -5
- package/dist/cdn/chunks/{src-CRaqN-p8.js → src-DDSInEkE.js} +171 -171
- package/dist/cdn/chunks/{src-CRaqN-p8.js.map → src-DDSInEkE.js.map} +1 -1
- package/dist/cdn/chunks/styles-B1uu-Cc9.js +2944 -0
- package/dist/cdn/chunks/styles-B1uu-Cc9.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-IyIsncxY.js} +45 -46
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-IyIsncxY.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +122 -122
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Da05j8yl.js → check-Bg5yrRmX.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-tee-ghFi.js} +1 -1
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-C0L9pUQ4.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-CDlEdqiP.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-a3VovHva.js} +145 -145
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-Di4mqmGn.js} +9 -9
- package/dist/{dist-B1IR0bpH.js → dist-BzRLLpfq.js} +107 -107
- package/dist/{dist-BFawx6IS.js → dist-Pk4MhWMP.js} +35 -35
- package/dist/{extensions-CUcl9Ok4.js → extensions-BF39Siqk.js} +103 -103
- package/dist/{image-up-MBZKKg9p.js → image-up-1D_3XDdO.js} +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/{info-CJEC7piy.js → info-DTGrc0Bx.js} +1 -1
- package/dist/{keys-ciNfSSGj.js → keys-Bqs_0du9.js} +1 -1
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-_9bP23op.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-gzy2ZGJ3.js} +1 -1
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-BNAhAmtL.js} +1 -1
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/{scan-line-D0vcUekt.js → scan-line-DUEg6DoT.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-BatIZC9a.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-C5Gv2cM1.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-D1IGi_cC.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-BgmKdc2x.js +3173 -0
- package/dist/templatical-editor.js +99 -99
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-DG3aAH7Y.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-424iqbpN.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DWQySIE2.js} +1 -1
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-CL_AwWwi.js} +4 -4
- package/dist/useEditorCore-CnXrv71D.js +3794 -0
- package/dist/{useI18n-lb2DHDiu.js → useI18n-CgmQftNf.js} +4 -4
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-vpwrZ9eQ.js} +3 -3
- package/dist/vue.runtime.esm-bundler-Bxqkjqhc.js +4300 -0
- package/dist/{x-u2oVmjN_.js → x-Dlaenqta.js} +1 -1
- package/package.json +8 -8
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/styles-DEXEkBvg.js +0 -3176
- package/dist/useEditorCore-C6ost42Q.js +0 -9342
- package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +0 -5775
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import { r as
|
|
3
|
-
import { L as
|
|
4
|
-
import { a as
|
|
1
|
+
import { A as e, B as t, O as n, S as r, X as i, _ as a, at as o, b as s, f as c, h as l, k as ee, m as u, n as d, o as f, ot as p, p as m, rt as h, st as g, t as te, v as _, z as ne } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
|
+
import { r as v } from "./timeouts-BSGxjuUF.js";
|
|
3
|
+
import { L as y, t as b, x } from "./useEditorCore-CnXrv71D.js";
|
|
4
|
+
import { a as S, c as C, i as w, l as T, n as E, o as re, r as D, s as O, t as k } from "./styles-BgmKdc2x.js";
|
|
5
5
|
import { t as A } from "./_plugin-vue_export-helper-B0hnzhyu.js";
|
|
6
6
|
//#region src/Editor.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var j = ["data-tpl-theme"], M = {
|
|
@@ -18,81 +18,81 @@ var j = ["data-tpl-theme"], M = {
|
|
|
18
18
|
translations: {},
|
|
19
19
|
fontsManager: {}
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
let
|
|
23
|
-
content:
|
|
24
|
-
templateDefaults:
|
|
25
|
-
}),
|
|
26
|
-
editor:
|
|
21
|
+
setup(r, { expose: i }) {
|
|
22
|
+
let s = r, d = y({
|
|
23
|
+
content: s.config.content,
|
|
24
|
+
templateDefaults: s.config.templateDefaults
|
|
25
|
+
}), v = b({
|
|
26
|
+
editor: d,
|
|
27
27
|
config: {
|
|
28
|
-
uiTheme:
|
|
29
|
-
theme:
|
|
30
|
-
blockDefaults:
|
|
31
|
-
customBlocks:
|
|
32
|
-
mergeTags:
|
|
33
|
-
displayConditions:
|
|
34
|
-
onRequestMedia:
|
|
35
|
-
accessibility:
|
|
36
|
-
onSave:
|
|
28
|
+
uiTheme: s.config.uiTheme,
|
|
29
|
+
theme: s.config.theme,
|
|
30
|
+
blockDefaults: s.config.blockDefaults,
|
|
31
|
+
customBlocks: s.config.customBlocks,
|
|
32
|
+
mergeTags: s.config.mergeTags,
|
|
33
|
+
displayConditions: s.config.displayConditions,
|
|
34
|
+
onRequestMedia: s.config.onRequestMedia,
|
|
35
|
+
accessibility: C(s.config),
|
|
36
|
+
onSave: s.config.onSave ? () => s.config.onSave(JSON.parse(JSON.stringify(d.state.content))) : void 0
|
|
37
37
|
},
|
|
38
|
-
translations:
|
|
39
|
-
fontsManager:
|
|
40
|
-
autoSaveOptions:
|
|
38
|
+
translations: s.translations,
|
|
39
|
+
fontsManager: s.fontsManager,
|
|
40
|
+
autoSaveOptions: s.config.onChange ? { onChange: () => s.config.onChange(JSON.parse(JSON.stringify(d.state.content))) } : null
|
|
41
41
|
});
|
|
42
|
-
return
|
|
43
|
-
await
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
}),
|
|
47
|
-
getContent: () =>
|
|
48
|
-
setContent: (e) =>
|
|
49
|
-
setTheme: (e) =>
|
|
50
|
-
renderCustomBlock:
|
|
51
|
-
}), (
|
|
52
|
-
class:
|
|
53
|
-
"data-tpl-theme":
|
|
54
|
-
style:
|
|
42
|
+
return n(async () => {
|
|
43
|
+
await s.fontsManager.loadCustomFonts();
|
|
44
|
+
}), ee(() => {
|
|
45
|
+
s.fontsManager.cleanupFontLinks(), v.destroy();
|
|
46
|
+
}), i({
|
|
47
|
+
getContent: () => d.content.value,
|
|
48
|
+
setContent: (e) => d.setContent(e),
|
|
49
|
+
setTheme: (e) => d.setUiTheme(e),
|
|
50
|
+
renderCustomBlock: v.registry.renderCustomBlock
|
|
51
|
+
}), (n, i) => (e(), l("div", {
|
|
52
|
+
class: o(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(d).state.darkMode }]),
|
|
53
|
+
"data-tpl-theme": h(v).resolvedTheme.value,
|
|
54
|
+
style: p(h(v).themeStyles.value)
|
|
55
55
|
}, [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
viewport:
|
|
61
|
-
onChange:
|
|
56
|
+
c("header", M, [
|
|
57
|
+
i[5] ||= c("div", { class: "tpl:flex tpl:items-center tpl:gap-2.5" }, null, -1),
|
|
58
|
+
c("div", N, [
|
|
59
|
+
_(w, {
|
|
60
|
+
viewport: h(d).state.viewport,
|
|
61
|
+
onChange: h(d).setViewport
|
|
62
62
|
}, null, 8, ["viewport", "onChange"]),
|
|
63
|
-
|
|
64
|
-
"dark-mode":
|
|
65
|
-
onChange:
|
|
63
|
+
_(E, {
|
|
64
|
+
"dark-mode": h(d).state.darkMode,
|
|
65
|
+
onChange: h(d).setDarkMode
|
|
66
66
|
}, null, 8, ["dark-mode", "onChange"]),
|
|
67
|
-
|
|
68
|
-
"preview-mode":
|
|
69
|
-
onChange:
|
|
67
|
+
_(D, {
|
|
68
|
+
"preview-mode": h(d).state.previewMode,
|
|
69
|
+
onChange: h(d).setPreviewMode
|
|
70
70
|
}, null, 8, ["preview-mode", "onChange"])
|
|
71
71
|
]),
|
|
72
|
-
|
|
72
|
+
i[6] ||= c("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
|
|
73
73
|
]),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
class:
|
|
74
|
+
t(_(re, null, null, 512), [[f, !h(d).state.previewMode]]),
|
|
75
|
+
c("div", {
|
|
76
|
+
class: o(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]", [h(d).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]", "tpl:top-14"]]),
|
|
77
77
|
style: { transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)" }
|
|
78
|
-
}, [
|
|
79
|
-
default:
|
|
78
|
+
}, [c("div", P, [_(te, { name: "tpl-restore-btn" }, {
|
|
79
|
+
default: ne(() => [h(v).conditionPreview.hasHiddenBlocks.value ? (e(), l("button", {
|
|
80
80
|
key: 0,
|
|
81
81
|
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
82
|
style: { "backdrop-filter": "blur(8px)" },
|
|
83
|
-
onClick:
|
|
84
|
-
}, [
|
|
83
|
+
onClick: i[0] ||= (e) => h(v).conditionPreview.reset()
|
|
84
|
+
}, [_(h(T), {
|
|
85
85
|
size: 13,
|
|
86
86
|
"stroke-width": 2
|
|
87
|
-
}),
|
|
87
|
+
}), a(" " + g(h(v).t.blockSettings.restoreHiddenBlocks), 1)])) : u("", !0)]),
|
|
88
88
|
_: 1
|
|
89
|
-
})]),
|
|
90
|
-
viewport:
|
|
91
|
-
content:
|
|
92
|
-
"selected-block-id":
|
|
93
|
-
"dark-mode":
|
|
94
|
-
"preview-mode":
|
|
95
|
-
onSelectBlock:
|
|
89
|
+
})]), c("div", F, [_(O, {
|
|
90
|
+
viewport: h(d).state.viewport,
|
|
91
|
+
content: h(d).content.value,
|
|
92
|
+
"selected-block-id": h(d).state.selectedBlockId,
|
|
93
|
+
"dark-mode": h(d).state.darkMode,
|
|
94
|
+
"preview-mode": h(d).state.previewMode,
|
|
95
|
+
onSelectBlock: h(d).selectBlock
|
|
96
96
|
}, null, 8, [
|
|
97
97
|
"viewport",
|
|
98
98
|
"content",
|
|
@@ -101,29 +101,29 @@ var j = ["data-tpl-theme"], M = {
|
|
|
101
101
|
"preview-mode",
|
|
102
102
|
"onSelectBlock"
|
|
103
103
|
])])], 2),
|
|
104
|
-
|
|
104
|
+
r.config.branding === !1 ? u("", !0) : (e(), m(k, {
|
|
105
105
|
key: 0,
|
|
106
|
-
"position-class": [
|
|
106
|
+
"position-class": [h(d).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]"]
|
|
107
107
|
}, null, 8, ["position-class"])),
|
|
108
|
-
|
|
108
|
+
c("div", {
|
|
109
109
|
class: "tpl-sr-only",
|
|
110
110
|
role: "status",
|
|
111
111
|
"aria-live": "polite",
|
|
112
112
|
"aria-atomic": "true",
|
|
113
|
-
"aria-label":
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
"selected-block":
|
|
117
|
-
settings:
|
|
118
|
-
onUpdateBlock:
|
|
119
|
-
onDeleteBlock:
|
|
120
|
-
|
|
113
|
+
"aria-label": h(v).t.landmarks.reorderAnnouncements
|
|
114
|
+
}, g(h(v).keyboardReorder.announcement.value), 9, I),
|
|
115
|
+
t(_(S, {
|
|
116
|
+
"selected-block": h(d).selectedBlock.value,
|
|
117
|
+
settings: h(d).content.value.settings,
|
|
118
|
+
onUpdateBlock: i[1] ||= (e) => h(d).updateBlock(h(d).state.selectedBlockId, e),
|
|
119
|
+
onDeleteBlock: i[2] ||= () => {
|
|
120
|
+
h(d).state.selectedBlockId && h(v).blockActions.deleteBlock(h(d).state.selectedBlockId);
|
|
121
121
|
},
|
|
122
|
-
onDuplicateBlock:
|
|
123
|
-
|
|
122
|
+
onDuplicateBlock: i[3] ||= () => {
|
|
123
|
+
h(d).selectedBlock.value && h(v).blockActions.duplicateBlock(h(d).selectedBlock.value);
|
|
124
124
|
},
|
|
125
|
-
onUpdateSettings:
|
|
126
|
-
}, null, 8, ["selected-block", "settings"]), [[
|
|
125
|
+
onUpdateSettings: i[4] ||= (e) => h(d).updateSettings(e)
|
|
126
|
+
}, null, 8, ["selected-block", "settings"]), [[f, !h(d).state.previewMode]])
|
|
127
127
|
], 14, j));
|
|
128
128
|
}
|
|
129
129
|
}), [["__scopeId", "data-v-9ffdcb5e"]]), R = /* @__PURE__ */ Object.assign({
|
|
@@ -165,20 +165,20 @@ async function q(e) {
|
|
|
165
165
|
}
|
|
166
166
|
//#endregion
|
|
167
167
|
//#region src/index.ts
|
|
168
|
-
var J = null, Y =
|
|
168
|
+
var J = null, Y = i(null);
|
|
169
169
|
async function ie(e) {
|
|
170
170
|
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
171
171
|
if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
|
|
172
|
-
let n = await G(e.locale ?? "en"),
|
|
173
|
-
J && Q(), J =
|
|
174
|
-
return () =>
|
|
172
|
+
let n = await G(e.locale ?? "en"), i = x(e.fonts);
|
|
173
|
+
J && Q(), J = d({ setup() {
|
|
174
|
+
return () => r(L, {
|
|
175
175
|
config: e,
|
|
176
176
|
translations: n,
|
|
177
|
-
fontsManager:
|
|
177
|
+
fontsManager: i,
|
|
178
178
|
ref: Y
|
|
179
179
|
});
|
|
180
180
|
} }), J.mount(t);
|
|
181
|
-
let
|
|
181
|
+
let a = {
|
|
182
182
|
getContent() {
|
|
183
183
|
return Y.value ? JSON.parse(JSON.stringify(Y.value.getContent())) : JSON.parse(JSON.stringify(e.content));
|
|
184
184
|
},
|
|
@@ -192,28 +192,28 @@ async function ie(e) {
|
|
|
192
192
|
renderCustomBlock(e) {
|
|
193
193
|
return Y.value ? Y.value.renderCustomBlock(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
|
|
194
194
|
},
|
|
195
|
-
toMjml: () => q(
|
|
195
|
+
toMjml: () => q(a)
|
|
196
196
|
};
|
|
197
|
-
return
|
|
197
|
+
return a;
|
|
198
198
|
}
|
|
199
|
-
var X = null, Z =
|
|
199
|
+
var X = null, Z = i(null);
|
|
200
200
|
async function ae(e) {
|
|
201
201
|
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
202
202
|
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 () =>
|
|
203
|
+
let { default: n } = await import("./CloudEditor-DYYaScFe.js"), [i, a] = await Promise.all([G(e.locale ?? "en"), K(e.locale ?? "en")]), o = x(e.fonts);
|
|
204
|
+
return X && $(), await new Promise((s, c) => {
|
|
205
|
+
let l = setTimeout(() => {
|
|
206
|
+
c(/* @__PURE__ */ Error("[Templatical] Cloud editor initialization timed out"));
|
|
207
|
+
}, v);
|
|
208
|
+
X = d({ setup() {
|
|
209
|
+
return () => r(n, {
|
|
210
210
|
config: e,
|
|
211
|
-
translations:
|
|
212
|
-
cloudTranslations:
|
|
213
|
-
fontsManager:
|
|
211
|
+
translations: i,
|
|
212
|
+
cloudTranslations: a,
|
|
213
|
+
fontsManager: o,
|
|
214
214
|
ref: Z,
|
|
215
215
|
onReady: () => {
|
|
216
|
-
clearTimeout(
|
|
216
|
+
clearTimeout(l), s();
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
219
|
} }), X.mount(t);
|
|
@@ -246,4 +246,4 @@ function $() {
|
|
|
246
246
|
X && (X.unmount(), X = null, Z.value = null);
|
|
247
247
|
}
|
|
248
248
|
//#endregion
|
|
249
|
-
export { ie as init, ae as initCloud, Q as unmount,
|
|
249
|
+
export { ie as init, ae as initCloud, Q as unmount, x as useFonts };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as n } from "./keys-
|
|
1
|
+
import { G as e, w as t } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
|
+
import { l as n } from "./keys-Bqs_0du9.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}}`);
|
|
6
6
|
}
|
|
7
7
|
function i(i) {
|
|
8
|
-
let a = i ??
|
|
8
|
+
let a = i ?? t(n, null);
|
|
9
9
|
return {
|
|
10
|
-
t: a ?
|
|
10
|
+
t: a ? e(a) ? a.value : a : null,
|
|
11
11
|
format: r
|
|
12
12
|
};
|
|
13
13
|
}
|