@templatical/editor 0.52.0 → 0.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-Cm11CsKH.js → AiAltTextPopover-DawbUywc.js} +13 -13
- package/dist/{AiAltTextReview-DE8t8Rud.js → AiAltTextReview-9ySsXOTU.js} +22 -22
- package/dist/{AiChatPanel-7ftS7d40.js → AiChatPanel-CupPhmsN.js} +137 -137
- package/dist/{AiPanels-CxGp6klr.js → AiPanels-DqT4PgQ0.js} +4 -4
- package/dist/{AiRewriteMenu-DNI-5CUj.js → AiRewriteMenu-28agTycW.js} +62 -62
- package/dist/BlockIssueBadge-BxpDy3u-.js +33 -0
- package/dist/{BlockPreviewCanvas-Df9iz7sK.js → BlockPreviewCanvas-B-4bmJ3t.js} +23 -23
- package/dist/{CloudHeaderExtras-CsgyNNV1.js → CloudHeaderExtras-QI82yF54.js} +3 -3
- package/dist/{CloudPanels-BDV4XQ_l.js → CloudPanels-BKJaLkUN.js} +50 -50
- package/dist/{CollaborationNotices-JQ3vQoqO.js → CollaborationNotices-CTw4JThq.js} +11 -11
- package/dist/{CollaboratorBar-EeqqWcX6.js → CollaboratorBar-CXQqN3VP.js} +15 -15
- package/dist/{CommentsPanel-BuftXc0U.js → CommentsPanel-DwwFuh1h.js} +2 -2
- package/dist/CommentsSidebar-9ZfiC2DO.js +500 -0
- package/dist/{CountdownBlock-BT3ZTH1F.js → CountdownBlock-CU2yTWtF.js} +20 -20
- package/dist/{CountdownToolbar-CrL4WKy9.js → CountdownToolbar-BqoYzf_6.js} +53 -53
- package/dist/IssuesPanel-4ykrf1ax.js +359 -0
- package/dist/{LoadingTrack-DZA5AoP9.js → LoadingTrack-DM4g6j7b.js} +1 -1
- package/dist/{LogicTagInsertButton-CSD9cfJB.js → LogicTagInsertButton-CfscnwCn.js} +234 -234
- package/dist/{MediaEditModal-DQl5w44r.js → MediaEditModal-Dy08GEwE.js} +446 -446
- package/dist/{MediaPanels-BFWYuJot.js → MediaPanels-BgEp7iCp.js} +2 -2
- package/dist/{MergeTagInput-DE7kWwXx.js → MergeTagInput-B9dtUthD.js} +11 -11
- package/dist/{MergeTagModeToggle-DvD0ne7N.js → MergeTagModeToggle-DxujhYJ4.js} +30 -30
- package/dist/{MergeTagTextarea-DVPQkiYY.js → MergeTagTextarea-CPFEjJZd.js} +11 -11
- package/dist/{ParagraphEditor-D-nqs82g.js → ParagraphEditor-CWXfurGh.js} +201 -201
- package/dist/{RestoreVersionDialog-DqUPsLB9.js → RestoreVersionDialog-C4s_JYCx.js} +14 -14
- package/dist/{RichTextEditorContent-Xq9D0Zs3.js → RichTextEditorContent-o6HmE8GR.js} +40 -39
- package/dist/{SaveBlockDialog-DAPv70p4.js → SaveBlockDialog-CWLrly6l.js} +56 -56
- package/dist/SavedBlocksBrowserModal-CE8n4EBS.js +359 -0
- package/dist/{SavedBlocksPanels-ChbL9v9x.js → SavedBlocksPanels-BE1N9rNZ.js} +6 -6
- package/dist/{SavedBlocksPickBar-hRaiLNdu.js → SavedBlocksPickBar-Dwl94xhP.js} +12 -12
- package/dist/{TemplateSettings-D0XcH32O.js → TemplateSettings-CS0f1Ues.js} +74 -74
- package/dist/{TestEmailModal-Cb5t0yB2.js → TestEmailModal-DBD0X5nV.js} +52 -52
- package/dist/{TestEmailPanel-COJQa2A9.js → TestEmailPanel-DaFjP9QK.js} +2 -2
- package/dist/{TitleEditor-BYk_9SpQ.js → TitleEditor-DSqtle77.js} +75 -75
- package/dist/{ToggleSwitch-poGWbduy.js → ToggleSwitch-JykPyD_8.js} +4 -4
- package/dist/{Toolbar-Dku_pZni.js → Toolbar-BZPFfKrf.js} +913 -913
- package/dist/{TplModal-9IndEYk5.js → TplModal-DLMssVlt.js} +15 -15
- package/dist/{VersionHistoryMenu-BG5qayvg.js → VersionHistoryMenu-BkbYUs0Q.js} +35 -35
- package/dist/{VersionHistoryPanels-hPg7Q5-f.js → VersionHistoryPanels-DP7HaYWv.js} +4 -4
- package/dist/{VersionPreviewBanner-CSs7zum_.js → VersionPreviewBanner-DECaBwLq.js} +9 -9
- package/dist/{WrapperBlock-DwjK_IdJ.js → WrapperBlock-BsJv_Fiw.js} +16 -16
- package/dist/{blockTypeIcons-yt7SLzub.js → blockTypeIcons-BHjlPnPf.js} +23 -22
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiAltTextPopover-DjMoJCgU.js → AiAltTextPopover-SEEjkd-I.js} +21 -21
- package/dist/cdn/chunks/{AiAltTextPopover-DjMoJCgU.js.map → AiAltTextPopover-SEEjkd-I.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-BafAtBoA.js → AiAltTextReview-BGLLSKLm.js} +41 -41
- package/dist/cdn/chunks/{AiAltTextReview-BafAtBoA.js.map → AiAltTextReview-BGLLSKLm.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-DXeZgc7D.js → AiChatPanel-DKDAaBNi.js} +127 -127
- package/dist/cdn/chunks/{AiChatPanel-DXeZgc7D.js.map → AiChatPanel-DKDAaBNi.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js → AiPanels-0wBarZSH.js} +3 -3
- package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js.map → AiPanels-0wBarZSH.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-4F6vwhJ5.js → AiRewriteMenu-qf-cfEpy.js} +43 -43
- package/dist/cdn/chunks/{AiRewriteMenu-4F6vwhJ5.js.map → AiRewriteMenu-qf-cfEpy.js.map} +1 -1
- package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js +34 -0
- package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-Ny1X_mee.js → BlockPreviewCanvas-DGBh6mqe.js} +20 -20
- package/dist/cdn/chunks/{BlockPreviewCanvas-Ny1X_mee.js.map → BlockPreviewCanvas-DGBh6mqe.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js → CloudHeaderExtras-BMNK_F9p.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js.map → CloudHeaderExtras-BMNK_F9p.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js → CloudPanels-JMWIoVWh.js} +32 -32
- package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js.map → CloudPanels-JMWIoVWh.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-Hf8r08Sw.js → CollaborationNotices-Bsf1rGW9.js} +12 -12
- package/dist/cdn/chunks/{CollaborationNotices-Hf8r08Sw.js.map → CollaborationNotices-Bsf1rGW9.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js → CollaboratorBar-CXByAoUz.js} +14 -14
- package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js.map → CollaboratorBar-CXByAoUz.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CAiwilM2.js → CommentsPanel-DoJnKLXI.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-CAiwilM2.js.map → CommentsPanel-DoJnKLXI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Dj8sDiLN.js → CommentsSidebar-CUtgvdBC.js} +100 -99
- package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js → CountdownBlock-BqRw147R.js} +18 -18
- package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js.map → CountdownBlock-BqRw147R.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CguFJdqn.js → CountdownToolbar-xobieKoU.js} +26 -26
- package/dist/cdn/chunks/{CountdownToolbar-CguFJdqn.js.map → CountdownToolbar-xobieKoU.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-pr7_nuLI.js → IssuesPanel-C7LfxaAY.js} +75 -75
- package/dist/cdn/chunks/{IssuesPanel-pr7_nuLI.js.map → IssuesPanel-C7LfxaAY.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js → LoadingTrack-CZuLTazv.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js.map → LoadingTrack-CZuLTazv.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-B_ldj3TO.js → LogicTagInsertButton-BIi05UQu.js} +250 -250
- package/dist/cdn/chunks/{LogicTagInsertButton-B_ldj3TO.js.map → LogicTagInsertButton-BIi05UQu.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CGfzcHwP.js → MediaEditModal-Cpcod6_U.js} +148 -148
- package/dist/cdn/chunks/{MediaEditModal-CGfzcHwP.js.map → MediaEditModal-Cpcod6_U.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js → MediaPanels-BIdcW_1f.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js.map → MediaPanels-BIdcW_1f.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-CFu9VXPS.js → MergeTagInput-BvWg8o5E.js} +32 -32
- package/dist/cdn/chunks/{MergeTagInput-CFu9VXPS.js.map → MergeTagInput-BvWg8o5E.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BFpK5dxg.js → MergeTagModeToggle-BgKEVUtV.js} +27 -27
- package/dist/cdn/chunks/{MergeTagModeToggle-BFpK5dxg.js.map → MergeTagModeToggle-BgKEVUtV.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-Zo0mYWbf.js → MergeTagTextarea-tBz8McZf.js} +32 -32
- package/dist/cdn/chunks/{MergeTagTextarea-Zo0mYWbf.js.map → MergeTagTextarea-tBz8McZf.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DsPLVAgm.js → ParagraphEditor-B3Rj_cWF.js} +191 -191
- package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js → RestoreVersionDialog-CjOdD2xj.js} +19 -19
- package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js.map → RestoreVersionDialog-CjOdD2xj.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js → RichTextEditorContent-DNjR_sNN.js} +29 -29
- package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js.map → RichTextEditorContent-DNjR_sNN.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js → SaveBlockDialog-CUhpawq0.js} +75 -75
- package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js.map → SaveBlockDialog-CUhpawq0.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-BPYcRoGa.js +356 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B9XCjDfm.js.map → SavedBlocksBrowserModal-BPYcRoGa.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js → SavedBlocksPanels-C6--Bc81.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js.map → SavedBlocksPanels-C6--Bc81.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js → SavedBlocksPickBar-DUavxpbU.js} +14 -14
- package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js.map → SavedBlocksPickBar-DUavxpbU.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-jWpmuWDR.js → TemplateSettings-CKtI-dof.js} +69 -69
- package/dist/cdn/chunks/{TemplateSettings-jWpmuWDR.js.map → TemplateSettings-CKtI-dof.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DcwKhFnI.js → TestEmailModal-CDQTgESD.js} +65 -65
- package/dist/cdn/chunks/{TestEmailModal-DcwKhFnI.js.map → TestEmailModal-CDQTgESD.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js → TestEmailPanel-CcUpEpAn.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js.map → TestEmailPanel-CcUpEpAn.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-R2lQw6WA.js → TitleEditor-Cob7RLyK.js} +70 -70
- package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js.map +1 -0
- package/dist/cdn/chunks/{ToggleSwitch-BDMugNES.js → ToggleSwitch-J7Vwhvha.js} +5 -5
- package/dist/cdn/chunks/{ToggleSwitch-BDMugNES.js.map → ToggleSwitch-J7Vwhvha.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-CnvfW72e.js → Toolbar-CdpsvNOR.js} +893 -893
- package/dist/cdn/chunks/{Toolbar-CnvfW72e.js.map → Toolbar-CdpsvNOR.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-CFPDgbwQ.js +51 -0
- package/dist/cdn/chunks/{TplModal-BDyeS69p.js.map → TplModal-CFPDgbwQ.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js → VersionHistoryMenu-BYlLRvRJ.js} +32 -32
- package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js.map → VersionHistoryMenu-BYlLRvRJ.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js → VersionHistoryPanels-C6SOVoiT.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js.map → VersionHistoryPanels-C6SOVoiT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CZ--HOoa.js → VersionPreviewBanner-Dvg0ZfAW.js} +10 -10
- package/dist/cdn/chunks/{VersionPreviewBanner-CZ--HOoa.js.map → VersionPreviewBanner-Dvg0ZfAW.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-D3obNGab.js → WrapperBlock-C7Md56IT.js} +13 -13
- package/dist/cdn/chunks/{WrapperBlock-D3obNGab.js.map → WrapperBlock-C7Md56IT.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js +21 -0
- package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D6niZ2Rc.js → createCloudRuntime-Cth2JCEh.js} +36 -36
- package/dist/cdn/chunks/{createCloudRuntime-D6niZ2Rc.js.map → createCloudRuntime-Cth2JCEh.js.map} +1 -1
- package/dist/cdn/chunks/{dist-C2epoAwW.js → dist-8ym3y-pH.js} +43 -43
- package/dist/cdn/chunks/{dist-C2epoAwW.js.map → dist-8ym3y-pH.js.map} +1 -1
- package/dist/{dist-BA-jTQgw.js → cdn/chunks/dist-BMzNabtD.js} +106 -107
- package/dist/cdn/chunks/{dist-CONcGNwy.js.map → dist-BMzNabtD.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-B8hTTYFO.js → draggable-Du8AUMFT.js} +639 -636
- package/dist/cdn/chunks/draggable-Du8AUMFT.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js → editor-modal-CyCe560f.js} +891 -891
- package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js.map → editor-modal-CyCe560f.js.map} +1 -1
- package/dist/cdn/chunks/en-TIqv4ag3.js +1 -0
- package/dist/cdn/chunks/{extensions-ClDhn88e.js → extensions-CFF2KWy-.js} +55 -55
- package/dist/cdn/chunks/{extensions-ClDhn88e.js.map → extensions-CFF2KWy-.js.map} +1 -1
- package/dist/cdn/chunks/{icons-HCBP93Ch.js → icons-okSPsLOa.js} +99 -97
- package/dist/cdn/chunks/icons-okSPsLOa.js.map +1 -0
- package/dist/cdn/chunks/{keys-BF9gazbd.js → keys-CUj6UA38.js} +2 -2
- package/dist/cdn/chunks/{keys-BF9gazbd.js.map → keys-CUj6UA38.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-DkLBNrft.js → liquid.browser-rubac0VA.js} +782 -746
- package/dist/cdn/chunks/liquid.browser-rubac0VA.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-DpHCSESZ.js → normalizeMergeTagMarkup-C_KlfSW4.js} +2 -2
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-DpHCSESZ.js.map → normalizeMergeTagMarkup-C_KlfSW4.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js → preRenderCustomBlocks-BcXIz7oJ.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js.map → preRenderCustomBlocks-BcXIz7oJ.js.map} +1 -1
- package/dist/cdn/chunks/{sanitizeHtml-B2h15u0_.js → sanitizeHtml-CN85EDrO.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-B2h15u0_.js.map → sanitizeHtml-CN85EDrO.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-rJoqO1TJ.js → socialIcons-jsTDmkbb.js} +480 -480
- package/dist/cdn/chunks/{socialIcons-rJoqO1TJ.js.map → socialIcons-jsTDmkbb.js.map} +1 -1
- package/dist/cdn/chunks/{src-CUH_EI7k.js → src-C7bkofBL.js} +6 -6
- package/dist/cdn/chunks/{src-CUH_EI7k.js.map → src-C7bkofBL.js.map} +1 -1
- package/dist/cdn/chunks/{src-BKpAis_q.js → src-DEd87i_U.js} +2 -2
- package/dist/cdn/chunks/{src-BKpAis_q.js.map → src-DEd87i_U.js.map} +1 -1
- package/dist/cdn/chunks/{src-C9DTvn1H.js → src-DwWrYnUj.js} +3 -22
- package/dist/cdn/chunks/src-DwWrYnUj.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-ChSZybTi.js → tiptap-CbiTlECY.js} +45 -45
- package/dist/cdn/chunks/{tiptap-ChSZybTi.js.map → tiptap-CbiTlECY.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js → useCloudI18n-DY8_-ETE.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js.map → useCloudI18n-DY8_-ETE.js.map} +1 -1
- package/dist/cdn/chunks/useEditorCore-BrY66C2y.js +2582 -0
- package/dist/cdn/chunks/useEditorCore-BrY66C2y.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-vjZJwKrV.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-BT3c9CXj.js.map → useEditorRoot-vjZJwKrV.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-11iqzC6m.js → useI18n-D8pY4LTq.js} +3 -3
- package/dist/cdn/chunks/{useI18n-11iqzC6m.js.map → useI18n-D8pY4LTq.js.map} +1 -1
- package/dist/{useLogicTag-DFDYJeMN.js → cdn/chunks/useLogicTag-DBJDtpKA.js} +5 -3
- package/dist/cdn/chunks/{useLogicTag-vy5KGg5D.js.map → useLogicTag-DBJDtpKA.js.map} +1 -1
- package/dist/{useMergeTag-B46vACAG.js → cdn/chunks/useMergeTag-B-aG--s1.js} +7 -5
- package/dist/cdn/chunks/{useMergeTag-BFBBjnwh.js.map → useMergeTag-B-aG--s1.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-AnVIwiVv.js → usePopoverPosition-DSMtmu2W.js} +4 -4
- package/dist/cdn/chunks/{usePopoverPosition-AnVIwiVv.js.map → usePopoverPosition-DSMtmu2W.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-C0dawxGr.js → useScrollToBlock-vjQ0fe-L.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-C0dawxGr.js.map → useScrollToBlock-vjQ0fe-L.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js → withCurrentFont-hZTvYBHO.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js.map → withCurrentFont-hZTvYBHO.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1422 -1422
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-N3x4z_rH.js → check-BZ8o0eet.js} +1 -1
- package/dist/{chevron-down-gXu9qNwO.js → chevron-down-DfAAfILv.js} +1 -1
- package/dist/{chevron-right-rL0ayGk5.js → chevron-right-Bk4mGdr7.js} +1 -1
- package/dist/{chevron-up-0ugh8HnW.js → chevron-up-MhUf_azW.js} +1 -1
- package/dist/{circle-alert-B9Ls75B5.js → circle-alert-CShJwVFv.js} +1 -1
- package/dist/{clock-BqHBaCLm.js → clock-CTfD6OCt.js} +1 -1
- package/dist/{createCloudRuntime-B5VIdnwz.js → createCloudRuntime-DCgO4A1r.js} +24 -24
- package/dist/{createLucideIcon-BV7Gwz_Z.js → createLucideIcon-CvhTA2KG.js} +6 -6
- package/dist/{cdn/chunks/dist-CONcGNwy.js → dist-ByCWA2Tv.js} +100 -99
- package/dist/{dist-CzrLYq2s.js → dist-CKi_npZM.js} +2 -21
- package/dist/{dist-CEdyyDn7.js → dist-CVy-7PHQ.js} +54 -54
- package/dist/{dist-DDN7yR-w.js → dist-D6cMdrfG.js} +129 -129
- package/dist/{editor-modal-Du9VI9q4.js → editor-modal-zaZHcmlO.js} +812 -812
- package/dist/en-Db76vJbY.js +1 -0
- package/dist/{extensions-FRYhx7qa.js → extensions-fo_c-vqf.js} +32 -32
- package/dist/{eye-BKj9Tfnc.js → eye-7W4t5e0Q.js} +1 -1
- package/dist/{image-DNdvdTla.js → image-BDiRFzSd.js} +1 -1
- package/dist/{info-Bx-kBkbH.js → info-Cxi3-Kh9.js} +1 -1
- package/dist/{keys-DBjrQkYH.js → keys-BgRERHzu.js} +1 -1
- package/dist/{link-D8-rYdIQ.js → link-ju_2Cmir.js} +1 -1
- package/dist/{liquid.browser-D1RxawkY.js → liquid.browser-DUXEekoN.js} +781 -745
- package/dist/{list-BneisA27.js → list-DYZJf0aZ.js} +1 -1
- package/dist/{loader-circle-DBEXphyx.js → loader-circle-BZRD0a4I.js} +1 -1
- package/dist/{message-circle-Bg4xInCM.js → message-circle-DuEw4Zfx.js} +1 -1
- package/dist/{normalizeMergeTagMarkup-IH8COHzd.js → normalizeMergeTagMarkup-CELnOlgK.js} +1 -1
- package/dist/{package-B40Vkfsp.js → package-CePMr2kK.js} +1 -1
- package/dist/{pencil-CYdAHTds.js → pencil-D3aFCL7c.js} +1 -1
- package/dist/{preRenderCustomBlocks-AbZArwkR.js → preRenderCustomBlocks--_xc0XK3.js} +1 -1
- package/dist/{refresh-cw-Bb1FWrU0.js → refresh-cw-xnro7_Sk.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-CLGymEyk.js → runtime-dom.esm-bundler-BURR-bj5.js} +118 -118
- package/dist/{sanitizeHtml-CnOA1efV.js → sanitizeHtml-BzfzpYJY.js} +1 -1
- package/dist/{search-BZEo08gi.js → search-CDrstRBv.js} +1 -1
- package/dist/{send-DHtrnXQs.js → send-DROkPOaX.js} +1 -1
- package/dist/{smartphone-dlN3vpA3.js → smartphone-Bx6u_tjn.js} +1 -1
- package/dist/{socialIcons-B_d52_eS.js → socialIcons-D7MGsg0d.js} +366 -366
- package/dist/{sparkles-NOttoDnJ.js → sparkles-CdaTtvoz.js} +1 -1
- package/dist/{square-B1CJgdt2.js → square-BbCROH_f.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1096 -1096
- package/dist/{text-align-start-zpoXmb-Z.js → text-align-start-CGacJ9Vw.js} +1 -1
- package/dist/{trash-CGbk4Sgt.js → trash-DxCd7zIy.js} +1 -1
- package/dist/{triangle-alert-CKLMyGVp.js → triangle-alert-7_oaitpf.js} +1 -1
- package/dist/{upload-DQoackAn.js → upload-DuFEOi_0.js} +1 -1
- package/dist/{useCloudI18n-DcLtxOQZ.js → useCloudI18n-DEMmUKuO.js} +2 -2
- package/dist/{useEditorCore-DG9UvWUm.js → useEditorCore-BSo2sSID.js} +1518 -1470
- package/dist/useEditorRoot-BMcoCLBx.js +7 -0
- package/dist/{useI18n-CeTm777E.js → useI18n-BBrHTdu8.js} +2 -2
- package/dist/{cdn/chunks/useLogicTag-vy5KGg5D.js → useLogicTag-ZPC39rfH.js} +3 -5
- package/dist/{cdn/chunks/useMergeTag-BFBBjnwh.js → useMergeTag-BQ4qqWpQ.js} +5 -7
- package/dist/{usePopoverPosition-C42kD7zt.js → usePopoverPosition-DV1PxL66.js} +3 -3
- package/dist/{useScrollToBlock-C-NzvjeO.js → useScrollToBlock-BSyAV4pk.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-CrlI8j5R.js → vue.runtime.esm-bundler-CnEeTfhs.js} +993 -990
- package/dist/{withCurrentFont-v_a4Oso8.js → withCurrentFont-B22FXAF5.js} +1 -1
- package/dist/{x-zcrnmcmU.js → x-BpfG7v9g.js} +1 -1
- package/package.json +10 -10
- package/dist/BlockIssueBadge-6Ri2FfX-.js +0 -33
- package/dist/CommentsSidebar-Co3x4uH0.js +0 -499
- package/dist/IssuesPanel-BHFQ3wrP.js +0 -359
- package/dist/SavedBlocksBrowserModal-SRtN5h9q.js +0 -359
- package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js +0 -34
- package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-Dj8sDiLN.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DsPLVAgm.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-B9XCjDfm.js +0 -356
- package/dist/cdn/chunks/TitleEditor-R2lQw6WA.js.map +0 -1
- package/dist/cdn/chunks/TplModal-BDyeS69p.js +0 -51
- package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js.map +0 -1
- package/dist/cdn/chunks/draggable-B8hTTYFO.js.map +0 -1
- package/dist/cdn/chunks/en-CKAXAo3Z.js +0 -1
- package/dist/cdn/chunks/icons-HCBP93Ch.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DkLBNrft.js.map +0 -1
- package/dist/cdn/chunks/src-C9DTvn1H.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js +0 -2534
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-BT3c9CXj.js +0 -9
- package/dist/en-CyEE7FPY.js +0 -1
- package/dist/useEditorRoot-BKr6nNkC.js +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as N } from "./dist-
|
|
3
|
-
import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-
|
|
4
|
-
import {
|
|
1
|
+
import { C as e, D as t, F as n, G as r, I as i, P as a, R as o, S as s, V as c, W as l, Y as u, Z as d, _ as f, at as p, b as m, c as h, dt as g, et as _, f as v, ft as y, g as b, h as x, it as S, j as C, l as w, m as T, n as E, o as D, p as O, st as k, u as A, ut as j, x as M } from "./draggable-Du8AUMFT.js";
|
|
2
|
+
import { h as N } from "./dist-8ym3y-pH.js";
|
|
3
|
+
import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-BMzNabtD.js";
|
|
4
|
+
import { Bt as B, Ct as V, G as H, H as ee, J as te, M as ne, R as U, Rt as W, at as G, bt as re, f as ie, kt as ae, lt as oe, ot as se, s as ce, t as le, w as ue, wt as K } from "./icons-okSPsLOa.js";
|
|
5
5
|
import { t as q } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
6
6
|
// ../media-library/src/keys.ts
|
|
7
7
|
var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTarget"), fe = Symbol("templaticalMediaTranslations"), Y = Symbol("templaticalMediaUiTheme"), X = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
|
|
@@ -99,7 +99,7 @@ var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTa
|
|
|
99
99
|
} };
|
|
100
100
|
// ../media-library/src/composables/useI18n.ts
|
|
101
101
|
function Z(e) {
|
|
102
|
-
let
|
|
102
|
+
let n = e ?? t(fe, null), r = (u(n) ? n.value : n) ?? pe;
|
|
103
103
|
function i(e, t) {
|
|
104
104
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
105
105
|
}
|
|
@@ -116,9 +116,9 @@ var me = [
|
|
|
116
116
|
"audio"
|
|
117
117
|
];
|
|
118
118
|
function Q(e) {
|
|
119
|
-
let
|
|
120
|
-
if (!
|
|
121
|
-
let r =
|
|
119
|
+
let n = e ?? t(de, null);
|
|
120
|
+
if (!n) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
|
|
121
|
+
let r = n, i = O(() => !0), a = O(() => r.maxFileSize ?? Infinity), o = O(() => {
|
|
122
122
|
let e = r.accept;
|
|
123
123
|
if (e && e.length > 0) return e;
|
|
124
124
|
let t = r.mimeTypes;
|
|
@@ -176,23 +176,23 @@ function ge(e, t) {
|
|
|
176
176
|
let r = n[0], i = n[n.length - 1], s = a(e.value).activeElement;
|
|
177
177
|
t.shiftKey ? s === r && (t.preventDefault(), i.focus()) : s === i && (t.preventDefault(), r.focus());
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function l() {
|
|
180
180
|
let t = r !== null || i !== null;
|
|
181
|
-
t &&
|
|
181
|
+
t && u({ restoreFocus: !1 }), t || (n = a(e.value).activeElement), i = requestAnimationFrame(() => {
|
|
182
182
|
i = null;
|
|
183
183
|
let t = o();
|
|
184
184
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
185
185
|
}), r = P(e, "keydown", s);
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function u(e = {}) {
|
|
188
188
|
let t = e.restoreFocus !== !1;
|
|
189
189
|
i !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(i), i = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
|
|
190
190
|
}
|
|
191
|
-
let
|
|
192
|
-
e && t ?
|
|
191
|
+
let f = c([t, e], ([e, t]) => {
|
|
192
|
+
e && t ? l() : u();
|
|
193
193
|
}, { flush: "post" });
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
d(() => {
|
|
195
|
+
f(), u();
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
// ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -203,7 +203,7 @@ var _e = {
|
|
|
203
203
|
}, ve = ["onClick"], ye = {
|
|
204
204
|
key: 1,
|
|
205
205
|
style: { color: "var(--tpl-text)" }
|
|
206
|
-
}, be = /* @__PURE__ */
|
|
206
|
+
}, be = /* @__PURE__ */ e({
|
|
207
207
|
__name: "MediaBreadcrumb",
|
|
208
208
|
props: {
|
|
209
209
|
folders: {},
|
|
@@ -211,7 +211,7 @@ var _e = {
|
|
|
211
211
|
},
|
|
212
212
|
emits: ["navigate"],
|
|
213
213
|
setup(e, { emit: t }) {
|
|
214
|
-
let n = e, r = t, { t:
|
|
214
|
+
let n = e, r = t, { t: o } = Z(), s = O(() => {
|
|
215
215
|
if (!n.currentFolderId) return [];
|
|
216
216
|
let e = [];
|
|
217
217
|
return c(n.folders, n.currentFolderId, e), e;
|
|
@@ -223,19 +223,19 @@ var _e = {
|
|
|
223
223
|
}
|
|
224
224
|
return !1;
|
|
225
225
|
}
|
|
226
|
-
return (e, t) => s.value.length > 0 ? (
|
|
226
|
+
return (e, t) => s.value.length > 0 ? (a(), f("div", _e, [T("button", {
|
|
227
227
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
228
228
|
style: { color: "var(--tpl-primary)" },
|
|
229
229
|
onClick: t[0] ||= (e) => r("navigate", null)
|
|
230
|
-
},
|
|
230
|
+
}, y(k(o).mediaLibrary.allFiles), 1), (a(!0), f(A, null, i(s.value, (e, t) => (a(), f(A, { key: e.id }, [M(k(W), {
|
|
231
231
|
size: 12,
|
|
232
232
|
"stroke-width": 2
|
|
233
|
-
}), t < s.value.length - 1 ? (
|
|
233
|
+
}), t < s.value.length - 1 ? (a(), f("button", {
|
|
234
234
|
key: 0,
|
|
235
235
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
236
236
|
style: { color: "var(--tpl-primary)" },
|
|
237
237
|
onClick: (t) => r("navigate", e.id)
|
|
238
|
-
},
|
|
238
|
+
}, y(e.name), 9, ve)) : (a(), f("span", ye, y(e.name), 1))], 64))), 128))])) : b("", !0);
|
|
239
239
|
}
|
|
240
240
|
}), xe = ["aria-expanded", "aria-label"], Se = {
|
|
241
241
|
key: 1,
|
|
@@ -243,7 +243,7 @@ var _e = {
|
|
|
243
243
|
}, Ce = {
|
|
244
244
|
key: 0,
|
|
245
245
|
class: "tpl:truncate"
|
|
246
|
-
}, we = ["onKeydown"], Te = ["title", "aria-label"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = { key: 0 }, ke = ["placeholder", "onKeydown"], Ae = /* @__PURE__ */
|
|
246
|
+
}, we = ["onKeydown"], Te = ["title", "aria-label"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = { key: 0 }, ke = ["placeholder", "onKeydown"], Ae = /* @__PURE__ */ e({
|
|
247
247
|
__name: "MediaFolderTreeNode",
|
|
248
248
|
props: {
|
|
249
249
|
folder: {},
|
|
@@ -259,8 +259,8 @@ var _e = {
|
|
|
259
259
|
"renameFolder",
|
|
260
260
|
"deleteFolder"
|
|
261
261
|
],
|
|
262
|
-
setup(
|
|
263
|
-
let
|
|
262
|
+
setup(e, { emit: t }) {
|
|
263
|
+
let n = e, s = t, { t: c } = Z(), l = _(!1), u = _(!1), d = _(""), p = _(!1), m = _(""), v = _(!1), S = O(() => n.folder.children.length > 0), C = O(() => n.depth < 4), E = O(() => n.currentFolderId === n.folder.id), N = O(() => n.currentFolderId ? F(n.folder.children, n.currentFolderId) : !1), P = O(() => l.value || N.value);
|
|
264
264
|
function F(e, t) {
|
|
265
265
|
for (let n of e) if (n.id === t || F(n.children, t)) return !0;
|
|
266
266
|
return !1;
|
|
@@ -269,66 +269,66 @@ var _e = {
|
|
|
269
269
|
l.value = !l.value;
|
|
270
270
|
}
|
|
271
271
|
function L() {
|
|
272
|
-
u.value = !0,
|
|
272
|
+
u.value = !0, d.value = n.folder.name;
|
|
273
273
|
}
|
|
274
274
|
function R() {
|
|
275
|
-
let e =
|
|
276
|
-
e && e !==
|
|
275
|
+
let e = d.value.trim();
|
|
276
|
+
e && e !== n.folder.name && s("renameFolder", n.folder.id, e), u.value = !1, d.value = "";
|
|
277
277
|
}
|
|
278
278
|
function z() {
|
|
279
|
-
u.value = !1,
|
|
279
|
+
u.value = !1, d.value = "";
|
|
280
280
|
}
|
|
281
281
|
function B() {
|
|
282
|
-
|
|
282
|
+
p.value = !0, m.value = "", l.value = !0;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
|
|
284
|
+
function te() {
|
|
285
|
+
m.value.trim() && s("createFolder", m.value.trim(), n.folder.id), p.value = !1, m.value = "";
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
|
|
287
|
+
function ne() {
|
|
288
|
+
p.value = !1, m.value = "";
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
|
|
290
|
+
function U() {
|
|
291
|
+
v.value ? (s("deleteFolder", n.folder.id), v.value = !1) : v.value = !0;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function G(e) {
|
|
294
294
|
let t = e.relatedTarget;
|
|
295
|
-
t && e.currentTarget.contains(t) || (
|
|
295
|
+
t && e.currentTarget.contains(t) || (v.value = !1);
|
|
296
296
|
}
|
|
297
|
-
return (
|
|
298
|
-
let
|
|
299
|
-
return
|
|
297
|
+
return (t, n) => {
|
|
298
|
+
let l = o("MediaFolderTreeNode", !0);
|
|
299
|
+
return a(), f("div", null, [T("div", {
|
|
300
300
|
class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
301
|
-
style:
|
|
302
|
-
paddingLeft: `${
|
|
303
|
-
backgroundColor:
|
|
304
|
-
color:
|
|
301
|
+
style: g({
|
|
302
|
+
paddingLeft: `${e.depth * 16 + 8}px`,
|
|
303
|
+
backgroundColor: E.value ? "var(--tpl-bg-active)" : "transparent",
|
|
304
|
+
color: E.value ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
305
305
|
}),
|
|
306
|
-
onFocusout:
|
|
306
|
+
onFocusout: G
|
|
307
307
|
}, [
|
|
308
|
-
|
|
308
|
+
S.value || p.value ? (a(), f("button", {
|
|
309
309
|
key: 0,
|
|
310
310
|
type: "button",
|
|
311
311
|
class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
312
312
|
"aria-expanded": P.value,
|
|
313
|
-
"aria-label": P.value ?
|
|
314
|
-
onClick:
|
|
315
|
-
}, [M(
|
|
316
|
-
class:
|
|
313
|
+
"aria-label": P.value ? k(c).mediaLibrary.collapseFolder : k(c).mediaLibrary.expandFolder,
|
|
314
|
+
onClick: w(I, ["stop"])
|
|
315
|
+
}, [M(k(W), {
|
|
316
|
+
class: j(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
|
|
317
317
|
size: 10,
|
|
318
318
|
"stroke-width": 2
|
|
319
|
-
}, null, 8, ["class"])], 8, xe)) : (
|
|
320
|
-
|
|
319
|
+
}, null, 8, ["class"])], 8, xe)) : (a(), f("span", Se)),
|
|
320
|
+
T("button", {
|
|
321
321
|
type: "button",
|
|
322
322
|
class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
|
|
323
|
-
onClick: n[0] ||= (
|
|
324
|
-
}, [M(
|
|
323
|
+
onClick: n[0] ||= (t) => s("navigate", e.folder.id)
|
|
324
|
+
}, [M(k(V), {
|
|
325
325
|
class: "tpl:shrink-0",
|
|
326
326
|
size: 14,
|
|
327
327
|
"stroke-width": 1.5
|
|
328
|
-
}), u.value ?
|
|
329
|
-
u.value ?
|
|
328
|
+
}), u.value ? b("", !0) : (a(), f("span", Ce, y(e.folder.name), 1))]),
|
|
329
|
+
u.value ? r((a(), f("input", {
|
|
330
330
|
key: 2,
|
|
331
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
331
|
+
"onUpdate:modelValue": n[1] ||= (e) => d.value = e,
|
|
332
332
|
type: "text",
|
|
333
333
|
class: "tpl:min-w-0 tpl:flex-1 tpl:rounded tpl:border tpl:px-1.5 tpl:py-0.5 tpl:text-xs tpl:outline-none",
|
|
334
334
|
style: {
|
|
@@ -337,62 +337,62 @@ var _e = {
|
|
|
337
337
|
color: "var(--tpl-text)"
|
|
338
338
|
},
|
|
339
339
|
autofocus: "",
|
|
340
|
-
onKeydown: [h(R, ["enter"]), h(
|
|
340
|
+
onKeydown: [h(R, ["enter"]), h(w(z, ["stop"]), ["escape"])],
|
|
341
341
|
onBlur: R,
|
|
342
|
-
onClick: n[2] ||=
|
|
343
|
-
}, null, 40, we)), [[
|
|
344
|
-
u.value ?
|
|
342
|
+
onClick: n[2] ||= w(() => {}, ["stop"])
|
|
343
|
+
}, null, 40, we)), [[D, d.value]]) : b("", !0),
|
|
344
|
+
u.value ? b("", !0) : (a(), f("span", {
|
|
345
345
|
key: 3,
|
|
346
|
-
class:
|
|
346
|
+
class: j(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", E.value || v.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
|
|
347
347
|
}, [
|
|
348
|
-
|
|
348
|
+
C.value && e.canCreateFolder ? (a(), f("button", {
|
|
349
349
|
key: 0,
|
|
350
350
|
type: "button",
|
|
351
351
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
352
|
-
title:
|
|
353
|
-
"aria-label":
|
|
354
|
-
onClick:
|
|
355
|
-
}, [M(
|
|
352
|
+
title: k(c).mediaLibrary.addSubfolder,
|
|
353
|
+
"aria-label": k(c).mediaLibrary.addSubfolder,
|
|
354
|
+
onClick: w(B, ["stop"])
|
|
355
|
+
}, [M(k(ee), {
|
|
356
356
|
size: 12,
|
|
357
357
|
"stroke-width": 2
|
|
358
|
-
})], 8, Te)) :
|
|
359
|
-
|
|
358
|
+
})], 8, Te)) : b("", !0),
|
|
359
|
+
e.canRenameFolder ? (a(), f("button", {
|
|
360
360
|
key: 1,
|
|
361
361
|
type: "button",
|
|
362
362
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
363
|
-
title:
|
|
364
|
-
"aria-label":
|
|
365
|
-
onClick:
|
|
366
|
-
}, [M(
|
|
363
|
+
title: k(c).mediaLibrary.renameFolder,
|
|
364
|
+
"aria-label": k(c).mediaLibrary.renameFolder,
|
|
365
|
+
onClick: w(L, ["stop"])
|
|
366
|
+
}, [M(k(H), {
|
|
367
367
|
size: 12,
|
|
368
368
|
"stroke-width": 2
|
|
369
|
-
})], 8, Ee)) :
|
|
370
|
-
|
|
369
|
+
})], 8, Ee)) : b("", !0),
|
|
370
|
+
e.canDeleteFolder ? (a(), f("button", {
|
|
371
371
|
key: 2,
|
|
372
372
|
type: "button",
|
|
373
373
|
"data-testid": "media-folder-delete",
|
|
374
374
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
375
|
-
title:
|
|
376
|
-
"aria-label":
|
|
377
|
-
onClick:
|
|
378
|
-
}, [M(
|
|
375
|
+
title: v.value ? k(c).mediaLibrary.deleteFolderConfirm : k(c).mediaLibrary.deleteFolder,
|
|
376
|
+
"aria-label": v.value ? k(c).mediaLibrary.deleteFolderConfirm : k(c).mediaLibrary.deleteFolder,
|
|
377
|
+
onClick: w(U, ["stop"])
|
|
378
|
+
}, [M(k(ie), {
|
|
379
379
|
size: 12,
|
|
380
380
|
"stroke-width": 2,
|
|
381
381
|
style: { color: "var(--tpl-danger)" }
|
|
382
|
-
})], 8, De)) :
|
|
382
|
+
})], 8, De)) : b("", !0)
|
|
383
383
|
], 2))
|
|
384
|
-
], 36), P.value ? (
|
|
385
|
-
key:
|
|
386
|
-
folder:
|
|
387
|
-
"current-folder-id":
|
|
388
|
-
depth:
|
|
389
|
-
"can-create-folder":
|
|
390
|
-
"can-rename-folder":
|
|
391
|
-
"can-delete-folder":
|
|
392
|
-
onNavigate: n[3] ||= (e) =>
|
|
393
|
-
onCreateFolder: n[4] ||= (e, t) =>
|
|
394
|
-
onRenameFolder: n[5] ||= (e, t) =>
|
|
395
|
-
onDeleteFolder: n[6] ||= (e) =>
|
|
384
|
+
], 36), P.value ? (a(), f("div", Oe, [(a(!0), f(A, null, i(e.folder.children, (t) => (a(), x(l, {
|
|
385
|
+
key: t.id,
|
|
386
|
+
folder: t,
|
|
387
|
+
"current-folder-id": e.currentFolderId,
|
|
388
|
+
depth: e.depth + 1,
|
|
389
|
+
"can-create-folder": e.canCreateFolder,
|
|
390
|
+
"can-rename-folder": e.canRenameFolder,
|
|
391
|
+
"can-delete-folder": e.canDeleteFolder,
|
|
392
|
+
onNavigate: n[3] ||= (e) => s("navigate", e),
|
|
393
|
+
onCreateFolder: n[4] ||= (e, t) => s("createFolder", e, t),
|
|
394
|
+
onRenameFolder: n[5] ||= (e, t) => s("renameFolder", e, t),
|
|
395
|
+
onDeleteFolder: n[6] ||= (e) => s("deleteFolder", e)
|
|
396
396
|
}, null, 8, [
|
|
397
397
|
"folder",
|
|
398
398
|
"current-folder-id",
|
|
@@ -400,12 +400,12 @@ var _e = {
|
|
|
400
400
|
"can-create-folder",
|
|
401
401
|
"can-rename-folder",
|
|
402
402
|
"can-delete-folder"
|
|
403
|
-
]))), 128)),
|
|
403
|
+
]))), 128)), p.value ? (a(), f("div", {
|
|
404
404
|
key: 0,
|
|
405
|
-
style:
|
|
405
|
+
style: g({ paddingLeft: `${(e.depth + 1) * 16 + 8}px` }),
|
|
406
406
|
class: "tpl:py-1.5 tpl:pr-2"
|
|
407
|
-
}, [
|
|
408
|
-
"onUpdate:modelValue": n[7] ||= (e) =>
|
|
407
|
+
}, [r(T("input", {
|
|
408
|
+
"onUpdate:modelValue": n[7] ||= (e) => m.value = e,
|
|
409
409
|
type: "text",
|
|
410
410
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
411
411
|
style: {
|
|
@@ -413,11 +413,11 @@ var _e = {
|
|
|
413
413
|
"background-color": "var(--tpl-bg)",
|
|
414
414
|
color: "var(--tpl-text)"
|
|
415
415
|
},
|
|
416
|
-
placeholder:
|
|
416
|
+
placeholder: k(c).mediaLibrary.subfolderName,
|
|
417
417
|
autofocus: "",
|
|
418
|
-
onKeydown: [h(
|
|
419
|
-
onBlur:
|
|
420
|
-
}, null, 40, ke), [[
|
|
418
|
+
onKeydown: [h(te, ["enter"]), h(w(ne, ["stop"]), ["escape"])],
|
|
419
|
+
onBlur: te
|
|
420
|
+
}, null, 40, ke), [[D, m.value]])], 4)) : b("", !0)])) : b("", !0)]);
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
423
|
}), je = {
|
|
@@ -426,7 +426,7 @@ var _e = {
|
|
|
426
426
|
}, Me = {
|
|
427
427
|
key: 0,
|
|
428
428
|
class: "tpl:px-3 tpl:py-2"
|
|
429
|
-
}, Ne = ["placeholder", "onKeydown"], Pe = /* @__PURE__ */
|
|
429
|
+
}, Ne = ["placeholder", "onKeydown"], Pe = /* @__PURE__ */ e({
|
|
430
430
|
__name: "MediaFolderTree",
|
|
431
431
|
props: {
|
|
432
432
|
folders: {},
|
|
@@ -444,41 +444,41 @@ var _e = {
|
|
|
444
444
|
"deleteFolder",
|
|
445
445
|
"showFrequentlyUsed"
|
|
446
446
|
],
|
|
447
|
-
setup(
|
|
448
|
-
let
|
|
447
|
+
setup(e, { emit: t }) {
|
|
448
|
+
let n = t, { t: o } = Z(), s = _(!1), c = _("");
|
|
449
449
|
function l() {
|
|
450
450
|
s.value = !0, c.value = "";
|
|
451
451
|
}
|
|
452
452
|
function u() {
|
|
453
|
-
c.value.trim() &&
|
|
453
|
+
c.value.trim() && n("createFolder", c.value.trim()), s.value = !1, c.value = "";
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function d() {
|
|
456
456
|
s.value = !1, c.value = "";
|
|
457
457
|
}
|
|
458
|
-
return (
|
|
459
|
-
|
|
458
|
+
return (t, p) => (a(), f("div", je, [
|
|
459
|
+
T("button", {
|
|
460
460
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
461
|
-
style:
|
|
462
|
-
backgroundColor:
|
|
463
|
-
color:
|
|
461
|
+
style: g({
|
|
462
|
+
backgroundColor: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
|
|
463
|
+
color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
464
464
|
}),
|
|
465
|
-
onClick:
|
|
466
|
-
}, [M(
|
|
465
|
+
onClick: p[0] ||= (e) => n("navigate", null)
|
|
466
|
+
}, [M(k(K), {
|
|
467
467
|
size: 14,
|
|
468
468
|
"stroke-width": 1.5
|
|
469
|
-
}), m(" " +
|
|
470
|
-
(
|
|
471
|
-
key:
|
|
472
|
-
folder:
|
|
473
|
-
"current-folder-id":
|
|
469
|
+
}), m(" " + y(k(o).mediaLibrary.allFiles), 1)], 4),
|
|
470
|
+
(a(!0), f(A, null, i(e.folders, (t) => (a(), x(Ae, {
|
|
471
|
+
key: t.id,
|
|
472
|
+
folder: t,
|
|
473
|
+
"current-folder-id": e.currentFolderId,
|
|
474
474
|
depth: 0,
|
|
475
|
-
"can-create-folder":
|
|
476
|
-
"can-rename-folder":
|
|
477
|
-
"can-delete-folder":
|
|
478
|
-
onNavigate:
|
|
479
|
-
onCreateFolder:
|
|
480
|
-
onRenameFolder:
|
|
481
|
-
onDeleteFolder:
|
|
475
|
+
"can-create-folder": e.canCreateFolder,
|
|
476
|
+
"can-rename-folder": e.canRenameFolder,
|
|
477
|
+
"can-delete-folder": e.canDeleteFolder,
|
|
478
|
+
onNavigate: p[1] ||= (e) => n("navigate", e),
|
|
479
|
+
onCreateFolder: p[2] ||= (e, t) => n("createFolder", e, t),
|
|
480
|
+
onRenameFolder: p[3] ||= (e, t) => n("renameFolder", e, t),
|
|
481
|
+
onDeleteFolder: p[4] ||= (e) => n("deleteFolder", e)
|
|
482
482
|
}, null, 8, [
|
|
483
483
|
"folder",
|
|
484
484
|
"current-folder-id",
|
|
@@ -486,8 +486,8 @@ var _e = {
|
|
|
486
486
|
"can-rename-folder",
|
|
487
487
|
"can-delete-folder"
|
|
488
488
|
]))), 128)),
|
|
489
|
-
s.value ? (
|
|
490
|
-
"onUpdate:modelValue":
|
|
489
|
+
s.value ? (a(), f("div", Me, [r(T("input", {
|
|
490
|
+
"onUpdate:modelValue": p[5] ||= (e) => c.value = e,
|
|
491
491
|
type: "text",
|
|
492
492
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
493
493
|
style: {
|
|
@@ -495,38 +495,38 @@ var _e = {
|
|
|
495
495
|
"background-color": "var(--tpl-bg)",
|
|
496
496
|
color: "var(--tpl-text)"
|
|
497
497
|
},
|
|
498
|
-
placeholder:
|
|
498
|
+
placeholder: k(o).mediaLibrary.folderName,
|
|
499
499
|
autofocus: "",
|
|
500
|
-
onKeydown: [h(u, ["enter"]), h(
|
|
500
|
+
onKeydown: [h(u, ["enter"]), h(w(d, ["stop"]), ["escape"])],
|
|
501
501
|
onBlur: u
|
|
502
|
-
}, null, 40, Ne), [[
|
|
503
|
-
!s.value &&
|
|
502
|
+
}, null, 40, Ne), [[D, c.value]])])) : b("", !0),
|
|
503
|
+
!s.value && e.canCreateFolder ? (a(), f("button", {
|
|
504
504
|
key: 1,
|
|
505
505
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
506
506
|
style: { color: "var(--tpl-text-muted)" },
|
|
507
507
|
onClick: l
|
|
508
|
-
}, [M(
|
|
508
|
+
}, [M(k(ee), {
|
|
509
509
|
size: 14,
|
|
510
510
|
"stroke-width": 1.5
|
|
511
|
-
}), m(" " +
|
|
512
|
-
|
|
513
|
-
|
|
511
|
+
}), m(" " + y(k(o).mediaLibrary.newFolder), 1)])) : b("", !0),
|
|
512
|
+
p[7] ||= T("div", { class: "tpl:flex-1" }, null, -1),
|
|
513
|
+
e.hasFrequentlyUsed ? (a(), f("button", {
|
|
514
514
|
key: 2,
|
|
515
515
|
"data-testid": "media-frequently-used",
|
|
516
516
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:border-t tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
517
|
-
style:
|
|
517
|
+
style: g({
|
|
518
518
|
borderColor: "var(--tpl-border)",
|
|
519
|
-
backgroundColor:
|
|
520
|
-
color:
|
|
519
|
+
backgroundColor: e.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
|
|
520
|
+
color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
521
521
|
}),
|
|
522
|
-
onClick:
|
|
523
|
-
}, [M(
|
|
522
|
+
onClick: p[6] ||= (e) => n("showFrequentlyUsed")
|
|
523
|
+
}, [M(k(ue), {
|
|
524
524
|
size: 14,
|
|
525
525
|
"stroke-width": 1.5
|
|
526
|
-
}), m(" " +
|
|
526
|
+
}), m(" " + y(k(o).mediaLibrary.frequentlyUsed), 1)], 4)) : b("", !0)
|
|
527
527
|
]));
|
|
528
528
|
}
|
|
529
|
-
}), Fe = /* @__PURE__ */
|
|
529
|
+
}), Fe = /* @__PURE__ */ e({
|
|
530
530
|
__name: "MediaFileIcon",
|
|
531
531
|
props: { mimeType: {} },
|
|
532
532
|
setup(e) {
|
|
@@ -627,10 +627,10 @@ var _e = {
|
|
|
627
627
|
bgColor: "var(--tpl-bg-hover)",
|
|
628
628
|
icon: "document"
|
|
629
629
|
}, i = O(() => n[t.mimeType] ?? r);
|
|
630
|
-
return (e, t) => (
|
|
630
|
+
return (e, t) => (a(), f("div", {
|
|
631
631
|
class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2",
|
|
632
|
-
style:
|
|
633
|
-
}, [i.value.icon === "document" ? (
|
|
632
|
+
style: g({ backgroundColor: i.value.bgColor })
|
|
633
|
+
}, [i.value.icon === "document" ? (a(), f("svg", {
|
|
634
634
|
key: 0,
|
|
635
635
|
width: "60",
|
|
636
636
|
height: "60",
|
|
@@ -638,23 +638,23 @@ var _e = {
|
|
|
638
638
|
fill: "none",
|
|
639
639
|
stroke: "currentColor",
|
|
640
640
|
"stroke-width": "1.5",
|
|
641
|
-
style:
|
|
641
|
+
style: g({ color: i.value.color })
|
|
642
642
|
}, [...t[0] ||= [
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
643
|
+
T("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
|
|
644
|
+
T("polyline", { points: "14 2 14 8 20 8" }, null, -1),
|
|
645
|
+
T("line", {
|
|
646
646
|
x1: "8",
|
|
647
647
|
y1: "13",
|
|
648
648
|
x2: "16",
|
|
649
649
|
y2: "13"
|
|
650
650
|
}, null, -1),
|
|
651
|
-
|
|
651
|
+
T("line", {
|
|
652
652
|
x1: "8",
|
|
653
653
|
y1: "17",
|
|
654
654
|
x2: "12",
|
|
655
655
|
y2: "17"
|
|
656
656
|
}, null, -1)
|
|
657
|
-
]], 4)) : i.value.icon === "video" ? (
|
|
657
|
+
]], 4)) : i.value.icon === "video" ? (a(), f("svg", {
|
|
658
658
|
key: 1,
|
|
659
659
|
width: "40",
|
|
660
660
|
height: "40",
|
|
@@ -662,18 +662,18 @@ var _e = {
|
|
|
662
662
|
fill: "none",
|
|
663
663
|
stroke: "currentColor",
|
|
664
664
|
"stroke-width": "1.5",
|
|
665
|
-
style:
|
|
666
|
-
}, [...t[1] ||= [
|
|
665
|
+
style: g({ color: i.value.color })
|
|
666
|
+
}, [...t[1] ||= [T("rect", {
|
|
667
667
|
x: "2",
|
|
668
668
|
y: "4",
|
|
669
669
|
width: "20",
|
|
670
670
|
height: "16",
|
|
671
671
|
rx: "2"
|
|
672
|
-
}, null, -1),
|
|
672
|
+
}, null, -1), T("polygon", {
|
|
673
673
|
points: "10,8 16,12 10,16",
|
|
674
674
|
fill: "currentColor",
|
|
675
675
|
stroke: "none"
|
|
676
|
-
}, null, -1)]], 4)) : (
|
|
676
|
+
}, null, -1)]], 4)) : (a(), f("svg", {
|
|
677
677
|
key: 2,
|
|
678
678
|
width: "40",
|
|
679
679
|
height: "40",
|
|
@@ -681,23 +681,23 @@ var _e = {
|
|
|
681
681
|
fill: "none",
|
|
682
682
|
stroke: "currentColor",
|
|
683
683
|
"stroke-width": "1.5",
|
|
684
|
-
style:
|
|
684
|
+
style: g({ color: i.value.color })
|
|
685
685
|
}, [...t[2] ||= [
|
|
686
|
-
|
|
687
|
-
|
|
686
|
+
T("path", { d: "M9 18V5l12-2v13" }, null, -1),
|
|
687
|
+
T("circle", {
|
|
688
688
|
cx: "6",
|
|
689
689
|
cy: "18",
|
|
690
690
|
r: "3"
|
|
691
691
|
}, null, -1),
|
|
692
|
-
|
|
692
|
+
T("circle", {
|
|
693
693
|
cx: "18",
|
|
694
694
|
cy: "16",
|
|
695
695
|
r: "3"
|
|
696
696
|
}, null, -1)
|
|
697
|
-
]], 4)),
|
|
697
|
+
]], 4)), T("span", {
|
|
698
698
|
class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
|
|
699
|
-
style:
|
|
700
|
-
},
|
|
699
|
+
style: g({ color: i.value.color })
|
|
700
|
+
}, y(i.value.label), 5)], 4));
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
703
|
// ../media-library/src/utils/formatAbsoluteDate.ts
|
|
@@ -797,7 +797,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
797
797
|
}, dt = {
|
|
798
798
|
key: 4,
|
|
799
799
|
class: "tpl:flex tpl:justify-center tpl:py-4"
|
|
800
|
-
}, ft = /*#__PURE__*/ q(/* @__PURE__ */
|
|
800
|
+
}, ft = /*#__PURE__*/ q(/* @__PURE__ */ e({
|
|
801
801
|
__name: "MediaGrid",
|
|
802
802
|
props: {
|
|
803
803
|
items: {},
|
|
@@ -818,41 +818,41 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
818
818
|
"replace",
|
|
819
819
|
"confirm"
|
|
820
820
|
],
|
|
821
|
-
setup(
|
|
822
|
-
let
|
|
823
|
-
function
|
|
821
|
+
setup(e, { emit: n }) {
|
|
822
|
+
let r = e, o = n, { isAcceptedMimeType: s, isImageMimeType: c } = Q();
|
|
823
|
+
function l(e) {
|
|
824
824
|
return e.mimeType ?? "";
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function u(e) {
|
|
827
827
|
return e.thumbnailUrl ?? e.url;
|
|
828
828
|
}
|
|
829
|
-
function
|
|
830
|
-
return !
|
|
829
|
+
function d(e) {
|
|
830
|
+
return !r.accept || r.accept.length === 0 || s(l(e), r.accept);
|
|
831
|
+
}
|
|
832
|
+
function p(e) {
|
|
833
|
+
return r.canUpdate === !0 && e.canUpdate !== !1;
|
|
831
834
|
}
|
|
832
835
|
function h(e) {
|
|
833
|
-
return
|
|
834
|
-
}
|
|
835
|
-
function _(e) {
|
|
836
|
-
return a.canReplace === !0 && e.canUpdate !== !1;
|
|
836
|
+
return r.canReplace === !0 && e.canUpdate !== !1;
|
|
837
837
|
}
|
|
838
|
-
function
|
|
839
|
-
t.metaKey || t.ctrlKey ?
|
|
838
|
+
function v(e, t) {
|
|
839
|
+
t.metaKey || t.ctrlKey ? o("toggle", e.id) : o("select", e);
|
|
840
840
|
}
|
|
841
|
-
function
|
|
842
|
-
|
|
841
|
+
function S(e) {
|
|
842
|
+
d(e) && o("confirm", e);
|
|
843
843
|
}
|
|
844
|
-
function
|
|
845
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(),
|
|
844
|
+
function C(e, t) {
|
|
845
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), o("select", e));
|
|
846
846
|
}
|
|
847
847
|
function E(e) {
|
|
848
|
-
return
|
|
848
|
+
return r.selectedIds.has(e.id);
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function D(e) {
|
|
851
851
|
return E(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
|
|
852
852
|
}
|
|
853
|
-
let { t:
|
|
853
|
+
let { t: O } = Z(), N = t(X, null), P = _(null);
|
|
854
854
|
R(P, ([{ isIntersecting: e }]) => {
|
|
855
|
-
e &&
|
|
855
|
+
e && r.hasMore && !r.isLoading && o("loadMore");
|
|
856
856
|
}, { threshold: .1 });
|
|
857
857
|
function F(e) {
|
|
858
858
|
return Ie(e, N?.value, {
|
|
@@ -861,123 +861,123 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
861
861
|
day: "numeric"
|
|
862
862
|
});
|
|
863
863
|
}
|
|
864
|
-
return (
|
|
865
|
-
|
|
864
|
+
return (t, n) => (a(), f("div", Re, [
|
|
865
|
+
e.isLoading && e.items.length === 0 ? (a(), f("div", {
|
|
866
866
|
key: 0,
|
|
867
867
|
role: "status",
|
|
868
868
|
"aria-busy": "true",
|
|
869
|
-
"aria-label":
|
|
870
|
-
class:
|
|
871
|
-
}, [(
|
|
872
|
-
key:
|
|
873
|
-
class:
|
|
869
|
+
"aria-label": k(O).mediaLibrary.loading,
|
|
870
|
+
class: j(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
|
|
871
|
+
}, [(a(), f(A, null, i(8, (t) => T("div", {
|
|
872
|
+
key: t,
|
|
873
|
+
class: j(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
|
|
874
874
|
style: { "background-color": "var(--tpl-bg-hover)" },
|
|
875
875
|
"aria-hidden": "true"
|
|
876
|
-
}, null, 2)), 64))], 10, ze)) :
|
|
876
|
+
}, null, 2)), 64))], 10, ze)) : e.items.length === 0 ? (a(), f("div", Be, [M(k(K), {
|
|
877
877
|
class: "tpl:mb-3",
|
|
878
878
|
size: 40,
|
|
879
879
|
"stroke-width": 1,
|
|
880
880
|
style: { color: "var(--tpl-text-dim)" }
|
|
881
|
-
}),
|
|
881
|
+
}), T("p", Ve, y(e.searchQuery ? k(O).mediaLibrary.noSearchResults : k(O).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (a(), f("div", {
|
|
882
882
|
key: 3,
|
|
883
883
|
role: "listbox",
|
|
884
|
-
"aria-label":
|
|
884
|
+
"aria-label": k(O).mediaLibrary.filesListAriaLabel,
|
|
885
885
|
"aria-multiselectable": "true",
|
|
886
886
|
class: "tpl:flex tpl:flex-col tpl:gap-1"
|
|
887
|
-
}, [(
|
|
887
|
+
}, [(a(!0), f(A, null, i(e.items, (e) => (a(), f("div", {
|
|
888
888
|
key: e.id,
|
|
889
889
|
role: "option",
|
|
890
890
|
tabindex: "0",
|
|
891
891
|
"data-testid": "media-library-item",
|
|
892
|
-
class:
|
|
892
|
+
class: j(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!d(e) && !E(e) ? "tpl:opacity-60" : ""]]),
|
|
893
893
|
"data-media-id": e.id,
|
|
894
894
|
"aria-selected": E(e),
|
|
895
895
|
"aria-label": e.filename || e.url,
|
|
896
|
-
style:
|
|
897
|
-
onClick: (t) =>
|
|
898
|
-
onDblclick: (t) =>
|
|
899
|
-
onKeydown: (t) =>
|
|
896
|
+
style: g({ backgroundColor: E(e) ? "var(--tpl-bg-hover)" : "transparent" }),
|
|
897
|
+
onClick: (t) => v(e, t),
|
|
898
|
+
onDblclick: (t) => S(e),
|
|
899
|
+
onKeydown: (t) => C(e, t)
|
|
900
900
|
}, [
|
|
901
|
-
|
|
901
|
+
T("div", nt, [k(c)(l(e)) ? (a(), f("img", {
|
|
902
902
|
key: 0,
|
|
903
|
-
src:
|
|
903
|
+
src: u(e),
|
|
904
904
|
alt: e.filename || e.url,
|
|
905
905
|
class: "tpl:size-full tpl:object-cover",
|
|
906
906
|
loading: "lazy"
|
|
907
|
-
}, null, 8, rt)) : (
|
|
908
|
-
|
|
909
|
-
e.size == null ?
|
|
910
|
-
e.createdAt ? (
|
|
911
|
-
|
|
907
|
+
}, null, 8, rt)) : (a(), f("div", it, [M(Fe, { "mime-type": l(e) }, null, 8, ["mime-type"])]))]),
|
|
908
|
+
T("div", at, [T("p", ot, y(e.filename || e.url), 1), T("p", st, [
|
|
909
|
+
e.size == null ? b("", !0) : (a(), f(A, { key: 0 }, [m(y(k($)(e.size)), 1)], 64)),
|
|
910
|
+
e.createdAt ? (a(), f(A, { key: 1 }, [e.size == null ? b("", !0) : (a(), f(A, { key: 0 }, [m(" · ")], 64)), m(" " + y(F(e.createdAt)), 1)], 64)) : b("", !0),
|
|
911
|
+
k(c)(l(e)) && e.width && e.height ? (a(), f(A, { key: 2 }, [m(" · " + y(e.width) + "×" + y(e.height), 1)], 64)) : b("", !0)
|
|
912
912
|
])]),
|
|
913
|
-
|
|
913
|
+
T("div", { class: j(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", D(e)]) }, [p(e) ? (a(), f("button", {
|
|
914
914
|
key: 0,
|
|
915
915
|
type: "button",
|
|
916
916
|
"data-testid": "media-edit",
|
|
917
917
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
918
918
|
style: { color: "var(--tpl-text-muted)" },
|
|
919
|
-
title:
|
|
920
|
-
"aria-label":
|
|
921
|
-
onClick:
|
|
922
|
-
}, [M(
|
|
919
|
+
title: k(O).mediaLibrary.editFile,
|
|
920
|
+
"aria-label": k(O).mediaLibrary.editFile,
|
|
921
|
+
onClick: w((t) => o("edit", e), ["stop"])
|
|
922
|
+
}, [M(k(H), {
|
|
923
923
|
size: 12,
|
|
924
924
|
"stroke-width": 2
|
|
925
|
-
})], 8, ct)) :
|
|
925
|
+
})], 8, ct)) : b("", !0), h(e) ? (a(), f("button", {
|
|
926
926
|
key: 1,
|
|
927
927
|
type: "button",
|
|
928
928
|
"data-testid": "media-replace",
|
|
929
929
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
930
930
|
style: { color: "var(--tpl-text-muted)" },
|
|
931
|
-
title:
|
|
932
|
-
"aria-label":
|
|
933
|
-
onClick:
|
|
934
|
-
}, [M(
|
|
931
|
+
title: k(O).mediaLibrary.replaceFile,
|
|
932
|
+
"aria-label": k(O).mediaLibrary.replaceFile,
|
|
933
|
+
onClick: w((t) => o("replace", e), ["stop"])
|
|
934
|
+
}, [M(k(U), {
|
|
935
935
|
size: 12,
|
|
936
936
|
"stroke-width": 2
|
|
937
|
-
})], 8, lt)) :
|
|
938
|
-
E(e) ? (
|
|
937
|
+
})], 8, lt)) : b("", !0)], 2),
|
|
938
|
+
E(e) ? (a(), f("div", ut, [M(k(B), {
|
|
939
939
|
size: 12,
|
|
940
940
|
"stroke-width": 3
|
|
941
|
-
})])) :
|
|
942
|
-
], 46, tt))), 128))], 8, et)) : (
|
|
941
|
+
})])) : b("", !0)
|
|
942
|
+
], 46, tt))), 128))], 8, et)) : (a(), f("div", {
|
|
943
943
|
key: 2,
|
|
944
944
|
role: "listbox",
|
|
945
|
-
"aria-label":
|
|
945
|
+
"aria-label": k(O).mediaLibrary.filesListAriaLabel,
|
|
946
946
|
"aria-multiselectable": "true",
|
|
947
947
|
class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
|
|
948
|
-
}, [(
|
|
948
|
+
}, [(a(!0), f(A, null, i(e.items, (e) => (a(), f("div", {
|
|
949
949
|
key: e.id,
|
|
950
950
|
role: "option",
|
|
951
951
|
tabindex: "0",
|
|
952
952
|
"data-testid": "media-library-item",
|
|
953
|
-
class:
|
|
953
|
+
class: j(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
|
|
954
954
|
"tpl:cursor-pointer",
|
|
955
|
-
!
|
|
955
|
+
!d(e) && !E(e) ? "tpl:opacity-60" : "",
|
|
956
956
|
E(e) ? "tpl-media-item--selected" : ""
|
|
957
957
|
]]),
|
|
958
958
|
"data-media-id": e.id,
|
|
959
959
|
"aria-selected": E(e),
|
|
960
960
|
"aria-label": e.filename || e.url,
|
|
961
|
-
style:
|
|
961
|
+
style: g({
|
|
962
962
|
borderColor: E(e) ? "var(--tpl-primary)" : "transparent",
|
|
963
|
-
backgroundColor: !
|
|
963
|
+
backgroundColor: !d(e) && !E(e) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
|
|
964
964
|
}),
|
|
965
|
-
onClick: (t) =>
|
|
966
|
-
onDblclick: (t) =>
|
|
967
|
-
onKeydown: (t) =>
|
|
965
|
+
onClick: (t) => v(e, t),
|
|
966
|
+
onDblclick: (t) => S(e),
|
|
967
|
+
onKeydown: (t) => C(e, t)
|
|
968
968
|
}, [
|
|
969
|
-
|
|
969
|
+
T("div", We, [k(c)(l(e)) ? (a(), f("img", {
|
|
970
970
|
key: 0,
|
|
971
|
-
src:
|
|
971
|
+
src: u(e),
|
|
972
972
|
alt: e.filename || e.url,
|
|
973
973
|
class: "tpl:size-full tpl:object-cover",
|
|
974
974
|
loading: "lazy"
|
|
975
|
-
}, null, 8, Ge)) : (
|
|
975
|
+
}, null, 8, Ge)) : (a(), x(Fe, {
|
|
976
976
|
key: 1,
|
|
977
|
-
"mime-type":
|
|
977
|
+
"mime-type": l(e)
|
|
978
978
|
}, null, 8, ["mime-type"]))]),
|
|
979
|
-
|
|
980
|
-
|
|
979
|
+
T("div", Ke, [T("p", qe, y(e.filename || e.url), 1), T("p", Je, [e.size == null ? b("", !0) : (a(), f("span", Ye, y(k($)(e.size)), 1)), k(c)(l(e)) && e.width && e.height ? (a(), f("span", Xe, y(e.width) + "×" + y(e.height), 1)) : b("", !0)])]),
|
|
980
|
+
T("div", { class: j(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", D(e)]) }, [p(e) ? (a(), f("button", {
|
|
981
981
|
key: 0,
|
|
982
982
|
type: "button",
|
|
983
983
|
"data-testid": "media-edit",
|
|
@@ -986,13 +986,13 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
986
986
|
"background-color": "var(--tpl-overlay)",
|
|
987
987
|
color: "var(--tpl-on-primary)"
|
|
988
988
|
},
|
|
989
|
-
title:
|
|
990
|
-
"aria-label":
|
|
991
|
-
onClick:
|
|
992
|
-
}, [M(
|
|
989
|
+
title: k(O).mediaLibrary.editFile,
|
|
990
|
+
"aria-label": k(O).mediaLibrary.editFile,
|
|
991
|
+
onClick: w((t) => o("edit", e), ["stop"])
|
|
992
|
+
}, [M(k(H), {
|
|
993
993
|
size: 11,
|
|
994
994
|
"stroke-width": 2
|
|
995
|
-
})], 8, Ze)) :
|
|
995
|
+
})], 8, Ze)) : b("", !0), h(e) ? (a(), f("button", {
|
|
996
996
|
key: 1,
|
|
997
997
|
type: "button",
|
|
998
998
|
"data-testid": "media-replace",
|
|
@@ -1001,29 +1001,29 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1001
1001
|
"background-color": "var(--tpl-overlay)",
|
|
1002
1002
|
color: "var(--tpl-on-primary)"
|
|
1003
1003
|
},
|
|
1004
|
-
title:
|
|
1005
|
-
"aria-label":
|
|
1006
|
-
onClick:
|
|
1007
|
-
}, [M(
|
|
1004
|
+
title: k(O).mediaLibrary.replaceFile,
|
|
1005
|
+
"aria-label": k(O).mediaLibrary.replaceFile,
|
|
1006
|
+
onClick: w((t) => o("replace", e), ["stop"])
|
|
1007
|
+
}, [M(k(U), {
|
|
1008
1008
|
size: 11,
|
|
1009
1009
|
"stroke-width": 2
|
|
1010
|
-
})], 8, Qe)) :
|
|
1011
|
-
E(e) ? (
|
|
1010
|
+
})], 8, Qe)) : b("", !0)], 2),
|
|
1011
|
+
E(e) ? (a(), f("div", $e, [M(k(B), {
|
|
1012
1012
|
size: 12,
|
|
1013
1013
|
"stroke-width": 3
|
|
1014
|
-
})])) :
|
|
1014
|
+
})])) : b("", !0)
|
|
1015
1015
|
], 46, Ue))), 128))], 8, He)),
|
|
1016
|
-
|
|
1016
|
+
T("div", {
|
|
1017
1017
|
ref_key: "sentinelRef",
|
|
1018
1018
|
ref: P,
|
|
1019
1019
|
class: "tpl:h-4"
|
|
1020
1020
|
}, null, 512),
|
|
1021
|
-
|
|
1021
|
+
e.isLoading && e.items.length > 0 ? (a(), f("div", dt, [M(k(G), {
|
|
1022
1022
|
class: "tpl-spinner",
|
|
1023
1023
|
size: 20,
|
|
1024
1024
|
"stroke-width": 2,
|
|
1025
1025
|
style: { color: "var(--tpl-primary)" }
|
|
1026
|
-
})])) :
|
|
1026
|
+
})])) : b("", !0)
|
|
1027
1027
|
]));
|
|
1028
1028
|
}
|
|
1029
1029
|
}), [["__scopeId", "data-v-57c35946"]]), pt = ["data-tpl-theme"], mt = {
|
|
@@ -1045,7 +1045,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1045
1045
|
}, vt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, yt = ["disabled"], bt = ["disabled"], xt = {
|
|
1046
1046
|
key: 0,
|
|
1047
1047
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
1048
|
-
}, St = { key: 1 }, Ct = /* @__PURE__ */
|
|
1048
|
+
}, St = { key: 1 }, Ct = /* @__PURE__ */ e({
|
|
1049
1049
|
__name: "MediaImportUrlModal",
|
|
1050
1050
|
props: {
|
|
1051
1051
|
visible: { type: Boolean },
|
|
@@ -1053,24 +1053,24 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1053
1053
|
error: {}
|
|
1054
1054
|
},
|
|
1055
1055
|
emits: ["import", "close"],
|
|
1056
|
-
setup(
|
|
1057
|
-
let i =
|
|
1058
|
-
|
|
1059
|
-
e && (
|
|
1056
|
+
setup(e, { emit: n }) {
|
|
1057
|
+
let i = e, o = n, { t: s } = Z(), u = t(Y, null), d = t(J, _(null)), p = _("");
|
|
1058
|
+
c(() => i.visible, (e) => {
|
|
1059
|
+
e && (p.value = "");
|
|
1060
1060
|
});
|
|
1061
|
-
function
|
|
1062
|
-
let e =
|
|
1063
|
-
e && !i.isImporting &&
|
|
1061
|
+
function h() {
|
|
1062
|
+
let e = p.value.trim();
|
|
1063
|
+
e && !i.isImporting && o("import", e);
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
i.isImporting ||
|
|
1065
|
+
function g() {
|
|
1066
|
+
i.isImporting || o("close");
|
|
1067
1067
|
}
|
|
1068
|
-
let
|
|
1069
|
-
ge(
|
|
1070
|
-
function
|
|
1071
|
-
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(),
|
|
1068
|
+
let S = _(null);
|
|
1069
|
+
ge(S, O(() => i.visible));
|
|
1070
|
+
function C(e) {
|
|
1071
|
+
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), h()), e.key === "Escape" && g();
|
|
1072
1072
|
}
|
|
1073
|
-
return (
|
|
1073
|
+
return (t, n) => (a(), x(v, { to: k(d) || "body" }, [M(E, {
|
|
1074
1074
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1075
1075
|
"enter-from-class": "tpl:opacity-0",
|
|
1076
1076
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1078,63 +1078,63 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1078
1078
|
"leave-from-class": "tpl:opacity-100",
|
|
1079
1079
|
"leave-to-class": "tpl:opacity-0"
|
|
1080
1080
|
}, {
|
|
1081
|
-
default: l(() => [
|
|
1081
|
+
default: l(() => [e.visible ? (a(), f("div", {
|
|
1082
1082
|
key: 0,
|
|
1083
|
-
"data-tpl-theme":
|
|
1084
|
-
class:
|
|
1083
|
+
"data-tpl-theme": k(u),
|
|
1084
|
+
class: j([k(d) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1085
1085
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1086
|
-
onClick:
|
|
1087
|
-
onKeydown:
|
|
1088
|
-
}, [
|
|
1086
|
+
onClick: w(g, ["self"]),
|
|
1087
|
+
onKeydown: C
|
|
1088
|
+
}, [T("div", {
|
|
1089
1089
|
ref_key: "dialogRef",
|
|
1090
|
-
ref:
|
|
1090
|
+
ref: S,
|
|
1091
1091
|
role: "dialog",
|
|
1092
1092
|
"aria-modal": "true",
|
|
1093
1093
|
"aria-labelledby": "tpl-media-import-title",
|
|
1094
1094
|
class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
1095
1095
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1096
1096
|
}, [
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1097
|
+
T("h3", mt, y(k(s).mediaLibrary.importFromUrl), 1),
|
|
1098
|
+
T("div", ht, [r(T("input", {
|
|
1099
|
+
"onUpdate:modelValue": n[0] ||= (e) => p.value = e,
|
|
1100
1100
|
type: "url",
|
|
1101
|
-
"aria-label":
|
|
1102
|
-
"aria-invalid": !!
|
|
1103
|
-
"aria-describedby":
|
|
1101
|
+
"aria-label": k(s).mediaLibrary.importFromUrl,
|
|
1102
|
+
"aria-invalid": !!e.error,
|
|
1103
|
+
"aria-describedby": e.error ? "tpl-media-import-error" : void 0,
|
|
1104
1104
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
1105
1105
|
style: {
|
|
1106
1106
|
"border-color": "var(--tpl-border)",
|
|
1107
1107
|
"background-color": "var(--tpl-bg)",
|
|
1108
1108
|
color: "var(--tpl-text)"
|
|
1109
1109
|
},
|
|
1110
|
-
placeholder:
|
|
1111
|
-
disabled:
|
|
1110
|
+
placeholder: k(s).mediaLibrary.importUrlPlaceholder,
|
|
1111
|
+
disabled: e.isImporting,
|
|
1112
1112
|
autofocus: ""
|
|
1113
|
-
}, null, 8, gt), [[
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
class:
|
|
1113
|
+
}, null, 8, gt), [[D, p.value]])]),
|
|
1114
|
+
e.error ? (a(), f("p", _t, y(e.error), 1)) : b("", !0),
|
|
1115
|
+
T("div", vt, [T("button", {
|
|
1116
|
+
class: j(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150", { "tpl:cursor-not-allowed tpl:opacity-50": e.isImporting }]),
|
|
1117
1117
|
style: {
|
|
1118
1118
|
"border-color": "var(--tpl-border)",
|
|
1119
1119
|
color: "var(--tpl-text)",
|
|
1120
1120
|
"background-color": "var(--tpl-bg)"
|
|
1121
1121
|
},
|
|
1122
|
-
disabled:
|
|
1123
|
-
onClick:
|
|
1124
|
-
},
|
|
1122
|
+
disabled: e.isImporting,
|
|
1123
|
+
onClick: g
|
|
1124
|
+
}, y(k(s).mediaLibrary.cancel), 11, yt), T("button", {
|
|
1125
1125
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
1126
1126
|
style: {
|
|
1127
1127
|
"background-color": "var(--tpl-primary)",
|
|
1128
1128
|
color: "var(--tpl-on-primary)"
|
|
1129
1129
|
},
|
|
1130
|
-
disabled: !
|
|
1131
|
-
onClick:
|
|
1132
|
-
}, [
|
|
1130
|
+
disabled: !p.value.trim() || e.isImporting,
|
|
1131
|
+
onClick: h
|
|
1132
|
+
}, [e.isImporting ? (a(), f("span", xt, [M(k(G), {
|
|
1133
1133
|
class: "tpl:animate-spin",
|
|
1134
1134
|
size: 12,
|
|
1135
1135
|
"stroke-width": 2
|
|
1136
|
-
}), m(" " +
|
|
1137
|
-
], 512)], 42, pt)) :
|
|
1136
|
+
}), m(" " + y(k(s).mediaLibrary.importing), 1)])) : (a(), f("span", St, y(k(s).mediaLibrary.import), 1))], 8, bt)])
|
|
1137
|
+
], 512)], 42, pt)) : b("", !0)]),
|
|
1138
1138
|
_: 1
|
|
1139
1139
|
})], 8, ["to"]));
|
|
1140
1140
|
}
|
|
@@ -1142,62 +1142,62 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1142
1142
|
key: 0,
|
|
1143
1143
|
class: "tpl:shrink-0",
|
|
1144
1144
|
style: { color: "var(--tpl-text-dim)" }
|
|
1145
|
-
}, Ot = /* @__PURE__ */
|
|
1145
|
+
}, Ot = /* @__PURE__ */ e({
|
|
1146
1146
|
__name: "MediaMovePicker",
|
|
1147
1147
|
props: {
|
|
1148
1148
|
folders: {},
|
|
1149
1149
|
currentFolderId: {}
|
|
1150
1150
|
},
|
|
1151
1151
|
emits: ["select", "close"],
|
|
1152
|
-
setup(
|
|
1153
|
-
let
|
|
1154
|
-
function
|
|
1152
|
+
setup(e, { emit: t }) {
|
|
1153
|
+
let n = t, { t: r } = Z(), o = _(null);
|
|
1154
|
+
function s(e, t = 0) {
|
|
1155
1155
|
let n = [];
|
|
1156
1156
|
for (let r of e) n.push({
|
|
1157
1157
|
id: r.id,
|
|
1158
1158
|
name: r.name,
|
|
1159
1159
|
depth: t
|
|
1160
|
-
}), r.children.length && n.push(...
|
|
1160
|
+
}), r.children.length && n.push(...s(r.children, t + 1));
|
|
1161
1161
|
return n;
|
|
1162
1162
|
}
|
|
1163
|
-
return z(
|
|
1164
|
-
|
|
1165
|
-
}), (
|
|
1163
|
+
return z(o, () => {
|
|
1164
|
+
n("close");
|
|
1165
|
+
}), (t, c) => (a(), f("div", {
|
|
1166
1166
|
ref_key: "pickerRef",
|
|
1167
|
-
ref:
|
|
1167
|
+
ref: o,
|
|
1168
1168
|
"data-testid": "media-move-picker",
|
|
1169
1169
|
class: "tpl:absolute tpl:bottom-full tpl:left-0 tpl:z-10 tpl:mb-2 tpl:w-56 tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:shadow-lg",
|
|
1170
1170
|
style: {
|
|
1171
1171
|
"border-color": "var(--tpl-border)",
|
|
1172
1172
|
"background-color": "var(--tpl-bg-elevated)"
|
|
1173
1173
|
}
|
|
1174
|
-
}, [
|
|
1174
|
+
}, [T("div", wt, [e.currentFolderId === null ? b("", !0) : (a(), f("button", {
|
|
1175
1175
|
key: 0,
|
|
1176
1176
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
1177
1177
|
style: { color: "var(--tpl-text)" },
|
|
1178
|
-
onClick:
|
|
1179
|
-
}, [M(
|
|
1178
|
+
onClick: c[0] ||= (e) => n("select", null)
|
|
1179
|
+
}, [M(k(K), {
|
|
1180
1180
|
class: "tpl:shrink-0",
|
|
1181
1181
|
size: 14,
|
|
1182
1182
|
"stroke-width": 1.5
|
|
1183
|
-
}), m(" " +
|
|
1184
|
-
key:
|
|
1183
|
+
}), m(" " + y(k(r).mediaLibrary.moveToRoot), 1)])), (a(!0), f(A, null, i(s(e.folders), (t) => (a(), f("button", {
|
|
1184
|
+
key: t.id,
|
|
1185
1185
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:py-1.5 tpl:pr-3 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
1186
|
-
style:
|
|
1187
|
-
paddingLeft: `${
|
|
1188
|
-
color:
|
|
1189
|
-
opacity:
|
|
1186
|
+
style: g({
|
|
1187
|
+
paddingLeft: `${t.depth * 16 + 12}px`,
|
|
1188
|
+
color: t.id === e.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
|
|
1189
|
+
opacity: t.id === e.currentFolderId ? .5 : 1
|
|
1190
1190
|
}),
|
|
1191
|
-
disabled:
|
|
1192
|
-
onClick: (
|
|
1191
|
+
disabled: t.id === e.currentFolderId,
|
|
1192
|
+
onClick: (e) => n("select", t.id)
|
|
1193
1193
|
}, [
|
|
1194
|
-
M(
|
|
1194
|
+
M(k(V), {
|
|
1195
1195
|
class: "tpl:shrink-0",
|
|
1196
1196
|
size: 14,
|
|
1197
1197
|
"stroke-width": 1.5
|
|
1198
1198
|
}),
|
|
1199
|
-
|
|
1200
|
-
|
|
1199
|
+
T("span", Et, y(t.name), 1),
|
|
1200
|
+
t.id === e.currentFolderId ? (a(), f("span", Dt, y(k(r).mediaLibrary.currentFolder), 1)) : b("", !0)
|
|
1201
1201
|
], 12, Tt))), 128))])], 512));
|
|
1202
1202
|
}
|
|
1203
1203
|
}), kt = { class: "tpl:flex tpl:items-center tpl:gap-3" }, At = ["src", "alt"], jt = {
|
|
@@ -1210,30 +1210,30 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1210
1210
|
}, Pt = {
|
|
1211
1211
|
class: "tpl:mt-0.5 tpl:text-[10px]",
|
|
1212
1212
|
style: { color: "var(--tpl-text-muted)" }
|
|
1213
|
-
}, Ft = /*#__PURE__*/ q(/* @__PURE__ */
|
|
1213
|
+
}, Ft = /*#__PURE__*/ q(/* @__PURE__ */ e({
|
|
1214
1214
|
__name: "MediaPreviewPanel",
|
|
1215
1215
|
props: {
|
|
1216
1216
|
item: {},
|
|
1217
1217
|
folders: {}
|
|
1218
1218
|
},
|
|
1219
1219
|
setup(e) {
|
|
1220
|
-
let
|
|
1221
|
-
function
|
|
1220
|
+
let n = e, r = t(X, null), { isImageMimeType: i } = Q();
|
|
1221
|
+
function o(e, t, n = []) {
|
|
1222
1222
|
for (let r of e) {
|
|
1223
1223
|
let e = [...n, r.name];
|
|
1224
1224
|
if (r.id === t) return e;
|
|
1225
1225
|
if (r.children.length) {
|
|
1226
|
-
let n =
|
|
1226
|
+
let n = o(r.children, t, e);
|
|
1227
1227
|
if (n) return n;
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
1230
|
return null;
|
|
1231
1231
|
}
|
|
1232
1232
|
let s = O(() => {
|
|
1233
|
-
if (!
|
|
1234
|
-
let e =
|
|
1233
|
+
if (!n.item.folderId || !n.folders) return null;
|
|
1234
|
+
let e = o(n.folders, n.item.folderId);
|
|
1235
1235
|
return e ? e.join("/") : null;
|
|
1236
|
-
}), c = O(() =>
|
|
1236
|
+
}), c = O(() => n.item.mimeType ?? ""), l = O(() => i(c.value));
|
|
1237
1237
|
function u(e) {
|
|
1238
1238
|
return Ie(e, r?.value, {
|
|
1239
1239
|
year: "numeric",
|
|
@@ -1241,37 +1241,37 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1241
1241
|
day: "numeric"
|
|
1242
1242
|
});
|
|
1243
1243
|
}
|
|
1244
|
-
let d = O(() =>
|
|
1245
|
-
return (t, n) => (
|
|
1244
|
+
let d = O(() => n.item.filename || n.item.url);
|
|
1245
|
+
return (t, n) => (a(), f("div", kt, [l.value ? (a(), f("img", {
|
|
1246
1246
|
key: 0,
|
|
1247
1247
|
src: e.item.url,
|
|
1248
1248
|
alt: e.item.alt || d.value,
|
|
1249
1249
|
class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
|
|
1250
1250
|
style: { border: "1px solid var(--tpl-border)" }
|
|
1251
|
-
}, null, 8, At)) : (
|
|
1251
|
+
}, null, 8, At)) : (a(), f("div", jt, [M(Fe, {
|
|
1252
1252
|
"mime-type": c.value,
|
|
1253
1253
|
class: "tpl-preview-icon"
|
|
1254
|
-
}, null, 8, ["mime-type"])])),
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
e.item.size == null ?
|
|
1258
|
-
e.item.createdAt ? (
|
|
1259
|
-
l.value && e.item.width && e.item.height ? (
|
|
1260
|
-
s.value ? (
|
|
1254
|
+
}, null, 8, ["mime-type"])])), T("div", Mt, [
|
|
1255
|
+
T("p", Nt, y(d.value), 1),
|
|
1256
|
+
T("p", Pt, [
|
|
1257
|
+
e.item.size == null ? b("", !0) : (a(), f(A, { key: 0 }, [m(y(k($)(e.item.size)), 1)], 64)),
|
|
1258
|
+
e.item.createdAt ? (a(), f(A, { key: 1 }, [e.item.size == null ? b("", !0) : (a(), f(A, { key: 0 }, [m(" · ")], 64)), m(" " + y(u(e.item.createdAt)), 1)], 64)) : b("", !0),
|
|
1259
|
+
l.value && e.item.width && e.item.height ? (a(), f(A, { key: 2 }, [m(" · " + y(e.item.width) + "×" + y(e.item.height) + "px ", 1)], 64)) : b("", !0),
|
|
1260
|
+
s.value ? (a(), f(A, { key: 3 }, [
|
|
1261
1261
|
n[0] ||= m(" · ", -1),
|
|
1262
|
-
M(
|
|
1262
|
+
M(k(V), {
|
|
1263
1263
|
class: "tpl:mb-px tpl:inline",
|
|
1264
1264
|
size: 9,
|
|
1265
1265
|
"stroke-width": 2
|
|
1266
1266
|
}),
|
|
1267
|
-
m(" " +
|
|
1268
|
-
], 64)) :
|
|
1267
|
+
m(" " + y(s.value), 1)
|
|
1268
|
+
], 64)) : b("", !0)
|
|
1269
1269
|
]),
|
|
1270
|
-
l.value ? (
|
|
1270
|
+
l.value ? (a(), f("p", {
|
|
1271
1271
|
key: 0,
|
|
1272
|
-
class:
|
|
1272
|
+
class: j(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt }]),
|
|
1273
1273
|
style: { color: "var(--tpl-text-dim)" }
|
|
1274
|
-
},
|
|
1274
|
+
}, y(e.item.alt || "\xA0"), 3)) : b("", !0)
|
|
1275
1275
|
])]));
|
|
1276
1276
|
}
|
|
1277
1277
|
}), [["__scopeId", "data-v-50993988"]]), It = ["data-tpl-theme"], Lt = {
|
|
@@ -1304,7 +1304,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1304
1304
|
role: "alert",
|
|
1305
1305
|
class: "tpl:mb-3 tpl:text-xs",
|
|
1306
1306
|
style: { color: "var(--tpl-danger)" }
|
|
1307
|
-
}, Kt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, qt = ["disabled"], Jt = ["disabled"], Yt = /* @__PURE__ */
|
|
1307
|
+
}, Kt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, qt = ["disabled"], Jt = ["disabled"], Yt = /* @__PURE__ */ e({
|
|
1308
1308
|
__name: "MediaReplaceModal",
|
|
1309
1309
|
props: {
|
|
1310
1310
|
visible: { type: Boolean },
|
|
@@ -1314,28 +1314,28 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1314
1314
|
error: {}
|
|
1315
1315
|
},
|
|
1316
1316
|
emits: ["replace", "close"],
|
|
1317
|
-
setup(
|
|
1318
|
-
let
|
|
1319
|
-
if (!
|
|
1320
|
-
let e = (
|
|
1317
|
+
setup(e, { emit: n }) {
|
|
1318
|
+
let r = e, i = n, { t: o } = Z(), s = t(Y, null), u = t(J, _(null)), d = _(null), p = _(null), m = O(() => {
|
|
1319
|
+
if (!r.item) return "";
|
|
1320
|
+
let e = (r.item.filename ?? "").split(".");
|
|
1321
1321
|
return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
|
|
1322
|
-
}),
|
|
1323
|
-
|
|
1324
|
-
e || (
|
|
1322
|
+
}), h = O(() => m.value ? `.${m.value}` : "*"), g = O(() => (r.usageInfo?.templateCount ?? 0) > 0);
|
|
1323
|
+
c(() => r.visible, (e) => {
|
|
1324
|
+
e || (p.value = null, d.value && (d.value.value = ""));
|
|
1325
1325
|
});
|
|
1326
|
-
function
|
|
1326
|
+
function S(e) {
|
|
1327
1327
|
let t = e.target;
|
|
1328
|
-
t.files && t.files.length > 0 && (
|
|
1328
|
+
t.files && t.files.length > 0 && (p.value = t.files[0]);
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1331
|
-
|
|
1330
|
+
function C() {
|
|
1331
|
+
p.value && i("replace", p.value);
|
|
1332
1332
|
}
|
|
1333
|
-
let
|
|
1334
|
-
ge(
|
|
1335
|
-
function
|
|
1336
|
-
e.stopPropagation(), e.key === "Escape" &&
|
|
1333
|
+
let D = _(null);
|
|
1334
|
+
ge(D, O(() => r.visible && r.item !== null));
|
|
1335
|
+
function A(e) {
|
|
1336
|
+
e.stopPropagation(), e.key === "Escape" && i("close");
|
|
1337
1337
|
}
|
|
1338
|
-
return (
|
|
1338
|
+
return (t, n) => (a(), x(v, { to: k(u) || "body" }, [M(E, {
|
|
1339
1339
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1340
1340
|
"enter-from-class": "tpl:opacity-0",
|
|
1341
1341
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1343,61 +1343,61 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1343
1343
|
"leave-from-class": "tpl:opacity-100",
|
|
1344
1344
|
"leave-to-class": "tpl:opacity-0"
|
|
1345
1345
|
}, {
|
|
1346
|
-
default: l(() => [
|
|
1346
|
+
default: l(() => [e.visible && e.item ? (a(), f("div", {
|
|
1347
1347
|
key: 0,
|
|
1348
|
-
"data-tpl-theme":
|
|
1349
|
-
class:
|
|
1348
|
+
"data-tpl-theme": k(s),
|
|
1349
|
+
class: j([k(u) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1350
1350
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1351
|
-
onClick: n[1] ||=
|
|
1352
|
-
onKeydown:
|
|
1353
|
-
}, [
|
|
1351
|
+
onClick: n[1] ||= w((e) => i("close"), ["self"]),
|
|
1352
|
+
onKeydown: A
|
|
1353
|
+
}, [T("div", {
|
|
1354
1354
|
ref_key: "dialogRef",
|
|
1355
|
-
ref:
|
|
1355
|
+
ref: D,
|
|
1356
1356
|
role: "dialog",
|
|
1357
1357
|
"aria-modal": "true",
|
|
1358
1358
|
"aria-labelledby": "tpl-media-replace-title",
|
|
1359
1359
|
class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
1360
1360
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1361
1361
|
}, [
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1362
|
+
T("h3", Lt, y(k(o).mediaLibrary.replaceWarningTitle), 1),
|
|
1363
|
+
T("p", Rt, y(k(o).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${m.value}`)), 1),
|
|
1364
|
+
g.value ? (a(), f("p", zt, y(k(o).mediaLibrary.replaceWarningUsageNote.replace("{count}", e.usageInfo.templateCount.toString())), 1)) : b("", !0),
|
|
1365
|
+
T("div", Bt, [T("p", Vt, y(e.item.filename), 1)]),
|
|
1366
|
+
T("div", Ht, [T("label", Ut, y(k(o).mediaLibrary.replaceSelectFile), 1), T("input", {
|
|
1367
1367
|
ref_key: "fileInputRef",
|
|
1368
|
-
ref:
|
|
1368
|
+
ref: d,
|
|
1369
1369
|
type: "file",
|
|
1370
|
-
accept:
|
|
1371
|
-
"aria-invalid": !!
|
|
1372
|
-
"aria-describedby":
|
|
1370
|
+
accept: h.value,
|
|
1371
|
+
"aria-invalid": !!e.error,
|
|
1372
|
+
"aria-describedby": e.error ? "tpl-media-replace-error" : void 0,
|
|
1373
1373
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
|
|
1374
1374
|
style: {
|
|
1375
1375
|
"border-color": "var(--tpl-border)",
|
|
1376
1376
|
"background-color": "var(--tpl-bg)",
|
|
1377
1377
|
color: "var(--tpl-text)"
|
|
1378
1378
|
},
|
|
1379
|
-
onChange:
|
|
1379
|
+
onChange: S
|
|
1380
1380
|
}, null, 40, Wt)]),
|
|
1381
|
-
|
|
1382
|
-
|
|
1381
|
+
e.error ? (a(), f("p", Gt, y(e.error), 1)) : b("", !0),
|
|
1382
|
+
T("div", Kt, [T("button", {
|
|
1383
1383
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
1384
1384
|
style: {
|
|
1385
1385
|
"border-color": "var(--tpl-border)",
|
|
1386
1386
|
color: "var(--tpl-text)",
|
|
1387
1387
|
"background-color": "var(--tpl-bg)"
|
|
1388
1388
|
},
|
|
1389
|
-
disabled:
|
|
1390
|
-
onClick: n[0] ||= (e) =>
|
|
1391
|
-
},
|
|
1389
|
+
disabled: e.isReplacing,
|
|
1390
|
+
onClick: n[0] ||= (e) => i("close")
|
|
1391
|
+
}, y(k(o).mediaLibrary.cancel), 9, qt), T("button", {
|
|
1392
1392
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
1393
1393
|
style: {
|
|
1394
1394
|
"background-color": "var(--tpl-primary)",
|
|
1395
1395
|
color: "var(--tpl-on-primary)"
|
|
1396
1396
|
},
|
|
1397
|
-
disabled: !
|
|
1398
|
-
onClick:
|
|
1399
|
-
},
|
|
1400
|
-
], 512)], 42, It)) :
|
|
1397
|
+
disabled: !p.value || e.isReplacing,
|
|
1398
|
+
onClick: C
|
|
1399
|
+
}, y(e.isReplacing ? k(o).mediaLibrary.replacing : k(o).mediaLibrary.replace), 9, Jt)])
|
|
1400
|
+
], 512)], 42, It)) : b("", !0)]),
|
|
1401
1401
|
_: 1
|
|
1402
1402
|
})], 8, ["to"]));
|
|
1403
1403
|
}
|
|
@@ -1440,71 +1440,71 @@ var Zt = [
|
|
|
1440
1440
|
role: "alert",
|
|
1441
1441
|
class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
|
|
1442
1442
|
style: { color: "var(--tpl-danger)" }
|
|
1443
|
-
}, rn = /* @__PURE__ */
|
|
1443
|
+
}, rn = /* @__PURE__ */ e({
|
|
1444
1444
|
__name: "MediaUploadZone",
|
|
1445
1445
|
props: {
|
|
1446
1446
|
isUploading: { type: Boolean },
|
|
1447
1447
|
uploadProgress: {}
|
|
1448
1448
|
},
|
|
1449
1449
|
emits: ["upload"],
|
|
1450
|
-
setup(
|
|
1451
|
-
let
|
|
1450
|
+
setup(e, { emit: n }) {
|
|
1451
|
+
let r = n, { t: i, format: o } = Z(), s = t(X, null), { allAcceptedInputString: c, restrictsMimeTypes: l, availableCategories: u, maxFileSize: d, isAcceptedFile: p } = Q(), m = {
|
|
1452
1452
|
images: "filterImages",
|
|
1453
1453
|
documents: "filterDocuments",
|
|
1454
1454
|
videos: "filterVideos",
|
|
1455
1455
|
audio: "filterAudio"
|
|
1456
|
-
},
|
|
1457
|
-
let e =
|
|
1458
|
-
return Number.isFinite(
|
|
1456
|
+
}, h = O(() => {
|
|
1457
|
+
let e = i.mediaLibrary, t = l.value ? Xt(u.value.map((t) => e[m[t]]), s?.value) : i.mediaLibrary.acceptedAnyType;
|
|
1458
|
+
return Number.isFinite(d.value) ? o(i.mediaLibrary.acceptedFormatsMaxSize, {
|
|
1459
1459
|
formats: t,
|
|
1460
|
-
size: $(
|
|
1460
|
+
size: $(d.value)
|
|
1461
1461
|
}) : t;
|
|
1462
|
-
}),
|
|
1462
|
+
}), g = _([]), v = _();
|
|
1463
1463
|
function x(e) {
|
|
1464
1464
|
let t = [], n = [];
|
|
1465
|
-
for (let r of Array.from(e))
|
|
1466
|
-
|
|
1465
|
+
for (let r of Array.from(e)) p(r) ? t.push(r) : n.push(r.name);
|
|
1466
|
+
g.value = n, t.length && r("upload", t);
|
|
1467
1467
|
}
|
|
1468
|
-
let { isOverDropZone: S } = L(
|
|
1468
|
+
let { isOverDropZone: S } = L(v, { onDrop: (e) => {
|
|
1469
1469
|
e?.length && x(e);
|
|
1470
|
-
} }), { open:
|
|
1471
|
-
accept:
|
|
1470
|
+
} }), { open: C, onChange: w } = I({
|
|
1471
|
+
accept: c.value,
|
|
1472
1472
|
multiple: !0
|
|
1473
1473
|
});
|
|
1474
|
-
return
|
|
1474
|
+
return w((e) => {
|
|
1475
1475
|
e?.length && x(e);
|
|
1476
|
-
}), (
|
|
1476
|
+
}), (t, n) => (a(), f(A, null, [T("button", {
|
|
1477
1477
|
ref_key: "dropZoneRef",
|
|
1478
|
-
ref:
|
|
1478
|
+
ref: v,
|
|
1479
1479
|
type: "button",
|
|
1480
1480
|
"data-testid": "media-upload-zone",
|
|
1481
|
-
class:
|
|
1482
|
-
"aria-label":
|
|
1483
|
-
"aria-describedby":
|
|
1484
|
-
"aria-busy":
|
|
1481
|
+
class: j(["tpl-upload-zone tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", k(S) ? "tpl-upload-zone-active" : ""]),
|
|
1482
|
+
"aria-label": k(i).mediaLibrary.dropOrClick,
|
|
1483
|
+
"aria-describedby": e.isUploading ? void 0 : "tpl-media-upload-hint",
|
|
1484
|
+
"aria-busy": e.isUploading,
|
|
1485
1485
|
style: {
|
|
1486
1486
|
"border-color": "var(--tpl-border-light)",
|
|
1487
1487
|
"background-color": "var(--tpl-bg)"
|
|
1488
1488
|
},
|
|
1489
|
-
onClick: n[0] ||= (e) =>
|
|
1490
|
-
}, [
|
|
1489
|
+
onClick: n[0] ||= (e) => k(C)()
|
|
1490
|
+
}, [e.isUploading ? (a(), f("div", Qt, [M(k(G), {
|
|
1491
1491
|
class: "tpl-spinner",
|
|
1492
1492
|
size: 20,
|
|
1493
1493
|
"stroke-width": 2,
|
|
1494
1494
|
style: { color: "var(--tpl-primary)" }
|
|
1495
|
-
}),
|
|
1496
|
-
current:
|
|
1497
|
-
total:
|
|
1498
|
-
}) :
|
|
1499
|
-
M(
|
|
1495
|
+
}), T("span", $t, y(e.uploadProgress && e.uploadProgress.total > 1 ? k(o)(k(i).mediaLibrary.uploadingProgress, {
|
|
1496
|
+
current: e.uploadProgress.current,
|
|
1497
|
+
total: e.uploadProgress.total
|
|
1498
|
+
}) : k(i).mediaLibrary.uploading), 1)])) : (a(), f(A, { key: 1 }, [
|
|
1499
|
+
M(k(ce), {
|
|
1500
1500
|
class: "tpl:mb-2",
|
|
1501
1501
|
size: 24,
|
|
1502
1502
|
"stroke-width": 1.5,
|
|
1503
1503
|
style: { color: "var(--tpl-text-dim)" }
|
|
1504
1504
|
}),
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
], 64))], 10, Zt),
|
|
1505
|
+
T("p", en, y(k(i).mediaLibrary.dropOrClick), 1),
|
|
1506
|
+
T("p", tn, y(h.value), 1)
|
|
1507
|
+
], 64))], 10, Zt), g.value.length ? (a(), f("p", nn, y(k(o)(k(i).mediaLibrary.uploadRejected, { files: g.value.join(", ") })), 1)) : b("", !0)], 64));
|
|
1508
1508
|
}
|
|
1509
1509
|
}), an = ["aria-label"], on = [
|
|
1510
1510
|
"width",
|
|
@@ -1530,52 +1530,52 @@ var Zt = [
|
|
|
1530
1530
|
"background-color": "var(--tpl-text)",
|
|
1531
1531
|
color: "var(--tpl-bg-elevated)"
|
|
1532
1532
|
}
|
|
1533
|
-
}, un = /* @__PURE__ */
|
|
1533
|
+
}, un = /* @__PURE__ */ e({
|
|
1534
1534
|
__name: "StorageProgressRing",
|
|
1535
1535
|
props: {
|
|
1536
1536
|
usedBytes: {},
|
|
1537
1537
|
limitBytes: {},
|
|
1538
1538
|
size: {}
|
|
1539
1539
|
},
|
|
1540
|
-
setup(
|
|
1541
|
-
let
|
|
1542
|
-
used:
|
|
1543
|
-
total:
|
|
1540
|
+
setup(e) {
|
|
1541
|
+
let t = e, { t: n, format: r } = Z(), i = _(!1), o = O(() => t.size ?? 24), s = O(() => Math.max(2, o.value / 8)), c = O(() => (o.value - s.value) / 2), u = O(() => 2 * Math.PI * c.value), d = O(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), p = O(() => u.value - d.value / 100 * u.value), h = O(() => d.value >= 95 ? "var(--tpl-danger)" : d.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), g = O(() => $(t.usedBytes)), v = O(() => $(t.limitBytes)), x = O(() => Math.max(0, t.limitBytes - t.usedBytes)), S = O(() => $(x.value)), C = O(() => r(n.mediaLibrary.storageTooltip, {
|
|
1542
|
+
used: g.value,
|
|
1543
|
+
total: v.value,
|
|
1544
1544
|
remaining: S.value
|
|
1545
1545
|
}));
|
|
1546
|
-
return (e, t) => (
|
|
1546
|
+
return (e, t) => (a(), f("div", {
|
|
1547
1547
|
"data-testid": "media-storage-ring",
|
|
1548
1548
|
class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
|
|
1549
1549
|
tabindex: "0",
|
|
1550
1550
|
"aria-label": C.value,
|
|
1551
|
-
onMouseenter: t[0] ||= (e) =>
|
|
1552
|
-
onMouseleave: t[1] ||= (e) =>
|
|
1553
|
-
onFocus: t[2] ||= (e) =>
|
|
1554
|
-
onBlur: t[3] ||= (e) =>
|
|
1555
|
-
}, [(
|
|
1556
|
-
width:
|
|
1557
|
-
height:
|
|
1551
|
+
onMouseenter: t[0] ||= (e) => i.value = !0,
|
|
1552
|
+
onMouseleave: t[1] ||= (e) => i.value = !1,
|
|
1553
|
+
onFocus: t[2] ||= (e) => i.value = !0,
|
|
1554
|
+
onBlur: t[3] ||= (e) => i.value = !1
|
|
1555
|
+
}, [(a(), f("svg", {
|
|
1556
|
+
width: o.value,
|
|
1557
|
+
height: o.value,
|
|
1558
1558
|
class: "tpl:-rotate-90",
|
|
1559
|
-
viewBox: `0 0 ${
|
|
1560
|
-
}, [
|
|
1561
|
-
cx:
|
|
1562
|
-
cy:
|
|
1563
|
-
r:
|
|
1559
|
+
viewBox: `0 0 ${o.value} ${o.value}`
|
|
1560
|
+
}, [T("circle", {
|
|
1561
|
+
cx: o.value / 2,
|
|
1562
|
+
cy: o.value / 2,
|
|
1563
|
+
r: c.value,
|
|
1564
1564
|
fill: "none",
|
|
1565
|
-
"stroke-width":
|
|
1565
|
+
"stroke-width": s.value,
|
|
1566
1566
|
style: { stroke: "var(--tpl-border)" }
|
|
1567
|
-
}, null, 8, sn),
|
|
1568
|
-
cx:
|
|
1569
|
-
cy:
|
|
1570
|
-
r:
|
|
1567
|
+
}, null, 8, sn), T("circle", {
|
|
1568
|
+
cx: o.value / 2,
|
|
1569
|
+
cy: o.value / 2,
|
|
1570
|
+
r: c.value,
|
|
1571
1571
|
fill: "none",
|
|
1572
|
-
"stroke-width":
|
|
1573
|
-
stroke:
|
|
1572
|
+
"stroke-width": s.value,
|
|
1573
|
+
stroke: h.value,
|
|
1574
1574
|
"stroke-linecap": "round",
|
|
1575
|
-
"stroke-dasharray":
|
|
1576
|
-
"stroke-dashoffset":
|
|
1575
|
+
"stroke-dasharray": u.value,
|
|
1576
|
+
"stroke-dashoffset": p.value,
|
|
1577
1577
|
class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
|
|
1578
|
-
}, null, 8, cn)], 8, on)), M(
|
|
1578
|
+
}, null, 8, cn)], 8, on)), M(E, {
|
|
1579
1579
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1580
1580
|
"enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
|
|
1581
1581
|
"enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
@@ -1583,10 +1583,10 @@ var Zt = [
|
|
|
1583
1583
|
"leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
1584
1584
|
"leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
|
|
1585
1585
|
}, {
|
|
1586
|
-
default: l(() => [
|
|
1586
|
+
default: l(() => [i.value ? (a(), f("div", ln, [m(y(C.value) + " ", 1), t[4] ||= T("div", {
|
|
1587
1587
|
class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
|
|
1588
1588
|
style: { "background-color": "var(--tpl-text)" }
|
|
1589
|
-
}, null, -1)])) :
|
|
1589
|
+
}, null, -1)])) : b("", !0)]),
|
|
1590
1590
|
_: 1
|
|
1591
1591
|
})], 40, an));
|
|
1592
1592
|
}
|
|
@@ -1606,84 +1606,84 @@ function dn(e) {
|
|
|
1606
1606
|
return n;
|
|
1607
1607
|
}
|
|
1608
1608
|
// ../media-library/src/composables/useMediaLibraryUI.ts
|
|
1609
|
-
function fn(
|
|
1610
|
-
let { library:
|
|
1611
|
-
function
|
|
1612
|
-
return "value" in
|
|
1613
|
-
}
|
|
1614
|
-
let
|
|
1615
|
-
images: () =>
|
|
1616
|
-
documents: () =>
|
|
1617
|
-
videos: () =>
|
|
1618
|
-
audio: () =>
|
|
1609
|
+
function fn(e) {
|
|
1610
|
+
let { library: t, translations: n } = e;
|
|
1611
|
+
function r() {
|
|
1612
|
+
return "value" in n && typeof n.value == "object" ? n.value : n;
|
|
1613
|
+
}
|
|
1614
|
+
let i = _("grid"), a = _(!1), o = _(""), s = _(null), l = _(!1), u = _(!1), d = O(() => t.previewItem.value?.url ?? null), f = O(() => t.frequentlyUsedItems.value.length > 0), p = O(() => t.viewMode.value === "frequently-used" ? t.frequentlyUsedItems.value : t.items.value), m = O(() => Object.values(t.deleteUsageInfo.value).some((e) => e.templateCount > 0)), h = O(() => dn(t.folders.value)), g = {
|
|
1615
|
+
images: () => r().mediaLibrary.filterImages,
|
|
1616
|
+
documents: () => r().mediaLibrary.filterDocuments,
|
|
1617
|
+
videos: () => r().mediaLibrary.filterVideos,
|
|
1618
|
+
audio: () => r().mediaLibrary.filterAudio
|
|
1619
1619
|
};
|
|
1620
1620
|
function v(e) {
|
|
1621
|
-
return
|
|
1621
|
+
return g[e]?.() ?? e;
|
|
1622
1622
|
}
|
|
1623
|
-
|
|
1624
|
-
e &&
|
|
1623
|
+
c(a, (e) => {
|
|
1624
|
+
e && t.loadFolders();
|
|
1625
1625
|
});
|
|
1626
1626
|
let y = N((e) => {
|
|
1627
|
-
|
|
1627
|
+
t.search(e);
|
|
1628
1628
|
}, 300);
|
|
1629
1629
|
function b(e) {
|
|
1630
|
-
|
|
1630
|
+
o.value = e, y(e);
|
|
1631
1631
|
}
|
|
1632
1632
|
let { copy: x, copied: S } = F({
|
|
1633
1633
|
copiedDuring: 2e3,
|
|
1634
1634
|
legacy: !0
|
|
1635
1635
|
});
|
|
1636
1636
|
async function C(e) {
|
|
1637
|
-
await
|
|
1637
|
+
await t.uploadFiles(e);
|
|
1638
1638
|
}
|
|
1639
1639
|
function w(e) {
|
|
1640
|
-
|
|
1640
|
+
t.selectItem(e);
|
|
1641
1641
|
}
|
|
1642
|
-
async function T(e,
|
|
1643
|
-
await
|
|
1642
|
+
async function T(e, n) {
|
|
1643
|
+
await t.createFolder(e, n);
|
|
1644
1644
|
}
|
|
1645
|
-
async function E(e,
|
|
1646
|
-
await
|
|
1645
|
+
async function E(e, n) {
|
|
1646
|
+
await t.renameFolder(e, n);
|
|
1647
1647
|
}
|
|
1648
1648
|
async function D(e) {
|
|
1649
|
-
await
|
|
1649
|
+
await t.deleteFolder(e);
|
|
1650
1650
|
}
|
|
1651
1651
|
function k(e) {
|
|
1652
|
-
|
|
1652
|
+
s.value = e;
|
|
1653
1653
|
}
|
|
1654
|
-
async function A(e,
|
|
1655
|
-
return i && !await
|
|
1654
|
+
async function A(e, n, r, i) {
|
|
1655
|
+
return i && !await t.replaceMediaDirectly(e, i.file) ? "failed" : await t.updateFile(e, n, r) ? (s.value = null, "saved") : i ? "replaced" : "failed";
|
|
1656
1656
|
}
|
|
1657
1657
|
async function j(e) {
|
|
1658
|
-
await
|
|
1658
|
+
await t.importFromUrl(e) && (l.value = !1);
|
|
1659
1659
|
}
|
|
1660
1660
|
async function M(e) {
|
|
1661
|
-
|
|
1661
|
+
u.value = !1, await t.moveSelected(e);
|
|
1662
1662
|
}
|
|
1663
1663
|
async function P() {
|
|
1664
|
-
await
|
|
1664
|
+
await t.checkUsageBeforeDelete();
|
|
1665
1665
|
}
|
|
1666
1666
|
function I(e) {
|
|
1667
|
-
|
|
1667
|
+
t.checkUsageBeforeReplace(e);
|
|
1668
1668
|
}
|
|
1669
1669
|
async function L(e) {
|
|
1670
|
-
await
|
|
1670
|
+
await t.replaceFile(e);
|
|
1671
1671
|
}
|
|
1672
1672
|
function R() {
|
|
1673
|
-
|
|
1673
|
+
t.clearSelection(), t.cancelDelete(), t.cancelReplace(), o.value = "", t.searchQuery.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", s.value = null, l.value = !1;
|
|
1674
1674
|
}
|
|
1675
1675
|
return {
|
|
1676
|
-
layoutMode:
|
|
1677
|
-
showSidebar:
|
|
1678
|
-
searchInput:
|
|
1679
|
-
editingItem:
|
|
1676
|
+
layoutMode: i,
|
|
1677
|
+
showSidebar: a,
|
|
1678
|
+
searchInput: o,
|
|
1679
|
+
editingItem: s,
|
|
1680
1680
|
showImportUrlModal: l,
|
|
1681
|
-
showMovePicker:
|
|
1682
|
-
selectedUrl:
|
|
1683
|
-
hasFrequentlyUsed:
|
|
1684
|
-
displayItems:
|
|
1685
|
-
hasUsedFiles:
|
|
1686
|
-
folderTree:
|
|
1681
|
+
showMovePicker: u,
|
|
1682
|
+
selectedUrl: d,
|
|
1683
|
+
hasFrequentlyUsed: f,
|
|
1684
|
+
displayItems: p,
|
|
1685
|
+
hasUsedFiles: m,
|
|
1686
|
+
folderTree: h,
|
|
1687
1687
|
copy: x,
|
|
1688
1688
|
copied: S,
|
|
1689
1689
|
getCategoryLabel: v,
|
|
@@ -1704,211 +1704,211 @@ function fn(t) {
|
|
|
1704
1704
|
};
|
|
1705
1705
|
}
|
|
1706
1706
|
// ../media-library/src/composable.ts
|
|
1707
|
-
function pn(
|
|
1708
|
-
let { provider:
|
|
1709
|
-
function j(
|
|
1707
|
+
function pn(e) {
|
|
1708
|
+
let { provider: t } = e, n = _([]), r = _([]), i = _(null), a = _("files"), o = _(""), s = _(null), c = _("newest"), l = _(!1), u = _(!1), d = _(!1), f = _(null), m = _(null), h = _(/* @__PURE__ */ new Set()), g = _(null), v = _([]), y = _({}), b = _(!1), x = _([]), S = _(!1), C = _(null), w = _(!1), T = _(null), E = _(!1), D = _(null), O = _(null), k = _(null), A = 0;
|
|
1709
|
+
function j(t) {
|
|
1710
1710
|
try {
|
|
1711
|
-
|
|
1712
|
-
} catch (
|
|
1713
|
-
|
|
1711
|
+
t();
|
|
1712
|
+
} catch (t) {
|
|
1713
|
+
e.onError?.(t);
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
1716
|
function M() {
|
|
1717
|
-
return
|
|
1717
|
+
return t.folders === !1 ? null : t.folders;
|
|
1718
1718
|
}
|
|
1719
1719
|
function N() {
|
|
1720
|
-
return
|
|
1720
|
+
return p(e.templateId);
|
|
1721
1721
|
}
|
|
1722
1722
|
function P(e) {
|
|
1723
1723
|
let t = {};
|
|
1724
|
-
|
|
1724
|
+
o.value ? t.search = o.value : i.value != null && (t.folderId = i.value), s.value && (t.category = s.value), e && (t.cursor = e);
|
|
1725
1725
|
let n = N();
|
|
1726
1726
|
return n && (t.templateId = n), t;
|
|
1727
1727
|
}
|
|
1728
1728
|
async function F() {
|
|
1729
|
-
let
|
|
1730
|
-
|
|
1729
|
+
let r = ++A;
|
|
1730
|
+
l.value = !0;
|
|
1731
1731
|
let i = P();
|
|
1732
1732
|
try {
|
|
1733
|
-
let
|
|
1734
|
-
if (
|
|
1735
|
-
|
|
1736
|
-
} catch (
|
|
1737
|
-
if (
|
|
1738
|
-
|
|
1733
|
+
let e = await t.list(i);
|
|
1734
|
+
if (r !== A) return;
|
|
1735
|
+
n.value = e.items, f.value = e.nextCursor ?? null, d.value = !!e.nextCursor;
|
|
1736
|
+
} catch (t) {
|
|
1737
|
+
if (r !== A) return;
|
|
1738
|
+
e.onError?.(t);
|
|
1739
1739
|
} finally {
|
|
1740
|
-
|
|
1740
|
+
r === A && (l.value = !1);
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
1743
|
async function I() {
|
|
1744
|
-
if (!
|
|
1745
|
-
let
|
|
1746
|
-
|
|
1747
|
-
let i = P(
|
|
1744
|
+
if (!d.value || !f.value || l.value) return;
|
|
1745
|
+
let r = ++A;
|
|
1746
|
+
l.value = !0;
|
|
1747
|
+
let i = P(f.value);
|
|
1748
1748
|
try {
|
|
1749
|
-
let
|
|
1750
|
-
if (
|
|
1751
|
-
|
|
1752
|
-
} catch (
|
|
1753
|
-
if (
|
|
1754
|
-
|
|
1749
|
+
let e = await t.list(i);
|
|
1750
|
+
if (r !== A) return;
|
|
1751
|
+
n.value = [...n.value, ...e.items], f.value = e.nextCursor ?? null, d.value = !!e.nextCursor;
|
|
1752
|
+
} catch (t) {
|
|
1753
|
+
if (r !== A) return;
|
|
1754
|
+
e.onError?.(t);
|
|
1755
1755
|
} finally {
|
|
1756
|
-
|
|
1756
|
+
r === A && (l.value = !1);
|
|
1757
1757
|
}
|
|
1758
1758
|
}
|
|
1759
1759
|
async function L(e) {
|
|
1760
|
-
|
|
1760
|
+
o.value = e, await F();
|
|
1761
1761
|
}
|
|
1762
1762
|
async function R(e) {
|
|
1763
|
-
|
|
1763
|
+
s.value = e, await F();
|
|
1764
1764
|
}
|
|
1765
1765
|
async function z(e) {
|
|
1766
|
-
|
|
1766
|
+
c.value = e, await F();
|
|
1767
1767
|
}
|
|
1768
1768
|
async function B(e) {
|
|
1769
|
-
|
|
1769
|
+
a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
|
|
1770
1770
|
}
|
|
1771
1771
|
async function V() {
|
|
1772
|
-
|
|
1772
|
+
a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await re();
|
|
1773
1773
|
}
|
|
1774
|
-
async function
|
|
1775
|
-
let { create:
|
|
1776
|
-
if (typeof
|
|
1777
|
-
|
|
1774
|
+
async function H(r) {
|
|
1775
|
+
let { create: a } = t;
|
|
1776
|
+
if (typeof a != "function") return null;
|
|
1777
|
+
u.value = !0;
|
|
1778
1778
|
try {
|
|
1779
|
-
let
|
|
1780
|
-
|
|
1779
|
+
let e = { file: r };
|
|
1780
|
+
i.value != null && (e.folderId = i.value);
|
|
1781
1781
|
let o = N();
|
|
1782
|
-
o && (
|
|
1783
|
-
let s = await
|
|
1784
|
-
return
|
|
1785
|
-
} catch (
|
|
1786
|
-
return
|
|
1782
|
+
o && (e.templateId = o);
|
|
1783
|
+
let s = await a(e);
|
|
1784
|
+
return n.value = [s, ...n.value], j(() => t.onCreated?.(s)), s;
|
|
1785
|
+
} catch (t) {
|
|
1786
|
+
return e.onError?.(t), null;
|
|
1787
1787
|
} finally {
|
|
1788
|
-
|
|
1788
|
+
u.value = !1;
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
|
-
async function
|
|
1792
|
-
let { create:
|
|
1793
|
-
if (typeof
|
|
1794
|
-
|
|
1791
|
+
async function ee(r) {
|
|
1792
|
+
let { create: a } = t;
|
|
1793
|
+
if (typeof a == "function") {
|
|
1794
|
+
u.value = !0, m.value = {
|
|
1795
1795
|
current: 0,
|
|
1796
|
-
total:
|
|
1796
|
+
total: r.length
|
|
1797
1797
|
};
|
|
1798
1798
|
try {
|
|
1799
|
-
for (let o = 0; o <
|
|
1799
|
+
for (let o = 0; o < r.length; o++) {
|
|
1800
1800
|
m.value = {
|
|
1801
1801
|
current: o + 1,
|
|
1802
|
-
total:
|
|
1802
|
+
total: r.length
|
|
1803
1803
|
};
|
|
1804
1804
|
try {
|
|
1805
|
-
let
|
|
1806
|
-
|
|
1805
|
+
let e = { file: r[o] };
|
|
1806
|
+
i.value != null && (e.folderId = i.value);
|
|
1807
1807
|
let s = N();
|
|
1808
|
-
s && (
|
|
1809
|
-
let c = await
|
|
1810
|
-
|
|
1811
|
-
} catch (
|
|
1812
|
-
|
|
1808
|
+
s && (e.templateId = s);
|
|
1809
|
+
let c = await a(e);
|
|
1810
|
+
n.value = [c, ...n.value], j(() => t.onCreated?.(c));
|
|
1811
|
+
} catch (t) {
|
|
1812
|
+
e.onError?.(t);
|
|
1813
1813
|
}
|
|
1814
1814
|
}
|
|
1815
1815
|
} finally {
|
|
1816
|
-
|
|
1816
|
+
u.value = !1, m.value = null;
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
1819
1819
|
}
|
|
1820
|
-
async function
|
|
1820
|
+
async function te(t) {
|
|
1821
1821
|
if (h.value.size === 0) return;
|
|
1822
|
-
let { move:
|
|
1823
|
-
if (typeof
|
|
1824
|
-
let
|
|
1825
|
-
if (
|
|
1826
|
-
let
|
|
1827
|
-
|
|
1828
|
-
} else
|
|
1822
|
+
let { move: r } = M() ?? { move: !1 };
|
|
1823
|
+
if (typeof r == "function") try {
|
|
1824
|
+
let e = await r([...h.value], t);
|
|
1825
|
+
if (i.value === null) {
|
|
1826
|
+
let t = new Map(e.map((e) => [e.id, e]));
|
|
1827
|
+
n.value = n.value.map((e) => t.get(e.id) ?? e);
|
|
1828
|
+
} else n.value = n.value.filter((e) => !h.value.has(e.id));
|
|
1829
1829
|
h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
1830
|
-
} catch (
|
|
1831
|
-
|
|
1830
|
+
} catch (t) {
|
|
1831
|
+
e.onError?.(t);
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
|
-
async function
|
|
1835
|
-
let { update: o } =
|
|
1834
|
+
async function ne(r, i, a) {
|
|
1835
|
+
let { update: o } = t;
|
|
1836
1836
|
if (typeof o != "function") return !1;
|
|
1837
1837
|
try {
|
|
1838
|
-
let
|
|
1839
|
-
a !== void 0 && (
|
|
1840
|
-
let s = await o(
|
|
1841
|
-
return
|
|
1842
|
-
} catch (
|
|
1843
|
-
return
|
|
1838
|
+
let e = { filename: i };
|
|
1839
|
+
a !== void 0 && (e.alt = a);
|
|
1840
|
+
let s = await o(r, e);
|
|
1841
|
+
return n.value = n.value.map((e) => e.id === r ? s : e), g.value?.id === r && (g.value = s), j(() => t.onUpdated?.(s)), !0;
|
|
1842
|
+
} catch (t) {
|
|
1843
|
+
return e.onError?.(t), !1;
|
|
1844
1844
|
}
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function U(e) {
|
|
1847
1847
|
let t = /* @__PURE__ */ new Map();
|
|
1848
|
-
for (let
|
|
1849
|
-
for (let n of
|
|
1848
|
+
for (let r of n.value) e.includes(r.id) && t.set(r.id, r);
|
|
1849
|
+
for (let n of v.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
|
|
1850
1850
|
return [...t.values()];
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1853
|
-
|
|
1852
|
+
function W(e) {
|
|
1853
|
+
n.value = n.value.filter((t) => !e.includes(t.id)), v.value = v.value.filter((t) => !e.includes(t.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
1854
1854
|
}
|
|
1855
|
-
async function
|
|
1855
|
+
async function G() {
|
|
1856
1856
|
if (h.value.size === 0) return;
|
|
1857
|
-
let { delete:
|
|
1858
|
-
if (typeof
|
|
1859
|
-
let r = [...h.value], i =
|
|
1857
|
+
let { delete: n } = t;
|
|
1858
|
+
if (typeof n != "function") return;
|
|
1859
|
+
let r = [...h.value], i = U(r);
|
|
1860
1860
|
try {
|
|
1861
|
-
await
|
|
1862
|
-
for (let e of i) j(() =>
|
|
1863
|
-
} catch (
|
|
1864
|
-
|
|
1861
|
+
await n(r), W(r);
|
|
1862
|
+
for (let e of i) j(() => t.onDeleted?.(e));
|
|
1863
|
+
} catch (t) {
|
|
1864
|
+
e.onError?.(t);
|
|
1865
1865
|
}
|
|
1866
1866
|
}
|
|
1867
|
-
async function
|
|
1868
|
-
let { frequentlyUsed:
|
|
1869
|
-
if (typeof
|
|
1870
|
-
|
|
1871
|
-
} catch (
|
|
1872
|
-
|
|
1867
|
+
async function re() {
|
|
1868
|
+
let { frequentlyUsed: n } = t;
|
|
1869
|
+
if (typeof n == "function") try {
|
|
1870
|
+
v.value = await n();
|
|
1871
|
+
} catch (t) {
|
|
1872
|
+
e.onError?.(t);
|
|
1873
1873
|
}
|
|
1874
1874
|
}
|
|
1875
|
-
async function
|
|
1875
|
+
async function ie() {
|
|
1876
1876
|
if (h.value.size === 0) return !1;
|
|
1877
1877
|
x.value = [...h.value];
|
|
1878
|
-
let { checkUsage:
|
|
1879
|
-
if (typeof
|
|
1878
|
+
let { checkUsage: n } = t;
|
|
1879
|
+
if (typeof n != "function") return y.value = {}, b.value = !0, !1;
|
|
1880
1880
|
try {
|
|
1881
|
-
let
|
|
1882
|
-
|
|
1883
|
-
let
|
|
1884
|
-
return
|
|
1885
|
-
} catch (
|
|
1886
|
-
return
|
|
1881
|
+
let e = await n(x.value);
|
|
1882
|
+
y.value = e;
|
|
1883
|
+
let t = Object.values(e).some((e) => e.templateCount > 0);
|
|
1884
|
+
return b.value = !0, t;
|
|
1885
|
+
} catch (t) {
|
|
1886
|
+
return e.onError?.(t), !1;
|
|
1887
1887
|
}
|
|
1888
1888
|
}
|
|
1889
|
-
async function
|
|
1890
|
-
let { delete:
|
|
1891
|
-
if (typeof
|
|
1892
|
-
let r = x.value, i =
|
|
1889
|
+
async function ae() {
|
|
1890
|
+
let { delete: n } = t;
|
|
1891
|
+
if (typeof n != "function" || (b.value = !1, x.value.length === 0)) return;
|
|
1892
|
+
let r = x.value, i = U(r);
|
|
1893
1893
|
try {
|
|
1894
|
-
await
|
|
1895
|
-
for (let e of i) j(() =>
|
|
1896
|
-
} catch (
|
|
1897
|
-
|
|
1894
|
+
await n(r), W(r), x.value = [], y.value = {};
|
|
1895
|
+
for (let e of i) j(() => t.onDeleted?.(e));
|
|
1896
|
+
} catch (t) {
|
|
1897
|
+
e.onError?.(t);
|
|
1898
1898
|
}
|
|
1899
1899
|
}
|
|
1900
|
-
function
|
|
1901
|
-
|
|
1900
|
+
function oe() {
|
|
1901
|
+
b.value = !1, x.value = [], y.value = {};
|
|
1902
1902
|
}
|
|
1903
|
-
async function
|
|
1904
|
-
let
|
|
1905
|
-
if (typeof
|
|
1903
|
+
async function se(r) {
|
|
1904
|
+
let a = t.importFromUrl;
|
|
1905
|
+
if (typeof a != "function") return null;
|
|
1906
1906
|
S.value = !0, C.value = null;
|
|
1907
1907
|
try {
|
|
1908
|
-
let
|
|
1909
|
-
return
|
|
1910
|
-
} catch (
|
|
1911
|
-
return C.value =
|
|
1908
|
+
let e = await a(r, i.value, N());
|
|
1909
|
+
return n.value = [e, ...n.value], j(() => t.onCreated?.(e)), e;
|
|
1910
|
+
} catch (t) {
|
|
1911
|
+
return C.value = t instanceof Error ? t.message : "Import failed", e.onError?.(t), null;
|
|
1912
1912
|
} finally {
|
|
1913
1913
|
S.value = !1;
|
|
1914
1914
|
}
|
|
@@ -1924,112 +1924,112 @@ function pn(t) {
|
|
|
1924
1924
|
g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
|
|
1925
1925
|
}
|
|
1926
1926
|
async function K() {
|
|
1927
|
-
let { storage:
|
|
1928
|
-
if (typeof
|
|
1927
|
+
let { storage: n } = t;
|
|
1928
|
+
if (typeof n != "function") k.value = null;
|
|
1929
1929
|
else try {
|
|
1930
|
-
k.value = await
|
|
1931
|
-
} catch (
|
|
1932
|
-
|
|
1930
|
+
k.value = await n();
|
|
1931
|
+
} catch (t) {
|
|
1932
|
+
e.onError?.(t);
|
|
1933
1933
|
}
|
|
1934
1934
|
}
|
|
1935
1935
|
async function q() {
|
|
1936
|
-
let
|
|
1937
|
-
if (
|
|
1938
|
-
|
|
1939
|
-
} catch (
|
|
1940
|
-
|
|
1936
|
+
let t = M();
|
|
1937
|
+
if (t) try {
|
|
1938
|
+
r.value = await t.list();
|
|
1939
|
+
} catch (t) {
|
|
1940
|
+
e.onError?.(t);
|
|
1941
1941
|
}
|
|
1942
1942
|
}
|
|
1943
|
-
async function de(
|
|
1943
|
+
async function de(t, n) {
|
|
1944
1944
|
let { create: r } = M() ?? { create: !1 };
|
|
1945
1945
|
if (typeof r != "function") return null;
|
|
1946
1946
|
try {
|
|
1947
|
-
let
|
|
1948
|
-
n !== void 0 && (
|
|
1949
|
-
let i = await r(
|
|
1947
|
+
let e = { name: t };
|
|
1948
|
+
n !== void 0 && (e.parentId = n);
|
|
1949
|
+
let i = await r(e);
|
|
1950
1950
|
return await q(), i;
|
|
1951
|
-
} catch (
|
|
1952
|
-
return
|
|
1951
|
+
} catch (t) {
|
|
1952
|
+
return e.onError?.(t), null;
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
1955
|
function J(e, t) {
|
|
1956
1956
|
for (let n of e) if (n.id === t) return n;
|
|
1957
1957
|
return null;
|
|
1958
1958
|
}
|
|
1959
|
-
async function fe(
|
|
1959
|
+
async function fe(t, n) {
|
|
1960
1960
|
let { update: r } = M() ?? { update: !1 };
|
|
1961
1961
|
if (typeof r == "function") try {
|
|
1962
|
-
await r(
|
|
1963
|
-
} catch (
|
|
1964
|
-
|
|
1962
|
+
await r(t, { name: n }), await q();
|
|
1963
|
+
} catch (t) {
|
|
1964
|
+
e.onError?.(t);
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
1967
|
-
async function Y(
|
|
1967
|
+
async function Y(t) {
|
|
1968
1968
|
let { delete: n } = M() ?? { delete: !1 };
|
|
1969
1969
|
if (typeof n == "function") try {
|
|
1970
|
-
let
|
|
1971
|
-
await n(
|
|
1972
|
-
} catch (
|
|
1973
|
-
|
|
1970
|
+
let e = J(r.value, t)?.parentId ?? null;
|
|
1971
|
+
await n(t), i.value === t && (i.value = e), await q(), await F();
|
|
1972
|
+
} catch (t) {
|
|
1973
|
+
e.onError?.(t);
|
|
1974
1974
|
}
|
|
1975
1975
|
}
|
|
1976
|
-
async function X(
|
|
1977
|
-
D.value =
|
|
1978
|
-
let { checkUsage: r } =
|
|
1976
|
+
async function X(n) {
|
|
1977
|
+
D.value = n, T.value = null;
|
|
1978
|
+
let { checkUsage: r } = t;
|
|
1979
1979
|
if (typeof r != "function") O.value = null, E.value = !0;
|
|
1980
1980
|
else try {
|
|
1981
|
-
let
|
|
1982
|
-
O.value =
|
|
1983
|
-
} catch (
|
|
1984
|
-
|
|
1981
|
+
let e = await r([n.id]);
|
|
1982
|
+
O.value = e[n.id] ?? null, E.value = !0;
|
|
1983
|
+
} catch (t) {
|
|
1984
|
+
e.onError?.(t);
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
1987
|
function pe() {
|
|
1988
1988
|
E.value = !1, D.value = null, O.value = null, T.value = null;
|
|
1989
1989
|
}
|
|
1990
1990
|
function Z(e) {
|
|
1991
|
-
|
|
1991
|
+
n.value = n.value.map((t) => t.id === e.id ? e : t), v.value = v.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), j(() => t.onUpdated?.(e));
|
|
1992
1992
|
}
|
|
1993
|
-
async function me(
|
|
1994
|
-
let { replace: r } =
|
|
1993
|
+
async function me(n) {
|
|
1994
|
+
let { replace: r } = t;
|
|
1995
1995
|
if (typeof r != "function" || !D.value) return null;
|
|
1996
1996
|
w.value = !0, T.value = null;
|
|
1997
1997
|
try {
|
|
1998
|
-
let
|
|
1999
|
-
return Z(
|
|
2000
|
-
} catch (
|
|
2001
|
-
return T.value =
|
|
1998
|
+
let e = await r(D.value.id, n);
|
|
1999
|
+
return Z(e), E.value = !1, D.value = null, O.value = null, e;
|
|
2000
|
+
} catch (t) {
|
|
2001
|
+
return T.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
|
|
2002
2002
|
} finally {
|
|
2003
2003
|
w.value = !1;
|
|
2004
2004
|
}
|
|
2005
2005
|
}
|
|
2006
|
-
async function Q(
|
|
2007
|
-
let { replace: i } =
|
|
2006
|
+
async function Q(n, r) {
|
|
2007
|
+
let { replace: i } = t;
|
|
2008
2008
|
if (typeof i != "function") return null;
|
|
2009
2009
|
try {
|
|
2010
|
-
let
|
|
2011
|
-
return Z(
|
|
2012
|
-
} catch (
|
|
2013
|
-
return
|
|
2010
|
+
let e = await i(n, r);
|
|
2011
|
+
return Z(e), e;
|
|
2012
|
+
} catch (t) {
|
|
2013
|
+
return e.onError?.(t), null;
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
2016
|
return {
|
|
2017
|
-
items:
|
|
2018
|
-
folders:
|
|
2019
|
-
currentFolderId:
|
|
2020
|
-
viewMode:
|
|
2021
|
-
searchQuery:
|
|
2022
|
-
categoryFilter:
|
|
2023
|
-
sortOption:
|
|
2024
|
-
isLoading:
|
|
2025
|
-
isUploading:
|
|
2017
|
+
items: n,
|
|
2018
|
+
folders: r,
|
|
2019
|
+
currentFolderId: i,
|
|
2020
|
+
viewMode: a,
|
|
2021
|
+
searchQuery: o,
|
|
2022
|
+
categoryFilter: s,
|
|
2023
|
+
sortOption: c,
|
|
2024
|
+
isLoading: l,
|
|
2025
|
+
isUploading: u,
|
|
2026
2026
|
uploadProgress: m,
|
|
2027
|
-
hasMore:
|
|
2027
|
+
hasMore: d,
|
|
2028
2028
|
selectedItems: h,
|
|
2029
2029
|
previewItem: g,
|
|
2030
|
-
frequentlyUsedItems:
|
|
2031
|
-
deleteUsageInfo:
|
|
2032
|
-
showDeleteWarning:
|
|
2030
|
+
frequentlyUsedItems: v,
|
|
2031
|
+
deleteUsageInfo: y,
|
|
2032
|
+
showDeleteWarning: b,
|
|
2033
2033
|
loadItems: F,
|
|
2034
2034
|
loadMore: I,
|
|
2035
2035
|
search: L,
|
|
@@ -2037,14 +2037,14 @@ function pn(t) {
|
|
|
2037
2037
|
sortBy: z,
|
|
2038
2038
|
navigateToFolder: B,
|
|
2039
2039
|
showFrequentlyUsed: V,
|
|
2040
|
-
uploadFile:
|
|
2041
|
-
uploadFiles:
|
|
2042
|
-
moveSelected:
|
|
2043
|
-
updateFile:
|
|
2044
|
-
deleteSelected:
|
|
2040
|
+
uploadFile: H,
|
|
2041
|
+
uploadFiles: ee,
|
|
2042
|
+
moveSelected: te,
|
|
2043
|
+
updateFile: ne,
|
|
2044
|
+
deleteSelected: G,
|
|
2045
2045
|
isImportingFromUrl: S,
|
|
2046
2046
|
importFromUrlError: C,
|
|
2047
|
-
importFromUrl:
|
|
2047
|
+
importFromUrl: se,
|
|
2048
2048
|
toggleSelection: ce,
|
|
2049
2049
|
clearSelection: le,
|
|
2050
2050
|
selectItem: ue,
|
|
@@ -2053,10 +2053,10 @@ function pn(t) {
|
|
|
2053
2053
|
renameFolder: fe,
|
|
2054
2054
|
deleteFolder: Y,
|
|
2055
2055
|
findFolderInTree: J,
|
|
2056
|
-
loadFrequentlyUsed:
|
|
2057
|
-
checkUsageBeforeDelete:
|
|
2058
|
-
confirmDelete:
|
|
2059
|
-
cancelDelete:
|
|
2056
|
+
loadFrequentlyUsed: re,
|
|
2057
|
+
checkUsageBeforeDelete: ie,
|
|
2058
|
+
confirmDelete: ae,
|
|
2059
|
+
cancelDelete: oe,
|
|
2060
2060
|
isReplacing: w,
|
|
2061
2061
|
replaceError: T,
|
|
2062
2062
|
showReplaceWarning: E,
|
|
@@ -2146,7 +2146,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2146
2146
|
}, Jn = {
|
|
2147
2147
|
key: 1,
|
|
2148
2148
|
class: "tpl:relative"
|
|
2149
|
-
}, Yn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xn = ["data-testid", "disabled"], Zn = /* @__PURE__ */
|
|
2149
|
+
}, Yn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xn = ["data-testid", "disabled"], Zn = /* @__PURE__ */ e({
|
|
2150
2150
|
__name: "MediaLibraryChrome",
|
|
2151
2151
|
props: {
|
|
2152
2152
|
provider: {},
|
|
@@ -2163,110 +2163,110 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2163
2163
|
"confirm",
|
|
2164
2164
|
"ready"
|
|
2165
2165
|
],
|
|
2166
|
-
setup(e, { expose: t, emit:
|
|
2167
|
-
let
|
|
2166
|
+
setup(e, { expose: t, emit: r }) {
|
|
2167
|
+
let o = e, u = r, d = s(() => import("./MediaEditModal-Cpcod6_U.js")), p = O(() => o.translations), h = O(() => o.confirmTestId ?? "media-confirm"), _ = {
|
|
2168
2168
|
get maxFileSize() {
|
|
2169
|
-
return
|
|
2169
|
+
return o.provider.maxFileSize;
|
|
2170
2170
|
},
|
|
2171
2171
|
get mimeTypes() {
|
|
2172
|
-
return
|
|
2172
|
+
return o.provider.mimeTypes;
|
|
2173
2173
|
},
|
|
2174
2174
|
get accept() {
|
|
2175
|
-
return
|
|
2175
|
+
return o.accept;
|
|
2176
2176
|
}
|
|
2177
2177
|
};
|
|
2178
|
-
|
|
2179
|
-
let { isAcceptedMimeType:
|
|
2180
|
-
provider:
|
|
2181
|
-
templateId: () =>
|
|
2182
|
-
onError: (e) =>
|
|
2178
|
+
n(de, _);
|
|
2179
|
+
let { isAcceptedMimeType: v, availableCategories: S } = Q(_), D = pn({
|
|
2180
|
+
provider: o.provider,
|
|
2181
|
+
templateId: () => o.templateId,
|
|
2182
|
+
onError: (e) => o.onError?.(e)
|
|
2183
2183
|
}), N = fn({
|
|
2184
|
-
library:
|
|
2185
|
-
translations:
|
|
2186
|
-
}), P = O(() => typeof
|
|
2187
|
-
let e =
|
|
2184
|
+
library: D,
|
|
2185
|
+
translations: p
|
|
2186
|
+
}), P = O(() => typeof o.provider.create == "function"), F = O(() => o.provider.folders !== !1), I = O(() => typeof o.provider.importFromUrl == "function"), L = O(() => typeof o.provider.delete == "function"), R = O(() => typeof o.provider.update == "function"), z = O(() => typeof o.provider.replace == "function"), V = O(() => typeof o.provider.frequentlyUsed == "function"), H = O(() => {
|
|
2187
|
+
let e = o.provider.folders;
|
|
2188
2188
|
return e !== !1 && typeof e.move == "function";
|
|
2189
2189
|
}), ee = O(() => {
|
|
2190
|
-
let e =
|
|
2190
|
+
let e = o.provider.folders;
|
|
2191
2191
|
return e !== !1 && typeof e.create == "function";
|
|
2192
|
-
}),
|
|
2193
|
-
let e =
|
|
2192
|
+
}), U = O(() => {
|
|
2193
|
+
let e = o.provider.folders;
|
|
2194
2194
|
return e !== !1 && typeof e.update == "function";
|
|
2195
|
-
}),
|
|
2196
|
-
let e =
|
|
2195
|
+
}), W = O(() => {
|
|
2196
|
+
let e = o.provider.folders;
|
|
2197
2197
|
return e !== !1 && typeof e.delete == "function";
|
|
2198
|
-
}),
|
|
2199
|
-
let e =
|
|
2200
|
-
return e ? !
|
|
2201
|
-
}),
|
|
2198
|
+
}), G = O(() => D.isLoading.value && N.displayItems.value.length === 0), ie = O(() => {
|
|
2199
|
+
let e = D.previewItem.value;
|
|
2200
|
+
return e ? !o.accept?.length || v(e.mimeType ?? "", o.accept) : !1;
|
|
2201
|
+
}), ce = O(() => {
|
|
2202
2202
|
if (!L.value) return 0;
|
|
2203
2203
|
let e = 0;
|
|
2204
|
-
for (let t of
|
|
2204
|
+
for (let t of D.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
|
|
2205
2205
|
return e;
|
|
2206
|
-
}),
|
|
2207
|
-
function
|
|
2208
|
-
return
|
|
2206
|
+
}), ue = O(() => N.showImportUrlModal.value || N.editingItem.value !== null || D.showReplaceWarning.value);
|
|
2207
|
+
function K() {
|
|
2208
|
+
return ue.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : D.showDeleteWarning.value ? (D.cancelDelete(), !0) : !1;
|
|
2209
2209
|
}
|
|
2210
2210
|
function q() {
|
|
2211
|
-
|
|
2211
|
+
ie.value && D.previewItem.value && u("confirm", D.previewItem.value);
|
|
2212
2212
|
}
|
|
2213
2213
|
function J(e) {
|
|
2214
|
-
|
|
2214
|
+
D.filterByCategory(e.target.value || null);
|
|
2215
2215
|
}
|
|
2216
2216
|
async function fe() {
|
|
2217
2217
|
let e = /* @__PURE__ */ new Set();
|
|
2218
|
-
for (let t of
|
|
2219
|
-
|
|
2218
|
+
for (let t of D.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
|
|
2219
|
+
D.selectedItems.value = e, await N.handleDeleteClick();
|
|
2220
2220
|
}
|
|
2221
|
-
return
|
|
2222
|
-
e?.length === 1 && (
|
|
2223
|
-
}, { immediate: !0 }),
|
|
2221
|
+
return c(() => o.accept, (e) => {
|
|
2222
|
+
e?.length === 1 && (D.categoryFilter.value = e[0]);
|
|
2223
|
+
}, { immediate: !0 }), D.loadItems(), D.loadFrequentlyUsed(), D.loadStorage(), u("ready"), C(() => {
|
|
2224
2224
|
N.resetUI();
|
|
2225
2225
|
}), t({
|
|
2226
|
-
nestedDialogOpen:
|
|
2227
|
-
handleEscape:
|
|
2228
|
-
library:
|
|
2226
|
+
nestedDialogOpen: ue,
|
|
2227
|
+
handleEscape: K,
|
|
2228
|
+
library: D,
|
|
2229
2229
|
ui: N
|
|
2230
|
-
}), (t, n) => (
|
|
2231
|
-
|
|
2232
|
-
D
|
|
2230
|
+
}), (t, n) => (a(), f("div", mn, [
|
|
2231
|
+
T("div", hn, [T("h2", gn, y(p.value.mediaLibrary.title), 1), T("div", _n, [
|
|
2232
|
+
k(D).storageInfo.value ? (a(), x(un, {
|
|
2233
2233
|
key: 0,
|
|
2234
|
-
"used-bytes": D
|
|
2235
|
-
"limit-bytes": D
|
|
2234
|
+
"used-bytes": k(D).storageInfo.value.usedBytes,
|
|
2235
|
+
"limit-bytes": k(D).storageInfo.value.limitBytes,
|
|
2236
2236
|
size: 22
|
|
2237
|
-
}, null, 8, ["used-bytes", "limit-bytes"])) :
|
|
2238
|
-
|
|
2239
|
-
value:
|
|
2237
|
+
}, null, 8, ["used-bytes", "limit-bytes"])) : b("", !0),
|
|
2238
|
+
T("div", vn, [T("input", {
|
|
2239
|
+
value: k(N).searchInput.value,
|
|
2240
2240
|
type: "search",
|
|
2241
|
-
disabled:
|
|
2242
|
-
"aria-label":
|
|
2241
|
+
disabled: G.value,
|
|
2242
|
+
"aria-label": p.value.mediaLibrary.searchAriaLabel,
|
|
2243
2243
|
class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
2244
2244
|
style: {
|
|
2245
2245
|
"border-color": "var(--tpl-border)",
|
|
2246
2246
|
"background-color": "var(--tpl-bg)",
|
|
2247
2247
|
color: "var(--tpl-text)"
|
|
2248
2248
|
},
|
|
2249
|
-
placeholder:
|
|
2250
|
-
onInput: n[0] ||= (e) =>
|
|
2251
|
-
}, null, 40, yn), M(
|
|
2249
|
+
placeholder: p.value.mediaLibrary.searchPlaceholder,
|
|
2250
|
+
onInput: n[0] ||= (e) => k(N).handleSearchInput(e.target.value)
|
|
2251
|
+
}, null, 40, yn), M(k(ne), {
|
|
2252
2252
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
2253
2253
|
size: 13,
|
|
2254
2254
|
"stroke-width": 2,
|
|
2255
2255
|
style: { color: "var(--tpl-text-dim)" }
|
|
2256
2256
|
})]),
|
|
2257
|
-
e.showClose ? (
|
|
2257
|
+
e.showClose ? (a(), f("button", {
|
|
2258
2258
|
key: 1,
|
|
2259
2259
|
type: "button",
|
|
2260
|
-
"aria-label":
|
|
2260
|
+
"aria-label": p.value.mediaLibrary.close,
|
|
2261
2261
|
class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2262
2262
|
style: { color: "var(--tpl-text-muted)" },
|
|
2263
|
-
onClick: n[1] ||= (e) =>
|
|
2264
|
-
}, [M(
|
|
2263
|
+
onClick: n[1] ||= (e) => u("close")
|
|
2264
|
+
}, [M(k(le), {
|
|
2265
2265
|
size: 18,
|
|
2266
2266
|
"stroke-width": 2
|
|
2267
|
-
})], 8, bn)) :
|
|
2267
|
+
})], 8, bn)) : b("", !0)
|
|
2268
2268
|
])]),
|
|
2269
|
-
|
|
2269
|
+
T("div", xn, [M(E, {
|
|
2270
2270
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
2271
2271
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
2272
2272
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -2274,19 +2274,19 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2274
2274
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
2275
2275
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
2276
2276
|
}, {
|
|
2277
|
-
default: l(() => [F.value &&
|
|
2278
|
-
folders:
|
|
2279
|
-
"current-folder-id": D
|
|
2280
|
-
"view-mode": D
|
|
2281
|
-
"has-frequently-used":
|
|
2277
|
+
default: l(() => [F.value && k(N).showSidebar.value ? (a(), f("div", Sn, [M(Pe, {
|
|
2278
|
+
folders: k(N).folderTree.value,
|
|
2279
|
+
"current-folder-id": k(D).currentFolderId.value,
|
|
2280
|
+
"view-mode": k(D).viewMode.value,
|
|
2281
|
+
"has-frequently-used": V.value && k(N).hasFrequentlyUsed.value,
|
|
2282
2282
|
"can-create-folder": ee.value,
|
|
2283
|
-
"can-rename-folder":
|
|
2284
|
-
"can-delete-folder":
|
|
2285
|
-
onNavigate: D
|
|
2286
|
-
onCreateFolder:
|
|
2287
|
-
onRenameFolder:
|
|
2288
|
-
onDeleteFolder:
|
|
2289
|
-
onShowFrequentlyUsed: D
|
|
2283
|
+
"can-rename-folder": U.value,
|
|
2284
|
+
"can-delete-folder": W.value,
|
|
2285
|
+
onNavigate: k(D).navigateToFolder,
|
|
2286
|
+
onCreateFolder: k(N).handleCreateFolder,
|
|
2287
|
+
onRenameFolder: k(N).handleRenameFolder,
|
|
2288
|
+
onDeleteFolder: k(N).handleDeleteFolder,
|
|
2289
|
+
onShowFrequentlyUsed: k(D).showFrequentlyUsed
|
|
2290
2290
|
}, null, 8, [
|
|
2291
2291
|
"folders",
|
|
2292
2292
|
"current-folder-id",
|
|
@@ -2300,90 +2300,90 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2300
2300
|
"onRenameFolder",
|
|
2301
2301
|
"onDeleteFolder",
|
|
2302
2302
|
"onShowFrequentlyUsed"
|
|
2303
|
-
])])) :
|
|
2303
|
+
])])) : b("", !0)]),
|
|
2304
2304
|
_: 1
|
|
2305
|
-
}),
|
|
2306
|
-
F.value ? (
|
|
2305
|
+
}), T("div", Cn, [T("div", wn, [T("div", Tn, [
|
|
2306
|
+
F.value ? (a(), f("button", {
|
|
2307
2307
|
key: 0,
|
|
2308
2308
|
type: "button",
|
|
2309
2309
|
"data-testid": "media-folder-toggle",
|
|
2310
2310
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2311
|
-
style:
|
|
2312
|
-
color:
|
|
2313
|
-
backgroundColor:
|
|
2314
|
-
border:
|
|
2311
|
+
style: g({
|
|
2312
|
+
color: k(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2313
|
+
backgroundColor: k(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
|
|
2314
|
+
border: k(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
|
|
2315
2315
|
}),
|
|
2316
|
-
title:
|
|
2317
|
-
"aria-label":
|
|
2318
|
-
"aria-pressed":
|
|
2319
|
-
onClick: n[2] ||= (e) =>
|
|
2320
|
-
}, [M(
|
|
2316
|
+
title: k(N).showSidebar.value ? p.value.mediaLibrary.hideFolders : p.value.mediaLibrary.showFolders,
|
|
2317
|
+
"aria-label": k(N).showSidebar.value ? p.value.mediaLibrary.hideFolders : p.value.mediaLibrary.showFolders,
|
|
2318
|
+
"aria-pressed": k(N).showSidebar.value,
|
|
2319
|
+
onClick: n[2] ||= (e) => k(N).showSidebar.value = !k(N).showSidebar.value
|
|
2320
|
+
}, [M(k(te), {
|
|
2321
2321
|
size: 16,
|
|
2322
2322
|
"stroke-width": 2
|
|
2323
|
-
})], 12, En)) :
|
|
2324
|
-
D
|
|
2323
|
+
})], 12, En)) : b("", !0),
|
|
2324
|
+
k(D).viewMode.value === "frequently-used" ? (a(), f("span", Dn, y(p.value.mediaLibrary.frequentlyUsed), 1)) : (a(), x(be, {
|
|
2325
2325
|
key: 2,
|
|
2326
|
-
folders:
|
|
2327
|
-
"current-folder-id": D
|
|
2328
|
-
onNavigate: D
|
|
2326
|
+
folders: k(N).folderTree.value,
|
|
2327
|
+
"current-folder-id": k(D).currentFolderId.value,
|
|
2328
|
+
onNavigate: k(D).navigateToFolder
|
|
2329
2329
|
}, null, 8, [
|
|
2330
2330
|
"folders",
|
|
2331
2331
|
"current-folder-id",
|
|
2332
2332
|
"onNavigate"
|
|
2333
2333
|
])),
|
|
2334
|
-
|
|
2334
|
+
T("div", On, [T("button", {
|
|
2335
2335
|
type: "button",
|
|
2336
2336
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2337
|
-
style:
|
|
2338
|
-
color:
|
|
2339
|
-
backgroundColor:
|
|
2337
|
+
style: g({
|
|
2338
|
+
color: k(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2339
|
+
backgroundColor: k(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2340
2340
|
}),
|
|
2341
|
-
title:
|
|
2342
|
-
"aria-label":
|
|
2343
|
-
"aria-pressed":
|
|
2344
|
-
onClick: n[3] ||= (e) =>
|
|
2345
|
-
}, [M(
|
|
2341
|
+
title: p.value.mediaLibrary.viewGrid,
|
|
2342
|
+
"aria-label": p.value.mediaLibrary.viewGrid,
|
|
2343
|
+
"aria-pressed": k(N).layoutMode.value === "grid",
|
|
2344
|
+
onClick: n[3] ||= (e) => k(N).layoutMode.value = "grid"
|
|
2345
|
+
}, [M(k(re), {
|
|
2346
2346
|
size: 14,
|
|
2347
2347
|
"stroke-width": 2
|
|
2348
|
-
})], 12, kn),
|
|
2348
|
+
})], 12, kn), T("button", {
|
|
2349
2349
|
type: "button",
|
|
2350
2350
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2351
|
-
style:
|
|
2352
|
-
color:
|
|
2353
|
-
backgroundColor:
|
|
2351
|
+
style: g({
|
|
2352
|
+
color: k(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2353
|
+
backgroundColor: k(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2354
2354
|
}),
|
|
2355
|
-
title:
|
|
2356
|
-
"aria-label":
|
|
2357
|
-
"aria-pressed":
|
|
2358
|
-
onClick: n[4] ||= (e) =>
|
|
2359
|
-
}, [M(
|
|
2355
|
+
title: p.value.mediaLibrary.viewList,
|
|
2356
|
+
"aria-label": p.value.mediaLibrary.viewList,
|
|
2357
|
+
"aria-pressed": k(N).layoutMode.value === "list",
|
|
2358
|
+
onClick: n[4] ||= (e) => k(N).layoutMode.value = "list"
|
|
2359
|
+
}, [M(k(se), {
|
|
2360
2360
|
size: 14,
|
|
2361
2361
|
"stroke-width": 2
|
|
2362
2362
|
})], 12, An)])
|
|
2363
|
-
]),
|
|
2363
|
+
]), T("div", jn, [k(S).length > 1 ? (a(), f("select", {
|
|
2364
2364
|
key: 0,
|
|
2365
|
-
"aria-label":
|
|
2365
|
+
"aria-label": p.value.mediaLibrary.filterAriaLabel,
|
|
2366
2366
|
class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
|
|
2367
2367
|
style: {
|
|
2368
2368
|
"border-color": "var(--tpl-border)",
|
|
2369
2369
|
"background-color": "var(--tpl-bg)",
|
|
2370
2370
|
color: "var(--tpl-text)"
|
|
2371
2371
|
},
|
|
2372
|
-
value: D
|
|
2372
|
+
value: k(D).categoryFilter.value ?? "",
|
|
2373
2373
|
onChange: J
|
|
2374
|
-
}, [
|
|
2374
|
+
}, [T("option", Nn, y(p.value.mediaLibrary.filterAll), 1), (a(!0), f(A, null, i(k(S), (e) => (a(), f("option", {
|
|
2375
2375
|
key: e,
|
|
2376
2376
|
value: e
|
|
2377
|
-
},
|
|
2377
|
+
}, y(k(N).getCategoryLabel(e)), 9, Pn))), 128))], 40, Mn)) : b("", !0)])]), T("div", Fn, [k(D).viewMode.value === "files" && (P.value || I.value) ? (a(), f("div", In, [P.value ? (a(), x(rn, {
|
|
2378
2378
|
key: 0,
|
|
2379
|
-
"is-uploading": D
|
|
2380
|
-
"upload-progress": D
|
|
2381
|
-
onUpload:
|
|
2379
|
+
"is-uploading": k(D).isUploading.value,
|
|
2380
|
+
"upload-progress": k(D).uploadProgress.value,
|
|
2381
|
+
onUpload: k(N).handleUpload
|
|
2382
2382
|
}, null, 8, [
|
|
2383
2383
|
"is-uploading",
|
|
2384
2384
|
"upload-progress",
|
|
2385
2385
|
"onUpload"
|
|
2386
|
-
])) :
|
|
2386
|
+
])) : b("", !0), I.value ? (a(), f("button", {
|
|
2387
2387
|
key: 1,
|
|
2388
2388
|
"data-testid": "media-import-url",
|
|
2389
2389
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
@@ -2392,25 +2392,25 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2392
2392
|
color: "var(--tpl-text-muted)",
|
|
2393
2393
|
"background-color": "var(--tpl-bg)"
|
|
2394
2394
|
},
|
|
2395
|
-
onClick: n[5] ||= (e) =>
|
|
2396
|
-
}, [M(
|
|
2395
|
+
onClick: n[5] ||= (e) => k(N).showImportUrlModal.value = !0
|
|
2396
|
+
}, [M(k(oe), {
|
|
2397
2397
|
size: 14,
|
|
2398
2398
|
"stroke-width": 2
|
|
2399
|
-
}), m(" " +
|
|
2400
|
-
items:
|
|
2401
|
-
"selected-ids": D
|
|
2402
|
-
"is-loading": D
|
|
2403
|
-
"has-more": D
|
|
2399
|
+
}), m(" " + y(p.value.mediaLibrary.importFromUrl), 1)])) : b("", !0)])) : b("", !0), M(ft, {
|
|
2400
|
+
items: k(N).displayItems.value,
|
|
2401
|
+
"selected-ids": k(D).selectedItems.value,
|
|
2402
|
+
"is-loading": k(D).isLoading.value,
|
|
2403
|
+
"has-more": k(D).viewMode.value === "files" && k(D).hasMore.value,
|
|
2404
2404
|
accept: e.accept,
|
|
2405
|
-
layout:
|
|
2406
|
-
"search-query": D
|
|
2405
|
+
layout: k(N).layoutMode.value,
|
|
2406
|
+
"search-query": k(D).searchQuery.value,
|
|
2407
2407
|
"can-update": R.value,
|
|
2408
2408
|
"can-replace": z.value,
|
|
2409
|
-
onSelect:
|
|
2410
|
-
onToggle: D
|
|
2411
|
-
onLoadMore: D
|
|
2412
|
-
onEdit:
|
|
2413
|
-
onReplace:
|
|
2409
|
+
onSelect: k(N).handleSelect,
|
|
2410
|
+
onToggle: k(D).toggleSelection,
|
|
2411
|
+
onLoadMore: k(D).loadMore,
|
|
2412
|
+
onEdit: k(N).handleEditItem,
|
|
2413
|
+
onReplace: k(N).handleReplaceItem,
|
|
2414
2414
|
onConfirm: q
|
|
2415
2415
|
}, null, 8, [
|
|
2416
2416
|
"items",
|
|
@@ -2429,37 +2429,37 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2429
2429
|
"onReplace"
|
|
2430
2430
|
])])])]),
|
|
2431
2431
|
M(Ct, {
|
|
2432
|
-
visible:
|
|
2433
|
-
"is-importing": D
|
|
2434
|
-
error: D
|
|
2435
|
-
onImport:
|
|
2436
|
-
onClose: n[6] ||= (e) =>
|
|
2432
|
+
visible: k(N).showImportUrlModal.value,
|
|
2433
|
+
"is-importing": k(D).isImportingFromUrl.value,
|
|
2434
|
+
error: k(D).importFromUrlError.value,
|
|
2435
|
+
onImport: k(N).handleImportFromUrl,
|
|
2436
|
+
onClose: n[6] ||= (e) => k(N).showImportUrlModal.value = !1
|
|
2437
2437
|
}, null, 8, [
|
|
2438
2438
|
"visible",
|
|
2439
2439
|
"is-importing",
|
|
2440
2440
|
"error",
|
|
2441
2441
|
"onImport"
|
|
2442
2442
|
]),
|
|
2443
|
-
|
|
2443
|
+
k(N).editingItem.value ? (a(), x(k(d), {
|
|
2444
2444
|
key: 0,
|
|
2445
2445
|
visible: !0,
|
|
2446
|
-
item:
|
|
2447
|
-
save:
|
|
2448
|
-
"can-crop": z.value &&
|
|
2449
|
-
onClose: n[7] ||= (e) =>
|
|
2446
|
+
item: k(N).editingItem.value,
|
|
2447
|
+
save: k(N).handleEditSave,
|
|
2448
|
+
"can-crop": z.value && k(N).editingItem.value.canUpdate !== !1,
|
|
2449
|
+
onClose: n[7] ||= (e) => k(N).editingItem.value = null
|
|
2450
2450
|
}, null, 8, [
|
|
2451
2451
|
"item",
|
|
2452
2452
|
"save",
|
|
2453
2453
|
"can-crop"
|
|
2454
|
-
])) :
|
|
2454
|
+
])) : b("", !0),
|
|
2455
2455
|
M(Yt, {
|
|
2456
|
-
visible: D
|
|
2457
|
-
item: D
|
|
2458
|
-
"usage-info": D
|
|
2459
|
-
"is-replacing": D
|
|
2460
|
-
error: D
|
|
2461
|
-
onReplace:
|
|
2462
|
-
onClose: D
|
|
2456
|
+
visible: k(D).showReplaceWarning.value,
|
|
2457
|
+
item: k(D).pendingReplaceItem.value,
|
|
2458
|
+
"usage-info": k(D).replaceUsageInfo.value,
|
|
2459
|
+
"is-replacing": k(D).isReplacing.value,
|
|
2460
|
+
error: k(D).replaceError.value,
|
|
2461
|
+
onReplace: k(N).handleReplaceFile,
|
|
2462
|
+
onClose: k(D).cancelReplace
|
|
2463
2463
|
}, null, 8, [
|
|
2464
2464
|
"visible",
|
|
2465
2465
|
"item",
|
|
@@ -2469,7 +2469,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2469
2469
|
"onReplace",
|
|
2470
2470
|
"onClose"
|
|
2471
2471
|
]),
|
|
2472
|
-
M(
|
|
2472
|
+
M(E, {
|
|
2473
2473
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
2474
2474
|
"enter-from-class": "tpl:opacity-0",
|
|
2475
2475
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2477,7 +2477,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2477
2477
|
"leave-from-class": "tpl:opacity-100",
|
|
2478
2478
|
"leave-to-class": "tpl:opacity-0"
|
|
2479
2479
|
}, {
|
|
2480
|
-
default: l(() => [D
|
|
2480
|
+
default: l(() => [k(D).showDeleteWarning.value ? (a(), f("div", {
|
|
2481
2481
|
key: 0,
|
|
2482
2482
|
role: "dialog",
|
|
2483
2483
|
"aria-modal": "true",
|
|
@@ -2488,79 +2488,79 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2488
2488
|
"backdrop-filter": "blur(8px)",
|
|
2489
2489
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2490
2490
|
},
|
|
2491
|
-
onClick: n[10] ||=
|
|
2492
|
-
}, [
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
class:
|
|
2491
|
+
onClick: n[10] ||= w((...e) => k(D).cancelDelete && k(D).cancelDelete(...e), ["self"])
|
|
2492
|
+
}, [T("div", Ln, [
|
|
2493
|
+
T("h3", Rn, y(p.value.mediaLibrary.deleteWarningTitle), 1),
|
|
2494
|
+
T("p", {
|
|
2495
|
+
class: j(["tpl:text-xs", k(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
2496
2496
|
style: { color: "var(--tpl-text-muted)" }
|
|
2497
|
-
},
|
|
2498
|
-
|
|
2499
|
-
|
|
2497
|
+
}, y(p.value.mediaLibrary.deleteWarningMessage), 3),
|
|
2498
|
+
k(N).hasUsedFiles.value ? (a(), f("p", zn, y(p.value.mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
|
|
2499
|
+
k(N).hasUsedFiles.value ? (a(), f("div", Bn, [(a(!0), f(A, null, i(k(D).deleteUsageInfo.value, (e, t) => (a(), f("div", {
|
|
2500
2500
|
key: t,
|
|
2501
2501
|
class: "tpl:text-xs",
|
|
2502
2502
|
style: { color: "var(--tpl-text)" }
|
|
2503
|
-
}, [e.templateCount > 0 ? (
|
|
2504
|
-
|
|
2503
|
+
}, [e.templateCount > 0 ? (a(), f(A, { key: 0 }, [T("span", Vn, y(k(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), T("span", Hn, " - " + y(p.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
|
|
2504
|
+
T("div", Un, [T("button", {
|
|
2505
2505
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2506
2506
|
style: {
|
|
2507
2507
|
"border-color": "var(--tpl-border)",
|
|
2508
2508
|
color: "var(--tpl-text)",
|
|
2509
2509
|
"background-color": "var(--tpl-bg)"
|
|
2510
2510
|
},
|
|
2511
|
-
onClick: n[8] ||= (...e) => D
|
|
2512
|
-
},
|
|
2511
|
+
onClick: n[8] ||= (...e) => k(D).cancelDelete && k(D).cancelDelete(...e)
|
|
2512
|
+
}, y(p.value.mediaLibrary.cancel), 1), T("button", {
|
|
2513
2513
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2514
2514
|
style: {
|
|
2515
2515
|
"border-color": "var(--tpl-danger)",
|
|
2516
2516
|
color: "var(--tpl-danger)",
|
|
2517
2517
|
"background-color": "var(--tpl-bg)"
|
|
2518
2518
|
},
|
|
2519
|
-
onClick: n[9] ||= (...e) => D
|
|
2520
|
-
},
|
|
2521
|
-
])])) :
|
|
2519
|
+
onClick: n[9] ||= (...e) => k(D).confirmDelete && k(D).confirmDelete(...e)
|
|
2520
|
+
}, y(k(N).hasUsedFiles.value ? p.value.mediaLibrary.deleteAnyway : p.value.mediaLibrary.confirmDelete), 1)])
|
|
2521
|
+
])])) : b("", !0)]),
|
|
2522
2522
|
_: 1
|
|
2523
2523
|
}),
|
|
2524
|
-
|
|
2524
|
+
T("div", Wn, [T("div", Gn, [k(D).previewItem.value ? (a(), x(Ft, {
|
|
2525
2525
|
key: 0,
|
|
2526
|
-
item: D
|
|
2527
|
-
folders:
|
|
2528
|
-
}, null, 8, ["item", "folders"])) :
|
|
2526
|
+
item: k(D).previewItem.value,
|
|
2527
|
+
folders: k(N).folderTree.value
|
|
2528
|
+
}, null, 8, ["item", "folders"])) : b("", !0)]), T("div", Kn, [k(D).selectedItems.value.size > 0 ? (a(), f("div", qn, [k(D).previewItem.value ? (a(), f("button", {
|
|
2529
2529
|
key: 0,
|
|
2530
2530
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2531
|
-
style:
|
|
2532
|
-
borderColor:
|
|
2533
|
-
color:
|
|
2531
|
+
style: g({
|
|
2532
|
+
borderColor: k(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
|
|
2533
|
+
color: k(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
|
|
2534
2534
|
backgroundColor: "var(--tpl-bg)"
|
|
2535
2535
|
}),
|
|
2536
|
-
onClick: n[11] ||= (e) =>
|
|
2537
|
-
}, [
|
|
2536
|
+
onClick: n[11] ||= (e) => k(N).copy(k(N).selectedUrl.value)
|
|
2537
|
+
}, [k(N).copied.value ? (a(), x(k(B), {
|
|
2538
2538
|
key: 1,
|
|
2539
2539
|
size: 12,
|
|
2540
2540
|
"stroke-width": 2
|
|
2541
|
-
})) : (
|
|
2541
|
+
})) : (a(), x(k(ae), {
|
|
2542
2542
|
key: 0,
|
|
2543
2543
|
size: 12,
|
|
2544
2544
|
"stroke-width": 2
|
|
2545
|
-
})), m(" " +
|
|
2545
|
+
})), m(" " + y(k(N).copied.value ? p.value.mediaLibrary.copied : p.value.mediaLibrary.copyUrl), 1)], 4)) : b("", !0), H.value ? (a(), f("div", Jn, [T("button", {
|
|
2546
2546
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2547
2547
|
style: {
|
|
2548
2548
|
"border-color": "var(--tpl-border)",
|
|
2549
2549
|
color: "var(--tpl-text)",
|
|
2550
2550
|
"background-color": "var(--tpl-bg)"
|
|
2551
2551
|
},
|
|
2552
|
-
onClick: n[12] ||= (e) =>
|
|
2553
|
-
},
|
|
2552
|
+
onClick: n[12] ||= (e) => k(N).showMovePicker.value = !k(N).showMovePicker.value
|
|
2553
|
+
}, y(p.value.mediaLibrary.moveSelected), 1), k(N).showMovePicker.value ? (a(), x(Ot, {
|
|
2554
2554
|
key: 0,
|
|
2555
|
-
folders:
|
|
2556
|
-
"current-folder-id": D
|
|
2557
|
-
onSelect:
|
|
2558
|
-
onClose: n[13] ||= (e) =>
|
|
2555
|
+
folders: k(N).folderTree.value,
|
|
2556
|
+
"current-folder-id": k(D).currentFolderId.value,
|
|
2557
|
+
onSelect: k(N).handleMoveToFolder,
|
|
2558
|
+
onClose: n[13] ||= (e) => k(N).showMovePicker.value = !1
|
|
2559
2559
|
}, null, 8, [
|
|
2560
2560
|
"folders",
|
|
2561
2561
|
"current-folder-id",
|
|
2562
2562
|
"onSelect"
|
|
2563
|
-
])) :
|
|
2563
|
+
])) : b("", !0)])) : b("", !0)])) : b("", !0), T("div", Yn, [ce.value > 0 ? (a(), f("button", {
|
|
2564
2564
|
key: 0,
|
|
2565
2565
|
"data-testid": "media-delete",
|
|
2566
2566
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
@@ -2570,7 +2570,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2570
2570
|
"background-color": "var(--tpl-bg)"
|
|
2571
2571
|
},
|
|
2572
2572
|
onClick: fe
|
|
2573
|
-
},
|
|
2573
|
+
}, y(p.value.mediaLibrary.deleteSelected), 1)) : b("", !0), e.showConfirm ? (a(), f("button", {
|
|
2574
2574
|
key: 1,
|
|
2575
2575
|
"data-testid": h.value,
|
|
2576
2576
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
@@ -2578,15 +2578,15 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2578
2578
|
"background-color": "var(--tpl-primary)",
|
|
2579
2579
|
color: "var(--tpl-on-primary)"
|
|
2580
2580
|
},
|
|
2581
|
-
disabled: !
|
|
2581
|
+
disabled: !ie.value,
|
|
2582
2582
|
onClick: q
|
|
2583
|
-
},
|
|
2583
|
+
}, y(e.accept?.length ? p.value.mediaLibrary.selectImage : p.value.mediaLibrary.selectFile), 9, Xn)) : b("", !0)])])])
|
|
2584
2584
|
]));
|
|
2585
2585
|
}
|
|
2586
2586
|
}), Qn = /* #__PURE__ */ Object.assign({
|
|
2587
2587
|
"./locales/ca.ts": () => import("./ca-Cc6eL0ZS.js"),
|
|
2588
2588
|
"./locales/de.ts": () => import("./de-DtrXVcuY.js"),
|
|
2589
|
-
"./locales/en.ts": () => import("./en-
|
|
2589
|
+
"./locales/en.ts": () => import("./en-TIqv4ag3.js"),
|
|
2590
2590
|
"./locales/es.ts": () => import("./es-Dw_h7Oll.js"),
|
|
2591
2591
|
"./locales/fr.ts": () => import("./fr-BJaeKu_8.js"),
|
|
2592
2592
|
"./locales/ja.ts": () => import("./ja-Cu2HdYaK.js"),
|
|
@@ -2615,7 +2615,7 @@ async function ar(e) {
|
|
|
2615
2615
|
return (await t()).default;
|
|
2616
2616
|
}
|
|
2617
2617
|
// ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
|
|
2618
|
-
var or = ["data-tpl-theme"], sr = /* @__PURE__ */
|
|
2618
|
+
var or = ["data-tpl-theme"], sr = /* @__PURE__ */ e({
|
|
2619
2619
|
__name: "MediaLibraryModal",
|
|
2620
2620
|
props: {
|
|
2621
2621
|
visible: { type: Boolean },
|
|
@@ -2628,25 +2628,25 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
|
|
|
2628
2628
|
onError: { type: Function }
|
|
2629
2629
|
},
|
|
2630
2630
|
emits: ["close", "select"],
|
|
2631
|
-
setup(
|
|
2632
|
-
let
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
}, { immediate: !0 }),
|
|
2636
|
-
let
|
|
2637
|
-
|
|
2638
|
-
let
|
|
2639
|
-
|
|
2640
|
-
let
|
|
2641
|
-
ge(
|
|
2642
|
-
function
|
|
2643
|
-
e.key === "Escape" && (
|
|
2631
|
+
setup(e, { emit: t }) {
|
|
2632
|
+
let r = e, i = t, o = _(null);
|
|
2633
|
+
c(() => r.locale, async (e) => {
|
|
2634
|
+
o.value = await ar(e ?? "en");
|
|
2635
|
+
}, { immediate: !0 }), n(fe, o);
|
|
2636
|
+
let s = O(() => r.uiTheme);
|
|
2637
|
+
n(Y, s);
|
|
2638
|
+
let u = S(() => r.popoverTarget ?? null);
|
|
2639
|
+
n(J, u), n(X, S(() => r.locale));
|
|
2640
|
+
let d = _(null), p = _(null);
|
|
2641
|
+
ge(d, O(() => r.visible && o.value !== null && !p.value?.nestedDialogOpen));
|
|
2642
|
+
function m(e) {
|
|
2643
|
+
e.key === "Escape" && (p.value?.handleEscape() ? e.preventDefault() : i("close"));
|
|
2644
2644
|
}
|
|
2645
|
-
P(document, "keydown",
|
|
2646
|
-
function
|
|
2647
|
-
|
|
2645
|
+
P(document, "keydown", m);
|
|
2646
|
+
function h(e) {
|
|
2647
|
+
i("select", e), i("close");
|
|
2648
2648
|
}
|
|
2649
|
-
return (
|
|
2649
|
+
return (t, n) => (a(), x(v, { to: e.popoverTarget || "body" }, [M(E, {
|
|
2650
2650
|
"enter-active-class": "tpl:transition tpl:duration-200",
|
|
2651
2651
|
"enter-from-class": "tpl:opacity-0",
|
|
2652
2652
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2654,20 +2654,20 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
|
|
|
2654
2654
|
"leave-from-class": "tpl:opacity-100",
|
|
2655
2655
|
"leave-to-class": "tpl:opacity-0"
|
|
2656
2656
|
}, {
|
|
2657
|
-
default: l(() => [
|
|
2657
|
+
default: l(() => [e.visible && o.value ? (a(), f("div", {
|
|
2658
2658
|
key: 0,
|
|
2659
2659
|
"data-testid": "media-library-modal",
|
|
2660
|
-
"data-tpl-theme":
|
|
2661
|
-
class:
|
|
2660
|
+
"data-tpl-theme": s.value,
|
|
2661
|
+
class: j([e.popoverTarget ? void 0 : "tpl", "tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
2662
2662
|
style: {
|
|
2663
2663
|
"background-color": "var(--tpl-overlay)",
|
|
2664
2664
|
"backdrop-filter": "blur(8px)",
|
|
2665
2665
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2666
2666
|
},
|
|
2667
|
-
onClick: n[1] ||=
|
|
2668
|
-
}, [
|
|
2667
|
+
onClick: n[1] ||= w((e) => i("close"), ["self"])
|
|
2668
|
+
}, [T("div", {
|
|
2669
2669
|
ref_key: "dialogRef",
|
|
2670
|
-
ref:
|
|
2670
|
+
ref: d,
|
|
2671
2671
|
role: "dialog",
|
|
2672
2672
|
"aria-modal": "true",
|
|
2673
2673
|
"aria-labelledby": "tpl-media-library-title",
|
|
@@ -2684,28 +2684,28 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
|
|
|
2684
2684
|
}
|
|
2685
2685
|
}, [M(Zn, {
|
|
2686
2686
|
ref_key: "chromeRef",
|
|
2687
|
-
ref:
|
|
2688
|
-
provider:
|
|
2689
|
-
accept:
|
|
2690
|
-
"template-id":
|
|
2691
|
-
"on-error":
|
|
2692
|
-
translations:
|
|
2687
|
+
ref: p,
|
|
2688
|
+
provider: e.provider,
|
|
2689
|
+
accept: e.accept,
|
|
2690
|
+
"template-id": e.templateId,
|
|
2691
|
+
"on-error": e.onError,
|
|
2692
|
+
translations: o.value,
|
|
2693
2693
|
"show-close": "",
|
|
2694
2694
|
"show-confirm": "",
|
|
2695
2695
|
"confirm-test-id": "media-confirm",
|
|
2696
|
-
onClose: n[0] ||= (e) =>
|
|
2697
|
-
onConfirm:
|
|
2696
|
+
onClose: n[0] ||= (e) => i("close"),
|
|
2697
|
+
onConfirm: h
|
|
2698
2698
|
}, null, 8, [
|
|
2699
2699
|
"provider",
|
|
2700
2700
|
"accept",
|
|
2701
2701
|
"template-id",
|
|
2702
2702
|
"on-error",
|
|
2703
2703
|
"translations"
|
|
2704
|
-
])], 512)], 10, or)) :
|
|
2704
|
+
])], 512)], 10, or)) : b("", !0)]),
|
|
2705
2705
|
_: 1
|
|
2706
2706
|
})], 8, ["to"]));
|
|
2707
2707
|
}
|
|
2708
2708
|
});
|
|
2709
2709
|
export { sr as MediaLibraryModal, J as a, pe as i, Q as n, Y as o, Z as r, ge as t };
|
|
2710
2710
|
|
|
2711
|
-
//# sourceMappingURL=editor-modal-
|
|
2711
|
+
//# sourceMappingURL=editor-modal-CyCe560f.js.map
|