@aswin.dev/editor 0.7.0 → 0.7.2
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 +3 -3
- package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-EmQ19wiS.js} +37 -37
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DeB0w_32.js} +67 -81
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-DoLD5Cde.js} +22 -22
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-DkNbDvJA.js} +12 -12
- package/dist/CloudEditor-zo9PjjvY.js +1214 -0
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-BsXMY-8e.js} +21 -21
- package/dist/CommentsSidebar-DIWIa4rS.js +436 -0
- package/dist/CountdownBlock-BCi7-DAM.js +92 -0
- package/dist/CountdownToolbar-BuS8p5ju.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-RDlnhL-6.js} +58 -58
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-BJ59h9ok.js} +2 -2
- package/dist/ModuleBrowserModal-b7HbpByz.js +206 -0
- package/dist/ModulePreviewCanvas-D__YlOLS.js +108 -0
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Ca3vNY84.js} +87 -87
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-B1aYPO-6.js} +182 -182
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-BmEVMrkJ.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-ClovqI6h.js} +28 -28
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DoqtH0cw.js} +45 -50
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-DQv2ZAiL.js} +75 -75
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-iIeYJYsj.js} +28 -28
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-CTDIwRF_.js} +68 -68
- package/dist/{TplModal-BwSfxIHf.js → TplModal-CBq1J1pG.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-QkC6f5UE.js} +19 -5
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BeU8nz7A.js} +28 -28
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BeU8nz7A.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-B2mhscyP.js} +21 -21
- package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js.map +1 -0
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C4g77gF0.js} +11 -11
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-C4g77gF0.js.map} +1 -1
- package/dist/{CloudEditor-BCz1ZTYC.js → cdn/chunks/CloudEditor-Btyr0b0_.js} +486 -475
- package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-YBiIjiRh.js} +15 -15
- package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +1 -0
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → cdn/chunks/ModuleBrowserModal-C2CDWKW6.js} +51 -62
- package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js +109 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +1 -0
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-Ty1bp9vB.js} +64 -64
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-Ty1bp9vB.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-BA1WbHI7.js} +188 -188
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-BA1WbHI7.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BtWCA_Oc.js} +30 -30
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BtWCA_Oc.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-AwL0tkCV.js} +21 -21
- package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-DbSyeixS.js} +65 -65
- package/dist/cdn/chunks/TitleEditor-DbSyeixS.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +23 -0
- package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +1 -0
- package/dist/cdn/chunks/{de-D8CnZxV9.js → de-_tooy3Q8.js} +250 -2
- package/dist/cdn/chunks/de-_tooy3Q8.js.map +1 -0
- package/dist/cdn/chunks/{draggable-Bcb86AsV.js → draggable-C-1_gch3.js} +2 -2
- package/dist/cdn/chunks/{draggable-Bcb86AsV.js.map → draggable-C-1_gch3.js.map} +1 -1
- package/dist/cdn/chunks/{en-8FHaQv4V.js → en-CNqLoIm9.js} +250 -2
- package/dist/cdn/chunks/en-CNqLoIm9.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BVKQw_sp.js} +107 -107
- package/dist/cdn/chunks/extensions-BVKQw_sp.js.map +1 -0
- package/dist/cdn/chunks/{features-DEMb13KS.js → features-DIBEo4xl.js} +3388 -2289
- package/dist/cdn/chunks/features-DIBEo4xl.js.map +1 -0
- package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-C1Gg-ov-.js} +346 -54
- package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +1 -0
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BTF_Ko70.js} +985 -985
- package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +1 -0
- package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-C5AmotmP.js} +312 -312
- package/dist/cdn/chunks/quality-C5AmotmP.js.map +1 -0
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-D0L44Vlp.js} +236 -142
- package/dist/cdn/chunks/renderer-D0L44Vlp.js.map +1 -0
- package/dist/cdn/chunks/{src-CRaqN-p8.js → src-RKexlYjA.js} +161 -161
- package/dist/cdn/chunks/src-RKexlYjA.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js +57 -0
- package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js.map +1 -0
- package/dist/cdn/chunks/styles-CQR6ed13.js +4976 -0
- package/dist/cdn/chunks/styles-CQR6ed13.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-CDzAbF2j.js} +43 -43
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-CDzAbF2j.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +211 -123
- package/dist/cdn/editor.js.map +1 -1
- 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-DJG4tb4_.js} +485 -427
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
- package/dist/{de-Brqvgr43.js → de-2LEvILeZ.js} +249 -1
- package/dist/{dist-Cp0zXPAD.js → dist-BHAeXaUY.js} +1 -1
- package/dist/{dist-BaQIYPsn.js → dist-BSJvAvH3.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-BeFnymxK.js} +1 -1
- package/dist/dist-Bmir0gYb.js +1167 -0
- package/dist/{dist-DDJIWTRY.js → dist-BvPgo-UK.js} +1 -1
- package/dist/{dist-BFawx6IS.js → dist-CPVBKMmd.js} +51 -51
- package/dist/dist-CivF9P8b.js +382 -0
- package/dist/{dist-D6uC2xhi.js → dist-Df4ie7vZ.js} +1 -1
- package/dist/{dist-us-RpCWN.js → dist-DxOoemkW.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-HEQ52gTJ.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-b-XUqAoF.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-kZfaVUpW.js} +3 -3
- package/dist/{dist-aRzjfSRN.js → dist-wfAedlzi.js} +1 -1
- package/dist/{en-WDVp87TE.js → en-D2RU2Poj.js} +249 -1
- package/dist/{extensions-CUcl9Ok4.js → extensions-BQ1xXx3d.js} +103 -103
- package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
- package/dist/index.d.ts +102 -14
- 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-DlghmhNf.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-DDdhIRj8.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-OSQ-JVTX.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-BN4a-CoF.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styleConstants-wWRbcuEK.js +55 -0
- package/dist/styles-CavWjvol.js +5487 -0
- package/dist/templatical-editor.js +211 -119
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-D1weisjS.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-CMWvQ5KX.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DyidRNX_.js} +1 -1
- package/dist/undo-2-Cg8I7obC.js +16 -0
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-BTTNBk5i.js} +2 -2
- package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-BGnzcT7p.js} +2424 -2249
- package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-CfuZq2fF.js} +4 -4
- package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
- package/dist/{x-u2oVmjN_.js → x-CgIhNcT9.js} +1 -1
- package/package.json +15 -15
- 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/AiFeatureMenu-qEdB2fZJ.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.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/SaveModuleDialog-B0TnO_o9.js.map +0 -1
- 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-D8CnZxV9.js.map +0 -1
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
- package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
- package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
- package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
- package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
- 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/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-Bwh4ceeO.js} +0 -0
- /package/dist/{de-DCaaCE5s.js → de-D2npYjrZ.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-DvHLtWVP.js} +0 -0
- /package/dist/{emojiData-PQyVa4bU.js → emojiData-DvQBBzmO.js} +0 -0
- /package/dist/{en-DXCyK4-X.js → en-ib-4h3_o.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-CFDZnEIs.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-7Rv0QDiO.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-C_9OpzBw.js} +0 -0
|
@@ -1,177 +1,221 @@
|
|
|
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 h, jt as g, l as _, m as v, n as y, st as b, t as ee, v as x, x as S } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
+
import { r as C } from "./timeouts-BSGxjuUF.js";
|
|
3
|
+
import { f as te, r as ne } from "./dist-Bmir0gYb.js";
|
|
4
|
+
import { L as w, S as T, t as re, z as ie } from "./useEditorCore-BGnzcT7p.js";
|
|
5
|
+
import { w as ae } from "./keys-CvX8D-8C.js";
|
|
6
|
+
import { a as oe, c as se, d as ce, f as le, g as ue, h as de, i as fe, l as pe, m as me, n as he, o as E, p as D, r as O, s as k, t as A, u as j } from "./styles-CavWjvol.js";
|
|
7
|
+
import { t as M } from "./_plugin-vue_export-helper-Bwh4ceeO.js";
|
|
6
8
|
//#region src/Editor.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
9
|
+
var N = ["data-tpl-theme"], P = {
|
|
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
|
+
}, F = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, I = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, L = { class: "tpl:flex tpl:justify-center tpl:p-8" }, R = ["aria-label"], z = /* @__PURE__ */ M(/* @__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 y = d(null), C = t, T = ie({
|
|
25
|
+
content: C.config.content,
|
|
26
|
+
templateDefaults: C.config.templateDefaults
|
|
27
|
+
}), E = re({
|
|
28
|
+
editor: T,
|
|
27
29
|
config: {
|
|
28
|
-
uiTheme:
|
|
29
|
-
theme:
|
|
30
|
-
blockDefaults:
|
|
31
|
-
customBlocks:
|
|
32
|
-
mergeTags:
|
|
33
|
-
displayConditions:
|
|
34
|
-
onRequestMedia:
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
uiTheme: C.config.uiTheme,
|
|
31
|
+
theme: C.config.theme,
|
|
32
|
+
blockDefaults: C.config.blockDefaults,
|
|
33
|
+
customBlocks: C.config.customBlocks,
|
|
34
|
+
mergeTags: C.config.mergeTags,
|
|
35
|
+
displayConditions: C.config.displayConditions,
|
|
36
|
+
onRequestMedia: C.config.onRequestMedia,
|
|
37
|
+
editorType: C.config.editorType,
|
|
38
|
+
accessibility: de(C.config),
|
|
39
|
+
onSave: C.config.onSave ? () => C.config.onSave(JSON.parse(JSON.stringify(T.state.content))) : void 0
|
|
37
40
|
},
|
|
38
|
-
translations:
|
|
39
|
-
fontsManager:
|
|
40
|
-
autoSaveOptions:
|
|
41
|
+
translations: C.translations,
|
|
42
|
+
fontsManager: C.fontsManager,
|
|
43
|
+
autoSaveOptions: C.config.onChange ? { onChange: () => C.config.onChange(JSON.parse(JSON.stringify(T.state.content))) } : null
|
|
41
44
|
});
|
|
42
|
-
|
|
43
|
-
await
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
h(async () => {
|
|
46
|
+
if (await C.fontsManager.loadCustomFonts(), w(C.config.editorType) === "popup" && !T.content.value.settings.popup) {
|
|
47
|
+
let e = te();
|
|
48
|
+
T.updateSettings({
|
|
49
|
+
popup: e,
|
|
50
|
+
width: ne[e.design.sizePreset]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}), r(() => {
|
|
54
|
+
C.fontsManager.cleanupFontLinks(), E.destroy();
|
|
55
|
+
});
|
|
56
|
+
let M = d("blocks");
|
|
57
|
+
a(ae, M);
|
|
58
|
+
let z = v(() => w(C.config.editorType) === "popup"), B = v(() => z.value && M.value === "displayRules"), V = v(() => z.value && M.value === "schedule"), H = v(() => M.value === "design"), U = v(() => z.value && (B.value || V.value || H.value)), W = v(() => {
|
|
59
|
+
if (T.state.previewMode) return ["tpl:left-0", "tpl:right-0"];
|
|
60
|
+
if (!z.value) return ["tpl:left-12", "tpl:right-[320px]"];
|
|
61
|
+
let e;
|
|
62
|
+
e = M.value === "blocks" ? "tpl:left-[272px]" : H.value ? "tpl:left-[392px]" : "tpl:left-[72px]";
|
|
63
|
+
let t = U.value ? "tpl:right-0" : "tpl:right-[320px]";
|
|
64
|
+
return [e, t];
|
|
65
|
+
}), G = v(() => B.value || V.value);
|
|
66
|
+
return o({
|
|
67
|
+
getContent: () => T.content.value,
|
|
68
|
+
setContent: (e) => T.setContent(e),
|
|
69
|
+
setTheme: (e) => T.setUiTheme(e),
|
|
70
|
+
undo: () => E.history.undo(),
|
|
71
|
+
redo: () => E.history.redo(),
|
|
72
|
+
canUndo: () => E.history.canUndo.value,
|
|
73
|
+
canRedo: () => E.history.canRedo.value,
|
|
74
|
+
renderCustomBlock: E.registry.renderCustomBlock,
|
|
75
|
+
startTour: (e) => y.value?.start(e),
|
|
76
|
+
dismissTour: () => y.value?.dismiss(),
|
|
77
|
+
resetTourDismissed: () => fe(C.config.tour),
|
|
78
|
+
isTourDismissed: () => C.config.tour ? oe(C.config.tour) : !0
|
|
79
|
+
}), (r, a) => (i(), x("div", {
|
|
80
|
+
class: e(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": b(T).state.darkMode }]),
|
|
81
|
+
"data-tpl-theme": b(E).resolvedTheme.value,
|
|
82
|
+
style: g(b(E).themeStyles.value)
|
|
55
83
|
}, [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
84
|
+
m("header", P, [
|
|
85
|
+
a[5] ||= m("div", { class: "tpl:flex tpl:items-center tpl:gap-2.5" }, null, -1),
|
|
86
|
+
m("div", F, [
|
|
87
|
+
S(ce),
|
|
88
|
+
S(j, {
|
|
89
|
+
viewport: b(T).state.viewport,
|
|
90
|
+
onChange: b(T).setViewport
|
|
62
91
|
}, null, 8, ["viewport", "onChange"]),
|
|
63
|
-
|
|
64
|
-
"dark-mode":
|
|
65
|
-
onChange:
|
|
92
|
+
S(se, {
|
|
93
|
+
"dark-mode": b(T).state.darkMode,
|
|
94
|
+
onChange: b(T).setDarkMode
|
|
66
95
|
}, null, 8, ["dark-mode", "onChange"]),
|
|
67
|
-
|
|
68
|
-
"preview-mode":
|
|
69
|
-
onChange:
|
|
96
|
+
S(pe, {
|
|
97
|
+
"preview-mode": b(T).state.previewMode,
|
|
98
|
+
onChange: b(T).setPreviewMode
|
|
70
99
|
}, null, 8, ["preview-mode", "onChange"])
|
|
71
100
|
]),
|
|
72
|
-
|
|
101
|
+
a[6] ||= m("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
|
|
73
102
|
]),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
class:
|
|
77
|
-
style: {
|
|
78
|
-
|
|
79
|
-
|
|
103
|
+
c(S(D, null, null, 512), [[_, !b(T).state.previewMode]]),
|
|
104
|
+
m("div", {
|
|
105
|
+
class: e(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...W.value, "tpl:top-14"]]),
|
|
106
|
+
style: g({
|
|
107
|
+
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
108
|
+
backgroundColor: G.value ? "var(--tpl-bg)" : "var(--tpl-canvas-bg)"
|
|
109
|
+
})
|
|
110
|
+
}, [z.value && M.value === "displayRules" ? (i(), p(he, { key: 0 })) : z.value && M.value === "schedule" ? (i(), p(A, {
|
|
111
|
+
key: 1,
|
|
112
|
+
layout: "standalone"
|
|
113
|
+
})) : (i(), x(f, { key: 2 }, [m("div", I, [S(ee, { name: "tpl-restore-btn" }, {
|
|
114
|
+
default: s(() => [b(E).conditionPreview.hasHiddenBlocks.value ? (i(), x("button", {
|
|
80
115
|
key: 0,
|
|
81
116
|
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
117
|
style: { "backdrop-filter": "blur(8px)" },
|
|
83
|
-
onClick:
|
|
84
|
-
}, [
|
|
118
|
+
onClick: a[0] ||= (e) => b(E).conditionPreview.reset()
|
|
119
|
+
}, [S(b(ue), {
|
|
85
120
|
size: 13,
|
|
86
121
|
"stroke-width": 2
|
|
87
|
-
}),
|
|
122
|
+
}), u(" " + n(b(E).t.blockSettings.restoreHiddenBlocks), 1)])) : l("", !0)]),
|
|
88
123
|
_: 1
|
|
89
|
-
})]),
|
|
90
|
-
viewport:
|
|
91
|
-
content:
|
|
92
|
-
"selected-block-id":
|
|
93
|
-
"dark-mode":
|
|
94
|
-
"preview-mode":
|
|
95
|
-
|
|
124
|
+
})]), m("div", L, [S(me, {
|
|
125
|
+
viewport: b(T).state.viewport,
|
|
126
|
+
content: b(T).content.value,
|
|
127
|
+
"selected-block-id": b(T).state.selectedBlockId,
|
|
128
|
+
"dark-mode": b(T).state.darkMode,
|
|
129
|
+
"preview-mode": b(T).state.previewMode,
|
|
130
|
+
"multi-page-canvas": t.config.multiPageCanvas ?? !1,
|
|
131
|
+
onSelectBlock: b(T).selectBlock
|
|
96
132
|
}, null, 8, [
|
|
97
133
|
"viewport",
|
|
98
134
|
"content",
|
|
99
135
|
"selected-block-id",
|
|
100
136
|
"dark-mode",
|
|
101
137
|
"preview-mode",
|
|
138
|
+
"multi-page-canvas",
|
|
102
139
|
"onSelectBlock"
|
|
103
|
-
])])],
|
|
104
|
-
|
|
140
|
+
])])], 64))], 6),
|
|
141
|
+
t.config.branding === !1 ? l("", !0) : (i(), p(k, {
|
|
105
142
|
key: 0,
|
|
106
|
-
"position-class":
|
|
143
|
+
"position-class": W.value
|
|
107
144
|
}, null, 8, ["position-class"])),
|
|
108
|
-
|
|
145
|
+
m("div", {
|
|
109
146
|
class: "tpl-sr-only",
|
|
110
147
|
role: "status",
|
|
111
148
|
"aria-live": "polite",
|
|
112
149
|
"aria-atomic": "true",
|
|
113
|
-
"aria-label":
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
"selected-block":
|
|
117
|
-
settings:
|
|
118
|
-
onUpdateBlock:
|
|
119
|
-
onDeleteBlock:
|
|
120
|
-
|
|
150
|
+
"aria-label": b(E).t.landmarks.reorderAnnouncements
|
|
151
|
+
}, n(b(E).keyboardReorder.announcement.value), 9, R),
|
|
152
|
+
c(S(le, {
|
|
153
|
+
"selected-block": b(T).selectedBlock.value,
|
|
154
|
+
settings: b(T).content.value.settings,
|
|
155
|
+
onUpdateBlock: a[1] ||= (e) => b(T).updateBlock(b(T).state.selectedBlockId, e),
|
|
156
|
+
onDeleteBlock: a[2] ||= () => {
|
|
157
|
+
b(T).state.selectedBlockId && b(E).blockActions.deleteBlock(b(T).state.selectedBlockId);
|
|
121
158
|
},
|
|
122
|
-
onDuplicateBlock:
|
|
123
|
-
|
|
159
|
+
onDuplicateBlock: a[3] ||= () => {
|
|
160
|
+
b(T).selectedBlock.value && b(E).blockActions.duplicateBlock(b(T).selectedBlock.value);
|
|
124
161
|
},
|
|
125
|
-
onUpdateSettings:
|
|
126
|
-
}, null, 8, ["selected-block", "settings"]), [[
|
|
127
|
-
|
|
162
|
+
onUpdateSettings: a[4] ||= (e) => b(T).updateSettings(e)
|
|
163
|
+
}, null, 8, ["selected-block", "settings"]), [[_, !b(T).state.previewMode && !U.value]]),
|
|
164
|
+
t.config.tour ? (i(), p(O, {
|
|
165
|
+
key: 1,
|
|
166
|
+
ref_key: "editorTourRef",
|
|
167
|
+
ref: y,
|
|
168
|
+
"tour-config": t.config.tour,
|
|
169
|
+
"dark-mode": b(T).state.darkMode
|
|
170
|
+
}, null, 8, ["tour-config", "dark-mode"])) : l("", !0)
|
|
171
|
+
], 14, N));
|
|
128
172
|
}
|
|
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-
|
|
173
|
+
}), [["__scopeId", "data-v-040fed1e"]]), B = /* @__PURE__ */ Object.assign({
|
|
174
|
+
"./locales/de.ts": () => import("./de-2LEvILeZ.js"),
|
|
175
|
+
"./locales/en.ts": () => import("./en-D2RU2Poj.js")
|
|
176
|
+
}), V = /* @__PURE__ */ Object.assign({
|
|
177
|
+
"./locales/cloud/de.ts": () => import("./de-D2npYjrZ.js"),
|
|
178
|
+
"./locales/cloud/en.ts": () => import("./en-ib-4h3_o.js")
|
|
135
179
|
});
|
|
136
|
-
function
|
|
180
|
+
function H(e) {
|
|
137
181
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
138
182
|
}
|
|
139
|
-
var
|
|
140
|
-
function
|
|
183
|
+
var U = H(B), W = H(V);
|
|
184
|
+
function G(e) {
|
|
141
185
|
return e.split("-")[0].toLowerCase();
|
|
142
186
|
}
|
|
143
|
-
function
|
|
144
|
-
let n =
|
|
187
|
+
function K(e, t) {
|
|
188
|
+
let n = G(e);
|
|
145
189
|
return t.includes(n) ? n : "en";
|
|
146
190
|
}
|
|
147
|
-
async function
|
|
148
|
-
let t =
|
|
191
|
+
async function q(e) {
|
|
192
|
+
let t = B[`./locales/${K(e, U)}.ts`];
|
|
149
193
|
return (await t()).default;
|
|
150
194
|
}
|
|
151
|
-
async function
|
|
152
|
-
let t =
|
|
195
|
+
async function ge(e) {
|
|
196
|
+
let t = V[`./locales/cloud/${K(e, W)}.ts`];
|
|
153
197
|
return (await t()).default;
|
|
154
198
|
}
|
|
155
199
|
//#endregion
|
|
156
200
|
//#region src/utils/toMjml.ts
|
|
157
|
-
async function
|
|
201
|
+
async function _e(e) {
|
|
158
202
|
let t;
|
|
159
203
|
try {
|
|
160
|
-
t = await import("@
|
|
204
|
+
t = await import("@aswin.dev/renderer");
|
|
161
205
|
} catch {
|
|
162
|
-
throw Error("[Templatical] toMjml() requires the @
|
|
206
|
+
throw Error("[Templatical] toMjml() requires the @aswin.dev/renderer package. Please install it.");
|
|
163
207
|
}
|
|
164
208
|
return t.renderToMjml(e.getContent(), { renderCustomBlock: e.renderCustomBlock });
|
|
165
209
|
}
|
|
166
210
|
//#endregion
|
|
167
211
|
//#region src/index.ts
|
|
168
|
-
var J = null, Y =
|
|
169
|
-
async function
|
|
212
|
+
var J = null, Y = d(null);
|
|
213
|
+
async function ve(e) {
|
|
170
214
|
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
171
215
|
if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
|
|
172
|
-
let n = await
|
|
173
|
-
J && Q(), J =
|
|
174
|
-
return () =>
|
|
216
|
+
let n = await q(e.locale ?? "en"), r = T(e.fonts);
|
|
217
|
+
J && Q(), J = y({ setup() {
|
|
218
|
+
return () => o(z, {
|
|
175
219
|
config: e,
|
|
176
220
|
translations: n,
|
|
177
221
|
fontsManager: r,
|
|
@@ -189,31 +233,55 @@ async function ie(e) {
|
|
|
189
233
|
Y.value && Y.value.setTheme(e);
|
|
190
234
|
},
|
|
191
235
|
unmount: Q,
|
|
236
|
+
startTour(e) {
|
|
237
|
+
Y.value?.startTour?.(e);
|
|
238
|
+
},
|
|
239
|
+
dismissTour() {
|
|
240
|
+
Y.value?.dismissTour?.();
|
|
241
|
+
},
|
|
242
|
+
resetTourDismissed() {
|
|
243
|
+
Y.value?.resetTourDismissed?.();
|
|
244
|
+
},
|
|
245
|
+
isTourDismissed() {
|
|
246
|
+
return Y.value?.isTourDismissed?.() ?? !0;
|
|
247
|
+
},
|
|
248
|
+
undo() {
|
|
249
|
+
Y.value?.undo?.();
|
|
250
|
+
},
|
|
251
|
+
redo() {
|
|
252
|
+
Y.value?.redo?.();
|
|
253
|
+
},
|
|
254
|
+
canUndo() {
|
|
255
|
+
return Y.value?.canUndo?.() ?? !1;
|
|
256
|
+
},
|
|
257
|
+
canRedo() {
|
|
258
|
+
return Y.value?.canRedo?.() ?? !1;
|
|
259
|
+
},
|
|
192
260
|
renderCustomBlock(e) {
|
|
193
261
|
return Y.value ? Y.value.renderCustomBlock(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
|
|
194
262
|
},
|
|
195
|
-
toMjml: () =>
|
|
263
|
+
toMjml: () => _e(i)
|
|
196
264
|
};
|
|
197
265
|
return i;
|
|
198
266
|
}
|
|
199
|
-
var X = null, Z =
|
|
200
|
-
async function
|
|
267
|
+
var X = null, Z = d(null);
|
|
268
|
+
async function ye(e) {
|
|
201
269
|
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
202
270
|
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 () =>
|
|
271
|
+
let { default: n } = await import("./CloudEditor-zo9PjjvY.js"), [r, i] = await Promise.all([q(e.locale ?? "en"), ge(e.locale ?? "en")]), a = T(e.fonts);
|
|
272
|
+
return X && $(), await new Promise((s, c) => {
|
|
273
|
+
let l = setTimeout(() => {
|
|
274
|
+
c(/* @__PURE__ */ Error("[Templatical] Cloud editor initialization timed out"));
|
|
275
|
+
}, C);
|
|
276
|
+
X = y({ setup() {
|
|
277
|
+
return () => o(n, {
|
|
210
278
|
config: e,
|
|
211
279
|
translations: r,
|
|
212
280
|
cloudTranslations: i,
|
|
213
281
|
fontsManager: a,
|
|
214
282
|
ref: Z,
|
|
215
283
|
onReady: () => {
|
|
216
|
-
clearTimeout(
|
|
284
|
+
clearTimeout(l), s();
|
|
217
285
|
}
|
|
218
286
|
});
|
|
219
287
|
} }), X.mount(t);
|
|
@@ -228,6 +296,30 @@ async function ae(e) {
|
|
|
228
296
|
Z.value && Z.value.setTheme(e);
|
|
229
297
|
},
|
|
230
298
|
unmount: $,
|
|
299
|
+
startTour(e) {
|
|
300
|
+
Z.value?.startTour?.(e);
|
|
301
|
+
},
|
|
302
|
+
dismissTour() {
|
|
303
|
+
Z.value?.dismissTour?.();
|
|
304
|
+
},
|
|
305
|
+
resetTourDismissed() {
|
|
306
|
+
Z.value?.resetTourDismissed?.();
|
|
307
|
+
},
|
|
308
|
+
isTourDismissed() {
|
|
309
|
+
return Z.value?.isTourDismissed?.() ?? !0;
|
|
310
|
+
},
|
|
311
|
+
undo() {
|
|
312
|
+
Z.value?.undo?.();
|
|
313
|
+
},
|
|
314
|
+
redo() {
|
|
315
|
+
Z.value?.redo?.();
|
|
316
|
+
},
|
|
317
|
+
canUndo() {
|
|
318
|
+
return Z.value?.canUndo?.() ?? !1;
|
|
319
|
+
},
|
|
320
|
+
canRedo() {
|
|
321
|
+
return Z.value?.canRedo?.() ?? !1;
|
|
322
|
+
},
|
|
231
323
|
create(e) {
|
|
232
324
|
return Z.value ? Z.value.create(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Cloud editor not ready"));
|
|
233
325
|
},
|
|
@@ -246,4 +338,4 @@ function $() {
|
|
|
246
338
|
X && (X.unmount(), X = null, Z.value = null);
|
|
247
339
|
}
|
|
248
340
|
//#endregion
|
|
249
|
-
export {
|
|
341
|
+
export { E as DEFAULT_EDITOR_TOUR_STORAGE_KEY, ve as init, ye as initCloud, Q as unmount, T as useFonts };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { t as e } from "./createLucideIcon-ClREiSx3.js";
|
|
2
|
+
var t = e("redo-2", [["path", {
|
|
3
|
+
d: "m15 14 5-5-5-5",
|
|
4
|
+
key: "12vg1m"
|
|
5
|
+
}], ["path", {
|
|
6
|
+
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
7
|
+
key: "6uklza"
|
|
8
|
+
}]]), n = e("undo-2", [["path", {
|
|
9
|
+
d: "M9 14 4 9l5-5",
|
|
10
|
+
key: "102s5s"
|
|
11
|
+
}], ["path", {
|
|
12
|
+
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
13
|
+
key: "f3b9sd"
|
|
14
|
+
}]]);
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t as n, n as t };
|
|
@@ -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}}`);
|