@templatical/editor 0.34.3 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-CkHJ28sf.js → AiChatSidebar-DPHbCGu4.js} +29 -21
- package/dist/{AiFeatureMenu-DWdKguDN.js → AiFeatureMenu--8z7qvg1.js} +4 -4
- package/dist/{BlockIssueBadge-DcyHTAqw.js → BlockIssueBadge-BGCsJqqM.js} +2 -2
- package/dist/BlockPreviewCanvas-DKspIy8V.js +131 -0
- package/dist/{CloudHeaderExtras-BJ3Cebhv.js → CloudHeaderExtras-CRUQvgSV.js} +2 -2
- package/dist/{CloudPanels-BGz9ygo6.js → CloudPanels-Bp5gFtaL.js} +3 -3
- package/dist/{CollaboratorBar-KphmSQeZ.js → CollaboratorBar-DvwZm5u7.js} +57 -49
- package/dist/{ColorPicker-C6EOwtHC.js → ColorPicker-DtozuN75.js} +1 -1
- package/dist/{CommentsPanel-DmWh8f08.js → CommentsPanel-3C-DsEjy.js} +1 -1
- package/dist/{CommentsSidebar-CL_tffzT.js → CommentsSidebar-go1FnjDW.js} +34 -25
- package/dist/{CountdownToolbar-B8J4i5Xp.js → CountdownToolbar-SLBuij7Q.js} +1 -1
- package/dist/{DesignReferenceSidebar-BDhEeaAh.js → DesignReferenceSidebar-rcE_BvUd.js} +55 -47
- package/dist/{IssuesPanel-CiOjeRFI.js → IssuesPanel-Cig46N1i.js} +23 -15
- package/dist/{MergeTagInput-RytOlh1A.js → MergeTagInput-D1hzsn2b.js} +42 -33
- package/dist/{MergeTagModeToggle-Bi-FydXj.js → MergeTagModeToggle-CH9wR5YF.js} +70 -58
- package/dist/{ParagraphEditor-C87tkmtE.js → ParagraphEditor-CT2AdMdZ.js} +365 -323
- package/dist/{RestoreVersionDialog-Db5rZRMA.js → RestoreVersionDialog-mdqgQxFR.js} +3 -3
- package/dist/{RichTextEditorContent-BmTcV2-a.js → RichTextEditorContent-riOB-rKD.js} +48 -36
- package/dist/{SaveBlockDialog-CDCzx6Bo.js → SaveBlockDialog-Cn2v4Lpj.js} +6 -6
- package/dist/{SavedBlocksBrowserModal-DQR6kJB1.js → SavedBlocksBrowserModal-BORqqASb.js} +7 -7
- package/dist/{SavedBlocksPanels-DFzV0CRD.js → SavedBlocksPanels-ffBnWuVU.js} +1 -1
- package/dist/{SavedBlocksPickBar-XyXmnSnO.js → SavedBlocksPickBar-BmQC2tWN.js} +2 -2
- package/dist/{TemplateScoringPanel-CpyEKMzC.js → TemplateScoringPanel-CxAtdreR.js} +36 -27
- package/dist/{TestEmailModal-DIfJy9eE.js → TestEmailModal-Cjn1padY.js} +7 -7
- package/dist/{TestEmailPanel-C8Wx5yPS.js → TestEmailPanel-Bf3XZ1jn.js} +1 -1
- package/dist/{TitleEditor-iNFOisr4.js → TitleEditor-pYEUX6lR.js} +5 -5
- package/dist/{TplModal-CowM3o_F.js → TplModal-DRx4ytx8.js} +1 -1
- package/dist/{VersionHistoryMenu-CV90OhXs.js → VersionHistoryMenu-CrNrGsaa.js} +21 -13
- package/dist/{VersionHistoryPanels-BE3pplJG.js → VersionHistoryPanels-CsuQk6W3.js} +1 -1
- package/dist/{VersionPreviewBanner-BwUWBtlH.js → VersionPreviewBanner-BqbO0Zss.js} +1 -1
- package/dist/blockTypeIcons-D_4HdaY9.js +175 -0
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-C0hfqt4U.js → ca-D9S-UCfZ.js} +2 -0
- package/dist/cdn/chunks/{AiChatSidebar-BEnIWn6s.js → AiChatSidebar-D0f74_nS.js} +3 -3
- package/dist/cdn/chunks/{AiChatSidebar-BEnIWn6s.js.map → AiChatSidebar-D0f74_nS.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-DMl23akc.js → AiFeatureMenu-DwGb3eF9.js} +3 -3
- package/dist/cdn/chunks/{AiFeatureMenu-DMl23akc.js.map → AiFeatureMenu-DwGb3eF9.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CloK4k3M.js → BlockIssueBadge-CosQgeJ-.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-CloK4k3M.js.map → BlockIssueBadge-CosQgeJ-.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-CIpZ2a6g.js +133 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-CIpZ2a6g.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-b4KpVeUN.js → CloudHeaderExtras-CQzQwKFB.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-b4KpVeUN.js.map → CloudHeaderExtras-CQzQwKFB.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DzwOq9lp.js → CloudPanels-BmexuLOU.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-DzwOq9lp.js.map → CloudPanels-BmexuLOU.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-WXKvpoGK.js → CollaboratorBar-DEICobpp.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-WXKvpoGK.js.map → CollaboratorBar-DEICobpp.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-BubTDiS1.js → ColorPicker-C7yC58FK.js} +2 -2
- package/dist/cdn/chunks/{ColorPicker-BubTDiS1.js.map → ColorPicker-C7yC58FK.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-DAA2VqX4.js → CommentsPanel-OjmKxLL7.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-DAA2VqX4.js.map → CommentsPanel-OjmKxLL7.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Ci0M2ePp.js → CommentsSidebar-C4pWZGpy.js} +2 -2
- package/dist/cdn/chunks/{CommentsSidebar-Ci0M2ePp.js.map → CommentsSidebar-C4pWZGpy.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CzZq26Vp.js → CountdownToolbar-wlJOxyAl.js} +2 -2
- package/dist/cdn/chunks/{CountdownToolbar-CzZq26Vp.js.map → CountdownToolbar-wlJOxyAl.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-C_ehdX5C.js → DesignReferenceSidebar-DELhnh8h.js} +3 -3
- package/dist/cdn/chunks/{DesignReferenceSidebar-C_ehdX5C.js.map → DesignReferenceSidebar-DELhnh8h.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BXAN2_al.js → IssuesPanel-C9i3o8aE.js} +2 -2
- package/dist/cdn/chunks/{IssuesPanel-BXAN2_al.js.map → IssuesPanel-C9i3o8aE.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-1vcI9uQH.js → MergeTagInput-D76Kyvgu.js} +5 -5
- package/dist/cdn/chunks/{MergeTagInput-1vcI9uQH.js.map → MergeTagInput-D76Kyvgu.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-B_mUYJo4.js → MergeTagModeToggle-Dz3gxN2y.js} +3 -3
- package/dist/cdn/chunks/{MergeTagModeToggle-B_mUYJo4.js.map → MergeTagModeToggle-Dz3gxN2y.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DCDHMcmx.js → ParagraphEditor-DQn0HMfV.js} +176 -172
- package/dist/cdn/chunks/{ParagraphEditor-DCDHMcmx.js.map → ParagraphEditor-DQn0HMfV.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BkSSwf-Q.js → RestoreVersionDialog-BdjOL8Oy.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-BkSSwf-Q.js.map → RestoreVersionDialog-BdjOL8Oy.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-S4KogjIj.js → RichTextEditorContent-Drzwgh0J.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-S4KogjIj.js.map → RichTextEditorContent-Drzwgh0J.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BH774Nt0.js → SaveBlockDialog-B3rbmXSM.js} +5 -5
- package/dist/cdn/chunks/{SaveBlockDialog-BH774Nt0.js.map → SaveBlockDialog-B3rbmXSM.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CSUqw_dD.js → SavedBlocksBrowserModal-CkUXlnd2.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CSUqw_dD.js.map → SavedBlocksBrowserModal-CkUXlnd2.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-B6ApbCjG.js → SavedBlocksPanels-BPi3PZKP.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-B6ApbCjG.js.map → SavedBlocksPanels-BPi3PZKP.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-C9MXSRcR.js → SavedBlocksPickBar-BvB9A5W2.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-C9MXSRcR.js.map → SavedBlocksPickBar-BvB9A5W2.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-QVOxc9TZ.js → TemplateScoringPanel-BBCyLnOi.js} +2 -2
- package/dist/cdn/chunks/{TemplateScoringPanel-QVOxc9TZ.js.map → TemplateScoringPanel-BBCyLnOi.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-_CZvaO58.js → TestEmailModal-DAGTsBqi.js} +7 -7
- package/dist/cdn/chunks/{TestEmailModal-_CZvaO58.js.map → TestEmailModal-DAGTsBqi.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-DXLxvyrD.js → TestEmailPanel-BfenVvfx.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-DXLxvyrD.js.map → TestEmailPanel-BfenVvfx.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BuCOahW3.js → TitleEditor-oQ4gr6wS.js} +5 -5
- package/dist/cdn/chunks/{TitleEditor-BuCOahW3.js.map → TitleEditor-oQ4gr6wS.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-CqY8R3hn.js → TplModal-DxOMcVwp.js} +2 -2
- package/dist/cdn/chunks/{TplModal-CqY8R3hn.js.map → TplModal-DxOMcVwp.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-DDjIBvad.js → VersionHistoryMenu-BfVUvWHT.js} +4 -4
- package/dist/cdn/chunks/{VersionHistoryMenu-DDjIBvad.js.map → VersionHistoryMenu-BfVUvWHT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BuTw04T5.js → VersionHistoryPanels-NpDb641L.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BuTw04T5.js.map → VersionHistoryPanels-NpDb641L.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-fGAv20qI.js → VersionPreviewBanner-Cpgt4xHc.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-fGAv20qI.js.map → VersionPreviewBanner-Cpgt4xHc.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-ZEzEpCti.js → blockTypeIcons-t9vvaiuH.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-ZEzEpCti.js.map → blockTypeIcons-t9vvaiuH.js.map} +1 -1
- package/dist/cdn/chunks/{ca-C0hfqt4U.js → ca-D9S-UCfZ.js} +3 -1
- package/dist/cdn/chunks/{ca-C0hfqt4U.js.map → ca-D9S-UCfZ.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-BP5-6__d.js → cloud-CullB76F.js} +2 -2
- package/dist/cdn/chunks/{cloud-BP5-6__d.js.map → cloud-CullB76F.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-JFE-sxbT.js → createCloudRuntime-Cx2JpUYU.js} +4 -4
- package/dist/cdn/chunks/{createCloudRuntime-JFE-sxbT.js.map → createCloudRuntime-Cx2JpUYU.js.map} +1 -1
- package/dist/{de-C6J2Iae8.js → cdn/chunks/de-BUPszLpi.js} +4 -0
- package/dist/cdn/chunks/{de-C6J2Iae8.js.map → de-BUPszLpi.js.map} +1 -1
- package/dist/cdn/chunks/{en-BaUYOQi8.js → en-BbOC5x3w.js} +3 -1
- package/dist/cdn/chunks/en-BbOC5x3w.js.map +1 -0
- package/dist/cdn/chunks/en-rGHphLWo.js +2 -0
- package/dist/cdn/chunks/{es-CKDYfJYn.js → es-0bCDcT9p.js} +3 -1
- package/dist/cdn/chunks/{es-CKDYfJYn.js.map → es-0bCDcT9p.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-7z04EIGg.js → extensions-BpXY7jO5.js} +3 -3
- package/dist/cdn/chunks/{extensions-7z04EIGg.js.map → extensions-BpXY7jO5.js.map} +1 -1
- package/dist/{fr-L8DR73mK.js → cdn/chunks/fr-Brr8mJ9e.js} +4 -0
- package/dist/cdn/chunks/fr-Brr8mJ9e.js.map +1 -0
- package/dist/cdn/chunks/icons-BLxcQUck.js +1675 -0
- package/dist/cdn/chunks/icons-BLxcQUck.js.map +1 -0
- package/dist/cdn/chunks/{nl-GDWeuX18.js → nl-Co3_RL0M.js} +3 -1
- package/dist/cdn/chunks/nl-Co3_RL0M.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-LFB-e-0m.js → preRenderCustomBlocks-Bdpiiw4A.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-LFB-e-0m.js.map → preRenderCustomBlocks-Bdpiiw4A.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-B1AVVhWj.js → pt-BR-BECez5b0.js} +3 -1
- package/dist/cdn/chunks/{pt-BR-B1AVVhWj.js.map → pt-BR-BECez5b0.js.map} +1 -1
- package/dist/cdn/chunks/{src-BDvZrpFH.js → src-BC-eolWY.js} +161 -160
- package/dist/cdn/chunks/src-BC-eolWY.js.map +1 -0
- package/dist/cdn/chunks/{src-BM3f9I7t.js → src-CUvZWL6Y.js} +83 -83
- package/dist/cdn/chunks/src-CUvZWL6Y.js.map +1 -0
- package/dist/cdn/chunks/{src-Cxl-9O-L.js → src-CaXeO-gG.js} +17 -17
- package/dist/cdn/chunks/{src-Cxl-9O-L.js.map → src-CaXeO-gG.js.map} +1 -1
- package/dist/cdn/chunks/{src-CLoCCDfs.js → src-Dwgq7hf4.js} +71 -48
- package/dist/cdn/chunks/src-Dwgq7hf4.js.map +1 -0
- package/dist/cdn/chunks/{useEditorCore-ehUSEsbw.js → useEditorCore-D4MytYB9.js} +495 -485
- package/dist/cdn/chunks/useEditorCore-D4MytYB9.js.map +1 -0
- package/dist/cdn/chunks/{useMergeTag-TLhF2fGK.js → useMergeTag-CSocWpxV.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-TLhF2fGK.js.map → useMergeTag-CSocWpxV.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +920 -907
- package/dist/cdn/editor.js.map +1 -1
- package/dist/check-CY-Ec6FV.js +11 -0
- package/dist/chevron-down-BghbWA9p.js +11 -0
- package/dist/chevron-up-n3qFAPS3.js +11 -0
- package/dist/circle-alert-L5uGGFRP.js +30 -0
- package/dist/clock-Dgnwp18n.js +16 -0
- package/dist/{cloud-BMzRKCbk.js → cloud-B1c4XIsn.js} +1 -1
- package/dist/{createCloudRuntime-DbTFm1ES.js → createCloudRuntime-PevFSH74.js} +2 -2
- package/dist/createLucideIcon-05lB8iWe.js +96 -0
- package/dist/{cdn/chunks/de-C6J2Iae8.js → de-BUPszLpi.js} +2 -2
- package/dist/{dist-PL6vP4SC.js → dist-tGkjkX-v.js} +143 -122
- package/dist/{en-BaUYOQi8.js → en-BbOC5x3w.js} +2 -0
- package/dist/{es-CKDYfJYn.js → es-0bCDcT9p.js} +2 -0
- package/dist/{extensions-Mf8iHey9.js → extensions-Bawm4BOM.js} +2 -2
- package/dist/{cdn/chunks/fr-L8DR73mK.js → fr-Brr8mJ9e.js} +2 -2
- package/dist/image-up-ovhjl9u9.js +27 -0
- package/dist/info-c3KI927I.js +23 -0
- package/dist/loader-circle-B2Y8xZQb.js +12 -0
- package/dist/message-circle-B7K-naUa.js +11 -0
- package/dist/{nl-GDWeuX18.js → nl-Co3_RL0M.js} +2 -0
- package/dist/pencil-BhWTFcp4.js +14 -0
- package/dist/{preRenderCustomBlocks-CSIF-HyJ.js → preRenderCustomBlocks-DFXH54Zr.js} +1 -1
- package/dist/{pt-BR-B1AVVhWj.js → pt-BR-BECez5b0.js} +2 -0
- package/dist/refresh-cw-BqUR5vgO.js +37 -0
- package/dist/send-D1vvuW79.js +14 -0
- package/dist/shield-check-DjK54PnW.js +14 -0
- package/dist/sparkles-DNdS9V_3.js +28 -0
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1238 -1167
- package/dist/text-align-start-Bcmo_VUY.js +58 -0
- package/dist/trash-C9bMXvw4.js +30 -0
- package/dist/triangle-alert-Bn8Bd2Yv.js +22 -0
- package/dist/upload-DKgg1gno.js +21 -0
- package/dist/{useEditorCore-DdkQuTHl.js → useEditorCore-CYGvurZa.js} +1089 -1026
- package/dist/{useMergeTag-gSuYus-M.js → useMergeTag-C9GEpljB.js} +1 -1
- package/dist/{useScrollToBlock-CdI8fGqt.js → useScrollToBlock-oUx1HIZ2.js} +27 -23
- package/dist/x-BPKoRPTG.js +14 -0
- package/package.json +9 -9
- package/dist/BlockPreviewCanvas-B621ANn9.js +0 -129
- package/dist/blockTypeIcons-DQsKtHik.js +0 -134
- package/dist/cdn/chunks/BlockPreviewCanvas-DSiJFJa0.js +0 -131
- package/dist/cdn/chunks/BlockPreviewCanvas-DSiJFJa0.js.map +0 -1
- package/dist/cdn/chunks/en-BaUYOQi8.js.map +0 -1
- package/dist/cdn/chunks/en-mEKGL1PX.js +0 -2
- package/dist/cdn/chunks/fr-L8DR73mK.js.map +0 -1
- package/dist/cdn/chunks/icons-SP5Itd-A.js +0 -1218
- package/dist/cdn/chunks/icons-SP5Itd-A.js.map +0 -1
- package/dist/cdn/chunks/nl-GDWeuX18.js.map +0 -1
- package/dist/cdn/chunks/src-BDvZrpFH.js.map +0 -1
- package/dist/cdn/chunks/src-BM3f9I7t.js.map +0 -1
- package/dist/cdn/chunks/src-CLoCCDfs.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-ehUSEsbw.js.map +0 -1
- package/dist/check-JK8Uacq0.js +0 -7
- package/dist/chevron-down-a-fb_Ijn.js +0 -7
- package/dist/chevron-up-x4l0et_Y.js +0 -7
- package/dist/circle-alert-CJDW5LZo.js +0 -25
- package/dist/clock-BW6rXk2f.js +0 -12
- package/dist/createLucideIcon-Bvw1Zx56.js +0 -43
- package/dist/image-up-CuzFc1mu.js +0 -23
- package/dist/info-DybAwcA3.js +0 -19
- package/dist/loader-circle-t-SVgmJ3.js +0 -7
- package/dist/message-circle-DtwKrlhN.js +0 -7
- package/dist/pencil-2qhC-Y4q.js +0 -10
- package/dist/refresh-cw-C8SBuPdg.js +0 -29
- package/dist/send-BoqJliF6.js +0 -10
- package/dist/shield-check-D0dMaHtE.js +0 -10
- package/dist/sparkles-Dy2BJjiX.js +0 -23
- package/dist/text-align-start-DrxjxvIy.js +0 -43
- package/dist/trash-rYMzzHZd.js +0 -25
- package/dist/triangle-alert-DxnFj4-B.js +0 -17
- package/dist/upload-DZu1adQz.js +0 -17
- package/dist/x-DJOd1hS4.js +0 -10
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { A as e, B as t, E as n, F as r, H as i, I as a, K as o, N as s, P as c, Q as l, R as u, S as d, U as f, W as p, X as m, Y as h, Z as g, at as _, b as v, c as y, ct as b, et as x, f as S, g as C, h as w, it as T, j as E, k as D, l as O, lt as k, m as A, ot as j, p as M, q as N, rt as P, s as F, t as I, u as L, ut as R, w as
|
|
2
|
-
import { A as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { a as
|
|
5
|
-
import { A as
|
|
1
|
+
import { A as e, B as t, E as n, F as r, H as i, I as a, K as o, N as s, P as c, Q as l, R as u, S as d, U as f, W as p, X as m, Y as h, Z as g, at as _, b as v, c as y, ct as b, et as x, f as S, g as C, h as w, it as T, j as E, k as D, l as O, lt as k, m as A, ot as j, p as M, q as N, rt as P, s as F, t as I, u as L, ut as R, w as z, x as B, y as V } from "./draggable-kbOhCgnk.js";
|
|
2
|
+
import { A as H, B as ee, C as te, D as ne, E as re, F as ie, H as ae, I as oe, L as U, M as se, N as ce, O as le, P as ue, R as de, S as fe, T as pe, V as me, W as he, _ as ge, a as _e, b as ve, d as ye, f as be, g as xe, h as Se, i as W, it as Ce, j as we, k as Te, l as Ee, m as De, n as Oe, nt as ke, o as Ae, p as je, r as Me, rt as Ne, s as Pe, t as G, u as Fe, w as Ie, z as Le } from "./src-Dwgq7hf4.js";
|
|
3
|
+
import { _ as Re, h as ze, v as Be, y as Ve } from "./dist-BW6Y49zE.js";
|
|
4
|
+
import { a as K, c as He, i as Ue, r as We } from "./dist-CAFTQ6Y2.js";
|
|
5
|
+
import { A as Ge, C as Ke, D as qe, E as q, F as Je, G as Ye, H as Xe, I as Ze, J as Qe, K as $e, L as et, M as tt, N as nt, O as rt, P as it, R as at, S as ot, T as st, U as ct, V as lt, W as ut, _ as dt, a as ft, b as pt, c as mt, d as ht, f as gt, g as _t, h as J, j as vt, k as yt, m as bt, n as xt, o as St, p as Ct, q as Y, r as wt, s as Tt, u as Et, v as Dt, w as Ot, x as kt, y as At } from "./keys-DQp8x7Nx.js";
|
|
6
6
|
import "./timeouts-DHPZQ0G3.js";
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { a as
|
|
10
|
-
import { A as It, Bt as Lt, Et as Rt, H as zt, Ot as Bt, Tt as Vt, X as Ht, d as Ut, ft as Wt, ht as Gt, it as Kt, o as qt, s as Jt, tt as Yt, u as Xt, v as Zt, vt as Qt, zt as $t } from "./icons-
|
|
7
|
+
import { t as X } from "./useI18n-Ct1VIFcf.js";
|
|
8
|
+
import { t as Z } from "./logger-ByvdoAwq.js";
|
|
9
|
+
import { a as jt, i as Mt, o as Nt, r as Pt, t as Ft } from "./usePopoverPosition-BxVWE5_0.js";
|
|
10
|
+
import { A as It, Bt as Lt, Et as Rt, H as zt, Ot as Bt, Tt as Vt, X as Ht, d as Ut, ft as Wt, ht as Gt, it as Kt, o as qt, s as Jt, tt as Yt, u as Xt, v as Zt, vt as Qt, zt as $t } from "./icons-BLxcQUck.js";
|
|
11
11
|
import { t as en } from "./LoadingTrack-Cm3TDKb3.js";
|
|
12
12
|
import { t as tn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
13
|
import { t as nn } from "./useEditorRoot-CteADR3y.js";
|
|
14
14
|
import "./useCloudI18n-MxgHWrV6.js";
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
15
|
+
import { t as rn } from "./useMergeTag-CSocWpxV.js";
|
|
16
|
+
import { t as an } from "./useAliveFlag-CT9gjvO_.js";
|
|
17
17
|
//#region ../core/src/error-reporting.ts
|
|
18
|
-
function
|
|
18
|
+
function on(e) {
|
|
19
19
|
return e instanceof Error ? e : Error(String(e), { cause: e });
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function sn(e, t) {
|
|
22
22
|
try {
|
|
23
23
|
t();
|
|
24
24
|
} catch (t) {
|
|
25
|
-
e?.(
|
|
25
|
+
e?.(on(t));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region ../core/src/editor.ts
|
|
30
|
-
function
|
|
30
|
+
function cn(e) {
|
|
31
31
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ln(e) {
|
|
34
34
|
let t = m({
|
|
35
35
|
template: null,
|
|
36
|
-
content: e.content ??
|
|
36
|
+
content: e.content ?? Le(e.defaultFontFamily, e.templateDefaults),
|
|
37
37
|
selectedBlockId: null,
|
|
38
38
|
viewport: "desktop",
|
|
39
39
|
darkMode: !1,
|
|
@@ -128,7 +128,7 @@ function cn(e) {
|
|
|
128
128
|
if (l(n)) return;
|
|
129
129
|
let r = o(t.content.blocks, n);
|
|
130
130
|
if (r && r.type === "section") {
|
|
131
|
-
if (i < 0 || i >=
|
|
131
|
+
if (i < 0 || i >= cn(r.columns)) return;
|
|
132
132
|
r.children[i] = r.children[i] || [];
|
|
133
133
|
let t = r.children[i];
|
|
134
134
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -161,7 +161,7 @@ function cn(e) {
|
|
|
161
161
|
let d;
|
|
162
162
|
if (i) {
|
|
163
163
|
let e = o(t.content.blocks, i);
|
|
164
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
164
|
+
if (!e || e.type !== "section" || a < 0 || a >= cn(e.columns)) return;
|
|
165
165
|
e.children[a] = e.children[a] || [], d = e.children[a];
|
|
166
166
|
} else d = t.content.blocks;
|
|
167
167
|
let [f] = s.blocks.splice(u, 1);
|
|
@@ -171,10 +171,10 @@ function cn(e) {
|
|
|
171
171
|
r();
|
|
172
172
|
}
|
|
173
173
|
function E(e, t) {
|
|
174
|
-
throw new
|
|
174
|
+
throw new G(`[Templatical] Templates: ${e} ${t}`);
|
|
175
175
|
}
|
|
176
176
|
function D(t) {
|
|
177
|
-
|
|
177
|
+
sn(e.onError, t);
|
|
178
178
|
}
|
|
179
179
|
function O(t) {
|
|
180
180
|
let { templates: n } = e;
|
|
@@ -274,11 +274,11 @@ function cn(e) {
|
|
|
274
274
|
}
|
|
275
275
|
//#endregion
|
|
276
276
|
//#region ../core/src/history.ts
|
|
277
|
-
var
|
|
278
|
-
function
|
|
279
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
277
|
+
var un = 50, dn = 300, fn = 1500;
|
|
278
|
+
function pn(e) {
|
|
279
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = un } = e, a = l([]), o = l([]), s = l(!1), c = null, u = null, d = p(() => a.value.length > 0), f = p(() => o.value.length > 0);
|
|
280
280
|
function m() {
|
|
281
|
-
return
|
|
281
|
+
return ve(t.value);
|
|
282
282
|
}
|
|
283
283
|
function h(e) {
|
|
284
284
|
a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
|
|
@@ -294,21 +294,21 @@ function fn(e) {
|
|
|
294
294
|
if (u && u.blockId === e) {
|
|
295
295
|
clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
|
|
296
296
|
u = null;
|
|
297
|
-
},
|
|
297
|
+
}, dn);
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
g(), h(m()), o.value = [], u = {
|
|
301
301
|
blockId: e,
|
|
302
302
|
timeoutId: setTimeout(() => {
|
|
303
303
|
u = null;
|
|
304
|
-
},
|
|
304
|
+
}, dn)
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
function y() {
|
|
309
309
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
310
310
|
s.value = !1, c = null;
|
|
311
|
-
},
|
|
311
|
+
}, fn);
|
|
312
312
|
}
|
|
313
313
|
function b() {
|
|
314
314
|
if (a.value.length === 0) return;
|
|
@@ -342,33 +342,33 @@ function fn(e) {
|
|
|
342
342
|
}
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region ../core/src/block-actions.ts
|
|
345
|
-
function
|
|
345
|
+
function mn(e) {
|
|
346
346
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
347
347
|
...e,
|
|
348
|
-
id:
|
|
348
|
+
id: U(),
|
|
349
349
|
cells: e.cells.map((e) => ({
|
|
350
350
|
...e,
|
|
351
|
-
id:
|
|
351
|
+
id: U()
|
|
352
352
|
}))
|
|
353
353
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
354
354
|
...e,
|
|
355
|
-
id:
|
|
355
|
+
id: U()
|
|
356
356
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
357
357
|
...e,
|
|
358
|
-
id:
|
|
358
|
+
id: U()
|
|
359
359
|
})));
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function hn(e) {
|
|
362
362
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
363
363
|
function o(n, r, a) {
|
|
364
|
-
let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s =
|
|
364
|
+
let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = fe(n, o);
|
|
365
365
|
return t(s, r, a), i(s.id), s;
|
|
366
366
|
}
|
|
367
367
|
function s(e, n, r) {
|
|
368
368
|
let o = JSON.parse(JSON.stringify(e));
|
|
369
|
-
if (o.id =
|
|
369
|
+
if (o.id = U(), mn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
370
370
|
let t = JSON.parse(JSON.stringify(e));
|
|
371
|
-
return t.id =
|
|
371
|
+
return t.id = U(), mn(t), t;
|
|
372
372
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
373
373
|
else {
|
|
374
374
|
let i = a?.(e.id) ?? null;
|
|
@@ -391,9 +391,9 @@ function mn(e) {
|
|
|
391
391
|
}
|
|
392
392
|
//#endregion
|
|
393
393
|
//#region ../core/src/auto-save.ts
|
|
394
|
-
var
|
|
395
|
-
function
|
|
396
|
-
let { content: t, isDirty: n, onChange: r, debounce: i =
|
|
394
|
+
var gn = 2e3;
|
|
395
|
+
function _n(e) {
|
|
396
|
+
let { content: t, isDirty: n, onChange: r, debounce: i = gn, enabled: a = !0 } = e, o = null, s = !1;
|
|
397
397
|
function c() {
|
|
398
398
|
return typeof a == "function" ? a() : a;
|
|
399
399
|
}
|
|
@@ -430,7 +430,7 @@ function gn(e) {
|
|
|
430
430
|
}
|
|
431
431
|
//#endregion
|
|
432
432
|
//#region ../core/src/condition-preview.ts
|
|
433
|
-
function
|
|
433
|
+
function vn(e) {
|
|
434
434
|
let t = m(/* @__PURE__ */ new Set()), n = p(() => t.size > 0);
|
|
435
435
|
function r(e) {
|
|
436
436
|
return t.has(e);
|
|
@@ -450,7 +450,7 @@ function _n(e) {
|
|
|
450
450
|
}
|
|
451
451
|
//#endregion
|
|
452
452
|
//#region ../core/src/data-source-fetch.ts
|
|
453
|
-
function
|
|
453
|
+
function yn(e) {
|
|
454
454
|
let t = l(!1), n = l(!1), r = p(() => !!e.definition.value?.dataSource), i = p(() => r.value && !e.block.value.dataSourceFetched);
|
|
455
455
|
async function a() {
|
|
456
456
|
let r = e.definition.value;
|
|
@@ -482,7 +482,7 @@ function vn(e) {
|
|
|
482
482
|
}
|
|
483
483
|
//#endregion
|
|
484
484
|
//#region ../core/src/history-interceptor.ts
|
|
485
|
-
function
|
|
485
|
+
function bn(e, t) {
|
|
486
486
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
487
487
|
e.addBlock = (r, i, a, o) => {
|
|
488
488
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -498,7 +498,7 @@ function yn(e, t) {
|
|
|
498
498
|
}
|
|
499
499
|
//#endregion
|
|
500
500
|
//#region ../core/src/saved-blocks.ts
|
|
501
|
-
function
|
|
501
|
+
function xn(e) {
|
|
502
502
|
let { provider: t } = e, n = l([]), r = l(!1), i = S(() => {
|
|
503
503
|
let e = /* @__PURE__ */ new Set();
|
|
504
504
|
for (let t of n.value) {
|
|
@@ -514,10 +514,10 @@ function bn(e) {
|
|
|
514
514
|
return s.value && e.canDelete !== !1;
|
|
515
515
|
}
|
|
516
516
|
function d(e, t) {
|
|
517
|
-
throw new
|
|
517
|
+
throw new G(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
518
518
|
}
|
|
519
519
|
function f(t) {
|
|
520
|
-
|
|
520
|
+
sn(e.onError, t);
|
|
521
521
|
}
|
|
522
522
|
async function p(i) {
|
|
523
523
|
r.value = !0;
|
|
@@ -586,9 +586,9 @@ function bn(e) {
|
|
|
586
586
|
}
|
|
587
587
|
//#endregion
|
|
588
588
|
//#region ../core/src/saved-blocks-local.ts
|
|
589
|
-
var
|
|
590
|
-
function
|
|
591
|
-
let t = e.key ??
|
|
589
|
+
var Sn = "templatical:saved-blocks";
|
|
590
|
+
function Cn(e = {}) {
|
|
591
|
+
let t = e.key ?? Sn;
|
|
592
592
|
function n() {
|
|
593
593
|
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.");
|
|
594
594
|
return localStorage;
|
|
@@ -613,7 +613,7 @@ function Sn(e = {}) {
|
|
|
613
613
|
},
|
|
614
614
|
async create(e) {
|
|
615
615
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
|
|
616
|
-
id:
|
|
616
|
+
id: U(),
|
|
617
617
|
name: e.name,
|
|
618
618
|
content: e.content,
|
|
619
619
|
...e.category ? { category: e.category } : {},
|
|
@@ -641,18 +641,18 @@ function Sn(e = {}) {
|
|
|
641
641
|
}
|
|
642
642
|
//#endregion
|
|
643
643
|
//#region ../core/src/version-history.ts
|
|
644
|
-
function
|
|
644
|
+
function wn(e) {
|
|
645
645
|
let { provider: t, getTemplateId: n } = e, r = l([]), i = l(!1), a = l(void 0), o = l(!1), s = /* @__PURE__ */ new Map(), c = S(() => typeof t.create == "function"), u = S(() => typeof t.restore == "function");
|
|
646
646
|
function d(e) {
|
|
647
647
|
let t = n();
|
|
648
|
-
if (!t) throw new
|
|
648
|
+
if (!t) throw new G(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
|
|
649
649
|
return t;
|
|
650
650
|
}
|
|
651
651
|
function f(e) {
|
|
652
|
-
throw new
|
|
652
|
+
throw new G(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
653
653
|
}
|
|
654
654
|
function p(t) {
|
|
655
|
-
|
|
655
|
+
sn(e.onError, t);
|
|
656
656
|
}
|
|
657
657
|
async function m(n) {
|
|
658
658
|
let o = d("list");
|
|
@@ -721,7 +721,7 @@ function Cn(e) {
|
|
|
721
721
|
}
|
|
722
722
|
//#endregion
|
|
723
723
|
//#region ../core/src/comments.ts
|
|
724
|
-
function
|
|
724
|
+
function Tn(e) {
|
|
725
725
|
let { provider: t, getTemplateId: n, getUser: r } = e, i = l([]), a = l(!1), o = l(!1), s = S(() => typeof t.create == "function"), c = S(() => typeof t.update == "function"), u = S(() => typeof t.delete == "function"), d = S(() => typeof t.setResolved == "function"), f = S(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), p = S(() => i.value.filter((e) => !e.resolvedAt).length), m = S(() => {
|
|
726
726
|
let e = /* @__PURE__ */ new Map();
|
|
727
727
|
for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
@@ -729,16 +729,16 @@ function wn(e) {
|
|
|
729
729
|
});
|
|
730
730
|
function h(e) {
|
|
731
731
|
let t = n();
|
|
732
|
-
if (!t) throw new
|
|
732
|
+
if (!t) throw new G(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
|
|
733
733
|
return t;
|
|
734
734
|
}
|
|
735
735
|
function g(e) {
|
|
736
736
|
let t = r();
|
|
737
|
-
if (!t) throw new
|
|
737
|
+
if (!t) throw new G(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
|
|
738
738
|
return t;
|
|
739
739
|
}
|
|
740
740
|
function _(e) {
|
|
741
|
-
throw new
|
|
741
|
+
throw new G(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
742
742
|
}
|
|
743
743
|
function v(e) {
|
|
744
744
|
for (let t of i.value) {
|
|
@@ -752,11 +752,11 @@ function wn(e) {
|
|
|
752
752
|
return t !== null && e.author.id === t.id;
|
|
753
753
|
}
|
|
754
754
|
function b(t) {
|
|
755
|
-
let n =
|
|
755
|
+
let n = on(t);
|
|
756
756
|
throw e.onError?.(n), n;
|
|
757
757
|
}
|
|
758
758
|
function x(t) {
|
|
759
|
-
|
|
759
|
+
sn(e.onError, t);
|
|
760
760
|
}
|
|
761
761
|
function C(e, t, n) {
|
|
762
762
|
return [
|
|
@@ -896,7 +896,7 @@ function wn(e) {
|
|
|
896
896
|
applyRemoteDelete: P
|
|
897
897
|
};
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function En(e) {
|
|
900
900
|
let { comments: n, provider: r, getTemplateId: i } = e, { subscribe: a } = r;
|
|
901
901
|
if (typeof a != "function") return;
|
|
902
902
|
let o = null;
|
|
@@ -919,18 +919,18 @@ function Tn(e) {
|
|
|
919
919
|
}
|
|
920
920
|
//#endregion
|
|
921
921
|
//#region src/utils/activeEditorTracker.ts
|
|
922
|
-
var
|
|
923
|
-
function
|
|
924
|
-
let e = ++
|
|
925
|
-
return
|
|
922
|
+
var Dn = /* @__PURE__ */ new Set(), Q = 0, On = 0;
|
|
923
|
+
function kn() {
|
|
924
|
+
let e = ++On;
|
|
925
|
+
return Dn.add(e), Q === 0 && (Q = e), {
|
|
926
926
|
id: e,
|
|
927
|
-
isActive: () =>
|
|
927
|
+
isActive: () => Dn.size <= 1 || Q === e,
|
|
928
928
|
claim: () => {
|
|
929
929
|
Q = e;
|
|
930
930
|
},
|
|
931
931
|
dispose: () => {
|
|
932
|
-
if (
|
|
933
|
-
let e = Array.from(
|
|
932
|
+
if (Dn.delete(e), Q === e) {
|
|
933
|
+
let e = Array.from(Dn);
|
|
934
934
|
Q = e[e.length - 1] ?? 0;
|
|
935
935
|
}
|
|
936
936
|
}
|
|
@@ -938,8 +938,8 @@ function On() {
|
|
|
938
938
|
}
|
|
939
939
|
//#endregion
|
|
940
940
|
//#region src/composables/usePreviewResolution.ts
|
|
941
|
-
var
|
|
942
|
-
function
|
|
941
|
+
var An = 500;
|
|
942
|
+
function jn(e) {
|
|
943
943
|
let n = typeof e.resolvePreview == "function", r = l(null), i = l(!1), a = l(!1), o = 0, s = null;
|
|
944
944
|
function c() {
|
|
945
945
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -950,7 +950,7 @@ function An(e) {
|
|
|
950
950
|
let n = ++o;
|
|
951
951
|
i.value = !0;
|
|
952
952
|
let s = {
|
|
953
|
-
content:
|
|
953
|
+
content: ve(e.getContent()),
|
|
954
954
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
955
955
|
};
|
|
956
956
|
try {
|
|
@@ -976,7 +976,7 @@ function An(e) {
|
|
|
976
976
|
}
|
|
977
977
|
s = setTimeout(() => {
|
|
978
978
|
s = null, u();
|
|
979
|
-
},
|
|
979
|
+
}, An);
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
982
|
return t(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
@@ -998,7 +998,7 @@ function An(e) {
|
|
|
998
998
|
}
|
|
999
999
|
//#endregion
|
|
1000
1000
|
//#region src/composables/useImageUrlResolver.ts
|
|
1001
|
-
function
|
|
1001
|
+
function Mn(e) {
|
|
1002
1002
|
let t = m(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
1003
1003
|
function r(e) {
|
|
1004
1004
|
return t.get(e);
|
|
@@ -1031,8 +1031,8 @@ function jn(e) {
|
|
|
1031
1031
|
lookup: a
|
|
1032
1032
|
};
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1035
|
-
let r = n(
|
|
1034
|
+
function Nn(e) {
|
|
1035
|
+
let r = n(pt, null), i = S(e);
|
|
1036
1036
|
if (!r) return i;
|
|
1037
1037
|
let a;
|
|
1038
1038
|
function s() {
|
|
@@ -1061,7 +1061,7 @@ function Mn(e) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
//#endregion
|
|
1063
1063
|
//#region src/composables/useMergeTagPicker.ts
|
|
1064
|
-
function
|
|
1064
|
+
function Pn() {
|
|
1065
1065
|
let e = l(!1), t = l([]), n = null;
|
|
1066
1066
|
function r(r) {
|
|
1067
1067
|
if (n) {
|
|
@@ -1091,7 +1091,7 @@ function Nn() {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
//#endregion
|
|
1093
1093
|
//#region src/composables/useLogicTagPicker.ts
|
|
1094
|
-
function
|
|
1094
|
+
function Fn() {
|
|
1095
1095
|
let e = l(!1), t = l([]), n = l([]), r = null;
|
|
1096
1096
|
function i(i, a) {
|
|
1097
1097
|
if (r) {
|
|
@@ -1122,17 +1122,17 @@ function Pn() {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
//#endregion
|
|
1124
1124
|
//#region src/composables/useTemplateLint.ts
|
|
1125
|
-
function
|
|
1125
|
+
function In(e) {
|
|
1126
1126
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1129
|
-
let n = l([]), r = l(!1), i = l(!1), a = x(null), o =
|
|
1128
|
+
function Ln(e) {
|
|
1129
|
+
let n = l([]), r = l(!1), i = l(!1), a = x(null), o = In(e.options), s = null, c = !1;
|
|
1130
1130
|
o || u();
|
|
1131
1131
|
async function u() {
|
|
1132
1132
|
try {
|
|
1133
|
-
let t = await import("./src-
|
|
1133
|
+
let t = await import("./src-CUvZWL6Y.js");
|
|
1134
1134
|
if (c) return;
|
|
1135
|
-
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s =
|
|
1135
|
+
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s = Ve(e.content, d, {
|
|
1136
1136
|
debounce: e.debounce ?? 500,
|
|
1137
1137
|
deep: !0
|
|
1138
1138
|
});
|
|
@@ -1167,17 +1167,17 @@ function In(e) {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
//#endregion
|
|
1169
1169
|
//#region src/utils/blockTypeLabels.ts
|
|
1170
|
-
function
|
|
1170
|
+
function Rn(e, t) {
|
|
1171
1171
|
return t.blocks[e] ?? e;
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1174
|
-
if (e.type !== "custom") return
|
|
1173
|
+
function zn(e, t, n = []) {
|
|
1174
|
+
if (e.type !== "custom") return Rn(e.type, t);
|
|
1175
1175
|
let { customType: r } = e;
|
|
1176
1176
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
1177
1177
|
}
|
|
1178
1178
|
//#endregion
|
|
1179
1179
|
//#region src/composables/useKeyboardReorder.ts
|
|
1180
|
-
function
|
|
1180
|
+
function Bn(e, t, n = []) {
|
|
1181
1181
|
let r = l(null), i = l(""), a = null;
|
|
1182
1182
|
function o(t) {
|
|
1183
1183
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1204,7 +1204,7 @@ function zn(e, t, n = []) {
|
|
|
1204
1204
|
let i = o(r);
|
|
1205
1205
|
if (!i) return "";
|
|
1206
1206
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
1207
|
-
return a ?
|
|
1207
|
+
return a ? zn(a, t.t, n) : "";
|
|
1208
1208
|
}
|
|
1209
1209
|
function c(t, n) {
|
|
1210
1210
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1273,13 +1273,13 @@ function zn(e, t, n = []) {
|
|
|
1273
1273
|
}
|
|
1274
1274
|
//#endregion
|
|
1275
1275
|
//#region src/composables/useUiTheme.ts
|
|
1276
|
-
function
|
|
1277
|
-
let t =
|
|
1276
|
+
function Vn(e) {
|
|
1277
|
+
let t = He("(prefers-color-scheme: dark)");
|
|
1278
1278
|
return { resolvedTheme: S(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1279
1279
|
}
|
|
1280
1280
|
//#endregion
|
|
1281
1281
|
//#region src/composables/useThemeStyles.ts
|
|
1282
|
-
var
|
|
1282
|
+
var Hn = {
|
|
1283
1283
|
bg: "--tpl-bg",
|
|
1284
1284
|
bgElevated: "--tpl-bg-elevated",
|
|
1285
1285
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1303,10 +1303,10 @@ var Vn = {
|
|
|
1303
1303
|
dangerLight: "--tpl-danger-light",
|
|
1304
1304
|
canvasBg: "--tpl-canvas-bg"
|
|
1305
1305
|
};
|
|
1306
|
-
function
|
|
1306
|
+
function Un({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1307
1307
|
return { themeStyles: S(() => {
|
|
1308
1308
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1309
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1309
|
+
if (a) for (let [e, t] of Object.entries(Hn)) {
|
|
1310
1310
|
let n = a[e];
|
|
1311
1311
|
n && (r[t] = n);
|
|
1312
1312
|
}
|
|
@@ -1315,7 +1315,7 @@ function Hn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1315
1315
|
}
|
|
1316
1316
|
//#endregion
|
|
1317
1317
|
//#region src/composables/useBlockRegistry.ts
|
|
1318
|
-
function
|
|
1318
|
+
function Wn() {
|
|
1319
1319
|
let e = x(/* @__PURE__ */ new Map());
|
|
1320
1320
|
function t(t, n) {
|
|
1321
1321
|
e.value.set(t, n), T(e);
|
|
@@ -1324,7 +1324,7 @@ function Un() {
|
|
|
1324
1324
|
let r = `custom:${t.type}`;
|
|
1325
1325
|
e.value.set(r, {
|
|
1326
1326
|
component: n,
|
|
1327
|
-
createBlock: () =>
|
|
1327
|
+
createBlock: () => pe(t),
|
|
1328
1328
|
definition: t
|
|
1329
1329
|
}), T(e);
|
|
1330
1330
|
}
|
|
@@ -1355,7 +1355,7 @@ function Un() {
|
|
|
1355
1355
|
strictFilters: !1
|
|
1356
1356
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1357
1357
|
} catch (t) {
|
|
1358
|
-
return
|
|
1358
|
+
return Z.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
1361
|
function c(t) {
|
|
@@ -1373,9 +1373,9 @@ function Un() {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
//#endregion
|
|
1375
1375
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1376
|
-
function
|
|
1376
|
+
function Gn(e, t) {
|
|
1377
1377
|
return S(() => {
|
|
1378
|
-
let n =
|
|
1378
|
+
let n = Kn(e.value.blocks);
|
|
1379
1379
|
if (n.size === 0) return [];
|
|
1380
1380
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1381
1381
|
for (let e of n) {
|
|
@@ -1387,11 +1387,11 @@ function Wn(e, t) {
|
|
|
1387
1387
|
return i;
|
|
1388
1388
|
});
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1390
|
+
function Kn(e) {
|
|
1391
1391
|
let t = /* @__PURE__ */ new Set();
|
|
1392
|
-
return
|
|
1392
|
+
return qn(e, t), t;
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1394
|
+
function qn(e, t) {
|
|
1395
1395
|
for (let n of e) {
|
|
1396
1396
|
if (he(n)) {
|
|
1397
1397
|
t.add(n.customType);
|
|
@@ -1400,44 +1400,44 @@ function Kn(e, t) {
|
|
|
1400
1400
|
if (n.type === "section") {
|
|
1401
1401
|
let e = n.children;
|
|
1402
1402
|
if (!e) continue;
|
|
1403
|
-
for (let n of e)
|
|
1403
|
+
for (let n of e) qn(n, t);
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
1407
|
//#endregion
|
|
1408
1408
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1409
|
-
var
|
|
1409
|
+
var Jn = [
|
|
1410
1410
|
{
|
|
1411
1411
|
type: "section",
|
|
1412
1412
|
createBlock: we
|
|
1413
1413
|
},
|
|
1414
1414
|
{
|
|
1415
1415
|
type: "title",
|
|
1416
|
-
createBlock:
|
|
1416
|
+
createBlock: ie
|
|
1417
1417
|
},
|
|
1418
1418
|
{
|
|
1419
1419
|
type: "paragraph",
|
|
1420
|
-
createBlock:
|
|
1420
|
+
createBlock: H
|
|
1421
1421
|
},
|
|
1422
1422
|
{
|
|
1423
1423
|
type: "image",
|
|
1424
|
-
createBlock:
|
|
1424
|
+
createBlock: le
|
|
1425
1425
|
},
|
|
1426
1426
|
{
|
|
1427
1427
|
type: "button",
|
|
1428
|
-
createBlock:
|
|
1428
|
+
createBlock: te
|
|
1429
1429
|
},
|
|
1430
1430
|
{
|
|
1431
1431
|
type: "divider",
|
|
1432
|
-
createBlock:
|
|
1432
|
+
createBlock: re
|
|
1433
1433
|
},
|
|
1434
1434
|
{
|
|
1435
1435
|
type: "video",
|
|
1436
|
-
createBlock:
|
|
1436
|
+
createBlock: oe
|
|
1437
1437
|
},
|
|
1438
1438
|
{
|
|
1439
1439
|
type: "social",
|
|
1440
|
-
createBlock:
|
|
1440
|
+
createBlock: se
|
|
1441
1441
|
},
|
|
1442
1442
|
{
|
|
1443
1443
|
type: "menu",
|
|
@@ -1445,23 +1445,23 @@ var qn = [
|
|
|
1445
1445
|
},
|
|
1446
1446
|
{
|
|
1447
1447
|
type: "table",
|
|
1448
|
-
createBlock:
|
|
1448
|
+
createBlock: ue
|
|
1449
1449
|
},
|
|
1450
1450
|
{
|
|
1451
1451
|
type: "spacer",
|
|
1452
|
-
createBlock:
|
|
1452
|
+
createBlock: ce
|
|
1453
1453
|
},
|
|
1454
1454
|
{
|
|
1455
1455
|
type: "html",
|
|
1456
|
-
createBlock:
|
|
1456
|
+
createBlock: ne
|
|
1457
1457
|
},
|
|
1458
1458
|
{
|
|
1459
1459
|
type: "countdown",
|
|
1460
|
-
createBlock:
|
|
1460
|
+
createBlock: Ie
|
|
1461
1461
|
}
|
|
1462
1462
|
];
|
|
1463
|
-
function
|
|
1464
|
-
for (let n of
|
|
1463
|
+
function Yn(e, t) {
|
|
1464
|
+
for (let n of Jn) {
|
|
1465
1465
|
let r = t[n.type];
|
|
1466
1466
|
r && e.registerBuiltIn(n.type, {
|
|
1467
1467
|
component: r,
|
|
@@ -1471,12 +1471,12 @@ function Jn(e, t) {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
//#endregion
|
|
1473
1473
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1474
|
-
function
|
|
1474
|
+
function Xn(e) {
|
|
1475
1475
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1476
1476
|
}
|
|
1477
1477
|
//#endregion
|
|
1478
1478
|
//#region src/utils/templateSettingsFields.ts
|
|
1479
|
-
var
|
|
1479
|
+
var Zn = {
|
|
1480
1480
|
width: "layout",
|
|
1481
1481
|
backgroundColor: "appearance",
|
|
1482
1482
|
textColor: "appearance",
|
|
@@ -1484,15 +1484,16 @@ var Xn = {
|
|
|
1484
1484
|
linkUnderline: "appearance",
|
|
1485
1485
|
fontFamily: "appearance",
|
|
1486
1486
|
locale: "language",
|
|
1487
|
+
direction: "language",
|
|
1487
1488
|
preheaderText: "preheader"
|
|
1488
|
-
},
|
|
1489
|
-
function Qn(e) {
|
|
1490
|
-
return Object.prototype.hasOwnProperty.call(Xn, e);
|
|
1491
|
-
}
|
|
1489
|
+
}, Qn = Object.keys(Zn);
|
|
1492
1490
|
function $n(e) {
|
|
1491
|
+
return Object.prototype.hasOwnProperty.call(Zn, e);
|
|
1492
|
+
}
|
|
1493
|
+
function er(e) {
|
|
1493
1494
|
let t = e?.fields;
|
|
1494
1495
|
if (t === void 0 || t === !0) return {
|
|
1495
|
-
fields: new Set(
|
|
1496
|
+
fields: new Set(Qn),
|
|
1496
1497
|
unknown: []
|
|
1497
1498
|
};
|
|
1498
1499
|
if (t === !1) return {
|
|
@@ -1500,7 +1501,7 @@ function $n(e) {
|
|
|
1500
1501
|
unknown: []
|
|
1501
1502
|
};
|
|
1502
1503
|
let n = /* @__PURE__ */ new Set(), r = [];
|
|
1503
|
-
for (let e of t)
|
|
1504
|
+
for (let e of t) $n(e) ? n.add(e) : r.push(String(e));
|
|
1504
1505
|
return {
|
|
1505
1506
|
fields: n,
|
|
1506
1507
|
unknown: r
|
|
@@ -1508,28 +1509,28 @@ function $n(e) {
|
|
|
1508
1509
|
}
|
|
1509
1510
|
//#endregion
|
|
1510
1511
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
1511
|
-
function
|
|
1512
|
+
function tr(e) {
|
|
1512
1513
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1513
1514
|
}
|
|
1514
|
-
function
|
|
1515
|
-
let r = new Set(e.map((e) =>
|
|
1516
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1515
|
+
function nr(e, t, n) {
|
|
1516
|
+
let r = new Set(e.map((e) => Pt(e))), i = [], a = (e, t) => {
|
|
1517
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Pt(o)) && i.push(`${t}.${n}: ${o}`) : tr(o) && a(o, `${t}.${n}`);
|
|
1517
1518
|
}, o = t;
|
|
1518
|
-
for (let [e, t] of Object.entries(
|
|
1519
|
+
for (let [e, t] of Object.entries(ee)) {
|
|
1519
1520
|
let n = o?.[e];
|
|
1520
1521
|
a({
|
|
1521
1522
|
...t,
|
|
1522
|
-
...
|
|
1523
|
+
...tr(n) ? n : {}
|
|
1523
1524
|
}, e);
|
|
1524
1525
|
}
|
|
1525
1526
|
return a({
|
|
1526
|
-
...
|
|
1527
|
+
...me,
|
|
1527
1528
|
...n ?? {}
|
|
1528
1529
|
}, "template"), i;
|
|
1529
1530
|
}
|
|
1530
1531
|
//#endregion
|
|
1531
1532
|
//#region src/utils/localizedBlockDefaults.ts
|
|
1532
|
-
function
|
|
1533
|
+
function rr(e) {
|
|
1533
1534
|
return {
|
|
1534
1535
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
1535
1536
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -1538,59 +1539,59 @@ function nr(e) {
|
|
|
1538
1539
|
}
|
|
1539
1540
|
//#endregion
|
|
1540
1541
|
//#region src/i18n/index.ts
|
|
1541
|
-
var
|
|
1542
|
-
"./locales/ca.ts": () => import("./ca-
|
|
1543
|
-
"./locales/de.ts": () => import("./de-
|
|
1544
|
-
"./locales/en.ts": () => import("./en-
|
|
1545
|
-
"./locales/es.ts": () => import("./es-
|
|
1546
|
-
"./locales/fr.ts": () => import("./fr-
|
|
1547
|
-
"./locales/nl.ts": () => import("./nl-
|
|
1548
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
1549
|
-
}),
|
|
1542
|
+
var ir = /* #__PURE__ */ Object.assign({
|
|
1543
|
+
"./locales/ca.ts": () => import("./ca-D9S-UCfZ.js"),
|
|
1544
|
+
"./locales/de.ts": () => import("./de-BUPszLpi.js"),
|
|
1545
|
+
"./locales/en.ts": () => import("./en-BbOC5x3w.js"),
|
|
1546
|
+
"./locales/es.ts": () => import("./es-0bCDcT9p.js"),
|
|
1547
|
+
"./locales/fr.ts": () => import("./fr-Brr8mJ9e.js"),
|
|
1548
|
+
"./locales/nl.ts": () => import("./nl-Co3_RL0M.js"),
|
|
1549
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-BECez5b0.js")
|
|
1550
|
+
}), ar = /* #__PURE__ */ Object.assign({
|
|
1550
1551
|
"./locales/cloud/de.ts": () => import("./de-BytZwgn6.js"),
|
|
1551
1552
|
"./locales/cloud/en.ts": () => import("./en-DyOSV0lY.js"),
|
|
1552
1553
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-C1WLSGDh.js")
|
|
1553
1554
|
});
|
|
1554
|
-
function
|
|
1555
|
+
function or(e) {
|
|
1555
1556
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
1556
1557
|
}
|
|
1557
|
-
var
|
|
1558
|
-
function
|
|
1558
|
+
var sr = or(ir), cr = or(ar);
|
|
1559
|
+
function lr(e) {
|
|
1559
1560
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
1560
1561
|
}
|
|
1561
|
-
function
|
|
1562
|
-
let n =
|
|
1563
|
-
return t.find((e) =>
|
|
1564
|
-
}
|
|
1565
|
-
function ur(e) {
|
|
1566
|
-
return cr(e).split("-")[0];
|
|
1562
|
+
function ur(e, t) {
|
|
1563
|
+
let n = lr(e);
|
|
1564
|
+
return t.find((e) => lr(e) === n);
|
|
1567
1565
|
}
|
|
1568
|
-
function dr(e
|
|
1569
|
-
return lr(e
|
|
1566
|
+
function dr(e) {
|
|
1567
|
+
return lr(e).split("-")[0];
|
|
1570
1568
|
}
|
|
1571
1569
|
function fr(e, t) {
|
|
1572
|
-
return
|
|
1570
|
+
return ur(e, t) ?? ur(dr(e), t);
|
|
1573
1571
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
return (await t()).default;
|
|
1572
|
+
function pr(e, t) {
|
|
1573
|
+
return fr(e, t) ?? "en";
|
|
1577
1574
|
}
|
|
1578
1575
|
async function mr(e) {
|
|
1579
|
-
let t = ir[`./locales
|
|
1576
|
+
let t = ir[`./locales/${pr(e, sr)}.ts`];
|
|
1580
1577
|
return (await t()).default;
|
|
1581
1578
|
}
|
|
1582
|
-
function hr(e) {
|
|
1583
|
-
|
|
1579
|
+
async function hr(e) {
|
|
1580
|
+
let t = ar[`./locales/cloud/${pr(e, cr)}.ts`];
|
|
1581
|
+
return (await t()).default;
|
|
1584
1582
|
}
|
|
1585
1583
|
function gr(e) {
|
|
1586
|
-
return
|
|
1584
|
+
return fr(e, sr) !== void 0;
|
|
1587
1585
|
}
|
|
1588
|
-
function _r() {
|
|
1589
|
-
return
|
|
1586
|
+
function _r(e) {
|
|
1587
|
+
return fr(e, cr) !== void 0;
|
|
1590
1588
|
}
|
|
1591
1589
|
function vr() {
|
|
1592
1590
|
return [...sr];
|
|
1593
1591
|
}
|
|
1592
|
+
function yr() {
|
|
1593
|
+
return [...cr];
|
|
1594
|
+
}
|
|
1594
1595
|
//#endregion
|
|
1595
1596
|
//#region src/i18n/contentDefaults.ts
|
|
1596
1597
|
var $ = {
|
|
@@ -1650,16 +1651,16 @@ var $ = {
|
|
|
1650
1651
|
seconds: "Segons",
|
|
1651
1652
|
expired: "Aquesta oferta ha caducat"
|
|
1652
1653
|
}
|
|
1653
|
-
},
|
|
1654
|
-
function
|
|
1654
|
+
}, br = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
|
|
1655
|
+
function xr(e) {
|
|
1655
1656
|
if (!e) return $.en;
|
|
1656
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
1657
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = br.get(t);
|
|
1657
1658
|
if (n) return $[n];
|
|
1658
|
-
let r =
|
|
1659
|
+
let r = br.get(dr(t));
|
|
1659
1660
|
return r ? $[r] : $.en;
|
|
1660
1661
|
}
|
|
1661
|
-
function
|
|
1662
|
-
let t =
|
|
1662
|
+
function Sr(e) {
|
|
1663
|
+
let t = xr(e);
|
|
1663
1664
|
return {
|
|
1664
1665
|
video: { alt: t.video },
|
|
1665
1666
|
countdown: {
|
|
@@ -1673,8 +1674,8 @@ function xr(e) {
|
|
|
1673
1674
|
}
|
|
1674
1675
|
//#endregion
|
|
1675
1676
|
//#region src/utils/resolveFieldColors.ts
|
|
1676
|
-
function
|
|
1677
|
-
let n =
|
|
1677
|
+
function Cr(e, t) {
|
|
1678
|
+
let n = Nt({ presets: e.presets }, jt), r = n.presets.length === 0;
|
|
1678
1679
|
return {
|
|
1679
1680
|
presets: r ? t.presets : n.presets,
|
|
1680
1681
|
allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
|
|
@@ -1686,9 +1687,9 @@ function Sr(e, t) {
|
|
|
1686
1687
|
}
|
|
1687
1688
|
//#endregion
|
|
1688
1689
|
//#region src/utils/collectColorFieldIssues.ts
|
|
1689
|
-
function
|
|
1690
|
+
function wr(e, t) {
|
|
1690
1691
|
let n = [], r = (r, i) => {
|
|
1691
|
-
let a =
|
|
1692
|
+
let a = Cr(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1692
1693
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1693
1694
|
id: s("invalid-presets"),
|
|
1694
1695
|
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." : "")
|
|
@@ -1699,8 +1700,8 @@ function Cr(e, t) {
|
|
|
1699
1700
|
id: s("allow-custom-ignored"),
|
|
1700
1701
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1701
1702
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1702
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1703
|
-
e !== "" && !t.has(
|
|
1703
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Pt(e)));
|
|
1704
|
+
e !== "" && !t.has(Pt(e)) && n.push({
|
|
1704
1705
|
id: s("off-palette-default"),
|
|
1705
1706
|
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.`
|
|
1706
1707
|
});
|
|
@@ -1712,7 +1713,7 @@ function Cr(e, t) {
|
|
|
1712
1713
|
}
|
|
1713
1714
|
//#endregion
|
|
1714
1715
|
//#region src/utils/keyboardShortcuts.ts
|
|
1715
|
-
function
|
|
1716
|
+
function Tr(e) {
|
|
1716
1717
|
for (let t of e.composedPath()) {
|
|
1717
1718
|
if (!(t instanceof HTMLElement)) continue;
|
|
1718
1719
|
if (t.isContentEditable) return !0;
|
|
@@ -1721,18 +1722,18 @@ function wr(e) {
|
|
|
1721
1722
|
}
|
|
1722
1723
|
return !1;
|
|
1723
1724
|
}
|
|
1724
|
-
function
|
|
1725
|
+
function Er(e, t) {
|
|
1725
1726
|
let n = e.metaKey || e.ctrlKey;
|
|
1726
1727
|
if (n && e.key.toLowerCase() === "s") {
|
|
1727
1728
|
e.preventDefault(), t.onSave?.();
|
|
1728
1729
|
return;
|
|
1729
1730
|
}
|
|
1730
1731
|
if (n && e.key.toLowerCase() === "z") {
|
|
1731
|
-
if (
|
|
1732
|
+
if (Tr(e)) return;
|
|
1732
1733
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1733
1734
|
return;
|
|
1734
1735
|
}
|
|
1735
|
-
if (t.isPicking?.() && !
|
|
1736
|
+
if (t.isPicking?.() && !Tr(e)) {
|
|
1736
1737
|
if (e.key === "Escape") {
|
|
1737
1738
|
e.preventDefault(), t.onCancelPick?.();
|
|
1738
1739
|
return;
|
|
@@ -1750,11 +1751,11 @@ function Tr(e, t) {
|
|
|
1750
1751
|
t.selectBlock(null);
|
|
1751
1752
|
return;
|
|
1752
1753
|
}
|
|
1753
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1754
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Tr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1754
1755
|
}
|
|
1755
1756
|
//#endregion
|
|
1756
1757
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1757
|
-
function
|
|
1758
|
+
function Dr(e, t, n, r = !1) {
|
|
1758
1759
|
if (!e) return [];
|
|
1759
1760
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
1760
1761
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -1763,7 +1764,7 @@ function Er(e, t, n, r = !1) {
|
|
|
1763
1764
|
value: e.slice(o, s.index)
|
|
1764
1765
|
});
|
|
1765
1766
|
let i = s[0];
|
|
1766
|
-
if (
|
|
1767
|
+
if (be(i, n)) {
|
|
1767
1768
|
let e = r ? Pe(i, t) : void 0;
|
|
1768
1769
|
a.push(e === void 0 ? {
|
|
1769
1770
|
type: "tag",
|
|
@@ -1772,9 +1773,9 @@ function Er(e, t, n, r = !1) {
|
|
|
1772
1773
|
type: "text",
|
|
1773
1774
|
value: e
|
|
1774
1775
|
});
|
|
1775
|
-
} else
|
|
1776
|
+
} else ye(i, n) ? a.push({
|
|
1776
1777
|
type: "tag",
|
|
1777
|
-
value:
|
|
1778
|
+
value: _e(i, n)
|
|
1778
1779
|
}) : a.push({
|
|
1779
1780
|
type: "text",
|
|
1780
1781
|
value: i
|
|
@@ -1788,20 +1789,20 @@ function Er(e, t, n, r = !1) {
|
|
|
1788
1789
|
}
|
|
1789
1790
|
//#endregion
|
|
1790
1791
|
//#region src/components/MergeTagPreviewText.vue
|
|
1791
|
-
var
|
|
1792
|
+
var Or = d({
|
|
1792
1793
|
name: "MergeTagPreviewText",
|
|
1793
1794
|
props: { text: {
|
|
1794
1795
|
type: String,
|
|
1795
1796
|
required: !0
|
|
1796
1797
|
} },
|
|
1797
1798
|
setup(e) {
|
|
1798
|
-
let t = n(
|
|
1799
|
-
return () => a.value.map((e, t) => e.type === "tag" ?
|
|
1799
|
+
let t = n(q, []), r = n(vt, Me.liquid), i = n(Y, null), a = S(() => Dr(e.text, t, r, i?.value ?? !1));
|
|
1800
|
+
return () => a.value.map((e, t) => e.type === "tag" ? z("span", {
|
|
1800
1801
|
key: t,
|
|
1801
1802
|
class: "tpl-merge-tag-label"
|
|
1802
1803
|
}, e.value) : e.value);
|
|
1803
1804
|
}
|
|
1804
|
-
}),
|
|
1805
|
+
}), kr = ["href"], Ar = /* @__PURE__ */ d({
|
|
1805
1806
|
__name: "ButtonBlock",
|
|
1806
1807
|
props: {
|
|
1807
1808
|
block: {},
|
|
@@ -1827,13 +1828,13 @@ var Dr = d({
|
|
|
1827
1828
|
style: k(n.value),
|
|
1828
1829
|
class: "tpl:cursor-default",
|
|
1829
1830
|
onClick: i[0] ||= O(() => {}, ["prevent"])
|
|
1830
|
-
}, [v(
|
|
1831
|
+
}, [v(Or, { text: e.block.text }, null, 8, ["text"])], 12, kr)], 4));
|
|
1831
1832
|
}
|
|
1832
|
-
}),
|
|
1833
|
+
}), jr = ["innerHTML"], Mr = [
|
|
1833
1834
|
"src",
|
|
1834
1835
|
"width",
|
|
1835
1836
|
"height"
|
|
1836
|
-
],
|
|
1837
|
+
], Nr = /* @__PURE__ */ d({
|
|
1837
1838
|
__name: "CustomBlockIcon",
|
|
1838
1839
|
props: {
|
|
1839
1840
|
icon: {},
|
|
@@ -1849,24 +1850,24 @@ var Dr = d({
|
|
|
1849
1850
|
height: `${n.value}px`
|
|
1850
1851
|
}),
|
|
1851
1852
|
innerHTML: e.icon
|
|
1852
|
-
}, null, 12,
|
|
1853
|
+
}, null, 12, jr)) : i.value ? (s(), C("img", {
|
|
1853
1854
|
key: 1,
|
|
1854
1855
|
src: e.icon,
|
|
1855
1856
|
width: n.value,
|
|
1856
1857
|
height: n.value,
|
|
1857
1858
|
class: "tpl:inline-block",
|
|
1858
1859
|
alt: ""
|
|
1859
|
-
}, null, 8,
|
|
1860
|
+
}, null, 8, Mr)) : (s(), A(_($t), {
|
|
1860
1861
|
key: 2,
|
|
1861
1862
|
size: n.value,
|
|
1862
1863
|
"stroke-width": 1.5
|
|
1863
1864
|
}, null, 8, ["size"]));
|
|
1864
1865
|
}
|
|
1865
|
-
}),
|
|
1866
|
-
function
|
|
1866
|
+
}), Pr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1867
|
+
function Fr(e, n) {
|
|
1867
1868
|
let r = nn(), i = null, a = null, o = null;
|
|
1868
1869
|
function s() {
|
|
1869
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1870
|
+
return e.value ? Array.from(e.value.querySelectorAll(Pr)).filter((e) => e.offsetParent !== null) : [];
|
|
1870
1871
|
}
|
|
1871
1872
|
function c(e) {
|
|
1872
1873
|
if (e.key !== "Tab") return;
|
|
@@ -1881,7 +1882,7 @@ function Pr(e, n) {
|
|
|
1881
1882
|
o = null;
|
|
1882
1883
|
let t = s();
|
|
1883
1884
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1884
|
-
}), a =
|
|
1885
|
+
}), a = K(e, "keydown", c);
|
|
1885
1886
|
}
|
|
1886
1887
|
function u(e = {}) {
|
|
1887
1888
|
let t = e.restoreFocus !== !1;
|
|
@@ -1896,8 +1897,8 @@ function Pr(e, n) {
|
|
|
1896
1897
|
}
|
|
1897
1898
|
//#endregion
|
|
1898
1899
|
//#region src/composables/useEmoji.ts
|
|
1899
|
-
function
|
|
1900
|
-
let [e, n] =
|
|
1900
|
+
function Ir() {
|
|
1901
|
+
let [e, n] = Be(!1), r = x([]), i = !1;
|
|
1901
1902
|
h(() => {
|
|
1902
1903
|
i = !0;
|
|
1903
1904
|
}), t(e, async (e) => {
|
|
@@ -1922,7 +1923,7 @@ function Fr() {
|
|
|
1922
1923
|
}
|
|
1923
1924
|
//#endregion
|
|
1924
1925
|
//#region src/composables/useFonts.ts
|
|
1925
|
-
var
|
|
1926
|
+
var Lr = [
|
|
1926
1927
|
{
|
|
1927
1928
|
value: "Arial",
|
|
1928
1929
|
label: "Arial"
|
|
@@ -1951,7 +1952,7 @@ var Ir = [
|
|
|
1951
1952
|
value: "Courier New",
|
|
1952
1953
|
label: "Courier New"
|
|
1953
1954
|
}
|
|
1954
|
-
],
|
|
1955
|
+
], Rr = {
|
|
1955
1956
|
arial: "Arial, sans-serif",
|
|
1956
1957
|
helvetica: "Helvetica, sans-serif",
|
|
1957
1958
|
georgia: "Georgia, serif",
|
|
@@ -1959,23 +1960,23 @@ var Ir = [
|
|
|
1959
1960
|
verdana: "Verdana, sans-serif",
|
|
1960
1961
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1961
1962
|
"courier new": "'Courier New', monospace"
|
|
1962
|
-
},
|
|
1963
|
-
function
|
|
1964
|
-
if (e === void 0 || e === !0) return [...
|
|
1963
|
+
}, zr = "Arial, sans-serif";
|
|
1964
|
+
function Br(e) {
|
|
1965
|
+
if (e === void 0 || e === !0) return [...Lr];
|
|
1965
1966
|
if (e === !1) return [];
|
|
1966
1967
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1967
1968
|
for (let i of e) {
|
|
1968
|
-
let e = i.toLowerCase(), a =
|
|
1969
|
+
let e = i.toLowerCase(), a = Lr.find((t) => t.value.toLowerCase() === e);
|
|
1969
1970
|
if (!a) {
|
|
1970
|
-
r.has(e) || (r.add(e),
|
|
1971
|
+
r.has(e) || (r.add(e), Z.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Lr.map((e) => e.value).join(", ")}.`));
|
|
1971
1972
|
continue;
|
|
1972
1973
|
}
|
|
1973
1974
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1974
1975
|
}
|
|
1975
1976
|
return t;
|
|
1976
1977
|
}
|
|
1977
|
-
function
|
|
1978
|
-
let t = l(e?.customFonts ?? []), n = l(!1), r =
|
|
1978
|
+
function Vr(e) {
|
|
1979
|
+
let t = l(e?.customFonts ?? []), n = l(!1), r = Br(e?.builtIns), i = S(() => e?.defaultFallback ?? zr), a = S(() => {
|
|
1979
1980
|
let e = [...r], n = t.value.map((e) => ({
|
|
1980
1981
|
value: e.name,
|
|
1981
1982
|
label: e.name,
|
|
@@ -1986,20 +1987,20 @@ function Br(e) {
|
|
|
1986
1987
|
function s(e) {
|
|
1987
1988
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1988
1989
|
}
|
|
1989
|
-
let c = e?.defaultFont ??
|
|
1990
|
-
s(c) ||
|
|
1990
|
+
let c = e?.defaultFont ?? zr.split(",")[0].trim();
|
|
1991
|
+
s(c) || Z.warn(`config.fonts: new templates seed "${c}", 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.`);
|
|
1991
1992
|
function u() {
|
|
1992
1993
|
if (e?.defaultFont && s(e.defaultFont)) {
|
|
1993
1994
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1994
1995
|
if (t) return t.value;
|
|
1995
1996
|
}
|
|
1996
|
-
return
|
|
1997
|
+
return zr;
|
|
1997
1998
|
}
|
|
1998
1999
|
let d = S(() => u());
|
|
1999
2000
|
function f(e) {
|
|
2000
2001
|
if (!e) return i.value;
|
|
2001
2002
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2002
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2003
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Rr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2003
2004
|
}
|
|
2004
2005
|
let p = [], m = !1;
|
|
2005
2006
|
async function g() {
|
|
@@ -2015,7 +2016,7 @@ function Br(e) {
|
|
|
2015
2016
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2016
2017
|
});
|
|
2017
2018
|
} catch (t) {
|
|
2018
|
-
|
|
2019
|
+
Z.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2019
2020
|
}
|
|
2020
2021
|
});
|
|
2021
2022
|
await Promise.allSettled(e), !m && (n.value = !0);
|
|
@@ -2040,8 +2041,8 @@ function Br(e) {
|
|
|
2040
2041
|
}
|
|
2041
2042
|
//#endregion
|
|
2042
2043
|
//#region src/composables/useLogicTag.ts
|
|
2043
|
-
function
|
|
2044
|
-
let e = n(
|
|
2044
|
+
function Hr() {
|
|
2045
|
+
let e = n(Ke, []), t = n(ot, []), r = n(vt, Me.liquid), i = n(tt, null), a = n(Ot, null), o = n(st, null) ?? l(!1), s = !!i || e.length > 0 || t.length > 0, c = e.length > 0 || t.length > 0;
|
|
2045
2046
|
async function u() {
|
|
2046
2047
|
if (i) {
|
|
2047
2048
|
o.value = !0;
|
|
@@ -2072,12 +2073,12 @@ function Vr() {
|
|
|
2072
2073
|
}
|
|
2073
2074
|
//#endregion
|
|
2074
2075
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
2075
|
-
function
|
|
2076
|
-
return
|
|
2076
|
+
function Ur(e, t, n) {
|
|
2077
|
+
return ye(e, n) ? {
|
|
2077
2078
|
type: "logicMergeTagNode",
|
|
2078
2079
|
attrs: {
|
|
2079
2080
|
value: e,
|
|
2080
|
-
keyword:
|
|
2081
|
+
keyword: _e(e, n)
|
|
2081
2082
|
}
|
|
2082
2083
|
} : {
|
|
2083
2084
|
type: "mergeTagNode",
|
|
@@ -2089,15 +2090,15 @@ function Hr(e, t, n) {
|
|
|
2089
2090
|
}
|
|
2090
2091
|
//#endregion
|
|
2091
2092
|
//#region src/utils/insertLogicTag.ts
|
|
2092
|
-
function
|
|
2093
|
+
function Wr(e) {
|
|
2093
2094
|
return "before" in e && "after" in e;
|
|
2094
2095
|
}
|
|
2095
|
-
function
|
|
2096
|
-
if (!
|
|
2097
|
-
e.chain().focus().insertContent(
|
|
2096
|
+
function Gr(e, t, n) {
|
|
2097
|
+
if (!Wr(t)) {
|
|
2098
|
+
e.chain().focus().insertContent(Ur(t.value, t.label, n)).run();
|
|
2098
2099
|
return;
|
|
2099
2100
|
}
|
|
2100
|
-
let r =
|
|
2101
|
+
let r = Ur(t.before, t.label, n), i = Ur(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
2101
2102
|
if (a !== o) {
|
|
2102
2103
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
2103
2104
|
return;
|
|
@@ -2106,20 +2107,20 @@ function Wr(e, t, n) {
|
|
|
2106
2107
|
}
|
|
2107
2108
|
//#endregion
|
|
2108
2109
|
//#region src/utils/linkColorExtension.ts
|
|
2109
|
-
function
|
|
2110
|
+
function Kr(e) {
|
|
2110
2111
|
if (!e) return null;
|
|
2111
2112
|
let t = e.trim();
|
|
2112
2113
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
2113
2114
|
}
|
|
2114
|
-
function
|
|
2115
|
+
function qr(e) {
|
|
2115
2116
|
return e.extend({ addAttributes() {
|
|
2116
2117
|
return {
|
|
2117
2118
|
...this.parent?.(),
|
|
2118
2119
|
color: {
|
|
2119
2120
|
default: null,
|
|
2120
|
-
parseHTML: (e) =>
|
|
2121
|
+
parseHTML: (e) => Kr(Mt(e.style.color)),
|
|
2121
2122
|
renderHTML: (e) => {
|
|
2122
|
-
let t =
|
|
2123
|
+
let t = Kr(e.color);
|
|
2123
2124
|
return t ? { style: `color: ${t}` } : {};
|
|
2124
2125
|
}
|
|
2125
2126
|
}
|
|
@@ -2128,9 +2129,9 @@ function Kr(e) {
|
|
|
2128
2129
|
}
|
|
2129
2130
|
//#endregion
|
|
2130
2131
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2131
|
-
function
|
|
2132
|
+
function Jr(e, t = Me.liquid) {
|
|
2132
2133
|
let n = l(!1), r = l(""), i = l(""), a = l(null);
|
|
2133
|
-
|
|
2134
|
+
Fr(a, n);
|
|
2134
2135
|
function o() {
|
|
2135
2136
|
let t = e.value?.getAttributes("link") ?? {};
|
|
2136
2137
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
@@ -2139,7 +2140,7 @@ function qr(e, t = Me.liquid) {
|
|
|
2139
2140
|
if (r.value) {
|
|
2140
2141
|
let t = d(r.value);
|
|
2141
2142
|
if (t !== null) {
|
|
2142
|
-
let n =
|
|
2143
|
+
let n = Kr(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
2143
2144
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
2144
2145
|
}
|
|
2145
2146
|
}
|
|
@@ -2189,10 +2190,15 @@ function qr(e, t = Me.liquid) {
|
|
|
2189
2190
|
}
|
|
2190
2191
|
//#endregion
|
|
2191
2192
|
//#region src/composables/useRichTextEditor.ts
|
|
2192
|
-
function
|
|
2193
|
-
let i = n(
|
|
2194
|
-
|
|
2195
|
-
|
|
2193
|
+
function Yr(r) {
|
|
2194
|
+
let i = n(J, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = rn(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = Hr(), h = n(ut, null), g = (N(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = Ee(u), v = x(null), y = () => de(i?.content?.value?.settings ?? { locale: "en" });
|
|
2195
|
+
t(y, (e) => {
|
|
2196
|
+
let t = v.value?.view.dom;
|
|
2197
|
+
t && t.setAttribute("dir", e);
|
|
2198
|
+
});
|
|
2199
|
+
let { showLinkDialog: b, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = Jr(v, u), { start: A, stop: j } = Re(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), M = x(null), P = l(!0), F = l(null), I = !1;
|
|
2200
|
+
async function L() {
|
|
2201
|
+
F.value = null, P.value = !0;
|
|
2196
2202
|
try {
|
|
2197
2203
|
let { TiptapEditor: e, EC: t, extensions: n } = await r.loadExtensions({
|
|
2198
2204
|
mergeTags: a,
|
|
@@ -2201,36 +2207,37 @@ function Jr(r) {
|
|
|
2201
2207
|
autocompleteEnabled: d,
|
|
2202
2208
|
suggestionEmptyText: g
|
|
2203
2209
|
});
|
|
2204
|
-
if (
|
|
2205
|
-
|
|
2210
|
+
if (I) return;
|
|
2211
|
+
M.value = t;
|
|
2206
2212
|
let o = /* @__PURE__ */ new Map();
|
|
2207
2213
|
n.forEach((e, t) => o.set(e.name, t));
|
|
2208
2214
|
let s = new e({
|
|
2209
2215
|
extensions: n.filter((e, t) => o.get(e.name) === t),
|
|
2210
2216
|
content: r.blockContent(),
|
|
2211
2217
|
editable: !0,
|
|
2218
|
+
editorProps: { attributes: { dir: y() } },
|
|
2212
2219
|
onUpdate: ({ editor: e }) => {
|
|
2213
|
-
|
|
2220
|
+
I || i && i.updateBlock(r.blockId(), { content: e.getHTML() });
|
|
2214
2221
|
}
|
|
2215
2222
|
});
|
|
2216
|
-
if (
|
|
2223
|
+
if (I) {
|
|
2217
2224
|
s.destroy();
|
|
2218
2225
|
return;
|
|
2219
2226
|
}
|
|
2220
|
-
v.value = s,
|
|
2227
|
+
v.value = s, P.value = !1, A();
|
|
2221
2228
|
} catch (e) {
|
|
2222
|
-
if (
|
|
2223
|
-
|
|
2229
|
+
if (I) return;
|
|
2230
|
+
Z.error(`[${r.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
2224
2231
|
}
|
|
2225
2232
|
}
|
|
2226
|
-
function
|
|
2227
|
-
v.value?.destroy(), v.value = null,
|
|
2233
|
+
function R() {
|
|
2234
|
+
v.value?.destroy(), v.value = null, L();
|
|
2228
2235
|
}
|
|
2229
|
-
|
|
2230
|
-
let
|
|
2236
|
+
L();
|
|
2237
|
+
let z = t(() => r.blockContent(), (e) => {
|
|
2231
2238
|
v.value && v.value.getHTML() !== e && v.value.commands.setContent(e, { emitUpdate: !1 });
|
|
2232
2239
|
});
|
|
2233
|
-
function
|
|
2240
|
+
function B(e) {
|
|
2234
2241
|
if (s.value || p.value) return;
|
|
2235
2242
|
let t = e.composedPath(), n = t.find((e) => e instanceof HTMLElement);
|
|
2236
2243
|
if (!n) return;
|
|
@@ -2238,50 +2245,50 @@ function Jr(r) {
|
|
|
2238
2245
|
let i = t.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
2239
2246
|
n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog") || i || r.onDone();
|
|
2240
2247
|
}
|
|
2241
|
-
|
|
2242
|
-
|
|
2248
|
+
K(document, "mousedown", B), e(() => {
|
|
2249
|
+
I = !0, z(), j(), v.value?.destroy();
|
|
2243
2250
|
});
|
|
2244
|
-
async function
|
|
2251
|
+
async function V() {
|
|
2245
2252
|
let e = await c();
|
|
2246
|
-
|
|
2253
|
+
I || (e && v.value ? v.value.chain().focus().insertMergeTag({
|
|
2247
2254
|
label: e.label,
|
|
2248
2255
|
value: e.value
|
|
2249
2256
|
}).run() : v.value?.commands.focus());
|
|
2250
2257
|
}
|
|
2251
|
-
async function
|
|
2258
|
+
async function H() {
|
|
2252
2259
|
let e = await m();
|
|
2253
|
-
|
|
2260
|
+
I || (e && v.value ? Gr(v.value, e, u) : v.value?.commands.focus());
|
|
2254
2261
|
}
|
|
2255
2262
|
return {
|
|
2256
2263
|
editor: v,
|
|
2257
|
-
EditorContent:
|
|
2258
|
-
isLoading:
|
|
2259
|
-
initError:
|
|
2260
|
-
retry:
|
|
2261
|
-
showLinkDialog:
|
|
2262
|
-
linkUrl:
|
|
2263
|
-
linkColor:
|
|
2264
|
-
linkDialogRef:
|
|
2264
|
+
EditorContent: M,
|
|
2265
|
+
isLoading: P,
|
|
2266
|
+
initError: F,
|
|
2267
|
+
retry: R,
|
|
2268
|
+
showLinkDialog: b,
|
|
2269
|
+
linkUrl: S,
|
|
2270
|
+
linkColor: C,
|
|
2271
|
+
linkDialogRef: w,
|
|
2265
2272
|
mergeTags: a,
|
|
2266
2273
|
canRequestMergeTag: o,
|
|
2267
2274
|
isRequestingMergeTag: s,
|
|
2268
2275
|
syntax: u,
|
|
2269
2276
|
canInsertLogicTag: f,
|
|
2270
2277
|
isRequestingLogicTag: p,
|
|
2271
|
-
openLinkDialog:
|
|
2272
|
-
insertLink:
|
|
2273
|
-
removeLink:
|
|
2274
|
-
closeLinkDialog:
|
|
2275
|
-
handleLinkKeydown:
|
|
2276
|
-
handleAddMergeTag:
|
|
2277
|
-
handleAddLogicTag:
|
|
2278
|
+
openLinkDialog: T,
|
|
2279
|
+
insertLink: E,
|
|
2280
|
+
removeLink: D,
|
|
2281
|
+
closeLinkDialog: O,
|
|
2282
|
+
handleLinkKeydown: k,
|
|
2283
|
+
handleAddMergeTag: V,
|
|
2284
|
+
handleAddLogicTag: H
|
|
2278
2285
|
};
|
|
2279
2286
|
}
|
|
2280
2287
|
//#endregion
|
|
2281
2288
|
//#region src/composables/useSmallScreenNotice.ts
|
|
2282
|
-
var
|
|
2283
|
-
function
|
|
2284
|
-
let t =
|
|
2289
|
+
var Xr = "(max-width: 767px)";
|
|
2290
|
+
function Zr(e) {
|
|
2291
|
+
let t = He(Xr);
|
|
2285
2292
|
return {
|
|
2286
2293
|
isSmallScreen: t,
|
|
2287
2294
|
showNotice: S(() => (P(e) ?? !0) && t.value)
|
|
@@ -2289,20 +2296,20 @@ function Xr(e) {
|
|
|
2289
2296
|
}
|
|
2290
2297
|
//#endregion
|
|
2291
2298
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2292
|
-
var
|
|
2299
|
+
var Qr = { class: "tpl:w-full" }, $r = {
|
|
2293
2300
|
key: 0,
|
|
2294
2301
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
2295
|
-
},
|
|
2302
|
+
}, ei = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ti = {
|
|
2296
2303
|
key: 1,
|
|
2297
2304
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
2298
|
-
},
|
|
2305
|
+
}, ni = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ri = {
|
|
2299
2306
|
key: 2,
|
|
2300
2307
|
class: "tpl:relative"
|
|
2301
|
-
},
|
|
2308
|
+
}, ii = ["innerHTML"], ai = {
|
|
2302
2309
|
key: 0,
|
|
2303
2310
|
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]",
|
|
2304
2311
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2305
|
-
},
|
|
2312
|
+
}, oi = /* @__PURE__ */ d({
|
|
2306
2313
|
__name: "CustomBlock",
|
|
2307
2314
|
props: {
|
|
2308
2315
|
block: {},
|
|
@@ -2310,7 +2317,7 @@ var Zr = { class: "tpl:w-full" }, Qr = {
|
|
|
2310
2317
|
},
|
|
2311
2318
|
emits: ["fetchData"],
|
|
2312
2319
|
setup(e, { emit: r }) {
|
|
2313
|
-
let i = e, a = r, { t: o } =
|
|
2320
|
+
let i = e, a = r, { t: o } = X(), c = n(Tt, null), u = l(""), d = l(!1), f = S(() => c?.getDefinition(i.block.customType)), p = S(() => !!f.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: y } = yn({
|
|
2314
2321
|
definition: f,
|
|
2315
2322
|
block: S(() => i.block),
|
|
2316
2323
|
onUpdate: (e, t) => {
|
|
@@ -2319,10 +2326,10 @@ var Zr = { class: "tpl:w-full" }, Qr = {
|
|
|
2319
2326
|
dataSourceFetched: t
|
|
2320
2327
|
});
|
|
2321
2328
|
}
|
|
2322
|
-
}), b = n(
|
|
2329
|
+
}), b = n(q, []), x = n(Y, null), T = S(() => {
|
|
2323
2330
|
if (!x?.value) return i.block;
|
|
2324
2331
|
let e = {};
|
|
2325
|
-
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
2332
|
+
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? ge(n, b) : n;
|
|
2326
2333
|
return {
|
|
2327
2334
|
...i.block,
|
|
2328
2335
|
fieldValues: e
|
|
@@ -2339,17 +2346,17 @@ var Zr = { class: "tpl:w-full" }, Qr = {
|
|
|
2339
2346
|
}
|
|
2340
2347
|
}
|
|
2341
2348
|
}
|
|
2342
|
-
let k =
|
|
2349
|
+
let k = ze(D, 150);
|
|
2343
2350
|
return E(() => {
|
|
2344
2351
|
D();
|
|
2345
2352
|
}), t(() => i.block.fieldValues, () => {
|
|
2346
2353
|
k();
|
|
2347
2354
|
}, { deep: !0 }), t(() => x?.value, () => {
|
|
2348
2355
|
k();
|
|
2349
|
-
}), (e, t) => (s(), C("div",
|
|
2356
|
+
}), (e, t) => (s(), C("div", Qr, [p.value ? d.value ? (s(), C("div", ti, [v(_(Xt), {
|
|
2350
2357
|
size: 24,
|
|
2351
2358
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2352
|
-
}), M("span",
|
|
2359
|
+
}), M("span", ni, R(_(o).customBlocks.renderError), 1)])) : (s(), C("div", ri, [M("div", { innerHTML: u.value }, null, 8, ii), _(y) && _(g) ? (s(), C("div", ai, [_(m) ? (s(), A(en, {
|
|
2353
2360
|
key: 1,
|
|
2354
2361
|
class: "tpl:w-48"
|
|
2355
2362
|
})) : (s(), C("button", {
|
|
@@ -2357,16 +2364,16 @@ var Zr = { class: "tpl:w-full" }, Qr = {
|
|
|
2357
2364
|
type: "button",
|
|
2358
2365
|
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)]",
|
|
2359
2366
|
onClick: t[0] ||= O((...e) => _(h) && _(h)(...e), ["stop"])
|
|
2360
|
-
}, [f.value?.icon ? (s(), A(
|
|
2367
|
+
}, [f.value?.icon ? (s(), A(Nr, {
|
|
2361
2368
|
key: 0,
|
|
2362
2369
|
icon: f.value.icon,
|
|
2363
2370
|
size: 16
|
|
2364
|
-
}, null, 8, ["icon"])) : w("", !0),
|
|
2371
|
+
}, null, 8, ["icon"])) : w("", !0), V(" " + R(f.value?.dataSource?.label || _(o).customBlocks.dataSource.fetchButton), 1)]))])) : w("", !0)])) : (s(), C("div", $r, [v(_(zt), {
|
|
2365
2372
|
size: 24,
|
|
2366
2373
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2367
|
-
}), M("span",
|
|
2374
|
+
}), M("span", ei, R(_(o).customBlocks.definitionNotFound), 1)]))]));
|
|
2368
2375
|
}
|
|
2369
|
-
}),
|
|
2376
|
+
}), si = { class: "tpl:w-full" }, ci = /* @__PURE__ */ d({
|
|
2370
2377
|
__name: "DividerBlock",
|
|
2371
2378
|
props: {
|
|
2372
2379
|
block: {},
|
|
@@ -2378,28 +2385,28 @@ var Zr = { class: "tpl:w-full" }, Qr = {
|
|
|
2378
2385
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2379
2386
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2380
2387
|
}));
|
|
2381
|
-
return (e, t) => (s(), C("div",
|
|
2388
|
+
return (e, t) => (s(), C("div", si, [M("hr", {
|
|
2382
2389
|
class: "tpl:m-0 tpl:border-none",
|
|
2383
2390
|
style: k(n.value)
|
|
2384
2391
|
}, null, 4)]));
|
|
2385
2392
|
}
|
|
2386
|
-
}),
|
|
2393
|
+
}), li = { class: "tpl:w-full" }, ui = ["srcdoc", "title"], di = {
|
|
2387
2394
|
key: 1,
|
|
2388
2395
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
2389
|
-
},
|
|
2396
|
+
}, fi = {
|
|
2390
2397
|
key: 0,
|
|
2391
2398
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2392
|
-
},
|
|
2399
|
+
}, pi = {
|
|
2393
2400
|
key: 1,
|
|
2394
2401
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2395
|
-
},
|
|
2402
|
+
}, mi = /* @__PURE__ */ d({
|
|
2396
2403
|
__name: "HtmlBlock",
|
|
2397
2404
|
props: {
|
|
2398
2405
|
block: {},
|
|
2399
2406
|
viewport: {}
|
|
2400
2407
|
},
|
|
2401
2408
|
setup(r) {
|
|
2402
|
-
let i = r, { t: a } =
|
|
2409
|
+
let i = r, { t: a } = X(), o = n(At, !1), c = S(() => i.block.content.trim().length > 0), u = S(() => o && c.value), d = n(q, []), f = n(Y, null), p = S(() => f?.value ? ge(i.block.content, d) : i.block.content), m = l(null), h = l(60), g = null;
|
|
2403
2410
|
function y() {
|
|
2404
2411
|
let e = m.value?.contentDocument;
|
|
2405
2412
|
e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -2413,7 +2420,7 @@ var Zr = { class: "tpl:w-full" }, Qr = {
|
|
|
2413
2420
|
e || (g?.disconnect(), g = null);
|
|
2414
2421
|
}), e(() => {
|
|
2415
2422
|
g?.disconnect(), g = null;
|
|
2416
|
-
}), (e, t) => (s(), C("div",
|
|
2423
|
+
}), (e, t) => (s(), C("div", li, [u.value ? (s(), C("iframe", {
|
|
2417
2424
|
key: 0,
|
|
2418
2425
|
ref_key: "iframeRef",
|
|
2419
2426
|
ref: m,
|
|
@@ -2423,18 +2430,18 @@ var Zr = { class: "tpl:w-full" }, Qr = {
|
|
|
2423
2430
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2424
2431
|
style: k({ height: `${h.value}px` }),
|
|
2425
2432
|
onLoad: b
|
|
2426
|
-
}, null, 44,
|
|
2433
|
+
}, null, 44, ui)) : (s(), C("div", di, [v(_(Bt), {
|
|
2427
2434
|
size: 24,
|
|
2428
2435
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2429
|
-
}), c.value ? (s(), C("span",
|
|
2436
|
+
}), c.value ? (s(), C("span", fi, R(_(a).html.preview), 1)) : (s(), C("span", pi, R(_(a).html.empty), 1))]))]));
|
|
2430
2437
|
}
|
|
2431
|
-
}),
|
|
2432
|
-
function
|
|
2433
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } =
|
|
2438
|
+
}), hi = "image/";
|
|
2439
|
+
function gi(e) {
|
|
2440
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = We(t, {
|
|
2434
2441
|
preventDefaultForUnhandled: !0,
|
|
2435
2442
|
onDrop: (e) => {
|
|
2436
2443
|
if (!i()) return;
|
|
2437
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
2444
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(hi));
|
|
2438
2445
|
t.length > 0 && n([t[0]]);
|
|
2439
2446
|
}
|
|
2440
2447
|
});
|
|
@@ -2442,17 +2449,17 @@ function hi(e) {
|
|
|
2442
2449
|
}
|
|
2443
2450
|
//#endregion
|
|
2444
2451
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2445
|
-
var
|
|
2452
|
+
var _i = {
|
|
2446
2453
|
key: 0,
|
|
2447
2454
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
2448
2455
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
2449
|
-
},
|
|
2456
|
+
}, vi = ["href"], yi = ["src", "alt"], bi = ["src", "alt"], xi = {
|
|
2450
2457
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2451
2458
|
style: { opacity: "0.7" }
|
|
2452
|
-
},
|
|
2459
|
+
}, Si = ["href"], Ci = ["src", "alt"], wi = ["src", "alt"], Ti = {
|
|
2453
2460
|
key: 4,
|
|
2454
2461
|
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)]"
|
|
2455
|
-
},
|
|
2462
|
+
}, Ei = ["aria-label"], Di = { key: 1 }, Oi = /* @__PURE__ */ d({
|
|
2456
2463
|
__name: "ImageBlock",
|
|
2457
2464
|
props: {
|
|
2458
2465
|
block: {},
|
|
@@ -2460,7 +2467,7 @@ var gi = {
|
|
|
2460
2467
|
},
|
|
2461
2468
|
emits: ["update"],
|
|
2462
2469
|
setup(e, { emit: t }) {
|
|
2463
|
-
let r = e, i = t, { t: a } =
|
|
2470
|
+
let r = e, i = t, { t: a } = X(), { syntax: o } = rn(), c = n(nt, null), u = S(() => !!c), d = an();
|
|
2464
2471
|
async function f() {
|
|
2465
2472
|
let e = await c?.({ accept: ["images"] });
|
|
2466
2473
|
if (d.alive && e) {
|
|
@@ -2487,7 +2494,7 @@ var gi = {
|
|
|
2487
2494
|
}
|
|
2488
2495
|
}
|
|
2489
2496
|
}
|
|
2490
|
-
let { isOver: y } =
|
|
2497
|
+
let { isOver: y } = gi({
|
|
2491
2498
|
target: p,
|
|
2492
2499
|
enabled: h,
|
|
2493
2500
|
onFiles: g
|
|
@@ -2502,21 +2509,21 @@ var gi = {
|
|
|
2502
2509
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2503
2510
|
marginRight: e === "center" ? "auto" : void 0
|
|
2504
2511
|
};
|
|
2505
|
-
}), T = S(() =>
|
|
2512
|
+
}), T = S(() => W(r.block.src, o)), E = Nn(() => T.value ? void 0 : r.block.src), D = Nn(() => T.value ? r.block.placeholderUrl : void 0);
|
|
2506
2513
|
return (t, n) => (s(), C("div", {
|
|
2507
2514
|
ref_key: "dropZoneRef",
|
|
2508
2515
|
ref: p,
|
|
2509
2516
|
"data-testid": "image-drop-zone",
|
|
2510
2517
|
class: "tpl:relative tpl:w-full",
|
|
2511
2518
|
style: k(b.value)
|
|
2512
|
-
}, [h.value && (_(y) || m.value) ? (s(), C("div",
|
|
2519
|
+
}, [h.value && (_(y) || m.value) ? (s(), C("div", _i, [m.value ? (s(), C(L, { key: 0 }, [v(_(Kt), {
|
|
2513
2520
|
class: "tpl-spinner",
|
|
2514
2521
|
size: 20,
|
|
2515
2522
|
"stroke-width": 2
|
|
2516
|
-
}),
|
|
2523
|
+
}), V(" " + R(_(a).image.uploading), 1)], 64)) : (s(), C(L, { key: 1 }, [v(_(Jt), {
|
|
2517
2524
|
size: 20,
|
|
2518
2525
|
"stroke-width": 1.5
|
|
2519
|
-
}),
|
|
2526
|
+
}), V(" " + R(_(a).image.dropToUpload), 1)], 64))])) : w("", !0), e.block.src && T.value && e.block.placeholderUrl ? (s(), C(L, { key: 1 }, [e.block.linkUrl ? (s(), C("a", {
|
|
2520
2527
|
key: 0,
|
|
2521
2528
|
href: e.block.linkUrl,
|
|
2522
2529
|
target: "_blank",
|
|
@@ -2528,13 +2535,13 @@ var gi = {
|
|
|
2528
2535
|
src: _(D),
|
|
2529
2536
|
alt: e.block.alt || _(a).image.altTextPlaceholder,
|
|
2530
2537
|
style: k(x.value)
|
|
2531
|
-
}, null, 12,
|
|
2538
|
+
}, null, 12, yi)], 8, vi)) : (s(), C("img", {
|
|
2532
2539
|
key: 1,
|
|
2533
2540
|
class: "tpl:border-0",
|
|
2534
2541
|
src: _(D),
|
|
2535
2542
|
alt: e.block.alt,
|
|
2536
2543
|
style: k(x.value)
|
|
2537
|
-
}, null, 12,
|
|
2544
|
+
}, null, 12, bi))], 64)) : e.block.src && T.value ? (s(), C("div", {
|
|
2538
2545
|
key: 2,
|
|
2539
2546
|
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)]",
|
|
2540
2547
|
style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, x.value])
|
|
@@ -2543,7 +2550,7 @@ var gi = {
|
|
|
2543
2550
|
"stroke-width": 1.5,
|
|
2544
2551
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2545
2552
|
style: { opacity: "0.5" }
|
|
2546
|
-
}), M("span",
|
|
2553
|
+
}), M("span", xi, [v(Or, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), C(L, { key: 3 }, [e.block.linkUrl ? (s(), C("a", {
|
|
2547
2554
|
key: 0,
|
|
2548
2555
|
href: e.block.linkUrl,
|
|
2549
2556
|
target: "_blank",
|
|
@@ -2555,13 +2562,13 @@ var gi = {
|
|
|
2555
2562
|
src: _(E),
|
|
2556
2563
|
alt: e.block.alt || _(a).image.altTextPlaceholder,
|
|
2557
2564
|
style: k(x.value)
|
|
2558
|
-
}, null, 12,
|
|
2565
|
+
}, null, 12, Ci)], 8, Si)) : (s(), C("img", {
|
|
2559
2566
|
key: 1,
|
|
2560
2567
|
class: "tpl:border-0",
|
|
2561
2568
|
src: _(E),
|
|
2562
2569
|
alt: e.block.alt,
|
|
2563
2570
|
style: k(x.value)
|
|
2564
|
-
}, null, 12,
|
|
2571
|
+
}, null, 12, wi))], 64)) : (s(), C("div", Ti, [u.value ? (s(), C("button", {
|
|
2565
2572
|
key: 0,
|
|
2566
2573
|
"aria-label": _(a).image.browseMedia,
|
|
2567
2574
|
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)]",
|
|
@@ -2569,19 +2576,19 @@ var gi = {
|
|
|
2569
2576
|
}, [v(_(Wt), {
|
|
2570
2577
|
size: 14,
|
|
2571
2578
|
"stroke-width": 1.5
|
|
2572
|
-
}),
|
|
2579
|
+
}), V(" " + R(_(a).image.browseMedia), 1)], 8, Ei)) : (s(), C("span", Di, R(_(a).image.clickToAdd), 1))]))], 4));
|
|
2573
2580
|
}
|
|
2574
|
-
}),
|
|
2581
|
+
}), ki = { class: "tpl:w-full" }, Ai = ["href"], ji = {
|
|
2575
2582
|
key: 1,
|
|
2576
2583
|
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)]"
|
|
2577
|
-
},
|
|
2584
|
+
}, Mi = /* @__PURE__ */ d({
|
|
2578
2585
|
__name: "MenuBlock",
|
|
2579
2586
|
props: {
|
|
2580
2587
|
block: {},
|
|
2581
2588
|
viewport: {}
|
|
2582
2589
|
},
|
|
2583
2590
|
setup(e) {
|
|
2584
|
-
let t = e, { t: n } =
|
|
2591
|
+
let t = e, { t: n } = X(), i = S(() => ({
|
|
2585
2592
|
display: "flex",
|
|
2586
2593
|
flexWrap: "wrap",
|
|
2587
2594
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -2593,7 +2600,7 @@ var gi = {
|
|
|
2593
2600
|
function o(e) {
|
|
2594
2601
|
return e || t.block.linkColor || t.block.color;
|
|
2595
2602
|
}
|
|
2596
|
-
return (t, c) => (s(), C("div",
|
|
2603
|
+
return (t, c) => (s(), C("div", ki, [a.value ? (s(), C("div", {
|
|
2597
2604
|
key: 0,
|
|
2598
2605
|
style: k(i.value)
|
|
2599
2606
|
}, [(s(!0), C(L, null, r(e.block.items, (t, n) => (s(), C(L, { key: t.id }, [M("a", {
|
|
@@ -2605,15 +2612,15 @@ var gi = {
|
|
|
2605
2612
|
textDecoration: t.underline ? "underline" : "none"
|
|
2606
2613
|
}),
|
|
2607
2614
|
onClick: c[0] ||= O(() => {}, ["prevent"])
|
|
2608
|
-
}, [v(
|
|
2615
|
+
}, [v(Or, { text: t.text || "..." }, null, 8, ["text"])], 12, Ai), n < e.block.items.length - 1 ? (s(), C("span", {
|
|
2609
2616
|
key: 0,
|
|
2610
2617
|
style: k({
|
|
2611
2618
|
color: e.block.separatorColor,
|
|
2612
2619
|
padding: `0 ${e.block.spacing}px`
|
|
2613
2620
|
})
|
|
2614
|
-
}, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div",
|
|
2621
|
+
}, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div", ji, [v(_(Ht), { size: 16 }), M("span", null, R(_(n).menu.addLinks), 1)]))]));
|
|
2615
2622
|
}
|
|
2616
|
-
}),
|
|
2623
|
+
}), Ni = /* @__PURE__ */ new Set([
|
|
2617
2624
|
"http",
|
|
2618
2625
|
"https",
|
|
2619
2626
|
"mailto",
|
|
@@ -2623,7 +2630,7 @@ var gi = {
|
|
|
2623
2630
|
"sms",
|
|
2624
2631
|
"xmpp",
|
|
2625
2632
|
"cid"
|
|
2626
|
-
]),
|
|
2633
|
+
]), Pi = /* @__PURE__ */ new Set([
|
|
2627
2634
|
"SCRIPT",
|
|
2628
2635
|
"STYLE",
|
|
2629
2636
|
"IFRAME",
|
|
@@ -2633,7 +2640,7 @@ var gi = {
|
|
|
2633
2640
|
"META",
|
|
2634
2641
|
"BASE",
|
|
2635
2642
|
"FORM"
|
|
2636
|
-
]),
|
|
2643
|
+
]), Fi = /* @__PURE__ */ new Set([
|
|
2637
2644
|
"href",
|
|
2638
2645
|
"xlink:href",
|
|
2639
2646
|
"formaction",
|
|
@@ -2642,16 +2649,16 @@ var gi = {
|
|
|
2642
2649
|
"background",
|
|
2643
2650
|
"poster"
|
|
2644
2651
|
]);
|
|
2645
|
-
function
|
|
2652
|
+
function Ii(e, t) {
|
|
2646
2653
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2647
2654
|
if (!n || n.startsWith("#")) return !0;
|
|
2648
2655
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2649
2656
|
if (!r) return !0;
|
|
2650
2657
|
let i = r[1].toLowerCase();
|
|
2651
|
-
return
|
|
2658
|
+
return Ni.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2652
2659
|
}
|
|
2653
|
-
function
|
|
2654
|
-
if (
|
|
2660
|
+
function Li(e) {
|
|
2661
|
+
if (Pi.has(e.tagName)) {
|
|
2655
2662
|
e.remove();
|
|
2656
2663
|
return;
|
|
2657
2664
|
}
|
|
@@ -2663,29 +2670,29 @@ function Ii(e) {
|
|
|
2663
2670
|
e.removeAttribute(n);
|
|
2664
2671
|
continue;
|
|
2665
2672
|
}
|
|
2666
|
-
if (
|
|
2667
|
-
|
|
2673
|
+
if (Fi.has(t)) {
|
|
2674
|
+
Ii(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2668
2675
|
continue;
|
|
2669
2676
|
}
|
|
2670
2677
|
if (t === "src") {
|
|
2671
|
-
|
|
2678
|
+
Ii(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2672
2679
|
continue;
|
|
2673
2680
|
}
|
|
2674
2681
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2675
2682
|
}
|
|
2676
2683
|
let n = Array.from(e.children);
|
|
2677
|
-
for (let e of n)
|
|
2684
|
+
for (let e of n) Li(e);
|
|
2678
2685
|
}
|
|
2679
|
-
function
|
|
2686
|
+
function Ri(e) {
|
|
2680
2687
|
if (typeof DOMParser > "u") return e;
|
|
2681
2688
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2682
|
-
for (let e of n)
|
|
2689
|
+
for (let e of n) Li(e);
|
|
2683
2690
|
return t.innerHTML;
|
|
2684
2691
|
}
|
|
2685
2692
|
//#endregion
|
|
2686
2693
|
//#region src/composables/useEditableTextBlock.ts
|
|
2687
|
-
function
|
|
2688
|
-
let t = n(
|
|
2694
|
+
function zi(e) {
|
|
2695
|
+
let t = n(q, []), r = n(Y, null), { syntax: i } = rn(), a = S(() => r?.value ? xe(e(), t) : De(e(), t)), o = S(() => Ri(je(a.value, i))), s = l(!1), c = l(null), { top: u, left: d } = Ue(c), { toLocal: f } = Ft(), p = S(() => f({
|
|
2689
2696
|
top: u.value - 8,
|
|
2690
2697
|
left: d.value
|
|
2691
2698
|
}));
|
|
@@ -2706,14 +2713,14 @@ function Ri(e) {
|
|
|
2706
2713
|
}
|
|
2707
2714
|
//#endregion
|
|
2708
2715
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2709
|
-
var
|
|
2716
|
+
var Bi = ["innerHTML"], Vi = /* @__PURE__ */ d({
|
|
2710
2717
|
__name: "ParagraphBlock",
|
|
2711
2718
|
props: {
|
|
2712
2719
|
block: {},
|
|
2713
2720
|
viewport: {}
|
|
2714
2721
|
},
|
|
2715
2722
|
setup(e) {
|
|
2716
|
-
let t = e, n =
|
|
2723
|
+
let t = e, n = B(() => import("./ParagraphEditor-DQn0HMfV.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = zi(() => t.block.content);
|
|
2717
2724
|
return (t, u) => (s(), C("div", {
|
|
2718
2725
|
ref_key: "blockRef",
|
|
2719
2726
|
ref: i,
|
|
@@ -2732,54 +2739,54 @@ var zi = ["innerHTML"], Bi = /* @__PURE__ */ d({
|
|
|
2732
2739
|
key: 1,
|
|
2733
2740
|
class: "tpl-text-content tpl:outline-none",
|
|
2734
2741
|
innerHTML: _(o)
|
|
2735
|
-
}, null, 8,
|
|
2742
|
+
}, null, 8, Bi))], 544));
|
|
2736
2743
|
}
|
|
2737
2744
|
});
|
|
2738
2745
|
//#endregion
|
|
2739
2746
|
//#region src/utils/blockComponentResolver.ts
|
|
2740
|
-
function
|
|
2747
|
+
function Hi(e) {
|
|
2741
2748
|
let t = { fontFamily: e.fontFamily };
|
|
2742
2749
|
return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
|
|
2743
2750
|
}
|
|
2744
|
-
function
|
|
2751
|
+
function Ui(e, t, n) {
|
|
2745
2752
|
if (t) {
|
|
2746
2753
|
let n = t.getComponent(e);
|
|
2747
2754
|
if (n) return n;
|
|
2748
2755
|
}
|
|
2749
2756
|
return n[e.type] ?? null;
|
|
2750
2757
|
}
|
|
2751
|
-
function
|
|
2758
|
+
function Wi(e) {
|
|
2752
2759
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2753
2760
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2754
2761
|
backgroundColor: n || "transparent"
|
|
2755
2762
|
};
|
|
2756
|
-
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
2763
|
+
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ce.paragraphGap : Ce.paragraphGap}px`), e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2757
2764
|
}
|
|
2758
|
-
function
|
|
2765
|
+
function Gi(e) {
|
|
2759
2766
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2760
2767
|
let t = e.wrapper, n = {};
|
|
2761
2768
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
2762
2769
|
}
|
|
2763
2770
|
//#endregion
|
|
2764
2771
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2765
|
-
var
|
|
2772
|
+
var Ki = [
|
|
2766
2773
|
"data-block-id",
|
|
2767
2774
|
"data-block-type",
|
|
2768
2775
|
"data-tpl-picked"
|
|
2769
|
-
],
|
|
2776
|
+
], qi = ["aria-label"], Ji = [
|
|
2770
2777
|
"aria-label",
|
|
2771
2778
|
"aria-pressed",
|
|
2772
2779
|
"title"
|
|
2773
|
-
],
|
|
2780
|
+
], Yi = ["aria-label", "title"], Xi = ["aria-label", "title"], Zi = ["aria-label", "title"], Qi = {
|
|
2774
2781
|
key: 1,
|
|
2775
2782
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
2776
|
-
},
|
|
2783
|
+
}, $i = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, ea = {
|
|
2777
2784
|
key: 2,
|
|
2778
2785
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2779
|
-
},
|
|
2786
|
+
}, ta = ["aria-label", "title"], na = {
|
|
2780
2787
|
key: 3,
|
|
2781
2788
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2782
|
-
},
|
|
2789
|
+
}, ra = ["aria-label"], ia = /*#__PURE__*/ tn(/* @__PURE__ */ d({
|
|
2783
2790
|
__name: "BlockWrapper",
|
|
2784
2791
|
props: {
|
|
2785
2792
|
block: {},
|
|
@@ -2791,7 +2798,7 @@ var Gi = [
|
|
|
2791
2798
|
},
|
|
2792
2799
|
emits: ["select"],
|
|
2793
2800
|
setup(e, { emit: t }) {
|
|
2794
|
-
let r =
|
|
2801
|
+
let r = B(() => import("./BlockIssueBadge-CosQgeJ-.js")), i = e, o = t, { t: c, format: u } = X(), d = n(kt, null), f = l(null), p = S(() => d?.liftedBlockId.value === i.block.id), m = S(() => p.value ? u(c.blockActions.dragLifted, { block: i.block.type }) : c.blockActions.drag);
|
|
2795
2802
|
async function h() {
|
|
2796
2803
|
await D(), f.value?.focus();
|
|
2797
2804
|
}
|
|
@@ -2817,20 +2824,20 @@ var Gi = [
|
|
|
2817
2824
|
let y = S(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), x = S(() => i.previewMode === !0 && y.value), T = S(() => i.viewport ? {
|
|
2818
2825
|
desktop: c.viewport.desktop,
|
|
2819
2826
|
mobile: c.viewport.mobile
|
|
2820
|
-
}[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(
|
|
2821
|
-
function
|
|
2827
|
+
}[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(ft, null), j = n(ht, null), N = n(mt, {}), P = S(() => N.savedBlocks?.isPicking.value === !0), F = S(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), I = S(() => i.isSelected && !P.value), L = S(() => N.comments?.getBlockCount(i.block.id) ?? 0), z = S(() => Wi(i.block)), H = S(() => Gi(i.block));
|
|
2828
|
+
function ee(e) {
|
|
2822
2829
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
|
|
2823
2830
|
}
|
|
2824
|
-
function
|
|
2831
|
+
function te() {
|
|
2825
2832
|
A?.deleteBlock(i.block.id);
|
|
2826
2833
|
}
|
|
2827
|
-
function
|
|
2834
|
+
function ne() {
|
|
2828
2835
|
A?.duplicateBlock(i.block);
|
|
2829
2836
|
}
|
|
2830
|
-
function
|
|
2837
|
+
function re() {
|
|
2831
2838
|
N.savedBlocks?.startPicking(i.block.id);
|
|
2832
2839
|
}
|
|
2833
|
-
function
|
|
2840
|
+
function ie() {
|
|
2834
2841
|
j?.toggleBlock(i.block.id);
|
|
2835
2842
|
}
|
|
2836
2843
|
return (t, n) => x.value ? w("", !0) : (s(), C("div", {
|
|
@@ -2844,7 +2851,7 @@ var Gi = [
|
|
|
2844
2851
|
"data-block-id": e.block.id,
|
|
2845
2852
|
"data-block-type": e.block.type,
|
|
2846
2853
|
"data-tpl-picked": e.picked || void 0,
|
|
2847
|
-
onClick:
|
|
2854
|
+
onClick: ee
|
|
2848
2855
|
}, [
|
|
2849
2856
|
v(_(r), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
2850
2857
|
I.value ? (s(), C("div", {
|
|
@@ -2865,95 +2872,95 @@ var Gi = [
|
|
|
2865
2872
|
}, [v(_(Gt), {
|
|
2866
2873
|
size: 14,
|
|
2867
2874
|
"stroke-width": 1.5
|
|
2868
|
-
})], 40,
|
|
2875
|
+
})], 40, Ji),
|
|
2869
2876
|
M("button", {
|
|
2870
2877
|
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",
|
|
2871
2878
|
"aria-label": _(c).blockActions.duplicate,
|
|
2872
2879
|
title: _(c).blockActions.duplicate,
|
|
2873
|
-
onClick: O(
|
|
2880
|
+
onClick: O(ne, ["stop"])
|
|
2874
2881
|
}, [v(_(Rt), {
|
|
2875
2882
|
size: 14,
|
|
2876
2883
|
"stroke-width": 1.5
|
|
2877
|
-
})], 8,
|
|
2884
|
+
})], 8, Yi),
|
|
2878
2885
|
F.value ? (s(), C("button", {
|
|
2879
2886
|
key: 0,
|
|
2880
2887
|
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",
|
|
2881
2888
|
"aria-label": _(c).blockActions.saveAsBlock,
|
|
2882
2889
|
title: _(c).blockActions.saveAsBlock,
|
|
2883
|
-
onClick: O(
|
|
2890
|
+
onClick: O(re, ["stop"])
|
|
2884
2891
|
}, [v(_(Lt), {
|
|
2885
2892
|
size: 14,
|
|
2886
2893
|
"stroke-width": 1.5
|
|
2887
|
-
})], 8,
|
|
2894
|
+
})], 8, Xi)) : w("", !0),
|
|
2888
2895
|
M("button", {
|
|
2889
2896
|
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",
|
|
2890
2897
|
"aria-label": _(c).blockActions.delete,
|
|
2891
2898
|
title: _(c).blockActions.delete,
|
|
2892
|
-
onClick: O(
|
|
2899
|
+
onClick: O(te, ["stop"])
|
|
2893
2900
|
}, [v(_(Ut), {
|
|
2894
2901
|
size: 14,
|
|
2895
2902
|
"stroke-width": 1.5
|
|
2896
|
-
})], 8,
|
|
2897
|
-
], 8,
|
|
2898
|
-
y.value ? (s(), C("div",
|
|
2903
|
+
})], 8, Zi)
|
|
2904
|
+
], 8, qi)) : w("", !0),
|
|
2905
|
+
y.value ? (s(), C("div", Qi, [M("span", $i, [v(_(Vt), {
|
|
2899
2906
|
size: 12,
|
|
2900
2907
|
"stroke-width": 1.5
|
|
2901
|
-
}),
|
|
2902
|
-
E.value && !y.value ? (s(), C("div",
|
|
2908
|
+
}), V(" " + R(_(u)(_(c).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : w("", !0),
|
|
2909
|
+
E.value && !y.value ? (s(), C("div", ea, [M("button", {
|
|
2903
2910
|
"data-testid": "condition-toggle",
|
|
2904
2911
|
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)]",
|
|
2905
2912
|
"aria-label": _(c).blockActions.conditionToggle,
|
|
2906
2913
|
title: e.block.displayCondition?.label,
|
|
2907
|
-
onClick: O(
|
|
2914
|
+
onClick: O(ie, ["stop"])
|
|
2908
2915
|
}, [v(_(Qt), {
|
|
2909
2916
|
size: 12,
|
|
2910
2917
|
"stroke-width": 2
|
|
2911
|
-
})], 8,
|
|
2912
|
-
L.value > 0 && !y.value ? (s(), C("div",
|
|
2918
|
+
})], 8, ta)])) : w("", !0),
|
|
2919
|
+
L.value > 0 && !y.value ? (s(), C("div", na, [M("button", {
|
|
2913
2920
|
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)]",
|
|
2914
2921
|
"aria-label": _(u)(_(c).blockActions.comments, { count: String(L.value) }),
|
|
2915
2922
|
onClick: n[0] ||= O((t) => _(N).comments?.openForBlock(e.block.id), ["stop"])
|
|
2916
2923
|
}, [v(_(Yt), {
|
|
2917
2924
|
size: 12,
|
|
2918
2925
|
"stroke-width": 2.5
|
|
2919
|
-
}),
|
|
2920
|
-
|
|
2926
|
+
}), V(" " + R(L.value), 1)], 8, ra)])) : w("", !0),
|
|
2927
|
+
H.value ? (s(), C("div", {
|
|
2921
2928
|
key: 4,
|
|
2922
2929
|
class: "tpl-section-wrapper",
|
|
2923
|
-
style: k(
|
|
2930
|
+
style: k(H.value)
|
|
2924
2931
|
}, [M("div", {
|
|
2925
2932
|
class: "tpl-block-content",
|
|
2926
|
-
style: k(
|
|
2933
|
+
style: k(z.value)
|
|
2927
2934
|
}, [a(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (s(), C("div", {
|
|
2928
2935
|
key: 5,
|
|
2929
2936
|
class: "tpl-block-content",
|
|
2930
|
-
style: k(
|
|
2937
|
+
style: k(z.value)
|
|
2931
2938
|
}, [a(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2932
|
-
], 10,
|
|
2939
|
+
], 10, Ki));
|
|
2933
2940
|
}
|
|
2934
2941
|
}), [["__scopeId", "data-v-2c239048"]]);
|
|
2935
2942
|
//#endregion
|
|
2936
2943
|
//#region src/utils/unwrapParagraph.ts
|
|
2937
|
-
function
|
|
2944
|
+
function aa(e) {
|
|
2938
2945
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2939
2946
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2940
2947
|
}
|
|
2941
2948
|
//#endregion
|
|
2942
2949
|
//#region src/components/blocks/TitleBlock.vue
|
|
2943
|
-
var
|
|
2950
|
+
var oa = /* @__PURE__ */ d({
|
|
2944
2951
|
__name: "TitleBlock",
|
|
2945
2952
|
props: {
|
|
2946
2953
|
block: {},
|
|
2947
2954
|
viewport: {}
|
|
2948
2955
|
},
|
|
2949
2956
|
setup(e) {
|
|
2950
|
-
let t = e, n =
|
|
2957
|
+
let t = e, n = B(() => import("./TitleEditor-oQ4gr6wS.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = zi(() => t.block.content), d = S(() => {
|
|
2951
2958
|
let e = {
|
|
2952
|
-
fontSize: `${
|
|
2959
|
+
fontSize: `${Ne[t.block.level]}px`,
|
|
2953
2960
|
textAlign: t.block.textAlign
|
|
2954
2961
|
};
|
|
2955
2962
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2956
|
-
}), f = S(() => `h${t.block.level}`), p = S(() =>
|
|
2963
|
+
}), f = S(() => `h${t.block.level}`), p = S(() => aa(o.value));
|
|
2957
2964
|
return (t, o) => (s(), C("div", {
|
|
2958
2965
|
ref_key: "blockRef",
|
|
2959
2966
|
ref: i,
|
|
@@ -2979,16 +2986,16 @@ var aa = /* @__PURE__ */ d({
|
|
|
2979
2986
|
});
|
|
2980
2987
|
//#endregion
|
|
2981
2988
|
//#region src/utils/sectionColumnDrop.ts
|
|
2982
|
-
function
|
|
2989
|
+
function sa(e) {
|
|
2983
2990
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2984
2991
|
}
|
|
2985
2992
|
//#endregion
|
|
2986
2993
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2987
|
-
var
|
|
2994
|
+
var ca = { class: "tpl:w-full" }, la = {
|
|
2988
2995
|
key: 0,
|
|
2989
2996
|
"data-testid": "section-drop-hint",
|
|
2990
2997
|
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)]"
|
|
2991
|
-
},
|
|
2998
|
+
}, ua = /* @__PURE__ */ d({
|
|
2992
2999
|
__name: "SectionBlock",
|
|
2993
3000
|
props: {
|
|
2994
3001
|
block: {},
|
|
@@ -2996,13 +3003,13 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
2996
3003
|
},
|
|
2997
3004
|
setup(e) {
|
|
2998
3005
|
let t = {
|
|
2999
|
-
title:
|
|
3000
|
-
paragraph:
|
|
3001
|
-
image:
|
|
3002
|
-
button:
|
|
3003
|
-
divider:
|
|
3004
|
-
custom:
|
|
3005
|
-
}, a = e, { t: o } =
|
|
3006
|
+
title: oa,
|
|
3007
|
+
paragraph: Vi,
|
|
3008
|
+
image: Oi,
|
|
3009
|
+
button: Ar,
|
|
3010
|
+
divider: ci,
|
|
3011
|
+
custom: oi
|
|
3012
|
+
}, a = e, { t: o } = X(), c = Qe(J, "SectionBlock"), l = n(ht, null), d = n(Tt, null), p = n(mt, {}), m = n(wt, null);
|
|
3006
3013
|
function h(e) {
|
|
3007
3014
|
let t = p.savedBlocks;
|
|
3008
3015
|
if (t?.isPicking.value) {
|
|
@@ -3037,7 +3044,7 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3037
3044
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
3038
3045
|
}
|
|
3039
3046
|
function D(e) {
|
|
3040
|
-
return
|
|
3047
|
+
return Ui(e, d, t);
|
|
3041
3048
|
}
|
|
3042
3049
|
function O(e, t) {
|
|
3043
3050
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
@@ -3045,7 +3052,7 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3045
3052
|
dataSourceFetched: t.dataSourceFetched
|
|
3046
3053
|
});
|
|
3047
3054
|
}
|
|
3048
|
-
return (t, n) => (s(), C("div",
|
|
3055
|
+
return (t, n) => (s(), C("div", ca, [M("div", { class: b(["tpl:flex tpl:gap-0", { "tpl:flex-col": x.value }]) }, [(s(!0), C(L, null, r(y.value, (t, n) => (s(), C("div", {
|
|
3049
3056
|
key: n,
|
|
3050
3057
|
class: b(["tpl:relative tpl:min-h-[60px] tpl:rounded", T(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3051
3058
|
style: k({ width: x.value ? "100%" : g.value[n] })
|
|
@@ -3054,7 +3061,7 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3054
3061
|
group: {
|
|
3055
3062
|
name: "blocks",
|
|
3056
3063
|
pull: !0,
|
|
3057
|
-
put: (e, t, n) => _(
|
|
3064
|
+
put: (e, t, n) => _(sa)(n)
|
|
3058
3065
|
},
|
|
3059
3066
|
animation: 150,
|
|
3060
3067
|
"ghost-class": "tpl-ghost",
|
|
@@ -3067,7 +3074,7 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3067
3074
|
class: "tpl:min-h-[60px]",
|
|
3068
3075
|
"onUpdate:modelValue": (e) => E(n, e)
|
|
3069
3076
|
}, {
|
|
3070
|
-
default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(
|
|
3077
|
+
default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(ia, {
|
|
3071
3078
|
block: t,
|
|
3072
3079
|
"is-selected": _(c).state.selectedBlockId === t.id,
|
|
3073
3080
|
viewport: e.viewport,
|
|
@@ -3099,13 +3106,13 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3099
3106
|
"model-value",
|
|
3100
3107
|
"group",
|
|
3101
3108
|
"onUpdate:modelValue"
|
|
3102
|
-
]), T(n).length === 0 ? (s(), C("div",
|
|
3109
|
+
]), T(n).length === 0 ? (s(), C("div", la, [M("span", null, R(_(o).section.dropHere), 1)])) : w("", !0)], 6))), 128))], 2)]));
|
|
3103
3110
|
}
|
|
3104
|
-
}),
|
|
3111
|
+
}), da = ke, fa = {
|
|
3105
3112
|
small: 24,
|
|
3106
3113
|
medium: 32,
|
|
3107
3114
|
large: 48
|
|
3108
|
-
},
|
|
3115
|
+
}, pa = [
|
|
3109
3116
|
"facebook",
|
|
3110
3117
|
"twitter",
|
|
3111
3118
|
"instagram",
|
|
@@ -3123,11 +3130,11 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3123
3130
|
"github",
|
|
3124
3131
|
"dribbble",
|
|
3125
3132
|
"behance"
|
|
3126
|
-
],
|
|
3133
|
+
], ma = [
|
|
3127
3134
|
"width",
|
|
3128
3135
|
"height",
|
|
3129
3136
|
"fill"
|
|
3130
|
-
],
|
|
3137
|
+
], ha = ["d"], ga = /* @__PURE__ */ d({
|
|
3131
3138
|
__name: "SocialIconSvg",
|
|
3132
3139
|
props: {
|
|
3133
3140
|
platform: {},
|
|
@@ -3135,7 +3142,7 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3135
3142
|
iconSize: {}
|
|
3136
3143
|
},
|
|
3137
3144
|
setup(e) {
|
|
3138
|
-
let t = e, n = S(() =>
|
|
3145
|
+
let t = e, n = S(() => da[t.platform]), r = S(() => fa[t.iconSize]), i = S(() => {
|
|
3139
3146
|
let e = {
|
|
3140
3147
|
display: "inline-flex",
|
|
3141
3148
|
alignItems: "center",
|
|
@@ -3179,25 +3186,25 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3179
3186
|
viewBox: "0 0 24 24",
|
|
3180
3187
|
fill: o.value,
|
|
3181
3188
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3182
|
-
}, [M("path", { d: n.value.path }, null, 8,
|
|
3189
|
+
}, [M("path", { d: n.value.path }, null, 8, ha)], 8, ma))], 4));
|
|
3183
3190
|
}
|
|
3184
|
-
}),
|
|
3191
|
+
}), _a = { class: "tpl:w-full" }, va = ["href"], ya = {
|
|
3185
3192
|
key: 1,
|
|
3186
3193
|
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)]"
|
|
3187
|
-
},
|
|
3194
|
+
}, ba = /* @__PURE__ */ d({
|
|
3188
3195
|
__name: "SocialIconsBlock",
|
|
3189
3196
|
props: {
|
|
3190
3197
|
block: {},
|
|
3191
3198
|
viewport: {}
|
|
3192
3199
|
},
|
|
3193
3200
|
setup(e) {
|
|
3194
|
-
let t = e, { t: n } =
|
|
3201
|
+
let t = e, { t: n } = X(), i = S(() => ({
|
|
3195
3202
|
display: "flex",
|
|
3196
3203
|
flexWrap: "wrap",
|
|
3197
3204
|
gap: `${t.block.spacing}px`,
|
|
3198
3205
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3199
3206
|
})), a = S(() => t.block.icons.length > 0);
|
|
3200
|
-
return (t, o) => (s(), C("div",
|
|
3207
|
+
return (t, o) => (s(), C("div", _a, [a.value ? (s(), C("div", {
|
|
3201
3208
|
key: 0,
|
|
3202
3209
|
style: k(i.value)
|
|
3203
3210
|
}, [(s(!0), C(L, null, r(e.block.icons, (t) => (s(), C("a", {
|
|
@@ -3205,7 +3212,7 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3205
3212
|
href: t.url || "#",
|
|
3206
3213
|
class: "tpl:cursor-default",
|
|
3207
3214
|
onClick: o[0] ||= O(() => {}, ["prevent"])
|
|
3208
|
-
}, [v(
|
|
3215
|
+
}, [v(ga, {
|
|
3209
3216
|
platform: t.platform,
|
|
3210
3217
|
"icon-style": e.block.iconStyle,
|
|
3211
3218
|
"icon-size": e.block.iconSize
|
|
@@ -3213,44 +3220,44 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3213
3220
|
"platform",
|
|
3214
3221
|
"icon-style",
|
|
3215
3222
|
"icon-size"
|
|
3216
|
-
])], 8,
|
|
3223
|
+
])], 8, va))), 128))], 4)) : (s(), C("div", ya, [v(_(It), { size: 16 }), M("span", null, R(_(n).social.addIcons), 1)]))]));
|
|
3217
3224
|
}
|
|
3218
|
-
}),
|
|
3225
|
+
}), xa = { class: "tpl:w-full" }, Sa = {
|
|
3219
3226
|
key: 0,
|
|
3220
3227
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3221
3228
|
style: {
|
|
3222
3229
|
"background-color": "var(--tpl-bg-hover)",
|
|
3223
3230
|
color: "var(--tpl-text-dim)"
|
|
3224
3231
|
}
|
|
3225
|
-
},
|
|
3232
|
+
}, Ca = /* @__PURE__ */ d({
|
|
3226
3233
|
__name: "SpacerBlock",
|
|
3227
3234
|
props: {
|
|
3228
3235
|
block: {},
|
|
3229
3236
|
viewport: {}
|
|
3230
3237
|
},
|
|
3231
3238
|
setup(e) {
|
|
3232
|
-
let t = e, n =
|
|
3239
|
+
let t = e, n = Qe(J, "SpacerBlock"), r = S(() => ({
|
|
3233
3240
|
height: `${t.block.height}px`,
|
|
3234
3241
|
minHeight: `${t.block.height}px`,
|
|
3235
3242
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3236
3243
|
}));
|
|
3237
|
-
return (t, i) => (s(), C("div",
|
|
3244
|
+
return (t, i) => (s(), C("div", xa, [M("div", {
|
|
3238
3245
|
style: k(r.value),
|
|
3239
3246
|
class: b(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !_(n).state.previewMode }])
|
|
3240
|
-
}, [_(n).state.previewMode ? w("", !0) : (s(), C("span",
|
|
3247
|
+
}, [_(n).state.previewMode ? w("", !0) : (s(), C("span", Sa, R(e.block.height) + "px ", 1))], 6)]));
|
|
3241
3248
|
}
|
|
3242
|
-
}),
|
|
3249
|
+
}), wa = { class: "tpl:w-full" }, Ta = { key: 0 }, Ea = [
|
|
3243
3250
|
"aria-label",
|
|
3244
3251
|
"data-placeholder",
|
|
3245
3252
|
"onBlur"
|
|
3246
|
-
],
|
|
3253
|
+
], Da = [
|
|
3247
3254
|
"aria-label",
|
|
3248
3255
|
"data-placeholder",
|
|
3249
3256
|
"onBlur"
|
|
3250
|
-
],
|
|
3257
|
+
], Oa = {
|
|
3251
3258
|
key: 1,
|
|
3252
3259
|
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)]"
|
|
3253
|
-
},
|
|
3260
|
+
}, ka = /*#__PURE__*/ tn(/* @__PURE__ */ d({
|
|
3254
3261
|
__name: "TableBlock",
|
|
3255
3262
|
props: {
|
|
3256
3263
|
block: {},
|
|
@@ -3264,7 +3271,7 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3264
3271
|
updated(e, t) {
|
|
3265
3272
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3266
3273
|
}
|
|
3267
|
-
}, n = e, { t: i } =
|
|
3274
|
+
}, n = e, { t: i } = X(), a = Qe(J, "TableBlock"), o = S(() => n.block.rows.length > 0), c = S(() => {
|
|
3268
3275
|
let e = {
|
|
3269
3276
|
width: "100%",
|
|
3270
3277
|
borderCollapse: "collapse",
|
|
@@ -3295,11 +3302,11 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3295
3302
|
} : n);
|
|
3296
3303
|
a.updateBlock(n.block.id, { rows: o });
|
|
3297
3304
|
}
|
|
3298
|
-
return (e, n) => (s(), C("div",
|
|
3305
|
+
return (e, n) => (s(), C("div", wa, [o.value ? (s(), C("table", {
|
|
3299
3306
|
key: 0,
|
|
3300
3307
|
style: k(c.value),
|
|
3301
3308
|
class: "tpl-table-editable"
|
|
3302
|
-
}, [d.value ? (s(), C("thead",
|
|
3309
|
+
}, [d.value ? (s(), C("thead", Ta, [M("tr", null, [(s(!0), C(L, null, r(d.value.cells, (e) => f((s(), C("th", {
|
|
3303
3310
|
key: e.id,
|
|
3304
3311
|
style: k(u.value),
|
|
3305
3312
|
"aria-label": _(i).table.cellPlaceholder,
|
|
@@ -3308,7 +3315,7 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3308
3315
|
onBlur: (t) => h(d.value.id, e.id, t),
|
|
3309
3316
|
onKeydown: n[0] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3310
3317
|
onClick: O(m, ["stop"])
|
|
3311
|
-
}, null, 44,
|
|
3318
|
+
}, null, 44, Ea)), [[t, e.content]])), 128))])])) : w("", !0), M("tbody", null, [(s(!0), C(L, null, r(p.value, (e) => (s(), C("tr", { key: e.id }, [(s(!0), C(L, null, r(e.cells, (r) => f((s(), C("td", {
|
|
3312
3319
|
key: r.id,
|
|
3313
3320
|
style: k(l.value),
|
|
3314
3321
|
"aria-label": _(i).table.cellPlaceholder,
|
|
@@ -3317,9 +3324,9 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3317
3324
|
onBlur: (t) => h(e.id, r.id, t),
|
|
3318
3325
|
onKeydown: n[1] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3319
3326
|
onClick: O(m, ["stop"])
|
|
3320
|
-
}, null, 44,
|
|
3327
|
+
}, null, 44, Da)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), C("div", Oa, [v(_(Zt), { size: 16 }), M("span", null, R(_(i).table.empty), 1)]))]));
|
|
3321
3328
|
}
|
|
3322
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
3329
|
+
}), [["__scopeId", "data-v-963ac422"]]), Aa = /* @__PURE__ */ d({
|
|
3323
3330
|
__name: "VideoPlayButton",
|
|
3324
3331
|
props: { hoverEffect: {
|
|
3325
3332
|
type: Boolean,
|
|
@@ -3337,7 +3344,7 @@ var sa = { class: "tpl:w-full" }, ca = {
|
|
|
3337
3344
|
});
|
|
3338
3345
|
//#endregion
|
|
3339
3346
|
//#region src/utils/videoThumbnail.ts
|
|
3340
|
-
function
|
|
3347
|
+
function ja(e) {
|
|
3341
3348
|
if (!e) return {
|
|
3342
3349
|
platform: "unknown",
|
|
3343
3350
|
videoId: null,
|
|
@@ -3369,25 +3376,25 @@ function Aa(e) {
|
|
|
3369
3376
|
thumbnailUrl: null
|
|
3370
3377
|
};
|
|
3371
3378
|
}
|
|
3372
|
-
function
|
|
3373
|
-
return t ||
|
|
3379
|
+
function Ma(e, t) {
|
|
3380
|
+
return t || ja(e).thumbnailUrl;
|
|
3374
3381
|
}
|
|
3375
3382
|
//#endregion
|
|
3376
3383
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3377
|
-
var
|
|
3384
|
+
var Na = ["src", "alt"], Pa = {
|
|
3378
3385
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3379
3386
|
style: { opacity: "0.7" }
|
|
3380
|
-
},
|
|
3387
|
+
}, Fa = ["href"], Ia = ["src", "alt"], La = ["src", "alt"], Ra = {
|
|
3381
3388
|
key: 3,
|
|
3382
3389
|
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)]"
|
|
3383
|
-
},
|
|
3390
|
+
}, za = /* @__PURE__ */ d({
|
|
3384
3391
|
__name: "VideoBlock",
|
|
3385
3392
|
props: {
|
|
3386
3393
|
block: {},
|
|
3387
3394
|
viewport: {}
|
|
3388
3395
|
},
|
|
3389
3396
|
setup(e) {
|
|
3390
|
-
let t = e, { t: n } =
|
|
3397
|
+
let t = e, { t: n } = X(), { syntax: r } = rn(), i = S(() => W(t.block.url, r) || W(t.block.thumbnailUrl, r)), a = Nn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Nn(() => i.value ? t.block.placeholderUrl : void 0), c = S(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Ma(t.block.url)), l = S(() => ({ textAlign: t.block.align })), u = S(() => {
|
|
3391
3398
|
let e = t.block.align;
|
|
3392
3399
|
return {
|
|
3393
3400
|
maxWidth: "100%",
|
|
@@ -3397,7 +3404,7 @@ var Ma = ["src", "alt"], Na = {
|
|
|
3397
3404
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3398
3405
|
marginRight: e === "center" ? "auto" : void 0
|
|
3399
3406
|
};
|
|
3400
|
-
}), d = S(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = S(() =>
|
|
3407
|
+
}), d = S(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = S(() => W(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
3401
3408
|
return (t, r) => (s(), C("div", {
|
|
3402
3409
|
class: "tpl:w-full",
|
|
3403
3410
|
style: k(l.value)
|
|
@@ -3410,7 +3417,7 @@ var Ma = ["src", "alt"], Na = {
|
|
|
3410
3417
|
src: _(o),
|
|
3411
3418
|
alt: e.block.alt,
|
|
3412
3419
|
style: k(d.value)
|
|
3413
|
-
}, null, 12,
|
|
3420
|
+
}, null, 12, Na), v(Aa)], 4)) : i.value ? (s(), C("div", {
|
|
3414
3421
|
key: 1,
|
|
3415
3422
|
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)]",
|
|
3416
3423
|
style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
@@ -3419,7 +3426,7 @@ var Ma = ["src", "alt"], Na = {
|
|
|
3419
3426
|
"stroke-width": 1.5,
|
|
3420
3427
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3421
3428
|
style: { opacity: "0.5" }
|
|
3422
|
-
}), M("span",
|
|
3429
|
+
}), M("span", Pa, [v(Or, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), C(L, { key: 2 }, [e.block.url ? (s(), C("a", {
|
|
3423
3430
|
key: 0,
|
|
3424
3431
|
href: e.block.url,
|
|
3425
3432
|
target: "_blank",
|
|
@@ -3432,7 +3439,7 @@ var Ma = ["src", "alt"], Na = {
|
|
|
3432
3439
|
src: c.value,
|
|
3433
3440
|
alt: e.block.alt,
|
|
3434
3441
|
style: k(d.value)
|
|
3435
|
-
}, null, 12,
|
|
3442
|
+
}, null, 12, Ia), v(Aa, { "hover-effect": "" })], 12, Fa)) : (s(), C("div", {
|
|
3436
3443
|
key: 1,
|
|
3437
3444
|
class: "tpl:relative tpl:inline-block",
|
|
3438
3445
|
style: k(u.value)
|
|
@@ -3441,51 +3448,54 @@ var Ma = ["src", "alt"], Na = {
|
|
|
3441
3448
|
src: c.value,
|
|
3442
3449
|
alt: e.block.alt,
|
|
3443
3450
|
style: k(d.value)
|
|
3444
|
-
}, null, 12,
|
|
3451
|
+
}, null, 12, La), v(Aa)], 4))], 64)) : (s(), C("div", Ra, [v(_(qt), {
|
|
3445
3452
|
size: 40,
|
|
3446
3453
|
"stroke-width": 1.5,
|
|
3447
3454
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3448
3455
|
}), M("span", null, R(_(n).video.addVideo), 1)]))], 4));
|
|
3449
3456
|
}
|
|
3450
|
-
}),
|
|
3451
|
-
section:
|
|
3452
|
-
title:
|
|
3453
|
-
paragraph:
|
|
3454
|
-
image:
|
|
3455
|
-
button:
|
|
3456
|
-
divider:
|
|
3457
|
-
video:
|
|
3458
|
-
social:
|
|
3459
|
-
menu:
|
|
3460
|
-
table:
|
|
3461
|
-
spacer:
|
|
3462
|
-
html:
|
|
3463
|
-
countdown:
|
|
3457
|
+
}), Ba = {
|
|
3458
|
+
section: ua,
|
|
3459
|
+
title: oa,
|
|
3460
|
+
paragraph: Vi,
|
|
3461
|
+
image: Oi,
|
|
3462
|
+
button: Ar,
|
|
3463
|
+
divider: ci,
|
|
3464
|
+
video: za,
|
|
3465
|
+
social: ba,
|
|
3466
|
+
menu: Mi,
|
|
3467
|
+
table: ka,
|
|
3468
|
+
spacer: Ca,
|
|
3469
|
+
html: mi,
|
|
3470
|
+
countdown: B(() => import("./CountdownBlock-rK055jpy.js"))
|
|
3464
3471
|
};
|
|
3465
|
-
function
|
|
3466
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } =
|
|
3472
|
+
function Va(e) {
|
|
3473
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = X(i), d = S(() => ae(ae(ae(rr(i), Sr(n.content.value.settings?.locale)), de(n.content.value.settings) === "rtl" ? {
|
|
3474
|
+
title: { textAlign: "right" },
|
|
3475
|
+
table: { textAlign: "right" }
|
|
3476
|
+
} : {}), r.blockDefaults ?? {}));
|
|
3467
3477
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
3468
|
-
let { resolvedTheme: f } =
|
|
3478
|
+
let { resolvedTheme: f } = Vn(S(() => n.state.uiTheme)), p = l(r.theme ?? {}), { themeStyles: m } = Un({
|
|
3469
3479
|
themeOverrides: p,
|
|
3470
3480
|
resolvedTheme: f,
|
|
3471
3481
|
extraStyles: () => ({
|
|
3472
3482
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
3473
3483
|
...e.themeExtraStyles?.()
|
|
3474
3484
|
})
|
|
3475
|
-
}), g =
|
|
3485
|
+
}), g = pn({
|
|
3476
3486
|
content: n.content,
|
|
3477
3487
|
setContent: (e, t) => n.setContent(e, t),
|
|
3478
3488
|
...e.historyOptions
|
|
3479
3489
|
});
|
|
3480
|
-
|
|
3481
|
-
let _ =
|
|
3490
|
+
bn(n, g);
|
|
3491
|
+
let _ = hn({
|
|
3482
3492
|
addBlock: n.addBlock,
|
|
3483
3493
|
removeBlock: n.removeBlock,
|
|
3484
3494
|
updateBlock: n.updateBlock,
|
|
3485
3495
|
selectBlock: n.selectBlock,
|
|
3486
3496
|
findBlockLocation: n.findBlockLocation,
|
|
3487
3497
|
blockDefaults: () => d.value
|
|
3488
|
-
}), v =
|
|
3498
|
+
}), v = vn(n), y = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? _n({
|
|
3489
3499
|
content: n.content,
|
|
3490
3500
|
isDirty: () => n.state.isDirty,
|
|
3491
3501
|
...e.autoSaveOptions
|
|
@@ -3493,30 +3503,30 @@ function Ba(e) {
|
|
|
3493
3503
|
y && (b = t(g.isNavigating, (e) => {
|
|
3494
3504
|
e ? y.pause() : y.resume();
|
|
3495
3505
|
}));
|
|
3496
|
-
let x =
|
|
3506
|
+
let x = Bn(n, {
|
|
3497
3507
|
t: s,
|
|
3498
3508
|
format: u
|
|
3499
|
-
}, r.customBlocks ?? []), C =
|
|
3500
|
-
if (C.allowCustomIgnored &&
|
|
3501
|
-
let e =
|
|
3502
|
-
e.length > 0 &&
|
|
3503
|
-
}
|
|
3504
|
-
let w =
|
|
3505
|
-
for (let e of w.unknown)
|
|
3506
|
-
let T =
|
|
3507
|
-
|
|
3509
|
+
}, r.customBlocks ?? []), C = Nt(r.colors);
|
|
3510
|
+
if (C.allowCustomIgnored && Z.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), C.invalidPresets.length > 0 && Z.warn(`config.colors.presets skipped invalid entries: ${C.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), C.allowCustom === !1) {
|
|
3511
|
+
let e = nr(C.presets, r.blockDefaults, r.templateDefaults);
|
|
3512
|
+
e.length > 0 && Z.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.`);
|
|
3513
|
+
}
|
|
3514
|
+
let w = er(r.templateSettings);
|
|
3515
|
+
for (let e of w.unknown) Z.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Qn.join(", ")}) — skipping it.`);
|
|
3516
|
+
let T = Wn();
|
|
3517
|
+
Yn(T, Ba);
|
|
3508
3518
|
let E = /* @__PURE__ */ new Set();
|
|
3509
3519
|
function D(e) {
|
|
3510
3520
|
for (let t of e) {
|
|
3511
|
-
T.registerCustom(t,
|
|
3512
|
-
for (let e of
|
|
3521
|
+
T.registerCustom(t, oi);
|
|
3522
|
+
for (let e of wr(t, C)) E.has(e.id) || (E.add(e.id), Z.warn(e.message));
|
|
3513
3523
|
}
|
|
3514
3524
|
}
|
|
3515
3525
|
r.customBlocks?.length && D(r.customBlocks);
|
|
3516
|
-
let O =
|
|
3526
|
+
let O = kn();
|
|
3517
3527
|
if (o() && h(O.dispose), e.containerEl) {
|
|
3518
3528
|
let t = e.containerEl;
|
|
3519
|
-
|
|
3529
|
+
K(document, "pointerdown", (e) => {
|
|
3520
3530
|
let n = t.value;
|
|
3521
3531
|
n && (e.composedPath?.() ?? []).includes(n) && O.claim();
|
|
3522
3532
|
}, { capture: !0 });
|
|
@@ -3530,7 +3540,7 @@ function Ba(e) {
|
|
|
3530
3540
|
y?.flush();
|
|
3531
3541
|
}
|
|
3532
3542
|
function A(t) {
|
|
3533
|
-
O.isActive() &&
|
|
3543
|
+
O.isActive() && Er(t, {
|
|
3534
3544
|
history: g,
|
|
3535
3545
|
selectBlock: (e) => n.selectBlock(e),
|
|
3536
3546
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -3542,31 +3552,31 @@ function Ba(e) {
|
|
|
3542
3552
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
3543
3553
|
});
|
|
3544
3554
|
}
|
|
3545
|
-
|
|
3555
|
+
K(document, "keydown", A);
|
|
3546
3556
|
let j = l(null);
|
|
3547
|
-
c(
|
|
3548
|
-
let M =
|
|
3549
|
-
c(
|
|
3550
|
-
let N = l(
|
|
3551
|
-
c(
|
|
3552
|
-
let P =
|
|
3557
|
+
c(_t, e.editorRoot ?? document), c(Ze, j), c(ut, i), c(J, n), c(Dt, g), c(ft, _), c(ht, v), c(dt, a), c(ct, m), c($e, f), c(St, d), c(Ye, r.locale), c(Tt, T), c(gt, r.customBlocks ?? []), c(Je, r.paletteBlocks), c(At, Xn(r.htmlBlockPreview)), c(Et, C), c(Xe, w.fields), c(Ct, Gn(n.content, T));
|
|
3558
|
+
let M = Se(r.mergeTags?.syntax);
|
|
3559
|
+
c(q, r.mergeTags?.tags ?? []), c(vt, M), c(it, r.mergeTags?.onRequest ?? null), c(qe, r.mergeTags?.autocomplete !== !1);
|
|
3560
|
+
let N = l(Fe(r.mergeTags?.tags ?? []));
|
|
3561
|
+
c(Ge, N);
|
|
3562
|
+
let P = jn({
|
|
3553
3563
|
resolvePreview: r.resolvePreview,
|
|
3554
3564
|
getContent: () => n.content.value,
|
|
3555
3565
|
isActive: () => n.state.previewMode
|
|
3556
3566
|
});
|
|
3557
|
-
c(
|
|
3567
|
+
c(et, P), c(at, r.resolvePreview);
|
|
3558
3568
|
let F = S(() => !(n.state.previewMode && P.isConfigured));
|
|
3559
|
-
c(
|
|
3560
|
-
let I =
|
|
3561
|
-
c(
|
|
3562
|
-
let L =
|
|
3569
|
+
c(wt, F);
|
|
3570
|
+
let I = Pn();
|
|
3571
|
+
c(rt, I), c(yt, l(!1)), c(st, l(!1)), c(Ke, r.logicTags?.tags ?? []), c(ot, r.logicTags?.pairs ?? []), c(tt, r.logicTags?.onRequest ?? null), c(Ot, Fn()), c(nt, r.onRequestMedia ?? null), c(pt, r.resolveImageUrl ? Mn(r.resolveImageUrl) : null), c(bt, r.displayConditions?.conditions ?? []), c(xt, r.displayConditions?.allowCustom ?? !1), c(mt, e.capabilities ?? {}), c(kt, x);
|
|
3572
|
+
let L = In(r.lint) ? null : Ln({
|
|
3563
3573
|
content: n.content,
|
|
3564
3574
|
options: r.lint ?? {},
|
|
3565
3575
|
updateBlock: n.updateBlock,
|
|
3566
3576
|
updateSettings: n.updateSettings,
|
|
3567
3577
|
removeBlock: n.removeBlock
|
|
3568
3578
|
});
|
|
3569
|
-
c(
|
|
3579
|
+
c(lt, L);
|
|
3570
3580
|
function R() {
|
|
3571
3581
|
b?.(), L?.destroy(), y?.destroy(), g.destroy();
|
|
3572
3582
|
}
|
|
@@ -3592,6 +3602,6 @@ function Ba(e) {
|
|
|
3592
3602
|
};
|
|
3593
3603
|
}
|
|
3594
3604
|
//#endregion
|
|
3595
|
-
export {
|
|
3605
|
+
export { dr as A, Rn as B, Hr as C, Nr as D, Fr as E, hr as F, Cn as G, En as H, mr as I, gn as J, xn as K, Qn as L, vr as M, _r as N, Ar as O, gr as P, Zn as R, qr as S, Ir as T, Tn as U, jn as V, wn as W, ln as Y, mi as _, ba as a, Zr as b, oa as c, Hi as d, Ui as f, gi as g, Oi as h, Ca as i, yr as j, Cr as k, ia as l, Mi as m, za as n, pa as o, Vi as p, yn as q, ka as r, ua as s, Va as t, Wi as u, ci as v, Vr as w, Yr as x, oi as y, zn as z };
|
|
3596
3606
|
|
|
3597
|
-
//# sourceMappingURL=useEditorCore-
|
|
3607
|
+
//# sourceMappingURL=useEditorCore-D4MytYB9.js.map
|