@templatical/editor 0.27.2 → 0.27.4
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-iVJDzqjr.js → AiChatSidebar-LstHjwBU.js} +8 -8
- package/dist/{AiFeatureMenu-DrLGc2H2.js → AiFeatureMenu-DVQrznsN.js} +6 -6
- package/dist/{BlockIssueBadge-BHysq7XQ.js → BlockIssueBadge-DKaFQNxW.js} +4 -4
- package/dist/{BlockPreviewCanvas-2WASf5A4.js → BlockPreviewCanvas-D9eC04OA.js} +2 -2
- package/dist/{CloudHeaderExtras-DWApyc4P.js → CloudHeaderExtras-DX0j3CJ3.js} +3 -3
- package/dist/{CloudPanels-DvOhGdRj.js → CloudPanels-DCeNSwXy.js} +5 -5
- package/dist/{CollaboratorBar-C6MC0UCk.js → CollaboratorBar-BZ-JCjdM.js} +3 -3
- package/dist/{ColorPicker-Di8L5TLQ.js → ColorPicker-j0TQu5lE.js} +4 -4
- package/dist/{CommentsPanel-D5wQB1Kf.js → CommentsPanel-c5LmzlNN.js} +1 -1
- package/dist/{CommentsSidebar-BoTIxpLE.js → CommentsSidebar-Bm1DxFb5.js} +12 -12
- package/dist/{CountdownBlock-BFX8iU90.js → CountdownBlock-qKtJVRIV.js} +1 -1
- package/dist/{CountdownToolbar-d9QM4m5x.js → CountdownToolbar-UPdwNvVI.js} +2 -2
- package/dist/{DesignReferenceSidebar-DKsx2TiL.js → DesignReferenceSidebar-C8WTApc5.js} +7 -7
- package/dist/{IssuesPanel-flKKwKpM.js → IssuesPanel-D49aJjLS.js} +41 -40
- package/dist/{MergeTagModeToggle-PKCoKAoF.js → MergeTagModeToggle-CVzJY9b2.js} +4 -4
- package/dist/{ParagraphEditor-iwTjkjtx.js → ParagraphEditor-C9-jQ5zP.js} +11 -11
- package/dist/{RestoreVersionDialog-DyMPGfsr.js → RestoreVersionDialog-Ds6gEF5u.js} +4 -4
- package/dist/{RichTextEditorContent-BVXG9oF4.js → RichTextEditorContent-CO1se6ln.js} +6 -6
- package/dist/{SaveBlockDialog-BMCAIfK9.js → SaveBlockDialog-DJIcncsU.js} +8 -8
- package/dist/{SavedBlocksBrowserModal-p5ma1qay.js → SavedBlocksBrowserModal-BUhhkGEb.js} +9 -9
- package/dist/{SavedBlocksPanels-BsiSstsZ.js → SavedBlocksPanels-DBfPz4iB.js} +1 -1
- package/dist/{SavedBlocksPickBar-fU4Mjm-8.js → SavedBlocksPickBar-D9NsfzCB.js} +3 -3
- package/dist/{TemplateScoringPanel-Bv_bBsJi.js → TemplateScoringPanel-BFsUqnXR.js} +12 -12
- package/dist/{TestEmailModal-EFYcrmTk.js → TestEmailModal-DARwBqpV.js} +8 -8
- package/dist/{TestEmailPanel-ljriUqs1.js → TestEmailPanel-BkgAew1S.js} +1 -1
- package/dist/{TitleEditor-BqRW7HTz.js → TitleEditor-BWLwZh84.js} +8 -8
- package/dist/{TplModal-CTC9-w6B.js → TplModal-CJLs8as_.js} +3 -3
- package/dist/{VersionHistoryMenu-Cq4rH56t.js → VersionHistoryMenu-CrIVG_SN.js} +11 -11
- package/dist/{VersionHistoryPanels-GkxkBiSi.js → VersionHistoryPanels-s45U7XY-.js} +1 -1
- package/dist/{VersionPreviewBanner-BdtTu9mI.js → VersionPreviewBanner-BIy95B34.js} +2 -2
- package/dist/{blockTypeIcons-CIrMr1SJ.js → blockTypeIcons-BjUkQsAe.js} +2 -2
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AiChatSidebar-DTUoBH5a.js → AiChatSidebar-tZqbhmuJ.js} +3 -3
- package/dist/cdn/chunks/{AiChatSidebar-DTUoBH5a.js.map → AiChatSidebar-tZqbhmuJ.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-BQz9Kczt.js → AiFeatureMenu-BhtNkpIq.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-BQz9Kczt.js.map → AiFeatureMenu-BhtNkpIq.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-UzSSOM_2.js → BlockIssueBadge-D9L8j7Db.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-UzSSOM_2.js.map → BlockIssueBadge-D9L8j7Db.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-40ocpXDD.js → BlockPreviewCanvas-Bt7fFzIQ.js} +3 -3
- package/dist/cdn/chunks/{BlockPreviewCanvas-40ocpXDD.js.map → BlockPreviewCanvas-Bt7fFzIQ.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-F_ySlW1S.js → CloudHeaderExtras-CScGpeLl.js} +4 -4
- package/dist/cdn/chunks/{CloudHeaderExtras-F_ySlW1S.js.map → CloudHeaderExtras-CScGpeLl.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-C34bcHpc.js → CloudPanels-DVtJkWsj.js} +6 -6
- package/dist/cdn/chunks/{CloudPanels-C34bcHpc.js.map → CloudPanels-DVtJkWsj.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-WBtrPPnM.js → CollaboratorBar-BH1lM_Ta.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-WBtrPPnM.js.map → CollaboratorBar-BH1lM_Ta.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-CxKYd_8N.js → ColorPicker-d4kY7WWd.js} +5 -5
- package/dist/cdn/chunks/{ColorPicker-CxKYd_8N.js.map → ColorPicker-d4kY7WWd.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-jzZ2X0P4.js → CommentsPanel-COhQMagD.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-jzZ2X0P4.js.map → CommentsPanel-COhQMagD.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Dxke-vUP.js → CommentsSidebar-vzLX-_h3.js} +4 -4
- package/dist/cdn/chunks/{CommentsSidebar-Dxke-vUP.js.map → CommentsSidebar-vzLX-_h3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-BYSrJWxg.js → CountdownBlock-BKrYGRiT.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-BYSrJWxg.js.map → CountdownBlock-BKrYGRiT.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-pVbkPNVo.js → CountdownToolbar-BRDbI1mM.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-pVbkPNVo.js.map → CountdownToolbar-BRDbI1mM.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-sZWciECR.js → DesignReferenceSidebar-npLxDRJI.js} +4 -4
- package/dist/cdn/chunks/{DesignReferenceSidebar-sZWciECR.js.map → DesignReferenceSidebar-npLxDRJI.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CHtetM9i.js → IssuesPanel-CTGlv7HF.js} +37 -35
- package/dist/cdn/chunks/IssuesPanel-CTGlv7HF.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-ZwW-5EeN.js → MergeTagModeToggle-CkpKFx9N.js} +4 -4
- package/dist/cdn/chunks/{MergeTagModeToggle-ZwW-5EeN.js.map → MergeTagModeToggle-CkpKFx9N.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BBcIQQK2.js → ParagraphEditor-BgeeE0Gj.js} +9 -9
- package/dist/cdn/chunks/{ParagraphEditor-BBcIQQK2.js.map → ParagraphEditor-BgeeE0Gj.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-DNUZHFa_.js → RestoreVersionDialog-tfoAQAeP.js} +4 -4
- package/dist/cdn/chunks/{RestoreVersionDialog-DNUZHFa_.js.map → RestoreVersionDialog-tfoAQAeP.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Cl-acKAD.js → RichTextEditorContent-DvLBtUcW.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-Cl-acKAD.js.map → RichTextEditorContent-DvLBtUcW.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BXTZ729e.js → SaveBlockDialog-D67K2lHn.js} +7 -7
- package/dist/cdn/chunks/{SaveBlockDialog-BXTZ729e.js.map → SaveBlockDialog-D67K2lHn.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BqGNBpRR.js → SavedBlocksBrowserModal-BxVR-yDt.js} +8 -8
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BqGNBpRR.js.map → SavedBlocksBrowserModal-BxVR-yDt.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-nbK0UQTp.js → SavedBlocksPanels-VkKCO0uY.js} +2 -2
- package/dist/cdn/chunks/SavedBlocksPanels-VkKCO0uY.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPickBar-B9mbw3Gk.js → SavedBlocksPickBar-BJHQDgUT.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-B9mbw3Gk.js.map → SavedBlocksPickBar-BJHQDgUT.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-Xdkp2EMY.js → TemplateScoringPanel-MvdrkgqL.js} +4 -4
- package/dist/cdn/chunks/{TemplateScoringPanel-Xdkp2EMY.js.map → TemplateScoringPanel-MvdrkgqL.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DE6fi3he.js → TestEmailModal-CEBFCevy.js} +8 -8
- package/dist/cdn/chunks/{TestEmailModal-DE6fi3he.js.map → TestEmailModal-CEBFCevy.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-CAjQDXle.js → TestEmailPanel-C35nqIIl.js} +2 -2
- package/dist/cdn/chunks/TestEmailPanel-C35nqIIl.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-BP0ewaWF.js → TitleEditor-c2aQCyds.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-BP0ewaWF.js.map → TitleEditor-c2aQCyds.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-C4kJduTr.js → TplModal-DSTVZKuI.js} +4 -4
- package/dist/cdn/chunks/{TplModal-C4kJduTr.js.map → TplModal-DSTVZKuI.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-_MAj3qZj.js → VersionHistoryMenu-BNYSIjVj.js} +5 -5
- package/dist/cdn/chunks/{VersionHistoryMenu-_MAj3qZj.js.map → VersionHistoryMenu-BNYSIjVj.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DMq2PRee.js → VersionHistoryPanels-CvWySHUE.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-DMq2PRee.js.map → VersionHistoryPanels-CvWySHUE.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-04CL1SGY.js → VersionPreviewBanner-CBVDWnhq.js} +3 -3
- package/dist/cdn/chunks/VersionPreviewBanner-CBVDWnhq.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-hX_W4dqo.js → blockTypeIcons-A9qFb1cR.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-hX_W4dqo.js.map → blockTypeIcons-A9qFb1cR.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-gXA8_QRU.js → createCloudRuntime-DYDf_-rN.js} +3 -3
- package/dist/cdn/chunks/{createCloudRuntime-gXA8_QRU.js.map → createCloudRuntime-DYDf_-rN.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CMcVw2uu.js → extensions-Byo2sA1r.js} +3 -3
- package/dist/cdn/chunks/{extensions-CMcVw2uu.js.map → extensions-Byo2sA1r.js.map} +1 -1
- package/dist/cdn/chunks/{icons-C36Ha5VU.js → icons-Dl5bcXmT.js} +7 -7
- package/dist/cdn/chunks/{icons-C36Ha5VU.js.map → icons-Dl5bcXmT.js.map} +1 -1
- package/dist/cdn/chunks/{keys-CbQuRX85.js → keys-oJdkdtPn.js} +2 -2
- package/dist/cdn/chunks/{keys-CbQuRX85.js.map → keys-oJdkdtPn.js.map} +1 -1
- package/dist/cdn/chunks/{src-D5lajkK5.js → src-BAWlZu4B.js} +3 -3
- package/dist/cdn/chunks/{src-D5lajkK5.js.map → src-BAWlZu4B.js.map} +1 -1
- package/dist/cdn/chunks/{src-CoHDh8Ua.js → src-BDUi-9js.js} +15 -15
- package/dist/cdn/chunks/{src-CoHDh8Ua.js.map → src-BDUi-9js.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-NVa1aeY8.js → useCloudI18n-Ch-SiRjU.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-NVa1aeY8.js.map → useCloudI18n-Ch-SiRjU.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-DC8gmfs6.js → useEditorCore-D84laTMj.js} +128 -135
- package/dist/cdn/chunks/useEditorCore-D84laTMj.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-Cxnmf5hM.js +10 -0
- package/dist/cdn/chunks/useEditorRoot-Cxnmf5hM.js.map +1 -0
- package/dist/cdn/chunks/{useI18n-DVWCJJFH.js → useI18n-4sUbTM3Y.js} +3 -3
- package/dist/cdn/chunks/useI18n-4sUbTM3Y.js.map +1 -0
- package/dist/cdn/chunks/{useMergeTag-BfZBRPQp.js → useMergeTag-DxjTEyin.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-BfZBRPQp.js.map → useMergeTag-DxjTEyin.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BC-HA7TK.js → usePopoverPosition-C1N2kaiZ.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-BC-HA7TK.js.map → usePopoverPosition-C1N2kaiZ.js.map} +1 -1
- package/dist/cdn/chunks/useScrollToBlock-BvWAfWd8.js +22 -0
- package/dist/cdn/chunks/useScrollToBlock-BvWAfWd8.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +974 -937
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-DZbmkMQe.js → check-GRcTaHlZ.js} +1 -1
- package/dist/{chevron-down-nYScOLeZ.js → chevron-down-NUIAa2Qf.js} +1 -1
- package/dist/{chevron-up-CpYpDLnc.js → chevron-up-Bjf2BQtL.js} +1 -1
- package/dist/{circle-alert-CuuK6thq.js → circle-alert-FpQ8ykQL.js} +1 -1
- package/dist/{clock-DxkrtqOr.js → clock-CaOM1DC-.js} +1 -1
- package/dist/{createCloudRuntime-Bt8W-ajI.js → createCloudRuntime-FEZG-Gve.js} +1 -1
- package/dist/{createLucideIcon-L-wQXW_R.js → createLucideIcon-CAmDKr5Z.js} +2 -2
- package/dist/{extensions-CX87G4aL.js → extensions-BV9qfsYr.js} +2 -2
- package/dist/{image-up-DouZRGVt.js → image-up-CIGT4cSb.js} +1 -1
- package/dist/{info-puX5V6Iq.js → info-9YwKinXj.js} +1 -1
- package/dist/{keys-BxixS0TN.js → keys-CVpi8xCT.js} +1 -1
- package/dist/{loader-circle-DqTxB7Kr.js → loader-circle-QyURl47g.js} +1 -1
- package/dist/{message-circle-BZ7YpB22.js → message-circle-C9pycEzV.js} +1 -1
- package/dist/{pencil-DmbRhTJu.js → pencil-BvW86jVn.js} +1 -1
- package/dist/{refresh-cw-OK_O-cL0.js → refresh-cw-BDAUomac.js} +1 -1
- package/dist/{scan-line-DyaSTsJ5.js → scan-line-B5EvAPSG.js} +1 -1
- package/dist/{send-B-wasJJC.js → send-BAUn7DLp.js} +1 -1
- package/dist/{shield-check-DUIyRrTo.js → shield-check-CLGywlg0.js} +1 -1
- package/dist/{sparkles-DYEMATWC.js → sparkles-X6C0spo6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +931 -895
- package/dist/{text-align-start-CzjLeBLe.js → text-align-start-C6FXOoEj.js} +1 -1
- package/dist/{trash-2-C0shEPry.js → trash-2-balHkQP4.js} +1 -1
- package/dist/{triangle-alert-Fw0ce8oQ.js → triangle-alert-D2JBEr6k.js} +1 -1
- package/dist/{upload-D69C2CBx.js → upload-D70OYprI.js} +1 -1
- package/dist/{useCloudI18n-CAZTZ9_a.js → useCloudI18n-DmWo4nzs.js} +2 -2
- package/dist/{useEditorCore-CFLzobo_.js → useEditorCore-D7Gz7_CW.js} +474 -481
- package/dist/useEditorRoot-DKyG95pb.js +8 -0
- package/dist/{useI18n-BfXff_Sy.js → useI18n-CvYvat9_.js} +2 -2
- package/dist/{useMergeTag-Dd4I7kge.js → useMergeTag-D6Z6cyDa.js} +1 -1
- package/dist/{usePopoverPosition-CxhCX3SQ.js → usePopoverPosition-WslxM_PU.js} +1 -1
- package/dist/useScrollToBlock-DcImB73T.js +44 -0
- package/dist/{x-BjTlFqRv.js → x-DTUPbuwx.js} +1 -1
- package/package.json +9 -9
- package/dist/cdn/chunks/IssuesPanel-CHtetM9i.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-nbK0UQTp.js.map +0 -1
- package/dist/cdn/chunks/TestEmailPanel-CAjQDXle.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-04CL1SGY.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-DC8gmfs6.js.map +0 -1
- package/dist/cdn/chunks/useI18n-DVWCJJFH.js.map +0 -1
- package/dist/list-checks-jw-ZlvWY.js +0 -25
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { A as e, B as t, D as n, Dt as r, E as i, G as a, J as o, L as s, M as c, O as l, Ot as u, P as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, _ as y, b, c as x, d as S, et as C, g as w, h as T, it as E, j as D, k as O, kt as k, l as A, nt as
|
|
2
|
-
import { c as
|
|
3
|
-
import { A as
|
|
4
|
-
import { f as
|
|
5
|
-
import { a as
|
|
6
|
-
import { A as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { a as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as Gt } from "./loader-circle-
|
|
12
|
-
import { t as Kt } from "./message-circle-
|
|
13
|
-
import { t as qt } from "./trash-2-
|
|
14
|
-
import { t as Jt } from "./triangle-alert-
|
|
15
|
-
import { t as Yt } from "./upload-
|
|
1
|
+
import { A as e, B as t, D as n, Dt as r, E as i, G as a, J as o, L as s, M as c, O as l, Ot as u, P as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, _ as y, b, c as x, d as S, et as C, g as w, h as T, it as E, j as D, k as O, kt as k, l as A, nt as j, q as M, r as N, rt as P, s as F, tt as ee, u as I, v as L, y as te, z as ne } from "./vue.runtime.esm-bundler-DzEsDRtY.js";
|
|
2
|
+
import { c as R, o as re, s as ie } from "./runtime-dom.esm-bundler-BgKXIPLV.js";
|
|
3
|
+
import { A as ae, B as oe, C as se, D as ce, E as le, F as ue, I as de, L as fe, M as pe, N as me, O as he, P as ge, R as _e, S as ve, T as ye, V as be, _ as xe, a as Se, b as Ce, c as we, d as Te, f as Ee, g as De, h as Oe, i as ke, j as Ae, l as je, m as Me, n as Ne, o as Pe, p as Fe, r as Ie, t as Le, u as Re, v as ze, w as Be, x as Ve, y as He, z as Ue } from "./dist-B1kLn1rs.js";
|
|
4
|
+
import { f as We, g as Ge, h as Ke, m as qe } from "./dist-CqcGTIiX.js";
|
|
5
|
+
import { a as Je, i as Ye, n as Xe, r as Ze } from "./dist-B5iReTtK.js";
|
|
6
|
+
import { A as Qe, B as $e, C as et, D as tt, E as nt, F as rt, H as it, I as at, M as ot, N as st, O as ct, P as lt, S as ut, T as dt, U as ft, V as pt, W as mt, _ as ht, a as gt, b as _t, c as vt, d as yt, f as bt, g as xt, h as St, j as Ct, k as wt, m as Tt, n as Et, o as Dt, p as Ot, r as kt, s as At, u as jt, v as Mt, w as Nt, x as Pt, y as Ft, z as It } from "./keys-CVpi8xCT.js";
|
|
7
|
+
import { t as Lt } from "./useI18n-CvYvat9_.js";
|
|
8
|
+
import { t as Rt } from "./logger-BBlvSn6q.js";
|
|
9
|
+
import { a as zt, i as Bt, o as Vt, r as Ht, t as Ut } from "./usePopoverPosition-WslxM_PU.js";
|
|
10
|
+
import { t as Wt } from "./createLucideIcon-CAmDKr5Z.js";
|
|
11
|
+
import { t as Gt } from "./loader-circle-QyURl47g.js";
|
|
12
|
+
import { t as Kt } from "./message-circle-C9pycEzV.js";
|
|
13
|
+
import { t as qt } from "./trash-2-balHkQP4.js";
|
|
14
|
+
import { t as Jt } from "./triangle-alert-D2JBEr6k.js";
|
|
15
|
+
import { t as Yt } from "./upload-D70OYprI.js";
|
|
16
16
|
import { t as Xt } from "./LoadingTrack-C2T8ixEL.js";
|
|
17
17
|
import { t as Zt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
18
|
-
import "./
|
|
19
|
-
import
|
|
20
|
-
import { t as $t } from "./
|
|
18
|
+
import { t as Qt } from "./useEditorRoot-DKyG95pb.js";
|
|
19
|
+
import "./useCloudI18n-DmWo4nzs.js";
|
|
20
|
+
import { t as $t } from "./useMergeTag-D6Z6cyDa.js";
|
|
21
|
+
import { t as en } from "./useAliveFlag-BGIAZii_.js";
|
|
21
22
|
//#region ../core/dist/index.js
|
|
22
|
-
function
|
|
23
|
+
function tn(e) {
|
|
23
24
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function nn(e) {
|
|
26
27
|
let t = o({
|
|
27
28
|
template: null,
|
|
28
|
-
content: e.content ??
|
|
29
|
+
content: e.content ?? Fe(e.defaultFontFamily, e.templateDefaults),
|
|
29
30
|
selectedBlockId: null,
|
|
30
31
|
viewport: "desktop",
|
|
31
32
|
darkMode: !1,
|
|
@@ -120,7 +121,7 @@ function tn(e) {
|
|
|
120
121
|
if (u(n)) return;
|
|
121
122
|
let r = s(t.content.blocks, n);
|
|
122
123
|
if (r && r.type === "section") {
|
|
123
|
-
if (i < 0 || i >=
|
|
124
|
+
if (i < 0 || i >= tn(r.columns)) return;
|
|
124
125
|
r.children[i] = r.children[i] || [];
|
|
125
126
|
let t = r.children[i];
|
|
126
127
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -153,7 +154,7 @@ function tn(e) {
|
|
|
153
154
|
let d;
|
|
154
155
|
if (i) {
|
|
155
156
|
let e = s(t.content.blocks, i);
|
|
156
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
157
|
+
if (!e || e.type !== "section" || a < 0 || a >= tn(e.columns)) return;
|
|
157
158
|
e.children[a] = e.children[a] || [], d = e.children[a];
|
|
158
159
|
} else d = t.content.blocks;
|
|
159
160
|
let [f] = o.blocks.splice(c, 1);
|
|
@@ -163,7 +164,7 @@ function tn(e) {
|
|
|
163
164
|
r();
|
|
164
165
|
}
|
|
165
166
|
function E(e, t) {
|
|
166
|
-
throw new
|
|
167
|
+
throw new Pe(`[Templatical] Templates: ${e} ${t}`);
|
|
167
168
|
}
|
|
168
169
|
function D(t) {
|
|
169
170
|
let { templates: n } = e;
|
|
@@ -203,7 +204,7 @@ function tn(e) {
|
|
|
203
204
|
t.isLoading = !1;
|
|
204
205
|
}
|
|
205
206
|
}
|
|
206
|
-
async function
|
|
207
|
+
async function j() {
|
|
207
208
|
let { save: r } = D("save()");
|
|
208
209
|
typeof r != "function" && E("save()", "is disabled by the provider — its `save` is `false`.");
|
|
209
210
|
let i = t.template;
|
|
@@ -229,7 +230,7 @@ function tn(e) {
|
|
|
229
230
|
t.isSaving = !1;
|
|
230
231
|
}
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
+
function M() {
|
|
233
234
|
return t.template?.id !== void 0;
|
|
234
235
|
}
|
|
235
236
|
return {
|
|
@@ -253,15 +254,15 @@ function tn(e) {
|
|
|
253
254
|
setName: O,
|
|
254
255
|
create: k,
|
|
255
256
|
load: A,
|
|
256
|
-
save:
|
|
257
|
-
hasTemplate:
|
|
257
|
+
save: j,
|
|
258
|
+
hasTemplate: M
|
|
258
259
|
};
|
|
259
260
|
}
|
|
260
|
-
var
|
|
261
|
-
function
|
|
262
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
261
|
+
var rn = 50, an = 300, on = 1500;
|
|
262
|
+
function sn(e) {
|
|
263
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = rn } = e, a = _([]), o = _([]), s = _(!1), c = null, l = null, u = g(() => a.value.length > 0), d = g(() => o.value.length > 0);
|
|
263
264
|
function f() {
|
|
264
|
-
return
|
|
265
|
+
return Ue(t.value);
|
|
265
266
|
}
|
|
266
267
|
function p(e) {
|
|
267
268
|
a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
|
|
@@ -277,21 +278,21 @@ function on(e) {
|
|
|
277
278
|
if (l && l.blockId === e) {
|
|
278
279
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
279
280
|
l = null;
|
|
280
|
-
},
|
|
281
|
+
}, an);
|
|
281
282
|
return;
|
|
282
283
|
}
|
|
283
284
|
m(), p(f()), o.value = [], l = {
|
|
284
285
|
blockId: e,
|
|
285
286
|
timeoutId: setTimeout(() => {
|
|
286
287
|
l = null;
|
|
287
|
-
},
|
|
288
|
+
}, an)
|
|
288
289
|
};
|
|
289
290
|
}
|
|
290
291
|
}
|
|
291
292
|
function y() {
|
|
292
293
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
293
294
|
s.value = !1, c = null;
|
|
294
|
-
},
|
|
295
|
+
}, on);
|
|
295
296
|
}
|
|
296
297
|
function b() {
|
|
297
298
|
if (a.value.length === 0) return;
|
|
@@ -323,33 +324,33 @@ function on(e) {
|
|
|
323
324
|
destroy: C
|
|
324
325
|
};
|
|
325
326
|
}
|
|
326
|
-
function
|
|
327
|
+
function cn(e) {
|
|
327
328
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
328
329
|
...e,
|
|
329
|
-
id:
|
|
330
|
+
id: ye(),
|
|
330
331
|
cells: e.cells.map((e) => ({
|
|
331
332
|
...e,
|
|
332
|
-
id:
|
|
333
|
+
id: ye()
|
|
333
334
|
}))
|
|
334
335
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
335
336
|
...e,
|
|
336
|
-
id:
|
|
337
|
+
id: ye()
|
|
337
338
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
338
339
|
...e,
|
|
339
|
-
id:
|
|
340
|
+
id: ye()
|
|
340
341
|
})));
|
|
341
342
|
}
|
|
342
|
-
function
|
|
343
|
+
function ln(e) {
|
|
343
344
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
344
345
|
function o(n, r, a) {
|
|
345
|
-
let o =
|
|
346
|
+
let o = je(n, e.blockDefaults);
|
|
346
347
|
return t(o, r, a), i(o.id), o;
|
|
347
348
|
}
|
|
348
349
|
function s(e, n, r) {
|
|
349
350
|
let o = JSON.parse(JSON.stringify(e));
|
|
350
|
-
if (o.id =
|
|
351
|
+
if (o.id = ye(), cn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
351
352
|
let t = JSON.parse(JSON.stringify(e));
|
|
352
|
-
return t.id =
|
|
353
|
+
return t.id = ye(), cn(t), t;
|
|
353
354
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
354
355
|
else {
|
|
355
356
|
let i = a?.(e.id) ?? null;
|
|
@@ -370,9 +371,9 @@ function cn(e) {
|
|
|
370
371
|
updateBlockProperty: l
|
|
371
372
|
};
|
|
372
373
|
}
|
|
373
|
-
var
|
|
374
|
-
function
|
|
375
|
-
let { content: t, isDirty: n, onChange: r, debounce: i =
|
|
374
|
+
var un = 2e3;
|
|
375
|
+
function dn(e) {
|
|
376
|
+
let { content: t, isDirty: n, onChange: r, debounce: i = un, enabled: a = !0 } = e, o = null, s = !1;
|
|
376
377
|
function c() {
|
|
377
378
|
return typeof a == "function" ? a() : a;
|
|
378
379
|
}
|
|
@@ -407,7 +408,7 @@ function un(e) {
|
|
|
407
408
|
destroy: h
|
|
408
409
|
};
|
|
409
410
|
}
|
|
410
|
-
function
|
|
411
|
+
function fn(e) {
|
|
411
412
|
let t = o(/* @__PURE__ */ new Set()), n = g(() => t.size > 0);
|
|
412
413
|
function r(e) {
|
|
413
414
|
return t.has(e);
|
|
@@ -425,7 +426,7 @@ function dn(e) {
|
|
|
425
426
|
hasHiddenBlocks: n
|
|
426
427
|
};
|
|
427
428
|
}
|
|
428
|
-
function
|
|
429
|
+
function pn(e) {
|
|
429
430
|
let t = _(!1), n = _(!1), r = g(() => !!e.definition.value?.dataSource), i = g(() => r.value && !e.block.value.dataSourceFetched);
|
|
430
431
|
async function a() {
|
|
431
432
|
let r = e.definition.value;
|
|
@@ -455,7 +456,7 @@ function fn(e) {
|
|
|
455
456
|
needsFetch: i
|
|
456
457
|
};
|
|
457
458
|
}
|
|
458
|
-
function
|
|
459
|
+
function mn(e, t) {
|
|
459
460
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
460
461
|
e.addBlock = (r, i, a, o) => {
|
|
461
462
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -469,15 +470,15 @@ function pn(e, t) {
|
|
|
469
470
|
t.record(), o(e);
|
|
470
471
|
};
|
|
471
472
|
}
|
|
472
|
-
function
|
|
473
|
-
let { provider: t } = e, n = _([]), r = _(!1), i =
|
|
473
|
+
function hn(e) {
|
|
474
|
+
let { provider: t } = e, n = _([]), r = _(!1), i = F(() => {
|
|
474
475
|
let e = /* @__PURE__ */ new Set();
|
|
475
476
|
for (let t of n.value) {
|
|
476
477
|
let n = t.category?.trim();
|
|
477
478
|
n && e.add(n);
|
|
478
479
|
}
|
|
479
480
|
return [...e].sort((e, t) => e.localeCompare(t));
|
|
480
|
-
}), a =
|
|
481
|
+
}), a = F(() => typeof t.create == "function"), o = F(() => typeof t.update == "function"), s = F(() => typeof t.delete == "function");
|
|
481
482
|
function c(e) {
|
|
482
483
|
return o.value && e.canUpdate !== !1;
|
|
483
484
|
}
|
|
@@ -485,7 +486,7 @@ function mn(e) {
|
|
|
485
486
|
return s.value && e.canDelete !== !1;
|
|
486
487
|
}
|
|
487
488
|
function u(e, t) {
|
|
488
|
-
throw new
|
|
489
|
+
throw new Pe(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
489
490
|
}
|
|
490
491
|
async function d(i) {
|
|
491
492
|
r.value = !0;
|
|
@@ -552,9 +553,9 @@ function mn(e) {
|
|
|
552
553
|
remove: m
|
|
553
554
|
};
|
|
554
555
|
}
|
|
555
|
-
var
|
|
556
|
-
function
|
|
557
|
-
let t = e.key ??
|
|
556
|
+
var gn = "templatical:saved-blocks";
|
|
557
|
+
function _n(e = {}) {
|
|
558
|
+
let t = e.key ?? gn;
|
|
558
559
|
function n() {
|
|
559
560
|
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
|
|
560
561
|
return localStorage;
|
|
@@ -579,7 +580,7 @@ function gn(e = {}) {
|
|
|
579
580
|
},
|
|
580
581
|
async create(e) {
|
|
581
582
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
|
|
582
|
-
id:
|
|
583
|
+
id: ye(),
|
|
583
584
|
name: e.name,
|
|
584
585
|
content: e.content,
|
|
585
586
|
...e.category ? { category: e.category } : {},
|
|
@@ -605,15 +606,15 @@ function gn(e = {}) {
|
|
|
605
606
|
}
|
|
606
607
|
};
|
|
607
608
|
}
|
|
608
|
-
function
|
|
609
|
-
let { provider: t, getTemplateId: n } = e, r = _([]), i = _(!1), a = _(void 0), o = _(!1), s = /* @__PURE__ */ new Map(), c =
|
|
609
|
+
function vn(e) {
|
|
610
|
+
let { provider: t, getTemplateId: n } = e, r = _([]), i = _(!1), a = _(void 0), o = _(!1), s = /* @__PURE__ */ new Map(), c = F(() => typeof t.create == "function"), l = F(() => typeof t.restore == "function");
|
|
610
611
|
function u(e) {
|
|
611
612
|
let t = n();
|
|
612
|
-
if (!t) throw new
|
|
613
|
+
if (!t) throw new Pe(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
|
|
613
614
|
return t;
|
|
614
615
|
}
|
|
615
616
|
function d(e) {
|
|
616
|
-
throw new
|
|
617
|
+
throw new Pe(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
617
618
|
}
|
|
618
619
|
async function f(n) {
|
|
619
620
|
let o = u("list");
|
|
@@ -679,24 +680,24 @@ function _n(e) {
|
|
|
679
680
|
restore: g
|
|
680
681
|
};
|
|
681
682
|
}
|
|
682
|
-
function
|
|
683
|
-
let { provider: t, getTemplateId: n, getUser: r } = e, i = _([]), a = _(!1), o = _(!1), s =
|
|
683
|
+
function yn(e) {
|
|
684
|
+
let { provider: t, getTemplateId: n, getUser: r } = e, i = _([]), a = _(!1), o = _(!1), s = F(() => typeof t.create == "function"), c = F(() => typeof t.update == "function"), l = F(() => typeof t.delete == "function"), u = F(() => typeof t.setResolved == "function"), d = F(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), f = F(() => i.value.filter((e) => !e.resolvedAt).length), p = F(() => {
|
|
684
685
|
let e = /* @__PURE__ */ new Map();
|
|
685
686
|
for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
686
687
|
return e;
|
|
687
688
|
});
|
|
688
689
|
function m(e) {
|
|
689
690
|
let t = n();
|
|
690
|
-
if (!t) throw new
|
|
691
|
+
if (!t) throw new Pe(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
|
|
691
692
|
return t;
|
|
692
693
|
}
|
|
693
694
|
function h(e) {
|
|
694
695
|
let t = r();
|
|
695
|
-
if (!t) throw new
|
|
696
|
+
if (!t) throw new Pe(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
|
|
696
697
|
return t;
|
|
697
698
|
}
|
|
698
699
|
function g(e) {
|
|
699
|
-
throw new
|
|
700
|
+
throw new Pe(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
700
701
|
}
|
|
701
702
|
function v(e) {
|
|
702
703
|
for (let t of i.value) {
|
|
@@ -826,10 +827,10 @@ function vn(e) {
|
|
|
826
827
|
function A(e) {
|
|
827
828
|
C(e), b("created", e);
|
|
828
829
|
}
|
|
829
|
-
function
|
|
830
|
+
function j(e) {
|
|
830
831
|
C(e), b(e.resolvedAt ? "resolved" : "updated", e);
|
|
831
832
|
}
|
|
832
|
-
function
|
|
833
|
+
function M(e, t) {
|
|
833
834
|
let n = w(e, t);
|
|
834
835
|
n && b("deleted", n);
|
|
835
836
|
}
|
|
@@ -852,11 +853,11 @@ function vn(e) {
|
|
|
852
853
|
find: v,
|
|
853
854
|
isOwn: y,
|
|
854
855
|
applyRemoteCreate: A,
|
|
855
|
-
applyRemoteUpdate:
|
|
856
|
-
applyRemoteDelete:
|
|
856
|
+
applyRemoteUpdate: j,
|
|
857
|
+
applyRemoteDelete: M
|
|
857
858
|
};
|
|
858
859
|
}
|
|
859
|
-
function
|
|
860
|
+
function bn(e) {
|
|
860
861
|
let { comments: t, provider: n, getTemplateId: r } = e, { subscribe: i } = n;
|
|
861
862
|
if (typeof i != "function") return;
|
|
862
863
|
let a = null;
|
|
@@ -875,31 +876,31 @@ function yn(e) {
|
|
|
875
876
|
case "deleted": t.applyRemoteDelete(e.commentId, e.parentId);
|
|
876
877
|
}
|
|
877
878
|
}));
|
|
878
|
-
}, { immediate: !0 }),
|
|
879
|
+
}, { immediate: !0 }), M(o);
|
|
879
880
|
}
|
|
880
881
|
//#endregion
|
|
881
882
|
//#region src/utils/activeEditorTracker.ts
|
|
882
|
-
var
|
|
883
|
-
function
|
|
884
|
-
let e = ++
|
|
885
|
-
return
|
|
883
|
+
var xn = /* @__PURE__ */ new Set(), Sn = 0, Cn = 0;
|
|
884
|
+
function wn() {
|
|
885
|
+
let e = ++Cn;
|
|
886
|
+
return xn.add(e), Sn === 0 && (Sn = e), {
|
|
886
887
|
id: e,
|
|
887
|
-
isActive: () =>
|
|
888
|
+
isActive: () => xn.size <= 1 || Sn === e,
|
|
888
889
|
claim: () => {
|
|
889
|
-
|
|
890
|
+
Sn = e;
|
|
890
891
|
},
|
|
891
892
|
dispose: () => {
|
|
892
|
-
if (
|
|
893
|
-
let e = Array.from(
|
|
894
|
-
|
|
893
|
+
if (xn.delete(e), Sn === e) {
|
|
894
|
+
let e = Array.from(xn);
|
|
895
|
+
Sn = e[e.length - 1] ?? 0;
|
|
895
896
|
}
|
|
896
897
|
}
|
|
897
898
|
};
|
|
898
899
|
}
|
|
899
900
|
//#endregion
|
|
900
901
|
//#region src/composables/usePreviewResolution.ts
|
|
901
|
-
var
|
|
902
|
-
function
|
|
902
|
+
var Tn = 500;
|
|
903
|
+
function En(e) {
|
|
903
904
|
let t = typeof e.resolvePreview == "function", n = _(null), r = _(!1), i = _(!1), a = 0, o = null;
|
|
904
905
|
function c() {
|
|
905
906
|
o !== null && (clearTimeout(o), o = null);
|
|
@@ -910,13 +911,13 @@ function Tn(e) {
|
|
|
910
911
|
let o = ++a;
|
|
911
912
|
r.value = !0;
|
|
912
913
|
let s = {
|
|
913
|
-
content:
|
|
914
|
+
content: Ue(e.getContent()),
|
|
914
915
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
915
916
|
};
|
|
916
917
|
try {
|
|
917
918
|
let e = await t(s);
|
|
918
919
|
if (o !== a) return;
|
|
919
|
-
if (!
|
|
920
|
+
if (!ue(e)) {
|
|
920
921
|
i.value = !0;
|
|
921
922
|
return;
|
|
922
923
|
}
|
|
@@ -936,7 +937,7 @@ function Tn(e) {
|
|
|
936
937
|
}
|
|
937
938
|
o = setTimeout(() => {
|
|
938
939
|
o = null, l();
|
|
939
|
-
},
|
|
940
|
+
}, Tn);
|
|
940
941
|
}
|
|
941
942
|
}
|
|
942
943
|
return s(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
@@ -945,20 +946,20 @@ function Tn(e) {
|
|
|
945
946
|
return;
|
|
946
947
|
}
|
|
947
948
|
u();
|
|
948
|
-
}, { immediate: !0 }),
|
|
949
|
+
}, { immediate: !0 }), M(() => {
|
|
949
950
|
c(), a++;
|
|
950
951
|
}), {
|
|
951
952
|
isConfigured: t,
|
|
952
|
-
content:
|
|
953
|
+
content: F(() => n.value ?? e.getContent()),
|
|
953
954
|
isResolving: r,
|
|
954
|
-
isInitialResolve:
|
|
955
|
+
isInitialResolve: F(() => r.value && n.value === null),
|
|
955
956
|
hasFailed: i,
|
|
956
|
-
supersedesSamples:
|
|
957
|
+
supersedesSamples: F(() => t)
|
|
957
958
|
};
|
|
958
959
|
}
|
|
959
960
|
//#endregion
|
|
960
961
|
//#region src/composables/useImageUrlResolver.ts
|
|
961
|
-
function
|
|
962
|
+
function Dn(e) {
|
|
962
963
|
let t = o(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
963
964
|
function r(e) {
|
|
964
965
|
return t.get(e);
|
|
@@ -991,14 +992,14 @@ function En(e) {
|
|
|
991
992
|
lookup: a
|
|
992
993
|
};
|
|
993
994
|
}
|
|
994
|
-
function
|
|
995
|
-
let t = p(
|
|
995
|
+
function On(e) {
|
|
996
|
+
let t = p(_t, null), n = F(e);
|
|
996
997
|
if (!t) return n;
|
|
997
998
|
let r;
|
|
998
999
|
function i() {
|
|
999
1000
|
r !== void 0 && (clearTimeout(r), r = void 0);
|
|
1000
1001
|
}
|
|
1001
|
-
h() &&
|
|
1002
|
+
h() && M(i);
|
|
1002
1003
|
let a = !0;
|
|
1003
1004
|
return s(n, (e) => {
|
|
1004
1005
|
i();
|
|
@@ -1012,7 +1013,7 @@ function Dn(e) {
|
|
|
1012
1013
|
r = void 0, t.lookup(e);
|
|
1013
1014
|
}, 300);
|
|
1014
1015
|
}
|
|
1015
|
-
}, { immediate: !0 }),
|
|
1016
|
+
}, { immediate: !0 }), F(() => {
|
|
1016
1017
|
let e = n.value;
|
|
1017
1018
|
if (!e) return e;
|
|
1018
1019
|
let r = t.get(e);
|
|
@@ -1021,7 +1022,7 @@ function Dn(e) {
|
|
|
1021
1022
|
}
|
|
1022
1023
|
//#endregion
|
|
1023
1024
|
//#region src/composables/useMergeTagPicker.ts
|
|
1024
|
-
function
|
|
1025
|
+
function kn() {
|
|
1025
1026
|
let e = _(!1), t = _([]), n = null;
|
|
1026
1027
|
function r(r) {
|
|
1027
1028
|
if (n) {
|
|
@@ -1036,7 +1037,7 @@ function On() {
|
|
|
1036
1037
|
let i = n;
|
|
1037
1038
|
n = null, e.value = !1, t.value = [], i && i(r);
|
|
1038
1039
|
}
|
|
1039
|
-
return h() &&
|
|
1040
|
+
return h() && M(() => {
|
|
1040
1041
|
if (n) {
|
|
1041
1042
|
let e = n;
|
|
1042
1043
|
n = null, e(null);
|
|
@@ -1051,7 +1052,7 @@ function On() {
|
|
|
1051
1052
|
}
|
|
1052
1053
|
//#endregion
|
|
1053
1054
|
//#region src/composables/useLogicTagPicker.ts
|
|
1054
|
-
function
|
|
1055
|
+
function An() {
|
|
1055
1056
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
1056
1057
|
function i(i, a) {
|
|
1057
1058
|
if (r) {
|
|
@@ -1066,7 +1067,7 @@ function kn() {
|
|
|
1066
1067
|
let a = r;
|
|
1067
1068
|
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
1068
1069
|
}
|
|
1069
|
-
return h() &&
|
|
1070
|
+
return h() && M(() => {
|
|
1070
1071
|
if (r) {
|
|
1071
1072
|
let e = r;
|
|
1072
1073
|
r = null, e(null);
|
|
@@ -1082,17 +1083,17 @@ function kn() {
|
|
|
1082
1083
|
}
|
|
1083
1084
|
//#endregion
|
|
1084
1085
|
//#region src/composables/useTemplateLint.ts
|
|
1085
|
-
function
|
|
1086
|
+
function jn(e) {
|
|
1086
1087
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1087
1088
|
}
|
|
1088
|
-
function
|
|
1089
|
-
let t = _([]), n = _(!1), r = _(!1), i = f(null), a =
|
|
1089
|
+
function Mn(e) {
|
|
1090
|
+
let t = _([]), n = _(!1), r = _(!1), i = f(null), a = jn(e.options), o = null, c = !1;
|
|
1090
1091
|
a || l();
|
|
1091
1092
|
async function l() {
|
|
1092
1093
|
try {
|
|
1093
1094
|
let t = await import("@templatical/quality");
|
|
1094
1095
|
if (c) return;
|
|
1095
|
-
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o =
|
|
1096
|
+
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o = Ge(e.content, u, {
|
|
1096
1097
|
debounce: e.debounce ?? 500,
|
|
1097
1098
|
deep: !0
|
|
1098
1099
|
});
|
|
@@ -1127,17 +1128,17 @@ function jn(e) {
|
|
|
1127
1128
|
}
|
|
1128
1129
|
//#endregion
|
|
1129
1130
|
//#region src/utils/blockTypeLabels.ts
|
|
1130
|
-
function
|
|
1131
|
+
function Nn(e, t) {
|
|
1131
1132
|
return t.blocks[e] ?? e;
|
|
1132
1133
|
}
|
|
1133
|
-
function
|
|
1134
|
-
if (e.type !== "custom") return
|
|
1134
|
+
function Pn(e, t, n = []) {
|
|
1135
|
+
if (e.type !== "custom") return Nn(e.type, t);
|
|
1135
1136
|
let { customType: r } = e;
|
|
1136
1137
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
1137
1138
|
}
|
|
1138
1139
|
//#endregion
|
|
1139
1140
|
//#region src/composables/useKeyboardReorder.ts
|
|
1140
|
-
function
|
|
1141
|
+
function Fn(e, t, n = []) {
|
|
1141
1142
|
let r = _(null), i = _(""), a = null;
|
|
1142
1143
|
function o(t) {
|
|
1143
1144
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1164,7 +1165,7 @@ function Pn(e, t, n = []) {
|
|
|
1164
1165
|
let i = o(r);
|
|
1165
1166
|
if (!i) return "";
|
|
1166
1167
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
1167
|
-
return a ?
|
|
1168
|
+
return a ? Pn(a, t.t, n) : "";
|
|
1168
1169
|
}
|
|
1169
1170
|
function c(t, n) {
|
|
1170
1171
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1233,13 +1234,13 @@ function Pn(e, t, n = []) {
|
|
|
1233
1234
|
}
|
|
1234
1235
|
//#endregion
|
|
1235
1236
|
//#region src/composables/useUiTheme.ts
|
|
1236
|
-
function
|
|
1237
|
-
let t =
|
|
1238
|
-
return { resolvedTheme:
|
|
1237
|
+
function In(e) {
|
|
1238
|
+
let t = Je("(prefers-color-scheme: dark)");
|
|
1239
|
+
return { resolvedTheme: F(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1239
1240
|
}
|
|
1240
1241
|
//#endregion
|
|
1241
1242
|
//#region src/composables/useThemeStyles.ts
|
|
1242
|
-
var
|
|
1243
|
+
var Ln = {
|
|
1243
1244
|
bg: "--tpl-bg",
|
|
1244
1245
|
bgElevated: "--tpl-bg-elevated",
|
|
1245
1246
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1263,10 +1264,10 @@ var In = {
|
|
|
1263
1264
|
dangerLight: "--tpl-danger-light",
|
|
1264
1265
|
canvasBg: "--tpl-canvas-bg"
|
|
1265
1266
|
};
|
|
1266
|
-
function
|
|
1267
|
-
return { themeStyles:
|
|
1267
|
+
function Rn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1268
|
+
return { themeStyles: F(() => {
|
|
1268
1269
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1269
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1270
|
+
if (a) for (let [e, t] of Object.entries(Ln)) {
|
|
1270
1271
|
let n = a[e];
|
|
1271
1272
|
n && (r[t] = n);
|
|
1272
1273
|
}
|
|
@@ -1275,18 +1276,18 @@ function Ln({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1275
1276
|
}
|
|
1276
1277
|
//#endregion
|
|
1277
1278
|
//#region src/composables/useBlockRegistry.ts
|
|
1278
|
-
function
|
|
1279
|
+
function zn() {
|
|
1279
1280
|
let e = f(/* @__PURE__ */ new Map());
|
|
1280
1281
|
function t(t, n) {
|
|
1281
|
-
e.value.set(t, n),
|
|
1282
|
+
e.value.set(t, n), j(e);
|
|
1282
1283
|
}
|
|
1283
1284
|
function n(t, n) {
|
|
1284
1285
|
let r = `custom:${t.type}`, i = {
|
|
1285
1286
|
component: n,
|
|
1286
|
-
createBlock: () =>
|
|
1287
|
+
createBlock: () => Ee(t),
|
|
1287
1288
|
definition: t
|
|
1288
1289
|
};
|
|
1289
|
-
e.value.set(r, i),
|
|
1290
|
+
e.value.set(r, i), j(e);
|
|
1290
1291
|
}
|
|
1291
1292
|
function r(t) {
|
|
1292
1293
|
if (t.type === "custom") {
|
|
@@ -1315,7 +1316,7 @@ function Rn() {
|
|
|
1315
1316
|
strictFilters: !1
|
|
1316
1317
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1317
1318
|
} catch (t) {
|
|
1318
|
-
return
|
|
1319
|
+
return Rt.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
1319
1320
|
}
|
|
1320
1321
|
}
|
|
1321
1322
|
function c(t) {
|
|
@@ -1333,9 +1334,9 @@ function Rn() {
|
|
|
1333
1334
|
}
|
|
1334
1335
|
//#endregion
|
|
1335
1336
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1336
|
-
function
|
|
1337
|
-
return
|
|
1338
|
-
let n =
|
|
1337
|
+
function Bn(e, t) {
|
|
1338
|
+
return F(() => {
|
|
1339
|
+
let n = Vn(e.value.blocks);
|
|
1339
1340
|
if (n.size === 0) return [];
|
|
1340
1341
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1341
1342
|
for (let e of n) {
|
|
@@ -1347,81 +1348,81 @@ function zn(e, t) {
|
|
|
1347
1348
|
return i;
|
|
1348
1349
|
});
|
|
1349
1350
|
}
|
|
1350
|
-
function
|
|
1351
|
+
function Vn(e) {
|
|
1351
1352
|
let t = /* @__PURE__ */ new Set();
|
|
1352
|
-
return
|
|
1353
|
+
return Hn(e, t), t;
|
|
1353
1354
|
}
|
|
1354
|
-
function
|
|
1355
|
+
function Hn(e, t) {
|
|
1355
1356
|
for (let n of e) {
|
|
1356
|
-
if (
|
|
1357
|
+
if (pe(n)) {
|
|
1357
1358
|
t.add(n.customType);
|
|
1358
1359
|
continue;
|
|
1359
1360
|
}
|
|
1360
1361
|
if (n.type === "section") {
|
|
1361
1362
|
let e = n.children;
|
|
1362
1363
|
if (!e) continue;
|
|
1363
|
-
for (let n of e)
|
|
1364
|
+
for (let n of e) Hn(n, t);
|
|
1364
1365
|
}
|
|
1365
1366
|
}
|
|
1366
1367
|
}
|
|
1367
1368
|
//#endregion
|
|
1368
1369
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1369
|
-
var
|
|
1370
|
+
var Un = [
|
|
1370
1371
|
{
|
|
1371
1372
|
type: "section",
|
|
1372
|
-
createBlock:
|
|
1373
|
+
createBlock: He
|
|
1373
1374
|
},
|
|
1374
1375
|
{
|
|
1375
1376
|
type: "title",
|
|
1376
|
-
createBlock:
|
|
1377
|
+
createBlock: se
|
|
1377
1378
|
},
|
|
1378
1379
|
{
|
|
1379
1380
|
type: "paragraph",
|
|
1380
|
-
createBlock:
|
|
1381
|
+
createBlock: ze
|
|
1381
1382
|
},
|
|
1382
1383
|
{
|
|
1383
1384
|
type: "image",
|
|
1384
|
-
createBlock:
|
|
1385
|
+
createBlock: De
|
|
1385
1386
|
},
|
|
1386
1387
|
{
|
|
1387
1388
|
type: "button",
|
|
1388
|
-
createBlock:
|
|
1389
|
+
createBlock: Re
|
|
1389
1390
|
},
|
|
1390
1391
|
{
|
|
1391
1392
|
type: "divider",
|
|
1392
|
-
createBlock:
|
|
1393
|
+
createBlock: Me
|
|
1393
1394
|
},
|
|
1394
1395
|
{
|
|
1395
1396
|
type: "video",
|
|
1396
|
-
createBlock:
|
|
1397
|
+
createBlock: Be
|
|
1397
1398
|
},
|
|
1398
1399
|
{
|
|
1399
1400
|
type: "social",
|
|
1400
|
-
createBlock:
|
|
1401
|
+
createBlock: Ce
|
|
1401
1402
|
},
|
|
1402
1403
|
{
|
|
1403
1404
|
type: "menu",
|
|
1404
|
-
createBlock:
|
|
1405
|
+
createBlock: xe
|
|
1405
1406
|
},
|
|
1406
1407
|
{
|
|
1407
1408
|
type: "table",
|
|
1408
|
-
createBlock:
|
|
1409
|
+
createBlock: ve
|
|
1409
1410
|
},
|
|
1410
1411
|
{
|
|
1411
1412
|
type: "spacer",
|
|
1412
|
-
createBlock:
|
|
1413
|
+
createBlock: Ve
|
|
1413
1414
|
},
|
|
1414
1415
|
{
|
|
1415
1416
|
type: "html",
|
|
1416
|
-
createBlock:
|
|
1417
|
+
createBlock: Oe
|
|
1417
1418
|
},
|
|
1418
1419
|
{
|
|
1419
1420
|
type: "countdown",
|
|
1420
|
-
createBlock:
|
|
1421
|
+
createBlock: Te
|
|
1421
1422
|
}
|
|
1422
1423
|
];
|
|
1423
|
-
function
|
|
1424
|
-
for (let n of
|
|
1424
|
+
function Wn(e, t) {
|
|
1425
|
+
for (let n of Un) {
|
|
1425
1426
|
let r = t[n.type];
|
|
1426
1427
|
r && e.registerBuiltIn(n.type, {
|
|
1427
1428
|
component: r,
|
|
@@ -1431,34 +1432,34 @@ function Un(e, t) {
|
|
|
1431
1432
|
}
|
|
1432
1433
|
//#endregion
|
|
1433
1434
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1434
|
-
function
|
|
1435
|
+
function Gn(e) {
|
|
1435
1436
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1436
1437
|
}
|
|
1437
1438
|
//#endregion
|
|
1438
1439
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
1439
|
-
function
|
|
1440
|
+
function Kn(e) {
|
|
1440
1441
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1441
1442
|
}
|
|
1442
|
-
function
|
|
1443
|
-
let r = new Set(e.map((e) =>
|
|
1444
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1443
|
+
function qn(e, t, n) {
|
|
1444
|
+
let r = new Set(e.map((e) => Ht(e))), i = [], a = (e, t) => {
|
|
1445
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Ht(o)) && i.push(`${t}.${n}: ${o}`) : Kn(o) && a(o, `${t}.${n}`);
|
|
1445
1446
|
}, o = t;
|
|
1446
|
-
for (let [e, t] of Object.entries(
|
|
1447
|
+
for (let [e, t] of Object.entries(Le)) {
|
|
1447
1448
|
let n = o?.[e];
|
|
1448
1449
|
a({
|
|
1449
1450
|
...t,
|
|
1450
|
-
...
|
|
1451
|
+
...Kn(n) ? n : {}
|
|
1451
1452
|
}, e);
|
|
1452
1453
|
}
|
|
1453
1454
|
return a({
|
|
1454
|
-
...
|
|
1455
|
+
...Ne,
|
|
1455
1456
|
...n ?? {}
|
|
1456
1457
|
}, "template"), i;
|
|
1457
1458
|
}
|
|
1458
1459
|
//#endregion
|
|
1459
1460
|
//#region src/utils/resolveFieldColors.ts
|
|
1460
|
-
function
|
|
1461
|
-
let n =
|
|
1461
|
+
function Jn(e, t) {
|
|
1462
|
+
let n = Vt({ presets: e.presets }, zt), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
|
|
1462
1463
|
return {
|
|
1463
1464
|
presets: r ? t.presets : n.presets,
|
|
1464
1465
|
allowCustom: t.allowCustom !== !1 && i,
|
|
@@ -1470,9 +1471,9 @@ function qn(e, t) {
|
|
|
1470
1471
|
}
|
|
1471
1472
|
//#endregion
|
|
1472
1473
|
//#region src/utils/collectColorFieldIssues.ts
|
|
1473
|
-
function
|
|
1474
|
+
function Yn(e, t) {
|
|
1474
1475
|
let n = [], r = (r, i) => {
|
|
1475
|
-
let a =
|
|
1476
|
+
let a = Jn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1476
1477
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1477
1478
|
id: s("invalid-presets"),
|
|
1478
1479
|
message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
|
|
@@ -1483,8 +1484,8 @@ function Jn(e, t) {
|
|
|
1483
1484
|
id: s("allow-custom-ignored"),
|
|
1484
1485
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1485
1486
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1486
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1487
|
-
e !== "" && !t.has(
|
|
1487
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Ht(e)));
|
|
1488
|
+
e !== "" && !t.has(Ht(e)) && n.push({
|
|
1488
1489
|
id: s("off-palette-default"),
|
|
1489
1490
|
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
1490
1491
|
});
|
|
@@ -1496,7 +1497,7 @@ function Jn(e, t) {
|
|
|
1496
1497
|
}
|
|
1497
1498
|
//#endregion
|
|
1498
1499
|
//#region src/utils/keyboardShortcuts.ts
|
|
1499
|
-
function
|
|
1500
|
+
function Xn(e) {
|
|
1500
1501
|
for (let t of e.composedPath()) {
|
|
1501
1502
|
if (!(t instanceof HTMLElement)) continue;
|
|
1502
1503
|
if (t.isContentEditable) return !0;
|
|
@@ -1505,18 +1506,18 @@ function Yn(e) {
|
|
|
1505
1506
|
}
|
|
1506
1507
|
return !1;
|
|
1507
1508
|
}
|
|
1508
|
-
function
|
|
1509
|
+
function Zn(e, t) {
|
|
1509
1510
|
let n = e.metaKey || e.ctrlKey;
|
|
1510
1511
|
if (n && e.key.toLowerCase() === "s") {
|
|
1511
1512
|
e.preventDefault(), t.onSave?.();
|
|
1512
1513
|
return;
|
|
1513
1514
|
}
|
|
1514
1515
|
if (n && e.key.toLowerCase() === "z") {
|
|
1515
|
-
if (
|
|
1516
|
+
if (Xn(e)) return;
|
|
1516
1517
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1517
1518
|
return;
|
|
1518
1519
|
}
|
|
1519
|
-
if (t.isPicking?.() && !
|
|
1520
|
+
if (t.isPicking?.() && !Xn(e)) {
|
|
1520
1521
|
if (e.key === "Escape") {
|
|
1521
1522
|
e.preventDefault(), t.onCancelPick?.();
|
|
1522
1523
|
return;
|
|
@@ -1534,11 +1535,11 @@ function Xn(e, t) {
|
|
|
1534
1535
|
t.selectBlock(null);
|
|
1535
1536
|
return;
|
|
1536
1537
|
}
|
|
1537
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1538
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Xn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1538
1539
|
}
|
|
1539
1540
|
//#endregion
|
|
1540
1541
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1541
|
-
function
|
|
1542
|
+
function Qn(e, t, n, r = !1) {
|
|
1542
1543
|
if (!e) return [];
|
|
1543
1544
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
1544
1545
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -1547,18 +1548,18 @@ function Zn(e, t, n, r = !1) {
|
|
|
1547
1548
|
value: e.slice(o, s.index)
|
|
1548
1549
|
});
|
|
1549
1550
|
let i = s[0];
|
|
1550
|
-
if (
|
|
1551
|
-
let e = r ?
|
|
1551
|
+
if (ge(i, n)) {
|
|
1552
|
+
let e = r ? he(i, t) : void 0;
|
|
1552
1553
|
a.push(e === void 0 ? {
|
|
1553
1554
|
type: "tag",
|
|
1554
|
-
value:
|
|
1555
|
+
value: ce(i, t)
|
|
1555
1556
|
} : {
|
|
1556
1557
|
type: "text",
|
|
1557
1558
|
value: e
|
|
1558
1559
|
});
|
|
1559
|
-
} else
|
|
1560
|
+
} else me(i, n) ? a.push({
|
|
1560
1561
|
type: "tag",
|
|
1561
|
-
value:
|
|
1562
|
+
value: le(i, n)
|
|
1562
1563
|
}) : a.push({
|
|
1563
1564
|
type: "text",
|
|
1564
1565
|
value: i
|
|
@@ -1572,27 +1573,27 @@ function Zn(e, t, n, r = !1) {
|
|
|
1572
1573
|
}
|
|
1573
1574
|
//#endregion
|
|
1574
1575
|
//#region src/components/MergeTagPreviewText.vue
|
|
1575
|
-
var
|
|
1576
|
+
var $n = L({
|
|
1576
1577
|
name: "MergeTagPreviewText",
|
|
1577
1578
|
props: { text: {
|
|
1578
1579
|
type: String,
|
|
1579
1580
|
required: !0
|
|
1580
1581
|
} },
|
|
1581
1582
|
setup(e) {
|
|
1582
|
-
let t = p(
|
|
1583
|
+
let t = p(dt, []), n = p(wt, Se.liquid), r = p(ft, null), i = F(() => Qn(e.text, t, n, r?.value ?? !1));
|
|
1583
1584
|
return () => i.value.map((e, t) => e.type === "tag" ? b("span", {
|
|
1584
1585
|
key: t,
|
|
1585
1586
|
class: "tpl-merge-tag-label"
|
|
1586
1587
|
}, e.value) : e.value);
|
|
1587
1588
|
}
|
|
1588
|
-
}),
|
|
1589
|
+
}), er = ["href"], tr = /* @__PURE__ */ L({
|
|
1589
1590
|
__name: "ButtonBlock",
|
|
1590
1591
|
props: {
|
|
1591
1592
|
block: {},
|
|
1592
1593
|
viewport: {}
|
|
1593
1594
|
},
|
|
1594
1595
|
setup(e) {
|
|
1595
|
-
let t = e, n =
|
|
1596
|
+
let t = e, n = F(() => {
|
|
1596
1597
|
let e = {
|
|
1597
1598
|
display: "inline-block",
|
|
1598
1599
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -1605,18 +1606,18 @@ var Qn = I({
|
|
|
1605
1606
|
textAlign: "center"
|
|
1606
1607
|
};
|
|
1607
1608
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1608
|
-
}), r =
|
|
1609
|
+
}), r = F(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1609
1610
|
return (t, i) => (O(), S("div", { style: u(r.value) }, [x("a", {
|
|
1610
1611
|
href: e.block.url || "#",
|
|
1611
1612
|
style: u(n.value),
|
|
1612
1613
|
class: "tpl:cursor-default",
|
|
1613
|
-
onClick: i[0] ||=
|
|
1614
|
-
}, [w(
|
|
1614
|
+
onClick: i[0] ||= R(() => {}, ["prevent"])
|
|
1615
|
+
}, [w($n, { text: e.block.text }, null, 8, ["text"])], 12, er)], 4));
|
|
1615
1616
|
}
|
|
1616
|
-
}),
|
|
1617
|
+
}), nr = Wt("bookmark", [["path", {
|
|
1617
1618
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
1618
1619
|
key: "oz39mx"
|
|
1619
|
-
}]]),
|
|
1620
|
+
}]]), rr = Wt("box", [
|
|
1620
1621
|
["path", {
|
|
1621
1622
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1622
1623
|
key: "hh9hay"
|
|
@@ -1629,13 +1630,13 @@ var Qn = I({
|
|
|
1629
1630
|
d: "M12 22V12",
|
|
1630
1631
|
key: "d0xqtd"
|
|
1631
1632
|
}]
|
|
1632
|
-
]),
|
|
1633
|
+
]), ir = Wt("code", [["path", {
|
|
1633
1634
|
d: "m16 18 6-6-6-6",
|
|
1634
1635
|
key: "eg8j8"
|
|
1635
1636
|
}], ["path", {
|
|
1636
1637
|
d: "m8 6-6 6 6 6",
|
|
1637
1638
|
key: "ppft3o"
|
|
1638
|
-
}]]),
|
|
1639
|
+
}]]), ar = Wt("copy", [["rect", {
|
|
1639
1640
|
width: "14",
|
|
1640
1641
|
height: "14",
|
|
1641
1642
|
x: "8",
|
|
@@ -1646,7 +1647,7 @@ var Qn = I({
|
|
|
1646
1647
|
}], ["path", {
|
|
1647
1648
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1648
1649
|
key: "zix9uf"
|
|
1649
|
-
}]]),
|
|
1650
|
+
}]]), or = Wt("eye-off", [
|
|
1650
1651
|
["path", {
|
|
1651
1652
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1652
1653
|
key: "ct8e1f"
|
|
@@ -1663,10 +1664,10 @@ var Qn = I({
|
|
|
1663
1664
|
d: "m2 2 20 20",
|
|
1664
1665
|
key: "1ooewy"
|
|
1665
1666
|
}]
|
|
1666
|
-
]),
|
|
1667
|
+
]), sr = Wt("funnel", [["path", {
|
|
1667
1668
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
1668
1669
|
key: "sc7q7i"
|
|
1669
|
-
}]]),
|
|
1670
|
+
}]]), cr = Wt("grip-vertical", [
|
|
1670
1671
|
["circle", {
|
|
1671
1672
|
cx: "9",
|
|
1672
1673
|
cy: "12",
|
|
@@ -1703,7 +1704,7 @@ var Qn = I({
|
|
|
1703
1704
|
r: "1",
|
|
1704
1705
|
key: "f4zoj3"
|
|
1705
1706
|
}]
|
|
1706
|
-
]),
|
|
1707
|
+
]), lr = Wt("image", [
|
|
1707
1708
|
["rect", {
|
|
1708
1709
|
width: "18",
|
|
1709
1710
|
height: "18",
|
|
@@ -1723,13 +1724,13 @@ var Qn = I({
|
|
|
1723
1724
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1724
1725
|
key: "1xmnt7"
|
|
1725
1726
|
}]
|
|
1726
|
-
]),
|
|
1727
|
+
]), ur = Wt("navigation", [["polygon", {
|
|
1727
1728
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1728
1729
|
key: "1ltx0t"
|
|
1729
|
-
}]]),
|
|
1730
|
+
}]]), dr = Wt("puzzle", [["path", {
|
|
1730
1731
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
1731
1732
|
key: "w46dr5"
|
|
1732
|
-
}]]),
|
|
1733
|
+
}]]), fr = Wt("share-2", [
|
|
1733
1734
|
["circle", {
|
|
1734
1735
|
cx: "18",
|
|
1735
1736
|
cy: "5",
|
|
@@ -1762,7 +1763,7 @@ var Qn = I({
|
|
|
1762
1763
|
y2: "10.49",
|
|
1763
1764
|
key: "1n3mei"
|
|
1764
1765
|
}]
|
|
1765
|
-
]),
|
|
1766
|
+
]), pr = Wt("table", [
|
|
1766
1767
|
["path", {
|
|
1767
1768
|
d: "M12 3v18",
|
|
1768
1769
|
key: "108xh3"
|
|
@@ -1783,7 +1784,7 @@ var Qn = I({
|
|
|
1783
1784
|
d: "M3 15h18",
|
|
1784
1785
|
key: "5xshup"
|
|
1785
1786
|
}]
|
|
1786
|
-
]),
|
|
1787
|
+
]), mr = Wt("video", [["path", {
|
|
1787
1788
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1788
1789
|
key: "ftymec"
|
|
1789
1790
|
}], ["rect", {
|
|
@@ -1793,18 +1794,18 @@ var Qn = I({
|
|
|
1793
1794
|
height: "12",
|
|
1794
1795
|
rx: "2",
|
|
1795
1796
|
key: "158x01"
|
|
1796
|
-
}]]),
|
|
1797
|
+
}]]), hr = ["innerHTML"], gr = [
|
|
1797
1798
|
"src",
|
|
1798
1799
|
"width",
|
|
1799
1800
|
"height"
|
|
1800
|
-
],
|
|
1801
|
+
], _r = /* @__PURE__ */ L({
|
|
1801
1802
|
__name: "CustomBlockIcon",
|
|
1802
1803
|
props: {
|
|
1803
1804
|
icon: {},
|
|
1804
1805
|
size: {}
|
|
1805
1806
|
},
|
|
1806
1807
|
setup(e) {
|
|
1807
|
-
let t = e, n =
|
|
1808
|
+
let t = e, n = F(() => t.size ?? 20), r = F(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = F(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
|
|
1808
1809
|
return (t, a) => r.value ? (O(), S("span", {
|
|
1809
1810
|
key: 0,
|
|
1810
1811
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1813,30 +1814,22 @@ var Qn = I({
|
|
|
1813
1814
|
height: `${n.value}px`
|
|
1814
1815
|
}),
|
|
1815
1816
|
innerHTML: e.icon
|
|
1816
|
-
}, null, 12,
|
|
1817
|
+
}, null, 12, hr)) : i.value ? (O(), S("img", {
|
|
1817
1818
|
key: 1,
|
|
1818
1819
|
src: e.icon,
|
|
1819
1820
|
width: n.value,
|
|
1820
1821
|
height: n.value,
|
|
1821
1822
|
class: "tpl:inline-block",
|
|
1822
1823
|
alt: ""
|
|
1823
|
-
}, null, 8,
|
|
1824
|
+
}, null, 8, gr)) : (O(), A(P(rr), {
|
|
1824
1825
|
key: 2,
|
|
1825
1826
|
size: n.value,
|
|
1826
1827
|
"stroke-width": 1.5
|
|
1827
1828
|
}, null, 8, ["size"]));
|
|
1828
1829
|
}
|
|
1829
|
-
});
|
|
1830
|
-
//#endregion
|
|
1831
|
-
//#region src/composables/useEditorRoot.ts
|
|
1832
|
-
function _r() {
|
|
1833
|
-
return p(St, document) ?? document;
|
|
1834
|
-
}
|
|
1835
|
-
//#endregion
|
|
1836
|
-
//#region src/composables/useFocusTrap.ts
|
|
1837
|
-
var vr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1830
|
+
}), vr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1838
1831
|
function yr(e, t) {
|
|
1839
|
-
let n =
|
|
1832
|
+
let n = Qt(), r = null, i = null, a = null;
|
|
1840
1833
|
function o() {
|
|
1841
1834
|
return e.value ? Array.from(e.value.querySelectorAll(vr)).filter((e) => e.offsetParent !== null) : [];
|
|
1842
1835
|
}
|
|
@@ -1853,7 +1846,7 @@ function yr(e, t) {
|
|
|
1853
1846
|
a = null;
|
|
1854
1847
|
let t = o();
|
|
1855
1848
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1856
|
-
}), i =
|
|
1849
|
+
}), i = Ye(e, "keydown", c);
|
|
1857
1850
|
}
|
|
1858
1851
|
function u(e = {}) {
|
|
1859
1852
|
let t = e.restoreFocus !== !1;
|
|
@@ -1862,15 +1855,15 @@ function yr(e, t) {
|
|
|
1862
1855
|
let d = s([t, e], ([e, t]) => {
|
|
1863
1856
|
e && t ? l() : u();
|
|
1864
1857
|
}, { flush: "post" });
|
|
1865
|
-
|
|
1858
|
+
M(() => {
|
|
1866
1859
|
d(), u();
|
|
1867
1860
|
});
|
|
1868
1861
|
}
|
|
1869
1862
|
//#endregion
|
|
1870
1863
|
//#region src/composables/useEmoji.ts
|
|
1871
1864
|
function br() {
|
|
1872
|
-
let [e, t] =
|
|
1873
|
-
|
|
1865
|
+
let [e, t] = Ke(!1), n = f([]), r = !1;
|
|
1866
|
+
M(() => {
|
|
1874
1867
|
r = !0;
|
|
1875
1868
|
}), s(e, async (e) => {
|
|
1876
1869
|
if (e && n.value.length === 0) {
|
|
@@ -1939,7 +1932,7 @@ function wr(e) {
|
|
|
1939
1932
|
for (let i of e) {
|
|
1940
1933
|
let e = i.toLowerCase(), a = xr.find((t) => t.value.toLowerCase() === e);
|
|
1941
1934
|
if (!a) {
|
|
1942
|
-
r.has(e) || (r.add(e),
|
|
1935
|
+
r.has(e) || (r.add(e), Rt.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${xr.map((e) => e.value).join(", ")}.`));
|
|
1943
1936
|
continue;
|
|
1944
1937
|
}
|
|
1945
1938
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
@@ -1947,7 +1940,7 @@ function wr(e) {
|
|
|
1947
1940
|
return t;
|
|
1948
1941
|
}
|
|
1949
1942
|
function Tr(e) {
|
|
1950
|
-
let t = _(e?.customFonts ?? []), n = _(!1), r = wr(e?.builtIns), i =
|
|
1943
|
+
let t = _(e?.customFonts ?? []), n = _(!1), r = wr(e?.builtIns), i = F(() => e?.defaultFallback ?? Cr), a = F(() => {
|
|
1951
1944
|
let e = [...r], n = t.value.map((e) => ({
|
|
1952
1945
|
value: e.name,
|
|
1953
1946
|
label: e.name,
|
|
@@ -1959,7 +1952,7 @@ function Tr(e) {
|
|
|
1959
1952
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1960
1953
|
}
|
|
1961
1954
|
let s = e?.defaultFont ?? Cr.split(",")[0].trim();
|
|
1962
|
-
o(s) ||
|
|
1955
|
+
o(s) || Rt.warn(`config.fonts: new templates seed "${s}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
1963
1956
|
function c() {
|
|
1964
1957
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
1965
1958
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
@@ -1967,7 +1960,7 @@ function Tr(e) {
|
|
|
1967
1960
|
}
|
|
1968
1961
|
return Cr;
|
|
1969
1962
|
}
|
|
1970
|
-
let l =
|
|
1963
|
+
let l = F(() => c());
|
|
1971
1964
|
function u(e) {
|
|
1972
1965
|
if (!e) return i.value;
|
|
1973
1966
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
@@ -1991,7 +1984,7 @@ function Tr(e) {
|
|
|
1991
1984
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1992
1985
|
});
|
|
1993
1986
|
} catch (t) {
|
|
1994
|
-
|
|
1987
|
+
Rt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1995
1988
|
}
|
|
1996
1989
|
});
|
|
1997
1990
|
await Promise.allSettled(e), !f && (n.value = !0);
|
|
@@ -2000,7 +1993,7 @@ function Tr(e) {
|
|
|
2000
1993
|
for (let e of d) e.remove();
|
|
2001
1994
|
d.length = 0;
|
|
2002
1995
|
}
|
|
2003
|
-
return h() &&
|
|
1996
|
+
return h() && M(() => {
|
|
2004
1997
|
f = !0, m();
|
|
2005
1998
|
}), {
|
|
2006
1999
|
fonts: a,
|
|
@@ -2017,7 +2010,7 @@ function Tr(e) {
|
|
|
2017
2010
|
//#endregion
|
|
2018
2011
|
//#region src/composables/useLogicTag.ts
|
|
2019
2012
|
function Er() {
|
|
2020
|
-
let e = p(
|
|
2013
|
+
let e = p(et, []), t = p(ut, []), n = p(wt, Se.liquid), r = p(Qe, null), i = p(Nt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
2021
2014
|
async function c() {
|
|
2022
2015
|
if (r) {
|
|
2023
2016
|
a.value = !0;
|
|
@@ -2049,11 +2042,11 @@ function Er() {
|
|
|
2049
2042
|
//#endregion
|
|
2050
2043
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
2051
2044
|
function Dr(e, t, n) {
|
|
2052
|
-
return
|
|
2045
|
+
return me(e, n) ? {
|
|
2053
2046
|
type: "logicMergeTagNode",
|
|
2054
2047
|
attrs: {
|
|
2055
2048
|
value: e,
|
|
2056
|
-
keyword:
|
|
2049
|
+
keyword: le(e, n)
|
|
2057
2050
|
}
|
|
2058
2051
|
} : {
|
|
2059
2052
|
type: "mergeTagNode",
|
|
@@ -2093,7 +2086,7 @@ function jr(e) {
|
|
|
2093
2086
|
...this.parent?.(),
|
|
2094
2087
|
color: {
|
|
2095
2088
|
default: null,
|
|
2096
|
-
parseHTML: (e) => Ar(
|
|
2089
|
+
parseHTML: (e) => Ar(Bt(e.style.color)),
|
|
2097
2090
|
renderHTML: (e) => {
|
|
2098
2091
|
let t = Ar(e.color);
|
|
2099
2092
|
return t ? { style: `color: ${t}` } : {};
|
|
@@ -2163,9 +2156,9 @@ function Mr(e) {
|
|
|
2163
2156
|
//#endregion
|
|
2164
2157
|
//#region src/composables/useRichTextEditor.ts
|
|
2165
2158
|
function Nr(e) {
|
|
2166
|
-
let t = p(
|
|
2167
|
-
async function
|
|
2168
|
-
|
|
2159
|
+
let t = p(St, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = $t(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = Er(), g = p(pt, null), v = (a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = ae(l), b = f(null), { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = Mr(b), { start: A, stop: j } = qe(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), M = f(null), N = _(!0), P = _(null), F = !1;
|
|
2160
|
+
async function ee() {
|
|
2161
|
+
P.value = null, N.value = !0;
|
|
2169
2162
|
try {
|
|
2170
2163
|
let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
|
|
2171
2164
|
mergeTags: n,
|
|
@@ -2174,8 +2167,8 @@ function Nr(e) {
|
|
|
2174
2167
|
autocompleteEnabled: u,
|
|
2175
2168
|
suggestionEmptyText: v
|
|
2176
2169
|
});
|
|
2177
|
-
if (
|
|
2178
|
-
|
|
2170
|
+
if (F) return;
|
|
2171
|
+
M.value = i;
|
|
2179
2172
|
let o = /* @__PURE__ */ new Map();
|
|
2180
2173
|
a.forEach((e, t) => o.set(e.name, t));
|
|
2181
2174
|
let s = new r({
|
|
@@ -2183,27 +2176,27 @@ function Nr(e) {
|
|
|
2183
2176
|
content: e.blockContent(),
|
|
2184
2177
|
editable: !0,
|
|
2185
2178
|
onUpdate: ({ editor: n }) => {
|
|
2186
|
-
|
|
2179
|
+
F || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
|
|
2187
2180
|
}
|
|
2188
2181
|
});
|
|
2189
|
-
if (
|
|
2182
|
+
if (F) {
|
|
2190
2183
|
s.destroy();
|
|
2191
2184
|
return;
|
|
2192
2185
|
}
|
|
2193
|
-
b.value = s,
|
|
2186
|
+
b.value = s, N.value = !1, A();
|
|
2194
2187
|
} catch (t) {
|
|
2195
|
-
if (
|
|
2196
|
-
|
|
2188
|
+
if (F) return;
|
|
2189
|
+
Rt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), P.value = t instanceof Error ? t.message : "Failed to load editor", N.value = !1;
|
|
2197
2190
|
}
|
|
2198
2191
|
}
|
|
2199
|
-
function
|
|
2200
|
-
b.value?.destroy(), b.value = null,
|
|
2192
|
+
function I() {
|
|
2193
|
+
b.value?.destroy(), b.value = null, ee();
|
|
2201
2194
|
}
|
|
2202
|
-
|
|
2203
|
-
let
|
|
2195
|
+
ee();
|
|
2196
|
+
let L = s(() => e.blockContent(), (e) => {
|
|
2204
2197
|
b.value && b.value.getHTML() !== e && b.value.commands.setContent(e, { emitUpdate: !1 });
|
|
2205
2198
|
});
|
|
2206
|
-
function
|
|
2199
|
+
function te(t) {
|
|
2207
2200
|
if (o.value || m.value) return;
|
|
2208
2201
|
let n = t.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
2209
2202
|
if (!r) return;
|
|
@@ -2211,26 +2204,26 @@ function Nr(e) {
|
|
|
2211
2204
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
2212
2205
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
|
|
2213
2206
|
}
|
|
2214
|
-
|
|
2215
|
-
|
|
2207
|
+
Ye(document, "mousedown", te), i(() => {
|
|
2208
|
+
F = !0, L(), j(), b.value?.destroy();
|
|
2216
2209
|
});
|
|
2217
|
-
async function
|
|
2210
|
+
async function ne() {
|
|
2218
2211
|
let e = await c();
|
|
2219
|
-
|
|
2212
|
+
F || (e && b.value ? b.value.chain().focus().insertMergeTag({
|
|
2220
2213
|
label: e.label,
|
|
2221
2214
|
value: e.value
|
|
2222
2215
|
}).run() : b.value?.commands.focus());
|
|
2223
2216
|
}
|
|
2224
|
-
async function
|
|
2217
|
+
async function R() {
|
|
2225
2218
|
let e = await h();
|
|
2226
|
-
|
|
2219
|
+
F || (e && b.value ? kr(b.value, e, l) : b.value?.commands.focus());
|
|
2227
2220
|
}
|
|
2228
2221
|
return {
|
|
2229
2222
|
editor: b,
|
|
2230
|
-
EditorContent:
|
|
2231
|
-
isLoading:
|
|
2232
|
-
initError:
|
|
2233
|
-
retry:
|
|
2223
|
+
EditorContent: M,
|
|
2224
|
+
isLoading: N,
|
|
2225
|
+
initError: P,
|
|
2226
|
+
retry: I,
|
|
2234
2227
|
showLinkDialog: x,
|
|
2235
2228
|
linkUrl: S,
|
|
2236
2229
|
linkColor: C,
|
|
@@ -2246,18 +2239,18 @@ function Nr(e) {
|
|
|
2246
2239
|
removeLink: D,
|
|
2247
2240
|
closeLinkDialog: O,
|
|
2248
2241
|
handleLinkKeydown: k,
|
|
2249
|
-
handleAddMergeTag:
|
|
2250
|
-
handleAddLogicTag:
|
|
2242
|
+
handleAddMergeTag: ne,
|
|
2243
|
+
handleAddLogicTag: R
|
|
2251
2244
|
};
|
|
2252
2245
|
}
|
|
2253
2246
|
//#endregion
|
|
2254
2247
|
//#region src/composables/useSmallScreenNotice.ts
|
|
2255
2248
|
var Pr = "(max-width: 767px)";
|
|
2256
2249
|
function Fr(e) {
|
|
2257
|
-
let t =
|
|
2250
|
+
let t = Je(Pr);
|
|
2258
2251
|
return {
|
|
2259
2252
|
isSmallScreen: t,
|
|
2260
|
-
showNotice:
|
|
2253
|
+
showNotice: F(() => (ee(e) ?? !0) && t.value)
|
|
2261
2254
|
};
|
|
2262
2255
|
}
|
|
2263
2256
|
//#endregion
|
|
@@ -2275,7 +2268,7 @@ var Ir = { class: "tpl:w-full" }, Lr = {
|
|
|
2275
2268
|
key: 0,
|
|
2276
2269
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
2277
2270
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2278
|
-
}, Wr = /* @__PURE__ */
|
|
2271
|
+
}, Wr = /* @__PURE__ */ L({
|
|
2279
2272
|
__name: "CustomBlock",
|
|
2280
2273
|
props: {
|
|
2281
2274
|
block: {},
|
|
@@ -2283,19 +2276,19 @@ var Ir = { class: "tpl:w-full" }, Lr = {
|
|
|
2283
2276
|
},
|
|
2284
2277
|
emits: ["fetchData"],
|
|
2285
2278
|
setup(e, { emit: t }) {
|
|
2286
|
-
let r = e, i = t, { t: a } =
|
|
2279
|
+
let r = e, i = t, { t: a } = Lt(), o = p(At, null), c = _(""), l = _(!1), u = F(() => o?.getDefinition(r.block.customType)), d = F(() => !!u.value), { isFetching: f, fetch: m, needsFetch: h, hasDataSource: g } = pn({
|
|
2287
2280
|
definition: u,
|
|
2288
|
-
block:
|
|
2281
|
+
block: F(() => r.block),
|
|
2289
2282
|
onUpdate: (e, t) => {
|
|
2290
2283
|
i("fetchData", {
|
|
2291
2284
|
fieldValues: e,
|
|
2292
2285
|
dataSourceFetched: t
|
|
2293
2286
|
});
|
|
2294
2287
|
}
|
|
2295
|
-
}), v = p(
|
|
2288
|
+
}), v = p(dt, []), y = p(ft, null), b = F(() => {
|
|
2296
2289
|
if (!y?.value) return r.block;
|
|
2297
2290
|
let e = {};
|
|
2298
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
2291
|
+
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? be(n, v) : n;
|
|
2299
2292
|
return {
|
|
2300
2293
|
...r.block,
|
|
2301
2294
|
fieldValues: e
|
|
@@ -2312,41 +2305,41 @@ var Ir = { class: "tpl:w-full" }, Lr = {
|
|
|
2312
2305
|
}
|
|
2313
2306
|
}
|
|
2314
2307
|
}
|
|
2315
|
-
let E =
|
|
2308
|
+
let E = We(C, 150);
|
|
2316
2309
|
return n(() => {
|
|
2317
2310
|
C();
|
|
2318
2311
|
}), s(() => r.block.fieldValues, () => {
|
|
2319
2312
|
E();
|
|
2320
2313
|
}, { deep: !0 }), s(() => y?.value, () => {
|
|
2321
2314
|
E();
|
|
2322
|
-
}), (e, t) => (O(), S("div", Ir, [d.value ? l.value ? (O(), S("div", zr, [w(
|
|
2315
|
+
}), (e, t) => (O(), S("div", Ir, [d.value ? l.value ? (O(), S("div", zr, [w(P(Jt), {
|
|
2323
2316
|
size: 24,
|
|
2324
2317
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2325
|
-
}), x("span", Br, k(
|
|
2318
|
+
}), x("span", Br, k(P(a).customBlocks.renderError), 1)])) : (O(), S("div", Vr, [x("div", { innerHTML: c.value }, null, 8, Hr), P(g) && P(h) ? (O(), S("div", Ur, [P(f) ? (O(), A(Xt, {
|
|
2326
2319
|
key: 1,
|
|
2327
2320
|
class: "tpl:w-48"
|
|
2328
2321
|
})) : (O(), S("button", {
|
|
2329
2322
|
key: 0,
|
|
2330
2323
|
type: "button",
|
|
2331
2324
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
2332
|
-
onClick: t[0] ||=
|
|
2333
|
-
}, [u.value?.icon ? (O(), A(
|
|
2325
|
+
onClick: t[0] ||= R((...e) => P(m) && P(m)(...e), ["stop"])
|
|
2326
|
+
}, [u.value?.icon ? (O(), A(_r, {
|
|
2334
2327
|
key: 0,
|
|
2335
2328
|
icon: u.value.icon,
|
|
2336
2329
|
size: 16
|
|
2337
|
-
}, null, 8, ["icon"])) :
|
|
2330
|
+
}, null, 8, ["icon"])) : I("", !0), T(" " + k(u.value?.dataSource?.label || P(a).customBlocks.dataSource.fetchButton), 1)]))])) : I("", !0)])) : (O(), S("div", Lr, [w(P(dr), {
|
|
2338
2331
|
size: 24,
|
|
2339
2332
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2340
|
-
}), x("span", Rr, k(
|
|
2333
|
+
}), x("span", Rr, k(P(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2341
2334
|
}
|
|
2342
|
-
}), Gr = { class: "tpl:w-full" }, Kr = /* @__PURE__ */
|
|
2335
|
+
}), Gr = { class: "tpl:w-full" }, Kr = /* @__PURE__ */ L({
|
|
2343
2336
|
__name: "DividerBlock",
|
|
2344
2337
|
props: {
|
|
2345
2338
|
block: {},
|
|
2346
2339
|
viewport: {}
|
|
2347
2340
|
},
|
|
2348
2341
|
setup(e) {
|
|
2349
|
-
let t = e, n =
|
|
2342
|
+
let t = e, n = F(() => ({
|
|
2350
2343
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
2351
2344
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2352
2345
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
@@ -2365,14 +2358,14 @@ var Ir = { class: "tpl:w-full" }, Lr = {
|
|
|
2365
2358
|
}, Zr = {
|
|
2366
2359
|
key: 1,
|
|
2367
2360
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2368
|
-
}, Qr = /* @__PURE__ */
|
|
2361
|
+
}, Qr = /* @__PURE__ */ L({
|
|
2369
2362
|
__name: "HtmlBlock",
|
|
2370
2363
|
props: {
|
|
2371
2364
|
block: {},
|
|
2372
2365
|
viewport: {}
|
|
2373
2366
|
},
|
|
2374
2367
|
setup(e) {
|
|
2375
|
-
let t = e, { t: n } =
|
|
2368
|
+
let t = e, { t: n } = Lt(), r = p(Ft, !1), a = F(() => t.block.content.trim().length > 0), o = F(() => r && a.value), c = p(dt, []), l = p(ft, null), d = F(() => l?.value ? be(t.block.content, c) : t.block.content), f = _(null), m = _(60), h = null;
|
|
2376
2369
|
function g() {
|
|
2377
2370
|
let e = f.value?.contentDocument;
|
|
2378
2371
|
e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -2392,18 +2385,18 @@ var Ir = { class: "tpl:w-full" }, Lr = {
|
|
|
2392
2385
|
ref: f,
|
|
2393
2386
|
srcdoc: d.value,
|
|
2394
2387
|
sandbox: "allow-same-origin",
|
|
2395
|
-
title:
|
|
2388
|
+
title: P(n).html.preview,
|
|
2396
2389
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2397
2390
|
style: u({ height: `${m.value}px` }),
|
|
2398
2391
|
onLoad: v
|
|
2399
|
-
}, null, 44, Jr)) : (O(), S("div", Yr, [w(
|
|
2392
|
+
}, null, 44, Jr)) : (O(), S("div", Yr, [w(P(ir), {
|
|
2400
2393
|
size: 24,
|
|
2401
2394
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2402
|
-
}), a.value ? (O(), S("span", Xr, k(
|
|
2395
|
+
}), a.value ? (O(), S("span", Xr, k(P(n).html.preview), 1)) : (O(), S("span", Zr, k(P(n).html.empty), 1))]))]));
|
|
2403
2396
|
}
|
|
2404
2397
|
}), $r = "image/";
|
|
2405
2398
|
function ei(e) {
|
|
2406
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 ||
|
|
2399
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || ee(r), { isOverDropZone: a } = Xe(t, {
|
|
2407
2400
|
preventDefaultForUnhandled: !0,
|
|
2408
2401
|
onDrop: (e) => {
|
|
2409
2402
|
if (!i()) return;
|
|
@@ -2411,7 +2404,7 @@ function ei(e) {
|
|
|
2411
2404
|
t.length > 0 && n([t[0]]);
|
|
2412
2405
|
}
|
|
2413
2406
|
});
|
|
2414
|
-
return { isOver:
|
|
2407
|
+
return { isOver: F(() => i() && a.value) };
|
|
2415
2408
|
}
|
|
2416
2409
|
//#endregion
|
|
2417
2410
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -2425,7 +2418,7 @@ var ti = {
|
|
|
2425
2418
|
}, oi = ["href"], si = ["src", "alt"], ci = ["src", "alt"], li = {
|
|
2426
2419
|
key: 4,
|
|
2427
2420
|
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
2428
|
-
}, ui = ["aria-label"], di = { key: 1 }, fi = /* @__PURE__ */
|
|
2421
|
+
}, ui = ["aria-label"], di = { key: 1 }, fi = /* @__PURE__ */ L({
|
|
2429
2422
|
__name: "ImageBlock",
|
|
2430
2423
|
props: {
|
|
2431
2424
|
block: {},
|
|
@@ -2433,7 +2426,7 @@ var ti = {
|
|
|
2433
2426
|
},
|
|
2434
2427
|
emits: ["update"],
|
|
2435
2428
|
setup(e, { emit: t }) {
|
|
2436
|
-
let n = e, r = t, { t: i } =
|
|
2429
|
+
let n = e, r = t, { t: i } = Lt(), { syntax: a } = $t(), o = p(Ct, null), s = F(() => !!o), c = en();
|
|
2437
2430
|
async function l() {
|
|
2438
2431
|
let e = await o?.({ accept: ["images"] });
|
|
2439
2432
|
if (c.alive && e) {
|
|
@@ -2441,7 +2434,7 @@ var ti = {
|
|
|
2441
2434
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
2442
2435
|
}
|
|
2443
2436
|
}
|
|
2444
|
-
let d = _(), f = _(!1), m =
|
|
2437
|
+
let d = _(), f = _(!1), m = F(() => s.value && !f.value && !b.value);
|
|
2445
2438
|
async function h(e) {
|
|
2446
2439
|
if (o) {
|
|
2447
2440
|
f.value = !0;
|
|
@@ -2464,7 +2457,7 @@ var ti = {
|
|
|
2464
2457
|
target: d,
|
|
2465
2458
|
enabled: m,
|
|
2466
2459
|
onFiles: h
|
|
2467
|
-
}), v =
|
|
2460
|
+
}), v = F(() => ({ textAlign: n.block.align })), y = F(() => {
|
|
2468
2461
|
let e = n.block.align;
|
|
2469
2462
|
return {
|
|
2470
2463
|
maxWidth: "100%",
|
|
@@ -2473,86 +2466,86 @@ var ti = {
|
|
|
2473
2466
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2474
2467
|
marginRight: e === "center" ? "auto" : void 0
|
|
2475
2468
|
};
|
|
2476
|
-
}), b =
|
|
2469
|
+
}), b = F(() => we(n.block.src, a)), C = On(() => b.value ? void 0 : n.block.src), E = On(() => b.value ? n.block.placeholderUrl : void 0);
|
|
2477
2470
|
return (t, n) => (O(), S("div", {
|
|
2478
2471
|
ref_key: "dropZoneRef",
|
|
2479
2472
|
ref: d,
|
|
2480
2473
|
"data-testid": "image-drop-zone",
|
|
2481
2474
|
class: "tpl:relative tpl:w-full",
|
|
2482
2475
|
style: u(v.value)
|
|
2483
|
-
}, [m.value && (
|
|
2476
|
+
}, [m.value && (P(g) || f.value) ? (O(), S("div", ti, [f.value ? (O(), S(N, { key: 0 }, [w(P(Gt), {
|
|
2484
2477
|
class: "tpl-spinner",
|
|
2485
2478
|
size: 20,
|
|
2486
2479
|
"stroke-width": 2
|
|
2487
|
-
}), T(" " + k(
|
|
2480
|
+
}), T(" " + k(P(i).image.uploading), 1)], 64)) : (O(), S(N, { key: 1 }, [w(P(Yt), {
|
|
2488
2481
|
size: 20,
|
|
2489
2482
|
"stroke-width": 1.5
|
|
2490
|
-
}), T(" " + k(
|
|
2483
|
+
}), T(" " + k(P(i).image.dropToUpload), 1)], 64))])) : I("", !0), e.block.src && b.value && e.block.placeholderUrl ? (O(), S(N, { key: 1 }, [e.block.linkUrl ? (O(), S("a", {
|
|
2491
2484
|
key: 0,
|
|
2492
2485
|
href: e.block.linkUrl,
|
|
2493
2486
|
target: "_blank",
|
|
2494
2487
|
rel: "noopener noreferrer",
|
|
2495
|
-
onClick: n[0] ||=
|
|
2488
|
+
onClick: n[0] ||= R(() => {}, ["prevent"])
|
|
2496
2489
|
}, [x("img", {
|
|
2497
2490
|
class: "tpl:border-0",
|
|
2498
2491
|
loading: "lazy",
|
|
2499
|
-
src:
|
|
2500
|
-
alt: e.block.alt ||
|
|
2492
|
+
src: P(E),
|
|
2493
|
+
alt: e.block.alt || P(i).image.altTextPlaceholder,
|
|
2501
2494
|
style: u(y.value)
|
|
2502
2495
|
}, null, 12, ri)], 8, ni)) : (O(), S("img", {
|
|
2503
2496
|
key: 1,
|
|
2504
2497
|
class: "tpl:border-0",
|
|
2505
|
-
src:
|
|
2498
|
+
src: P(E),
|
|
2506
2499
|
alt: e.block.alt,
|
|
2507
2500
|
style: u(y.value)
|
|
2508
2501
|
}, null, 12, ii))], 64)) : e.block.src && b.value ? (O(), S("div", {
|
|
2509
2502
|
key: 2,
|
|
2510
2503
|
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2511
2504
|
style: u([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, y.value])
|
|
2512
|
-
}, [w(
|
|
2505
|
+
}, [w(P(lr), {
|
|
2513
2506
|
size: 32,
|
|
2514
2507
|
"stroke-width": 1.5,
|
|
2515
2508
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2516
2509
|
style: { opacity: "0.5" }
|
|
2517
|
-
}), x("span", ai, [w(
|
|
2510
|
+
}), x("span", ai, [w($n, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (O(), S(N, { key: 3 }, [e.block.linkUrl ? (O(), S("a", {
|
|
2518
2511
|
key: 0,
|
|
2519
2512
|
href: e.block.linkUrl,
|
|
2520
2513
|
target: "_blank",
|
|
2521
2514
|
rel: "noopener noreferrer",
|
|
2522
|
-
onClick: n[1] ||=
|
|
2515
|
+
onClick: n[1] ||= R(() => {}, ["prevent"])
|
|
2523
2516
|
}, [x("img", {
|
|
2524
2517
|
class: "tpl:border-0",
|
|
2525
2518
|
loading: "lazy",
|
|
2526
|
-
src:
|
|
2527
|
-
alt: e.block.alt ||
|
|
2519
|
+
src: P(C),
|
|
2520
|
+
alt: e.block.alt || P(i).image.altTextPlaceholder,
|
|
2528
2521
|
style: u(y.value)
|
|
2529
2522
|
}, null, 12, si)], 8, oi)) : (O(), S("img", {
|
|
2530
2523
|
key: 1,
|
|
2531
2524
|
class: "tpl:border-0",
|
|
2532
|
-
src:
|
|
2525
|
+
src: P(C),
|
|
2533
2526
|
alt: e.block.alt,
|
|
2534
2527
|
style: u(y.value)
|
|
2535
2528
|
}, null, 12, ci))], 64)) : (O(), S("div", li, [s.value ? (O(), S("button", {
|
|
2536
2529
|
key: 0,
|
|
2537
|
-
"aria-label":
|
|
2530
|
+
"aria-label": P(i).image.browseMedia,
|
|
2538
2531
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
2539
|
-
onClick:
|
|
2540
|
-
}, [w(
|
|
2532
|
+
onClick: R(l, ["stop"])
|
|
2533
|
+
}, [w(P(lr), {
|
|
2541
2534
|
size: 14,
|
|
2542
2535
|
"stroke-width": 1.5
|
|
2543
|
-
}), T(" " + k(
|
|
2536
|
+
}), T(" " + k(P(i).image.browseMedia), 1)], 8, ui)) : (O(), S("span", di, k(P(i).image.clickToAdd), 1))]))], 4));
|
|
2544
2537
|
}
|
|
2545
2538
|
}), pi = { class: "tpl:w-full" }, mi = ["href"], hi = {
|
|
2546
2539
|
key: 1,
|
|
2547
2540
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2548
|
-
}, gi = /* @__PURE__ */
|
|
2541
|
+
}, gi = /* @__PURE__ */ L({
|
|
2549
2542
|
__name: "MenuBlock",
|
|
2550
2543
|
props: {
|
|
2551
2544
|
block: {},
|
|
2552
2545
|
viewport: {}
|
|
2553
2546
|
},
|
|
2554
2547
|
setup(e) {
|
|
2555
|
-
let t = e, { t: n } =
|
|
2548
|
+
let t = e, { t: n } = Lt(), r = F(() => ({
|
|
2556
2549
|
display: "flex",
|
|
2557
2550
|
flexWrap: "wrap",
|
|
2558
2551
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -2560,14 +2553,14 @@ var ti = {
|
|
|
2560
2553
|
fontSize: `${t.block.fontSize}px`,
|
|
2561
2554
|
fontFamily: t.block.fontFamily || "inherit",
|
|
2562
2555
|
alignItems: "center"
|
|
2563
|
-
})), i =
|
|
2556
|
+
})), i = F(() => t.block.items.length > 0);
|
|
2564
2557
|
function a(e) {
|
|
2565
2558
|
return e || t.block.linkColor || t.block.color;
|
|
2566
2559
|
}
|
|
2567
2560
|
return (t, o) => (O(), S("div", pi, [i.value ? (O(), S("div", {
|
|
2568
2561
|
key: 0,
|
|
2569
2562
|
style: u(r.value)
|
|
2570
|
-
}, [(O(!0), S(
|
|
2563
|
+
}, [(O(!0), S(N, null, D(e.block.items, (t, n) => (O(), S(N, { key: t.id }, [x("a", {
|
|
2571
2564
|
href: t.url || "#",
|
|
2572
2565
|
class: "tpl:cursor-default tpl:no-underline",
|
|
2573
2566
|
style: u({
|
|
@@ -2575,14 +2568,14 @@ var ti = {
|
|
|
2575
2568
|
fontWeight: t.bold ? "bold" : "normal",
|
|
2576
2569
|
textDecoration: t.underline ? "underline" : "none"
|
|
2577
2570
|
}),
|
|
2578
|
-
onClick: o[0] ||=
|
|
2579
|
-
}, [w(
|
|
2571
|
+
onClick: o[0] ||= R(() => {}, ["prevent"])
|
|
2572
|
+
}, [w($n, { text: t.text || "..." }, null, 8, ["text"])], 12, mi), n < e.block.items.length - 1 ? (O(), S("span", {
|
|
2580
2573
|
key: 0,
|
|
2581
2574
|
style: u({
|
|
2582
2575
|
color: e.block.separatorColor,
|
|
2583
2576
|
padding: `0 ${e.block.spacing}px`
|
|
2584
2577
|
})
|
|
2585
|
-
}, k(e.block.separator), 5)) :
|
|
2578
|
+
}, k(e.block.separator), 5)) : I("", !0)], 64))), 128))], 4)) : (O(), S("div", hi, [w(P(ur), { size: 16 }), x("span", null, k(P(n).menu.addLinks), 1)]))]));
|
|
2586
2579
|
}
|
|
2587
2580
|
}), _i = /* @__PURE__ */ new Set([
|
|
2588
2581
|
"http",
|
|
@@ -2656,7 +2649,7 @@ function Si(e) {
|
|
|
2656
2649
|
//#endregion
|
|
2657
2650
|
//#region src/composables/useEditableTextBlock.ts
|
|
2658
2651
|
function Ci(e) {
|
|
2659
|
-
let t = p(
|
|
2652
|
+
let t = p(dt, []), n = p(ft, null), { syntax: r } = $t(), i = F(() => n?.value ? oe(e(), t) : fe(e(), t)), a = F(() => Si(de(i.value, r))), o = _(!1), s = _(null), { top: c, left: l } = Ze(s), { toLocal: u } = Ut(), d = F(() => u({
|
|
2660
2653
|
top: c.value - 8,
|
|
2661
2654
|
left: l.value
|
|
2662
2655
|
}));
|
|
@@ -2677,24 +2670,24 @@ function Ci(e) {
|
|
|
2677
2670
|
}
|
|
2678
2671
|
//#endregion
|
|
2679
2672
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2680
|
-
var wi = ["innerHTML"], Ti = /* @__PURE__ */
|
|
2673
|
+
var wi = ["innerHTML"], Ti = /* @__PURE__ */ L({
|
|
2681
2674
|
__name: "ParagraphBlock",
|
|
2682
2675
|
props: {
|
|
2683
2676
|
block: {},
|
|
2684
2677
|
viewport: {}
|
|
2685
2678
|
},
|
|
2686
2679
|
setup(e) {
|
|
2687
|
-
let t = e, n = y(() => import("./ParagraphEditor-
|
|
2680
|
+
let t = e, n = y(() => import("./ParagraphEditor-C9-jQ5zP.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ci(() => t.block.content);
|
|
2688
2681
|
return (t, l) => (O(), S("div", {
|
|
2689
2682
|
ref_key: "blockRef",
|
|
2690
2683
|
ref: i,
|
|
2691
2684
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2692
|
-
onDblclick: l[0] ||= (...e) =>
|
|
2693
|
-
}, [
|
|
2685
|
+
onDblclick: l[0] ||= (...e) => P(s) && P(s)(...e)
|
|
2686
|
+
}, [P(r) ? (O(), A(P(n), {
|
|
2694
2687
|
key: 0,
|
|
2695
2688
|
block: e.block,
|
|
2696
|
-
"toolbar-position":
|
|
2697
|
-
onDone:
|
|
2689
|
+
"toolbar-position": P(a),
|
|
2690
|
+
onDone: P(c)
|
|
2698
2691
|
}, null, 8, [
|
|
2699
2692
|
"block",
|
|
2700
2693
|
"toolbar-position",
|
|
@@ -2702,7 +2695,7 @@ var wi = ["innerHTML"], Ti = /* @__PURE__ */ I({
|
|
|
2702
2695
|
])) : (O(), S("div", {
|
|
2703
2696
|
key: 1,
|
|
2704
2697
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
2705
|
-
innerHTML:
|
|
2698
|
+
innerHTML: P(o)
|
|
2706
2699
|
}, null, 8, wi))], 544));
|
|
2707
2700
|
}
|
|
2708
2701
|
});
|
|
@@ -2750,7 +2743,7 @@ var Ai = [
|
|
|
2750
2743
|
}, zi = ["aria-label", "title"], Bi = {
|
|
2751
2744
|
key: 3,
|
|
2752
2745
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2753
|
-
}, Vi = ["aria-label"], Hi = /*#__PURE__*/ Zt(/* @__PURE__ */
|
|
2746
|
+
}, Vi = ["aria-label"], Hi = /*#__PURE__*/ Zt(/* @__PURE__ */ L({
|
|
2754
2747
|
__name: "BlockWrapper",
|
|
2755
2748
|
props: {
|
|
2756
2749
|
block: {},
|
|
@@ -2762,7 +2755,7 @@ var Ai = [
|
|
|
2762
2755
|
},
|
|
2763
2756
|
emits: ["select"],
|
|
2764
2757
|
setup(e, { emit: t }) {
|
|
2765
|
-
let n = y(() => import("./BlockIssueBadge-
|
|
2758
|
+
let n = y(() => import("./BlockIssueBadge-DKaFQNxW.js")), i = e, a = t, { t: o, format: s } = Lt(), l = p(Pt, null), d = _(null), f = F(() => l?.liftedBlockId.value === i.block.id), h = F(() => f.value ? s(o.blockActions.dragLifted, { block: i.block.type }) : o.blockActions.drag);
|
|
2766
2759
|
async function g() {
|
|
2767
2760
|
await m(), d.value?.focus();
|
|
2768
2761
|
}
|
|
@@ -2785,32 +2778,32 @@ var Ai = [
|
|
|
2785
2778
|
}
|
|
2786
2779
|
}
|
|
2787
2780
|
}
|
|
2788
|
-
let b =
|
|
2781
|
+
let b = F(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), C = F(() => i.previewMode === !0 && b.value), E = F(() => i.viewport ? {
|
|
2789
2782
|
desktop: o.viewport.desktop,
|
|
2790
2783
|
mobile: o.viewport.mobile
|
|
2791
|
-
}[i.viewport] ?? i.viewport : ""), D =
|
|
2784
|
+
}[i.viewport] ?? i.viewport : ""), D = F(() => !!i.block.displayCondition), A = p(gt, null), j = p(yt, null), M = p(vt, {}), N = F(() => M.savedBlocks?.isPicking.value === !0), ee = F(() => !i.nested && M.savedBlocks?.isAvailable.value === !0 && M.savedBlocks?.canCreate.value === !0), L = F(() => i.isSelected && !N.value), te = F(() => M.comments?.getBlockCount(i.block.id) ?? 0), ne = F(() => {
|
|
2792
2785
|
let e = Oi(i.block), t = {
|
|
2793
2786
|
padding: e.padding,
|
|
2794
2787
|
backgroundColor: e.backgroundColor
|
|
2795
2788
|
};
|
|
2796
2789
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2797
|
-
}),
|
|
2798
|
-
function
|
|
2790
|
+
}), re = F(() => ki(i.block));
|
|
2791
|
+
function ie(e) {
|
|
2799
2792
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2800
2793
|
}
|
|
2801
|
-
function
|
|
2794
|
+
function ae() {
|
|
2802
2795
|
A?.deleteBlock(i.block.id);
|
|
2803
2796
|
}
|
|
2804
|
-
function
|
|
2797
|
+
function oe() {
|
|
2805
2798
|
A?.duplicateBlock(i.block);
|
|
2806
2799
|
}
|
|
2807
|
-
function
|
|
2808
|
-
|
|
2800
|
+
function se() {
|
|
2801
|
+
M.savedBlocks?.startPicking(i.block.id);
|
|
2809
2802
|
}
|
|
2810
|
-
function
|
|
2811
|
-
|
|
2803
|
+
function ce() {
|
|
2804
|
+
j?.toggleBlock(i.block.id);
|
|
2812
2805
|
}
|
|
2813
|
-
return (t, i) => C.value ?
|
|
2806
|
+
return (t, i) => C.value ? I("", !0) : (O(), S("div", {
|
|
2814
2807
|
key: 0,
|
|
2815
2808
|
class: r(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
2816
2809
|
"tpl-block--selected": e.isSelected,
|
|
@@ -2821,13 +2814,13 @@ var Ai = [
|
|
|
2821
2814
|
"data-block-id": e.block.id,
|
|
2822
2815
|
"data-block-type": e.block.type,
|
|
2823
2816
|
"data-tpl-picked": e.picked || void 0,
|
|
2824
|
-
onClick:
|
|
2817
|
+
onClick: ie
|
|
2825
2818
|
}, [
|
|
2826
|
-
w(
|
|
2827
|
-
|
|
2819
|
+
w(P(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
2820
|
+
L.value ? (O(), S("div", {
|
|
2828
2821
|
key: 0,
|
|
2829
2822
|
role: "toolbar",
|
|
2830
|
-
"aria-label":
|
|
2823
|
+
"aria-label": P(o).blockActions.drag,
|
|
2831
2824
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
2832
2825
|
}, [
|
|
2833
2826
|
x("button", {
|
|
@@ -2837,74 +2830,74 @@ var Ai = [
|
|
|
2837
2830
|
"aria-label": h.value,
|
|
2838
2831
|
"aria-pressed": f.value,
|
|
2839
2832
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2840
|
-
title:
|
|
2833
|
+
title: P(o).blockActions.drag,
|
|
2841
2834
|
onKeydown: v
|
|
2842
|
-
}, [w(
|
|
2835
|
+
}, [w(P(cr), {
|
|
2843
2836
|
size: 14,
|
|
2844
2837
|
"stroke-width": 1.5
|
|
2845
2838
|
})], 40, Mi),
|
|
2846
2839
|
x("button", {
|
|
2847
2840
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2848
|
-
"aria-label":
|
|
2849
|
-
title:
|
|
2850
|
-
onClick:
|
|
2851
|
-
}, [w(
|
|
2841
|
+
"aria-label": P(o).blockActions.duplicate,
|
|
2842
|
+
title: P(o).blockActions.duplicate,
|
|
2843
|
+
onClick: R(oe, ["stop"])
|
|
2844
|
+
}, [w(P(ar), {
|
|
2852
2845
|
size: 14,
|
|
2853
2846
|
"stroke-width": 1.5
|
|
2854
2847
|
})], 8, Ni),
|
|
2855
|
-
|
|
2848
|
+
ee.value ? (O(), S("button", {
|
|
2856
2849
|
key: 0,
|
|
2857
2850
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2858
|
-
"aria-label":
|
|
2859
|
-
title:
|
|
2860
|
-
onClick:
|
|
2861
|
-
}, [w(
|
|
2851
|
+
"aria-label": P(o).blockActions.saveAsBlock,
|
|
2852
|
+
title: P(o).blockActions.saveAsBlock,
|
|
2853
|
+
onClick: R(se, ["stop"])
|
|
2854
|
+
}, [w(P(nr), {
|
|
2862
2855
|
size: 14,
|
|
2863
2856
|
"stroke-width": 1.5
|
|
2864
|
-
})], 8, Pi)) :
|
|
2857
|
+
})], 8, Pi)) : I("", !0),
|
|
2865
2858
|
x("button", {
|
|
2866
2859
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2867
|
-
"aria-label":
|
|
2868
|
-
title:
|
|
2869
|
-
onClick:
|
|
2870
|
-
}, [w(
|
|
2860
|
+
"aria-label": P(o).blockActions.delete,
|
|
2861
|
+
title: P(o).blockActions.delete,
|
|
2862
|
+
onClick: R(ae, ["stop"])
|
|
2863
|
+
}, [w(P(qt), {
|
|
2871
2864
|
size: 14,
|
|
2872
2865
|
"stroke-width": 1.5
|
|
2873
2866
|
})], 8, Fi)
|
|
2874
|
-
], 8, ji)) :
|
|
2875
|
-
b.value ? (O(), S("div", Ii, [x("span", Li, [w(
|
|
2867
|
+
], 8, ji)) : I("", !0),
|
|
2868
|
+
b.value ? (O(), S("div", Ii, [x("span", Li, [w(P(or), {
|
|
2876
2869
|
size: 12,
|
|
2877
2870
|
"stroke-width": 1.5
|
|
2878
|
-
}), T(" " + k(
|
|
2871
|
+
}), T(" " + k(P(s)(P(o).blockActions.hiddenOnViewport, { viewport: E.value })), 1)])])) : I("", !0),
|
|
2879
2872
|
D.value && !b.value ? (O(), S("div", Ri, [x("button", {
|
|
2880
2873
|
"data-testid": "condition-toggle",
|
|
2881
2874
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2882
|
-
"aria-label":
|
|
2875
|
+
"aria-label": P(o).blockActions.conditionToggle,
|
|
2883
2876
|
title: e.block.displayCondition?.label,
|
|
2884
|
-
onClick:
|
|
2885
|
-
}, [w(
|
|
2877
|
+
onClick: R(ce, ["stop"])
|
|
2878
|
+
}, [w(P(sr), {
|
|
2886
2879
|
size: 12,
|
|
2887
2880
|
"stroke-width": 2
|
|
2888
|
-
})], 8, zi)])) :
|
|
2889
|
-
|
|
2881
|
+
})], 8, zi)])) : I("", !0),
|
|
2882
|
+
te.value > 0 && !b.value ? (O(), S("div", Bi, [x("button", {
|
|
2890
2883
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2891
|
-
"aria-label":
|
|
2892
|
-
onClick: i[0] ||=
|
|
2893
|
-
}, [w(
|
|
2884
|
+
"aria-label": P(s)(P(o).blockActions.comments, { count: String(te.value) }),
|
|
2885
|
+
onClick: i[0] ||= R((t) => P(M).comments?.openForBlock(e.block.id), ["stop"])
|
|
2886
|
+
}, [w(P(Kt), {
|
|
2894
2887
|
size: 12,
|
|
2895
2888
|
"stroke-width": 2.5
|
|
2896
|
-
}), T(" " + k(
|
|
2897
|
-
|
|
2889
|
+
}), T(" " + k(te.value), 1)], 8, Vi)])) : I("", !0),
|
|
2890
|
+
re.value ? (O(), S("div", {
|
|
2898
2891
|
key: 4,
|
|
2899
2892
|
class: "tpl-section-wrapper",
|
|
2900
|
-
style: u(
|
|
2893
|
+
style: u(re.value)
|
|
2901
2894
|
}, [x("div", {
|
|
2902
2895
|
class: "tpl-block-content",
|
|
2903
|
-
style: u(
|
|
2896
|
+
style: u(ne.value)
|
|
2904
2897
|
}, [c(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (O(), S("div", {
|
|
2905
2898
|
key: 5,
|
|
2906
2899
|
class: "tpl-block-content",
|
|
2907
|
-
style: u(
|
|
2900
|
+
style: u(ne.value)
|
|
2908
2901
|
}, [c(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2909
2902
|
], 10, Ai));
|
|
2910
2903
|
}
|
|
@@ -2917,31 +2910,31 @@ function Ui(e) {
|
|
|
2917
2910
|
}
|
|
2918
2911
|
//#endregion
|
|
2919
2912
|
//#region src/components/blocks/TitleBlock.vue
|
|
2920
|
-
var Wi = /* @__PURE__ */
|
|
2913
|
+
var Wi = /* @__PURE__ */ L({
|
|
2921
2914
|
__name: "TitleBlock",
|
|
2922
2915
|
props: {
|
|
2923
2916
|
block: {},
|
|
2924
2917
|
viewport: {}
|
|
2925
2918
|
},
|
|
2926
2919
|
setup(e) {
|
|
2927
|
-
let t = e, n = y(() => import("./TitleEditor-
|
|
2920
|
+
let t = e, n = y(() => import("./TitleEditor-BWLwZh84.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ci(() => t.block.content), l = F(() => {
|
|
2928
2921
|
let e = {
|
|
2929
|
-
fontSize: `${
|
|
2922
|
+
fontSize: `${Ie[t.block.level]}px`,
|
|
2930
2923
|
textAlign: t.block.textAlign
|
|
2931
2924
|
};
|
|
2932
2925
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2933
|
-
}), f =
|
|
2926
|
+
}), f = F(() => `h${t.block.level}`), p = F(() => Ui(o.value));
|
|
2934
2927
|
return (t, o) => (O(), S("div", {
|
|
2935
2928
|
ref_key: "blockRef",
|
|
2936
2929
|
ref: i,
|
|
2937
2930
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2938
2931
|
style: u(l.value),
|
|
2939
|
-
onDblclick: o[0] ||= (...e) =>
|
|
2940
|
-
}, [
|
|
2932
|
+
onDblclick: o[0] ||= (...e) => P(s) && P(s)(...e)
|
|
2933
|
+
}, [P(r) ? (O(), A(P(n), {
|
|
2941
2934
|
key: 0,
|
|
2942
2935
|
block: e.block,
|
|
2943
|
-
"toolbar-position":
|
|
2944
|
-
onDone:
|
|
2936
|
+
"toolbar-position": P(a),
|
|
2937
|
+
onDone: P(c)
|
|
2945
2938
|
}, null, 8, [
|
|
2946
2939
|
"block",
|
|
2947
2940
|
"toolbar-position",
|
|
@@ -3790,10 +3783,10 @@ Q.prototype = {
|
|
|
3790
3783
|
}
|
|
3791
3784
|
if (x === 0 || O === n) return _(!1);
|
|
3792
3785
|
jo = n, Mo = x;
|
|
3793
|
-
var A = n.nextElementSibling,
|
|
3794
|
-
|
|
3795
|
-
var
|
|
3796
|
-
if (
|
|
3786
|
+
var A = n.nextElementSibling, j = !1;
|
|
3787
|
+
j = x === 1;
|
|
3788
|
+
var M = $o(J, t, G, r, n, i, e, j);
|
|
3789
|
+
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), Lo = !0, setTimeout(ts, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && eo(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !Po && (Fo = Math.abs(S - H(n)[T])), v(), _(!0);
|
|
3797
3790
|
}
|
|
3798
3791
|
if (t.contains(G)) return _(!1);
|
|
3799
3792
|
}
|
|
@@ -4128,10 +4121,10 @@ function ws(e) {
|
|
|
4128
4121
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
4129
4122
|
}
|
|
4130
4123
|
function Ts(e) {
|
|
4131
|
-
|
|
4124
|
+
te() && l(e);
|
|
4132
4125
|
}
|
|
4133
4126
|
function Es(e) {
|
|
4134
|
-
|
|
4127
|
+
te() ? n(e) : m(e);
|
|
4135
4128
|
}
|
|
4136
4129
|
var Ds = null, Os = null;
|
|
4137
4130
|
function ks(e = null, t = null) {
|
|
@@ -4145,24 +4138,24 @@ function As() {
|
|
|
4145
4138
|
}
|
|
4146
4139
|
var js = Symbol("cloneElement");
|
|
4147
4140
|
function Ms(...e) {
|
|
4148
|
-
let t =
|
|
4149
|
-
Array.isArray(
|
|
4150
|
-
let c = null, { immediate: l = !0, clone: u = ws, forceFallback: d, fallbackOnBody: f, customUpdate: p } =
|
|
4141
|
+
let t = te()?.proxy, n = null, r = e[0], [, i, o] = e;
|
|
4142
|
+
Array.isArray(P(i)) || (o = i, i = null);
|
|
4143
|
+
let c = null, { immediate: l = !0, clone: u = ws, forceFallback: d, fallbackOnBody: f, customUpdate: p } = P(o) ?? {};
|
|
4151
4144
|
function h(e) {
|
|
4152
4145
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
4153
4146
|
n = d && !f ? o.slice(0, -1) : o;
|
|
4154
|
-
let s =
|
|
4147
|
+
let s = P(P(i)?.[r]), c = u(s);
|
|
4155
4148
|
ks(s, c), a[js] = c;
|
|
4156
4149
|
}
|
|
4157
4150
|
function g(e) {
|
|
4158
4151
|
let t = e.item[js];
|
|
4159
4152
|
if (!sa(t)) {
|
|
4160
4153
|
if (ua(e.item), a(i)) {
|
|
4161
|
-
let n = [...
|
|
4154
|
+
let n = [...P(i)];
|
|
4162
4155
|
i.value = oa(n, e.newDraggableIndex, t);
|
|
4163
4156
|
return;
|
|
4164
4157
|
}
|
|
4165
|
-
oa(
|
|
4158
|
+
oa(P(i), e.newDraggableIndex, t);
|
|
4166
4159
|
}
|
|
4167
4160
|
}
|
|
4168
4161
|
function _(e) {
|
|
@@ -4172,11 +4165,11 @@ function Ms(...e) {
|
|
|
4172
4165
|
return;
|
|
4173
4166
|
}
|
|
4174
4167
|
if (a(i)) {
|
|
4175
|
-
let e = [...
|
|
4168
|
+
let e = [...P(i)];
|
|
4176
4169
|
i.value = aa(e, o);
|
|
4177
4170
|
return;
|
|
4178
4171
|
}
|
|
4179
|
-
aa(
|
|
4172
|
+
aa(P(i), o);
|
|
4180
4173
|
}
|
|
4181
4174
|
function v(e) {
|
|
4182
4175
|
if (p) {
|
|
@@ -4185,11 +4178,11 @@ function Ms(...e) {
|
|
|
4185
4178
|
}
|
|
4186
4179
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: o, newDraggableIndex: s } = e;
|
|
4187
4180
|
if (ua(n), la(t, n, r), a(i)) {
|
|
4188
|
-
let e = [...
|
|
4181
|
+
let e = [...P(i)];
|
|
4189
4182
|
i.value = na(e, o, s);
|
|
4190
4183
|
return;
|
|
4191
4184
|
}
|
|
4192
|
-
na(
|
|
4185
|
+
na(P(i), o, s);
|
|
4193
4186
|
}
|
|
4194
4187
|
function y(e) {
|
|
4195
4188
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -4219,11 +4212,11 @@ function Ms(...e) {
|
|
|
4219
4212
|
onEnd: y
|
|
4220
4213
|
};
|
|
4221
4214
|
function x(e) {
|
|
4222
|
-
let n =
|
|
4215
|
+
let n = P(r);
|
|
4223
4216
|
return e ||= ca(n) ? da(n, t?.$el) : n, e && !ma(e) && (e = e.$el), e || ta("Root element not found"), e;
|
|
4224
4217
|
}
|
|
4225
4218
|
function S() {
|
|
4226
|
-
let e =
|
|
4219
|
+
let e = P(o) ?? {}, { immediate: t, clone: n } = e, r = Qi(e, ["immediate", "clone"]);
|
|
4227
4220
|
return ha(r, (e, t) => {
|
|
4228
4221
|
ga(e) && (r[e] = (e, ...n) => (_a(e, As()), t(e, ...n)));
|
|
4229
4222
|
}), pa(i === null ? {} : b, r);
|
|
@@ -4311,7 +4304,7 @@ var Ns = [
|
|
|
4311
4304
|
"target",
|
|
4312
4305
|
"customUpdate",
|
|
4313
4306
|
...Ns.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
4314
|
-
], Fs =
|
|
4307
|
+
], Fs = L({
|
|
4315
4308
|
name: "VueDraggable",
|
|
4316
4309
|
model: {
|
|
4317
4310
|
prop: "modelValue",
|
|
@@ -4323,13 +4316,13 @@ var Ns = [
|
|
|
4323
4316
|
let a = Ns.reduce((e, t) => {
|
|
4324
4317
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
4325
4318
|
return e[r] = (...e) => n(t, ...e), e;
|
|
4326
|
-
}, {}), s =
|
|
4319
|
+
}, {}), s = F(() => {
|
|
4327
4320
|
let t = C(e), { modelValue: n } = t, r = Qi(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
4328
|
-
let r =
|
|
4321
|
+
let r = P(n);
|
|
4329
4322
|
return r !== void 0 && (e[t] = r), e;
|
|
4330
4323
|
}, {});
|
|
4331
4324
|
return Zi(Zi({}, a), ia(Zi(Zi({}, i), o)));
|
|
4332
|
-
}), c =
|
|
4325
|
+
}), c = F({
|
|
4333
4326
|
get: () => e.modelValue,
|
|
4334
4327
|
set: (e) => n("update:modelValue", e)
|
|
4335
4328
|
}), l = _(), u = o(Ms(e.target || l, c, s));
|
|
@@ -4346,7 +4339,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4346
4339
|
key: 0,
|
|
4347
4340
|
"data-testid": "section-drop-hint",
|
|
4348
4341
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
4349
|
-
}, zs = /* @__PURE__ */
|
|
4342
|
+
}, zs = /* @__PURE__ */ L({
|
|
4350
4343
|
__name: "SectionBlock",
|
|
4351
4344
|
props: {
|
|
4352
4345
|
block: {},
|
|
@@ -4357,10 +4350,10 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4357
4350
|
title: Wi,
|
|
4358
4351
|
paragraph: Ti,
|
|
4359
4352
|
image: fi,
|
|
4360
|
-
button:
|
|
4353
|
+
button: tr,
|
|
4361
4354
|
divider: Kr,
|
|
4362
4355
|
custom: Wr
|
|
4363
|
-
}, i = e, { t: a } =
|
|
4356
|
+
}, i = e, { t: a } = Lt(), o = mt(St, "SectionBlock"), s = p(yt, null), c = p(At, null), l = p(vt, {}), f = p(kt, null);
|
|
4364
4357
|
function m(e) {
|
|
4365
4358
|
let t = l.savedBlocks;
|
|
4366
4359
|
if (t?.isPicking.value) {
|
|
@@ -4369,7 +4362,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4369
4362
|
}
|
|
4370
4363
|
o.selectBlock(e);
|
|
4371
4364
|
}
|
|
4372
|
-
let h =
|
|
4365
|
+
let h = F(() => {
|
|
4373
4366
|
switch (i.block.columns) {
|
|
4374
4367
|
case "2": return ["50%", "50%"];
|
|
4375
4368
|
case "3": return [
|
|
@@ -4381,11 +4374,11 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4381
4374
|
case "2-1": return ["66.67%", "33.33%"];
|
|
4382
4375
|
default: return ["100%"];
|
|
4383
4376
|
}
|
|
4384
|
-
}), g =
|
|
4377
|
+
}), g = F(() => {
|
|
4385
4378
|
let e = h.value.length, t = [...i.block.children];
|
|
4386
4379
|
for (; t.length < e;) t.push([]);
|
|
4387
4380
|
return t.slice(0, e);
|
|
4388
|
-
}), _ =
|
|
4381
|
+
}), _ = F(() => i.viewport === "mobile" && i.block.stackOnMobile !== !1);
|
|
4389
4382
|
function v(e) {
|
|
4390
4383
|
return g.value[e] || [];
|
|
4391
4384
|
}
|
|
@@ -4403,16 +4396,16 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4403
4396
|
dataSourceFetched: t.dataSourceFetched
|
|
4404
4397
|
});
|
|
4405
4398
|
}
|
|
4406
|
-
return (n, i) => (O(), S("div", Ls, [x("div", { class: r(["tpl:flex tpl:gap-0", { "tpl:flex-col": _.value }]) }, [(O(!0), S(
|
|
4399
|
+
return (n, i) => (O(), S("div", Ls, [x("div", { class: r(["tpl:flex tpl:gap-0", { "tpl:flex-col": _.value }]) }, [(O(!0), S(N, null, D(g.value, (n, i) => (O(), S("div", {
|
|
4407
4400
|
key: i,
|
|
4408
4401
|
class: r(["tpl:relative tpl:min-h-[60px] tpl:rounded", v(i).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
4409
4402
|
style: u({ width: _.value ? "100%" : h.value[i] })
|
|
4410
|
-
}, [w(
|
|
4403
|
+
}, [w(P(Fs), {
|
|
4411
4404
|
"model-value": v(i),
|
|
4412
4405
|
group: {
|
|
4413
4406
|
name: "blocks",
|
|
4414
4407
|
pull: !0,
|
|
4415
|
-
put: (e, t, n) =>
|
|
4408
|
+
put: (e, t, n) => P(Gi)(n)
|
|
4416
4409
|
},
|
|
4417
4410
|
animation: 150,
|
|
4418
4411
|
"ghost-class": "tpl-ghost",
|
|
@@ -4425,19 +4418,19 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4425
4418
|
class: "tpl:min-h-[60px]",
|
|
4426
4419
|
"onUpdate:modelValue": (e) => y(i, e)
|
|
4427
4420
|
}, {
|
|
4428
|
-
default:
|
|
4421
|
+
default: ne(() => [(O(!0), S(N, null, D(v(i), (n) => t((O(), S("div", { key: n.id }, [w(Hi, {
|
|
4429
4422
|
block: n,
|
|
4430
|
-
"is-selected":
|
|
4423
|
+
"is-selected": P(o).state.selectedBlockId === n.id,
|
|
4431
4424
|
viewport: e.viewport,
|
|
4432
|
-
"preview-mode":
|
|
4425
|
+
"preview-mode": P(o).state.previewMode,
|
|
4433
4426
|
nested: "",
|
|
4434
4427
|
onSelect: (e) => m(n.id)
|
|
4435
4428
|
}, {
|
|
4436
|
-
default:
|
|
4429
|
+
default: ne(() => [(O(), A(d(b(n)), {
|
|
4437
4430
|
block: n,
|
|
4438
4431
|
viewport: e.viewport,
|
|
4439
4432
|
onFetchData: (e) => C(n, e),
|
|
4440
|
-
onUpdate: (e) =>
|
|
4433
|
+
onUpdate: (e) => P(o).updateBlock(n.id, e)
|
|
4441
4434
|
}, null, 40, [
|
|
4442
4435
|
"block",
|
|
4443
4436
|
"viewport",
|
|
@@ -4451,15 +4444,15 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4451
4444
|
"viewport",
|
|
4452
4445
|
"preview-mode",
|
|
4453
4446
|
"onSelect"
|
|
4454
|
-
])])), [[
|
|
4447
|
+
])])), [[re, P(f) === !1 || !P(s)?.isHidden(n.id)]])), 128))]),
|
|
4455
4448
|
_: 2
|
|
4456
4449
|
}, 1032, [
|
|
4457
4450
|
"model-value",
|
|
4458
4451
|
"group",
|
|
4459
4452
|
"onUpdate:modelValue"
|
|
4460
|
-
]), v(i).length === 0 ? (O(), S("div", Rs, [x("span", null, k(
|
|
4453
|
+
]), v(i).length === 0 ? (O(), S("div", Rs, [x("span", null, k(P(a).section.dropHere), 1)])) : I("", !0)], 6))), 128))], 2)]));
|
|
4461
4454
|
}
|
|
4462
|
-
}), Bs =
|
|
4455
|
+
}), Bs = ke, Vs = {
|
|
4463
4456
|
small: 24,
|
|
4464
4457
|
medium: 32,
|
|
4465
4458
|
large: 48
|
|
@@ -4485,7 +4478,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4485
4478
|
"width",
|
|
4486
4479
|
"height",
|
|
4487
4480
|
"fill"
|
|
4488
|
-
], Ws = ["d"], Gs = /* @__PURE__ */
|
|
4481
|
+
], Ws = ["d"], Gs = /* @__PURE__ */ L({
|
|
4489
4482
|
__name: "SocialIconSvg",
|
|
4490
4483
|
props: {
|
|
4491
4484
|
platform: {},
|
|
@@ -4493,7 +4486,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4493
4486
|
iconSize: {}
|
|
4494
4487
|
},
|
|
4495
4488
|
setup(e) {
|
|
4496
|
-
let t = e, n =
|
|
4489
|
+
let t = e, n = F(() => Bs[t.platform]), r = F(() => Vs[t.iconSize]), i = F(() => {
|
|
4497
4490
|
let e = {
|
|
4498
4491
|
display: "inline-flex",
|
|
4499
4492
|
alignItems: "center",
|
|
@@ -4530,7 +4523,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4530
4523
|
};
|
|
4531
4524
|
default: return e;
|
|
4532
4525
|
}
|
|
4533
|
-
}), a =
|
|
4526
|
+
}), a = F(() => Math.floor(r.value * .6)), o = F(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
4534
4527
|
return (e, t) => (O(), S("span", { style: u(i.value) }, [(O(), S("svg", {
|
|
4535
4528
|
width: a.value,
|
|
4536
4529
|
height: a.value,
|
|
@@ -4542,27 +4535,27 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4542
4535
|
}), Ks = { class: "tpl:w-full" }, qs = ["href"], Js = {
|
|
4543
4536
|
key: 1,
|
|
4544
4537
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
4545
|
-
}, Ys = /* @__PURE__ */
|
|
4538
|
+
}, Ys = /* @__PURE__ */ L({
|
|
4546
4539
|
__name: "SocialIconsBlock",
|
|
4547
4540
|
props: {
|
|
4548
4541
|
block: {},
|
|
4549
4542
|
viewport: {}
|
|
4550
4543
|
},
|
|
4551
4544
|
setup(e) {
|
|
4552
|
-
let t = e, { t: n } =
|
|
4545
|
+
let t = e, { t: n } = Lt(), r = F(() => ({
|
|
4553
4546
|
display: "flex",
|
|
4554
4547
|
flexWrap: "wrap",
|
|
4555
4548
|
gap: `${t.block.spacing}px`,
|
|
4556
4549
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4557
|
-
})), i =
|
|
4550
|
+
})), i = F(() => t.block.icons.length > 0);
|
|
4558
4551
|
return (t, a) => (O(), S("div", Ks, [i.value ? (O(), S("div", {
|
|
4559
4552
|
key: 0,
|
|
4560
4553
|
style: u(r.value)
|
|
4561
|
-
}, [(O(!0), S(
|
|
4554
|
+
}, [(O(!0), S(N, null, D(e.block.icons, (t) => (O(), S("a", {
|
|
4562
4555
|
key: t.id,
|
|
4563
4556
|
href: t.url || "#",
|
|
4564
4557
|
class: "tpl:cursor-default",
|
|
4565
|
-
onClick: a[0] ||=
|
|
4558
|
+
onClick: a[0] ||= R(() => {}, ["prevent"])
|
|
4566
4559
|
}, [w(Gs, {
|
|
4567
4560
|
platform: t.platform,
|
|
4568
4561
|
"icon-style": e.block.iconStyle,
|
|
@@ -4571,7 +4564,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4571
4564
|
"platform",
|
|
4572
4565
|
"icon-style",
|
|
4573
4566
|
"icon-size"
|
|
4574
|
-
])], 8, qs))), 128))], 4)) : (O(), S("div", Js, [w(
|
|
4567
|
+
])], 8, qs))), 128))], 4)) : (O(), S("div", Js, [w(P(fr), { size: 16 }), x("span", null, k(P(n).social.addIcons), 1)]))]));
|
|
4575
4568
|
}
|
|
4576
4569
|
}), Xs = { class: "tpl:w-full" }, Zs = {
|
|
4577
4570
|
key: 0,
|
|
@@ -4580,22 +4573,22 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4580
4573
|
"background-color": "var(--tpl-bg-hover)",
|
|
4581
4574
|
color: "var(--tpl-text-dim)"
|
|
4582
4575
|
}
|
|
4583
|
-
}, Qs = /* @__PURE__ */
|
|
4576
|
+
}, Qs = /* @__PURE__ */ L({
|
|
4584
4577
|
__name: "SpacerBlock",
|
|
4585
4578
|
props: {
|
|
4586
4579
|
block: {},
|
|
4587
4580
|
viewport: {}
|
|
4588
4581
|
},
|
|
4589
4582
|
setup(e) {
|
|
4590
|
-
let t = e, n =
|
|
4583
|
+
let t = e, n = mt(St, "SpacerBlock"), i = F(() => ({
|
|
4591
4584
|
height: `${t.block.height}px`,
|
|
4592
4585
|
minHeight: `${t.block.height}px`,
|
|
4593
4586
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4594
4587
|
}));
|
|
4595
4588
|
return (t, a) => (O(), S("div", Xs, [x("div", {
|
|
4596
4589
|
style: u(i.value),
|
|
4597
|
-
class: r(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !
|
|
4598
|
-
}, [
|
|
4590
|
+
class: r(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !P(n).state.previewMode }])
|
|
4591
|
+
}, [P(n).state.previewMode ? I("", !0) : (O(), S("span", Zs, k(e.block.height) + "px ", 1))], 6)]));
|
|
4599
4592
|
}
|
|
4600
4593
|
}), $s = { class: "tpl:w-full" }, ec = { key: 0 }, tc = [
|
|
4601
4594
|
"aria-label",
|
|
@@ -4608,7 +4601,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4608
4601
|
], rc = {
|
|
4609
4602
|
key: 1,
|
|
4610
4603
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
4611
|
-
}, ic = /*#__PURE__*/ Zt(/* @__PURE__ */
|
|
4604
|
+
}, ic = /*#__PURE__*/ Zt(/* @__PURE__ */ L({
|
|
4612
4605
|
__name: "TableBlock",
|
|
4613
4606
|
props: {
|
|
4614
4607
|
block: {},
|
|
@@ -4622,7 +4615,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4622
4615
|
updated(e, t) {
|
|
4623
4616
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4624
4617
|
}
|
|
4625
|
-
}, r = e, { t: i } =
|
|
4618
|
+
}, r = e, { t: i } = Lt(), a = mt(St, "TableBlock"), o = F(() => r.block.rows.length > 0), s = F(() => {
|
|
4626
4619
|
let e = {
|
|
4627
4620
|
width: "100%",
|
|
4628
4621
|
borderCollapse: "collapse",
|
|
@@ -4631,15 +4624,15 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4631
4624
|
fontFamily: r.block.fontFamily || "inherit"
|
|
4632
4625
|
};
|
|
4633
4626
|
return r.block.color && (e.color = r.block.color), e;
|
|
4634
|
-
}), c =
|
|
4627
|
+
}), c = F(() => ({
|
|
4635
4628
|
border: `${r.block.borderWidth}px solid ${r.block.borderColor}`,
|
|
4636
4629
|
padding: `${r.block.cellPadding}px`,
|
|
4637
4630
|
textAlign: r.block.textAlign
|
|
4638
|
-
})), l =
|
|
4631
|
+
})), l = F(() => ({
|
|
4639
4632
|
...c.value,
|
|
4640
4633
|
fontWeight: "bold",
|
|
4641
4634
|
backgroundColor: r.block.headerBackgroundColor || "transparent"
|
|
4642
|
-
})), d =
|
|
4635
|
+
})), d = F(() => r.block.hasHeaderRow && r.block.rows.length > 0 ? r.block.rows[0] : null), f = F(() => r.block.hasHeaderRow ? r.block.rows.slice(1) : r.block.rows);
|
|
4643
4636
|
function p() {
|
|
4644
4637
|
a.selectBlock(r.block.id);
|
|
4645
4638
|
}
|
|
@@ -4657,27 +4650,27 @@ var Ls = { class: "tpl:w-full" }, Rs = {
|
|
|
4657
4650
|
key: 0,
|
|
4658
4651
|
style: u(s.value),
|
|
4659
4652
|
class: "tpl-table-editable"
|
|
4660
|
-
}, [d.value ? (O(), S("thead", ec, [x("tr", null, [(O(!0), S(
|
|
4653
|
+
}, [d.value ? (O(), S("thead", ec, [x("tr", null, [(O(!0), S(N, null, D(d.value.cells, (e) => t((O(), S("th", {
|
|
4661
4654
|
key: e.id,
|
|
4662
4655
|
style: u(l.value),
|
|
4663
|
-
"aria-label":
|
|
4656
|
+
"aria-label": P(i).table.cellPlaceholder,
|
|
4664
4657
|
contenteditable: "true",
|
|
4665
|
-
"data-placeholder":
|
|
4658
|
+
"data-placeholder": P(i).table.cellPlaceholder,
|
|
4666
4659
|
onBlur: (t) => m(d.value.id, e.id, t),
|
|
4667
|
-
onKeydown: r[0] ||=
|
|
4668
|
-
onClick:
|
|
4669
|
-
}, null, 44, tc)), [[n, e.content]])), 128))])])) :
|
|
4660
|
+
onKeydown: r[0] ||= ie(R((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4661
|
+
onClick: R(p, ["stop"])
|
|
4662
|
+
}, null, 44, tc)), [[n, e.content]])), 128))])])) : I("", !0), x("tbody", null, [(O(!0), S(N, null, D(f.value, (e) => (O(), S("tr", { key: e.id }, [(O(!0), S(N, null, D(e.cells, (a) => t((O(), S("td", {
|
|
4670
4663
|
key: a.id,
|
|
4671
4664
|
style: u(c.value),
|
|
4672
|
-
"aria-label":
|
|
4665
|
+
"aria-label": P(i).table.cellPlaceholder,
|
|
4673
4666
|
contenteditable: "true",
|
|
4674
|
-
"data-placeholder":
|
|
4667
|
+
"data-placeholder": P(i).table.cellPlaceholder,
|
|
4675
4668
|
onBlur: (t) => m(e.id, a.id, t),
|
|
4676
|
-
onKeydown: r[1] ||=
|
|
4677
|
-
onClick:
|
|
4678
|
-
}, null, 44, nc)), [[n, a.content]])), 128))]))), 128))])], 4)) : (O(), S("div", rc, [w(
|
|
4669
|
+
onKeydown: r[1] ||= ie(R((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4670
|
+
onClick: R(p, ["stop"])
|
|
4671
|
+
}, null, 44, nc)), [[n, a.content]])), 128))]))), 128))])], 4)) : (O(), S("div", rc, [w(P(pr), { size: 16 }), x("span", null, k(P(i).table.empty), 1)]))]));
|
|
4679
4672
|
}
|
|
4680
|
-
}), [["__scopeId", "data-v-963ac422"]]), ac = /* @__PURE__ */
|
|
4673
|
+
}), [["__scopeId", "data-v-963ac422"]]), ac = /* @__PURE__ */ L({
|
|
4681
4674
|
__name: "VideoPlayButton",
|
|
4682
4675
|
props: { hoverEffect: {
|
|
4683
4676
|
type: Boolean,
|
|
@@ -4738,14 +4731,14 @@ var cc = ["src", "alt"], lc = {
|
|
|
4738
4731
|
}, uc = ["href"], dc = ["src", "alt"], fc = ["src", "alt"], pc = {
|
|
4739
4732
|
key: 3,
|
|
4740
4733
|
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
4741
|
-
}, mc = /* @__PURE__ */
|
|
4734
|
+
}, mc = /* @__PURE__ */ L({
|
|
4742
4735
|
__name: "VideoBlock",
|
|
4743
4736
|
props: {
|
|
4744
4737
|
block: {},
|
|
4745
4738
|
viewport: {}
|
|
4746
4739
|
},
|
|
4747
4740
|
setup(e) {
|
|
4748
|
-
let t = e, { t: n } =
|
|
4741
|
+
let t = e, { t: n } = Lt(), { syntax: r } = $t(), i = F(() => we(t.block.url, r) || we(t.block.thumbnailUrl, r)), a = On(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = On(() => i.value ? t.block.placeholderUrl : void 0), s = F(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : sc(t.block.url)), c = F(() => ({ textAlign: t.block.align })), l = F(() => {
|
|
4749
4742
|
let e = t.block.align;
|
|
4750
4743
|
return {
|
|
4751
4744
|
maxWidth: "100%",
|
|
@@ -4754,7 +4747,7 @@ var cc = ["src", "alt"], lc = {
|
|
|
4754
4747
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4755
4748
|
marginRight: e === "center" ? "auto" : void 0
|
|
4756
4749
|
};
|
|
4757
|
-
}), d =
|
|
4750
|
+
}), d = F(() => we(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4758
4751
|
return (t, r) => (O(), S("div", {
|
|
4759
4752
|
class: "tpl:w-full",
|
|
4760
4753
|
style: u(c.value)
|
|
@@ -4764,25 +4757,25 @@ var cc = ["src", "alt"], lc = {
|
|
|
4764
4757
|
style: u(l.value)
|
|
4765
4758
|
}, [x("img", {
|
|
4766
4759
|
class: "tpl:w-full tpl:border-0",
|
|
4767
|
-
src:
|
|
4760
|
+
src: P(o),
|
|
4768
4761
|
alt: e.block.alt
|
|
4769
4762
|
}, null, 8, cc), w(ac)], 4)) : i.value ? (O(), S("div", {
|
|
4770
4763
|
key: 1,
|
|
4771
4764
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
4772
4765
|
style: u([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, l.value])
|
|
4773
|
-
}, [w(
|
|
4766
|
+
}, [w(P(mr), {
|
|
4774
4767
|
size: 36,
|
|
4775
4768
|
"stroke-width": 1.5,
|
|
4776
4769
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4777
4770
|
style: { opacity: "0.5" }
|
|
4778
|
-
}), x("span", lc, [w(
|
|
4771
|
+
}), x("span", lc, [w($n, { text: d.value }, null, 8, ["text"])])], 4)) : s.value ? (O(), S(N, { key: 2 }, [e.block.url ? (O(), S("a", {
|
|
4779
4772
|
key: 0,
|
|
4780
4773
|
href: e.block.url,
|
|
4781
4774
|
target: "_blank",
|
|
4782
4775
|
rel: "noopener noreferrer",
|
|
4783
4776
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
4784
4777
|
style: u(l.value),
|
|
4785
|
-
onClick: r[0] ||=
|
|
4778
|
+
onClick: r[0] ||= R(() => {}, ["prevent"])
|
|
4786
4779
|
}, [x("img", {
|
|
4787
4780
|
class: "tpl:w-full tpl:border-0",
|
|
4788
4781
|
src: s.value,
|
|
@@ -4795,18 +4788,18 @@ var cc = ["src", "alt"], lc = {
|
|
|
4795
4788
|
class: "tpl:w-full tpl:border-0",
|
|
4796
4789
|
src: s.value,
|
|
4797
4790
|
alt: e.block.alt
|
|
4798
|
-
}, null, 8, fc), w(ac)], 4))], 64)) : (O(), S("div", pc, [w(
|
|
4791
|
+
}, null, 8, fc), w(ac)], 4))], 64)) : (O(), S("div", pc, [w(P(mr), {
|
|
4799
4792
|
size: 40,
|
|
4800
4793
|
"stroke-width": 1.5,
|
|
4801
4794
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4802
|
-
}), x("span", null, k(
|
|
4795
|
+
}), x("span", null, k(P(n).video.addVideo), 1)]))], 4));
|
|
4803
4796
|
}
|
|
4804
4797
|
}), hc = {
|
|
4805
4798
|
section: zs,
|
|
4806
4799
|
title: Wi,
|
|
4807
4800
|
paragraph: Ti,
|
|
4808
4801
|
image: fi,
|
|
4809
|
-
button:
|
|
4802
|
+
button: tr,
|
|
4810
4803
|
divider: Kr,
|
|
4811
4804
|
video: mc,
|
|
4812
4805
|
social: Ys,
|
|
@@ -4814,32 +4807,32 @@ var cc = ["src", "alt"], lc = {
|
|
|
4814
4807
|
table: ic,
|
|
4815
4808
|
spacer: Qs,
|
|
4816
4809
|
html: Qr,
|
|
4817
|
-
countdown: y(() => import("./CountdownBlock-
|
|
4810
|
+
countdown: y(() => import("./CountdownBlock-qKtJVRIV.js"))
|
|
4818
4811
|
};
|
|
4819
4812
|
function gc(t) {
|
|
4820
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } =
|
|
4813
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = Lt(i);
|
|
4821
4814
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
4822
|
-
let { resolvedTheme: l } =
|
|
4815
|
+
let { resolvedTheme: l } = In(F(() => n.state.uiTheme)), u = _(r.theme ?? {}), { themeStyles: d } = Rn({
|
|
4823
4816
|
themeOverrides: u,
|
|
4824
4817
|
resolvedTheme: l,
|
|
4825
4818
|
extraStyles: () => ({
|
|
4826
4819
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
4827
4820
|
...t.themeExtraStyles?.()
|
|
4828
4821
|
})
|
|
4829
|
-
}), f =
|
|
4822
|
+
}), f = sn({
|
|
4830
4823
|
content: n.content,
|
|
4831
4824
|
setContent: (e, t) => n.setContent(e, t),
|
|
4832
4825
|
...t.historyOptions
|
|
4833
4826
|
});
|
|
4834
|
-
|
|
4835
|
-
let p =
|
|
4827
|
+
mn(n, f);
|
|
4828
|
+
let p = ln({
|
|
4836
4829
|
addBlock: n.addBlock,
|
|
4837
4830
|
removeBlock: n.removeBlock,
|
|
4838
4831
|
updateBlock: n.updateBlock,
|
|
4839
4832
|
selectBlock: n.selectBlock,
|
|
4840
4833
|
findBlockLocation: n.findBlockLocation,
|
|
4841
4834
|
blockDefaults: r.blockDefaults
|
|
4842
|
-
}), m =
|
|
4835
|
+
}), m = fn(n), g = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? dn({
|
|
4843
4836
|
content: n.content,
|
|
4844
4837
|
isDirty: () => n.state.isDirty,
|
|
4845
4838
|
...t.autoSaveOptions
|
|
@@ -4847,28 +4840,28 @@ function gc(t) {
|
|
|
4847
4840
|
g && (v = s(f.isNavigating, (e) => {
|
|
4848
4841
|
e ? g.pause() : g.resume();
|
|
4849
4842
|
}));
|
|
4850
|
-
let y =
|
|
4843
|
+
let y = Fn(n, {
|
|
4851
4844
|
t: o,
|
|
4852
4845
|
format: c
|
|
4853
|
-
}, r.customBlocks ?? []), b =
|
|
4854
|
-
if (b.allowCustomIgnored &&
|
|
4855
|
-
let e =
|
|
4856
|
-
e.length > 0 &&
|
|
4846
|
+
}, r.customBlocks ?? []), b = Vt(r.colors);
|
|
4847
|
+
if (b.allowCustomIgnored && Rt.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && Rt.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4848
|
+
let e = qn(b.presets, r.blockDefaults, r.templateDefaults);
|
|
4849
|
+
e.length > 0 && Rt.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
4857
4850
|
}
|
|
4858
|
-
let x =
|
|
4859
|
-
|
|
4851
|
+
let x = zn();
|
|
4852
|
+
Wn(x, hc);
|
|
4860
4853
|
let S = /* @__PURE__ */ new Set();
|
|
4861
4854
|
function C(e) {
|
|
4862
4855
|
for (let t of e) {
|
|
4863
4856
|
x.registerCustom(t, Wr);
|
|
4864
|
-
for (let e of
|
|
4857
|
+
for (let e of Yn(t, b)) S.has(e.id) || (S.add(e.id), Rt.warn(e.message));
|
|
4865
4858
|
}
|
|
4866
4859
|
}
|
|
4867
4860
|
r.customBlocks?.length && C(r.customBlocks);
|
|
4868
|
-
let w =
|
|
4869
|
-
if (h() &&
|
|
4861
|
+
let w = wn();
|
|
4862
|
+
if (h() && M(w.dispose), t.containerEl) {
|
|
4870
4863
|
let e = t.containerEl;
|
|
4871
|
-
|
|
4864
|
+
Ye(document, "pointerdown", (t) => {
|
|
4872
4865
|
let n = e.value;
|
|
4873
4866
|
n && (t.composedPath?.() ?? []).includes(n) && w.claim();
|
|
4874
4867
|
}, { capture: !0 });
|
|
@@ -4882,7 +4875,7 @@ function gc(t) {
|
|
|
4882
4875
|
g?.flush();
|
|
4883
4876
|
}
|
|
4884
4877
|
function E(e) {
|
|
4885
|
-
w.isActive() &&
|
|
4878
|
+
w.isActive() && Zn(e, {
|
|
4886
4879
|
history: f,
|
|
4887
4880
|
selectBlock: (e) => n.selectBlock(e),
|
|
4888
4881
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4894,33 +4887,33 @@ function gc(t) {
|
|
|
4894
4887
|
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
4895
4888
|
});
|
|
4896
4889
|
}
|
|
4897
|
-
|
|
4890
|
+
Ye(document, "keydown", E);
|
|
4898
4891
|
let D = _(null);
|
|
4899
|
-
e(
|
|
4900
|
-
let O =
|
|
4901
|
-
e(
|
|
4902
|
-
let k = _(
|
|
4903
|
-
e(
|
|
4904
|
-
let A =
|
|
4892
|
+
e(xt, t.editorRoot ?? document), e(lt, D), e(pt, i), e(St, n), e(Mt, f), e(gt, p), e(yt, m), e(ht, a), e($e, d), e(it, l), e(Dt, r.blockDefaults), e(At, x), e(bt, r.customBlocks ?? []), e(st, r.paletteBlocks), e(Ft, Gn(r.htmlBlockPreview)), e(jt, b), e(Ot, Bn(n.content, x));
|
|
4893
|
+
let O = _e(r.mergeTags?.syntax);
|
|
4894
|
+
e(dt, r.mergeTags?.tags ?? []), e(wt, O), e(ot, r.mergeTags?.onRequest ?? null), e(nt, r.mergeTags?.autocomplete !== !1);
|
|
4895
|
+
let k = _(Ae(r.mergeTags?.tags ?? []));
|
|
4896
|
+
e(ct, k);
|
|
4897
|
+
let A = En({
|
|
4905
4898
|
resolvePreview: r.resolvePreview,
|
|
4906
4899
|
getContent: () => n.content.value,
|
|
4907
4900
|
isActive: () => n.state.previewMode
|
|
4908
4901
|
});
|
|
4909
|
-
e(
|
|
4910
|
-
let
|
|
4911
|
-
e(
|
|
4912
|
-
let
|
|
4913
|
-
e(
|
|
4914
|
-
let
|
|
4902
|
+
e(rt, A), e(at, r.resolvePreview);
|
|
4903
|
+
let j = F(() => !(n.state.previewMode && A.isConfigured));
|
|
4904
|
+
e(kt, j);
|
|
4905
|
+
let N = kn();
|
|
4906
|
+
e(tt, N), e(et, r.logicTags?.tags ?? []), e(ut, r.logicTags?.pairs ?? []), e(Qe, r.logicTags?.onRequest ?? null), e(Nt, An()), e(Ct, r.onRequestMedia ?? null), e(_t, r.resolveImageUrl ? Dn(r.resolveImageUrl) : null), e(Tt, r.displayConditions?.conditions ?? []), e(Et, r.displayConditions?.allowCustom ?? !1), e(vt, t.capabilities ?? {}), e(Pt, y);
|
|
4907
|
+
let P = jn(r.lint) ? null : Mn({
|
|
4915
4908
|
content: n.content,
|
|
4916
4909
|
options: r.lint ?? {},
|
|
4917
4910
|
updateBlock: n.updateBlock,
|
|
4918
4911
|
updateSettings: n.updateSettings,
|
|
4919
4912
|
removeBlock: n.removeBlock
|
|
4920
4913
|
});
|
|
4921
|
-
e(
|
|
4922
|
-
function
|
|
4923
|
-
v?.(),
|
|
4914
|
+
e(It, P);
|
|
4915
|
+
function ee() {
|
|
4916
|
+
v?.(), P?.destroy(), g?.destroy(), f.destroy();
|
|
4924
4917
|
}
|
|
4925
4918
|
return {
|
|
4926
4919
|
t: o,
|
|
@@ -4934,14 +4927,14 @@ function gc(t) {
|
|
|
4934
4927
|
themeOverrides: u,
|
|
4935
4928
|
registry: x,
|
|
4936
4929
|
keyboardReorder: y,
|
|
4937
|
-
templateLint:
|
|
4930
|
+
templateLint: P,
|
|
4938
4931
|
popoverRoot: D,
|
|
4939
4932
|
mergeTagSampleMode: k,
|
|
4940
4933
|
previewResolution: A,
|
|
4941
|
-
appliesConditionFilter:
|
|
4934
|
+
appliesConditionFilter: j,
|
|
4942
4935
|
registerCustomBlocks: C,
|
|
4943
|
-
destroy:
|
|
4936
|
+
destroy: ee
|
|
4944
4937
|
};
|
|
4945
4938
|
}
|
|
4946
4939
|
//#endregion
|
|
4947
|
-
export {
|
|
4940
|
+
export { fr as A, Pn as B, jr as C, yr as D, br as E, ar as F, bn as G, En as H, ir as I, nn as J, yn as K, nr as L, lr as M, cr as N, _r as O, or as P, tr as R, Nr as S, Tr as T, un as U, Nn as V, _n as W, vn as X, hn as Y, ei as _, Ys as a, Wr as b, Fs as c, Oi as d, Ei as f, fi as g, gi as h, Qs as i, ur as j, pr as k, Wi as l, Ti as m, mc as n, Hs as o, Di as p, pn as q, ic as r, zs as s, gc as t, Hi as u, Qr as v, Er as w, Fr as x, Kr as y, Jn as z };
|