@aswin.dev/editor 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-COL6Wm7p.js} +37 -37
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DWGPVtvC.js} +68 -68
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-duUFSfDf.js} +22 -22
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-Qs6HtXid.js} +12 -12
- package/dist/CloudEditor-CFldoCOb.js +1207 -0
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bw-lbt61.js} +21 -21
- package/dist/CommentsSidebar-BaD5F53-.js +436 -0
- package/dist/CountdownBlock-DaYGxKqo.js +92 -0
- package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-BSH7uNP_.js} +58 -58
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-Ba2pfF57.js} +2 -2
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-6phxZSKI.js} +80 -80
- package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-BpUzQOJt.js} +87 -87
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DNSzAB-I.js} +182 -182
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CrqPQdnk.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-zMQTpez7.js} +28 -28
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-Do-A5rYU.js} +45 -50
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-CS7o62zS.js} +75 -75
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-DGj_9V1u.js} +28 -28
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-C7IDnAoS.js} +68 -68
- package/dist/{TplModal-BwSfxIHf.js → TplModal-BAsVzcTb.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-C6LDKvmd.js} +19 -5
- package/dist/bundle-stats.json +7 -7
- package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
- package/dist/chevron-right-BqCptpdp.js +10 -0
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-6ZmAvF0j.js} +485 -427
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
- package/dist/{de-Brqvgr43.js → de-DWcgp-7T.js} +209 -1
- package/dist/{dist-BaQIYPsn.js → dist-BUzw1buG.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-BZyY-SS4.js} +1 -1
- package/dist/{dist-D6uC2xhi.js → dist-BadNx4qo.js} +1 -1
- package/dist/{dist-aRzjfSRN.js → dist-BesOh2mk.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-Bz3M4RXG.js} +3 -3
- package/dist/dist-C04s_fLA.js +563 -0
- package/dist/{dist-DDJIWTRY.js → dist-C3T2AKtB.js} +1 -1
- package/dist/{dist-BFawx6IS.js → dist-C9ckKEZL.js} +51 -51
- package/dist/{dist-us-RpCWN.js → dist-CBItRG-Z.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-COSzWQUs.js} +1 -1
- package/dist/dist-CivF9P8b.js +382 -0
- package/dist/{dist-Cp0zXPAD.js → dist-DtiDUrX-.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-Dzt5foyL.js} +1 -1
- package/dist/{en-WDVp87TE.js → en-Cxd4fhNm.js} +209 -1
- package/dist/{extensions-CUcl9Ok4.js → extensions-D__hOlV1.js} +106 -106
- package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
- package/dist/index.d.ts +88 -11
- package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
- package/dist/keys-CvX8D-8C.js +10 -0
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
- package/dist/pencil-BZJPNYWR.js +10 -0
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
- package/dist/{scan-line-D0vcUekt.js → scan-line-CzfFJO1o.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-D2eSo4GH.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-jkpgcC0-.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-Chm5CZfb.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styleConstants-34eUKPOZ.js +55 -0
- package/dist/styles-B4tjX5SP.js +5224 -0
- package/dist/templatical-editor.js +189 -126
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-CzBnJsW8.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-CtK2apEH.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-KpDVNbpn.js} +1 -1
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-DOKSZql1.js} +2 -2
- package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-wslttMH-.js} +2425 -2250
- package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-DX0XG5V9.js} +5 -5
- package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
- package/dist/{x-u2oVmjN_.js → x-BkaOMosX.js} +1 -1
- package/package.json +10 -10
- package/dist/CloudEditor-BCz1ZTYC.js +0 -1172
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +0 -97
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +0 -59
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +0 -33
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +0 -51
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +0 -423
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +0 -544
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +0 -106
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +0 -119
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +0 -171
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
- package/dist/cdn/chunks/de-Ce-LbJ2J.js +0 -89
- package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +0 -1
- package/dist/cdn/chunks/de-D8CnZxV9.js +0 -523
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
- package/dist/cdn/chunks/de-RQrZR56a.js +0 -209
- package/dist/cdn/chunks/de-RQrZR56a.js.map +0 -1
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +0 -19
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +0 -1
- package/dist/cdn/chunks/en-8FHaQv4V.js +0 -523
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
- package/dist/cdn/chunks/en-Bl1ecfRF.js +0 -209
- package/dist/cdn/chunks/en-Bl1ecfRF.js.map +0 -1
- package/dist/cdn/chunks/en-DiCWK5fG.js +0 -89
- package/dist/cdn/chunks/en-DiCWK5fG.js.map +0 -1
- package/dist/cdn/chunks/extensions-DIxF31tA.js +0 -598
- package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js +0 -6814
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/icons-CsLTcirh.js +0 -700
- package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +0 -3279
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
- package/dist/cdn/chunks/media-library-CVaNvhpM.js +0 -6014
- package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
- package/dist/cdn/chunks/pusher-CDbNlZBE.js +0 -2508
- package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +0 -1
- package/dist/cdn/chunks/quality-BaBfc54_.js +0 -1456
- package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +0 -32
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +0 -1
- package/dist/cdn/chunks/renderer-CUxvx7ro.js +0 -548
- package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
- package/dist/cdn/chunks/src-CRaqN-p8.js +0 -497
- package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +0 -14654
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +0 -1
- package/dist/cdn/editor.css +0 -2
- package/dist/cdn/editor.js +0 -250
- package/dist/cdn/editor.js.map +0 -1
- package/dist/dist-B1IR0bpH.js +0 -326
- package/dist/dist-DJmnUmW9.js +0 -362
- package/dist/keys-ciNfSSGj.js +0 -10
- package/dist/styleConstants-fWzlIIwN.js +0 -55
- package/dist/styles-DEXEkBvg.js +0 -3176
- /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-BVAJ4lgT.js} +0 -0
- /package/dist/{de-DCaaCE5s.js → de-GOtR9DwW.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-DXa1uAMh.js} +0 -0
- /package/dist/{emojiData-PQyVa4bU.js → emojiData-DrBuvEoP.js} +0 -0
- /package/dist/{en-DXCyK4-X.js → en-dFFQVzNn.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-BhhO8yCl.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-BvCyLQII.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-DVuzNX1y.js} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./useEditorCore-
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { n as
|
|
10
|
-
import { t as
|
|
11
|
-
var
|
|
1
|
+
import { C as e, F as t, Ft as n, N as r, R as i, S as a, U as ee, V as o, W as s, _ as te, c as ne, d as c, et as l, f as u, g as d, h as f, jt as re, m as p, s as ie, st as m, v as h, x as g } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
+
import "./useEditorCore-wslttMH-.js";
|
|
3
|
+
import { A as _, T as ae, m as oe } from "./keys-CvX8D-8C.js";
|
|
4
|
+
import { t as se } from "./useI18n-C2xQZ6K9.js";
|
|
5
|
+
import { t as v } from "./createLucideIcon-ClREiSx3.js";
|
|
6
|
+
import { n as y, t as b } from "./blockTypeIcons-C6LDKvmd.js";
|
|
7
|
+
import { t as ce } from "./trash-2-CtK2apEH.js";
|
|
8
|
+
import { t as le } from "./x-BkaOMosX.js";
|
|
9
|
+
import { n as ue } from "./useCloudI18n-DOKSZql1.js";
|
|
10
|
+
import { t as de } from "./TplModal-BAsVzcTb.js";
|
|
11
|
+
var fe = v("search", [["path", {
|
|
12
12
|
d: "m21 21-4.34-4.34",
|
|
13
13
|
key: "14j7rj"
|
|
14
14
|
}], ["circle", {
|
|
@@ -16,7 +16,7 @@ var pe = _("search", [["path", {
|
|
|
16
16
|
cy: "11",
|
|
17
17
|
r: "8",
|
|
18
18
|
key: "4ej97u"
|
|
19
|
-
}]]),
|
|
19
|
+
}]]), pe = {
|
|
20
20
|
role: "dialog",
|
|
21
21
|
"aria-modal": "true",
|
|
22
22
|
"aria-labelledby": "tpl-module-browser-title",
|
|
@@ -26,7 +26,7 @@ var pe = _("search", [["path", {
|
|
|
26
26
|
"box-shadow": "var(--tpl-shadow-xl)",
|
|
27
27
|
"max-height": "90vh"
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, me = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, he = {
|
|
30
30
|
id: "tpl-module-browser-title",
|
|
31
31
|
class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
32
32
|
}, x = ["aria-label"], S = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, C = { class: "tpl:flex tpl:w-[300px] tpl:shrink-0 tpl:flex-col tpl:overflow-hidden" }, w = { class: "tpl:px-4 tpl:pt-4 tpl:pb-3" }, T = { class: "tpl:relative" }, E = ["placeholder"], D = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:px-4 tpl:pb-4" }, O = {
|
|
@@ -42,56 +42,56 @@ var pe = _("search", [["path", {
|
|
|
42
42
|
], L = {
|
|
43
43
|
key: 1,
|
|
44
44
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
|
|
45
|
-
}, R = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ge = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" },
|
|
45
|
+
}, R = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ge = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, _e = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
|
|
48
|
-
},
|
|
48
|
+
}, ve = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, ye = {
|
|
49
49
|
key: 1,
|
|
50
50
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
|
|
51
|
-
},
|
|
51
|
+
}, be = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, xe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, Se = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ce = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, we = ["value"], Te = { class: "tpl:flex tpl:gap-2" }, Ee = ["disabled"], z = /* @__PURE__ */ e({
|
|
52
52
|
__name: "ModuleBrowserModal",
|
|
53
53
|
props: { visible: { type: Boolean } },
|
|
54
54
|
emits: ["close", "insert"],
|
|
55
|
-
setup(
|
|
56
|
-
let
|
|
57
|
-
let e =
|
|
58
|
-
if (!
|
|
59
|
-
let t =
|
|
55
|
+
setup(e, { emit: v }) {
|
|
56
|
+
let z = e, B = v, De = a(() => import("./ModulePreviewCanvas-BW8L3eQX.js")), { t: Oe } = se(), { t: V } = ue(), H = _(ae, "ModuleBrowserModal"), U = _(oe, "ModuleBrowserModal"), W = l(""), G = l(null), K = l(null), q = l("end"), J = p(() => {
|
|
57
|
+
let e = H.modules.value;
|
|
58
|
+
if (!W.value) return e;
|
|
59
|
+
let t = W.value.toLowerCase();
|
|
60
60
|
return e.filter((e) => e.name.toLowerCase().includes(t));
|
|
61
|
-
}),
|
|
61
|
+
}), Y = p(() => G.value ? H.modules.value.find((e) => e.id === G.value) ?? null : null), X = p(() => {
|
|
62
62
|
let e = [{
|
|
63
63
|
value: "beginning",
|
|
64
|
-
label:
|
|
65
|
-
}], t =
|
|
64
|
+
label: V.modules.insertAtBeginning
|
|
65
|
+
}], t = U.content.value.blocks;
|
|
66
66
|
for (let n = 0; n < t.length; n++) {
|
|
67
|
-
let r = t[n], i = r.type, a =
|
|
67
|
+
let r = t[n], i = r.type, a = Oe.blocks[i] ?? r.type;
|
|
68
68
|
e.push({
|
|
69
69
|
value: r.id,
|
|
70
|
-
label:
|
|
70
|
+
label: V.modules.insertAfterBlock.replace("{block}", `${a} ${n + 1}`)
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
return e.push({
|
|
74
74
|
value: "end",
|
|
75
|
-
label:
|
|
75
|
+
label: V.modules.insertAtEnd
|
|
76
76
|
}), e;
|
|
77
|
-
}), ke =
|
|
78
|
-
if (
|
|
79
|
-
if (
|
|
80
|
-
let e =
|
|
77
|
+
}), ke = p(() => {
|
|
78
|
+
if (q.value === "end") return;
|
|
79
|
+
if (q.value === "beginning") return 0;
|
|
80
|
+
let e = U.content.value.blocks.findIndex((e) => e.id === q.value);
|
|
81
81
|
if (e !== -1) return e + 1;
|
|
82
82
|
});
|
|
83
|
-
|
|
83
|
+
o(() => z.visible, (e) => {
|
|
84
84
|
if (e) {
|
|
85
|
-
|
|
86
|
-
let e =
|
|
87
|
-
e ?
|
|
85
|
+
W.value = "", G.value = null, K.value = null;
|
|
86
|
+
let e = U.state.selectedBlockId;
|
|
87
|
+
e ? q.value = U.content.value.blocks.findIndex((t) => t.id === e) === -1 ? "end" : e : q.value = "end";
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
function Ae(e) {
|
|
91
91
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
92
|
-
for (let r of e.content) if (!n.has(r.type) &&
|
|
92
|
+
for (let r of e.content) if (!n.has(r.type) && b[r.type] && (n.add(r.type), t.push({
|
|
93
93
|
type: r.type,
|
|
94
|
-
icon:
|
|
94
|
+
icon: b[r.type]
|
|
95
95
|
})), t.length >= 5) break;
|
|
96
96
|
return t;
|
|
97
97
|
}
|
|
@@ -101,106 +101,106 @@ var pe = _("search", [["path", {
|
|
|
101
101
|
}
|
|
102
102
|
async function je(e) {
|
|
103
103
|
try {
|
|
104
|
-
await
|
|
104
|
+
await H.deleteModule(e), G.value === e && (G.value = null);
|
|
105
105
|
} finally {
|
|
106
|
-
|
|
106
|
+
K.value = null;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
function Q() {
|
|
110
|
-
|
|
110
|
+
Y.value && B("insert", Y.value, ke.value);
|
|
111
111
|
}
|
|
112
112
|
function $() {
|
|
113
|
-
|
|
113
|
+
B("close");
|
|
114
114
|
}
|
|
115
115
|
function Me(e) {
|
|
116
|
-
e.key === "Escape" && $(), e.key === "Enter" &&
|
|
116
|
+
e.key === "Escape" && $(), e.key === "Enter" && Y.value && (e.preventDefault(), Q());
|
|
117
117
|
}
|
|
118
|
-
return (
|
|
119
|
-
visible:
|
|
118
|
+
return (a, o) => (r(), d(de, {
|
|
119
|
+
visible: e.visible,
|
|
120
120
|
onClose: $,
|
|
121
121
|
onKeydown: Me
|
|
122
122
|
}, {
|
|
123
|
-
default: ee(() => [
|
|
124
|
-
|
|
125
|
-
"aria-label":
|
|
123
|
+
default: ee(() => [f("div", pe, [
|
|
124
|
+
f("div", me, [f("h3", he, n(m(V).modules.browse), 1), f("button", {
|
|
125
|
+
"aria-label": m(V).modules.close,
|
|
126
126
|
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)]",
|
|
127
127
|
onClick: $
|
|
128
|
-
}, [
|
|
128
|
+
}, [g(m(le), {
|
|
129
129
|
size: 16,
|
|
130
130
|
"stroke-width": 2
|
|
131
131
|
})], 8, x)]),
|
|
132
|
-
|
|
132
|
+
f("div", S, [f("div", C, [f("div", w, [f("div", T, [g(m(fe), {
|
|
133
133
|
size: 14,
|
|
134
134
|
"stroke-width": 2,
|
|
135
135
|
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)]"
|
|
136
|
-
}),
|
|
137
|
-
"onUpdate:modelValue":
|
|
136
|
+
}), s(f("input", {
|
|
137
|
+
"onUpdate:modelValue": o[0] ||= (e) => W.value = e,
|
|
138
138
|
type: "text",
|
|
139
|
-
placeholder:
|
|
139
|
+
placeholder: m(V).modules.search,
|
|
140
140
|
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)]"
|
|
141
|
-
}, null, 8, E), [[
|
|
141
|
+
}, null, 8, E), [[ne, W.value]])])]), f("div", D, [J.value.length > 0 ? (r(), h("div", O, [(r(!0), h(u, null, t(J.value, (e) => (r(), h("button", {
|
|
142
142
|
key: e.id,
|
|
143
143
|
type: "button",
|
|
144
|
-
"aria-pressed":
|
|
144
|
+
"aria-pressed": G.value === e.id,
|
|
145
145
|
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]",
|
|
146
|
-
style:
|
|
147
|
-
borderColor:
|
|
148
|
-
backgroundColor:
|
|
146
|
+
style: re({
|
|
147
|
+
borderColor: G.value === e.id ? "var(--tpl-primary)" : "var(--tpl-border)",
|
|
148
|
+
backgroundColor: G.value === e.id ? "var(--tpl-primary-light)" : "transparent"
|
|
149
149
|
}),
|
|
150
|
-
onClick: (t) =>
|
|
151
|
-
}, [
|
|
152
|
-
(
|
|
150
|
+
onClick: (t) => G.value = e.id
|
|
151
|
+
}, [f("div", A, [f("span", j, n(e.name), 1), f("span", M, n(m(V).modules.blockCount.replace("{count}", String(e.content.length))), 1)]), f("div", N, [
|
|
152
|
+
(r(!0), h(u, null, t(Ae(e), (e) => (r(), d(i(e.icon), {
|
|
153
153
|
key: e.type,
|
|
154
154
|
size: 14,
|
|
155
155
|
"stroke-width": 1.5,
|
|
156
156
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
157
157
|
}))), 128)),
|
|
158
|
-
Z(e) > 0 ? (
|
|
159
|
-
|
|
158
|
+
Z(e) > 0 ? (r(), h("span", P, " +" + n(Z(e)), 1)) : te("", !0),
|
|
159
|
+
K.value === e.id ? (r(), h("button", {
|
|
160
160
|
key: 1,
|
|
161
|
-
"aria-label":
|
|
161
|
+
"aria-label": m(V).modules.deleteConfirm,
|
|
162
162
|
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)]",
|
|
163
163
|
style: { "background-color": "transparent" },
|
|
164
|
-
onClick:
|
|
165
|
-
},
|
|
164
|
+
onClick: c((t) => je(e.id), ["stop"])
|
|
165
|
+
}, n(m(V).modules.deleteConfirm), 9, F)) : (r(), h("button", {
|
|
166
166
|
key: 2,
|
|
167
167
|
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)]",
|
|
168
|
-
"aria-label":
|
|
169
|
-
title:
|
|
170
|
-
onClick:
|
|
171
|
-
}, [
|
|
168
|
+
"aria-label": m(V).modules.delete,
|
|
169
|
+
title: m(V).modules.delete,
|
|
170
|
+
onClick: c((t) => K.value = e.id, ["stop"])
|
|
171
|
+
}, [g(m(ce), {
|
|
172
172
|
size: 12,
|
|
173
173
|
"stroke-width": 1.5
|
|
174
174
|
})], 8, I))
|
|
175
|
-
])], 12, k))), 128))])) : (
|
|
175
|
+
])], 12, k))), 128))])) : (r(), h("div", L, [g(m(y), {
|
|
176
176
|
size: 32,
|
|
177
177
|
"stroke-width": 1,
|
|
178
178
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
179
|
-
}),
|
|
179
|
+
}), f("p", R, n(W.value ? m(V).modules.noModules : m(V).modules.noModulesHint), 1)]))])]), f("div", ge, [Y.value ? (r(), h("div", _e, [f("div", ve, [g(m(De), { blocks: Y.value.content }, null, 8, ["blocks"])])])) : (r(), h("div", ye, [g(m(y), {
|
|
180
180
|
size: 32,
|
|
181
181
|
"stroke-width": 1,
|
|
182
182
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
183
|
-
}),
|
|
184
|
-
|
|
185
|
-
"onUpdate:modelValue":
|
|
183
|
+
}), f("p", be, n(m(V).modules.selectToPreview), 1)]))])]),
|
|
184
|
+
f("div", xe, [f("div", Se, [f("label", Ce, n(m(V).modules.insertPosition), 1), s(f("select", {
|
|
185
|
+
"onUpdate:modelValue": o[1] ||= (e) => q.value = e,
|
|
186
186
|
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)]"
|
|
187
|
-
}, [(
|
|
187
|
+
}, [(r(!0), h(u, null, t(X.value, (e) => (r(), h("option", {
|
|
188
188
|
key: e.value,
|
|
189
189
|
value: e.value
|
|
190
|
-
},
|
|
190
|
+
}, n(e.label), 9, we))), 128))], 512), [[ie, q.value]])]), f("div", Te, [f("button", {
|
|
191
191
|
type: "button",
|
|
192
192
|
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)]",
|
|
193
193
|
onClick: $
|
|
194
|
-
},
|
|
194
|
+
}, n(m(V).modules.close), 1), f("button", {
|
|
195
195
|
type: "button",
|
|
196
196
|
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)]",
|
|
197
|
-
disabled: !
|
|
197
|
+
disabled: !Y.value,
|
|
198
198
|
onClick: Q
|
|
199
|
-
},
|
|
199
|
+
}, n(m(V).modules.insert), 9, Ee)])])
|
|
200
200
|
])]),
|
|
201
201
|
_: 1
|
|
202
202
|
}, 8, ["visible"]));
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
205
|
//#endregion
|
|
206
|
-
export {
|
|
206
|
+
export { z as default };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { C as e, D as t, F as n, L as r, N as i, R as a, f as o, g as s, h as c, jt as l, m as u, st as d, v as f } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
+
import { P as p, _ as m, a as h, b as g, f as _, g as v, h as y, i as b, m as x, n as S, p as C, r as w, u as T, v as E, y as D } from "./useEditorCore-wslttMH-.js";
|
|
3
|
+
import { s as O } from "./keys-CvX8D-8C.js";
|
|
4
|
+
//#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var k = { class: "tpl:w-full" }, A = { class: "tpl:flex tpl:gap-0" }, j = /* @__PURE__ */ e({
|
|
6
|
+
name: "PreviewSectionBlock",
|
|
7
|
+
__name: "PreviewSectionBlock",
|
|
8
|
+
props: {
|
|
9
|
+
block: {},
|
|
10
|
+
viewport: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
let j = {
|
|
14
|
+
title: T,
|
|
15
|
+
paragraph: x,
|
|
16
|
+
image: m,
|
|
17
|
+
video: S,
|
|
18
|
+
button: p,
|
|
19
|
+
input: v,
|
|
20
|
+
divider: D,
|
|
21
|
+
social: h,
|
|
22
|
+
menu: y,
|
|
23
|
+
table: w,
|
|
24
|
+
spacer: b,
|
|
25
|
+
html: E,
|
|
26
|
+
custom: g
|
|
27
|
+
}, M = e, N = t(O, null), P = u(() => {
|
|
28
|
+
switch (M.block.columns) {
|
|
29
|
+
case "2": return ["50%", "50%"];
|
|
30
|
+
case "3": return [
|
|
31
|
+
"33.33%",
|
|
32
|
+
"33.33%",
|
|
33
|
+
"33.33%"
|
|
34
|
+
];
|
|
35
|
+
case "1-2": return ["33.33%", "66.67%"];
|
|
36
|
+
case "2-1": return ["66.67%", "33.33%"];
|
|
37
|
+
default: return ["100%"];
|
|
38
|
+
}
|
|
39
|
+
}), F = u(() => {
|
|
40
|
+
let e = P.value.length, t = [...M.block.children];
|
|
41
|
+
for (; t.length < e;) t.push([]);
|
|
42
|
+
return t.slice(0, e);
|
|
43
|
+
});
|
|
44
|
+
function I(e) {
|
|
45
|
+
return F.value[e] || [];
|
|
46
|
+
}
|
|
47
|
+
function L(e) {
|
|
48
|
+
return C(e, N, j);
|
|
49
|
+
}
|
|
50
|
+
return (e, t) => {
|
|
51
|
+
let u = r("PreviewSectionBlock", !0);
|
|
52
|
+
return i(), f("div", k, [c("div", A, [(i(!0), f(o, null, n(F.value, (e, t) => (i(), f("div", {
|
|
53
|
+
key: t,
|
|
54
|
+
style: l({ width: P.value[t] })
|
|
55
|
+
}, [(i(!0), f(o, null, n(I(t), (e) => (i(), f("div", {
|
|
56
|
+
key: e.id,
|
|
57
|
+
style: l(d(_)(e))
|
|
58
|
+
}, [e.type === "section" ? (i(), s(u, {
|
|
59
|
+
key: 0,
|
|
60
|
+
block: e,
|
|
61
|
+
viewport: "desktop"
|
|
62
|
+
}, null, 8, ["block"])) : (i(), s(a(L(e)), {
|
|
63
|
+
key: 1,
|
|
64
|
+
block: e,
|
|
65
|
+
viewport: "desktop"
|
|
66
|
+
}, null, 8, ["block"]))], 4))), 128))], 4))), 128))])]);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}), M = {
|
|
70
|
+
class: "tpl:pointer-events-none tpl:mx-auto tpl:w-[600px] tpl:select-none tpl:rounded-lg",
|
|
71
|
+
style: {
|
|
72
|
+
"background-color": "var(--tpl-canvas-bg)",
|
|
73
|
+
"box-shadow": "var(--tpl-shadow-sm)"
|
|
74
|
+
}
|
|
75
|
+
}, N = /* @__PURE__ */ e({
|
|
76
|
+
__name: "ModulePreviewCanvas",
|
|
77
|
+
props: { blocks: {} },
|
|
78
|
+
setup(e) {
|
|
79
|
+
let r = t(O), c = {
|
|
80
|
+
section: j,
|
|
81
|
+
title: T,
|
|
82
|
+
paragraph: x,
|
|
83
|
+
image: m,
|
|
84
|
+
video: S,
|
|
85
|
+
button: p,
|
|
86
|
+
input: v,
|
|
87
|
+
divider: D,
|
|
88
|
+
social: h,
|
|
89
|
+
menu: y,
|
|
90
|
+
table: w,
|
|
91
|
+
spacer: b,
|
|
92
|
+
html: E,
|
|
93
|
+
custom: g
|
|
94
|
+
};
|
|
95
|
+
function u(e) {
|
|
96
|
+
return C(e, r, c);
|
|
97
|
+
}
|
|
98
|
+
return (t, r) => (i(), f("div", M, [(i(!0), f(o, null, n(e.blocks, (e) => (i(), f("div", {
|
|
99
|
+
key: e.id,
|
|
100
|
+
style: l(d(_)(e))
|
|
101
|
+
}, [(i(), s(a(u(e)), {
|
|
102
|
+
block: e,
|
|
103
|
+
viewport: "desktop"
|
|
104
|
+
}, null, 8, ["block"]))], 4))), 128))]));
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
//#endregion
|
|
108
|
+
export { N as default };
|