@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,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-
|
|
3
|
-
import { h as N } from "./dist-
|
|
4
|
-
import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-
|
|
5
|
-
import { t as B } from "./createLucideIcon-
|
|
6
|
-
import { t as V } from "./check-
|
|
7
|
-
import { t as ee } from "./chevron-right-
|
|
8
|
-
import { n as te, t as ne } from "./upload-
|
|
9
|
-
import { t as re } from "./link-
|
|
10
|
-
import { t as ie } from "./list-
|
|
11
|
-
import { t as H } from "./loader-circle-
|
|
12
|
-
import { t as U } from "./pencil-
|
|
13
|
-
import { n as W, t as G } from "./refresh-cw-
|
|
14
|
-
import { t as ae } from "./search-
|
|
15
|
-
import { t as oe } from "./trash-
|
|
16
|
-
import { t as se } from "./x-
|
|
1
|
+
import { $ as e, C as t, F as n, H as r, J as i, M as a, Mt as o, N as s, Nt as c, O as l, U as u, X as d, _ as f, a as p, at as m, c as h, d as g, f as _, g as v, j as y, jt as b, l as x, r as S, rt as C, st as w, u as T, v as E, y as D, z as O } from "./vue.runtime.esm-bundler-CnEeTfhs.js";
|
|
2
|
+
import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-BURR-bj5.js";
|
|
3
|
+
import { h as N } from "./dist-CVy-7PHQ.js";
|
|
4
|
+
import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-ByCWA2Tv.js";
|
|
5
|
+
import { t as B } from "./createLucideIcon-CvhTA2KG.js";
|
|
6
|
+
import { t as V } from "./check-BZ8o0eet.js";
|
|
7
|
+
import { t as ee } from "./chevron-right-Bk4mGdr7.js";
|
|
8
|
+
import { n as te, t as ne } from "./upload-DuFEOi_0.js";
|
|
9
|
+
import { t as re } from "./link-ju_2Cmir.js";
|
|
10
|
+
import { t as ie } from "./list-DYZJf0aZ.js";
|
|
11
|
+
import { t as H } from "./loader-circle-BZRD0a4I.js";
|
|
12
|
+
import { t as U } from "./pencil-D3aFCL7c.js";
|
|
13
|
+
import { n as W, t as G } from "./refresh-cw-xnro7_Sk.js";
|
|
14
|
+
import { t as ae } from "./search-CDrstRBv.js";
|
|
15
|
+
import { t as oe } from "./trash-DxCd7zIy.js";
|
|
16
|
+
import { t as se } from "./x-BpfG7v9g.js";
|
|
17
17
|
import { t as K } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
18
18
|
var q = B({
|
|
19
19
|
name: "file",
|
|
@@ -171,13 +171,13 @@ var q = B({
|
|
|
171
171
|
} };
|
|
172
172
|
// ../media-library/src/composables/useI18n.ts
|
|
173
173
|
function Q(e) {
|
|
174
|
-
let n = e ?? t(de, null), r = (
|
|
175
|
-
function
|
|
174
|
+
let n = e ?? t(de, null), r = (i(n) ? n.value : n) ?? pe;
|
|
175
|
+
function a(e, t) {
|
|
176
176
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
177
177
|
}
|
|
178
178
|
return {
|
|
179
179
|
t: r,
|
|
180
|
-
format:
|
|
180
|
+
format: a
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
183
|
// ../media-library/src/composables/useMediaCategories.ts
|
|
@@ -190,15 +190,15 @@ var me = [
|
|
|
190
190
|
function he(e) {
|
|
191
191
|
let n = e ?? t(ue, null);
|
|
192
192
|
if (!n) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
|
|
193
|
-
let r = n, i =
|
|
193
|
+
let r = n, i = h(() => !0), a = h(() => r.maxFileSize ?? Infinity), o = h(() => {
|
|
194
194
|
let e = r.accept;
|
|
195
195
|
if (e && e.length > 0) return e;
|
|
196
196
|
let t = r.mimeTypes;
|
|
197
197
|
return t ? Object.keys(t) : me;
|
|
198
|
-
}), s =
|
|
198
|
+
}), s = h(() => {
|
|
199
199
|
let e = r.mimeTypes;
|
|
200
200
|
return e ? o.value.flatMap((t) => e[t] ?? []) : [];
|
|
201
|
-
}), c =
|
|
201
|
+
}), c = h(() => s.value.join(",")), l = h(() => r.mimeTypes !== void 0);
|
|
202
202
|
function u(e, t) {
|
|
203
203
|
let n = r.mimeTypes;
|
|
204
204
|
return !n || (t && t.length > 0 ? t : Object.keys(n)).some((t) => n[t]?.includes(e) ?? !1);
|
|
@@ -210,7 +210,7 @@ function he(e) {
|
|
|
210
210
|
let t = r.mimeTypes;
|
|
211
211
|
return t ? t.images?.includes(e) ?? !1 : e.startsWith("image/");
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function p(e) {
|
|
214
214
|
let t = r.mimeTypes;
|
|
215
215
|
if (!t) return null;
|
|
216
216
|
for (let [n, r] of Object.entries(t)) if (r?.includes(e)) return n;
|
|
@@ -226,7 +226,7 @@ function he(e) {
|
|
|
226
226
|
isAcceptedMimeType: u,
|
|
227
227
|
isAcceptedFile: d,
|
|
228
228
|
isImageMimeType: f,
|
|
229
|
-
getCategoryForMimeType:
|
|
229
|
+
getCategoryForMimeType: p
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
232
|
// ../media-library/src/composables/useFocusTrap.ts
|
|
@@ -260,11 +260,11 @@ function _e(e, t) {
|
|
|
260
260
|
let t = e.restoreFocus !== !1;
|
|
261
261
|
i !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(i), i = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
|
|
262
262
|
}
|
|
263
|
-
let
|
|
263
|
+
let u = O([t, e], ([e, t]) => {
|
|
264
264
|
e && t ? c() : l();
|
|
265
265
|
}, { flush: "post" });
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
d(() => {
|
|
267
|
+
u(), l();
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
270
|
// ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -283,31 +283,31 @@ var ve = {
|
|
|
283
283
|
},
|
|
284
284
|
emits: ["navigate"],
|
|
285
285
|
setup(e, { emit: t }) {
|
|
286
|
-
let n = e, r = t, { t: i } = Q(),
|
|
286
|
+
let n = e, r = t, { t: i } = Q(), a = h(() => {
|
|
287
287
|
if (!n.currentFolderId) return [];
|
|
288
288
|
let e = [];
|
|
289
|
-
return
|
|
289
|
+
return o(n.folders, n.currentFolderId, e), e;
|
|
290
290
|
});
|
|
291
|
-
function
|
|
291
|
+
function o(e, t, n) {
|
|
292
292
|
for (let r of e) {
|
|
293
293
|
if (r.id === t) return n.push(r), !0;
|
|
294
|
-
if (
|
|
294
|
+
if (o(r.children, t, n)) return n.unshift(r), !0;
|
|
295
295
|
}
|
|
296
296
|
return !1;
|
|
297
297
|
}
|
|
298
|
-
return (e, t) =>
|
|
298
|
+
return (e, t) => a.value.length > 0 ? (y(), _("div", ve, [x("button", {
|
|
299
299
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
300
300
|
style: { color: "var(--tpl-primary)" },
|
|
301
301
|
onClick: t[0] ||= (e) => r("navigate", null)
|
|
302
|
-
},
|
|
302
|
+
}, c(w(i).mediaLibrary.allFiles), 1), (y(!0), _(S, null, s(a.value, (e, t) => (y(), _(S, { key: e.id }, [f(w(ee), {
|
|
303
303
|
size: 12,
|
|
304
304
|
"stroke-width": 2
|
|
305
|
-
}), t <
|
|
305
|
+
}), t < a.value.length - 1 ? (y(), _("button", {
|
|
306
306
|
key: 0,
|
|
307
307
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
308
308
|
style: { color: "var(--tpl-primary)" },
|
|
309
309
|
onClick: (t) => r("navigate", e.id)
|
|
310
|
-
},
|
|
310
|
+
}, c(e.name), 9, ye)) : (y(), _("span", be, c(e.name), 1))], 64))), 128))])) : g("", !0);
|
|
311
311
|
}
|
|
312
312
|
}), Se = ["aria-expanded", "aria-label"], Ce = {
|
|
313
313
|
key: 1,
|
|
@@ -331,76 +331,76 @@ var ve = {
|
|
|
331
331
|
"renameFolder",
|
|
332
332
|
"deleteFolder"
|
|
333
333
|
],
|
|
334
|
-
setup(t, { emit:
|
|
335
|
-
let
|
|
334
|
+
setup(t, { emit: r }) {
|
|
335
|
+
let i = t, a = r, { t: l } = Q(), d = e(!1), p = e(!1), m = e(""), v = e(!1), C = e(""), E = e(!1), D = h(() => i.folder.children.length > 0), O = h(() => i.depth < 4), M = h(() => i.currentFolderId === i.folder.id), N = h(() => i.currentFolderId ? F(i.folder.children, i.currentFolderId) : !1), P = h(() => d.value || N.value);
|
|
336
336
|
function F(e, t) {
|
|
337
337
|
for (let n of e) if (n.id === t || F(n.children, t)) return !0;
|
|
338
338
|
return !1;
|
|
339
339
|
}
|
|
340
340
|
function I() {
|
|
341
|
-
|
|
341
|
+
d.value = !d.value;
|
|
342
342
|
}
|
|
343
343
|
function L() {
|
|
344
|
-
|
|
344
|
+
p.value = !0, m.value = i.folder.name;
|
|
345
345
|
}
|
|
346
346
|
function R() {
|
|
347
|
-
let e =
|
|
348
|
-
e && e !==
|
|
347
|
+
let e = m.value.trim();
|
|
348
|
+
e && e !== i.folder.name && a("renameFolder", i.folder.id, e), p.value = !1, m.value = "";
|
|
349
349
|
}
|
|
350
350
|
function z() {
|
|
351
|
-
|
|
351
|
+
p.value = !1, m.value = "";
|
|
352
352
|
}
|
|
353
353
|
function B() {
|
|
354
|
-
|
|
354
|
+
v.value = !0, C.value = "", d.value = !0;
|
|
355
355
|
}
|
|
356
356
|
function V() {
|
|
357
|
-
C.value.trim() &&
|
|
357
|
+
C.value.trim() && a("createFolder", C.value.trim(), i.folder.id), v.value = !1, C.value = "";
|
|
358
358
|
}
|
|
359
359
|
function te() {
|
|
360
|
-
|
|
360
|
+
v.value = !1, C.value = "";
|
|
361
361
|
}
|
|
362
362
|
function ne() {
|
|
363
|
-
E.value ? (
|
|
363
|
+
E.value ? (a("deleteFolder", i.folder.id), E.value = !1) : E.value = !0;
|
|
364
364
|
}
|
|
365
365
|
function re(e) {
|
|
366
366
|
let t = e.relatedTarget;
|
|
367
367
|
t && e.currentTarget.contains(t) || (E.value = !1);
|
|
368
368
|
}
|
|
369
|
-
return (
|
|
370
|
-
let
|
|
371
|
-
return
|
|
369
|
+
return (e, r) => {
|
|
370
|
+
let i = n("MediaFolderTreeNode", !0);
|
|
371
|
+
return y(), _("div", null, [x("div", {
|
|
372
372
|
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",
|
|
373
|
-
style:
|
|
373
|
+
style: o({
|
|
374
374
|
paddingLeft: `${t.depth * 16 + 8}px`,
|
|
375
375
|
backgroundColor: M.value ? "var(--tpl-bg-active)" : "transparent",
|
|
376
376
|
color: M.value ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
377
377
|
}),
|
|
378
378
|
onFocusout: re
|
|
379
379
|
}, [
|
|
380
|
-
D.value ||
|
|
380
|
+
D.value || v.value ? (y(), _("button", {
|
|
381
381
|
key: 0,
|
|
382
382
|
type: "button",
|
|
383
383
|
class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
384
384
|
"aria-expanded": P.value,
|
|
385
|
-
"aria-label": P.value ?
|
|
385
|
+
"aria-label": P.value ? w(l).mediaLibrary.collapseFolder : w(l).mediaLibrary.expandFolder,
|
|
386
386
|
onClick: A(I, ["stop"])
|
|
387
|
-
}, [
|
|
388
|
-
class:
|
|
387
|
+
}, [f(w(ee), {
|
|
388
|
+
class: b(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
|
|
389
389
|
size: 10,
|
|
390
390
|
"stroke-width": 2
|
|
391
|
-
}, null, 8, ["class"])], 8, Se)) : (
|
|
392
|
-
|
|
391
|
+
}, null, 8, ["class"])], 8, Se)) : (y(), _("span", Ce)),
|
|
392
|
+
x("button", {
|
|
393
393
|
type: "button",
|
|
394
394
|
class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
|
|
395
|
-
onClick:
|
|
396
|
-
}, [
|
|
395
|
+
onClick: r[0] ||= (e) => a("navigate", t.folder.id)
|
|
396
|
+
}, [f(w(J), {
|
|
397
397
|
class: "tpl:shrink-0",
|
|
398
398
|
size: 14,
|
|
399
399
|
"stroke-width": 1.5
|
|
400
|
-
}),
|
|
401
|
-
|
|
400
|
+
}), p.value ? g("", !0) : (y(), _("span", we, c(t.folder.name), 1))]),
|
|
401
|
+
p.value ? u((y(), _("input", {
|
|
402
402
|
key: 2,
|
|
403
|
-
"onUpdate:modelValue":
|
|
403
|
+
"onUpdate:modelValue": r[1] ||= (e) => m.value = e,
|
|
404
404
|
type: "text",
|
|
405
405
|
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",
|
|
406
406
|
style: {
|
|
@@ -411,49 +411,49 @@ var ve = {
|
|
|
411
411
|
autofocus: "",
|
|
412
412
|
onKeydown: [j(R, ["enter"]), j(A(z, ["stop"]), ["escape"])],
|
|
413
413
|
onBlur: R,
|
|
414
|
-
onClick:
|
|
415
|
-
}, null, 40, Te)), [[k,
|
|
416
|
-
|
|
414
|
+
onClick: r[2] ||= A(() => {}, ["stop"])
|
|
415
|
+
}, null, 40, Te)), [[k, m.value]]) : g("", !0),
|
|
416
|
+
p.value ? g("", !0) : (y(), _("span", {
|
|
417
417
|
key: 3,
|
|
418
|
-
class:
|
|
418
|
+
class: b(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", M.value || E.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
|
|
419
419
|
}, [
|
|
420
|
-
O.value && t.canCreateFolder ? (
|
|
420
|
+
O.value && t.canCreateFolder ? (y(), _("button", {
|
|
421
421
|
key: 0,
|
|
422
422
|
type: "button",
|
|
423
423
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
424
|
-
title:
|
|
425
|
-
"aria-label":
|
|
424
|
+
title: w(l).mediaLibrary.addSubfolder,
|
|
425
|
+
"aria-label": w(l).mediaLibrary.addSubfolder,
|
|
426
426
|
onClick: A(B, ["stop"])
|
|
427
|
-
}, [
|
|
427
|
+
}, [f(w(W), {
|
|
428
428
|
size: 12,
|
|
429
429
|
"stroke-width": 2
|
|
430
|
-
})], 8, Ee)) :
|
|
431
|
-
t.canRenameFolder ? (
|
|
430
|
+
})], 8, Ee)) : g("", !0),
|
|
431
|
+
t.canRenameFolder ? (y(), _("button", {
|
|
432
432
|
key: 1,
|
|
433
433
|
type: "button",
|
|
434
434
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
435
|
-
title:
|
|
436
|
-
"aria-label":
|
|
435
|
+
title: w(l).mediaLibrary.renameFolder,
|
|
436
|
+
"aria-label": w(l).mediaLibrary.renameFolder,
|
|
437
437
|
onClick: A(L, ["stop"])
|
|
438
|
-
}, [
|
|
438
|
+
}, [f(w(U), {
|
|
439
439
|
size: 12,
|
|
440
440
|
"stroke-width": 2
|
|
441
|
-
})], 8, De)) :
|
|
442
|
-
t.canDeleteFolder ? (
|
|
441
|
+
})], 8, De)) : g("", !0),
|
|
442
|
+
t.canDeleteFolder ? (y(), _("button", {
|
|
443
443
|
key: 2,
|
|
444
444
|
type: "button",
|
|
445
445
|
"data-testid": "media-folder-delete",
|
|
446
446
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
447
|
-
title: E.value ?
|
|
448
|
-
"aria-label": E.value ?
|
|
447
|
+
title: E.value ? w(l).mediaLibrary.deleteFolderConfirm : w(l).mediaLibrary.deleteFolder,
|
|
448
|
+
"aria-label": E.value ? w(l).mediaLibrary.deleteFolderConfirm : w(l).mediaLibrary.deleteFolder,
|
|
449
449
|
onClick: A(ne, ["stop"])
|
|
450
|
-
}, [
|
|
450
|
+
}, [f(w(oe), {
|
|
451
451
|
size: 12,
|
|
452
452
|
"stroke-width": 2,
|
|
453
453
|
style: { color: "var(--tpl-danger)" }
|
|
454
|
-
})], 8, Oe)) :
|
|
454
|
+
})], 8, Oe)) : g("", !0)
|
|
455
455
|
], 2))
|
|
456
|
-
], 36), P.value ? (
|
|
456
|
+
], 36), P.value ? (y(), _("div", ke, [(y(!0), _(S, null, s(t.folder.children, (e) => (y(), T(i, {
|
|
457
457
|
key: e.id,
|
|
458
458
|
folder: e,
|
|
459
459
|
"current-folder-id": t.currentFolderId,
|
|
@@ -461,10 +461,10 @@ var ve = {
|
|
|
461
461
|
"can-create-folder": t.canCreateFolder,
|
|
462
462
|
"can-rename-folder": t.canRenameFolder,
|
|
463
463
|
"can-delete-folder": t.canDeleteFolder,
|
|
464
|
-
onNavigate:
|
|
465
|
-
onCreateFolder:
|
|
466
|
-
onRenameFolder:
|
|
467
|
-
onDeleteFolder:
|
|
464
|
+
onNavigate: r[3] ||= (e) => a("navigate", e),
|
|
465
|
+
onCreateFolder: r[4] ||= (e, t) => a("createFolder", e, t),
|
|
466
|
+
onRenameFolder: r[5] ||= (e, t) => a("renameFolder", e, t),
|
|
467
|
+
onDeleteFolder: r[6] ||= (e) => a("deleteFolder", e)
|
|
468
468
|
}, null, 8, [
|
|
469
469
|
"folder",
|
|
470
470
|
"current-folder-id",
|
|
@@ -472,12 +472,12 @@ var ve = {
|
|
|
472
472
|
"can-create-folder",
|
|
473
473
|
"can-rename-folder",
|
|
474
474
|
"can-delete-folder"
|
|
475
|
-
]))), 128)),
|
|
475
|
+
]))), 128)), v.value ? (y(), _("div", {
|
|
476
476
|
key: 0,
|
|
477
|
-
style:
|
|
477
|
+
style: o({ paddingLeft: `${(t.depth + 1) * 16 + 8}px` }),
|
|
478
478
|
class: "tpl:py-1.5 tpl:pr-2"
|
|
479
|
-
}, [
|
|
480
|
-
"onUpdate:modelValue":
|
|
479
|
+
}, [u(x("input", {
|
|
480
|
+
"onUpdate:modelValue": r[7] ||= (e) => C.value = e,
|
|
481
481
|
type: "text",
|
|
482
482
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
483
483
|
style: {
|
|
@@ -485,11 +485,11 @@ var ve = {
|
|
|
485
485
|
"background-color": "var(--tpl-bg)",
|
|
486
486
|
color: "var(--tpl-text)"
|
|
487
487
|
},
|
|
488
|
-
placeholder:
|
|
488
|
+
placeholder: w(l).mediaLibrary.subfolderName,
|
|
489
489
|
autofocus: "",
|
|
490
490
|
onKeydown: [j(V, ["enter"]), j(A(te, ["stop"]), ["escape"])],
|
|
491
491
|
onBlur: V
|
|
492
|
-
}, null, 40, Ae), [[k, C.value]])], 4)) :
|
|
492
|
+
}, null, 40, Ae), [[k, C.value]])], 4)) : g("", !0)])) : g("", !0)]);
|
|
493
493
|
};
|
|
494
494
|
}
|
|
495
495
|
}), Me = {
|
|
@@ -516,41 +516,41 @@ var ve = {
|
|
|
516
516
|
"deleteFolder",
|
|
517
517
|
"showFrequentlyUsed"
|
|
518
518
|
],
|
|
519
|
-
setup(
|
|
520
|
-
let
|
|
521
|
-
function
|
|
522
|
-
|
|
523
|
-
}
|
|
524
|
-
function f() {
|
|
525
|
-
l.value.trim() && n("createFolder", l.value.trim()), s.value = !1, l.value = "";
|
|
519
|
+
setup(t, { emit: n }) {
|
|
520
|
+
let r = n, { t: i } = Q(), a = e(!1), l = e("");
|
|
521
|
+
function d() {
|
|
522
|
+
a.value = !0, l.value = "";
|
|
526
523
|
}
|
|
527
524
|
function p() {
|
|
528
|
-
|
|
525
|
+
l.value.trim() && r("createFolder", l.value.trim()), a.value = !1, l.value = "";
|
|
526
|
+
}
|
|
527
|
+
function m() {
|
|
528
|
+
a.value = !1, l.value = "";
|
|
529
529
|
}
|
|
530
|
-
return (
|
|
531
|
-
|
|
530
|
+
return (e, n) => (y(), _("div", Me, [
|
|
531
|
+
x("button", {
|
|
532
532
|
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",
|
|
533
|
-
style:
|
|
534
|
-
backgroundColor:
|
|
535
|
-
color:
|
|
533
|
+
style: o({
|
|
534
|
+
backgroundColor: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
|
|
535
|
+
color: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
536
536
|
}),
|
|
537
|
-
onClick:
|
|
538
|
-
}, [
|
|
537
|
+
onClick: n[0] ||= (e) => r("navigate", null)
|
|
538
|
+
}, [f(w(q), {
|
|
539
539
|
size: 14,
|
|
540
540
|
"stroke-width": 1.5
|
|
541
|
-
}),
|
|
542
|
-
(
|
|
543
|
-
key:
|
|
544
|
-
folder:
|
|
545
|
-
"current-folder-id":
|
|
541
|
+
}), v(" " + c(w(i).mediaLibrary.allFiles), 1)], 4),
|
|
542
|
+
(y(!0), _(S, null, s(t.folders, (e) => (y(), T(je, {
|
|
543
|
+
key: e.id,
|
|
544
|
+
folder: e,
|
|
545
|
+
"current-folder-id": t.currentFolderId,
|
|
546
546
|
depth: 0,
|
|
547
|
-
"can-create-folder":
|
|
548
|
-
"can-rename-folder":
|
|
549
|
-
"can-delete-folder":
|
|
550
|
-
onNavigate:
|
|
551
|
-
onCreateFolder:
|
|
552
|
-
onRenameFolder:
|
|
553
|
-
onDeleteFolder:
|
|
547
|
+
"can-create-folder": t.canCreateFolder,
|
|
548
|
+
"can-rename-folder": t.canRenameFolder,
|
|
549
|
+
"can-delete-folder": t.canDeleteFolder,
|
|
550
|
+
onNavigate: n[1] ||= (e) => r("navigate", e),
|
|
551
|
+
onCreateFolder: n[2] ||= (e, t) => r("createFolder", e, t),
|
|
552
|
+
onRenameFolder: n[3] ||= (e, t) => r("renameFolder", e, t),
|
|
553
|
+
onDeleteFolder: n[4] ||= (e) => r("deleteFolder", e)
|
|
554
554
|
}, null, 8, [
|
|
555
555
|
"folder",
|
|
556
556
|
"current-folder-id",
|
|
@@ -558,8 +558,8 @@ var ve = {
|
|
|
558
558
|
"can-rename-folder",
|
|
559
559
|
"can-delete-folder"
|
|
560
560
|
]))), 128)),
|
|
561
|
-
|
|
562
|
-
"onUpdate:modelValue":
|
|
561
|
+
a.value ? (y(), _("div", Ne, [u(x("input", {
|
|
562
|
+
"onUpdate:modelValue": n[5] ||= (e) => l.value = e,
|
|
563
563
|
type: "text",
|
|
564
564
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
565
565
|
style: {
|
|
@@ -567,35 +567,35 @@ var ve = {
|
|
|
567
567
|
"background-color": "var(--tpl-bg)",
|
|
568
568
|
color: "var(--tpl-text)"
|
|
569
569
|
},
|
|
570
|
-
placeholder:
|
|
570
|
+
placeholder: w(i).mediaLibrary.folderName,
|
|
571
571
|
autofocus: "",
|
|
572
|
-
onKeydown: [j(
|
|
573
|
-
onBlur:
|
|
574
|
-
}, null, 40, Pe), [[k, l.value]])])) :
|
|
575
|
-
!
|
|
572
|
+
onKeydown: [j(p, ["enter"]), j(A(m, ["stop"]), ["escape"])],
|
|
573
|
+
onBlur: p
|
|
574
|
+
}, null, 40, Pe), [[k, l.value]])])) : g("", !0),
|
|
575
|
+
!a.value && t.canCreateFolder ? (y(), _("button", {
|
|
576
576
|
key: 1,
|
|
577
577
|
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",
|
|
578
578
|
style: { color: "var(--tpl-text-muted)" },
|
|
579
|
-
onClick:
|
|
580
|
-
}, [
|
|
579
|
+
onClick: d
|
|
580
|
+
}, [f(w(W), {
|
|
581
581
|
size: 14,
|
|
582
582
|
"stroke-width": 1.5
|
|
583
|
-
}),
|
|
584
|
-
|
|
585
|
-
|
|
583
|
+
}), v(" " + c(w(i).mediaLibrary.newFolder), 1)])) : g("", !0),
|
|
584
|
+
n[7] ||= x("div", { class: "tpl:flex-1" }, null, -1),
|
|
585
|
+
t.hasFrequentlyUsed ? (y(), _("button", {
|
|
586
586
|
key: 2,
|
|
587
587
|
"data-testid": "media-frequently-used",
|
|
588
588
|
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",
|
|
589
|
-
style:
|
|
589
|
+
style: o({
|
|
590
590
|
borderColor: "var(--tpl-border)",
|
|
591
|
-
backgroundColor:
|
|
592
|
-
color:
|
|
591
|
+
backgroundColor: t.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
|
|
592
|
+
color: t.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
593
593
|
}),
|
|
594
|
-
onClick:
|
|
595
|
-
}, [
|
|
594
|
+
onClick: n[6] ||= (e) => r("showFrequentlyUsed")
|
|
595
|
+
}, [f(w(le), {
|
|
596
596
|
size: 14,
|
|
597
597
|
"stroke-width": 1.5
|
|
598
|
-
}),
|
|
598
|
+
}), v(" " + c(w(i).mediaLibrary.frequentlyUsed), 1)], 4)) : g("", !0)
|
|
599
599
|
]));
|
|
600
600
|
}
|
|
601
601
|
}), Ie = /* @__PURE__ */ D({
|
|
@@ -698,11 +698,11 @@ var ve = {
|
|
|
698
698
|
color: "var(--tpl-text-muted)",
|
|
699
699
|
bgColor: "var(--tpl-bg-hover)",
|
|
700
700
|
icon: "document"
|
|
701
|
-
}, i =
|
|
702
|
-
return (e, t) => (
|
|
701
|
+
}, i = h(() => n[t.mimeType] ?? r);
|
|
702
|
+
return (e, t) => (y(), _("div", {
|
|
703
703
|
class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2",
|
|
704
|
-
style:
|
|
705
|
-
}, [i.value.icon === "document" ? (
|
|
704
|
+
style: o({ backgroundColor: i.value.bgColor })
|
|
705
|
+
}, [i.value.icon === "document" ? (y(), _("svg", {
|
|
706
706
|
key: 0,
|
|
707
707
|
width: "60",
|
|
708
708
|
height: "60",
|
|
@@ -710,23 +710,23 @@ var ve = {
|
|
|
710
710
|
fill: "none",
|
|
711
711
|
stroke: "currentColor",
|
|
712
712
|
"stroke-width": "1.5",
|
|
713
|
-
style:
|
|
713
|
+
style: o({ color: i.value.color })
|
|
714
714
|
}, [...t[0] ||= [
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
715
|
+
x("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
|
|
716
|
+
x("polyline", { points: "14 2 14 8 20 8" }, null, -1),
|
|
717
|
+
x("line", {
|
|
718
718
|
x1: "8",
|
|
719
719
|
y1: "13",
|
|
720
720
|
x2: "16",
|
|
721
721
|
y2: "13"
|
|
722
722
|
}, null, -1),
|
|
723
|
-
|
|
723
|
+
x("line", {
|
|
724
724
|
x1: "8",
|
|
725
725
|
y1: "17",
|
|
726
726
|
x2: "12",
|
|
727
727
|
y2: "17"
|
|
728
728
|
}, null, -1)
|
|
729
|
-
]], 4)) : i.value.icon === "video" ? (
|
|
729
|
+
]], 4)) : i.value.icon === "video" ? (y(), _("svg", {
|
|
730
730
|
key: 1,
|
|
731
731
|
width: "40",
|
|
732
732
|
height: "40",
|
|
@@ -734,18 +734,18 @@ var ve = {
|
|
|
734
734
|
fill: "none",
|
|
735
735
|
stroke: "currentColor",
|
|
736
736
|
"stroke-width": "1.5",
|
|
737
|
-
style:
|
|
738
|
-
}, [...t[1] ||= [
|
|
737
|
+
style: o({ color: i.value.color })
|
|
738
|
+
}, [...t[1] ||= [x("rect", {
|
|
739
739
|
x: "2",
|
|
740
740
|
y: "4",
|
|
741
741
|
width: "20",
|
|
742
742
|
height: "16",
|
|
743
743
|
rx: "2"
|
|
744
|
-
}, null, -1),
|
|
744
|
+
}, null, -1), x("polygon", {
|
|
745
745
|
points: "10,8 16,12 10,16",
|
|
746
746
|
fill: "currentColor",
|
|
747
747
|
stroke: "none"
|
|
748
|
-
}, null, -1)]], 4)) : (
|
|
748
|
+
}, null, -1)]], 4)) : (y(), _("svg", {
|
|
749
749
|
key: 2,
|
|
750
750
|
width: "40",
|
|
751
751
|
height: "40",
|
|
@@ -753,23 +753,23 @@ var ve = {
|
|
|
753
753
|
fill: "none",
|
|
754
754
|
stroke: "currentColor",
|
|
755
755
|
"stroke-width": "1.5",
|
|
756
|
-
style:
|
|
756
|
+
style: o({ color: i.value.color })
|
|
757
757
|
}, [...t[2] ||= [
|
|
758
|
-
|
|
759
|
-
|
|
758
|
+
x("path", { d: "M9 18V5l12-2v13" }, null, -1),
|
|
759
|
+
x("circle", {
|
|
760
760
|
cx: "6",
|
|
761
761
|
cy: "18",
|
|
762
762
|
r: "3"
|
|
763
763
|
}, null, -1),
|
|
764
|
-
|
|
764
|
+
x("circle", {
|
|
765
765
|
cx: "18",
|
|
766
766
|
cy: "16",
|
|
767
767
|
r: "3"
|
|
768
768
|
}, null, -1)
|
|
769
|
-
]], 4)),
|
|
769
|
+
]], 4)), x("span", {
|
|
770
770
|
class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
|
|
771
|
-
style:
|
|
772
|
-
},
|
|
771
|
+
style: o({ color: i.value.color })
|
|
772
|
+
}, c(i.value.label), 5)], 4));
|
|
773
773
|
}
|
|
774
774
|
});
|
|
775
775
|
// ../media-library/src/utils/formatAbsoluteDate.ts
|
|
@@ -891,30 +891,30 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
891
891
|
"confirm"
|
|
892
892
|
],
|
|
893
893
|
setup(n, { emit: r }) {
|
|
894
|
-
let i = n,
|
|
895
|
-
function
|
|
894
|
+
let i = n, a = r, { isAcceptedMimeType: l, isImageMimeType: u } = he();
|
|
895
|
+
function d(e) {
|
|
896
896
|
return e.mimeType ?? "";
|
|
897
897
|
}
|
|
898
898
|
function p(e) {
|
|
899
899
|
return e.thumbnailUrl ?? e.url;
|
|
900
900
|
}
|
|
901
|
-
function
|
|
902
|
-
return !i.accept || i.accept.length === 0 || l(
|
|
901
|
+
function m(e) {
|
|
902
|
+
return !i.accept || i.accept.length === 0 || l(d(e), i.accept);
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function h(e) {
|
|
905
905
|
return i.canUpdate === !0 && e.canUpdate !== !1;
|
|
906
906
|
}
|
|
907
907
|
function C(e) {
|
|
908
908
|
return i.canReplace === !0 && e.canUpdate !== !1;
|
|
909
909
|
}
|
|
910
910
|
function E(e, t) {
|
|
911
|
-
t.metaKey || t.ctrlKey ?
|
|
911
|
+
t.metaKey || t.ctrlKey ? a("toggle", e.id) : a("select", e);
|
|
912
912
|
}
|
|
913
913
|
function D(e) {
|
|
914
|
-
|
|
914
|
+
m(e) && a("confirm", e);
|
|
915
915
|
}
|
|
916
916
|
function O(e, t) {
|
|
917
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(),
|
|
917
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), a("select", e));
|
|
918
918
|
}
|
|
919
919
|
function k(e) {
|
|
920
920
|
return i.selectedIds.has(e.id);
|
|
@@ -922,9 +922,9 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
922
922
|
function j(e) {
|
|
923
923
|
return k(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
|
|
924
924
|
}
|
|
925
|
-
let { t: M } = Q(), N = t(Z, null), P =
|
|
925
|
+
let { t: M } = Q(), N = t(Z, null), P = e(null);
|
|
926
926
|
R(P, ([{ isIntersecting: e }]) => {
|
|
927
|
-
e && i.hasMore && !i.isLoading &&
|
|
927
|
+
e && i.hasMore && !i.isLoading && a("loadMore");
|
|
928
928
|
}, { threshold: .1 });
|
|
929
929
|
function F(e) {
|
|
930
930
|
return Le(e, N?.value, {
|
|
@@ -933,123 +933,123 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
933
933
|
day: "numeric"
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
|
-
return (
|
|
937
|
-
n.isLoading && n.items.length === 0 ? (
|
|
936
|
+
return (e, t) => (y(), _("div", ze, [
|
|
937
|
+
n.isLoading && n.items.length === 0 ? (y(), _("div", {
|
|
938
938
|
key: 0,
|
|
939
939
|
role: "status",
|
|
940
940
|
"aria-busy": "true",
|
|
941
|
-
"aria-label":
|
|
942
|
-
class:
|
|
943
|
-
}, [(
|
|
944
|
-
key:
|
|
945
|
-
class:
|
|
941
|
+
"aria-label": w(M).mediaLibrary.loading,
|
|
942
|
+
class: b(n.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
|
|
943
|
+
}, [(y(), _(S, null, s(8, (e) => x("div", {
|
|
944
|
+
key: e,
|
|
945
|
+
class: b(["tpl-pulse tpl:rounded-lg", n.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
|
|
946
946
|
style: { "background-color": "var(--tpl-bg-hover)" },
|
|
947
947
|
"aria-hidden": "true"
|
|
948
|
-
}, null, 2)), 64))], 10, Be)) : n.items.length === 0 ? (
|
|
948
|
+
}, null, 2)), 64))], 10, Be)) : n.items.length === 0 ? (y(), _("div", Ve, [f(w(q), {
|
|
949
949
|
class: "tpl:mb-3",
|
|
950
950
|
size: 40,
|
|
951
951
|
"stroke-width": 1,
|
|
952
952
|
style: { color: "var(--tpl-text-dim)" }
|
|
953
|
-
}),
|
|
953
|
+
}), x("p", He, c(n.searchQuery ? w(M).mediaLibrary.noSearchResults : w(M).mediaLibrary.noFiles), 1)])) : n.layout === "list" ? (y(), _("div", {
|
|
954
954
|
key: 3,
|
|
955
955
|
role: "listbox",
|
|
956
|
-
"aria-label":
|
|
956
|
+
"aria-label": w(M).mediaLibrary.filesListAriaLabel,
|
|
957
957
|
"aria-multiselectable": "true",
|
|
958
958
|
class: "tpl:flex tpl:flex-col tpl:gap-1"
|
|
959
|
-
}, [(
|
|
960
|
-
key:
|
|
959
|
+
}, [(y(!0), _(S, null, s(n.items, (e) => (y(), _("div", {
|
|
960
|
+
key: e.id,
|
|
961
961
|
role: "option",
|
|
962
962
|
tabindex: "0",
|
|
963
963
|
"data-testid": "media-library-item",
|
|
964
|
-
class:
|
|
965
|
-
"data-media-id":
|
|
966
|
-
"aria-selected": k(
|
|
967
|
-
"aria-label":
|
|
968
|
-
style:
|
|
969
|
-
onClick: (
|
|
970
|
-
onDblclick: (
|
|
971
|
-
onKeydown: (
|
|
964
|
+
class: b(["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", [!m(e) && !k(e) ? "tpl:opacity-60" : ""]]),
|
|
965
|
+
"data-media-id": e.id,
|
|
966
|
+
"aria-selected": k(e),
|
|
967
|
+
"aria-label": e.filename || e.url,
|
|
968
|
+
style: o({ backgroundColor: k(e) ? "var(--tpl-bg-hover)" : "transparent" }),
|
|
969
|
+
onClick: (t) => E(e, t),
|
|
970
|
+
onDblclick: (t) => D(e),
|
|
971
|
+
onKeydown: (t) => O(e, t)
|
|
972
972
|
}, [
|
|
973
|
-
|
|
973
|
+
x("div", rt, [w(u)(d(e)) ? (y(), _("img", {
|
|
974
974
|
key: 0,
|
|
975
|
-
src: p(
|
|
976
|
-
alt:
|
|
975
|
+
src: p(e),
|
|
976
|
+
alt: e.filename || e.url,
|
|
977
977
|
class: "tpl:size-full tpl:object-cover",
|
|
978
978
|
loading: "lazy"
|
|
979
|
-
}, null, 8, it)) : (
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
979
|
+
}, null, 8, it)) : (y(), _("div", at, [f(Ie, { "mime-type": d(e) }, null, 8, ["mime-type"])]))]),
|
|
980
|
+
x("div", ot, [x("p", st, c(e.filename || e.url), 1), x("p", ct, [
|
|
981
|
+
e.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(c(w($)(e.size)), 1)], 64)),
|
|
982
|
+
e.createdAt ? (y(), _(S, { key: 1 }, [e.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(" · ")], 64)), v(" " + c(F(e.createdAt)), 1)], 64)) : g("", !0),
|
|
983
|
+
w(u)(d(e)) && e.width && e.height ? (y(), _(S, { key: 2 }, [v(" · " + c(e.width) + "×" + c(e.height), 1)], 64)) : g("", !0)
|
|
984
984
|
])]),
|
|
985
|
-
|
|
985
|
+
x("div", { class: b(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(e)]) }, [h(e) ? (y(), _("button", {
|
|
986
986
|
key: 0,
|
|
987
987
|
type: "button",
|
|
988
988
|
"data-testid": "media-edit",
|
|
989
989
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
990
990
|
style: { color: "var(--tpl-text-muted)" },
|
|
991
|
-
title:
|
|
992
|
-
"aria-label":
|
|
993
|
-
onClick: A((
|
|
994
|
-
}, [
|
|
991
|
+
title: w(M).mediaLibrary.editFile,
|
|
992
|
+
"aria-label": w(M).mediaLibrary.editFile,
|
|
993
|
+
onClick: A((t) => a("edit", e), ["stop"])
|
|
994
|
+
}, [f(w(U), {
|
|
995
995
|
size: 12,
|
|
996
996
|
"stroke-width": 2
|
|
997
|
-
})], 8, lt)) :
|
|
997
|
+
})], 8, lt)) : g("", !0), C(e) ? (y(), _("button", {
|
|
998
998
|
key: 1,
|
|
999
999
|
type: "button",
|
|
1000
1000
|
"data-testid": "media-replace",
|
|
1001
1001
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
1002
1002
|
style: { color: "var(--tpl-text-muted)" },
|
|
1003
|
-
title:
|
|
1004
|
-
"aria-label":
|
|
1005
|
-
onClick: A((
|
|
1006
|
-
}, [
|
|
1003
|
+
title: w(M).mediaLibrary.replaceFile,
|
|
1004
|
+
"aria-label": w(M).mediaLibrary.replaceFile,
|
|
1005
|
+
onClick: A((t) => a("replace", e), ["stop"])
|
|
1006
|
+
}, [f(w(G), {
|
|
1007
1007
|
size: 12,
|
|
1008
1008
|
"stroke-width": 2
|
|
1009
|
-
})], 8, ut)) :
|
|
1010
|
-
k(
|
|
1009
|
+
})], 8, ut)) : g("", !0)], 2),
|
|
1010
|
+
k(e) ? (y(), _("div", dt, [f(w(V), {
|
|
1011
1011
|
size: 12,
|
|
1012
1012
|
"stroke-width": 3
|
|
1013
|
-
})])) :
|
|
1014
|
-
], 46, nt))), 128))], 8, tt)) : (
|
|
1013
|
+
})])) : g("", !0)
|
|
1014
|
+
], 46, nt))), 128))], 8, tt)) : (y(), _("div", {
|
|
1015
1015
|
key: 2,
|
|
1016
1016
|
role: "listbox",
|
|
1017
|
-
"aria-label":
|
|
1017
|
+
"aria-label": w(M).mediaLibrary.filesListAriaLabel,
|
|
1018
1018
|
"aria-multiselectable": "true",
|
|
1019
1019
|
class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
|
|
1020
|
-
}, [(
|
|
1021
|
-
key:
|
|
1020
|
+
}, [(y(!0), _(S, null, s(n.items, (e) => (y(), _("div", {
|
|
1021
|
+
key: e.id,
|
|
1022
1022
|
role: "option",
|
|
1023
1023
|
tabindex: "0",
|
|
1024
1024
|
"data-testid": "media-library-item",
|
|
1025
|
-
class:
|
|
1025
|
+
class: b(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
|
|
1026
1026
|
"tpl:cursor-pointer",
|
|
1027
|
-
!
|
|
1028
|
-
k(
|
|
1027
|
+
!m(e) && !k(e) ? "tpl:opacity-60" : "",
|
|
1028
|
+
k(e) ? "tpl-media-item--selected" : ""
|
|
1029
1029
|
]]),
|
|
1030
|
-
"data-media-id":
|
|
1031
|
-
"aria-selected": k(
|
|
1032
|
-
"aria-label":
|
|
1033
|
-
style:
|
|
1034
|
-
borderColor: k(
|
|
1035
|
-
backgroundColor: !
|
|
1030
|
+
"data-media-id": e.id,
|
|
1031
|
+
"aria-selected": k(e),
|
|
1032
|
+
"aria-label": e.filename || e.url,
|
|
1033
|
+
style: o({
|
|
1034
|
+
borderColor: k(e) ? "var(--tpl-primary)" : "transparent",
|
|
1035
|
+
backgroundColor: !m(e) && !k(e) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
|
|
1036
1036
|
}),
|
|
1037
|
-
onClick: (
|
|
1038
|
-
onDblclick: (
|
|
1039
|
-
onKeydown: (
|
|
1037
|
+
onClick: (t) => E(e, t),
|
|
1038
|
+
onDblclick: (t) => D(e),
|
|
1039
|
+
onKeydown: (t) => O(e, t)
|
|
1040
1040
|
}, [
|
|
1041
|
-
|
|
1041
|
+
x("div", Ge, [w(u)(d(e)) ? (y(), _("img", {
|
|
1042
1042
|
key: 0,
|
|
1043
|
-
src: p(
|
|
1044
|
-
alt:
|
|
1043
|
+
src: p(e),
|
|
1044
|
+
alt: e.filename || e.url,
|
|
1045
1045
|
class: "tpl:size-full tpl:object-cover",
|
|
1046
1046
|
loading: "lazy"
|
|
1047
|
-
}, null, 8, Ke)) : (
|
|
1047
|
+
}, null, 8, Ke)) : (y(), T(Ie, {
|
|
1048
1048
|
key: 1,
|
|
1049
|
-
"mime-type":
|
|
1049
|
+
"mime-type": d(e)
|
|
1050
1050
|
}, null, 8, ["mime-type"]))]),
|
|
1051
|
-
|
|
1052
|
-
|
|
1051
|
+
x("div", qe, [x("p", Je, c(e.filename || e.url), 1), x("p", Ye, [e.size == null ? g("", !0) : (y(), _("span", Xe, c(w($)(e.size)), 1)), w(u)(d(e)) && e.width && e.height ? (y(), _("span", Ze, c(e.width) + "×" + c(e.height), 1)) : g("", !0)])]),
|
|
1052
|
+
x("div", { class: b(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(e)]) }, [h(e) ? (y(), _("button", {
|
|
1053
1053
|
key: 0,
|
|
1054
1054
|
type: "button",
|
|
1055
1055
|
"data-testid": "media-edit",
|
|
@@ -1058,13 +1058,13 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1058
1058
|
"background-color": "var(--tpl-overlay)",
|
|
1059
1059
|
color: "var(--tpl-on-primary)"
|
|
1060
1060
|
},
|
|
1061
|
-
title:
|
|
1062
|
-
"aria-label":
|
|
1063
|
-
onClick: A((
|
|
1064
|
-
}, [
|
|
1061
|
+
title: w(M).mediaLibrary.editFile,
|
|
1062
|
+
"aria-label": w(M).mediaLibrary.editFile,
|
|
1063
|
+
onClick: A((t) => a("edit", e), ["stop"])
|
|
1064
|
+
}, [f(w(U), {
|
|
1065
1065
|
size: 11,
|
|
1066
1066
|
"stroke-width": 2
|
|
1067
|
-
})], 8, Qe)) :
|
|
1067
|
+
})], 8, Qe)) : g("", !0), C(e) ? (y(), _("button", {
|
|
1068
1068
|
key: 1,
|
|
1069
1069
|
type: "button",
|
|
1070
1070
|
"data-testid": "media-replace",
|
|
@@ -1073,29 +1073,29 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1073
1073
|
"background-color": "var(--tpl-overlay)",
|
|
1074
1074
|
color: "var(--tpl-on-primary)"
|
|
1075
1075
|
},
|
|
1076
|
-
title:
|
|
1077
|
-
"aria-label":
|
|
1078
|
-
onClick: A((
|
|
1079
|
-
}, [
|
|
1076
|
+
title: w(M).mediaLibrary.replaceFile,
|
|
1077
|
+
"aria-label": w(M).mediaLibrary.replaceFile,
|
|
1078
|
+
onClick: A((t) => a("replace", e), ["stop"])
|
|
1079
|
+
}, [f(w(G), {
|
|
1080
1080
|
size: 11,
|
|
1081
1081
|
"stroke-width": 2
|
|
1082
|
-
})], 8, $e)) :
|
|
1083
|
-
k(
|
|
1082
|
+
})], 8, $e)) : g("", !0)], 2),
|
|
1083
|
+
k(e) ? (y(), _("div", et, [f(w(V), {
|
|
1084
1084
|
size: 12,
|
|
1085
1085
|
"stroke-width": 3
|
|
1086
|
-
})])) :
|
|
1086
|
+
})])) : g("", !0)
|
|
1087
1087
|
], 46, We))), 128))], 8, Ue)),
|
|
1088
|
-
|
|
1088
|
+
x("div", {
|
|
1089
1089
|
ref_key: "sentinelRef",
|
|
1090
1090
|
ref: P,
|
|
1091
1091
|
class: "tpl:h-4"
|
|
1092
1092
|
}, null, 512),
|
|
1093
|
-
n.isLoading && n.items.length > 0 ? (
|
|
1093
|
+
n.isLoading && n.items.length > 0 ? (y(), _("div", ft, [f(w(H), {
|
|
1094
1094
|
class: "tpl-spinner",
|
|
1095
1095
|
size: 20,
|
|
1096
1096
|
"stroke-width": 2,
|
|
1097
1097
|
style: { color: "var(--tpl-primary)" }
|
|
1098
|
-
})])) :
|
|
1098
|
+
})])) : g("", !0)
|
|
1099
1099
|
]));
|
|
1100
1100
|
}
|
|
1101
1101
|
}), [["__scopeId", "data-v-57c35946"]]), mt = ["data-tpl-theme"], ht = {
|
|
@@ -1126,23 +1126,23 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1126
1126
|
},
|
|
1127
1127
|
emits: ["import", "close"],
|
|
1128
1128
|
setup(n, { emit: i }) {
|
|
1129
|
-
let
|
|
1130
|
-
O(() =>
|
|
1131
|
-
e && (
|
|
1129
|
+
let a = n, o = i, { t: s } = Q(), l = t(fe, null), d = t(X, e(null)), m = e("");
|
|
1130
|
+
O(() => a.visible, (e) => {
|
|
1131
|
+
e && (m.value = "");
|
|
1132
1132
|
});
|
|
1133
|
-
function
|
|
1134
|
-
let e =
|
|
1135
|
-
e && !
|
|
1133
|
+
function S() {
|
|
1134
|
+
let e = m.value.trim();
|
|
1135
|
+
e && !a.isImporting && o("import", e);
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1138
|
-
|
|
1137
|
+
function C() {
|
|
1138
|
+
a.isImporting || o("close");
|
|
1139
1139
|
}
|
|
1140
|
-
let E =
|
|
1141
|
-
_e(E,
|
|
1140
|
+
let E = e(null);
|
|
1141
|
+
_e(E, h(() => a.visible));
|
|
1142
1142
|
function D(e) {
|
|
1143
|
-
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(),
|
|
1143
|
+
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), S()), e.key === "Escape" && C();
|
|
1144
1144
|
}
|
|
1145
|
-
return (
|
|
1145
|
+
return (e, t) => (y(), T(p, { to: w(d) || "body" }, [f(M, {
|
|
1146
1146
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1147
1147
|
"enter-from-class": "tpl:opacity-0",
|
|
1148
1148
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1150,14 +1150,14 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1150
1150
|
"leave-from-class": "tpl:opacity-100",
|
|
1151
1151
|
"leave-to-class": "tpl:opacity-0"
|
|
1152
1152
|
}, {
|
|
1153
|
-
default:
|
|
1153
|
+
default: r(() => [n.visible ? (y(), _("div", {
|
|
1154
1154
|
key: 0,
|
|
1155
|
-
"data-tpl-theme":
|
|
1156
|
-
class:
|
|
1155
|
+
"data-tpl-theme": w(l),
|
|
1156
|
+
class: b([w(d) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1157
1157
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1158
|
-
onClick: A(
|
|
1158
|
+
onClick: A(C, ["self"]),
|
|
1159
1159
|
onKeydown: D
|
|
1160
|
-
}, [
|
|
1160
|
+
}, [x("div", {
|
|
1161
1161
|
ref_key: "dialogRef",
|
|
1162
1162
|
ref: E,
|
|
1163
1163
|
role: "dialog",
|
|
@@ -1166,11 +1166,11 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1166
1166
|
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",
|
|
1167
1167
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1168
1168
|
}, [
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
"onUpdate:modelValue":
|
|
1169
|
+
x("h3", ht, c(w(s).mediaLibrary.importFromUrl), 1),
|
|
1170
|
+
x("div", gt, [u(x("input", {
|
|
1171
|
+
"onUpdate:modelValue": t[0] ||= (e) => m.value = e,
|
|
1172
1172
|
type: "url",
|
|
1173
|
-
"aria-label":
|
|
1173
|
+
"aria-label": w(s).mediaLibrary.importFromUrl,
|
|
1174
1174
|
"aria-invalid": !!n.error,
|
|
1175
1175
|
"aria-describedby": n.error ? "tpl-media-import-error" : void 0,
|
|
1176
1176
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
@@ -1179,34 +1179,34 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1179
1179
|
"background-color": "var(--tpl-bg)",
|
|
1180
1180
|
color: "var(--tpl-text)"
|
|
1181
1181
|
},
|
|
1182
|
-
placeholder:
|
|
1182
|
+
placeholder: w(s).mediaLibrary.importUrlPlaceholder,
|
|
1183
1183
|
disabled: n.isImporting,
|
|
1184
1184
|
autofocus: ""
|
|
1185
|
-
}, null, 8, _t), [[k,
|
|
1186
|
-
n.error ? (
|
|
1187
|
-
|
|
1188
|
-
class:
|
|
1185
|
+
}, null, 8, _t), [[k, m.value]])]),
|
|
1186
|
+
n.error ? (y(), _("p", vt, c(n.error), 1)) : g("", !0),
|
|
1187
|
+
x("div", yt, [x("button", {
|
|
1188
|
+
class: b(["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": n.isImporting }]),
|
|
1189
1189
|
style: {
|
|
1190
1190
|
"border-color": "var(--tpl-border)",
|
|
1191
1191
|
color: "var(--tpl-text)",
|
|
1192
1192
|
"background-color": "var(--tpl-bg)"
|
|
1193
1193
|
},
|
|
1194
1194
|
disabled: n.isImporting,
|
|
1195
|
-
onClick:
|
|
1196
|
-
},
|
|
1195
|
+
onClick: C
|
|
1196
|
+
}, c(w(s).mediaLibrary.cancel), 11, bt), x("button", {
|
|
1197
1197
|
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",
|
|
1198
1198
|
style: {
|
|
1199
1199
|
"background-color": "var(--tpl-primary)",
|
|
1200
1200
|
color: "var(--tpl-on-primary)"
|
|
1201
1201
|
},
|
|
1202
|
-
disabled: !
|
|
1203
|
-
onClick:
|
|
1204
|
-
}, [n.isImporting ? (
|
|
1202
|
+
disabled: !m.value.trim() || n.isImporting,
|
|
1203
|
+
onClick: S
|
|
1204
|
+
}, [n.isImporting ? (y(), _("span", St, [f(w(H), {
|
|
1205
1205
|
class: "tpl:animate-spin",
|
|
1206
1206
|
size: 12,
|
|
1207
1207
|
"stroke-width": 2
|
|
1208
|
-
}),
|
|
1209
|
-
], 512)], 42, mt)) :
|
|
1208
|
+
}), v(" " + c(w(s).mediaLibrary.importing), 1)])) : (y(), _("span", Ct, c(w(s).mediaLibrary.import), 1))], 8, xt)])
|
|
1209
|
+
], 512)], 42, mt)) : g("", !0)]),
|
|
1210
1210
|
_: 1
|
|
1211
1211
|
})], 8, ["to"]));
|
|
1212
1212
|
}
|
|
@@ -1221,55 +1221,55 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1221
1221
|
currentFolderId: {}
|
|
1222
1222
|
},
|
|
1223
1223
|
emits: ["select", "close"],
|
|
1224
|
-
setup(
|
|
1225
|
-
let
|
|
1226
|
-
function
|
|
1224
|
+
setup(t, { emit: n }) {
|
|
1225
|
+
let r = n, { t: i } = Q(), a = e(null);
|
|
1226
|
+
function l(e, t = 0) {
|
|
1227
1227
|
let n = [];
|
|
1228
1228
|
for (let r of e) n.push({
|
|
1229
1229
|
id: r.id,
|
|
1230
1230
|
name: r.name,
|
|
1231
1231
|
depth: t
|
|
1232
|
-
}), r.children.length && n.push(...
|
|
1232
|
+
}), r.children.length && n.push(...l(r.children, t + 1));
|
|
1233
1233
|
return n;
|
|
1234
1234
|
}
|
|
1235
|
-
return z(
|
|
1236
|
-
|
|
1237
|
-
}), (
|
|
1235
|
+
return z(a, () => {
|
|
1236
|
+
r("close");
|
|
1237
|
+
}), (e, n) => (y(), _("div", {
|
|
1238
1238
|
ref_key: "pickerRef",
|
|
1239
|
-
ref:
|
|
1239
|
+
ref: a,
|
|
1240
1240
|
"data-testid": "media-move-picker",
|
|
1241
1241
|
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",
|
|
1242
1242
|
style: {
|
|
1243
1243
|
"border-color": "var(--tpl-border)",
|
|
1244
1244
|
"background-color": "var(--tpl-bg-elevated)"
|
|
1245
1245
|
}
|
|
1246
|
-
}, [
|
|
1246
|
+
}, [x("div", Tt, [t.currentFolderId === null ? g("", !0) : (y(), _("button", {
|
|
1247
1247
|
key: 0,
|
|
1248
1248
|
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",
|
|
1249
1249
|
style: { color: "var(--tpl-text)" },
|
|
1250
|
-
onClick:
|
|
1251
|
-
}, [
|
|
1250
|
+
onClick: n[0] ||= (e) => r("select", null)
|
|
1251
|
+
}, [f(w(q), {
|
|
1252
1252
|
class: "tpl:shrink-0",
|
|
1253
1253
|
size: 14,
|
|
1254
1254
|
"stroke-width": 1.5
|
|
1255
|
-
}),
|
|
1256
|
-
key:
|
|
1255
|
+
}), v(" " + c(w(i).mediaLibrary.moveToRoot), 1)])), (y(!0), _(S, null, s(l(t.folders), (e) => (y(), _("button", {
|
|
1256
|
+
key: e.id,
|
|
1257
1257
|
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",
|
|
1258
|
-
style:
|
|
1259
|
-
paddingLeft: `${
|
|
1260
|
-
color:
|
|
1261
|
-
opacity:
|
|
1258
|
+
style: o({
|
|
1259
|
+
paddingLeft: `${e.depth * 16 + 12}px`,
|
|
1260
|
+
color: e.id === t.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
|
|
1261
|
+
opacity: e.id === t.currentFolderId ? .5 : 1
|
|
1262
1262
|
}),
|
|
1263
|
-
disabled:
|
|
1264
|
-
onClick: (
|
|
1263
|
+
disabled: e.id === t.currentFolderId,
|
|
1264
|
+
onClick: (t) => r("select", e.id)
|
|
1265
1265
|
}, [
|
|
1266
|
-
|
|
1266
|
+
f(w(J), {
|
|
1267
1267
|
class: "tpl:shrink-0",
|
|
1268
1268
|
size: 14,
|
|
1269
1269
|
"stroke-width": 1.5
|
|
1270
1270
|
}),
|
|
1271
|
-
|
|
1272
|
-
|
|
1271
|
+
x("span", Dt, c(e.name), 1),
|
|
1272
|
+
e.id === t.currentFolderId ? (y(), _("span", Ot, c(w(i).mediaLibrary.currentFolder), 1)) : g("", !0)
|
|
1273
1273
|
], 12, Et))), 128))])], 512));
|
|
1274
1274
|
}
|
|
1275
1275
|
}), At = { class: "tpl:flex tpl:items-center tpl:gap-3" }, jt = ["src", "alt"], Mt = {
|
|
@@ -1288,62 +1288,62 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1288
1288
|
item: {},
|
|
1289
1289
|
folders: {}
|
|
1290
1290
|
},
|
|
1291
|
-
setup(
|
|
1292
|
-
let
|
|
1293
|
-
function
|
|
1291
|
+
setup(e) {
|
|
1292
|
+
let n = e, r = t(Z, null), { isImageMimeType: i } = he();
|
|
1293
|
+
function a(e, t, n = []) {
|
|
1294
1294
|
for (let r of e) {
|
|
1295
1295
|
let e = [...n, r.name];
|
|
1296
1296
|
if (r.id === t) return e;
|
|
1297
1297
|
if (r.children.length) {
|
|
1298
|
-
let n =
|
|
1298
|
+
let n = a(r.children, t, e);
|
|
1299
1299
|
if (n) return n;
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
1302
|
return null;
|
|
1303
1303
|
}
|
|
1304
|
-
let
|
|
1305
|
-
if (!
|
|
1306
|
-
let e =
|
|
1304
|
+
let o = h(() => {
|
|
1305
|
+
if (!n.item.folderId || !n.folders) return null;
|
|
1306
|
+
let e = a(n.folders, n.item.folderId);
|
|
1307
1307
|
return e ? e.join("/") : null;
|
|
1308
|
-
}),
|
|
1309
|
-
function
|
|
1310
|
-
return Le(e,
|
|
1308
|
+
}), s = h(() => n.item.mimeType ?? ""), l = h(() => i(s.value));
|
|
1309
|
+
function u(e) {
|
|
1310
|
+
return Le(e, r?.value, {
|
|
1311
1311
|
year: "numeric",
|
|
1312
1312
|
month: "short",
|
|
1313
1313
|
day: "numeric"
|
|
1314
1314
|
});
|
|
1315
1315
|
}
|
|
1316
|
-
let
|
|
1317
|
-
return (t,
|
|
1316
|
+
let d = h(() => n.item.filename || n.item.url);
|
|
1317
|
+
return (t, n) => (y(), _("div", At, [l.value ? (y(), _("img", {
|
|
1318
1318
|
key: 0,
|
|
1319
|
-
src:
|
|
1320
|
-
alt:
|
|
1319
|
+
src: e.item.url,
|
|
1320
|
+
alt: e.item.alt || d.value,
|
|
1321
1321
|
class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
|
|
1322
1322
|
style: { border: "1px solid var(--tpl-border)" }
|
|
1323
|
-
}, null, 8, jt)) : (
|
|
1324
|
-
"mime-type":
|
|
1323
|
+
}, null, 8, jt)) : (y(), _("div", Mt, [f(Ie, {
|
|
1324
|
+
"mime-type": s.value,
|
|
1325
1325
|
class: "tpl-preview-icon"
|
|
1326
|
-
}, null, 8, ["mime-type"])])),
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1326
|
+
}, null, 8, ["mime-type"])])), x("div", Nt, [
|
|
1327
|
+
x("p", Pt, c(d.value), 1),
|
|
1328
|
+
x("p", Ft, [
|
|
1329
|
+
e.item.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(c(w($)(e.item.size)), 1)], 64)),
|
|
1330
|
+
e.item.createdAt ? (y(), _(S, { key: 1 }, [e.item.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(" · ")], 64)), v(" " + c(u(e.item.createdAt)), 1)], 64)) : g("", !0),
|
|
1331
|
+
l.value && e.item.width && e.item.height ? (y(), _(S, { key: 2 }, [v(" · " + c(e.item.width) + "×" + c(e.item.height) + "px ", 1)], 64)) : g("", !0),
|
|
1332
|
+
o.value ? (y(), _(S, { key: 3 }, [
|
|
1333
|
+
n[0] ||= v(" · ", -1),
|
|
1334
|
+
f(w(J), {
|
|
1335
1335
|
class: "tpl:mb-px tpl:inline",
|
|
1336
1336
|
size: 9,
|
|
1337
1337
|
"stroke-width": 2
|
|
1338
1338
|
}),
|
|
1339
|
-
|
|
1340
|
-
], 64)) :
|
|
1339
|
+
v(" " + c(o.value), 1)
|
|
1340
|
+
], 64)) : g("", !0)
|
|
1341
1341
|
]),
|
|
1342
|
-
|
|
1342
|
+
l.value ? (y(), _("p", {
|
|
1343
1343
|
key: 0,
|
|
1344
|
-
class:
|
|
1344
|
+
class: b(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt }]),
|
|
1345
1345
|
style: { color: "var(--tpl-text-dim)" }
|
|
1346
|
-
},
|
|
1346
|
+
}, c(e.item.alt || "\xA0"), 3)) : g("", !0)
|
|
1347
1347
|
])]));
|
|
1348
1348
|
}
|
|
1349
1349
|
}), [["__scopeId", "data-v-50993988"]]), Lt = ["data-tpl-theme"], Rt = {
|
|
@@ -1386,28 +1386,28 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1386
1386
|
error: {}
|
|
1387
1387
|
},
|
|
1388
1388
|
emits: ["replace", "close"],
|
|
1389
|
-
setup(n, { emit:
|
|
1390
|
-
let
|
|
1391
|
-
if (!
|
|
1392
|
-
let e = (
|
|
1389
|
+
setup(n, { emit: i }) {
|
|
1390
|
+
let a = n, o = i, { t: s } = Q(), l = t(fe, null), u = t(X, e(null)), d = e(null), m = e(null), v = h(() => {
|
|
1391
|
+
if (!a.item) return "";
|
|
1392
|
+
let e = (a.item.filename ?? "").split(".");
|
|
1393
1393
|
return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
|
|
1394
|
-
}),
|
|
1395
|
-
O(() =>
|
|
1396
|
-
e || (
|
|
1394
|
+
}), S = h(() => v.value ? `.${v.value}` : "*"), C = h(() => (a.usageInfo?.templateCount ?? 0) > 0);
|
|
1395
|
+
O(() => a.visible, (e) => {
|
|
1396
|
+
e || (m.value = null, d.value && (d.value.value = ""));
|
|
1397
1397
|
});
|
|
1398
1398
|
function E(e) {
|
|
1399
1399
|
let t = e.target;
|
|
1400
|
-
t.files && t.files.length > 0 && (
|
|
1400
|
+
t.files && t.files.length > 0 && (m.value = t.files[0]);
|
|
1401
1401
|
}
|
|
1402
1402
|
function D() {
|
|
1403
|
-
|
|
1403
|
+
m.value && o("replace", m.value);
|
|
1404
1404
|
}
|
|
1405
|
-
let k =
|
|
1406
|
-
_e(k,
|
|
1405
|
+
let k = e(null);
|
|
1406
|
+
_e(k, h(() => a.visible && a.item !== null));
|
|
1407
1407
|
function j(e) {
|
|
1408
1408
|
e.stopPropagation(), e.key === "Escape" && o("close");
|
|
1409
1409
|
}
|
|
1410
|
-
return (
|
|
1410
|
+
return (e, t) => (y(), T(p, { to: w(u) || "body" }, [f(M, {
|
|
1411
1411
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1412
1412
|
"enter-from-class": "tpl:opacity-0",
|
|
1413
1413
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1415,14 +1415,14 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1415
1415
|
"leave-from-class": "tpl:opacity-100",
|
|
1416
1416
|
"leave-to-class": "tpl:opacity-0"
|
|
1417
1417
|
}, {
|
|
1418
|
-
default:
|
|
1418
|
+
default: r(() => [n.visible && n.item ? (y(), _("div", {
|
|
1419
1419
|
key: 0,
|
|
1420
|
-
"data-tpl-theme":
|
|
1421
|
-
class:
|
|
1420
|
+
"data-tpl-theme": w(l),
|
|
1421
|
+
class: b([w(u) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1422
1422
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1423
|
-
onClick:
|
|
1423
|
+
onClick: t[1] ||= A((e) => o("close"), ["self"]),
|
|
1424
1424
|
onKeydown: j
|
|
1425
|
-
}, [
|
|
1425
|
+
}, [x("div", {
|
|
1426
1426
|
ref_key: "dialogRef",
|
|
1427
1427
|
ref: k,
|
|
1428
1428
|
role: "dialog",
|
|
@@ -1431,15 +1431,15 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1431
1431
|
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",
|
|
1432
1432
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1433
1433
|
}, [
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1434
|
+
x("h3", Rt, c(w(s).mediaLibrary.replaceWarningTitle), 1),
|
|
1435
|
+
x("p", zt, c(w(s).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${v.value}`)), 1),
|
|
1436
|
+
C.value ? (y(), _("p", Bt, c(w(s).mediaLibrary.replaceWarningUsageNote.replace("{count}", n.usageInfo.templateCount.toString())), 1)) : g("", !0),
|
|
1437
|
+
x("div", Vt, [x("p", Ht, c(n.item.filename), 1)]),
|
|
1438
|
+
x("div", Ut, [x("label", Wt, c(w(s).mediaLibrary.replaceSelectFile), 1), x("input", {
|
|
1439
1439
|
ref_key: "fileInputRef",
|
|
1440
|
-
ref:
|
|
1440
|
+
ref: d,
|
|
1441
1441
|
type: "file",
|
|
1442
|
-
accept:
|
|
1442
|
+
accept: S.value,
|
|
1443
1443
|
"aria-invalid": !!n.error,
|
|
1444
1444
|
"aria-describedby": n.error ? "tpl-media-replace-error" : void 0,
|
|
1445
1445
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
|
|
@@ -1450,8 +1450,8 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1450
1450
|
},
|
|
1451
1451
|
onChange: E
|
|
1452
1452
|
}, null, 40, Gt)]),
|
|
1453
|
-
n.error ? (
|
|
1454
|
-
|
|
1453
|
+
n.error ? (y(), _("p", Kt, c(n.error), 1)) : g("", !0),
|
|
1454
|
+
x("div", qt, [x("button", {
|
|
1455
1455
|
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",
|
|
1456
1456
|
style: {
|
|
1457
1457
|
"border-color": "var(--tpl-border)",
|
|
@@ -1459,17 +1459,17 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1459
1459
|
"background-color": "var(--tpl-bg)"
|
|
1460
1460
|
},
|
|
1461
1461
|
disabled: n.isReplacing,
|
|
1462
|
-
onClick:
|
|
1463
|
-
},
|
|
1462
|
+
onClick: t[0] ||= (e) => o("close")
|
|
1463
|
+
}, c(w(s).mediaLibrary.cancel), 9, Jt), x("button", {
|
|
1464
1464
|
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",
|
|
1465
1465
|
style: {
|
|
1466
1466
|
"background-color": "var(--tpl-primary)",
|
|
1467
1467
|
color: "var(--tpl-on-primary)"
|
|
1468
1468
|
},
|
|
1469
|
-
disabled: !
|
|
1469
|
+
disabled: !m.value || n.isReplacing,
|
|
1470
1470
|
onClick: D
|
|
1471
|
-
},
|
|
1472
|
-
], 512)], 42, Lt)) :
|
|
1471
|
+
}, c(n.isReplacing ? w(s).mediaLibrary.replacing : w(s).mediaLibrary.replace), 9, Yt)])
|
|
1472
|
+
], 512)], 42, Lt)) : g("", !0)]),
|
|
1473
1473
|
_: 1
|
|
1474
1474
|
})], 8, ["to"]));
|
|
1475
1475
|
}
|
|
@@ -1520,63 +1520,63 @@ var Qt = [
|
|
|
1520
1520
|
},
|
|
1521
1521
|
emits: ["upload"],
|
|
1522
1522
|
setup(n, { emit: r }) {
|
|
1523
|
-
let i = r, { t:
|
|
1523
|
+
let i = r, { t: a, format: o } = Q(), s = t(Z, null), { allAcceptedInputString: l, restrictsMimeTypes: u, availableCategories: d, maxFileSize: p, isAcceptedFile: m } = he(), v = {
|
|
1524
1524
|
images: "filterImages",
|
|
1525
1525
|
documents: "filterDocuments",
|
|
1526
1526
|
videos: "filterVideos",
|
|
1527
1527
|
audio: "filterAudio"
|
|
1528
|
-
}, C =
|
|
1529
|
-
let e =
|
|
1530
|
-
return Number.isFinite(
|
|
1528
|
+
}, C = h(() => {
|
|
1529
|
+
let e = a.mediaLibrary, t = u.value ? Zt(d.value.map((t) => e[v[t]]), s?.value) : a.mediaLibrary.acceptedAnyType;
|
|
1530
|
+
return Number.isFinite(p.value) ? o(a.mediaLibrary.acceptedFormatsMaxSize, {
|
|
1531
1531
|
formats: t,
|
|
1532
|
-
size: $(
|
|
1532
|
+
size: $(p.value)
|
|
1533
1533
|
}) : t;
|
|
1534
|
-
}), T =
|
|
1534
|
+
}), T = e([]), E = e();
|
|
1535
1535
|
function D(e) {
|
|
1536
1536
|
let t = [], n = [];
|
|
1537
|
-
for (let r of Array.from(e))
|
|
1537
|
+
for (let r of Array.from(e)) m(r) ? t.push(r) : n.push(r.name);
|
|
1538
1538
|
T.value = n, t.length && i("upload", t);
|
|
1539
1539
|
}
|
|
1540
1540
|
let { isOverDropZone: O } = L(E, { onDrop: (e) => {
|
|
1541
1541
|
e?.length && D(e);
|
|
1542
1542
|
} }), { open: k, onChange: A } = I({
|
|
1543
|
-
accept:
|
|
1543
|
+
accept: l.value,
|
|
1544
1544
|
multiple: !0
|
|
1545
1545
|
});
|
|
1546
1546
|
return A((e) => {
|
|
1547
1547
|
e?.length && D(e);
|
|
1548
|
-
}), (
|
|
1548
|
+
}), (e, t) => (y(), _(S, null, [x("button", {
|
|
1549
1549
|
ref_key: "dropZoneRef",
|
|
1550
1550
|
ref: E,
|
|
1551
1551
|
type: "button",
|
|
1552
1552
|
"data-testid": "media-upload-zone",
|
|
1553
|
-
class:
|
|
1554
|
-
"aria-label":
|
|
1553
|
+
class: b(["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", w(O) ? "tpl-upload-zone-active" : ""]),
|
|
1554
|
+
"aria-label": w(a).mediaLibrary.dropOrClick,
|
|
1555
1555
|
"aria-describedby": n.isUploading ? void 0 : "tpl-media-upload-hint",
|
|
1556
1556
|
"aria-busy": n.isUploading,
|
|
1557
1557
|
style: {
|
|
1558
1558
|
"border-color": "var(--tpl-border-light)",
|
|
1559
1559
|
"background-color": "var(--tpl-bg)"
|
|
1560
1560
|
},
|
|
1561
|
-
onClick:
|
|
1562
|
-
}, [n.isUploading ? (
|
|
1561
|
+
onClick: t[0] ||= (e) => w(k)()
|
|
1562
|
+
}, [n.isUploading ? (y(), _("div", $t, [f(w(H), {
|
|
1563
1563
|
class: "tpl-spinner",
|
|
1564
1564
|
size: 20,
|
|
1565
1565
|
"stroke-width": 2,
|
|
1566
1566
|
style: { color: "var(--tpl-primary)" }
|
|
1567
|
-
}),
|
|
1567
|
+
}), x("span", en, c(n.uploadProgress && n.uploadProgress.total > 1 ? w(o)(w(a).mediaLibrary.uploadingProgress, {
|
|
1568
1568
|
current: n.uploadProgress.current,
|
|
1569
1569
|
total: n.uploadProgress.total
|
|
1570
|
-
}) :
|
|
1571
|
-
|
|
1570
|
+
}) : w(a).mediaLibrary.uploading), 1)])) : (y(), _(S, { key: 1 }, [
|
|
1571
|
+
f(w(ne), {
|
|
1572
1572
|
class: "tpl:mb-2",
|
|
1573
1573
|
size: 24,
|
|
1574
1574
|
"stroke-width": 1.5,
|
|
1575
1575
|
style: { color: "var(--tpl-text-dim)" }
|
|
1576
1576
|
}),
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
], 64))], 10, Qt), T.value.length ? (
|
|
1577
|
+
x("p", tn, c(w(a).mediaLibrary.dropOrClick), 1),
|
|
1578
|
+
x("p", nn, c(C.value), 1)
|
|
1579
|
+
], 64))], 10, Qt), T.value.length ? (y(), _("p", rn, c(w(o)(w(a).mediaLibrary.uploadRejected, { files: T.value.join(", ") })), 1)) : g("", !0)], 64));
|
|
1580
1580
|
}
|
|
1581
1581
|
}), on = ["aria-label"], sn = [
|
|
1582
1582
|
"width",
|
|
@@ -1609,45 +1609,45 @@ var Qt = [
|
|
|
1609
1609
|
limitBytes: {},
|
|
1610
1610
|
size: {}
|
|
1611
1611
|
},
|
|
1612
|
-
setup(
|
|
1613
|
-
let
|
|
1612
|
+
setup(t) {
|
|
1613
|
+
let n = t, { t: i, format: a } = Q(), o = e(!1), s = h(() => n.size ?? 24), l = h(() => Math.max(2, s.value / 8)), u = h(() => (s.value - l.value) / 2), d = h(() => 2 * Math.PI * u.value), p = h(() => n.limitBytes <= 0 ? 0 : Math.min(100, n.usedBytes / n.limitBytes * 100)), m = h(() => d.value - p.value / 100 * d.value), b = h(() => p.value >= 95 ? "var(--tpl-danger)" : p.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), S = h(() => $(n.usedBytes)), C = h(() => $(n.limitBytes)), w = h(() => Math.max(0, n.limitBytes - n.usedBytes)), T = h(() => $(w.value)), E = h(() => a(i.mediaLibrary.storageTooltip, {
|
|
1614
1614
|
used: S.value,
|
|
1615
1615
|
total: C.value,
|
|
1616
1616
|
remaining: T.value
|
|
1617
1617
|
}));
|
|
1618
|
-
return (e, t) => (
|
|
1618
|
+
return (e, t) => (y(), _("div", {
|
|
1619
1619
|
"data-testid": "media-storage-ring",
|
|
1620
1620
|
class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
|
|
1621
1621
|
tabindex: "0",
|
|
1622
1622
|
"aria-label": E.value,
|
|
1623
|
-
onMouseenter: t[0] ||= (e) =>
|
|
1624
|
-
onMouseleave: t[1] ||= (e) =>
|
|
1625
|
-
onFocus: t[2] ||= (e) =>
|
|
1626
|
-
onBlur: t[3] ||= (e) =>
|
|
1627
|
-
}, [(
|
|
1628
|
-
width:
|
|
1629
|
-
height:
|
|
1623
|
+
onMouseenter: t[0] ||= (e) => o.value = !0,
|
|
1624
|
+
onMouseleave: t[1] ||= (e) => o.value = !1,
|
|
1625
|
+
onFocus: t[2] ||= (e) => o.value = !0,
|
|
1626
|
+
onBlur: t[3] ||= (e) => o.value = !1
|
|
1627
|
+
}, [(y(), _("svg", {
|
|
1628
|
+
width: s.value,
|
|
1629
|
+
height: s.value,
|
|
1630
1630
|
class: "tpl:-rotate-90",
|
|
1631
|
-
viewBox: `0 0 ${
|
|
1632
|
-
}, [
|
|
1633
|
-
cx:
|
|
1634
|
-
cy:
|
|
1631
|
+
viewBox: `0 0 ${s.value} ${s.value}`
|
|
1632
|
+
}, [x("circle", {
|
|
1633
|
+
cx: s.value / 2,
|
|
1634
|
+
cy: s.value / 2,
|
|
1635
1635
|
r: u.value,
|
|
1636
1636
|
fill: "none",
|
|
1637
|
-
"stroke-width":
|
|
1637
|
+
"stroke-width": l.value,
|
|
1638
1638
|
style: { stroke: "var(--tpl-border)" }
|
|
1639
|
-
}, null, 8, cn),
|
|
1640
|
-
cx:
|
|
1641
|
-
cy:
|
|
1639
|
+
}, null, 8, cn), x("circle", {
|
|
1640
|
+
cx: s.value / 2,
|
|
1641
|
+
cy: s.value / 2,
|
|
1642
1642
|
r: u.value,
|
|
1643
1643
|
fill: "none",
|
|
1644
|
-
"stroke-width":
|
|
1645
|
-
stroke:
|
|
1644
|
+
"stroke-width": l.value,
|
|
1645
|
+
stroke: b.value,
|
|
1646
1646
|
"stroke-linecap": "round",
|
|
1647
|
-
"stroke-dasharray":
|
|
1648
|
-
"stroke-dashoffset":
|
|
1647
|
+
"stroke-dasharray": d.value,
|
|
1648
|
+
"stroke-dashoffset": m.value,
|
|
1649
1649
|
class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
|
|
1650
|
-
}, null, 8, ln)], 8, sn)),
|
|
1650
|
+
}, null, 8, ln)], 8, sn)), f(M, {
|
|
1651
1651
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1652
1652
|
"enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
|
|
1653
1653
|
"enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
@@ -1655,10 +1655,10 @@ var Qt = [
|
|
|
1655
1655
|
"leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
1656
1656
|
"leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
|
|
1657
1657
|
}, {
|
|
1658
|
-
default:
|
|
1658
|
+
default: r(() => [o.value ? (y(), _("div", un, [v(c(E.value) + " ", 1), t[4] ||= x("div", {
|
|
1659
1659
|
class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
|
|
1660
1660
|
style: { "background-color": "var(--tpl-text)" }
|
|
1661
|
-
}, null, -1)])) :
|
|
1661
|
+
}, null, -1)])) : g("", !0)]),
|
|
1662
1662
|
_: 1
|
|
1663
1663
|
})], 40, on));
|
|
1664
1664
|
}
|
|
@@ -1678,83 +1678,83 @@ function fn(e) {
|
|
|
1678
1678
|
return n;
|
|
1679
1679
|
}
|
|
1680
1680
|
// ../media-library/src/composables/useMediaLibraryUI.ts
|
|
1681
|
-
function pn(
|
|
1682
|
-
let { library:
|
|
1683
|
-
function
|
|
1684
|
-
return "value" in
|
|
1685
|
-
}
|
|
1686
|
-
let
|
|
1687
|
-
images: () =>
|
|
1688
|
-
documents: () =>
|
|
1689
|
-
videos: () =>
|
|
1690
|
-
audio: () =>
|
|
1681
|
+
function pn(t) {
|
|
1682
|
+
let { library: n, translations: r } = t;
|
|
1683
|
+
function i() {
|
|
1684
|
+
return "value" in r && typeof r.value == "object" ? r.value : r;
|
|
1685
|
+
}
|
|
1686
|
+
let a = e("grid"), o = e(!1), s = e(""), c = e(null), l = e(!1), u = e(!1), d = h(() => n.previewItem.value?.url ?? null), f = h(() => n.frequentlyUsedItems.value.length > 0), p = h(() => n.viewMode.value === "frequently-used" ? n.frequentlyUsedItems.value : n.items.value), m = h(() => Object.values(n.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = h(() => fn(n.folders.value)), _ = {
|
|
1687
|
+
images: () => i().mediaLibrary.filterImages,
|
|
1688
|
+
documents: () => i().mediaLibrary.filterDocuments,
|
|
1689
|
+
videos: () => i().mediaLibrary.filterVideos,
|
|
1690
|
+
audio: () => i().mediaLibrary.filterAudio
|
|
1691
1691
|
};
|
|
1692
1692
|
function v(e) {
|
|
1693
1693
|
return _[e]?.() ?? e;
|
|
1694
1694
|
}
|
|
1695
|
-
O(
|
|
1696
|
-
e &&
|
|
1695
|
+
O(o, (e) => {
|
|
1696
|
+
e && n.loadFolders();
|
|
1697
1697
|
});
|
|
1698
1698
|
let y = N((e) => {
|
|
1699
|
-
|
|
1699
|
+
n.search(e);
|
|
1700
1700
|
}, 300);
|
|
1701
1701
|
function b(e) {
|
|
1702
|
-
|
|
1702
|
+
s.value = e, y(e);
|
|
1703
1703
|
}
|
|
1704
1704
|
let { copy: x, copied: S } = F({
|
|
1705
1705
|
copiedDuring: 2e3,
|
|
1706
1706
|
legacy: !0
|
|
1707
1707
|
});
|
|
1708
1708
|
async function C(e) {
|
|
1709
|
-
await
|
|
1709
|
+
await n.uploadFiles(e);
|
|
1710
1710
|
}
|
|
1711
1711
|
function w(e) {
|
|
1712
|
-
|
|
1712
|
+
n.selectItem(e);
|
|
1713
1713
|
}
|
|
1714
|
-
async function T(e,
|
|
1715
|
-
await
|
|
1714
|
+
async function T(e, t) {
|
|
1715
|
+
await n.createFolder(e, t);
|
|
1716
1716
|
}
|
|
1717
|
-
async function E(e,
|
|
1718
|
-
await
|
|
1717
|
+
async function E(e, t) {
|
|
1718
|
+
await n.renameFolder(e, t);
|
|
1719
1719
|
}
|
|
1720
1720
|
async function D(e) {
|
|
1721
|
-
await
|
|
1721
|
+
await n.deleteFolder(e);
|
|
1722
1722
|
}
|
|
1723
1723
|
function k(e) {
|
|
1724
|
-
|
|
1724
|
+
c.value = e;
|
|
1725
1725
|
}
|
|
1726
|
-
async function A(e,
|
|
1727
|
-
return i && !await
|
|
1726
|
+
async function A(e, t, r, i) {
|
|
1727
|
+
return i && !await n.replaceMediaDirectly(e, i.file) ? "failed" : await n.updateFile(e, t, r) ? (c.value = null, "saved") : i ? "replaced" : "failed";
|
|
1728
1728
|
}
|
|
1729
1729
|
async function j(e) {
|
|
1730
|
-
await
|
|
1730
|
+
await n.importFromUrl(e) && (l.value = !1);
|
|
1731
1731
|
}
|
|
1732
1732
|
async function M(e) {
|
|
1733
|
-
u.value = !1, await
|
|
1733
|
+
u.value = !1, await n.moveSelected(e);
|
|
1734
1734
|
}
|
|
1735
1735
|
async function P() {
|
|
1736
|
-
await
|
|
1736
|
+
await n.checkUsageBeforeDelete();
|
|
1737
1737
|
}
|
|
1738
1738
|
function I(e) {
|
|
1739
|
-
|
|
1739
|
+
n.checkUsageBeforeReplace(e);
|
|
1740
1740
|
}
|
|
1741
1741
|
async function L(e) {
|
|
1742
|
-
await
|
|
1742
|
+
await n.replaceFile(e);
|
|
1743
1743
|
}
|
|
1744
1744
|
function R() {
|
|
1745
|
-
|
|
1745
|
+
n.clearSelection(), n.cancelDelete(), n.cancelReplace(), s.value = "", n.searchQuery.value = "", n.categoryFilter.value = null, n.sortOption.value = "newest", n.viewMode.value = "files", c.value = null, l.value = !1;
|
|
1746
1746
|
}
|
|
1747
1747
|
return {
|
|
1748
|
-
layoutMode:
|
|
1749
|
-
showSidebar:
|
|
1750
|
-
searchInput:
|
|
1751
|
-
editingItem:
|
|
1748
|
+
layoutMode: a,
|
|
1749
|
+
showSidebar: o,
|
|
1750
|
+
searchInput: s,
|
|
1751
|
+
editingItem: c,
|
|
1752
1752
|
showImportUrlModal: l,
|
|
1753
1753
|
showMovePicker: u,
|
|
1754
1754
|
selectedUrl: d,
|
|
1755
1755
|
hasFrequentlyUsed: f,
|
|
1756
|
-
displayItems:
|
|
1757
|
-
hasUsedFiles:
|
|
1756
|
+
displayItems: p,
|
|
1757
|
+
hasUsedFiles: m,
|
|
1758
1758
|
folderTree: g,
|
|
1759
1759
|
copy: x,
|
|
1760
1760
|
copied: S,
|
|
@@ -1776,329 +1776,329 @@ function pn(e) {
|
|
|
1776
1776
|
};
|
|
1777
1777
|
}
|
|
1778
1778
|
// ../media-library/src/composable.ts
|
|
1779
|
-
function mn(
|
|
1780
|
-
let { provider:
|
|
1781
|
-
function j(
|
|
1779
|
+
function mn(t) {
|
|
1780
|
+
let { provider: n } = t, r = e([]), i = e([]), a = e(null), o = e("files"), s = e(""), c = e(null), l = e("newest"), u = e(!1), d = e(!1), f = e(!1), p = e(null), h = e(null), g = e(/* @__PURE__ */ new Set()), _ = e(null), v = e([]), y = e({}), b = e(!1), x = e([]), S = e(!1), C = e(null), w = e(!1), T = e(null), E = e(!1), D = e(null), O = e(null), k = e(null), A = 0;
|
|
1781
|
+
function j(e) {
|
|
1782
1782
|
try {
|
|
1783
|
-
|
|
1784
|
-
} catch (
|
|
1785
|
-
|
|
1783
|
+
e();
|
|
1784
|
+
} catch (e) {
|
|
1785
|
+
t.onError?.(e);
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
1788
|
function M() {
|
|
1789
|
-
return
|
|
1789
|
+
return n.folders === !1 ? null : n.folders;
|
|
1790
1790
|
}
|
|
1791
1791
|
function N() {
|
|
1792
|
-
return
|
|
1792
|
+
return m(t.templateId);
|
|
1793
1793
|
}
|
|
1794
1794
|
function P(e) {
|
|
1795
1795
|
let t = {};
|
|
1796
|
-
|
|
1796
|
+
s.value ? t.search = s.value : a.value != null && (t.folderId = a.value), c.value && (t.category = c.value), e && (t.cursor = e);
|
|
1797
1797
|
let n = N();
|
|
1798
1798
|
return n && (t.templateId = n), t;
|
|
1799
1799
|
}
|
|
1800
1800
|
async function F() {
|
|
1801
|
-
let
|
|
1801
|
+
let e = ++A;
|
|
1802
1802
|
u.value = !0;
|
|
1803
1803
|
let i = P();
|
|
1804
1804
|
try {
|
|
1805
|
-
let
|
|
1806
|
-
if (
|
|
1807
|
-
|
|
1808
|
-
} catch (
|
|
1809
|
-
if (
|
|
1810
|
-
|
|
1805
|
+
let t = await n.list(i);
|
|
1806
|
+
if (e !== A) return;
|
|
1807
|
+
r.value = t.items, p.value = t.nextCursor ?? null, f.value = !!t.nextCursor;
|
|
1808
|
+
} catch (n) {
|
|
1809
|
+
if (e !== A) return;
|
|
1810
|
+
t.onError?.(n);
|
|
1811
1811
|
} finally {
|
|
1812
|
-
|
|
1812
|
+
e === A && (u.value = !1);
|
|
1813
1813
|
}
|
|
1814
1814
|
}
|
|
1815
1815
|
async function I() {
|
|
1816
1816
|
if (!f.value || !p.value || u.value) return;
|
|
1817
|
-
let
|
|
1817
|
+
let e = ++A;
|
|
1818
1818
|
u.value = !0;
|
|
1819
1819
|
let i = P(p.value);
|
|
1820
1820
|
try {
|
|
1821
|
-
let
|
|
1822
|
-
if (
|
|
1823
|
-
|
|
1824
|
-
} catch (
|
|
1825
|
-
if (
|
|
1826
|
-
|
|
1821
|
+
let t = await n.list(i);
|
|
1822
|
+
if (e !== A) return;
|
|
1823
|
+
r.value = [...r.value, ...t.items], p.value = t.nextCursor ?? null, f.value = !!t.nextCursor;
|
|
1824
|
+
} catch (n) {
|
|
1825
|
+
if (e !== A) return;
|
|
1826
|
+
t.onError?.(n);
|
|
1827
1827
|
} finally {
|
|
1828
|
-
|
|
1828
|
+
e === A && (u.value = !1);
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
1831
|
async function L(e) {
|
|
1832
|
-
|
|
1832
|
+
s.value = e, await F();
|
|
1833
1833
|
}
|
|
1834
1834
|
async function R(e) {
|
|
1835
|
-
|
|
1835
|
+
c.value = e, await F();
|
|
1836
1836
|
}
|
|
1837
1837
|
async function z(e) {
|
|
1838
1838
|
l.value = e, await F();
|
|
1839
1839
|
}
|
|
1840
1840
|
async function B(e) {
|
|
1841
|
-
|
|
1841
|
+
o.value = "files", a.value = e, s.value = "", g.value = /* @__PURE__ */ new Set(), _.value = null, await F();
|
|
1842
1842
|
}
|
|
1843
1843
|
async function V() {
|
|
1844
|
-
|
|
1844
|
+
o.value = "frequently-used", a.value = null, s.value = "", g.value = /* @__PURE__ */ new Set(), _.value = null, await W();
|
|
1845
1845
|
}
|
|
1846
|
-
async function ee(
|
|
1847
|
-
let { create:
|
|
1848
|
-
if (typeof
|
|
1846
|
+
async function ee(e) {
|
|
1847
|
+
let { create: i } = n;
|
|
1848
|
+
if (typeof i != "function") return null;
|
|
1849
1849
|
d.value = !0;
|
|
1850
1850
|
try {
|
|
1851
|
-
let
|
|
1852
|
-
|
|
1851
|
+
let t = { file: e };
|
|
1852
|
+
a.value != null && (t.folderId = a.value);
|
|
1853
1853
|
let o = N();
|
|
1854
|
-
o && (
|
|
1855
|
-
let s = await
|
|
1856
|
-
return
|
|
1857
|
-
} catch (
|
|
1858
|
-
return
|
|
1854
|
+
o && (t.templateId = o);
|
|
1855
|
+
let s = await i(t);
|
|
1856
|
+
return r.value = [s, ...r.value], j(() => n.onCreated?.(s)), s;
|
|
1857
|
+
} catch (e) {
|
|
1858
|
+
return t.onError?.(e), null;
|
|
1859
1859
|
} finally {
|
|
1860
1860
|
d.value = !1;
|
|
1861
1861
|
}
|
|
1862
1862
|
}
|
|
1863
|
-
async function te(
|
|
1864
|
-
let { create:
|
|
1865
|
-
if (typeof
|
|
1866
|
-
d.value = !0,
|
|
1863
|
+
async function te(e) {
|
|
1864
|
+
let { create: i } = n;
|
|
1865
|
+
if (typeof i == "function") {
|
|
1866
|
+
d.value = !0, h.value = {
|
|
1867
1867
|
current: 0,
|
|
1868
|
-
total:
|
|
1868
|
+
total: e.length
|
|
1869
1869
|
};
|
|
1870
1870
|
try {
|
|
1871
|
-
for (let o = 0; o <
|
|
1872
|
-
|
|
1871
|
+
for (let o = 0; o < e.length; o++) {
|
|
1872
|
+
h.value = {
|
|
1873
1873
|
current: o + 1,
|
|
1874
|
-
total:
|
|
1874
|
+
total: e.length
|
|
1875
1875
|
};
|
|
1876
1876
|
try {
|
|
1877
|
-
let
|
|
1878
|
-
|
|
1877
|
+
let t = { file: e[o] };
|
|
1878
|
+
a.value != null && (t.folderId = a.value);
|
|
1879
1879
|
let s = N();
|
|
1880
|
-
s && (
|
|
1881
|
-
let c = await
|
|
1882
|
-
|
|
1883
|
-
} catch (
|
|
1884
|
-
|
|
1880
|
+
s && (t.templateId = s);
|
|
1881
|
+
let c = await i(t);
|
|
1882
|
+
r.value = [c, ...r.value], j(() => n.onCreated?.(c));
|
|
1883
|
+
} catch (e) {
|
|
1884
|
+
t.onError?.(e);
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
1887
|
} finally {
|
|
1888
|
-
d.value = !1,
|
|
1888
|
+
d.value = !1, h.value = null;
|
|
1889
1889
|
}
|
|
1890
1890
|
}
|
|
1891
1891
|
}
|
|
1892
|
-
async function ne(
|
|
1893
|
-
if (
|
|
1894
|
-
let { move:
|
|
1895
|
-
if (typeof
|
|
1896
|
-
let
|
|
1897
|
-
if (
|
|
1898
|
-
let
|
|
1899
|
-
|
|
1900
|
-
} else
|
|
1901
|
-
|
|
1902
|
-
} catch (
|
|
1903
|
-
|
|
1892
|
+
async function ne(e) {
|
|
1893
|
+
if (g.value.size === 0) return;
|
|
1894
|
+
let { move: n } = M() ?? { move: !1 };
|
|
1895
|
+
if (typeof n == "function") try {
|
|
1896
|
+
let t = await n([...g.value], e);
|
|
1897
|
+
if (a.value === null) {
|
|
1898
|
+
let e = new Map(t.map((e) => [e.id, e]));
|
|
1899
|
+
r.value = r.value.map((t) => e.get(t.id) ?? t);
|
|
1900
|
+
} else r.value = r.value.filter((e) => !g.value.has(e.id));
|
|
1901
|
+
g.value = /* @__PURE__ */ new Set(), _.value = null;
|
|
1902
|
+
} catch (e) {
|
|
1903
|
+
t.onError?.(e);
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
|
-
async function re(
|
|
1907
|
-
let { update: o } =
|
|
1906
|
+
async function re(e, i, a) {
|
|
1907
|
+
let { update: o } = n;
|
|
1908
1908
|
if (typeof o != "function") return !1;
|
|
1909
1909
|
try {
|
|
1910
|
-
let
|
|
1911
|
-
a !== void 0 && (
|
|
1912
|
-
let s = await o(
|
|
1913
|
-
return
|
|
1914
|
-
} catch (
|
|
1915
|
-
return
|
|
1910
|
+
let t = { filename: i };
|
|
1911
|
+
a !== void 0 && (t.alt = a);
|
|
1912
|
+
let s = await o(e, t);
|
|
1913
|
+
return r.value = r.value.map((t) => t.id === e ? s : t), _.value?.id === e && (_.value = s), j(() => n.onUpdated?.(s)), !0;
|
|
1914
|
+
} catch (e) {
|
|
1915
|
+
return t.onError?.(e), !1;
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
1918
|
function ie(e) {
|
|
1919
1919
|
let t = /* @__PURE__ */ new Map();
|
|
1920
|
-
for (let
|
|
1920
|
+
for (let n of r.value) e.includes(n.id) && t.set(n.id, n);
|
|
1921
1921
|
for (let n of v.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
|
|
1922
1922
|
return [...t.values()];
|
|
1923
1923
|
}
|
|
1924
1924
|
function H(e) {
|
|
1925
|
-
|
|
1925
|
+
r.value = r.value.filter((t) => !e.includes(t.id)), v.value = v.value.filter((t) => !e.includes(t.id)), g.value = /* @__PURE__ */ new Set(), _.value = null;
|
|
1926
1926
|
}
|
|
1927
1927
|
async function U() {
|
|
1928
|
-
if (
|
|
1929
|
-
let { delete:
|
|
1930
|
-
if (typeof
|
|
1931
|
-
let r = [...
|
|
1928
|
+
if (g.value.size === 0) return;
|
|
1929
|
+
let { delete: e } = n;
|
|
1930
|
+
if (typeof e != "function") return;
|
|
1931
|
+
let r = [...g.value], i = ie(r);
|
|
1932
1932
|
try {
|
|
1933
|
-
await
|
|
1934
|
-
for (let e of i) j(() =>
|
|
1935
|
-
} catch (
|
|
1936
|
-
|
|
1933
|
+
await e(r), H(r);
|
|
1934
|
+
for (let e of i) j(() => n.onDeleted?.(e));
|
|
1935
|
+
} catch (e) {
|
|
1936
|
+
t.onError?.(e);
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
1939
|
async function W() {
|
|
1940
|
-
let { frequentlyUsed:
|
|
1941
|
-
if (typeof
|
|
1942
|
-
v.value = await
|
|
1943
|
-
} catch (
|
|
1944
|
-
|
|
1940
|
+
let { frequentlyUsed: e } = n;
|
|
1941
|
+
if (typeof e == "function") try {
|
|
1942
|
+
v.value = await e();
|
|
1943
|
+
} catch (e) {
|
|
1944
|
+
t.onError?.(e);
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
1947
|
async function G() {
|
|
1948
|
-
if (
|
|
1949
|
-
x.value = [...
|
|
1950
|
-
let { checkUsage:
|
|
1951
|
-
if (typeof
|
|
1948
|
+
if (g.value.size === 0) return !1;
|
|
1949
|
+
x.value = [...g.value];
|
|
1950
|
+
let { checkUsage: e } = n;
|
|
1951
|
+
if (typeof e != "function") return y.value = {}, b.value = !0, !1;
|
|
1952
1952
|
try {
|
|
1953
|
-
let
|
|
1954
|
-
y.value =
|
|
1955
|
-
let
|
|
1956
|
-
return b.value = !0,
|
|
1957
|
-
} catch (
|
|
1958
|
-
return
|
|
1953
|
+
let t = await e(x.value);
|
|
1954
|
+
y.value = t;
|
|
1955
|
+
let n = Object.values(t).some((e) => e.templateCount > 0);
|
|
1956
|
+
return b.value = !0, n;
|
|
1957
|
+
} catch (e) {
|
|
1958
|
+
return t.onError?.(e), !1;
|
|
1959
1959
|
}
|
|
1960
1960
|
}
|
|
1961
1961
|
async function ae() {
|
|
1962
|
-
let { delete:
|
|
1963
|
-
if (typeof
|
|
1962
|
+
let { delete: e } = n;
|
|
1963
|
+
if (typeof e != "function" || (b.value = !1, x.value.length === 0)) return;
|
|
1964
1964
|
let r = x.value, i = ie(r);
|
|
1965
1965
|
try {
|
|
1966
|
-
await
|
|
1967
|
-
for (let e of i) j(() =>
|
|
1968
|
-
} catch (
|
|
1969
|
-
|
|
1966
|
+
await e(r), H(r), x.value = [], y.value = {};
|
|
1967
|
+
for (let e of i) j(() => n.onDeleted?.(e));
|
|
1968
|
+
} catch (e) {
|
|
1969
|
+
t.onError?.(e);
|
|
1970
1970
|
}
|
|
1971
1971
|
}
|
|
1972
1972
|
function oe() {
|
|
1973
1973
|
b.value = !1, x.value = [], y.value = {};
|
|
1974
1974
|
}
|
|
1975
|
-
async function se(
|
|
1976
|
-
let
|
|
1977
|
-
if (typeof
|
|
1975
|
+
async function se(e) {
|
|
1976
|
+
let i = n.importFromUrl;
|
|
1977
|
+
if (typeof i != "function") return null;
|
|
1978
1978
|
S.value = !0, C.value = null;
|
|
1979
1979
|
try {
|
|
1980
|
-
let
|
|
1981
|
-
return
|
|
1982
|
-
} catch (
|
|
1983
|
-
return C.value =
|
|
1980
|
+
let t = await i(e, a.value, N());
|
|
1981
|
+
return r.value = [t, ...r.value], j(() => n.onCreated?.(t)), t;
|
|
1982
|
+
} catch (e) {
|
|
1983
|
+
return C.value = e instanceof Error ? e.message : "Import failed", t.onError?.(e), null;
|
|
1984
1984
|
} finally {
|
|
1985
1985
|
S.value = !1;
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
1988
|
function K(e) {
|
|
1989
|
-
let t = new Set(
|
|
1990
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
1989
|
+
let t = new Set(g.value);
|
|
1990
|
+
t.has(e) ? t.delete(e) : t.add(e), g.value = t;
|
|
1991
1991
|
}
|
|
1992
1992
|
function q() {
|
|
1993
|
-
|
|
1993
|
+
g.value = /* @__PURE__ */ new Set(), _.value = null;
|
|
1994
1994
|
}
|
|
1995
1995
|
function J(e) {
|
|
1996
|
-
|
|
1996
|
+
_.value = e, g.value = /* @__PURE__ */ new Set([e.id]);
|
|
1997
1997
|
}
|
|
1998
1998
|
async function ce() {
|
|
1999
|
-
let { storage:
|
|
2000
|
-
if (typeof
|
|
1999
|
+
let { storage: e } = n;
|
|
2000
|
+
if (typeof e != "function") k.value = null;
|
|
2001
2001
|
else try {
|
|
2002
|
-
k.value = await
|
|
2003
|
-
} catch (
|
|
2004
|
-
|
|
2002
|
+
k.value = await e();
|
|
2003
|
+
} catch (e) {
|
|
2004
|
+
t.onError?.(e);
|
|
2005
2005
|
}
|
|
2006
2006
|
}
|
|
2007
2007
|
async function Y() {
|
|
2008
|
-
let
|
|
2009
|
-
if (
|
|
2010
|
-
|
|
2011
|
-
} catch (
|
|
2012
|
-
|
|
2008
|
+
let e = M();
|
|
2009
|
+
if (e) try {
|
|
2010
|
+
i.value = await e.list();
|
|
2011
|
+
} catch (e) {
|
|
2012
|
+
t.onError?.(e);
|
|
2013
2013
|
}
|
|
2014
2014
|
}
|
|
2015
|
-
async function le(
|
|
2015
|
+
async function le(e, n) {
|
|
2016
2016
|
let { create: r } = M() ?? { create: !1 };
|
|
2017
2017
|
if (typeof r != "function") return null;
|
|
2018
2018
|
try {
|
|
2019
|
-
let
|
|
2020
|
-
n !== void 0 && (
|
|
2021
|
-
let i = await r(
|
|
2019
|
+
let t = { name: e };
|
|
2020
|
+
n !== void 0 && (t.parentId = n);
|
|
2021
|
+
let i = await r(t);
|
|
2022
2022
|
return await Y(), i;
|
|
2023
|
-
} catch (
|
|
2024
|
-
return
|
|
2023
|
+
} catch (e) {
|
|
2024
|
+
return t.onError?.(e), null;
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
2027
|
function ue(e, t) {
|
|
2028
2028
|
for (let n of e) if (n.id === t) return n;
|
|
2029
2029
|
return null;
|
|
2030
2030
|
}
|
|
2031
|
-
async function X(
|
|
2031
|
+
async function X(e, n) {
|
|
2032
2032
|
let { update: r } = M() ?? { update: !1 };
|
|
2033
2033
|
if (typeof r == "function") try {
|
|
2034
|
-
await r(
|
|
2035
|
-
} catch (
|
|
2036
|
-
|
|
2034
|
+
await r(e, { name: n }), await Y();
|
|
2035
|
+
} catch (e) {
|
|
2036
|
+
t.onError?.(e);
|
|
2037
2037
|
}
|
|
2038
2038
|
}
|
|
2039
|
-
async function de(
|
|
2039
|
+
async function de(e) {
|
|
2040
2040
|
let { delete: n } = M() ?? { delete: !1 };
|
|
2041
2041
|
if (typeof n == "function") try {
|
|
2042
|
-
let
|
|
2043
|
-
await n(
|
|
2044
|
-
} catch (
|
|
2045
|
-
|
|
2042
|
+
let t = ue(i.value, e)?.parentId ?? null;
|
|
2043
|
+
await n(e), a.value === e && (a.value = t), await Y(), await F();
|
|
2044
|
+
} catch (e) {
|
|
2045
|
+
t.onError?.(e);
|
|
2046
2046
|
}
|
|
2047
2047
|
}
|
|
2048
|
-
async function fe(
|
|
2049
|
-
D.value =
|
|
2050
|
-
let { checkUsage: r } =
|
|
2048
|
+
async function fe(e) {
|
|
2049
|
+
D.value = e, T.value = null;
|
|
2050
|
+
let { checkUsage: r } = n;
|
|
2051
2051
|
if (typeof r != "function") O.value = null, E.value = !0;
|
|
2052
2052
|
else try {
|
|
2053
|
-
let
|
|
2054
|
-
O.value = e
|
|
2055
|
-
} catch (
|
|
2056
|
-
|
|
2053
|
+
let t = await r([e.id]);
|
|
2054
|
+
O.value = t[e.id] ?? null, E.value = !0;
|
|
2055
|
+
} catch (e) {
|
|
2056
|
+
t.onError?.(e);
|
|
2057
2057
|
}
|
|
2058
2058
|
}
|
|
2059
2059
|
function Z() {
|
|
2060
2060
|
E.value = !1, D.value = null, O.value = null, T.value = null;
|
|
2061
2061
|
}
|
|
2062
2062
|
function pe(e) {
|
|
2063
|
-
|
|
2063
|
+
r.value = r.value.map((t) => t.id === e.id ? e : t), v.value = v.value.map((t) => t.id === e.id ? e : t), _.value?.id === e.id && (_.value = e), j(() => n.onUpdated?.(e));
|
|
2064
2064
|
}
|
|
2065
|
-
async function Q(
|
|
2066
|
-
let { replace: r } =
|
|
2065
|
+
async function Q(e) {
|
|
2066
|
+
let { replace: r } = n;
|
|
2067
2067
|
if (typeof r != "function" || !D.value) return null;
|
|
2068
2068
|
w.value = !0, T.value = null;
|
|
2069
2069
|
try {
|
|
2070
|
-
let
|
|
2071
|
-
return pe(
|
|
2072
|
-
} catch (
|
|
2073
|
-
return T.value =
|
|
2070
|
+
let t = await r(D.value.id, e);
|
|
2071
|
+
return pe(t), E.value = !1, D.value = null, O.value = null, t;
|
|
2072
|
+
} catch (e) {
|
|
2073
|
+
return T.value = e instanceof Error ? e.message : "Replace failed", t.onError?.(e), null;
|
|
2074
2074
|
} finally {
|
|
2075
2075
|
w.value = !1;
|
|
2076
2076
|
}
|
|
2077
2077
|
}
|
|
2078
|
-
async function me(
|
|
2079
|
-
let { replace: i } =
|
|
2078
|
+
async function me(e, r) {
|
|
2079
|
+
let { replace: i } = n;
|
|
2080
2080
|
if (typeof i != "function") return null;
|
|
2081
2081
|
try {
|
|
2082
|
-
let
|
|
2083
|
-
return pe(
|
|
2084
|
-
} catch (
|
|
2085
|
-
return
|
|
2082
|
+
let t = await i(e, r);
|
|
2083
|
+
return pe(t), t;
|
|
2084
|
+
} catch (e) {
|
|
2085
|
+
return t.onError?.(e), null;
|
|
2086
2086
|
}
|
|
2087
2087
|
}
|
|
2088
2088
|
return {
|
|
2089
|
-
items:
|
|
2090
|
-
folders:
|
|
2091
|
-
currentFolderId:
|
|
2092
|
-
viewMode:
|
|
2093
|
-
searchQuery:
|
|
2094
|
-
categoryFilter:
|
|
2089
|
+
items: r,
|
|
2090
|
+
folders: i,
|
|
2091
|
+
currentFolderId: a,
|
|
2092
|
+
viewMode: o,
|
|
2093
|
+
searchQuery: s,
|
|
2094
|
+
categoryFilter: c,
|
|
2095
2095
|
sortOption: l,
|
|
2096
2096
|
isLoading: u,
|
|
2097
2097
|
isUploading: d,
|
|
2098
|
-
uploadProgress:
|
|
2098
|
+
uploadProgress: h,
|
|
2099
2099
|
hasMore: f,
|
|
2100
|
-
selectedItems:
|
|
2101
|
-
previewItem:
|
|
2100
|
+
selectedItems: g,
|
|
2101
|
+
previewItem: _,
|
|
2102
2102
|
frequentlyUsedItems: v,
|
|
2103
2103
|
deleteUsageInfo: y,
|
|
2104
2104
|
showDeleteWarning: b,
|
|
@@ -2235,47 +2235,47 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2235
2235
|
"confirm",
|
|
2236
2236
|
"ready"
|
|
2237
2237
|
],
|
|
2238
|
-
setup(
|
|
2239
|
-
let
|
|
2238
|
+
setup(e, { expose: t, emit: n }) {
|
|
2239
|
+
let i = e, u = n, d = E(() => import("./MediaEditModal-Dy08GEwE.js")), p = h(() => i.translations), m = h(() => i.confirmTestId ?? "media-confirm"), C = {
|
|
2240
2240
|
get maxFileSize() {
|
|
2241
|
-
return
|
|
2241
|
+
return i.provider.maxFileSize;
|
|
2242
2242
|
},
|
|
2243
2243
|
get mimeTypes() {
|
|
2244
|
-
return
|
|
2244
|
+
return i.provider.mimeTypes;
|
|
2245
2245
|
},
|
|
2246
2246
|
get accept() {
|
|
2247
|
-
return
|
|
2247
|
+
return i.accept;
|
|
2248
2248
|
}
|
|
2249
2249
|
};
|
|
2250
|
-
|
|
2250
|
+
a(ue, C);
|
|
2251
2251
|
let { isAcceptedMimeType: D, availableCategories: k } = he(C), j = mn({
|
|
2252
|
-
provider:
|
|
2253
|
-
templateId: () =>
|
|
2254
|
-
onError: (e) =>
|
|
2252
|
+
provider: i.provider,
|
|
2253
|
+
templateId: () => i.templateId,
|
|
2254
|
+
onError: (e) => i.onError?.(e)
|
|
2255
2255
|
}), N = pn({
|
|
2256
2256
|
library: j,
|
|
2257
|
-
translations:
|
|
2258
|
-
}), P =
|
|
2259
|
-
let e =
|
|
2257
|
+
translations: p
|
|
2258
|
+
}), P = h(() => typeof i.provider.create == "function"), F = h(() => i.provider.folders !== !1), I = h(() => typeof i.provider.importFromUrl == "function"), L = h(() => typeof i.provider.delete == "function"), R = h(() => typeof i.provider.update == "function"), z = h(() => typeof i.provider.replace == "function"), B = h(() => typeof i.provider.frequentlyUsed == "function"), ee = h(() => {
|
|
2259
|
+
let e = i.provider.folders;
|
|
2260
2260
|
return e !== !1 && typeof e.move == "function";
|
|
2261
|
-
}), ne =
|
|
2262
|
-
let e =
|
|
2261
|
+
}), ne = h(() => {
|
|
2262
|
+
let e = i.provider.folders;
|
|
2263
2263
|
return e !== !1 && typeof e.create == "function";
|
|
2264
|
-
}), H =
|
|
2265
|
-
let e =
|
|
2264
|
+
}), H = h(() => {
|
|
2265
|
+
let e = i.provider.folders;
|
|
2266
2266
|
return e !== !1 && typeof e.update == "function";
|
|
2267
|
-
}), U =
|
|
2268
|
-
let e =
|
|
2267
|
+
}), U = h(() => {
|
|
2268
|
+
let e = i.provider.folders;
|
|
2269
2269
|
return e !== !1 && typeof e.delete == "function";
|
|
2270
|
-
}), W =
|
|
2270
|
+
}), W = h(() => j.isLoading.value && N.displayItems.value.length === 0), G = h(() => {
|
|
2271
2271
|
let e = j.previewItem.value;
|
|
2272
|
-
return e ? !
|
|
2273
|
-
}), oe =
|
|
2272
|
+
return e ? !i.accept?.length || D(e.mimeType ?? "", i.accept) : !1;
|
|
2273
|
+
}), oe = h(() => {
|
|
2274
2274
|
if (!L.value) return 0;
|
|
2275
2275
|
let e = 0;
|
|
2276
2276
|
for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
|
|
2277
2277
|
return e;
|
|
2278
|
-
}), K =
|
|
2278
|
+
}), K = h(() => N.showImportUrlModal.value || N.editingItem.value !== null || j.showReplaceWarning.value);
|
|
2279
2279
|
function q() {
|
|
2280
2280
|
return K.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : j.showDeleteWarning.value ? (j.cancelDelete(), !0) : !1;
|
|
2281
2281
|
}
|
|
@@ -2291,55 +2291,55 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2291
2291
|
for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
|
|
2292
2292
|
j.selectedItems.value = e, await N.handleDeleteClick();
|
|
2293
2293
|
}
|
|
2294
|
-
return O(() =>
|
|
2294
|
+
return O(() => i.accept, (e) => {
|
|
2295
2295
|
e?.length === 1 && (j.categoryFilter.value = e[0]);
|
|
2296
|
-
}, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), u("ready"),
|
|
2296
|
+
}, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), u("ready"), l(() => {
|
|
2297
2297
|
N.resetUI();
|
|
2298
|
-
}),
|
|
2298
|
+
}), t({
|
|
2299
2299
|
nestedDialogOpen: K,
|
|
2300
2300
|
handleEscape: q,
|
|
2301
2301
|
library: j,
|
|
2302
2302
|
ui: N
|
|
2303
|
-
}), (
|
|
2304
|
-
|
|
2305
|
-
|
|
2303
|
+
}), (t, n) => (y(), _("div", hn, [
|
|
2304
|
+
x("div", gn, [x("h2", _n, c(p.value.mediaLibrary.title), 1), x("div", vn, [
|
|
2305
|
+
w(j).storageInfo.value ? (y(), T(dn, {
|
|
2306
2306
|
key: 0,
|
|
2307
|
-
"used-bytes":
|
|
2308
|
-
"limit-bytes":
|
|
2307
|
+
"used-bytes": w(j).storageInfo.value.usedBytes,
|
|
2308
|
+
"limit-bytes": w(j).storageInfo.value.limitBytes,
|
|
2309
2309
|
size: 22
|
|
2310
|
-
}, null, 8, ["used-bytes", "limit-bytes"])) :
|
|
2311
|
-
|
|
2312
|
-
value:
|
|
2310
|
+
}, null, 8, ["used-bytes", "limit-bytes"])) : g("", !0),
|
|
2311
|
+
x("div", yn, [x("input", {
|
|
2312
|
+
value: w(N).searchInput.value,
|
|
2313
2313
|
type: "search",
|
|
2314
2314
|
disabled: W.value,
|
|
2315
|
-
"aria-label":
|
|
2315
|
+
"aria-label": p.value.mediaLibrary.searchAriaLabel,
|
|
2316
2316
|
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",
|
|
2317
2317
|
style: {
|
|
2318
2318
|
"border-color": "var(--tpl-border)",
|
|
2319
2319
|
"background-color": "var(--tpl-bg)",
|
|
2320
2320
|
color: "var(--tpl-text)"
|
|
2321
2321
|
},
|
|
2322
|
-
placeholder:
|
|
2323
|
-
onInput:
|
|
2324
|
-
}, null, 40, bn),
|
|
2322
|
+
placeholder: p.value.mediaLibrary.searchPlaceholder,
|
|
2323
|
+
onInput: n[0] ||= (e) => w(N).handleSearchInput(e.target.value)
|
|
2324
|
+
}, null, 40, bn), f(w(ae), {
|
|
2325
2325
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
2326
2326
|
size: 13,
|
|
2327
2327
|
"stroke-width": 2,
|
|
2328
2328
|
style: { color: "var(--tpl-text-dim)" }
|
|
2329
2329
|
})]),
|
|
2330
|
-
|
|
2330
|
+
e.showClose ? (y(), _("button", {
|
|
2331
2331
|
key: 1,
|
|
2332
2332
|
type: "button",
|
|
2333
|
-
"aria-label":
|
|
2333
|
+
"aria-label": p.value.mediaLibrary.close,
|
|
2334
2334
|
class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2335
2335
|
style: { color: "var(--tpl-text-muted)" },
|
|
2336
|
-
onClick:
|
|
2337
|
-
}, [
|
|
2336
|
+
onClick: n[1] ||= (e) => u("close")
|
|
2337
|
+
}, [f(w(se), {
|
|
2338
2338
|
size: 18,
|
|
2339
2339
|
"stroke-width": 2
|
|
2340
|
-
})], 8, xn)) :
|
|
2340
|
+
})], 8, xn)) : g("", !0)
|
|
2341
2341
|
])]),
|
|
2342
|
-
|
|
2342
|
+
x("div", Sn, [f(M, {
|
|
2343
2343
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
2344
2344
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
2345
2345
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -2347,19 +2347,19 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2347
2347
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
2348
2348
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
2349
2349
|
}, {
|
|
2350
|
-
default:
|
|
2351
|
-
folders:
|
|
2352
|
-
"current-folder-id":
|
|
2353
|
-
"view-mode":
|
|
2354
|
-
"has-frequently-used": B.value &&
|
|
2350
|
+
default: r(() => [F.value && w(N).showSidebar.value ? (y(), _("div", Cn, [f(Fe, {
|
|
2351
|
+
folders: w(N).folderTree.value,
|
|
2352
|
+
"current-folder-id": w(j).currentFolderId.value,
|
|
2353
|
+
"view-mode": w(j).viewMode.value,
|
|
2354
|
+
"has-frequently-used": B.value && w(N).hasFrequentlyUsed.value,
|
|
2355
2355
|
"can-create-folder": ne.value,
|
|
2356
2356
|
"can-rename-folder": H.value,
|
|
2357
2357
|
"can-delete-folder": U.value,
|
|
2358
|
-
onNavigate:
|
|
2359
|
-
onCreateFolder:
|
|
2360
|
-
onRenameFolder:
|
|
2361
|
-
onDeleteFolder:
|
|
2362
|
-
onShowFrequentlyUsed:
|
|
2358
|
+
onNavigate: w(j).navigateToFolder,
|
|
2359
|
+
onCreateFolder: w(N).handleCreateFolder,
|
|
2360
|
+
onRenameFolder: w(N).handleRenameFolder,
|
|
2361
|
+
onDeleteFolder: w(N).handleDeleteFolder,
|
|
2362
|
+
onShowFrequentlyUsed: w(j).showFrequentlyUsed
|
|
2363
2363
|
}, null, 8, [
|
|
2364
2364
|
"folders",
|
|
2365
2365
|
"current-folder-id",
|
|
@@ -2373,90 +2373,90 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2373
2373
|
"onRenameFolder",
|
|
2374
2374
|
"onDeleteFolder",
|
|
2375
2375
|
"onShowFrequentlyUsed"
|
|
2376
|
-
])])) :
|
|
2376
|
+
])])) : g("", !0)]),
|
|
2377
2377
|
_: 1
|
|
2378
|
-
}),
|
|
2379
|
-
F.value ? (
|
|
2378
|
+
}), x("div", wn, [x("div", Tn, [x("div", En, [
|
|
2379
|
+
F.value ? (y(), _("button", {
|
|
2380
2380
|
key: 0,
|
|
2381
2381
|
type: "button",
|
|
2382
2382
|
"data-testid": "media-folder-toggle",
|
|
2383
2383
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2384
|
-
style:
|
|
2385
|
-
color:
|
|
2386
|
-
backgroundColor:
|
|
2387
|
-
border:
|
|
2384
|
+
style: o({
|
|
2385
|
+
color: w(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2386
|
+
backgroundColor: w(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
|
|
2387
|
+
border: w(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
|
|
2388
2388
|
}),
|
|
2389
|
-
title:
|
|
2390
|
-
"aria-label":
|
|
2391
|
-
"aria-pressed":
|
|
2392
|
-
onClick:
|
|
2393
|
-
}, [
|
|
2389
|
+
title: w(N).showSidebar.value ? p.value.mediaLibrary.hideFolders : p.value.mediaLibrary.showFolders,
|
|
2390
|
+
"aria-label": w(N).showSidebar.value ? p.value.mediaLibrary.hideFolders : p.value.mediaLibrary.showFolders,
|
|
2391
|
+
"aria-pressed": w(N).showSidebar.value,
|
|
2392
|
+
onClick: n[2] ||= (e) => w(N).showSidebar.value = !w(N).showSidebar.value
|
|
2393
|
+
}, [f(w(Y), {
|
|
2394
2394
|
size: 16,
|
|
2395
2395
|
"stroke-width": 2
|
|
2396
|
-
})], 12, Dn)) :
|
|
2397
|
-
|
|
2396
|
+
})], 12, Dn)) : g("", !0),
|
|
2397
|
+
w(j).viewMode.value === "frequently-used" ? (y(), _("span", On, c(p.value.mediaLibrary.frequentlyUsed), 1)) : (y(), T(xe, {
|
|
2398
2398
|
key: 2,
|
|
2399
|
-
folders:
|
|
2400
|
-
"current-folder-id":
|
|
2401
|
-
onNavigate:
|
|
2399
|
+
folders: w(N).folderTree.value,
|
|
2400
|
+
"current-folder-id": w(j).currentFolderId.value,
|
|
2401
|
+
onNavigate: w(j).navigateToFolder
|
|
2402
2402
|
}, null, 8, [
|
|
2403
2403
|
"folders",
|
|
2404
2404
|
"current-folder-id",
|
|
2405
2405
|
"onNavigate"
|
|
2406
2406
|
])),
|
|
2407
|
-
|
|
2407
|
+
x("div", kn, [x("button", {
|
|
2408
2408
|
type: "button",
|
|
2409
2409
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2410
|
-
style:
|
|
2411
|
-
color:
|
|
2412
|
-
backgroundColor:
|
|
2410
|
+
style: o({
|
|
2411
|
+
color: w(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2412
|
+
backgroundColor: w(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2413
2413
|
}),
|
|
2414
|
-
title:
|
|
2415
|
-
"aria-label":
|
|
2416
|
-
"aria-pressed":
|
|
2417
|
-
onClick:
|
|
2418
|
-
}, [
|
|
2414
|
+
title: p.value.mediaLibrary.viewGrid,
|
|
2415
|
+
"aria-label": p.value.mediaLibrary.viewGrid,
|
|
2416
|
+
"aria-pressed": w(N).layoutMode.value === "grid",
|
|
2417
|
+
onClick: n[3] ||= (e) => w(N).layoutMode.value = "grid"
|
|
2418
|
+
}, [f(w(ce), {
|
|
2419
2419
|
size: 14,
|
|
2420
2420
|
"stroke-width": 2
|
|
2421
|
-
})], 12, An),
|
|
2421
|
+
})], 12, An), x("button", {
|
|
2422
2422
|
type: "button",
|
|
2423
2423
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2424
|
-
style:
|
|
2425
|
-
color:
|
|
2426
|
-
backgroundColor:
|
|
2424
|
+
style: o({
|
|
2425
|
+
color: w(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2426
|
+
backgroundColor: w(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2427
2427
|
}),
|
|
2428
|
-
title:
|
|
2429
|
-
"aria-label":
|
|
2430
|
-
"aria-pressed":
|
|
2431
|
-
onClick:
|
|
2432
|
-
}, [
|
|
2428
|
+
title: p.value.mediaLibrary.viewList,
|
|
2429
|
+
"aria-label": p.value.mediaLibrary.viewList,
|
|
2430
|
+
"aria-pressed": w(N).layoutMode.value === "list",
|
|
2431
|
+
onClick: n[4] ||= (e) => w(N).layoutMode.value = "list"
|
|
2432
|
+
}, [f(w(ie), {
|
|
2433
2433
|
size: 14,
|
|
2434
2434
|
"stroke-width": 2
|
|
2435
2435
|
})], 12, jn)])
|
|
2436
|
-
]),
|
|
2436
|
+
]), x("div", Mn, [w(k).length > 1 ? (y(), _("select", {
|
|
2437
2437
|
key: 0,
|
|
2438
|
-
"aria-label":
|
|
2438
|
+
"aria-label": p.value.mediaLibrary.filterAriaLabel,
|
|
2439
2439
|
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",
|
|
2440
2440
|
style: {
|
|
2441
2441
|
"border-color": "var(--tpl-border)",
|
|
2442
2442
|
"background-color": "var(--tpl-bg)",
|
|
2443
2443
|
color: "var(--tpl-text)"
|
|
2444
2444
|
},
|
|
2445
|
-
value:
|
|
2445
|
+
value: w(j).categoryFilter.value ?? "",
|
|
2446
2446
|
onChange: le
|
|
2447
|
-
}, [
|
|
2447
|
+
}, [x("option", Pn, c(p.value.mediaLibrary.filterAll), 1), (y(!0), _(S, null, s(w(k), (e) => (y(), _("option", {
|
|
2448
2448
|
key: e,
|
|
2449
2449
|
value: e
|
|
2450
|
-
},
|
|
2450
|
+
}, c(w(N).getCategoryLabel(e)), 9, Fn))), 128))], 40, Nn)) : g("", !0)])]), x("div", In, [w(j).viewMode.value === "files" && (P.value || I.value) ? (y(), _("div", Ln, [P.value ? (y(), T(an, {
|
|
2451
2451
|
key: 0,
|
|
2452
|
-
"is-uploading":
|
|
2453
|
-
"upload-progress":
|
|
2454
|
-
onUpload:
|
|
2452
|
+
"is-uploading": w(j).isUploading.value,
|
|
2453
|
+
"upload-progress": w(j).uploadProgress.value,
|
|
2454
|
+
onUpload: w(N).handleUpload
|
|
2455
2455
|
}, null, 8, [
|
|
2456
2456
|
"is-uploading",
|
|
2457
2457
|
"upload-progress",
|
|
2458
2458
|
"onUpload"
|
|
2459
|
-
])) :
|
|
2459
|
+
])) : g("", !0), I.value ? (y(), _("button", {
|
|
2460
2460
|
key: 1,
|
|
2461
2461
|
"data-testid": "media-import-url",
|
|
2462
2462
|
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",
|
|
@@ -2465,25 +2465,25 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2465
2465
|
color: "var(--tpl-text-muted)",
|
|
2466
2466
|
"background-color": "var(--tpl-bg)"
|
|
2467
2467
|
},
|
|
2468
|
-
onClick:
|
|
2469
|
-
}, [
|
|
2468
|
+
onClick: n[5] ||= (e) => w(N).showImportUrlModal.value = !0
|
|
2469
|
+
}, [f(w(re), {
|
|
2470
2470
|
size: 14,
|
|
2471
2471
|
"stroke-width": 2
|
|
2472
|
-
}),
|
|
2473
|
-
items:
|
|
2474
|
-
"selected-ids":
|
|
2475
|
-
"is-loading":
|
|
2476
|
-
"has-more":
|
|
2477
|
-
accept:
|
|
2478
|
-
layout:
|
|
2479
|
-
"search-query":
|
|
2472
|
+
}), v(" " + c(p.value.mediaLibrary.importFromUrl), 1)])) : g("", !0)])) : g("", !0), f(pt, {
|
|
2473
|
+
items: w(N).displayItems.value,
|
|
2474
|
+
"selected-ids": w(j).selectedItems.value,
|
|
2475
|
+
"is-loading": w(j).isLoading.value,
|
|
2476
|
+
"has-more": w(j).viewMode.value === "files" && w(j).hasMore.value,
|
|
2477
|
+
accept: e.accept,
|
|
2478
|
+
layout: w(N).layoutMode.value,
|
|
2479
|
+
"search-query": w(j).searchQuery.value,
|
|
2480
2480
|
"can-update": R.value,
|
|
2481
2481
|
"can-replace": z.value,
|
|
2482
|
-
onSelect:
|
|
2483
|
-
onToggle:
|
|
2484
|
-
onLoadMore:
|
|
2485
|
-
onEdit:
|
|
2486
|
-
onReplace:
|
|
2482
|
+
onSelect: w(N).handleSelect,
|
|
2483
|
+
onToggle: w(j).toggleSelection,
|
|
2484
|
+
onLoadMore: w(j).loadMore,
|
|
2485
|
+
onEdit: w(N).handleEditItem,
|
|
2486
|
+
onReplace: w(N).handleReplaceItem,
|
|
2487
2487
|
onConfirm: J
|
|
2488
2488
|
}, null, 8, [
|
|
2489
2489
|
"items",
|
|
@@ -2501,38 +2501,38 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2501
2501
|
"onEdit",
|
|
2502
2502
|
"onReplace"
|
|
2503
2503
|
])])])]),
|
|
2504
|
-
|
|
2505
|
-
visible:
|
|
2506
|
-
"is-importing":
|
|
2507
|
-
error:
|
|
2508
|
-
onImport:
|
|
2509
|
-
onClose:
|
|
2504
|
+
f(wt, {
|
|
2505
|
+
visible: w(N).showImportUrlModal.value,
|
|
2506
|
+
"is-importing": w(j).isImportingFromUrl.value,
|
|
2507
|
+
error: w(j).importFromUrlError.value,
|
|
2508
|
+
onImport: w(N).handleImportFromUrl,
|
|
2509
|
+
onClose: n[6] ||= (e) => w(N).showImportUrlModal.value = !1
|
|
2510
2510
|
}, null, 8, [
|
|
2511
2511
|
"visible",
|
|
2512
2512
|
"is-importing",
|
|
2513
2513
|
"error",
|
|
2514
2514
|
"onImport"
|
|
2515
2515
|
]),
|
|
2516
|
-
|
|
2516
|
+
w(N).editingItem.value ? (y(), T(w(d), {
|
|
2517
2517
|
key: 0,
|
|
2518
2518
|
visible: !0,
|
|
2519
|
-
item:
|
|
2520
|
-
save:
|
|
2521
|
-
"can-crop": z.value &&
|
|
2522
|
-
onClose:
|
|
2519
|
+
item: w(N).editingItem.value,
|
|
2520
|
+
save: w(N).handleEditSave,
|
|
2521
|
+
"can-crop": z.value && w(N).editingItem.value.canUpdate !== !1,
|
|
2522
|
+
onClose: n[7] ||= (e) => w(N).editingItem.value = null
|
|
2523
2523
|
}, null, 8, [
|
|
2524
2524
|
"item",
|
|
2525
2525
|
"save",
|
|
2526
2526
|
"can-crop"
|
|
2527
|
-
])) :
|
|
2528
|
-
|
|
2529
|
-
visible:
|
|
2530
|
-
item:
|
|
2531
|
-
"usage-info":
|
|
2532
|
-
"is-replacing":
|
|
2533
|
-
error:
|
|
2534
|
-
onReplace:
|
|
2535
|
-
onClose:
|
|
2527
|
+
])) : g("", !0),
|
|
2528
|
+
f(Xt, {
|
|
2529
|
+
visible: w(j).showReplaceWarning.value,
|
|
2530
|
+
item: w(j).pendingReplaceItem.value,
|
|
2531
|
+
"usage-info": w(j).replaceUsageInfo.value,
|
|
2532
|
+
"is-replacing": w(j).isReplacing.value,
|
|
2533
|
+
error: w(j).replaceError.value,
|
|
2534
|
+
onReplace: w(N).handleReplaceFile,
|
|
2535
|
+
onClose: w(j).cancelReplace
|
|
2536
2536
|
}, null, 8, [
|
|
2537
2537
|
"visible",
|
|
2538
2538
|
"item",
|
|
@@ -2542,7 +2542,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2542
2542
|
"onReplace",
|
|
2543
2543
|
"onClose"
|
|
2544
2544
|
]),
|
|
2545
|
-
|
|
2545
|
+
f(M, {
|
|
2546
2546
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
2547
2547
|
"enter-from-class": "tpl:opacity-0",
|
|
2548
2548
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2550,7 +2550,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2550
2550
|
"leave-from-class": "tpl:opacity-100",
|
|
2551
2551
|
"leave-to-class": "tpl:opacity-0"
|
|
2552
2552
|
}, {
|
|
2553
|
-
default:
|
|
2553
|
+
default: r(() => [w(j).showDeleteWarning.value ? (y(), _("div", {
|
|
2554
2554
|
key: 0,
|
|
2555
2555
|
role: "dialog",
|
|
2556
2556
|
"aria-modal": "true",
|
|
@@ -2561,79 +2561,79 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2561
2561
|
"backdrop-filter": "blur(8px)",
|
|
2562
2562
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2563
2563
|
},
|
|
2564
|
-
onClick:
|
|
2565
|
-
}, [
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
class:
|
|
2564
|
+
onClick: n[10] ||= A((...e) => w(j).cancelDelete && w(j).cancelDelete(...e), ["self"])
|
|
2565
|
+
}, [x("div", Rn, [
|
|
2566
|
+
x("h3", zn, c(p.value.mediaLibrary.deleteWarningTitle), 1),
|
|
2567
|
+
x("p", {
|
|
2568
|
+
class: b(["tpl:text-xs", w(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
2569
2569
|
style: { color: "var(--tpl-text-muted)" }
|
|
2570
|
-
},
|
|
2571
|
-
|
|
2572
|
-
|
|
2570
|
+
}, c(p.value.mediaLibrary.deleteWarningMessage), 3),
|
|
2571
|
+
w(N).hasUsedFiles.value ? (y(), _("p", Bn, c(p.value.mediaLibrary.deleteWarningUsageNote), 1)) : g("", !0),
|
|
2572
|
+
w(N).hasUsedFiles.value ? (y(), _("div", Vn, [(y(!0), _(S, null, s(w(j).deleteUsageInfo.value, (e, t) => (y(), _("div", {
|
|
2573
2573
|
key: t,
|
|
2574
2574
|
class: "tpl:text-xs",
|
|
2575
2575
|
style: { color: "var(--tpl-text)" }
|
|
2576
|
-
}, [e.templateCount > 0 ? (
|
|
2577
|
-
|
|
2576
|
+
}, [e.templateCount > 0 ? (y(), _(S, { key: 0 }, [x("span", Hn, c(w(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), x("span", Un, " - " + c(p.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : g("", !0)]))), 128))])) : g("", !0),
|
|
2577
|
+
x("div", Wn, [x("button", {
|
|
2578
2578
|
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",
|
|
2579
2579
|
style: {
|
|
2580
2580
|
"border-color": "var(--tpl-border)",
|
|
2581
2581
|
color: "var(--tpl-text)",
|
|
2582
2582
|
"background-color": "var(--tpl-bg)"
|
|
2583
2583
|
},
|
|
2584
|
-
onClick:
|
|
2585
|
-
},
|
|
2584
|
+
onClick: n[8] ||= (...e) => w(j).cancelDelete && w(j).cancelDelete(...e)
|
|
2585
|
+
}, c(p.value.mediaLibrary.cancel), 1), x("button", {
|
|
2586
2586
|
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",
|
|
2587
2587
|
style: {
|
|
2588
2588
|
"border-color": "var(--tpl-danger)",
|
|
2589
2589
|
color: "var(--tpl-danger)",
|
|
2590
2590
|
"background-color": "var(--tpl-bg)"
|
|
2591
2591
|
},
|
|
2592
|
-
onClick:
|
|
2593
|
-
},
|
|
2594
|
-
])])) :
|
|
2592
|
+
onClick: n[9] ||= (...e) => w(j).confirmDelete && w(j).confirmDelete(...e)
|
|
2593
|
+
}, c(w(N).hasUsedFiles.value ? p.value.mediaLibrary.deleteAnyway : p.value.mediaLibrary.confirmDelete), 1)])
|
|
2594
|
+
])])) : g("", !0)]),
|
|
2595
2595
|
_: 1
|
|
2596
2596
|
}),
|
|
2597
|
-
|
|
2597
|
+
x("div", Gn, [x("div", Kn, [w(j).previewItem.value ? (y(), T(It, {
|
|
2598
2598
|
key: 0,
|
|
2599
|
-
item:
|
|
2600
|
-
folders:
|
|
2601
|
-
}, null, 8, ["item", "folders"])) :
|
|
2599
|
+
item: w(j).previewItem.value,
|
|
2600
|
+
folders: w(N).folderTree.value
|
|
2601
|
+
}, null, 8, ["item", "folders"])) : g("", !0)]), x("div", qn, [w(j).selectedItems.value.size > 0 ? (y(), _("div", Jn, [w(j).previewItem.value ? (y(), _("button", {
|
|
2602
2602
|
key: 0,
|
|
2603
2603
|
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",
|
|
2604
|
-
style:
|
|
2605
|
-
borderColor:
|
|
2606
|
-
color:
|
|
2604
|
+
style: o({
|
|
2605
|
+
borderColor: w(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
|
|
2606
|
+
color: w(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
|
|
2607
2607
|
backgroundColor: "var(--tpl-bg)"
|
|
2608
2608
|
}),
|
|
2609
|
-
onClick:
|
|
2610
|
-
}, [
|
|
2609
|
+
onClick: n[11] ||= (e) => w(N).copy(w(N).selectedUrl.value)
|
|
2610
|
+
}, [w(N).copied.value ? (y(), T(w(V), {
|
|
2611
2611
|
key: 1,
|
|
2612
2612
|
size: 12,
|
|
2613
2613
|
"stroke-width": 2
|
|
2614
|
-
})) : (
|
|
2614
|
+
})) : (y(), T(w(te), {
|
|
2615
2615
|
key: 0,
|
|
2616
2616
|
size: 12,
|
|
2617
2617
|
"stroke-width": 2
|
|
2618
|
-
})),
|
|
2618
|
+
})), v(" " + c(w(N).copied.value ? p.value.mediaLibrary.copied : p.value.mediaLibrary.copyUrl), 1)], 4)) : g("", !0), ee.value ? (y(), _("div", Yn, [x("button", {
|
|
2619
2619
|
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",
|
|
2620
2620
|
style: {
|
|
2621
2621
|
"border-color": "var(--tpl-border)",
|
|
2622
2622
|
color: "var(--tpl-text)",
|
|
2623
2623
|
"background-color": "var(--tpl-bg)"
|
|
2624
2624
|
},
|
|
2625
|
-
onClick:
|
|
2626
|
-
},
|
|
2625
|
+
onClick: n[12] ||= (e) => w(N).showMovePicker.value = !w(N).showMovePicker.value
|
|
2626
|
+
}, c(p.value.mediaLibrary.moveSelected), 1), w(N).showMovePicker.value ? (y(), T(kt, {
|
|
2627
2627
|
key: 0,
|
|
2628
|
-
folders:
|
|
2629
|
-
"current-folder-id":
|
|
2630
|
-
onSelect:
|
|
2631
|
-
onClose:
|
|
2628
|
+
folders: w(N).folderTree.value,
|
|
2629
|
+
"current-folder-id": w(j).currentFolderId.value,
|
|
2630
|
+
onSelect: w(N).handleMoveToFolder,
|
|
2631
|
+
onClose: n[13] ||= (e) => w(N).showMovePicker.value = !1
|
|
2632
2632
|
}, null, 8, [
|
|
2633
2633
|
"folders",
|
|
2634
2634
|
"current-folder-id",
|
|
2635
2635
|
"onSelect"
|
|
2636
|
-
])) :
|
|
2636
|
+
])) : g("", !0)])) : g("", !0)])) : g("", !0), x("div", Xn, [oe.value > 0 ? (y(), _("button", {
|
|
2637
2637
|
key: 0,
|
|
2638
2638
|
"data-testid": "media-delete",
|
|
2639
2639
|
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",
|
|
@@ -2643,9 +2643,9 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2643
2643
|
"background-color": "var(--tpl-bg)"
|
|
2644
2644
|
},
|
|
2645
2645
|
onClick: X
|
|
2646
|
-
},
|
|
2646
|
+
}, c(p.value.mediaLibrary.deleteSelected), 1)) : g("", !0), e.showConfirm ? (y(), _("button", {
|
|
2647
2647
|
key: 1,
|
|
2648
|
-
"data-testid":
|
|
2648
|
+
"data-testid": m.value,
|
|
2649
2649
|
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",
|
|
2650
2650
|
style: {
|
|
2651
2651
|
"background-color": "var(--tpl-primary)",
|
|
@@ -2653,13 +2653,13 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2653
2653
|
},
|
|
2654
2654
|
disabled: !G.value,
|
|
2655
2655
|
onClick: J
|
|
2656
|
-
},
|
|
2656
|
+
}, c(e.accept?.length ? p.value.mediaLibrary.selectImage : p.value.mediaLibrary.selectFile), 9, Zn)) : g("", !0)])])])
|
|
2657
2657
|
]));
|
|
2658
2658
|
}
|
|
2659
2659
|
}), $n = /* #__PURE__ */ Object.assign({
|
|
2660
2660
|
"./locales/ca.ts": () => import("./ca-Cc6eL0ZS.js"),
|
|
2661
2661
|
"./locales/de.ts": () => import("./de-DtrXVcuY.js"),
|
|
2662
|
-
"./locales/en.ts": () => import("./en-
|
|
2662
|
+
"./locales/en.ts": () => import("./en-Db76vJbY.js"),
|
|
2663
2663
|
"./locales/es.ts": () => import("./es-Dw_h7Oll.js"),
|
|
2664
2664
|
"./locales/fr.ts": () => import("./fr-BJaeKu_8.js"),
|
|
2665
2665
|
"./locales/ja.ts": () => import("./ja-Cu2HdYaK.js"),
|
|
@@ -2702,24 +2702,24 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
|
|
|
2702
2702
|
},
|
|
2703
2703
|
emits: ["close", "select"],
|
|
2704
2704
|
setup(t, { emit: n }) {
|
|
2705
|
-
let
|
|
2706
|
-
O(() =>
|
|
2707
|
-
|
|
2708
|
-
}, { immediate: !0 }),
|
|
2709
|
-
let
|
|
2710
|
-
|
|
2711
|
-
let
|
|
2712
|
-
|
|
2713
|
-
let
|
|
2714
|
-
_e(
|
|
2715
|
-
function
|
|
2716
|
-
e.key === "Escape" && (
|
|
2705
|
+
let i = t, o = n, s = e(null);
|
|
2706
|
+
O(() => i.locale, async (e) => {
|
|
2707
|
+
s.value = await or(e ?? "en");
|
|
2708
|
+
}, { immediate: !0 }), a(de, s);
|
|
2709
|
+
let c = h(() => i.uiTheme);
|
|
2710
|
+
a(fe, c);
|
|
2711
|
+
let l = C(() => i.popoverTarget ?? null);
|
|
2712
|
+
a(X, l), a(Z, C(() => i.locale));
|
|
2713
|
+
let u = e(null), d = e(null);
|
|
2714
|
+
_e(u, h(() => i.visible && s.value !== null && !d.value?.nestedDialogOpen));
|
|
2715
|
+
function m(e) {
|
|
2716
|
+
e.key === "Escape" && (d.value?.handleEscape() ? e.preventDefault() : o("close"));
|
|
2717
2717
|
}
|
|
2718
|
-
P(document, "keydown",
|
|
2719
|
-
function
|
|
2720
|
-
|
|
2718
|
+
P(document, "keydown", m);
|
|
2719
|
+
function v(e) {
|
|
2720
|
+
o("select", e), o("close");
|
|
2721
2721
|
}
|
|
2722
|
-
return (
|
|
2722
|
+
return (e, n) => (y(), T(p, { to: t.popoverTarget || "body" }, [f(M, {
|
|
2723
2723
|
"enter-active-class": "tpl:transition tpl:duration-200",
|
|
2724
2724
|
"enter-from-class": "tpl:opacity-0",
|
|
2725
2725
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2727,20 +2727,20 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
|
|
|
2727
2727
|
"leave-from-class": "tpl:opacity-100",
|
|
2728
2728
|
"leave-to-class": "tpl:opacity-0"
|
|
2729
2729
|
}, {
|
|
2730
|
-
default:
|
|
2730
|
+
default: r(() => [t.visible && s.value ? (y(), _("div", {
|
|
2731
2731
|
key: 0,
|
|
2732
2732
|
"data-testid": "media-library-modal",
|
|
2733
|
-
"data-tpl-theme":
|
|
2734
|
-
class:
|
|
2733
|
+
"data-tpl-theme": c.value,
|
|
2734
|
+
class: b([t.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"]),
|
|
2735
2735
|
style: {
|
|
2736
2736
|
"background-color": "var(--tpl-overlay)",
|
|
2737
2737
|
"backdrop-filter": "blur(8px)",
|
|
2738
2738
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2739
2739
|
},
|
|
2740
|
-
onClick:
|
|
2741
|
-
}, [
|
|
2740
|
+
onClick: n[1] ||= A((e) => o("close"), ["self"])
|
|
2741
|
+
}, [x("div", {
|
|
2742
2742
|
ref_key: "dialogRef",
|
|
2743
|
-
ref:
|
|
2743
|
+
ref: u,
|
|
2744
2744
|
role: "dialog",
|
|
2745
2745
|
"aria-modal": "true",
|
|
2746
2746
|
"aria-labelledby": "tpl-media-library-title",
|
|
@@ -2755,26 +2755,26 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
|
|
|
2755
2755
|
border: "1px solid var(--tpl-border)",
|
|
2756
2756
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
2757
2757
|
}
|
|
2758
|
-
}, [
|
|
2758
|
+
}, [f(Qn, {
|
|
2759
2759
|
ref_key: "chromeRef",
|
|
2760
|
-
ref:
|
|
2760
|
+
ref: d,
|
|
2761
2761
|
provider: t.provider,
|
|
2762
2762
|
accept: t.accept,
|
|
2763
2763
|
"template-id": t.templateId,
|
|
2764
2764
|
"on-error": t.onError,
|
|
2765
|
-
translations:
|
|
2765
|
+
translations: s.value,
|
|
2766
2766
|
"show-close": "",
|
|
2767
2767
|
"show-confirm": "",
|
|
2768
2768
|
"confirm-test-id": "media-confirm",
|
|
2769
|
-
onClose:
|
|
2770
|
-
onConfirm:
|
|
2769
|
+
onClose: n[0] ||= (e) => o("close"),
|
|
2770
|
+
onConfirm: v
|
|
2771
2771
|
}, null, 8, [
|
|
2772
2772
|
"provider",
|
|
2773
2773
|
"accept",
|
|
2774
2774
|
"template-id",
|
|
2775
2775
|
"on-error",
|
|
2776
2776
|
"translations"
|
|
2777
|
-
])], 512)], 10, sr)) :
|
|
2777
|
+
])], 512)], 10, sr)) : g("", !0)]),
|
|
2778
2778
|
_: 1
|
|
2779
2779
|
})], 8, ["to"]));
|
|
2780
2780
|
}
|