@templatical/editor 0.31.0 → 0.32.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-DYDtzTDd.js → AiChatSidebar-ftdKHSR-.js} +15 -15
- package/dist/{AiFeatureMenu-BJ882XCi.js → AiFeatureMenu-aNeCRlil.js} +7 -7
- package/dist/{BlockIssueBadge-D6y8vQpL.js → BlockIssueBadge-bTDu6W_2.js} +5 -5
- package/dist/{BlockPreviewCanvas-DQNxLy7u.js → BlockPreviewCanvas-BsOuOfzB.js} +20 -19
- package/dist/{CloudHeaderExtras-CqG3RaKw.js → CloudHeaderExtras-BNpFohqt.js} +5 -5
- package/dist/{CloudPanels-B6xrk7kN.js → CloudPanels-xoGWwqSH.js} +7 -7
- package/dist/{CollaboratorBar-by16gXQH.js → CollaboratorBar-mEqXkdEi.js} +4 -4
- package/dist/{ColorPicker-E5gqlCZE.js → ColorPicker-FL5Vb9bE.js} +7 -7
- package/dist/{CommentsPanel-B_kzvTHR.js → CommentsPanel-slfi74ng.js} +2 -2
- package/dist/{CommentsSidebar-gfzUX7cd.js → CommentsSidebar-Dea4spMl.js} +14 -14
- package/dist/{CountdownBlock-BgNK7fZY.js → CountdownBlock-DQTwaRxP.js} +3 -3
- package/dist/{CountdownToolbar-DU8UHx9A.js → CountdownToolbar-C7xwJoqh.js} +4 -4
- package/dist/{DesignReferenceSidebar-DgndMB4H.js → DesignReferenceSidebar-BtBd7bbz.js} +11 -11
- package/dist/{FieldRow-0-UbQR4a.js → FieldRow-BWt7ECqo.js} +1 -1
- package/dist/{IssuesPanel-DmJTb_SZ.js → IssuesPanel-Ci2H36L2.js} +8 -8
- package/dist/{LoadingTrack-5KBr5cE8.js → LoadingTrack-SQXoZVf2.js} +1 -1
- package/dist/{MergeTagModeToggle-CZnJ2Gz_.js → MergeTagModeToggle-Cdi_DmVw.js} +6 -6
- package/dist/{MergeTagSuggestion-DyUcY_9e.js → MergeTagSuggestion-CoCuzEmW.js} +4 -4
- package/dist/{ParagraphEditor-CnB4kXle.js → ParagraphEditor-DQEOFc0K.js} +26 -26
- package/dist/{RestoreVersionDialog-BpOphPiE.js → RestoreVersionDialog-CHwngBae.js} +5 -5
- package/dist/{RichTextEditorContent-ChPNgHQ_.js → RichTextEditorContent-C_9xi7dD.js} +8 -8
- package/dist/{SaveBlockDialog-CKw4Va6j.js → SaveBlockDialog-tZqZzPjW.js} +21 -21
- package/dist/SavedBlocksBrowserModal-Bdj3GOD_.js +322 -0
- package/dist/{SavedBlocksPanels-ChV8bOgM.js → SavedBlocksPanels-2sBxAH9w.js} +2 -2
- package/dist/{SavedBlocksPickBar-BbEeD5RB.js → SavedBlocksPickBar-DTjQBR00.js} +4 -4
- package/dist/{TemplateScoringPanel-De8BZpRU.js → TemplateScoringPanel-B6nHSrBD.js} +15 -15
- package/dist/{TestEmailModal-4d2pXeHU.js → TestEmailModal-DuHbzO37.js} +11 -11
- package/dist/{TestEmailPanel-DEgCesNP.js → TestEmailPanel-TpwP-eK_.js} +2 -2
- package/dist/{TitleEditor-89pmKLVY.js → TitleEditor-C0JQJu38.js} +12 -12
- package/dist/{TplModal-DswccJRJ.js → TplModal-BMGmhquu.js} +5 -5
- package/dist/VersionHistoryMenu-D2x6MMYx.js +157 -0
- package/dist/{VersionHistoryPanels-CFLHDH9P.js → VersionHistoryPanels-aGlUVEGF.js} +2 -2
- package/dist/{VersionPreviewBanner-DhG5RcRt.js → VersionPreviewBanner-61t3_Z-a.js} +3 -3
- package/dist/{blockTypeIcons-dpKs5GQc.js → blockTypeIcons-BsNup009.js} +2 -2
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-DZSrLNXK.js → ca-C0hfqt4U.js} +5 -0
- package/dist/cdn/chunks/{AiChatSidebar-DmYDRmvX.js → AiChatSidebar-CqWvtRwB.js} +9 -9
- package/dist/cdn/chunks/{AiChatSidebar-DmYDRmvX.js.map → AiChatSidebar-CqWvtRwB.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-C0Rt08qb.js → AiFeatureMenu-DoFrLcXJ.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-C0Rt08qb.js.map → AiFeatureMenu-DoFrLcXJ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BBog2CMy.js → BlockIssueBadge-B_mUH69a.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-BBog2CMy.js.map → BlockIssueBadge-B_mUH69a.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-DNBjBKBI.js → BlockPreviewCanvas-CSIxs7hr.js} +21 -20
- package/dist/cdn/chunks/BlockPreviewCanvas-CSIxs7hr.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-Ditfv7y9.js → CloudHeaderExtras-Dgtr7WaE.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-Ditfv7y9.js.map → CloudHeaderExtras-Dgtr7WaE.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-C4U5bJO6.js → CloudPanels-B91lUmof.js} +7 -7
- package/dist/cdn/chunks/{CloudPanels-C4U5bJO6.js.map → CloudPanels-B91lUmof.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-B79JR9NH.js → CollaboratorBar-CQwPWoFu.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-B79JR9NH.js.map → CollaboratorBar-CQwPWoFu.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-C-ZiwUV3.js → ColorPicker-CdrKX48J.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-C-ZiwUV3.js.map → ColorPicker-CdrKX48J.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-D1Ke8PbO.js → CommentsPanel-BJNgTmAA.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-D1Ke8PbO.js.map → CommentsPanel-BJNgTmAA.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-B-UyhIZN.js → CommentsSidebar-D6VIIPhB.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-B-UyhIZN.js.map → CommentsSidebar-D6VIIPhB.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CWeJBC0L.js → CountdownBlock-BRwXUvGU.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-CWeJBC0L.js.map → CountdownBlock-BRwXUvGU.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DyOHOu44.js → CountdownToolbar-CVaU5WG6.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DyOHOu44.js.map → CountdownToolbar-CVaU5WG6.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BCCX1FtP.js → DesignReferenceSidebar-BvOwE1kg.js} +7 -7
- package/dist/cdn/chunks/{DesignReferenceSidebar-BCCX1FtP.js.map → DesignReferenceSidebar-BvOwE1kg.js.map} +1 -1
- package/dist/cdn/chunks/{FieldRow-CbcpsxZ4.js → FieldRow-D9OJhYeb.js} +2 -2
- package/dist/cdn/chunks/{FieldRow-CbcpsxZ4.js.map → FieldRow-D9OJhYeb.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-3vD3ImHF.js → IssuesPanel-MJZxkScz.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-3vD3ImHF.js.map → IssuesPanel-MJZxkScz.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-Cz1sT0wP.js → LoadingTrack-Cm3TDKb3.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Cz1sT0wP.js.map → LoadingTrack-Cm3TDKb3.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BU0SDRow.js → MergeTagModeToggle-bNuN6PTV.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-BU0SDRow.js.map → MergeTagModeToggle-bNuN6PTV.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-B9vL0VaG.js → MergeTagSuggestion-t8Uj00Er.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-B9vL0VaG.js.map → MergeTagSuggestion-t8Uj00Er.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CSwIuvoF.js → ParagraphEditor-BU8tlFbL.js} +23 -23
- package/dist/cdn/chunks/{ParagraphEditor-CSwIuvoF.js.map → ParagraphEditor-BU8tlFbL.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-Bvg2WvJN.js → RestoreVersionDialog-vdRFfyy0.js} +5 -5
- package/dist/cdn/chunks/{RestoreVersionDialog-Bvg2WvJN.js.map → RestoreVersionDialog-vdRFfyy0.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DdkmEEpK.js → RichTextEditorContent-C1-5I8Df.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-DdkmEEpK.js.map → RichTextEditorContent-C1-5I8Df.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-D-QO3LuR.js → SaveBlockDialog-DWaeqcM8.js} +9 -9
- package/dist/cdn/chunks/{SaveBlockDialog-D-QO3LuR.js.map → SaveBlockDialog-DWaeqcM8.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BRdN56r7.js → SavedBlocksBrowserModal-qC7UhW74.js} +110 -111
- package/dist/cdn/chunks/SavedBlocksBrowserModal-qC7UhW74.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-D9GTlLgb.js → SavedBlocksPanels-BvtjtdsY.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-D9GTlLgb.js.map → SavedBlocksPanels-BvtjtdsY.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DSRcUeIo.js → SavedBlocksPickBar-CxXjF3RN.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar-DSRcUeIo.js.map → SavedBlocksPickBar-CxXjF3RN.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-Dy5oOVhB.js → TemplateScoringPanel-CroWaWqy.js} +50 -50
- package/dist/cdn/chunks/{TemplateScoringPanel-Dy5oOVhB.js.map → TemplateScoringPanel-CroWaWqy.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-B4L2lmIV.js → TestEmailModal-iWxAZRRq.js} +10 -10
- package/dist/cdn/chunks/{TestEmailModal-B4L2lmIV.js.map → TestEmailModal-iWxAZRRq.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-cTPgEf-D.js → TestEmailPanel-CGUtEuwp.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-cTPgEf-D.js.map → TestEmailPanel-CGUtEuwp.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BKjL2Zs1.js → TitleEditor-DvXUW2j-.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-BKjL2Zs1.js.map → TitleEditor-DvXUW2j-.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DxrgNmt9.js → TplModal-X-qNoLGZ.js} +5 -5
- package/dist/cdn/chunks/{TplModal-DxrgNmt9.js.map → TplModal-X-qNoLGZ.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryMenu-yKzwxf7n.js +150 -0
- package/dist/cdn/chunks/VersionHistoryMenu-yKzwxf7n.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-CxIFBJsz.js → VersionHistoryPanels--hQaanjH.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-CxIFBJsz.js.map → VersionHistoryPanels--hQaanjH.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CdsZvVYF.js → VersionPreviewBanner-DWU_SqMd.js} +4 -4
- package/dist/cdn/chunks/{VersionPreviewBanner-CdsZvVYF.js.map → VersionPreviewBanner-DWU_SqMd.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-DXPd_hd1.js → blockTypeIcons-ZEzEpCti.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-DXPd_hd1.js.map → blockTypeIcons-ZEzEpCti.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DZSrLNXK.js → ca-C0hfqt4U.js} +6 -1
- package/dist/cdn/chunks/ca-C0hfqt4U.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CITqEHEc.js → cloud-BP5-6__d.js} +4 -4
- package/dist/cdn/chunks/{cloud-CITqEHEc.js.map → cloud-BP5-6__d.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-DwIXvrb0.js → createCloudRuntime-DD6ppb71.js} +10 -10
- package/dist/cdn/chunks/{createCloudRuntime-DwIXvrb0.js.map → createCloudRuntime-DD6ppb71.js.map} +1 -1
- package/dist/{de-DbayqpK-.js → cdn/chunks/de-C6J2Iae8.js} +7 -0
- package/dist/cdn/chunks/de-C6J2Iae8.js.map +1 -0
- package/dist/cdn/chunks/{dist-CgR3inPR.js → dist-BW6Y49zE.js} +2 -2
- package/dist/cdn/chunks/{dist-CgR3inPR.js.map → dist-BW6Y49zE.js.map} +1 -1
- package/dist/cdn/chunks/{dist-El3fQnfk.js → dist-CAFTQ6Y2.js} +5 -5
- package/dist/cdn/chunks/{dist-El3fQnfk.js.map → dist-CAFTQ6Y2.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-D2vo-aQI.js → draggable-kbOhCgnk.js} +12 -13
- package/dist/cdn/chunks/{draggable-D2vo-aQI.js.map → draggable-kbOhCgnk.js.map} +1 -1
- package/dist/cdn/chunks/{en-l0ib5X0f.js → en-BaUYOQi8.js} +6 -1
- package/dist/cdn/chunks/en-BaUYOQi8.js.map +1 -0
- package/dist/cdn/chunks/en-mEKGL1PX.js +2 -0
- package/dist/cdn/chunks/{es-CMQ-5PJP.js → es-CKDYfJYn.js} +6 -1
- package/dist/cdn/chunks/es-CKDYfJYn.js.map +1 -0
- package/dist/cdn/chunks/{extensions-C87Z6_23.js → extensions-BUPHNpKD.js} +7 -7
- package/dist/cdn/chunks/{extensions-C87Z6_23.js.map → extensions-BUPHNpKD.js.map} +1 -1
- package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js +15 -0
- package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js.map +1 -0
- package/dist/{fr-DNXmZWAq.js → cdn/chunks/fr-L8DR73mK.js} +7 -0
- package/dist/cdn/chunks/fr-L8DR73mK.js.map +1 -0
- package/dist/cdn/chunks/{icons-ciivb5BS.js → icons-SP5Itd-A.js} +9 -9
- package/dist/cdn/chunks/icons-SP5Itd-A.js.map +1 -0
- package/dist/cdn/chunks/keys-BOn5i9jV.js +12 -0
- package/dist/cdn/chunks/keys-BOn5i9jV.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BPvKXNfO.js → liquid.browser-BypTT2oc.js} +4 -4
- package/dist/cdn/chunks/{liquid.browser-BPvKXNfO.js.map → liquid.browser-BypTT2oc.js.map} +1 -1
- package/dist/{nl-BylRRHYJ.js → cdn/chunks/nl-GDWeuX18.js} +7 -0
- package/dist/cdn/chunks/nl-GDWeuX18.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-DyCIgmqJ.js → preRenderCustomBlocks-LFB-e-0m.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-DyCIgmqJ.js.map → preRenderCustomBlocks-LFB-e-0m.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BVoJhpie.js → pt-BR-B1AVVhWj.js} +6 -1
- package/dist/cdn/chunks/pt-BR-B1AVVhWj.js.map +1 -0
- package/dist/cdn/chunks/{src-6J-yyZoD.js → src-BM3f9I7t.js} +268 -268
- package/dist/cdn/chunks/{src-6J-yyZoD.js.map → src-BM3f9I7t.js.map} +1 -1
- package/dist/cdn/chunks/{src-BD60gqPW.js → src-CLoCCDfs.js} +26 -26
- package/dist/cdn/chunks/{src-BD60gqPW.js.map → src-CLoCCDfs.js.map} +1 -1
- package/dist/cdn/chunks/{src-Bid3cmHa.js → src-Cxl-9O-L.js} +699 -684
- package/dist/cdn/chunks/src-Cxl-9O-L.js.map +1 -0
- package/dist/cdn/chunks/{src-Cf0ohOog.js → src-DtnvR_Hl.js} +19 -19
- package/dist/cdn/chunks/src-DtnvR_Hl.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-Ey0FpaX7.js → tiptap-Epe8m3Vo.js} +2636 -2629
- package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DrXxPV8V.js → useAliveFlag-CT9gjvO_.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DrXxPV8V.js.map → useAliveFlag-CT9gjvO_.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-D0AoLV0a.js → useCloudI18n-DbsLlCbZ.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-D0AoLV0a.js.map → useCloudI18n-DbsLlCbZ.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CTNB2Mkl.js → useEditorCore-ChlgO2GN.js} +556 -412
- package/dist/cdn/chunks/useEditorCore-ChlgO2GN.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-BlF1WPeu.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-BFGRBGts.js.map → useEditorRoot-BlF1WPeu.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DIhawILp.js → useI18n-BdxNNw6j.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DIhawILp.js.map → useI18n-BdxNNw6j.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-lWo7So18.js → useMergeTag-CI2WUNrR.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-lWo7So18.js.map → useMergeTag-CI2WUNrR.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-DkiTLnBm.js → usePopoverPosition-Dw1nTSNx.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-DkiTLnBm.js.map → usePopoverPosition-Dw1nTSNx.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-KcSAuXKz.js → useScrollToBlock-BMis3-PR.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-KcSAuXKz.js.map → useScrollToBlock-BMis3-PR.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1099 -1143
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-80E6ZGin.js → check-JK8Uacq0.js} +1 -1
- package/dist/{chevron-down-BmkLsn2c.js → chevron-down-a-fb_Ijn.js} +1 -1
- package/dist/{chevron-up-DJSAzlUU.js → chevron-up-x4l0et_Y.js} +1 -1
- package/dist/{circle-alert-BsCfZryY.js → circle-alert-CJDW5LZo.js} +1 -1
- package/dist/{clock-BcLIngSK.js → clock-BW6rXk2f.js} +1 -1
- package/dist/{cloud-DwJ8ebNl.js → cloud-BMzRKCbk.js} +3 -3
- package/dist/{createCloudRuntime-CdXQdl34.js → createCloudRuntime-zNcMjRgb.js} +8 -8
- package/dist/{createLucideIcon-eeetEgBb.js → createLucideIcon-Bvw1Zx56.js} +3 -3
- package/dist/{cdn/chunks/de-DbayqpK-.js → de-C6J2Iae8.js} +5 -2
- package/dist/{dist-BFcAowKZ.js → dist-BxFbxpgW.js} +5 -5
- package/dist/{dist-Do83S47T.js → dist-ByT5fgKq.js} +2 -2
- package/dist/{dist-CQ9T1yi-.js → dist-C1tsW_99.js} +2 -2
- package/dist/{dist-Cd0LvUlh.js → dist-CtF9STPS.js} +2 -2
- package/dist/{dist-CvW1nNzy.js → dist-CtMXAH7a.js} +2 -2
- package/dist/dist-D08oVYhr.js +5 -0
- package/dist/{dist-prgdllHG.js → dist-D7WY8VPq.js} +2 -2
- package/dist/{dist-D8MekYFl.js → dist-DC-3T0ED.js} +2 -2
- package/dist/{dist-BC1y_U2m.js → dist-DL9334yz.js} +1418 -1411
- package/dist/{dist-BkAVGSRr.js → dist-DkcA6epL.js} +7 -7
- package/dist/dist-DzdeVn-W.js +5 -0
- package/dist/{dist-CzVIVbSa.js → dist-PL6vP4SC.js} +61 -61
- package/dist/{dist-CuuPnIMy.js → dist-dNiknO7j.js} +4 -4
- package/dist/{dist-CWC5t5J3.js → dist-f7HXo6j6.js} +2 -2
- package/dist/{dist-BUpBA58N.js → dist-heatwAdo.js} +1 -1
- package/dist/{en-l0ib5X0f.js → en-BaUYOQi8.js} +5 -0
- package/dist/{es-CMQ-5PJP.js → es-CKDYfJYn.js} +5 -0
- package/dist/{extensions-BYImwYeO.js → extensions-kOYwOh72.js} +21 -21
- package/dist/formatAbsoluteDateTime-DMmop3C-.js +13 -0
- package/dist/{cdn/chunks/fr-DNXmZWAq.js → fr-L8DR73mK.js} +5 -2
- package/dist/{image-up-BfxY85ar.js → image-up-CuzFc1mu.js} +1 -1
- package/dist/{info-LX4QFBr6.js → info-DybAwcA3.js} +1 -1
- package/dist/keys-BOhFlHsv.js +10 -0
- package/dist/{liquid.browser-CJgDDvQz.js → liquid.browser-wPG0n4Cs.js} +3 -3
- package/dist/{loader-circle-Bwima0v8.js → loader-circle-t-SVgmJ3.js} +1 -1
- package/dist/{message-circle-Box-mf2k.js → message-circle-DtwKrlhN.js} +1 -1
- package/dist/{cdn/chunks/nl-BylRRHYJ.js → nl-GDWeuX18.js} +5 -2
- package/dist/{pencil-BM9gSq_J.js → pencil-2qhC-Y4q.js} +1 -1
- package/dist/{preRenderCustomBlocks-2KyBJocY.js → preRenderCustomBlocks-CSIF-HyJ.js} +1 -1
- package/dist/{pt-BR-BVoJhpie.js → pt-BR-B1AVVhWj.js} +5 -0
- package/dist/{refresh-cw-BuzFX0wH.js → refresh-cw-C8SBuPdg.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-Co_SPqAz.js → runtime-dom.esm-bundler-BuG03jBM.js} +3 -3
- package/dist/{scan-line-Duq1WXoG.js → scan-line-E7w4yQyv.js} +1 -1
- package/dist/{send-DZ4nOnIA.js → send-BoqJliF6.js} +1 -1
- package/dist/{shield-check-Cz4BRYdv.js → shield-check-D0dMaHtE.js} +1 -1
- package/dist/{sparkles-DP8RqOeL.js → sparkles-Dy2BJjiX.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1236 -1281
- package/dist/{text-align-start-D7tXhjUP.js → text-align-start-DrxjxvIy.js} +1 -1
- package/dist/{trash-2-BS7lZeyb.js → trash-rYMzzHZd.js} +2 -2
- package/dist/{triangle-alert-Cx4mQGjx.js → triangle-alert-DxnFj4-B.js} +1 -1
- package/dist/{upload-L8tLVM10.js → upload-DZu1adQz.js} +1 -1
- package/dist/{useAliveFlag-AFbwfHlJ.js → useAliveFlag-PVmp95MT.js} +1 -1
- package/dist/{useCloudI18n-BA69BpQ_.js → useCloudI18n-BlMajbKp.js} +2 -2
- package/dist/{useEditorCore-CtR46sbJ.js → useEditorCore-CwQYCSXO.js} +1212 -1067
- package/dist/{useEditorRoot-Cdo8Vhxa.js → useEditorRoot-C92q8uV-.js} +2 -2
- package/dist/{useI18n-B135ASaG.js → useI18n-Ce_BRzYv.js} +2 -2
- package/dist/{useMergeTag-Cx36rtrt.js → useMergeTag-CrXJ49lr.js} +3 -3
- package/dist/{usePopoverPosition-DAOHr_iM.js → usePopoverPosition-CPk7Twye.js} +2 -2
- package/dist/{useScrollToBlock-tndC8vKo.js → useScrollToBlock-DvpMfWs2.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-BhOUdXMi.js → vue.runtime.esm-bundler-D9JUcKrV.js} +4 -4
- package/dist/{x-ChIQ7HwK.js → x-DJOd1hS4.js} +1 -1
- package/package.json +23 -23
- package/dist/SavedBlocksBrowserModal-SST-7EMK.js +0 -323
- package/dist/VersionHistoryMenu-DBxSJR1k.js +0 -155
- package/dist/cdn/chunks/BlockPreviewCanvas-DNBjBKBI.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-BRdN56r7.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryMenu-CMqZFUHE.js +0 -148
- package/dist/cdn/chunks/VersionHistoryMenu-CMqZFUHE.js.map +0 -1
- package/dist/cdn/chunks/ca-DZSrLNXK.js.map +0 -1
- package/dist/cdn/chunks/de-DbayqpK-.js.map +0 -1
- package/dist/cdn/chunks/en-BzFt4b80.js +0 -2
- package/dist/cdn/chunks/en-l0ib5X0f.js.map +0 -1
- package/dist/cdn/chunks/es-CMQ-5PJP.js.map +0 -1
- package/dist/cdn/chunks/fr-DNXmZWAq.js.map +0 -1
- package/dist/cdn/chunks/icons-ciivb5BS.js.map +0 -1
- package/dist/cdn/chunks/keys-BJ770Mwm.js +0 -12
- package/dist/cdn/chunks/keys-BJ770Mwm.js.map +0 -1
- package/dist/cdn/chunks/nl-BylRRHYJ.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BVoJhpie.js.map +0 -1
- package/dist/cdn/chunks/src-Bid3cmHa.js.map +0 -1
- package/dist/cdn/chunks/src-Cf0ohOog.js.map +0 -1
- package/dist/cdn/chunks/tiptap-Ey0FpaX7.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CTNB2Mkl.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-BFGRBGts.js +0 -10
- package/dist/dist-BQqIUwvB.js +0 -5
- package/dist/dist-waDcdb1l.js +0 -5
- package/dist/keys-BJtoezGU.js +0 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as e } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import { g as t } from "./keys-
|
|
1
|
+
import { S as e } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
+
import { g as t } from "./keys-BOhFlHsv.js";
|
|
3
3
|
//#region src/composables/useEditorRoot.ts
|
|
4
4
|
function n() {
|
|
5
5
|
return e(t, document) ?? document;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as e, S as t } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import { V as n } from "./keys-
|
|
1
|
+
import { G as e, S as t } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
+
import { V as n } from "./keys-BOhFlHsv.js";
|
|
3
3
|
//#region src/composables/useI18n.ts
|
|
4
4
|
function r(r) {
|
|
5
5
|
let i = r ?? t(n, null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as e, X as t } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import {
|
|
3
|
-
import { D as a, E as o, M as s, T as c, k as l } from "./keys-
|
|
1
|
+
import { S as e, X as t } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
+
import { I as n, k as r, o as i } from "./dist-PL6vP4SC.js";
|
|
3
|
+
import { D as a, E as o, M as s, T as c, k as l } from "./keys-BOhFlHsv.js";
|
|
4
4
|
//#region src/composables/useMergeTag.ts
|
|
5
5
|
function u() {
|
|
6
6
|
let u = e(c, []), d = e(l, i.liquid), f = e(s, null), p = e(o, !0), m = e(a, null), h = t(!1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as e, X as t } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import { P as n } from "./keys-
|
|
1
|
+
import { S as e, X as t } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
+
import { P as n } from "./keys-BOhFlHsv.js";
|
|
3
3
|
//#region src/utils/resolveColorsConfig.ts
|
|
4
4
|
var r = {
|
|
5
5
|
presets: [],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as e } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import { t } from "./createLucideIcon-
|
|
3
|
-
import { t as n } from "./useEditorRoot-
|
|
1
|
+
import { T as e } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
+
import { t } from "./createLucideIcon-Bvw1Zx56.js";
|
|
3
|
+
import { t as n } from "./useEditorRoot-C92q8uV-.js";
|
|
4
4
|
var r = t("list-checks", [
|
|
5
5
|
["path", {
|
|
6
6
|
d: "M13 5h8",
|
|
@@ -974,7 +974,7 @@ function Sn(e, n, i = t) {
|
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
976
|
let w = x ? Array(e.length).fill(vn) : vn, T = (e) => {
|
|
977
|
-
if (
|
|
977
|
+
if (g.flags & 1 && (g.dirty || e)) {
|
|
978
978
|
if (n) {
|
|
979
979
|
let t = g.run();
|
|
980
980
|
if (e || o || b || (x ? t.some((e, t) => O(e, w[t])) : O(t, w))) {
|
|
@@ -2781,7 +2781,7 @@ function po(e, t, n, r, i) {
|
|
|
2781
2781
|
V("Missing required prop: \"" + e + "\"");
|
|
2782
2782
|
return;
|
|
2783
2783
|
}
|
|
2784
|
-
if (
|
|
2784
|
+
if (t != null || o) {
|
|
2785
2785
|
if (a != null && a !== !0 && !c) {
|
|
2786
2786
|
let n = !1, r = d(a) ? a : [a], i = [];
|
|
2787
2787
|
for (let e = 0; e < r.length && !n; e++) {
|
|
@@ -3105,8 +3105,8 @@ function Fo(e, i) {
|
|
|
3105
3105
|
m & 8 ? (u & 16 && ye(l, i, a), d !== l && p(n, d)) : u & 16 ? m & 16 ? me(l, d, n, r, i, a, o, s, c) : ye(l, i, a, !0) : (u & 8 && p(n, ""), m & 16 && E(d, n, r, i, a, o, s, c));
|
|
3106
3106
|
}, pe = (e, t, r, i, a, o, s, c, l) => {
|
|
3107
3107
|
e ||= n, t ||= n;
|
|
3108
|
-
let u = e.length, d = t.length, f = Math.min(u, d), p;
|
|
3109
|
-
for (
|
|
3108
|
+
let u = e.length, d = t.length, f = Math.min(u, d), p = 0;
|
|
3109
|
+
for (; p < f; p++) {
|
|
3110
3110
|
let n = t[p] = l ? _s(t[p]) : gs(t[p]);
|
|
3111
3111
|
v(e[p], n, r, null, a, o, s, c, l);
|
|
3112
3112
|
}
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@templatical/editor",
|
|
3
3
|
"description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"bugs": "https://github.com/templatical/sdk/issues",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@lucide/vue": "^1.
|
|
8
|
-
"@templatical/core": "0.
|
|
9
|
-
"@templatical/quality": "0.
|
|
10
|
-
"@templatical/types": "0.
|
|
11
|
-
"@tiptap/core": "^3.31.
|
|
12
|
-
"@tiptap/extension-color": "^3.31.
|
|
13
|
-
"@tiptap/extension-font-family": "^3.31.
|
|
14
|
-
"@tiptap/extension-highlight": "^3.31.
|
|
15
|
-
"@tiptap/extension-link": "^3.31.
|
|
16
|
-
"@tiptap/extension-subscript": "^3.31.
|
|
17
|
-
"@tiptap/extension-superscript": "^3.31.
|
|
18
|
-
"@tiptap/extension-text-align": "^3.31.
|
|
19
|
-
"@tiptap/extension-text-style": "^3.31.
|
|
20
|
-
"@tiptap/extension-underline": "^3.31.
|
|
21
|
-
"@tiptap/starter-kit": "^3.31.
|
|
22
|
-
"@tiptap/suggestion": "^3.31.
|
|
23
|
-
"@tiptap/vue-3": "^3.31.
|
|
7
|
+
"@lucide/vue": "^1.41.0",
|
|
8
|
+
"@templatical/core": "0.32.0",
|
|
9
|
+
"@templatical/quality": "0.32.0",
|
|
10
|
+
"@templatical/types": "0.32.0",
|
|
11
|
+
"@tiptap/core": "^3.31.3",
|
|
12
|
+
"@tiptap/extension-color": "^3.31.3",
|
|
13
|
+
"@tiptap/extension-font-family": "^3.31.3",
|
|
14
|
+
"@tiptap/extension-highlight": "^3.31.3",
|
|
15
|
+
"@tiptap/extension-link": "^3.31.3",
|
|
16
|
+
"@tiptap/extension-subscript": "^3.31.3",
|
|
17
|
+
"@tiptap/extension-superscript": "^3.31.3",
|
|
18
|
+
"@tiptap/extension-text-align": "^3.31.3",
|
|
19
|
+
"@tiptap/extension-text-style": "^3.31.3",
|
|
20
|
+
"@tiptap/extension-underline": "^3.31.3",
|
|
21
|
+
"@tiptap/starter-kit": "^3.31.3",
|
|
22
|
+
"@tiptap/suggestion": "^3.31.3",
|
|
23
|
+
"@tiptap/vue-3": "^3.31.3",
|
|
24
24
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
25
25
|
"@vue/test-utils": "^2.5.0",
|
|
26
26
|
"@vueuse/core": "^14.4.0",
|
|
27
27
|
"es-module-lexer": "^2.3.2",
|
|
28
|
-
"happy-dom": "^20.
|
|
28
|
+
"happy-dom": "^20.14.0",
|
|
29
29
|
"jsdom": "30.0.1",
|
|
30
30
|
"liquidjs": "^10.29.0",
|
|
31
31
|
"tailwindcss": "^4.3.3",
|
|
32
32
|
"typescript": "^6.0.3",
|
|
33
33
|
"vanilla-colorful": "^0.7.2",
|
|
34
34
|
"vite": "^8.2.2",
|
|
35
|
-
"vitest": "^
|
|
35
|
+
"vitest": "^5.0.0",
|
|
36
36
|
"vue": "^3.5.42",
|
|
37
37
|
"vue-draggable-plus": "^0.6.1",
|
|
38
38
|
"vue-tsc": "^3.3.11"
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"license": "FSL-1.1-MIT",
|
|
64
64
|
"module": "./dist/templatical-editor.js",
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@templatical/media-library": "0.
|
|
67
|
-
"@templatical/quality": "0.
|
|
68
|
-
"@templatical/renderer": "0.
|
|
66
|
+
"@templatical/media-library": "0.32.0",
|
|
67
|
+
"@templatical/quality": "0.32.0",
|
|
68
|
+
"@templatical/renderer": "0.32.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependenciesMeta": {
|
|
71
71
|
"@templatical/renderer": {
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import { B as e, Dt as t, L as n, Ot as r, P as i, T as a, X as o, _ as ee, c as s, d as c, g as l, j as u, k as d, kt as f, l as p, r as m, rt as h, s as g, u as _, v, z as te } from "./vue.runtime.esm-bundler-BhOUdXMi.js";
|
|
2
|
-
import { a as y, c as b, i as x, s as S } from "./runtime-dom.esm-bundler-Co_SPqAz.js";
|
|
3
|
-
import "./useEditorCore-CtR46sbJ.js";
|
|
4
|
-
import { L as ne, W as C, h as re } from "./keys-BJtoezGU.js";
|
|
5
|
-
import { t as ie } from "./useI18n-B135ASaG.js";
|
|
6
|
-
import { n as ae, r as w, t as T } from "./blockTypeIcons-dpKs5GQc.js";
|
|
7
|
-
import { t as oe } from "./pencil-BM9gSq_J.js";
|
|
8
|
-
import { t as se } from "./trash-2-BS7lZeyb.js";
|
|
9
|
-
import { t as ce } from "./x-ChIQ7HwK.js";
|
|
10
|
-
import { v as le } from "./styleConstants-C_YAPdQS.js";
|
|
11
|
-
import { t as ue } from "./formatRelativeTime-CtUU-QZ8.js";
|
|
12
|
-
import { t as de } from "./TplModal-DswccJRJ.js";
|
|
13
|
-
//#region src/components/SavedBlocksBrowserModal.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
-
var fe = {
|
|
15
|
-
role: "dialog",
|
|
16
|
-
"aria-modal": "true",
|
|
17
|
-
"data-testid": "saved-blocks-browser",
|
|
18
|
-
"aria-labelledby": "tpl-saved-blocks-browser-title",
|
|
19
|
-
class: "tpl-scale-in tpl:flex tpl:max-h-[90%] tpl:w-[1000px] tpl:max-w-full tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)]",
|
|
20
|
-
style: {
|
|
21
|
-
"background-color": "var(--tpl-bg-elevated)",
|
|
22
|
-
"box-shadow": "var(--tpl-shadow-xl)"
|
|
23
|
-
}
|
|
24
|
-
}, pe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, me = {
|
|
25
|
-
id: "tpl-saved-blocks-browser-title",
|
|
26
|
-
class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
27
|
-
}, he = ["aria-label"], ge = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, _e = { class: "tpl:flex tpl:w-[300px] tpl:shrink-0 tpl:flex-col tpl:overflow-hidden" }, ve = { class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:px-4 tpl:pt-4 tpl:pb-3" }, ye = { class: "tpl:relative" }, be = ["placeholder", "disabled"], xe = ["aria-label"], Se = { value: "" }, Ce = ["value"], we = { id: "tpl-saved-block-browser-categories" }, Te = ["value"], E = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:px-4 tpl:pb-4" }, D = ["aria-label"], O = {
|
|
28
|
-
key: 1,
|
|
29
|
-
class: "tpl:flex tpl:flex-col tpl:gap-1"
|
|
30
|
-
}, Ee = ["onFocusout"], De = ["aria-label", "onKeydown"], Oe = [
|
|
31
|
-
"aria-label",
|
|
32
|
-
"placeholder",
|
|
33
|
-
"onKeydown"
|
|
34
|
-
], ke = ["aria-pressed", "onClick"], Ae = { class: "tpl:flex tpl:items-center tpl:gap-2" }, je = { class: "tpl:flex-1 tpl:truncate tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Me = { class: "tpl:shrink-0 tpl:rounded-full tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]" }, Ne = {
|
|
35
|
-
key: 0,
|
|
36
|
-
class: "tpl:mt-1 tpl:flex tpl:items-center"
|
|
37
|
-
}, Pe = {
|
|
38
|
-
"data-testid": "saved-block-category",
|
|
39
|
-
class: "tpl:max-w-full tpl:truncate tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]"
|
|
40
|
-
}, Fe = { class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1" }, Ie = {
|
|
41
|
-
key: 0,
|
|
42
|
-
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
43
|
-
}, Le = ["title"], Re = ["aria-label", "onClick"], ze = [
|
|
44
|
-
"aria-label",
|
|
45
|
-
"title",
|
|
46
|
-
"onClick"
|
|
47
|
-
], Be = [
|
|
48
|
-
"aria-label",
|
|
49
|
-
"title",
|
|
50
|
-
"onClick"
|
|
51
|
-
], Ve = {
|
|
52
|
-
key: 2,
|
|
53
|
-
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
|
|
54
|
-
}, He = {
|
|
55
|
-
key: 0,
|
|
56
|
-
class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
57
|
-
}, Ue = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, We = { class: "tpl:mt-1 tpl:max-w-[220px] tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Ge = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, Ke = {
|
|
58
|
-
key: 0,
|
|
59
|
-
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
|
|
60
|
-
}, qe = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Je = {
|
|
61
|
-
key: 1,
|
|
62
|
-
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
|
|
63
|
-
}, Ye = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Xe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, Ze = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Qe = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, $e = ["value"], k = { class: "tpl:flex tpl:gap-2" }, et = ["disabled"], A = /* @__PURE__ */ v({
|
|
64
|
-
__name: "SavedBlocksBrowserModal",
|
|
65
|
-
props: { visible: { type: Boolean } },
|
|
66
|
-
emits: ["close", "insert"],
|
|
67
|
-
setup(v, { emit: A }) {
|
|
68
|
-
let tt = v, j = A, nt = ee(() => import("./BlockPreviewCanvas-DQNxLy7u.js").then((e) => e.n)), { t: M, format: N } = ie(), P = C(ne, "SavedBlocksBrowserModal"), F = C(re, "SavedBlocksBrowserModal"), I = o(""), L = o(""), R = o(null), z = o(null), B = o(null), V = o(""), H = o(""), U = o(null), W = o("end"), G = g(() => {
|
|
69
|
-
let e = I.value.trim().toLowerCase(), t = L.value;
|
|
70
|
-
return P.savedBlocks.value.filter((n) => !(e && !n.name.toLowerCase().includes(e) || t && n.category !== t));
|
|
71
|
-
}), K = g(() => P.isLoading.value && P.savedBlocks.value.length === 0), rt = g(() => I.value.trim().length > 0 || L.value !== ""), q = g(() => R.value ? P.savedBlocks.value.find((e) => e.id === R.value) ?? null : null), it = g(() => {
|
|
72
|
-
let e = [{
|
|
73
|
-
value: "beginning",
|
|
74
|
-
label: M.savedBlocks.insertAtBeginning
|
|
75
|
-
}], t = F.content.value.blocks;
|
|
76
|
-
for (let n = 0; n < t.length; n++) {
|
|
77
|
-
let r = t[n], i = r.type, a = M.blocks[i] ?? r.type;
|
|
78
|
-
e.push({
|
|
79
|
-
value: r.id,
|
|
80
|
-
label: N(M.savedBlocks.insertAfterBlock, { block: `${a} ${n + 1}` })
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
return e.push({
|
|
84
|
-
value: "end",
|
|
85
|
-
label: M.savedBlocks.insertAtEnd
|
|
86
|
-
}), e;
|
|
87
|
-
}), at = g(() => {
|
|
88
|
-
if (W.value === "end") return;
|
|
89
|
-
if (W.value === "beginning") return 0;
|
|
90
|
-
let e = F.content.value.blocks.findIndex((e) => e.id === W.value);
|
|
91
|
-
if (e !== -1) return e + 1;
|
|
92
|
-
});
|
|
93
|
-
n(() => tt.visible, (e) => {
|
|
94
|
-
if (e) {
|
|
95
|
-
I.value = "", L.value = "", R.value = null, z.value = null, B.value = null;
|
|
96
|
-
let e = F.state.selectedBlockId;
|
|
97
|
-
if (e) {
|
|
98
|
-
let t = F.content.value.blocks.findIndex((t) => t.id === e);
|
|
99
|
-
W.value = t === -1 ? "end" : e;
|
|
100
|
-
} else W.value = "end";
|
|
101
|
-
}
|
|
102
|
-
}, { immediate: !0 });
|
|
103
|
-
function ot(e) {
|
|
104
|
-
let t = [], n = /* @__PURE__ */ new Set();
|
|
105
|
-
for (let r of e.content) if (!n.has(r.type) && T[r.type] && (n.add(r.type), t.push({
|
|
106
|
-
type: r.type,
|
|
107
|
-
icon: T[r.type]
|
|
108
|
-
})), t.length >= 5) break;
|
|
109
|
-
return t;
|
|
110
|
-
}
|
|
111
|
-
function J(e) {
|
|
112
|
-
let t = new Set(e.content.map((e) => e.type));
|
|
113
|
-
return Math.max(0, t.size - 5);
|
|
114
|
-
}
|
|
115
|
-
function Y(e) {
|
|
116
|
-
let t = e.updatedAt ?? e.createdAt;
|
|
117
|
-
return t ? ue(t, M.time, N) ?? "" : "";
|
|
118
|
-
}
|
|
119
|
-
function st(e) {
|
|
120
|
-
let t = e.updatedAt ?? e.createdAt;
|
|
121
|
-
if (!t) return "";
|
|
122
|
-
let n = new Date(t);
|
|
123
|
-
return Number.isNaN(n.getTime()) ? "" : n.toLocaleString();
|
|
124
|
-
}
|
|
125
|
-
async function ct(e) {
|
|
126
|
-
try {
|
|
127
|
-
await P.remove(e), R.value === e && (R.value = null);
|
|
128
|
-
} finally {
|
|
129
|
-
z.value = null;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
async function lt(e) {
|
|
133
|
-
P.canUpdateBlock(e) && (B.value = e.id, V.value = e.name, H.value = e.category ?? "", z.value = null, await a(), U.value?.focus(), U.value?.select());
|
|
134
|
-
}
|
|
135
|
-
function X() {
|
|
136
|
-
B.value = null, V.value = "", H.value = "";
|
|
137
|
-
}
|
|
138
|
-
async function Z(e) {
|
|
139
|
-
if (B.value !== e) return;
|
|
140
|
-
let t = V.value.trim(), n = H.value.trim(), r = P.savedBlocks.value.find((t) => t.id === e), i = {};
|
|
141
|
-
if (t && t !== r?.name && (i.name = t), n !== (r?.category ?? "") && (i.category = n), Object.keys(i).length === 0) {
|
|
142
|
-
X();
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
try {
|
|
146
|
-
await P.update(e, i);
|
|
147
|
-
} finally {
|
|
148
|
-
X();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
function ut(e, t) {
|
|
152
|
-
let n = e.currentTarget, r = e.relatedTarget;
|
|
153
|
-
r && n.contains(r) || Z(t);
|
|
154
|
-
}
|
|
155
|
-
function Q() {
|
|
156
|
-
q.value && j("insert", q.value, at.value);
|
|
157
|
-
}
|
|
158
|
-
function $() {
|
|
159
|
-
j("close");
|
|
160
|
-
}
|
|
161
|
-
function dt(e) {
|
|
162
|
-
B.value || (e.key === "Escape" && $(), e.key === "Enter" && q.value && (e.preventDefault(), Q()));
|
|
163
|
-
}
|
|
164
|
-
return (n, a) => (d(), p(de, {
|
|
165
|
-
visible: v.visible,
|
|
166
|
-
onClose: $,
|
|
167
|
-
onKeydown: dt
|
|
168
|
-
}, {
|
|
169
|
-
default: te(() => [s("div", fe, [
|
|
170
|
-
s("div", pe, [s("h3", me, f(h(M).savedBlocks.browse), 1), s("button", {
|
|
171
|
-
"aria-label": h(M).savedBlocks.close,
|
|
172
|
-
class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-1 tpl:transition-colors tpl:text-[var(--tpl-text-dim)]",
|
|
173
|
-
onClick: $
|
|
174
|
-
}, [l(h(ce), {
|
|
175
|
-
size: 16,
|
|
176
|
-
"stroke-width": 2
|
|
177
|
-
})], 8, he)]),
|
|
178
|
-
s("div", ge, [s("div", _e, [
|
|
179
|
-
s("div", ve, [s("div", ye, [l(h(ae), {
|
|
180
|
-
size: 14,
|
|
181
|
-
"stroke-width": 2,
|
|
182
|
-
class: "tpl:pointer-events-none tpl:absolute tpl:left-3 tpl:top-1/2 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]"
|
|
183
|
-
}), e(s("input", {
|
|
184
|
-
"onUpdate:modelValue": a[0] ||= (e) => I.value = e,
|
|
185
|
-
type: "text",
|
|
186
|
-
placeholder: h(M).savedBlocks.search,
|
|
187
|
-
disabled: K.value,
|
|
188
|
-
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:pl-9 tpl:pr-3 tpl:text-sm tpl:outline-none tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
189
|
-
}, null, 8, be), [[y, I.value]])]), h(P).categories.value.length > 0 ? e((d(), c("select", {
|
|
190
|
-
key: 0,
|
|
191
|
-
"onUpdate:modelValue": a[1] ||= (e) => L.value = e,
|
|
192
|
-
"data-testid": "saved-blocks-category-filter",
|
|
193
|
-
"aria-label": h(M).savedBlocks.filterByCategory,
|
|
194
|
-
class: "tpl:h-8 tpl:w-full tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
195
|
-
}, [s("option", Se, f(h(M).savedBlocks.allCategories), 1), (d(!0), c(m, null, u(h(P).categories.value, (e) => (d(), c("option", {
|
|
196
|
-
key: e,
|
|
197
|
-
value: e
|
|
198
|
-
}, f(e), 9, Ce))), 128))], 8, xe)), [[x, L.value]]) : _("", !0)]),
|
|
199
|
-
s("datalist", we, [(d(!0), c(m, null, u(h(P).categories.value, (e) => (d(), c("option", {
|
|
200
|
-
key: e,
|
|
201
|
-
value: e
|
|
202
|
-
}, null, 8, Te))), 128))]),
|
|
203
|
-
s("div", E, [K.value ? (d(), c("div", {
|
|
204
|
-
key: 0,
|
|
205
|
-
"data-testid": "saved-blocks-loading",
|
|
206
|
-
class: "tpl:flex tpl:flex-col tpl:gap-1",
|
|
207
|
-
role: "status",
|
|
208
|
-
"aria-busy": "true",
|
|
209
|
-
"aria-label": h(M).savedBlocks.loading
|
|
210
|
-
}, [(d(), c(m, null, u(3, (e) => s("div", {
|
|
211
|
-
key: e,
|
|
212
|
-
"aria-hidden": "true",
|
|
213
|
-
class: "tpl-saved-block-skeleton tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)]"
|
|
214
|
-
}, [...a[7] ||= [s("div", { class: "tpl:h-3 tpl:w-1/2 tpl:rounded tpl:bg-[var(--tpl-bg-hover)]" }, null, -1), s("div", { class: "tpl:mt-2 tpl:h-2.5 tpl:w-1/4 tpl:rounded tpl:bg-[var(--tpl-bg-hover)]" }, null, -1)]])), 64))], 8, D)) : G.value.length > 0 ? (d(), c("div", O, [(d(!0), c(m, null, u(G.value, (n) => (d(), c(m, { key: n.id }, [B.value === n.id ? (d(), c("div", {
|
|
215
|
-
key: 0,
|
|
216
|
-
class: "tpl:flex tpl:w-full tpl:flex-col tpl:gap-1 tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-primary)]",
|
|
217
|
-
style: { "background-color": "var(--tpl-primary-light)" },
|
|
218
|
-
onFocusout: (e) => ut(e, n.id)
|
|
219
|
-
}, [e(s("input", {
|
|
220
|
-
ref_for: !0,
|
|
221
|
-
ref: (e) => U.value = e,
|
|
222
|
-
"onUpdate:modelValue": a[2] ||= (e) => V.value = e,
|
|
223
|
-
type: "text",
|
|
224
|
-
"aria-label": h(M).savedBlocks.rename,
|
|
225
|
-
class: "tpl:h-7 tpl:w-full tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
226
|
-
onKeydown: [S(b((e) => Z(n.id), ["prevent", "stop"]), ["enter"]), a[3] ||= S(b((e) => X(), ["prevent", "stop"]), ["esc"])]
|
|
227
|
-
}, null, 40, De), [[y, V.value]]), e(s("input", {
|
|
228
|
-
"onUpdate:modelValue": a[4] ||= (e) => H.value = e,
|
|
229
|
-
type: "text",
|
|
230
|
-
"data-testid": "saved-blocks-edit-category",
|
|
231
|
-
"aria-label": h(M).savedBlocks.category,
|
|
232
|
-
placeholder: h(M).savedBlocks.categoryPlaceholder,
|
|
233
|
-
list: "tpl-saved-block-browser-categories",
|
|
234
|
-
class: "tpl:h-7 tpl:w-full tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
235
|
-
onKeydown: [S(b((e) => Z(n.id), ["prevent", "stop"]), ["enter"]), a[5] ||= S(b((e) => X(), ["prevent", "stop"]), ["esc"])]
|
|
236
|
-
}, null, 40, Oe), [[y, H.value]])], 40, Ee)) : (d(), c("button", {
|
|
237
|
-
key: 1,
|
|
238
|
-
type: "button",
|
|
239
|
-
"data-testid": "saved-block-card",
|
|
240
|
-
"aria-pressed": R.value === n.id,
|
|
241
|
-
class: "tpl:group/card tpl:w-full tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:bg-transparent tpl:px-3 tpl:py-2 tpl:text-left tpl:transition-all tpl:duration-[120ms]",
|
|
242
|
-
style: r({
|
|
243
|
-
borderColor: R.value === n.id ? "var(--tpl-primary)" : "var(--tpl-border)",
|
|
244
|
-
backgroundColor: R.value === n.id ? "var(--tpl-primary-light)" : "transparent"
|
|
245
|
-
}),
|
|
246
|
-
onClick: (e) => R.value = n.id
|
|
247
|
-
}, [
|
|
248
|
-
s("div", Ae, [s("span", je, f(n.name), 1), s("span", Me, f(h(N)(h(M).savedBlocks.blockCount, { count: n.content.length })), 1)]),
|
|
249
|
-
n.category ? (d(), c("div", Ne, [s("span", Pe, f(n.category), 1)])) : _("", !0),
|
|
250
|
-
s("div", Fe, [
|
|
251
|
-
(d(!0), c(m, null, u(ot(n), (e) => (d(), p(i(e.icon), {
|
|
252
|
-
key: e.type,
|
|
253
|
-
size: 14,
|
|
254
|
-
"stroke-width": 1.5,
|
|
255
|
-
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
256
|
-
}))), 128)),
|
|
257
|
-
J(n) > 0 ? (d(), c("span", Ie, " +" + f(J(n)), 1)) : _("", !0),
|
|
258
|
-
Y(n) ? (d(), c("span", {
|
|
259
|
-
key: 1,
|
|
260
|
-
"data-testid": "saved-block-updated",
|
|
261
|
-
class: "tpl:ml-1 tpl:truncate tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]",
|
|
262
|
-
title: st(n)
|
|
263
|
-
}, f(Y(n)), 9, Le)) : _("", !0),
|
|
264
|
-
z.value === n.id ? (d(), c("button", {
|
|
265
|
-
key: 2,
|
|
266
|
-
"aria-label": h(M).savedBlocks.deleteConfirm,
|
|
267
|
-
class: "tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-danger)]",
|
|
268
|
-
style: { "background-color": "transparent" },
|
|
269
|
-
onClick: b((e) => ct(n.id), ["stop"])
|
|
270
|
-
}, f(h(M).savedBlocks.deleteConfirm), 9, Re)) : (d(), c(m, { key: 3 }, [h(P).canUpdateBlock(n) ? (d(), c("button", {
|
|
271
|
-
key: 0,
|
|
272
|
-
class: "tpl-saved-block-rename-btn tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-dim)]",
|
|
273
|
-
"aria-label": h(M).savedBlocks.rename,
|
|
274
|
-
title: h(M).savedBlocks.rename,
|
|
275
|
-
onClick: b((e) => lt(n), ["stop"])
|
|
276
|
-
}, [l(h(oe), {
|
|
277
|
-
size: 12,
|
|
278
|
-
"stroke-width": 1.5
|
|
279
|
-
})], 8, ze)) : _("", !0), h(P).canDeleteBlock(n) ? (d(), c("button", {
|
|
280
|
-
key: 1,
|
|
281
|
-
class: t(["tpl-saved-block-delete-btn tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-dim)]", { "tpl:ml-auto": !h(P).canUpdateBlock(n) }]),
|
|
282
|
-
"aria-label": h(M).savedBlocks.delete,
|
|
283
|
-
title: h(M).savedBlocks.delete,
|
|
284
|
-
onClick: b((e) => z.value = n.id, ["stop"])
|
|
285
|
-
}, [l(h(se), {
|
|
286
|
-
size: 12,
|
|
287
|
-
"stroke-width": 1.5
|
|
288
|
-
})], 10, Be)) : _("", !0)], 64))
|
|
289
|
-
])
|
|
290
|
-
], 12, ke))], 64))), 128))])) : (d(), c("div", Ve, [l(h(w), {
|
|
291
|
-
size: 32,
|
|
292
|
-
"stroke-width": 1,
|
|
293
|
-
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
294
|
-
}), rt.value ? (d(), c("p", He, f(h(M).savedBlocks.noResults), 1)) : (d(), c(m, { key: 1 }, [s("p", Ue, f(h(M).savedBlocks.empty), 1), s("p", We, f(h(M).savedBlocks.emptyHint), 1)], 64))]))])
|
|
295
|
-
]), s("div", Ge, [q.value ? (d(), c("div", Ke, [s("div", qe, [l(h(nt), { blocks: q.value.content }, null, 8, ["blocks"])])])) : (d(), c("div", Je, [l(h(w), {
|
|
296
|
-
size: 32,
|
|
297
|
-
"stroke-width": 1,
|
|
298
|
-
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
299
|
-
}), s("p", Ye, f(h(M).savedBlocks.selectToPreview), 1)]))])]),
|
|
300
|
-
s("div", Xe, [s("div", Ze, [s("label", Qe, f(h(M).savedBlocks.insertPosition), 1), e(s("select", {
|
|
301
|
-
"onUpdate:modelValue": a[6] ||= (e) => W.value = e,
|
|
302
|
-
class: "tpl:h-7 tpl:max-w-[220px] tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
303
|
-
}, [(d(!0), c(m, null, u(it.value, (e) => (d(), c("option", {
|
|
304
|
-
key: e.value,
|
|
305
|
-
value: e.value
|
|
306
|
-
}, f(e.label), 9, $e))), 128))], 512), [[x, W.value]])]), s("div", k, [s("button", {
|
|
307
|
-
type: "button",
|
|
308
|
-
"data-testid": "saved-blocks-browser-close",
|
|
309
|
-
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]",
|
|
310
|
-
onClick: $
|
|
311
|
-
}, f(h(M).savedBlocks.close), 1), s("button", {
|
|
312
|
-
type: "button",
|
|
313
|
-
class: t(h(le)),
|
|
314
|
-
disabled: !q.value,
|
|
315
|
-
onClick: Q
|
|
316
|
-
}, f(h(M).savedBlocks.insert), 11, et)])])
|
|
317
|
-
])]),
|
|
318
|
-
_: 1
|
|
319
|
-
}, 8, ["visible"]));
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
//#endregion
|
|
323
|
-
export { A as default };
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { Dt as e, X as t, c as n, d as r, g as i, h as a, j as o, k as s, kt as c, r as l, rt as u, s as d, u as f, v as p, z as m } from "./vue.runtime.esm-bundler-BhOUdXMi.js";
|
|
2
|
-
import { c as h, t as g } from "./runtime-dom.esm-bundler-Co_SPqAz.js";
|
|
3
|
-
import { t as _ } from "./dist-CuuPnIMy.js";
|
|
4
|
-
import { t as v } from "./useI18n-B135ASaG.js";
|
|
5
|
-
import { t as y } from "./createLucideIcon-eeetEgBb.js";
|
|
6
|
-
import { t as b } from "./chevron-down-BmkLsn2c.js";
|
|
7
|
-
import { t as x } from "./clock-BcLIngSK.js";
|
|
8
|
-
import { t as S } from "./loader-circle-Bwima0v8.js";
|
|
9
|
-
import { t as C } from "./formatRelativeTime-CtUU-QZ8.js";
|
|
10
|
-
var w = y("chevron-left", [["path", {
|
|
11
|
-
d: "m15 18-6-6 6-6",
|
|
12
|
-
key: "1wnfg3"
|
|
13
|
-
}]]), T = y("chevron-right", [["path", {
|
|
14
|
-
d: "m9 18 6-6-6-6",
|
|
15
|
-
key: "mthhwq"
|
|
16
|
-
}]]), E = [
|
|
17
|
-
"disabled",
|
|
18
|
-
"title",
|
|
19
|
-
"aria-label"
|
|
20
|
-
], D = [
|
|
21
|
-
"aria-expanded",
|
|
22
|
-
"title",
|
|
23
|
-
"aria-label"
|
|
24
|
-
], O = {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
27
|
-
"data-testid": "version-history-dropdown"
|
|
28
|
-
}, k = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, A = {
|
|
29
|
-
key: 0,
|
|
30
|
-
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8",
|
|
31
|
-
role: "status",
|
|
32
|
-
"aria-busy": "true"
|
|
33
|
-
}, j = {
|
|
34
|
-
key: 1,
|
|
35
|
-
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]",
|
|
36
|
-
"data-testid": "version-history-empty"
|
|
37
|
-
}, M = {
|
|
38
|
-
key: 2,
|
|
39
|
-
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
40
|
-
}, N = [
|
|
41
|
-
"data-version-id",
|
|
42
|
-
"disabled",
|
|
43
|
-
"onClick"
|
|
44
|
-
], P = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, F = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, I = {
|
|
45
|
-
key: 0,
|
|
46
|
-
class: "tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-xs tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]"
|
|
47
|
-
}, L = {
|
|
48
|
-
key: 0,
|
|
49
|
-
class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
50
|
-
}, R = [
|
|
51
|
-
"disabled",
|
|
52
|
-
"title",
|
|
53
|
-
"aria-label"
|
|
54
|
-
], z = /* @__PURE__ */ p({
|
|
55
|
-
__name: "VersionHistoryMenu",
|
|
56
|
-
props: {
|
|
57
|
-
versions: {},
|
|
58
|
-
isLoading: { type: Boolean },
|
|
59
|
-
isRestoring: { type: Boolean },
|
|
60
|
-
previewingId: {}
|
|
61
|
-
},
|
|
62
|
-
emits: ["open", "navigate"],
|
|
63
|
-
setup(p, { emit: y }) {
|
|
64
|
-
let z = p, B = y, { t: V, format: H } = v(), U = t(!1), W = t(null), G = d(() => z.previewingId === null ? -1 : z.versions.findIndex((e) => e.id === z.previewingId)), K = d(() => G.value > 0 && !z.isRestoring && !z.isLoading), q = d(() => G.value < z.versions.length - 1 && z.versions.length > 0 && !z.isRestoring && !z.isLoading);
|
|
65
|
-
function J() {
|
|
66
|
-
K.value && B("navigate", z.versions[G.value - 1]);
|
|
67
|
-
}
|
|
68
|
-
function Y() {
|
|
69
|
-
q.value && B("navigate", z.versions[G.value + 1]);
|
|
70
|
-
}
|
|
71
|
-
function X() {
|
|
72
|
-
U.value = !U.value, U.value && B("open");
|
|
73
|
-
}
|
|
74
|
-
function Z(e) {
|
|
75
|
-
B("navigate", e), U.value = !1;
|
|
76
|
-
}
|
|
77
|
-
function Q(e) {
|
|
78
|
-
let t = C(e, V.time, H, 7);
|
|
79
|
-
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
80
|
-
month: "short",
|
|
81
|
-
day: "numeric",
|
|
82
|
-
hour: "2-digit",
|
|
83
|
-
minute: "2-digit"
|
|
84
|
-
}) : t;
|
|
85
|
-
}
|
|
86
|
-
return _(W, () => {
|
|
87
|
-
U.value = !1;
|
|
88
|
-
}), (t, d) => (s(), r("div", {
|
|
89
|
-
ref_key: "dropdownRef",
|
|
90
|
-
ref: W,
|
|
91
|
-
class: "tpl:relative tpl:flex tpl:items-center tpl:gap-0.5",
|
|
92
|
-
"data-testid": "version-history"
|
|
93
|
-
}, [
|
|
94
|
-
n("button", {
|
|
95
|
-
class: "tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]",
|
|
96
|
-
"data-testid": "version-history-older",
|
|
97
|
-
disabled: !q.value,
|
|
98
|
-
title: u(V).versionHistory.olderVersion,
|
|
99
|
-
"aria-label": u(V).versionHistory.olderVersion,
|
|
100
|
-
onClick: h(Y, ["stop"])
|
|
101
|
-
}, [i(u(w), {
|
|
102
|
-
size: 14,
|
|
103
|
-
"stroke-width": 2
|
|
104
|
-
})], 8, E),
|
|
105
|
-
n("button", {
|
|
106
|
-
class: "tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
107
|
-
"data-testid": "version-history-toggle",
|
|
108
|
-
"aria-expanded": U.value,
|
|
109
|
-
title: u(V).versionHistory.tooltip,
|
|
110
|
-
"aria-label": u(V).versionHistory.tooltip,
|
|
111
|
-
onClick: h(X, ["stop"])
|
|
112
|
-
}, [i(u(x), {
|
|
113
|
-
size: 16,
|
|
114
|
-
"stroke-width": 1.5
|
|
115
|
-
}), i(u(b), {
|
|
116
|
-
class: e(["tpl:transition-transform", { "tpl:rotate-180": U.value }]),
|
|
117
|
-
size: 10,
|
|
118
|
-
"stroke-width": 2
|
|
119
|
-
}, null, 8, ["class"])], 8, D),
|
|
120
|
-
i(g, { name: "tpl-dropdown" }, {
|
|
121
|
-
default: m(() => [U.value ? (s(), r("div", O, [n("div", k, c(u(V).versionHistory.dropdownTitle), 1), p.isLoading && p.versions.length === 0 ? (s(), r("div", A, [i(u(S), {
|
|
122
|
-
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
123
|
-
size: 20,
|
|
124
|
-
"stroke-width": 2
|
|
125
|
-
})])) : p.versions.length === 0 ? (s(), r("div", j, c(u(V).versionHistory.empty), 1)) : (s(), r("div", M, [(s(!0), r(l, null, o(p.versions, (t) => (s(), r("button", {
|
|
126
|
-
key: t.id,
|
|
127
|
-
class: e(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-l-2 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:hover:border-l-[var(--tpl-primary)] tpl:hover:bg-[var(--tpl-bg-hover)]", t.id === p.previewingId ? "tpl:border-l-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-active)]" : "tpl:border-l-transparent"]),
|
|
128
|
-
style: { "background-color": "transparent" },
|
|
129
|
-
"data-testid": "version-history-entry",
|
|
130
|
-
"data-version-id": t.id,
|
|
131
|
-
disabled: p.isRestoring,
|
|
132
|
-
onClick: (e) => Z(t)
|
|
133
|
-
}, [n("div", P, [n("div", F, [n("span", null, c(t.label ?? Q(t.createdAt)), 1), t.isAutomatic ? (s(), r("span", I, c(u(V).versionHistory.auto), 1)) : f("", !0)]), t.label || t.author?.name ? (s(), r("div", L, [
|
|
134
|
-
t.label ? (s(), r(l, { key: 0 }, [a(c(Q(t.createdAt)), 1)], 64)) : f("", !0),
|
|
135
|
-
t.label && t.author?.name ? (s(), r(l, { key: 1 }, [a(" · ")], 64)) : f("", !0),
|
|
136
|
-
t.author?.name ? (s(), r(l, { key: 2 }, [a(c(t.author.name), 1)], 64)) : f("", !0)
|
|
137
|
-
])) : f("", !0)])], 10, N))), 128))]))])) : f("", !0)]),
|
|
138
|
-
_: 1
|
|
139
|
-
}),
|
|
140
|
-
n("button", {
|
|
141
|
-
class: "tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]",
|
|
142
|
-
"data-testid": "version-history-newer",
|
|
143
|
-
disabled: !K.value,
|
|
144
|
-
title: u(V).versionHistory.newerVersion,
|
|
145
|
-
"aria-label": u(V).versionHistory.newerVersion,
|
|
146
|
-
onClick: h(J, ["stop"])
|
|
147
|
-
}, [i(u(T), {
|
|
148
|
-
size: 14,
|
|
149
|
-
"stroke-width": 2
|
|
150
|
-
})], 8, R)
|
|
151
|
-
], 512));
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
//#endregion
|
|
155
|
-
export { z as default };
|