@templatical/editor 0.0.6 → 0.1.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/LICENSE +56 -0
- package/README.md +69 -0
- package/dist/{AiChatSidebar-CNhSl_ty.js → AiChatSidebar-DgAjDWO1.js} +68 -68
- package/dist/{AiFeatureMenu-BFVsjUJY.js → AiFeatureMenu-j6oaiRVi.js} +25 -25
- package/dist/{CloudEditor-Bz5Xkxej.js → CloudEditor-yCOkIkZ-.js} +428 -437
- package/dist/{CollaboratorBar-D2Gu5Xj2.js → CollaboratorBar-CWVdp2Y6.js} +23 -23
- package/dist/CommentsSidebar-CSPHhbQH.js +439 -0
- package/dist/CountdownBlock-DK6P_RaQ.js +92 -0
- package/dist/CountdownToolbar-Dv-Sz4ui.js +210 -0
- package/dist/{DesignReferenceSidebar-u2tKSQK0.js → DesignReferenceSidebar-D7zfvux6.js} +58 -58
- package/dist/LoadingTrack-Cdz2SSq9.js +10 -0
- package/dist/ModuleBrowserModal-BLYuCZht.js +205 -0
- package/dist/ModulePreviewCanvas-CHYqP6K3.js +106 -0
- package/dist/NumberWithSuffix-D-5-AZc3.js +424 -0
- package/dist/{ParagraphEditor-CYrzYJO5.js → ParagraphEditor-DivLBNWv.js} +237 -236
- package/dist/{RichTextEditorContent-BeqlWlWB.js → RichTextEditorContent-G1lXgVJR.js} +42 -42
- package/dist/{SaveModuleDialog-Kde6X13X.js → SaveModuleDialog-DGVfiOmE.js} +29 -29
- package/dist/{SnapshotHistory-B3EfIcLW.js → SnapshotHistory-DM__MqSu.js} +38 -38
- package/dist/{TemplateScoringPanel-D2vCRGgx.js → TemplateScoringPanel-CW13Tlol.js} +80 -80
- package/dist/{TestEmailModal-Egk0DFDf.js → TestEmailModal-B8bYqWCY.js} +28 -28
- package/dist/TitleEditor-4Jrp3C4m.js +167 -0
- package/dist/{TplModal-BCruYWks.js → TplModal-BkoIz0oz.js} +14 -14
- package/dist/{_plugin-vue_export-helper-5TQrnOhO.js → _plugin-vue_export-helper-OO6pH1Dh.js} +11 -11
- package/dist/{blockTypeIcons-rW4BUUNC.js → blockTypeIcons-4AS3CvXn.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-Dcbshcfu.js → AiFeatureMenu-BcHyzTQy.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-Dcbshcfu.js.map → AiFeatureMenu-BcHyzTQy.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Bca3RyBW.js → CloudEditor-TaEZq-YW.js} +179 -188
- package/dist/cdn/chunks/CloudEditor-TaEZq-YW.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-sToKJfHi.js → CollaboratorBar-DbC5-3If.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-sToKJfHi.js.map → CollaboratorBar-DbC5-3If.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-CfPmCQ7j.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-CfPmCQ7j.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-CB0EVxwN.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-CB0EVxwN.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-BNhwXbWw.js → ModuleBrowserModal-Df2fp9dj.js} +7 -7
- package/dist/cdn/chunks/{ModuleBrowserModal-BNhwXbWw.js.map → ModuleBrowserModal-Df2fp9dj.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DylUylPU.js → ModulePreviewCanvas-Dw1OCpvV.js} +19 -19
- package/dist/cdn/chunks/{ModulePreviewCanvas-DylUylPU.js.map → ModulePreviewCanvas-Dw1OCpvV.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-BU6ycXyG.js +425 -0
- package/dist/cdn/chunks/NumberWithSuffix-BU6ycXyG.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-BBw90y_p.js → ParagraphEditor-BMRNg_BX.js} +37 -37
- package/dist/cdn/chunks/{ParagraphEditor-BBw90y_p.js.map → ParagraphEditor-BMRNg_BX.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DvyIO3nR.js → RichTextEditorContent-BKYY1YMZ.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-DvyIO3nR.js.map → RichTextEditorContent-BKYY1YMZ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DvbSHvhF.js → SaveModuleDialog-D977Tg7t.js} +5 -5
- package/dist/cdn/chunks/{SaveModuleDialog-DvbSHvhF.js.map → SaveModuleDialog-D977Tg7t.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-tS3mgoVr.js → TitleEditor-q9IzNy38.js} +11 -11
- package/dist/cdn/chunks/{TitleEditor-tS3mgoVr.js.map → TitleEditor-q9IzNy38.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-DbnbyEQE.js → blockTypeIcons-L0fRc3qs.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-DbnbyEQE.js.map → blockTypeIcons-L0fRc3qs.js.map} +1 -1
- package/dist/cdn/chunks/{de-CgUR_S5I.js → de-3exf7MYE.js} +1 -1
- package/dist/cdn/chunks/{de-CgUR_S5I.js.map → de-3exf7MYE.js.map} +1 -1
- package/dist/cdn/chunks/{de-D8oDPhBD.js → de-C8LxVUsb.js} +1 -1
- package/dist/cdn/chunks/{de-D8oDPhBD.js.map → de-C8LxVUsb.js.map} +1 -1
- package/dist/cdn/chunks/{dist-BUmN5e4r.js → dist-D5g00M8N.js} +6 -2
- package/dist/cdn/chunks/dist-D5g00M8N.js.map +1 -0
- package/dist/cdn/chunks/{draggable-m78lz0gI.js → draggable-Bcb86AsV.js} +5 -5
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
- package/dist/cdn/chunks/{emojiData-CNNgvDqx.js → emojiData-DUHzsh4j.js} +1 -1
- package/dist/cdn/chunks/{emojiData-CNNgvDqx.js.map → emojiData-DUHzsh4j.js.map} +1 -1
- package/dist/cdn/chunks/{en-HseRPPeK.js → en-BoEycuqw.js} +1 -1
- package/dist/cdn/chunks/{en-HseRPPeK.js.map → en-BoEycuqw.js.map} +1 -1
- package/dist/cdn/chunks/{en-BBmfBDqY.js → en-KNPUKxYp.js} +1 -1
- package/dist/cdn/chunks/{en-BBmfBDqY.js.map → en-KNPUKxYp.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-ClpY3m0W.js → extensions-BZ1POyiv.js} +11 -11
- package/dist/cdn/chunks/{extensions-ClpY3m0W.js.map → extensions-BZ1POyiv.js.map} +1 -1
- package/dist/cdn/chunks/{features-B5dGxWLi.js → features-Ccqmm6-M.js} +549 -627
- package/dist/cdn/chunks/features-Ccqmm6-M.js.map +1 -0
- package/dist/cdn/chunks/{icons-hflTyPmb.js → icons-x53__2GC.js} +8 -8
- package/dist/cdn/chunks/icons-x53__2GC.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BxyRVCKv.js → liquid.browser-CEMn-ZqL.js} +2 -2
- package/dist/cdn/chunks/liquid.browser-CEMn-ZqL.js.map +1 -0
- package/dist/cdn/chunks/{media-library-Dgy-V-JA.js → media-library-DUoQk-w7.js} +97 -97
- package/dist/cdn/chunks/media-library-DUoQk-w7.js.map +1 -0
- package/dist/cdn/chunks/{pusher-D-m2WSdL.js → pusher-DwSQn6BA.js} +2 -2
- package/dist/cdn/chunks/pusher-DwSQn6BA.js.map +1 -0
- package/dist/cdn/chunks/{src-TDwMmqm0.js → src-DskCIAr8.js} +8 -8
- package/dist/cdn/chunks/{src-TDwMmqm0.js.map → src-DskCIAr8.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js → styleConstants-DP1VOca8.js} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js.map → styleConstants-DP1VOca8.js.map} +1 -1
- package/dist/cdn/chunks/{styles-hCOCOR6K.js → styles-BIlpNe52.js} +622 -1238
- package/dist/cdn/chunks/styles-BIlpNe52.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C28NLMX8.js → tiptap-hPC_BgDO.js} +850 -826
- package/dist/cdn/chunks/tiptap-hPC_BgDO.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +92 -97
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B5S-C0bz.js → check-Bff5NzCh.js} +1 -1
- package/dist/{chevron-down-CjsV1T0W.js → chevron-down-Bbv4SJwx.js} +1 -1
- package/dist/{circle-alert-CVTmJHKW.js → circle-alert-Dpr8MgkR.js} +1 -1
- package/dist/{clock-CAjdSHBy.js → clock-raVPKfl4.js} +1 -1
- package/dist/{dist-DJrDTuRr.js → dist-BHgEdO-M.js} +1001 -983
- package/dist/dist-BibwE8Y0.js +5 -0
- package/dist/{dist-DPM-DFvh.js → dist-BnlZ_HwX.js} +340 -340
- package/dist/{dist-BTtKPcd2.js → dist-C9yhcxsf.js} +2 -2
- package/dist/{dist-COguaIvm.js → dist-CGffNO8z.js} +2 -2
- package/dist/dist-CfGpCUSx.js +5 -0
- package/dist/{dist-COOFiBFV.js → dist-Chd-H2S3.js} +5 -5
- package/dist/{dist-DfqLGwSF.js → dist-Cq0OFLMj.js} +2 -2
- package/dist/{dist-B4LTlrAn.js → dist-D42og5Sc.js} +191 -185
- package/dist/{dist-CBr-qhie.js → dist-Owxo48fF.js} +2 -2
- package/dist/{dist-Crqkuf-w.js → dist-UZ8UzVZ-.js} +15 -15
- package/dist/dist-n0PkFNGl.js +314 -0
- package/dist/{dist-DHYuVJ_7.js → dist-skgH9dyo.js} +2 -2
- package/dist/{extensions-C6xp_B7K.js → extensions-DQKaICBH.js} +81 -81
- package/dist/{image-up-vZa1Txr-.js → image-up-B1AEiHCh.js} +1 -1
- package/dist/index.d.ts +17 -6
- package/dist/{keys-C0MQRs8d.js → keys-CIw9mUI2.js} +1 -1
- package/dist/{liquid.browser-C02owkex.js → liquid.browser-Bm53dnK1.js} +1 -1
- package/dist/{loader-circle-DilFjHSk.js → loader-circle-BYeKJ3to.js} +1 -1
- package/dist/{message-circle-Dpcnc2oa.js → message-circle-PhNlI7e7.js} +1 -1
- package/dist/{refresh-cw-4r7rkHHX.js → refresh-cw-DhDYRBDd.js} +1 -1
- package/dist/{rolldown-runtime-gEudmnaM.js → rolldown-runtime-BZGGJVDF.js} +2 -5
- package/dist/{scan-line-684IxPQ0.js → scan-line-Bw8bauvt.js} +1 -1
- package/dist/{send-ChDw64yL.js → send-CJPSzbLO.js} +1 -1
- package/dist/{shield-check-9dhLdyST.js → shield-check-DdEvVYMH.js} +1 -1
- package/dist/{sparkles-Co9fkDcv.js → sparkles-DT_27AYs.js} +1 -1
- package/dist/style.css +2 -0
- package/dist/{styleConstants-RV3eYwkD.js → styleConstants-Dqz9z3aa.js} +6 -45
- package/dist/styles-tcwlvlEB.js +2942 -0
- package/dist/templatical-editor.js +114 -119
- package/dist/text-align-start-4Hx15GUf.js +43 -0
- package/dist/{trash-2-CZkMtjeC.js → trash-2-BY-xp5hg.js} +1 -1
- package/dist/{triangle-alert-Dvt51agD.js → triangle-alert-DG72vdb2.js} +1 -1
- package/dist/useEditorCore-DMH2QpUL.js +8946 -0
- package/dist/{useI18n-D6m7ZUgY.js → useI18n-B8CN2iWs.js} +4 -4
- package/dist/{useMergeTag-CSXcnFBc.js → useMergeTag-Dz_Dx2Jz.js} +3 -3
- package/dist/vue.runtime.esm-bundler-DryoQb-v.js +5775 -0
- package/dist/{x-CU2XZOkQ.js → x-D-7GkO6Z.js} +1 -1
- package/package.json +31 -15
- package/dist/CommentsSidebar-CTeEAZTj.js +0 -439
- package/dist/LoadingTrack--aUassFH.js +0 -10
- package/dist/ModuleBrowserModal-DNxODPlX.js +0 -205
- package/dist/ModulePreviewCanvas-DnGe1Y-2.js +0 -106
- package/dist/TitleEditor-DwUpo4gF.js +0 -167
- package/dist/cdn/chunks/CloudEditor-Bca3RyBW.js.map +0 -1
- package/dist/cdn/chunks/dist-BUmN5e4r.js.map +0 -1
- package/dist/cdn/chunks/draggable-m78lz0gI.js.map +0 -1
- package/dist/cdn/chunks/features-B5dGxWLi.js.map +0 -1
- package/dist/cdn/chunks/icons-hflTyPmb.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-BxyRVCKv.js.map +0 -1
- package/dist/cdn/chunks/media-library-Dgy-V-JA.js.map +0 -1
- package/dist/cdn/chunks/pusher-D-m2WSdL.js.map +0 -1
- package/dist/cdn/chunks/styles-hCOCOR6K.js.map +0 -1
- package/dist/cdn/chunks/tiptap-C28NLMX8.js.map +0 -1
- package/dist/dist-Ac4o1O4a.js +0 -314
- package/dist/dist-DEJZ9iAU.js +0 -5
- package/dist/dist-DmVOCJjI.js +0 -5
- package/dist/styles-nvxFh6L6.js +0 -3557
- package/dist/templatical-editor.css +0 -2
- package/dist/templatical-editor.umd.cjs +0 -178
- package/dist/useEditorCore-ColJh1ST.js +0 -5695
- /package/dist/cdn/chunks/{_rolldown_dynamic_import_helper-DMEI4TQ3.js → _rolldown_dynamic_import_helper-BRcA6nWq.js} +0 -0
- /package/dist/{de-Dh8ON-dm.js → de-CN0xu_Tp.js} +0 -0
- /package/dist/{emojiData-Qc8mH_zW.js → emojiData-CwKEDxVf.js} +0 -0
- /package/dist/{en-C7IShRSD.js → en-DXvHkaUF.js} +0 -0
- /package/dist/{formatRelativeTime-D8f6NR7i.js → formatRelativeTime-BSpx5DHC.js} +0 -0
- /package/dist/{readableTextColor-B809bF5J.js → readableTextColor-CYCxm1jQ.js} +0 -0
- /package/dist/{timeouts-CmBrLeZA.js → timeouts-BSGxjuUF.js} +0 -0
|
@@ -1,105 +1,97 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useEditor as
|
|
1
|
+
import { A as e, Ct as t, H as n, M as r, Ot as i, S as a, V as o, Y as s, _ as c, b as l, c as u, g as d, h as f, j as p, m, n as h, t as g, tt as _, w as v, wt as y, y as b } from "./vue.runtime.esm-bundler-DryoQb-v.js";
|
|
2
|
+
import { r as x } from "./timeouts-BSGxjuUF.js";
|
|
3
|
+
import { t as S, x as C } from "./useEditorCore-DMH2QpUL.js";
|
|
4
|
+
import { t as w } from "./_plugin-vue_export-helper-OO6pH1Dh.js";
|
|
5
|
+
import { a as T, c as E, i as D, n as O, o as k, r as A, s as j, t as M } from "./styles-tcwlvlEB.js";
|
|
6
|
+
import { useEditor as N } from "@templatical/core";
|
|
7
7
|
//#region src/Editor.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var P = ["data-tpl-theme"], F = {
|
|
9
9
|
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)]",
|
|
10
10
|
style: {
|
|
11
11
|
"background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
|
|
12
12
|
"backdrop-filter": "blur(12px)",
|
|
13
13
|
"-webkit-backdrop-filter": "blur(12px)"
|
|
14
14
|
}
|
|
15
|
-
},
|
|
16
|
-
class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]",
|
|
17
|
-
style: { "letter-spacing": "-0.01em" }
|
|
18
|
-
}, I = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, L = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, R = { class: "tpl:flex tpl:justify-center tpl:p-8" }, z = ["aria-label"], B = /* @__PURE__ */ r(/* @__PURE__ */ y({
|
|
15
|
+
}, I = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, L = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, R = { class: "tpl:flex tpl:justify-center tpl:p-8" }, z = ["aria-label"], B = /* @__PURE__ */ w(/* @__PURE__ */ a({
|
|
19
16
|
__name: "Editor",
|
|
20
17
|
props: {
|
|
21
18
|
config: {},
|
|
22
19
|
translations: {},
|
|
23
20
|
fontsManager: {}
|
|
24
21
|
},
|
|
25
|
-
setup(
|
|
26
|
-
let
|
|
27
|
-
content:
|
|
28
|
-
templateDefaults:
|
|
29
|
-
}),
|
|
30
|
-
editor:
|
|
22
|
+
setup(a, { expose: s }) {
|
|
23
|
+
let h = a, v = N({
|
|
24
|
+
content: h.config.content,
|
|
25
|
+
templateDefaults: h.config.templateDefaults
|
|
26
|
+
}), x = S({
|
|
27
|
+
editor: v,
|
|
31
28
|
config: {
|
|
32
|
-
uiTheme:
|
|
33
|
-
theme:
|
|
34
|
-
blockDefaults:
|
|
35
|
-
customBlocks:
|
|
36
|
-
mergeTags:
|
|
37
|
-
displayConditions:
|
|
38
|
-
onRequestMedia:
|
|
39
|
-
onSave:
|
|
29
|
+
uiTheme: h.config.uiTheme,
|
|
30
|
+
theme: h.config.theme,
|
|
31
|
+
blockDefaults: h.config.blockDefaults,
|
|
32
|
+
customBlocks: h.config.customBlocks,
|
|
33
|
+
mergeTags: h.config.mergeTags,
|
|
34
|
+
displayConditions: h.config.displayConditions,
|
|
35
|
+
onRequestMedia: h.config.onRequestMedia,
|
|
36
|
+
onSave: h.config.onSave ? () => h.config.onSave(JSON.parse(JSON.stringify(v.state.content))) : void 0
|
|
40
37
|
},
|
|
41
|
-
translations:
|
|
42
|
-
fontsManager:
|
|
43
|
-
autoSaveOptions:
|
|
38
|
+
translations: h.translations,
|
|
39
|
+
fontsManager: h.fontsManager,
|
|
40
|
+
autoSaveOptions: h.config.onChange ? { onChange: () => h.config.onChange(JSON.parse(JSON.stringify(v.state.content))) } : null
|
|
44
41
|
});
|
|
45
|
-
return
|
|
46
|
-
await
|
|
47
|
-
}),
|
|
48
|
-
|
|
49
|
-
}),
|
|
50
|
-
getContent: () =>
|
|
51
|
-
setContent: (e) =>
|
|
52
|
-
setTheme: (e) =>
|
|
53
|
-
}), (e,
|
|
54
|
-
class:
|
|
55
|
-
"data-tpl-theme":
|
|
56
|
-
style:
|
|
42
|
+
return e(async () => {
|
|
43
|
+
await h.fontsManager.loadCustomFonts();
|
|
44
|
+
}), p(() => {
|
|
45
|
+
h.fontsManager.cleanupFontLinks(), x.destroy();
|
|
46
|
+
}), s({
|
|
47
|
+
getContent: () => v.content.value,
|
|
48
|
+
setContent: (e) => v.setContent(e),
|
|
49
|
+
setTheme: (e) => v.setUiTheme(e)
|
|
50
|
+
}), (e, s) => (r(), c("div", {
|
|
51
|
+
class: t(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": _(v).state.darkMode }]),
|
|
52
|
+
"data-tpl-theme": _(x).resolvedTheme.value,
|
|
53
|
+
style: y(_(x).themeStyles.value)
|
|
57
54
|
}, [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}, null, -1), g("span", F, D(O(y).t.header.title), 1)]),
|
|
65
|
-
g("div", I, [
|
|
66
|
-
v(o, {
|
|
67
|
-
viewport: O(p).state.viewport,
|
|
68
|
-
onChange: O(p).setViewport
|
|
55
|
+
m("header", F, [
|
|
56
|
+
s[5] ||= m("div", { class: "tpl:flex tpl:items-center tpl:gap-2.5" }, null, -1),
|
|
57
|
+
m("div", I, [
|
|
58
|
+
l(D, {
|
|
59
|
+
viewport: _(v).state.viewport,
|
|
60
|
+
onChange: _(v).setViewport
|
|
69
61
|
}, null, 8, ["viewport", "onChange"]),
|
|
70
|
-
|
|
71
|
-
"dark-mode":
|
|
72
|
-
onChange:
|
|
62
|
+
l(O, {
|
|
63
|
+
"dark-mode": _(v).state.darkMode,
|
|
64
|
+
onChange: _(v).setDarkMode
|
|
73
65
|
}, null, 8, ["dark-mode", "onChange"]),
|
|
74
|
-
|
|
75
|
-
"preview-mode":
|
|
76
|
-
onChange:
|
|
66
|
+
l(A, {
|
|
67
|
+
"preview-mode": _(v).state.previewMode,
|
|
68
|
+
onChange: _(v).setPreviewMode
|
|
77
69
|
}, null, 8, ["preview-mode", "onChange"])
|
|
78
70
|
]),
|
|
79
|
-
|
|
71
|
+
s[6] ||= m("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
|
|
80
72
|
]),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
class:
|
|
73
|
+
n(l(k, null, null, 512), [[u, !_(v).state.previewMode]]),
|
|
74
|
+
m("div", {
|
|
75
|
+
class: t(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]", [_(v).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]", "tpl:top-14"]]),
|
|
84
76
|
style: { transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)" }
|
|
85
|
-
}, [
|
|
86
|
-
default:
|
|
77
|
+
}, [m("div", L, [l(g, { name: "tpl-restore-btn" }, {
|
|
78
|
+
default: o(() => [_(x).conditionPreview.hasHiddenBlocks.value ? (r(), c("button", {
|
|
87
79
|
key: 0,
|
|
88
80
|
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)]",
|
|
89
81
|
style: { "backdrop-filter": "blur(8px)" },
|
|
90
|
-
onClick:
|
|
91
|
-
}, [
|
|
82
|
+
onClick: s[0] ||= (e) => _(x).conditionPreview.reset()
|
|
83
|
+
}, [l(_(E), {
|
|
92
84
|
size: 13,
|
|
93
85
|
"stroke-width": 2
|
|
94
|
-
}),
|
|
86
|
+
}), b(" " + i(_(x).t.blockSettings.restoreHiddenBlocks), 1)])) : d("", !0)]),
|
|
95
87
|
_: 1
|
|
96
|
-
})]),
|
|
97
|
-
viewport:
|
|
98
|
-
content:
|
|
99
|
-
"selected-block-id":
|
|
100
|
-
"dark-mode":
|
|
101
|
-
"preview-mode":
|
|
102
|
-
onSelectBlock:
|
|
88
|
+
})]), m("div", R, [l(j, {
|
|
89
|
+
viewport: _(v).state.viewport,
|
|
90
|
+
content: _(v).content.value,
|
|
91
|
+
"selected-block-id": _(v).state.selectedBlockId,
|
|
92
|
+
"dark-mode": _(v).state.darkMode,
|
|
93
|
+
"preview-mode": _(v).state.previewMode,
|
|
94
|
+
onSelectBlock: _(v).selectBlock
|
|
103
95
|
}, null, 8, [
|
|
104
96
|
"viewport",
|
|
105
97
|
"content",
|
|
@@ -108,29 +100,32 @@ var M = ["data-tpl-theme"], N = {
|
|
|
108
100
|
"preview-mode",
|
|
109
101
|
"onSelectBlock"
|
|
110
102
|
])])], 2),
|
|
111
|
-
|
|
112
|
-
|
|
103
|
+
a.config.branding === !1 ? d("", !0) : (r(), f(M, {
|
|
104
|
+
key: 0,
|
|
105
|
+
"position-class": [_(v).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]"]
|
|
106
|
+
}, null, 8, ["position-class"])),
|
|
107
|
+
m("div", {
|
|
113
108
|
class: "tpl-sr-only",
|
|
114
109
|
role: "status",
|
|
115
110
|
"aria-live": "polite",
|
|
116
111
|
"aria-atomic": "true",
|
|
117
|
-
"aria-label":
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
"selected-block":
|
|
121
|
-
settings:
|
|
122
|
-
onUpdateBlock:
|
|
123
|
-
onDeleteBlock:
|
|
124
|
-
|
|
112
|
+
"aria-label": _(x).t.landmarks.reorderAnnouncements
|
|
113
|
+
}, i(_(x).keyboardReorder.announcement.value), 9, z),
|
|
114
|
+
n(l(T, {
|
|
115
|
+
"selected-block": _(v).selectedBlock.value,
|
|
116
|
+
settings: _(v).content.value.settings,
|
|
117
|
+
onUpdateBlock: s[1] ||= (e) => _(v).updateBlock(_(v).state.selectedBlockId, e),
|
|
118
|
+
onDeleteBlock: s[2] ||= () => {
|
|
119
|
+
_(v).state.selectedBlockId && _(x).blockActions.deleteBlock(_(v).state.selectedBlockId);
|
|
125
120
|
},
|
|
126
|
-
onDuplicateBlock:
|
|
127
|
-
|
|
121
|
+
onDuplicateBlock: s[3] ||= () => {
|
|
122
|
+
_(v).selectedBlock.value && _(x).blockActions.duplicateBlock(_(v).selectedBlock.value);
|
|
128
123
|
},
|
|
129
|
-
onUpdateSettings:
|
|
130
|
-
}, null, 8, ["selected-block", "settings"]), [[
|
|
131
|
-
], 14,
|
|
124
|
+
onUpdateSettings: s[4] ||= (e) => _(v).updateSettings(e)
|
|
125
|
+
}, null, 8, ["selected-block", "settings"]), [[u, !_(v).state.previewMode]])
|
|
126
|
+
], 14, P));
|
|
132
127
|
}
|
|
133
|
-
}), [["__scopeId", "data-v-
|
|
128
|
+
}), [["__scopeId", "data-v-24f3e229"]]), V = (e, t, n) => {
|
|
134
129
|
let r = t.lastIndexOf("?"), i = e[r === -1 || r < t.lastIndexOf("/") ? t : t.slice(0, r)];
|
|
135
130
|
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((e, r) => {
|
|
136
131
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + t + (t.split("/").length === n ? "" : ". Note that variables only represent file names one level deep."))));
|
|
@@ -142,27 +137,27 @@ function U(e) {
|
|
|
142
137
|
async function W(e) {
|
|
143
138
|
let t = U(e), n = H.includes(t) ? t : "en";
|
|
144
139
|
return (await V(/* @__PURE__ */ Object.assign({
|
|
145
|
-
"./locales/de.ts": () => import("./de-
|
|
146
|
-
"./locales/en.ts": () => import("./en-
|
|
140
|
+
"./locales/de.ts": () => import("./de-CN0xu_Tp.js"),
|
|
141
|
+
"./locales/en.ts": () => import("./en-DXvHkaUF.js")
|
|
147
142
|
}), `./locales/${n}.ts`, 3)).default;
|
|
148
143
|
}
|
|
149
144
|
//#endregion
|
|
150
145
|
//#region src/index.ts
|
|
151
|
-
var G = null, K =
|
|
146
|
+
var G = null, K = s(null);
|
|
152
147
|
async function q(e) {
|
|
153
148
|
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
154
149
|
if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
|
|
155
150
|
G && Z();
|
|
156
|
-
let
|
|
157
|
-
G =
|
|
158
|
-
return () =>
|
|
151
|
+
let n = await W(e.locale ?? "en"), r = C(e.fonts);
|
|
152
|
+
G = h({ setup() {
|
|
153
|
+
return () => v(B, {
|
|
159
154
|
config: e,
|
|
160
|
-
translations:
|
|
161
|
-
fontsManager:
|
|
155
|
+
translations: n,
|
|
156
|
+
fontsManager: r,
|
|
162
157
|
ref: K
|
|
163
158
|
});
|
|
164
159
|
} }), G.mount(t);
|
|
165
|
-
let
|
|
160
|
+
let i = {
|
|
166
161
|
getContent() {
|
|
167
162
|
return K.value ? JSON.parse(JSON.stringify(K.value.getContent())) : JSON.parse(JSON.stringify(e.content));
|
|
168
163
|
},
|
|
@@ -174,33 +169,33 @@ async function q(e) {
|
|
|
174
169
|
},
|
|
175
170
|
unmount: Z
|
|
176
171
|
};
|
|
177
|
-
return $(
|
|
172
|
+
return $(i), i;
|
|
178
173
|
}
|
|
179
|
-
var J = null, Y =
|
|
180
|
-
async function X(
|
|
181
|
-
let
|
|
182
|
-
if (!
|
|
174
|
+
var J = null, Y = s(null);
|
|
175
|
+
async function X(e) {
|
|
176
|
+
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
177
|
+
if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
|
|
183
178
|
J && Q();
|
|
184
|
-
let { default:
|
|
185
|
-
await new Promise((
|
|
186
|
-
let
|
|
187
|
-
|
|
188
|
-
},
|
|
189
|
-
J =
|
|
190
|
-
return () =>
|
|
191
|
-
config:
|
|
192
|
-
translations:
|
|
193
|
-
fontsManager:
|
|
179
|
+
let { default: n } = await import("./CloudEditor-yCOkIkZ-.js"), r = await W(e.locale ?? "en"), i = C(e.fonts);
|
|
180
|
+
await new Promise((a, o) => {
|
|
181
|
+
let s = setTimeout(() => {
|
|
182
|
+
o(/* @__PURE__ */ Error("[Templatical] Cloud editor initialization timed out"));
|
|
183
|
+
}, x);
|
|
184
|
+
J = h({ setup() {
|
|
185
|
+
return () => v(n, {
|
|
186
|
+
config: e,
|
|
187
|
+
translations: r,
|
|
188
|
+
fontsManager: i,
|
|
194
189
|
ref: Y,
|
|
195
190
|
onReady: () => {
|
|
196
|
-
clearTimeout(
|
|
191
|
+
clearTimeout(s), a();
|
|
197
192
|
}
|
|
198
193
|
});
|
|
199
|
-
} }), J.mount(
|
|
194
|
+
} }), J.mount(t);
|
|
200
195
|
});
|
|
201
|
-
let
|
|
196
|
+
let a = {
|
|
202
197
|
getContent() {
|
|
203
|
-
return Y.value ? JSON.parse(JSON.stringify(Y.value.getContent())) : JSON.parse(JSON.stringify(
|
|
198
|
+
return Y.value ? JSON.parse(JSON.stringify(Y.value.getContent())) : JSON.parse(JSON.stringify(e.content));
|
|
204
199
|
},
|
|
205
200
|
setContent(e) {
|
|
206
201
|
Y.value && Y.value.setContent(e);
|
|
@@ -219,7 +214,7 @@ async function X(t) {
|
|
|
219
214
|
return Y.value ? Y.value.save() : Promise.reject(/* @__PURE__ */ Error("[Templatical] Cloud editor not ready"));
|
|
220
215
|
}
|
|
221
216
|
};
|
|
222
|
-
return $(
|
|
217
|
+
return $(a), a;
|
|
223
218
|
}
|
|
224
219
|
function Z() {
|
|
225
220
|
G && (G.unmount(), G = null, K.value = null);
|
|
@@ -233,4 +228,4 @@ function $(e) {
|
|
|
233
228
|
}).catch(() => {});
|
|
234
229
|
}
|
|
235
230
|
//#endregion
|
|
236
|
-
export { q as init, X as initCloud, Z as unmount,
|
|
231
|
+
export { q as init, X as initCloud, Z as unmount, C as useFonts };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { n as e } from "./_plugin-vue_export-helper-OO6pH1Dh.js";
|
|
2
|
+
var t = e("text-align-center", [
|
|
3
|
+
["path", {
|
|
4
|
+
d: "M21 5H3",
|
|
5
|
+
key: "1fi0y6"
|
|
6
|
+
}],
|
|
7
|
+
["path", {
|
|
8
|
+
d: "M17 12H7",
|
|
9
|
+
key: "16if0g"
|
|
10
|
+
}],
|
|
11
|
+
["path", {
|
|
12
|
+
d: "M19 19H5",
|
|
13
|
+
key: "vjpgq2"
|
|
14
|
+
}]
|
|
15
|
+
]), n = e("text-align-end", [
|
|
16
|
+
["path", {
|
|
17
|
+
d: "M21 5H3",
|
|
18
|
+
key: "1fi0y6"
|
|
19
|
+
}],
|
|
20
|
+
["path", {
|
|
21
|
+
d: "M21 12H9",
|
|
22
|
+
key: "dn1m92"
|
|
23
|
+
}],
|
|
24
|
+
["path", {
|
|
25
|
+
d: "M21 19H7",
|
|
26
|
+
key: "4cu937"
|
|
27
|
+
}]
|
|
28
|
+
]), r = e("text-align-start", [
|
|
29
|
+
["path", {
|
|
30
|
+
d: "M21 5H3",
|
|
31
|
+
key: "1fi0y6"
|
|
32
|
+
}],
|
|
33
|
+
["path", {
|
|
34
|
+
d: "M15 12H3",
|
|
35
|
+
key: "6jk70r"
|
|
36
|
+
}],
|
|
37
|
+
["path", {
|
|
38
|
+
d: "M17 19H3",
|
|
39
|
+
key: "z6ezky"
|
|
40
|
+
}]
|
|
41
|
+
]);
|
|
42
|
+
//#endregion
|
|
43
|
+
export { n, t as r, r as t };
|