@templatical/editor 0.12.1 → 0.14.0
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/{AiChatSidebar-CXH7l1Ar.js → AiChatSidebar-J8iO_sX7.js} +16 -16
- package/dist/{AiFeatureMenu-BKbUUc1D.js → AiFeatureMenu-F2diEDgV.js} +10 -10
- package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-a-qlByxF.js} +5 -5
- package/dist/{CloudEditor-CB16QzKM.js → CloudEditor-CDjtwb4i.js} +284 -250
- package/dist/{CollaboratorBar-ACUA7lBJ.js → CollaboratorBar-B_EnJLtW.js} +4 -4
- package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-DaP9BA_r.js} +18 -18
- package/dist/{CountdownBlock-C-6o19qS.js → CountdownBlock-DtAokAVw.js} +3 -3
- package/dist/{CountdownToolbar-Dol7Q0Pv.js → CountdownToolbar-Dtqgwy0g.js} +3 -3
- package/dist/{DesignReferenceSidebar-0dTsBW08.js → DesignReferenceSidebar-BHRlTqlT.js} +21 -33
- package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-u7ee3Wrl.js} +11 -11
- package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-CV3ID80N.js} +1 -1
- package/dist/ModuleBrowserModal-DOsdaS6s.js +201 -0
- package/dist/{ModulePreviewCanvas-CpaumPMS.js → ModulePreviewCanvas-Cx4MOJ0X.js} +21 -21
- package/dist/{NumberWithSuffix-Bp40ik4l.js → NumberWithSuffix-D2mW_DhT.js} +4 -4
- package/dist/{ParagraphEditor-BqRFV_Y-.js → ParagraphEditor-DMzkVnST.js} +156 -136
- package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-CRCxCwKf.js} +7 -7
- package/dist/{SaveModuleDialog-DmfvH5D0.js → SaveModuleDialog-DuEKgumL.js} +8 -8
- package/dist/{SnapshotHistory-C052o-8U.js → SnapshotHistory-CVgiNJtE.js} +12 -12
- package/dist/{TemplateScoringPanel-CUs8XmIi.js → TemplateScoringPanel-lm0_9nYi.js} +26 -26
- package/dist/{TestEmailModal-BIIxRWUt.js → TestEmailModal-WBMdiW5S.js} +5 -5
- package/dist/{TitleEditor-FMh54Cx5.js → TitleEditor-eyT0h-Sa.js} +71 -55
- package/dist/{TplModal-utMtXzSO.js → TplModal-tjQ7OB0g.js} +4 -4
- package/dist/{blockTypeIcons-C6UGDmrC.js → blockTypeIcons-DdB3uTKD.js} +5 -5
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js → AiFeatureMenu-D7rB2SBs.js} +9 -9
- package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js.map → AiFeatureMenu-D7rB2SBs.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js → BlockIssueBadge-DHOe0pgx.js} +6 -6
- package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js.map → BlockIssueBadge-DHOe0pgx.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DSeihOan.js → CloudEditor-DNed_Ym0.js} +273 -239
- package/dist/cdn/chunks/CloudEditor-DNed_Ym0.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js → CollaboratorBar-sj_9Lee3.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js.map → CollaboratorBar-sj_9Lee3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js → CountdownBlock-C1Ikjpn4.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js.map → CountdownBlock-C1Ikjpn4.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BQn0Kj0X.js → CountdownToolbar-j1G_X8rB.js} +4 -4
- package/dist/cdn/chunks/CountdownToolbar-j1G_X8rB.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js → IssuesPanel-CTOf3PsH.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js.map → IssuesPanel-CTOf3PsH.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js → ModuleBrowserModal-DCh88-rr.js} +13 -10
- package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js.map → ModuleBrowserModal-DCh88-rr.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js → ModulePreviewCanvas-DJqvTKmg.js} +19 -19
- package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js.map → ModulePreviewCanvas-DJqvTKmg.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js → NumberWithSuffix-Bu45XWSl.js} +5 -5
- package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js.map → NumberWithSuffix-Bu45XWSl.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BnhnFOW1.js → ParagraphEditor-DwZqLJp2.js} +131 -111
- package/dist/cdn/chunks/ParagraphEditor-DwZqLJp2.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js → RichTextEditorContent-CIuZ-2DV.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js.map → RichTextEditorContent-CIuZ-2DV.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js → SaveModuleDialog-Bep0X2s_.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js.map → SaveModuleDialog-Bep0X2s_.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CQqklX0D.js → TitleEditor-DO1-h3RY.js} +62 -46
- package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-8o24HVJu.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-CpGPHppB.js.map → blockTypeIcons-8o24HVJu.js.map} +1 -1
- package/dist/cdn/chunks/{de-BpseTWOA.js → de-LsV0u1tP.js} +20 -2
- package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
- package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kPCz_3zM.js} +14 -5
- package/dist/cdn/chunks/{draggable-Bci-fq8y.js.map → draggable-kPCz_3zM.js.map} +1 -1
- package/dist/cdn/chunks/{en-VGIQ0WNq.js → en-Bb8X1bOs.js} +20 -2
- package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Ds9GnMcd.js → extensions-iwBXnEwq.js} +21 -21
- package/dist/cdn/chunks/{extensions-Ds9GnMcd.js.map → extensions-iwBXnEwq.js.map} +1 -1
- package/dist/cdn/chunks/{features-DxWz_Enw.js → features-CkTMVylx.js} +996 -817
- package/dist/cdn/chunks/features-CkTMVylx.js.map +1 -0
- package/dist/cdn/chunks/{icons-BflGUmFY.js → icons-9zjCuoJx.js} +158 -152
- package/dist/cdn/chunks/icons-9zjCuoJx.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +1 -1
- package/dist/cdn/chunks/{media-library-C479-QcE.js → media-library-DMRIPx4g.js} +373 -371
- package/dist/cdn/chunks/media-library-DMRIPx4g.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-zAqpLQbW.js → pt-BR-BwJY_cvb.js} +20 -2
- package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
- package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CdEqyLwF.js} +6 -3
- package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CdEqyLwF.js.map} +1 -1
- package/dist/cdn/chunks/quality-CyeUgs_c.js +2176 -0
- package/dist/cdn/chunks/{quality-BL_pEvFP.js.map → quality-CyeUgs_c.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-C0vdAODQ.js → renderer-BIKUEKDD.js} +38 -29
- package/dist/cdn/chunks/{renderer-C0vdAODQ.js.map → renderer-BIKUEKDD.js.map} +1 -1
- package/dist/cdn/chunks/{src-DzvOWQ9S.js → src-pDy_imWG.js} +56 -56
- package/dist/cdn/chunks/{src-DzvOWQ9S.js.map → src-pDy_imWG.js.map} +1 -1
- package/dist/cdn/chunks/{styles-LfeoSNRA.js → styles-D4Bd3SCx.js} +1356 -905
- package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-BlLFFU3M.js} +2233 -2213
- package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +101 -97
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BRzXxFHr.js → check-CYJwFmjy.js} +1 -1
- package/dist/{chevron-down-DmEgzmYT.js → chevron-down-C5l-DzAA.js} +1 -1
- package/dist/{circle-alert-BStvZr3O.js → circle-alert-wf5HUFZY.js} +1 -1
- package/dist/{clock-Blwp_1R6.js → clock-Bj0bQw-K.js} +1 -1
- package/dist/{cloud-_olro76D.js → cloud-CoFDm9YA.js} +1 -1
- package/dist/{createLucideIcon-CmPAC-gt.js → createLucideIcon-Bad2kKE0.js} +4 -4
- package/dist/{de-BpseTWOA.js → de-LsV0u1tP.js} +19 -1
- package/dist/{dist-BwgjpLfr.js → dist-34OcyoK1.js} +1 -1
- package/dist/{dist-Cz79qrLL.js → dist-B7w6xTU6.js} +1 -1
- package/dist/{dist-DULfKmTh.js → dist-BX3gGwL8.js} +5 -5
- package/dist/{dist-412xXefB.js → dist-Bn703mnA.js} +1 -1
- package/dist/{dist-u0iIJH3V.js → dist-CADDCv0o.js} +1 -1
- package/dist/{dist-BNEdeWub.js → dist-CGvz7vkq.js} +1 -1
- package/dist/{dist-BlG7k25W.js → dist-CLpPNKy9.js} +1 -1
- package/dist/{dist-BCQZZUE9.js → dist-ChMninLH.js} +1 -1
- package/dist/{dist-b7Ak-CuM.js → dist-CrQZ_af9.js} +1 -1
- package/dist/{dist-DhKTdU52.js → dist-CyjyYg52.js} +1426 -1406
- package/dist/{dist-D6x1cQeh.js → dist-Dd3ibRZm.js} +2 -2
- package/dist/{dist-DJ9aD8yA.js → dist-DuCzdgDA.js} +54 -5
- package/dist/{dist-o73iaGqy.js → dist-U5vfDdYI.js} +1 -1
- package/dist/{en-VGIQ0WNq.js → en-Bb8X1bOs.js} +19 -1
- package/dist/{extensions-XPlNAKIL.js → extensions-J439b7y7.js} +5 -5
- package/dist/{image-up-BFPbw_Zq.js → image-up-x8-WXfsx.js} +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/{info-B_qLEBN2.js → info-RS_fGcGi.js} +1 -1
- package/dist/keys-DgYXDafq.js +10 -0
- package/dist/{list-checks-CGg7JxPm.js → list-checks-Bf7XdDyv.js} +1 -1
- package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-CLZ0_FvW.js} +1 -1
- package/dist/{message-circle-C3cHsCJl.js → message-circle-B-1bN9ab.js} +1 -1
- package/dist/{pt-BR-zAqpLQbW.js → pt-BR-BwJY_cvb.js} +19 -1
- package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-CWKWqJYG.js} +1 -1
- package/dist/scan-line-BtK5dEai.js +31 -0
- package/dist/{send-k7npFJNO.js → send-Cn1IUdzh.js} +1 -1
- package/dist/{shield-check-CV6GbmCu.js → shield-check-CrvMk4Ea.js} +1 -1
- package/dist/{sparkles-C965Xop4.js → sparkles-CgfjwvnG.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DSm9Ijxt.js → styles-BUwDOWd3.js} +1335 -882
- package/dist/templatical-editor.js +143 -139
- package/dist/{text-align-start-Bxnps8fH.js → text-align-start-C3r_Rnvy.js} +1 -1
- package/dist/{trash-2-DpGb7fIt.js → trash-2-CjERg4x9.js} +1 -1
- package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-Chkny574.js} +1 -1
- package/dist/upload-e5kDRkPb.js +17 -0
- package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-cUQj9rmB.js} +1 -1
- package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-CYJKqXtI.js} +2 -2
- package/dist/{useEditorCore-D7dQFRkw.js → useEditorCore-8JxXDOA4.js} +1075 -894
- package/dist/{useI18n-CTs_bP9d.js → useI18n-BWqM8i78.js} +2 -2
- package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-NHC4ylza.js} +3 -3
- package/dist/usePopoverRoot-B1sdY4es.js +8 -0
- package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-BPa483TZ.js} +13 -4
- package/dist/{x-CGjkjdKK.js → x-DiPIbccg.js} +1 -1
- package/package.json +12 -12
- package/dist/ModuleBrowserModal-Bz9hSjMS.js +0 -198
- package/dist/cdn/chunks/CloudEditor-DSeihOan.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-BQn0Kj0X.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-BnhnFOW1.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-CQqklX0D.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-CpGPHppB.js +0 -22
- package/dist/cdn/chunks/de-BpseTWOA.js.map +0 -1
- package/dist/cdn/chunks/en-VGIQ0WNq.js.map +0 -1
- package/dist/cdn/chunks/features-DxWz_Enw.js.map +0 -1
- package/dist/cdn/chunks/icons-BflGUmFY.js.map +0 -1
- package/dist/cdn/chunks/media-library-C479-QcE.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-zAqpLQbW.js.map +0 -1
- package/dist/cdn/chunks/quality-BL_pEvFP.js +0 -2176
- package/dist/cdn/chunks/styles-LfeoSNRA.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
- package/dist/keys-mFiJ5N0_.js +0 -10
- package/dist/scan-line-XYEqim_E.js +0 -25
- package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as e, w as t } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import {
|
|
1
|
+
import { G as e, w as t } from "./vue.runtime.esm-bundler-BPa483TZ.js";
|
|
2
|
+
import { F as n } from "./keys-DgYXDafq.js";
|
|
3
3
|
//#region src/composables/useI18n.ts
|
|
4
4
|
function r(r) {
|
|
5
5
|
let i = r ?? t(n, null);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { X as e, w as t } from "./vue.runtime.esm-bundler-
|
|
1
|
+
import { X as e, w as t } from "./vue.runtime.esm-bundler-BPa483TZ.js";
|
|
2
2
|
import { T as n, k as r, r as i } from "./dist-BctFrpeA.js";
|
|
3
|
-
import {
|
|
3
|
+
import { C as a, O as o, S as s, T as c, w as l } from "./keys-DgYXDafq.js";
|
|
4
4
|
//#region src/composables/useMergeTag.ts
|
|
5
5
|
function u() {
|
|
6
|
-
let u = t(
|
|
6
|
+
let u = t(s, []), d = t(c, i.liquid), f = t(o, null), p = t(a, !0), m = t(l, null), h = e(!1);
|
|
7
7
|
function g(e) {
|
|
8
8
|
return r(e, d);
|
|
9
9
|
}
|
|
@@ -1478,7 +1478,13 @@ var Gr = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ Symbol("_vte"), qr
|
|
|
1478
1478
|
r ? (o !== "svg" && Xr(r) ? o = "svg" : o !== "mathml" && Zr(r) && (o = "mathml"), i && i.isCE && (i.ce._teleportTargets || (i.ce._teleportTargets = /* @__PURE__ */ new Set())).add(r), n || (b(e, r, a), ri(e, !1))) : process.env.NODE_ENV !== "production" && !n && B("Invalid Teleport target on mount:", r, `(${typeof r})`);
|
|
1479
1479
|
}, S = (e) => {
|
|
1480
1480
|
let t = () => {
|
|
1481
|
-
Gr.get(e) === t
|
|
1481
|
+
if (Gr.get(e) === t) {
|
|
1482
|
+
if (Gr.delete(e), Jr(e.props)) {
|
|
1483
|
+
let t = _(e.el) || n;
|
|
1484
|
+
b(e, t, e.anchor), ri(e, !0);
|
|
1485
|
+
}
|
|
1486
|
+
x(e);
|
|
1487
|
+
}
|
|
1482
1488
|
};
|
|
1483
1489
|
Gr.set(e, t), J(t, a);
|
|
1484
1490
|
};
|
|
@@ -2876,7 +2882,10 @@ function jo(e, i) {
|
|
|
2876
2882
|
}
|
|
2877
2883
|
}
|
|
2878
2884
|
}, E = (e, t, n, r, i, a, o, s, c = 0) => {
|
|
2879
|
-
for (let l = c; l < e.length; l++)
|
|
2885
|
+
for (let l = c; l < e.length; l++) {
|
|
2886
|
+
let c = e[l] = s ? ps(e[l]) : fs(e[l]);
|
|
2887
|
+
v(null, c, t, n, r, i, a, o, s);
|
|
2888
|
+
}
|
|
2880
2889
|
}, re = (e, n, r, i, a, o, s) => {
|
|
2881
2890
|
let l = n.el = e.el;
|
|
2882
2891
|
process.env.NODE_ENV !== "production" && (l.__vnode = n);
|
|
@@ -2899,8 +2908,8 @@ function jo(e, i) {
|
|
|
2899
2908
|
}, i);
|
|
2900
2909
|
}, D = (e, t, n, r, i, a, o) => {
|
|
2901
2910
|
for (let s = 0; s < t.length; s++) {
|
|
2902
|
-
let c = e[s], l = t[s];
|
|
2903
|
-
v(c, l,
|
|
2911
|
+
let c = e[s], l = t[s], u = c.el && (c.type === Y || !$o(c, l) || c.shapeFlag & 198) ? m(c.el) : n;
|
|
2912
|
+
v(c, l, u, null, r, i, a, o, !0);
|
|
2904
2913
|
}
|
|
2905
2914
|
}, ie = (e, n, r, i, a) => {
|
|
2906
2915
|
if (n !== r) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@templatical/editor",
|
|
3
3
|
"description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"bugs": "https://github.com/templatical/sdk/issues",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@lucide/vue": "^1.
|
|
7
|
+
"@lucide/vue": "^1.23.0",
|
|
8
8
|
"@tiptap/core": "^3.27.1",
|
|
9
9
|
"@tiptap/extension-color": "^3.27.1",
|
|
10
10
|
"@tiptap/extension-font-family": "^3.27.1",
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
22
22
|
"@vue/test-utils": "^2.4.11",
|
|
23
23
|
"@vueuse/core": "^14.3.0",
|
|
24
|
-
"es-module-lexer": "^2.
|
|
24
|
+
"es-module-lexer": "^2.3.0",
|
|
25
25
|
"happy-dom": "^20.10.6",
|
|
26
26
|
"liquidjs": "^10.27.1",
|
|
27
|
-
"tailwindcss": "^4.3.
|
|
27
|
+
"tailwindcss": "^4.3.2",
|
|
28
28
|
"typescript": "^6.0.3",
|
|
29
29
|
"vanilla-colorful": "^0.7.2",
|
|
30
|
-
"vite": "^8.1.
|
|
30
|
+
"vite": "^8.1.3",
|
|
31
31
|
"vitest": "^4.1.9",
|
|
32
32
|
"vue": "^3.5.39",
|
|
33
33
|
"vue-draggable-plus": "^0.6.1",
|
|
34
|
-
"vue-tsc": "^3.3.
|
|
35
|
-
"@templatical/core": "0.
|
|
36
|
-
"@templatical/quality": "0.
|
|
37
|
-
"@templatical/types": "0.
|
|
34
|
+
"vue-tsc": "^3.3.6",
|
|
35
|
+
"@templatical/core": "0.14.0",
|
|
36
|
+
"@templatical/quality": "0.14.0",
|
|
37
|
+
"@templatical/types": "0.14.0"
|
|
38
38
|
},
|
|
39
39
|
"exports": {
|
|
40
40
|
".": {
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"license": "SEE LICENSE IN LICENSE",
|
|
63
63
|
"module": "./dist/templatical-editor.js",
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@templatical/
|
|
66
|
-
"@templatical/
|
|
67
|
-
"@templatical/renderer": "0.
|
|
65
|
+
"@templatical/media-library": "0.14.0",
|
|
66
|
+
"@templatical/quality": "0.14.0",
|
|
67
|
+
"@templatical/renderer": "0.14.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependenciesMeta": {
|
|
70
70
|
"@templatical/renderer": {
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { A as e, B as t, F as n, L as r, M as i, X as a, a as ee, b as o, c as s, d as c, f as l, h as u, i as te, l as d, m as ne, ot as re, p as f, rt as p, st as m, v as h, y as ie, z as ae } from "./vue.runtime.esm-bundler-B2k01iQh.js";
|
|
2
|
-
import "./useEditorCore-D7dQFRkw.js";
|
|
3
|
-
import { D as oe, N as g, m as se } from "./keys-mFiJ5N0_.js";
|
|
4
|
-
import { t as ce } from "./useI18n-CTs_bP9d.js";
|
|
5
|
-
import { n as le, r as _, t as v } from "./blockTypeIcons-C6UGDmrC.js";
|
|
6
|
-
import { t as ue } from "./trash-2-DpGb7fIt.js";
|
|
7
|
-
import { t as de } from "./x-CGjkjdKK.js";
|
|
8
|
-
import { n as fe } from "./useCloudI18n-L3H2XvdW.js";
|
|
9
|
-
import { t as pe } from "./TplModal-utMtXzSO.js";
|
|
10
|
-
//#region src/cloud/components/ModuleBrowserModal.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var me = {
|
|
12
|
-
role: "dialog",
|
|
13
|
-
"aria-modal": "true",
|
|
14
|
-
"aria-labelledby": "tpl-module-browser-title",
|
|
15
|
-
class: "tpl-scale-in tpl:mx-4 tpl:flex tpl:w-full tpl:max-w-[1000px] tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)]",
|
|
16
|
-
style: {
|
|
17
|
-
"background-color": "var(--tpl-bg-elevated)",
|
|
18
|
-
"box-shadow": "var(--tpl-shadow-xl)",
|
|
19
|
-
"max-height": "90vh"
|
|
20
|
-
}
|
|
21
|
-
}, he = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, y = {
|
|
22
|
-
id: "tpl-module-browser-title",
|
|
23
|
-
class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
24
|
-
}, b = ["aria-label"], x = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, S = { class: "tpl:flex tpl:w-[300px] tpl:shrink-0 tpl:flex-col tpl:overflow-hidden" }, C = { class: "tpl:px-4 tpl:pt-4 tpl:pb-3" }, w = { class: "tpl:relative" }, T = ["placeholder"], E = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:px-4 tpl:pb-4" }, D = {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "tpl:flex tpl:flex-col tpl:gap-1"
|
|
27
|
-
}, O = ["aria-pressed", "onClick"], k = { class: "tpl:flex tpl:items-center tpl:gap-2" }, A = { class: "tpl:flex-1 tpl:truncate tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, j = { class: "tpl:shrink-0 tpl:rounded-full tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]" }, M = { class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1" }, N = {
|
|
28
|
-
key: 0,
|
|
29
|
-
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
30
|
-
}, P = ["aria-label", "onClick"], F = [
|
|
31
|
-
"aria-label",
|
|
32
|
-
"title",
|
|
33
|
-
"onClick"
|
|
34
|
-
], I = {
|
|
35
|
-
key: 1,
|
|
36
|
-
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
|
|
37
|
-
}, L = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, R = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, ge = {
|
|
38
|
-
key: 0,
|
|
39
|
-
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
|
|
40
|
-
}, _e = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, ve = {
|
|
41
|
-
key: 1,
|
|
42
|
-
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
|
|
43
|
-
}, ye = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, be = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, xe = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Se = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Ce = ["value"], we = { class: "tpl:flex tpl:gap-2" }, Te = ["disabled"], z = /* @__PURE__ */ o({
|
|
44
|
-
__name: "ModuleBrowserModal",
|
|
45
|
-
props: { visible: { type: Boolean } },
|
|
46
|
-
emits: ["close", "insert"],
|
|
47
|
-
setup(o, { emit: z }) {
|
|
48
|
-
let Ee = o, B = z, De = ie(() => import("./ModulePreviewCanvas-CpaumPMS.js")), { t: Oe } = ce(), { t: V } = fe(), H = g(oe, "ModuleBrowserModal"), U = g(se, "ModuleBrowserModal"), W = a(""), G = a(null), K = a(null), q = a("end"), J = c(() => {
|
|
49
|
-
let e = H.modules.value;
|
|
50
|
-
if (!W.value) return e;
|
|
51
|
-
let t = W.value.toLowerCase();
|
|
52
|
-
return e.filter((e) => e.name.toLowerCase().includes(t));
|
|
53
|
-
}), Y = c(() => G.value ? H.modules.value.find((e) => e.id === G.value) ?? null : null), X = c(() => {
|
|
54
|
-
let e = [{
|
|
55
|
-
value: "beginning",
|
|
56
|
-
label: V.modules.insertAtBeginning
|
|
57
|
-
}], t = U.content.value.blocks;
|
|
58
|
-
for (let n = 0; n < t.length; n++) {
|
|
59
|
-
let r = t[n], i = r.type, a = Oe.blocks[i] ?? r.type;
|
|
60
|
-
e.push({
|
|
61
|
-
value: r.id,
|
|
62
|
-
label: V.modules.insertAfterBlock.replace("{block}", `${a} ${n + 1}`)
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
return e.push({
|
|
66
|
-
value: "end",
|
|
67
|
-
label: V.modules.insertAtEnd
|
|
68
|
-
}), e;
|
|
69
|
-
}), ke = c(() => {
|
|
70
|
-
if (q.value === "end") return;
|
|
71
|
-
if (q.value === "beginning") return 0;
|
|
72
|
-
let e = U.content.value.blocks.findIndex((e) => e.id === q.value);
|
|
73
|
-
if (e !== -1) return e + 1;
|
|
74
|
-
});
|
|
75
|
-
r(() => Ee.visible, (e) => {
|
|
76
|
-
if (e) {
|
|
77
|
-
W.value = "", G.value = null, K.value = null;
|
|
78
|
-
let e = U.state.selectedBlockId;
|
|
79
|
-
e ? q.value = U.content.value.blocks.findIndex((t) => t.id === e) === -1 ? "end" : e : q.value = "end";
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
function Ae(e) {
|
|
83
|
-
let t = [], n = /* @__PURE__ */ new Set();
|
|
84
|
-
for (let r of e.content) if (!n.has(r.type) && v[r.type] && (n.add(r.type), t.push({
|
|
85
|
-
type: r.type,
|
|
86
|
-
icon: v[r.type]
|
|
87
|
-
})), t.length >= 5) break;
|
|
88
|
-
return t;
|
|
89
|
-
}
|
|
90
|
-
function Z(e) {
|
|
91
|
-
let t = new Set(e.content.map((e) => e.type));
|
|
92
|
-
return Math.max(0, t.size - 5);
|
|
93
|
-
}
|
|
94
|
-
async function je(e) {
|
|
95
|
-
try {
|
|
96
|
-
await H.deleteModule(e), G.value === e && (G.value = null);
|
|
97
|
-
} finally {
|
|
98
|
-
K.value = null;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
function Q() {
|
|
102
|
-
Y.value && B("insert", Y.value, ke.value);
|
|
103
|
-
}
|
|
104
|
-
function $() {
|
|
105
|
-
B("close");
|
|
106
|
-
}
|
|
107
|
-
function Me(e) {
|
|
108
|
-
e.key === "Escape" && $(), e.key === "Enter" && Y.value && (e.preventDefault(), Q());
|
|
109
|
-
}
|
|
110
|
-
return (r, a) => (e(), f(pe, {
|
|
111
|
-
visible: o.visible,
|
|
112
|
-
onClose: $,
|
|
113
|
-
onKeydown: Me
|
|
114
|
-
}, {
|
|
115
|
-
default: ae(() => [l("div", me, [
|
|
116
|
-
l("div", he, [l("h3", y, m(p(V).modules.browse), 1), l("button", {
|
|
117
|
-
"aria-label": p(V).modules.close,
|
|
118
|
-
class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-1 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
|
|
119
|
-
onClick: $
|
|
120
|
-
}, [h(p(de), {
|
|
121
|
-
size: 16,
|
|
122
|
-
"stroke-width": 2
|
|
123
|
-
})], 8, b)]),
|
|
124
|
-
l("div", x, [l("div", S, [l("div", C, [l("div", w, [h(p(le), {
|
|
125
|
-
size: 14,
|
|
126
|
-
"stroke-width": 2,
|
|
127
|
-
class: "tpl:pointer-events-none tpl:absolute tpl:left-3 tpl:top-1/2 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]"
|
|
128
|
-
}), t(l("input", {
|
|
129
|
-
"onUpdate:modelValue": a[0] ||= (e) => W.value = e,
|
|
130
|
-
type: "text",
|
|
131
|
-
placeholder: p(V).modules.search,
|
|
132
|
-
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:pl-9 tpl:pr-3 tpl:text-sm tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
133
|
-
}, null, 8, T), [[ee, W.value]])])]), l("div", E, [J.value.length > 0 ? (e(), u("div", D, [(e(!0), u(d, null, i(J.value, (t) => (e(), u("button", {
|
|
134
|
-
key: t.id,
|
|
135
|
-
type: "button",
|
|
136
|
-
"aria-pressed": G.value === t.id,
|
|
137
|
-
class: "tpl:group/card tpl:w-full tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:bg-transparent tpl:px-3 tpl:py-2 tpl:text-left tpl:transition-all tpl:duration-[120ms]",
|
|
138
|
-
style: re({
|
|
139
|
-
borderColor: G.value === t.id ? "var(--tpl-primary)" : "var(--tpl-border)",
|
|
140
|
-
backgroundColor: G.value === t.id ? "var(--tpl-primary-light)" : "transparent"
|
|
141
|
-
}),
|
|
142
|
-
onClick: (e) => G.value = t.id
|
|
143
|
-
}, [l("div", k, [l("span", A, m(t.name), 1), l("span", j, m(p(V).modules.blockCount.replace("{count}", String(t.content.length))), 1)]), l("div", M, [
|
|
144
|
-
(e(!0), u(d, null, i(Ae(t), (t) => (e(), f(n(t.icon), {
|
|
145
|
-
key: t.type,
|
|
146
|
-
size: 14,
|
|
147
|
-
"stroke-width": 1.5,
|
|
148
|
-
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
149
|
-
}))), 128)),
|
|
150
|
-
Z(t) > 0 ? (e(), u("span", N, " +" + m(Z(t)), 1)) : ne("", !0),
|
|
151
|
-
K.value === t.id ? (e(), u("button", {
|
|
152
|
-
key: 1,
|
|
153
|
-
"aria-label": p(V).modules.deleteConfirm,
|
|
154
|
-
class: "tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-100 tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-danger)]",
|
|
155
|
-
style: { "background-color": "transparent" },
|
|
156
|
-
onClick: s((e) => je(t.id), ["stop"])
|
|
157
|
-
}, m(p(V).modules.deleteConfirm), 9, P)) : (e(), u("button", {
|
|
158
|
-
key: 2,
|
|
159
|
-
class: "tpl-module-delete-btn tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
|
|
160
|
-
"aria-label": p(V).modules.delete,
|
|
161
|
-
title: p(V).modules.delete,
|
|
162
|
-
onClick: s((e) => K.value = t.id, ["stop"])
|
|
163
|
-
}, [h(p(ue), {
|
|
164
|
-
size: 12,
|
|
165
|
-
"stroke-width": 1.5
|
|
166
|
-
})], 8, F))
|
|
167
|
-
])], 12, O))), 128))])) : (e(), u("div", I, [h(p(_), {
|
|
168
|
-
size: 32,
|
|
169
|
-
"stroke-width": 1,
|
|
170
|
-
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
171
|
-
}), l("p", L, m(W.value ? p(V).modules.noModules : p(V).modules.noModulesHint), 1)]))])]), l("div", R, [Y.value ? (e(), u("div", ge, [l("div", _e, [h(p(De), { blocks: Y.value.content }, null, 8, ["blocks"])])])) : (e(), u("div", ve, [h(p(_), {
|
|
172
|
-
size: 32,
|
|
173
|
-
"stroke-width": 1,
|
|
174
|
-
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
175
|
-
}), l("p", ye, m(p(V).modules.selectToPreview), 1)]))])]),
|
|
176
|
-
l("div", be, [l("div", xe, [l("label", Se, m(p(V).modules.insertPosition), 1), t(l("select", {
|
|
177
|
-
"onUpdate:modelValue": a[1] ||= (e) => q.value = e,
|
|
178
|
-
class: "tpl:h-7 tpl:max-w-[220px] tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
179
|
-
}, [(e(!0), u(d, null, i(X.value, (t) => (e(), u("option", {
|
|
180
|
-
key: t.value,
|
|
181
|
-
value: t.value
|
|
182
|
-
}, m(t.label), 9, Ce))), 128))], 512), [[te, q.value]])]), l("div", we, [l("button", {
|
|
183
|
-
type: "button",
|
|
184
|
-
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]",
|
|
185
|
-
onClick: $
|
|
186
|
-
}, m(p(V).modules.close), 1), l("button", {
|
|
187
|
-
type: "button",
|
|
188
|
-
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
189
|
-
disabled: !Y.value,
|
|
190
|
-
onClick: Q
|
|
191
|
-
}, m(p(V).modules.insert), 9, Te)])])
|
|
192
|
-
])]),
|
|
193
|
-
_: 1
|
|
194
|
-
}, 8, ["visible"]));
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
//#endregion
|
|
198
|
-
export { z as default };
|