@templatical/editor 0.52.1 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AiAltTextPopover-NMJqQKvD.js +106 -0
- package/dist/{AiAltTextReview-9ySsXOTU.js → AiAltTextReview-Ci4zHwRc.js} +68 -66
- package/dist/AiChatPanel-DdhtfsmO.js +561 -0
- package/dist/{AiPanels-DqT4PgQ0.js → AiPanels-HBx7xoJR.js} +6 -6
- package/dist/{AiRewriteMenu-28agTycW.js → AiRewriteMenu-DPzSekZt.js} +76 -105
- package/dist/BlockIssueBadge-eIXZJ9M3.js +33 -0
- package/dist/BlockPreviewCanvas-DO-2TP_6.js +140 -0
- package/dist/{CloudHeaderExtras-QI82yF54.js → CloudHeaderExtras-XpjJjn3o.js} +4 -4
- package/dist/{CloudPanels-BKJaLkUN.js → CloudPanels-i2kZdrdP.js} +53 -53
- package/dist/CollaborationNotices-DANsjl7c.js +65 -0
- package/dist/{CollaboratorBar-CXQqN3VP.js → CollaboratorBar-CbbAA0m1.js} +24 -24
- package/dist/CommentsPanel-CYW3LWis.js +16 -0
- package/dist/CommentsSidebar-CcF4ISMi.js +526 -0
- package/dist/{CountdownBlock-CU2yTWtF.js → CountdownBlock-BMezkFbJ.js} +15 -15
- package/dist/CountdownToolbar-D3Lv74kU.js +258 -0
- package/dist/IssuesPanel-BMAG9042.js +371 -0
- package/dist/LanguageMenu-FlP_Jbup.js +403 -0
- package/dist/{LoadingTrack-DM4g6j7b.js → LoadingTrack-BG8cg9xi.js} +2 -2
- package/dist/LocaleNotices-DAnVszWu.js +46 -0
- package/dist/LogicTagInsertButton-BjYs-UQX.js +1096 -0
- package/dist/{MediaEditModal-Dy08GEwE.js → MediaEditModal-LnG-cF_S.js} +451 -451
- package/dist/{MediaPanels-BgEp7iCp.js → MediaPanels-C2r5fiFo.js} +4 -4
- package/dist/{MergeTagInput-B9dtUthD.js → MergeTagInput-BsnogCeY.js} +30 -30
- package/dist/{MergeTagModeToggle-DxujhYJ4.js → MergeTagModeToggle-DiufIQ-_.js} +49 -49
- package/dist/MergeTagTextarea-BweI-Xsi.js +126 -0
- package/dist/ParagraphEditor-qgBp5yIB.js +825 -0
- package/dist/{RestoreVersionDialog-C4s_JYCx.js → RestoreVersionDialog-DdYUrFiK.js} +23 -23
- package/dist/{RichTextEditorContent-o6HmE8GR.js → RichTextEditorContent-C5MAzx3E.js} +47 -47
- package/dist/{SaveBlockDialog-CWLrly6l.js → SaveBlockDialog-eK6fjtTy.js} +86 -86
- package/dist/{cdn/chunks/SavedBlocksBrowserModal-BPYcRoGa.js → SavedBlocksBrowserModal-D2QHd2Yp.js} +135 -132
- package/dist/{SavedBlocksPanels-BE1N9rNZ.js → SavedBlocksPanels-Cl61f4Mf.js} +9 -9
- package/dist/{SavedBlocksPickBar-Dwl94xhP.js → SavedBlocksPickBar-CXP2dkeB.js} +15 -15
- package/dist/TemplateSettings-BKJrdZcH.js +294 -0
- package/dist/TestEmailModal-DQotJg6g.js +212 -0
- package/dist/{TestEmailPanel-DaFjP9QK.js → TestEmailPanel-CwiTzJsh.js} +4 -4
- package/dist/TitleEditor-CzSvsPAn.js +202 -0
- package/dist/ToggleSwitch-R3wCCYE6.js +43 -0
- package/dist/Toolbar-Cd75ci5W.js +3711 -0
- package/dist/{TplModal-DLMssVlt.js → TplModal-ZoXu40T9.js} +17 -17
- package/dist/{VersionHistoryMenu-BkbYUs0Q.js → VersionHistoryMenu-BvhN-Ofk.js} +39 -39
- package/dist/{VersionHistoryPanels-DP7HaYWv.js → VersionHistoryPanels-DPWMnYbd.js} +5 -5
- package/dist/VersionPreviewBanner-CuJnasxH.js +37 -0
- package/dist/WrapperBlock-D4fPwO0t.js +44 -0
- package/dist/{blockTypeIcons-BHjlPnPf.js → blockTypeIcons-BXMxu86H.js} +7 -7
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-CD-Kt1qz.js → ca-DOuIxWRv.js} +114 -2
- package/dist/cdn/chunks/AiAltTextPopover-ByZ0FEqI.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-ByZ0FEqI.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-BGLLSKLm.js → AiAltTextReview-Dtm3A2cD.js} +70 -68
- package/dist/cdn/chunks/AiAltTextReview-Dtm3A2cD.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-DciEt27y.js +487 -0
- package/dist/cdn/chunks/AiChatPanel-DciEt27y.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-0wBarZSH.js → AiPanels-BV5D1itk.js} +11 -11
- package/dist/cdn/chunks/{AiPanels-0wBarZSH.js.map → AiPanels-BV5D1itk.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-qf-cfEpy.js → AiRewriteMenu-D3jkh6Xb.js} +79 -79
- package/dist/cdn/chunks/AiRewriteMenu-D3jkh6Xb.js.map +1 -0
- package/dist/cdn/chunks/BlockIssueBadge-DyEgBZtR.js +34 -0
- package/dist/cdn/chunks/BlockIssueBadge-DyEgBZtR.js.map +1 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-RQFilqXC.js +142 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-DGBh6mqe.js.map → BlockPreviewCanvas-RQFilqXC.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-BMNK_F9p.js → CloudHeaderExtras-BtqdN777.js} +4 -4
- package/dist/cdn/chunks/{CloudHeaderExtras-BMNK_F9p.js.map → CloudHeaderExtras-BtqdN777.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-JMWIoVWh.js → CloudPanels-BSJ-Z5Hw.js} +45 -45
- package/dist/cdn/chunks/{CloudPanels-JMWIoVWh.js.map → CloudPanels-BSJ-Z5Hw.js.map} +1 -1
- package/dist/cdn/chunks/CollaborationNotices-BS7xrlPE.js +67 -0
- package/dist/cdn/chunks/CollaborationNotices-BS7xrlPE.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CXByAoUz.js → CollaboratorBar-Bc9914Az.js} +17 -17
- package/dist/cdn/chunks/{CollaboratorBar-CXByAoUz.js.map → CollaboratorBar-Bc9914Az.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-DbR9phAk.js +18 -0
- package/dist/cdn/chunks/{CommentsPanel-DoJnKLXI.js.map → CommentsPanel-DbR9phAk.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-BD4--XP2.js +496 -0
- package/dist/cdn/chunks/CommentsSidebar-BD4--XP2.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-BqRw147R.js → CountdownBlock-CjMhMhnv.js} +22 -22
- package/dist/cdn/chunks/{CountdownBlock-BqRw147R.js.map → CountdownBlock-CjMhMhnv.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-DxwYBw-d.js +260 -0
- package/dist/cdn/chunks/CountdownToolbar-DxwYBw-d.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-C7LfxaAY.js → IssuesPanel-CUmI4HMm.js} +133 -121
- package/dist/cdn/chunks/IssuesPanel-CUmI4HMm.js.map +1 -0
- package/dist/cdn/chunks/LanguageMenu-3ydCozQJ.js +359 -0
- package/dist/cdn/chunks/LanguageMenu-3ydCozQJ.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-CZuLTazv.js → LoadingTrack-DUYcDHOV.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-CZuLTazv.js.map → LoadingTrack-DUYcDHOV.js.map} +1 -1
- package/dist/cdn/chunks/LocaleNotices-BfoH6gST.js +47 -0
- package/dist/cdn/chunks/LocaleNotices-BfoH6gST.js.map +1 -0
- package/dist/{LogicTagInsertButton-CfscnwCn.js → cdn/chunks/LogicTagInsertButton-5Z3fFzjc.js} +422 -449
- package/dist/cdn/chunks/LogicTagInsertButton-5Z3fFzjc.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-Cpcod6_U.js → MediaEditModal-DDCIwr9U.js} +421 -421
- package/dist/cdn/chunks/MediaEditModal-DDCIwr9U.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-BIdcW_1f.js → MediaPanels-Dz79oy8P.js} +5 -5
- package/dist/cdn/chunks/{MediaPanels-BIdcW_1f.js.map → MediaPanels-Dz79oy8P.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-BvWg8o5E.js → MergeTagInput-CIWy-cXf.js} +28 -28
- package/dist/cdn/chunks/{MergeTagInput-BvWg8o5E.js.map → MergeTagInput-CIWy-cXf.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BgKEVUtV.js → MergeTagModeToggle-BrP5GR-x.js} +52 -52
- package/dist/cdn/chunks/MergeTagModeToggle-BrP5GR-x.js.map +1 -0
- package/dist/cdn/chunks/MergeTagTextarea-D3nNDlhV.js +128 -0
- package/dist/cdn/chunks/MergeTagTextarea-D3nNDlhV.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-DDolH_Pf.js +660 -0
- package/dist/cdn/chunks/ParagraphEditor-DDolH_Pf.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-CjOdD2xj.js → RestoreVersionDialog-Crj1DBqC.js} +22 -22
- package/dist/cdn/chunks/{RestoreVersionDialog-CjOdD2xj.js.map → RestoreVersionDialog-Crj1DBqC.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DNjR_sNN.js → RichTextEditorContent-rCCqFlwJ.js} +44 -44
- package/dist/cdn/chunks/{RichTextEditorContent-DNjR_sNN.js.map → RichTextEditorContent-rCCqFlwJ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CUhpawq0.js → SaveBlockDialog-C34RW1aM.js} +77 -77
- package/dist/cdn/chunks/{SaveBlockDialog-CUhpawq0.js.map → SaveBlockDialog-C34RW1aM.js.map} +1 -1
- package/dist/{SavedBlocksBrowserModal-CE8n4EBS.js → cdn/chunks/SavedBlocksBrowserModal-CJnwWPT-.js} +103 -106
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BPYcRoGa.js.map → SavedBlocksBrowserModal-CJnwWPT-.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-C6--Bc81.js → SavedBlocksPanels-CA2PqXIH.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksPanels-C6--Bc81.js.map → SavedBlocksPanels-CA2PqXIH.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DUavxpbU.js → SavedBlocksPickBar-Dj3ortee.js} +16 -16
- package/dist/cdn/chunks/{SavedBlocksPickBar-DUavxpbU.js.map → SavedBlocksPickBar-Dj3ortee.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-sW0ZlDl1.js +266 -0
- package/dist/cdn/chunks/TemplateSettings-sW0ZlDl1.js.map +1 -0
- package/dist/cdn/chunks/TestEmailModal-BXeCtTjU.js +212 -0
- package/dist/cdn/chunks/TestEmailModal-BXeCtTjU.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-CcUpEpAn.js → TestEmailPanel-CpZcpB9D.js} +5 -5
- package/dist/cdn/chunks/{TestEmailPanel-CcUpEpAn.js.map → TestEmailPanel-CpZcpB9D.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Bv3SmSO6.js +202 -0
- package/dist/cdn/chunks/TitleEditor-Bv3SmSO6.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js +45 -0
- package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js.map +1 -0
- package/dist/cdn/chunks/Toolbar-BJKpJ2Mg.js +3626 -0
- package/dist/cdn/chunks/Toolbar-BJKpJ2Mg.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CFPDgbwQ.js → TplModal-DDDUDMYC.js} +20 -20
- package/dist/cdn/chunks/{TplModal-CFPDgbwQ.js.map → TplModal-DDDUDMYC.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-BYlLRvRJ.js → VersionHistoryMenu-DSElv3Sv.js} +33 -33
- package/dist/cdn/chunks/{VersionHistoryMenu-BYlLRvRJ.js.map → VersionHistoryMenu-DSElv3Sv.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-C6SOVoiT.js → VersionHistoryPanels-H2nuik1l.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryPanels-C6SOVoiT.js.map → VersionHistoryPanels-H2nuik1l.js.map} +1 -1
- package/dist/cdn/chunks/VersionPreviewBanner-Whwxh55w.js +39 -0
- package/dist/cdn/chunks/VersionPreviewBanner-Whwxh55w.js.map +1 -0
- package/dist/cdn/chunks/WrapperBlock-jTqsuLnS.js +46 -0
- package/dist/cdn/chunks/WrapperBlock-jTqsuLnS.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-D7FW7Ypo.js → blockTypeIcons-DMgLcuI8.js} +5 -5
- package/dist/cdn/chunks/{blockTypeIcons-D7FW7Ypo.js.map → blockTypeIcons-DMgLcuI8.js.map} +1 -1
- package/dist/{ca-CD-Kt1qz.js → cdn/chunks/ca-DOuIxWRv.js} +116 -0
- package/dist/cdn/chunks/ca-DOuIxWRv.js.map +1 -0
- package/dist/cdn/chunks/composables-D0UYam2P.js +3039 -0
- package/dist/cdn/chunks/composables-D0UYam2P.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-Cth2JCEh.js → createCloudRuntime-BdsclY8_.js} +75 -73
- package/dist/cdn/chunks/createCloudRuntime-BdsclY8_.js.map +1 -0
- package/dist/{de-CeFJ6wbM.js → cdn/chunks/de-DaOUfYBX.js} +116 -0
- package/dist/cdn/chunks/de-DaOUfYBX.js.map +1 -0
- package/dist/cdn/chunks/{dist-8ym3y-pH.js → dist-BzXULHvI.js} +48 -48
- package/dist/cdn/chunks/{dist-8ym3y-pH.js.map → dist-BzXULHvI.js.map} +1 -1
- package/dist/cdn/chunks/{dist-BMzNabtD.js → dist-DqGgijFI.js} +114 -114
- package/dist/cdn/chunks/{dist-BMzNabtD.js.map → dist-DqGgijFI.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-Du8AUMFT.js → draggable-DepKdldn.js} +1491 -1486
- package/dist/cdn/chunks/draggable-DepKdldn.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CyCe560f.js → editor-modal-CPbgthOv.js} +781 -781
- package/dist/cdn/chunks/{editor-modal-CyCe560f.js.map → editor-modal-CPbgthOv.js.map} +1 -1
- package/dist/{en-D14i5nFh.js → cdn/chunks/en-C0pHHMiR.js} +116 -0
- package/dist/cdn/chunks/en-C0pHHMiR.js.map +1 -0
- package/dist/cdn/chunks/en-IYVryJRl.js +1 -0
- package/dist/{es-zDacbMhs.js → cdn/chunks/es-CxyEKr6n.js} +116 -0
- package/dist/cdn/chunks/es-CxyEKr6n.js.map +1 -0
- package/dist/cdn/chunks/{extensions-CFF2KWy-.js → extensions-Uh9vuFfK.js} +59 -59
- package/dist/cdn/chunks/{extensions-CFF2KWy-.js.map → extensions-Uh9vuFfK.js.map} +1 -1
- package/dist/{fr-CSgYtjOd.js → cdn/chunks/fr-CYbamiI6.js} +116 -0
- package/dist/cdn/chunks/fr-CYbamiI6.js.map +1 -0
- package/dist/cdn/chunks/{icons-okSPsLOa.js → icons-CSSMtbGK.js} +150 -109
- package/dist/cdn/chunks/icons-CSSMtbGK.js.map +1 -0
- package/dist/{ja-B7H3ID8O.js → cdn/chunks/ja-DfaIAoGI.js} +116 -0
- package/dist/cdn/chunks/ja-DfaIAoGI.js.map +1 -0
- package/dist/cdn/chunks/keys-CoQtCqNv.js +11 -0
- package/dist/cdn/chunks/keys-CoQtCqNv.js.map +1 -0
- package/dist/cdn/chunks/languageName-DEEOhDWI.js +12 -0
- package/dist/cdn/chunks/languageName-DEEOhDWI.js.map +1 -0
- package/dist/{nl-176ySmc5.js → cdn/chunks/nl-DkrB-VKZ.js} +116 -0
- package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +1 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-oGhwVscw.js +290 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-oGhwVscw.js.map +1 -0
- package/dist/cdn/chunks/noticeTones-D7BPu-Le.js +16 -0
- package/dist/cdn/chunks/noticeTones-D7BPu-Le.js.map +1 -0
- package/dist/cdn/chunks/plural-CyxrJXL1.js +17 -0
- package/dist/cdn/chunks/plural-CyxrJXL1.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-BcXIz7oJ.js → preRenderCustomBlocks-C8k7tw98.js} +5 -5
- package/dist/cdn/chunks/{preRenderCustomBlocks-BcXIz7oJ.js.map → preRenderCustomBlocks-C8k7tw98.js.map} +1 -1
- package/dist/{pt-BR-dDlTwX18.js → cdn/chunks/pt-BR-CY5Ye7eP.js} +116 -0
- package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +1 -0
- package/dist/cdn/chunks/sanitizeHtml-DYklmvgX.js +61 -0
- package/dist/cdn/chunks/sanitizeHtml-DYklmvgX.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-BAiuHyJs.js +2638 -0
- package/dist/cdn/chunks/socialIcons-BAiuHyJs.js.map +1 -0
- package/dist/cdn/chunks/src-CACM3o--.js +2606 -0
- package/dist/cdn/chunks/src-CACM3o--.js.map +1 -0
- package/dist/cdn/chunks/{src-C7bkofBL.js → src-Ddpm4HsS.js} +222 -256
- package/dist/cdn/chunks/src-Ddpm4HsS.js.map +1 -0
- package/dist/cdn/chunks/{src-DEd87i_U.js → src-DheBmnvF.js} +635 -478
- package/dist/cdn/chunks/src-DheBmnvF.js.map +1 -0
- package/dist/{styleConstants-B8xVRiwX.js → cdn/chunks/styleConstants-CgiNKdnc.js} +7 -5
- package/dist/cdn/chunks/styleConstants-CgiNKdnc.js.map +1 -0
- package/dist/cdn/chunks/templateSettingsFields-cjlP-jdw.js.map +1 -1
- package/dist/cdn/chunks/{tiptap-CbiTlECY.js → tiptap-Dipw_zOQ.js} +40 -40
- package/dist/cdn/chunks/{tiptap-CbiTlECY.js.map → tiptap-Dipw_zOQ.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-DY8_-ETE.js → useCloudI18n-Cc5NZqiI.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-DY8_-ETE.js.map → useCloudI18n-Cc5NZqiI.js.map} +1 -1
- package/dist/cdn/chunks/useEditorRoot-D_LuZ_hE.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-vjZJwKrV.js.map → useEditorRoot-D_LuZ_hE.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-D8pY4LTq.js → useI18n-BnJYydPv.js} +3 -3
- package/dist/cdn/chunks/{useI18n-D8pY4LTq.js.map → useI18n-BnJYydPv.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-yXbRKNrs.js +33 -0
- package/dist/cdn/chunks/useLocalizedDisplay-yXbRKNrs.js.map +1 -0
- package/dist/cdn/chunks/{useLogicTag-DBJDtpKA.js → useLogicTag-B7RpqVFQ.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-DBJDtpKA.js.map → useLogicTag-B7RpqVFQ.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-B-aG--s1.js → useMergeTag-C-32ETjj.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-B-aG--s1.js.map → useMergeTag-C-32ETjj.js.map} +1 -1
- package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js +78 -0
- package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js.map +1 -0
- package/dist/cdn/chunks/{useScrollToBlock-vjQ0fe-L.js → useScrollToBlock-Ct1AwLD-.js} +5 -5
- package/dist/cdn/chunks/useScrollToBlock-Ct1AwLD-.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-hZTvYBHO.js → withCurrentFont-D33ZXoWp.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-hZTvYBHO.js.map → withCurrentFont-D33ZXoWp.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2190 -1496
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BZ8o0eet.js → check-ChQ0l8EQ.js} +1 -1
- package/dist/{chevron-down-DfAAfILv.js → chevron-down-Bh6cp6PI.js} +1 -1
- package/dist/{chevron-right-Bk4mGdr7.js → chevron-right-LUgdqdoW.js} +1 -1
- package/dist/{chevron-up-MhUf_azW.js → chevron-up-XsDeJxQN.js} +1 -1
- package/dist/{circle-alert-CShJwVFv.js → circle-alert-lODfDsrj.js} +1 -1
- package/dist/{clock-CTfD6OCt.js → clock-DrqFEZkT.js} +1 -1
- package/dist/composables-BOP3ERRP.js +4517 -0
- package/dist/{createCloudRuntime-DCgO4A1r.js → createCloudRuntime-DGV5a5Af.js} +54 -52
- package/dist/{createLucideIcon-CvhTA2KG.js → createLucideIcon-Dw5e5gVE.js} +11 -11
- package/dist/{cdn/chunks/de-CeFJ6wbM.js → de-DaOUfYBX.js} +114 -2
- package/dist/{dist-ByCWA2Tv.js → dist-0alKVRc_.js} +101 -101
- package/dist/{dist-Cy8I5scI.js → dist-54VCNoC0.js} +2 -2
- package/dist/dist-6DU0me3E.js +4 -0
- package/dist/{dist-p3wymUDt.js → dist-B8dY8drK.js} +2 -2
- package/dist/{dist-Dd5MU2Ev.js → dist-B9a7iVye.js} +2 -2
- package/dist/{dist-V7W1UhVr.js → dist-BWflWcpW.js} +2 -2
- package/dist/{dist-D6fZec6r.js → dist-C3hu_C3w.js} +2 -2
- package/dist/{dist-CVy-7PHQ.js → dist-CX7skkvG.js} +48 -48
- package/dist/dist-CcOn7WCo.js +4 -0
- package/dist/dist-Cdkm20M6.js +2542 -0
- package/dist/{dist-BS5uKktL.js → dist-ChOb5XHW.js} +2 -2
- package/dist/{dist-BF5zEHop.js → dist-DZ3X-uB8.js} +2 -2
- package/dist/{dist-CWSG7Kj0.js → dist-D_XrUEET.js} +5 -5
- package/dist/{dist-txQLT2sF.js → dist-TAv500j6.js} +2 -2
- package/dist/{dist-D6cMdrfG.js → dist-fqSers8_.js} +55 -55
- package/dist/{editor-modal-zaZHcmlO.js → editor-modal-B_2EAOjN.js} +953 -952
- package/dist/{cdn/chunks/en-D14i5nFh.js → en-C0pHHMiR.js} +114 -2
- package/dist/en-DTtwco2Q.js +1 -0
- package/dist/{cdn/chunks/es-zDacbMhs.js → es-CxyEKr6n.js} +114 -2
- package/dist/{extensions-fo_c-vqf.js → extensions-DOLZkLzV.js} +173 -173
- package/dist/{eye-7W4t5e0Q.js → eye-DChfk0gi.js} +1 -1
- package/dist/{cdn/chunks/fr-CSgYtjOd.js → fr-CYbamiI6.js} +114 -2
- package/dist/{image-BDiRFzSd.js → image--Hj2by1G.js} +1 -1
- package/dist/index.d.ts +182 -14
- package/dist/{info-Cxi3-Kh9.js → info-BbXgy82f.js} +1 -1
- package/dist/{cdn/chunks/ja-B7H3ID8O.js → ja-DfaIAoGI.js} +114 -2
- package/dist/keys-BCqskl51.js +9 -0
- package/dist/languageName-DEEOhDWI.js +10 -0
- package/dist/{link-ju_2Cmir.js → link-C2_8yJno.js} +1 -1
- package/dist/{list-DYZJf0aZ.js → list-DLGs2n0V.js} +1 -1
- package/dist/{loader-circle-BZRD0a4I.js → loader-circle-BbDItE_O.js} +1 -1
- package/dist/{message-circle-DuEw4Zfx.js → message-circle-NAModq0p.js} +1 -1
- package/dist/{cdn/chunks/nl-176ySmc5.js → nl-DkrB-VKZ.js} +114 -2
- package/dist/normalizeMergeTagMarkup-CUCo7B5X.js +288 -0
- package/dist/noticeTones-D7BPu-Le.js +14 -0
- package/dist/{package-CePMr2kK.js → package-BuzsfRyH.js} +1 -1
- package/dist/{pencil-D3aFCL7c.js → pencil-BTUUECH4.js} +1 -1
- package/dist/plural-CyxrJXL1.js +15 -0
- package/dist/plus-Dm7DN65T.js +13 -0
- package/dist/{preRenderCustomBlocks--_xc0XK3.js → preRenderCustomBlocks-Bs3N9no-.js} +4 -4
- package/dist/{cdn/chunks/pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +114 -2
- package/dist/{refresh-cw-xnro7_Sk.js → refresh-cw-xMURqGWi.js} +2 -12
- package/dist/rotate-ccw-DqVcEIn5.js +13 -0
- package/dist/{runtime-dom.esm-bundler-BURR-bj5.js → runtime-dom.esm-bundler-DlHp8xgy.js} +154 -154
- package/dist/sanitizeHtml-mKgNUdME.js +962 -0
- package/dist/{search-CDrstRBv.js → search-Cfr3W44N.js} +1 -1
- package/dist/{send-DROkPOaX.js → send-CH1SrvyB.js} +1 -1
- package/dist/{smartphone-Bx6u_tjn.js → smartphone-pAkvzjdI.js} +1 -1
- package/dist/socialIcons-Dqr4DJOz.js +2705 -0
- package/dist/{sparkles-CdaTtvoz.js → sparkles-CRO0cCnp.js} +1 -1
- package/dist/{square-BbCROH_f.js → square-CaQWMntx.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{cdn/chunks/styleConstants-B8xVRiwX.js → styleConstants-CgiNKdnc.js} +5 -7
- package/dist/templatical-editor.js +2438 -1752
- package/dist/{text-align-start-CGacJ9Vw.js → text-align-start-BQ39AaRK.js} +1 -1
- package/dist/{trash-DxCd7zIy.js → trash-BL5gEFHN.js} +1 -1
- package/dist/{triangle-alert-7_oaitpf.js → triangle-alert-BYbKu7zZ.js} +1 -1
- package/dist/{upload-DuFEOi_0.js → upload-BhmL4Vqx.js} +1 -1
- package/dist/{useCloudI18n-DEMmUKuO.js → useCloudI18n-Dh2iydo1.js} +4 -4
- package/dist/useEditorRoot-DY3mgcHm.js +7 -0
- package/dist/{useI18n-BBrHTdu8.js → useI18n-CgtvtF4C.js} +4 -4
- package/dist/useLocalizedDisplay-DNNwDRxL.js +31 -0
- package/dist/{useLogicTag-ZPC39rfH.js → useLogicTag-BXXXQQmi.js} +4 -4
- package/dist/{useMergeTag-BQ4qqWpQ.js → useMergeTag-C9Okr87y.js} +5 -5
- package/dist/usePopoverPosition-VDQjyX_A.js +76 -0
- package/dist/{useScrollToBlock-BSyAV4pk.js → useScrollToBlock-C0Kapxdh.js} +5 -5
- package/dist/{vue.runtime.esm-bundler-CnEeTfhs.js → vue.runtime.esm-bundler-BJXc_Mri.js} +1373 -1368
- package/dist/withCurrentFont-DJiQqZzL.js +18 -0
- package/dist/{x-BpfG7v9g.js → x-B7NZYzhx.js} +1 -1
- package/package.json +20 -20
- package/dist/AiAltTextPopover-DawbUywc.js +0 -105
- package/dist/AiChatPanel-CupPhmsN.js +0 -548
- package/dist/BlockIssueBadge-BxpDy3u-.js +0 -33
- package/dist/BlockPreviewCanvas-B-4bmJ3t.js +0 -140
- package/dist/CollaborationNotices-CTw4JThq.js +0 -75
- package/dist/CommentsPanel-DwwFuh1h.js +0 -16
- package/dist/CommentsSidebar-9ZfiC2DO.js +0 -500
- package/dist/CountdownToolbar-BqoYzf_6.js +0 -197
- package/dist/IssuesPanel-4ykrf1ax.js +0 -359
- package/dist/MergeTagTextarea-CPFEjJZd.js +0 -69
- package/dist/ParagraphEditor-CWXfurGh.js +0 -796
- package/dist/TemplateSettings-CS0f1Ues.js +0 -236
- package/dist/TestEmailModal-DBD0X5nV.js +0 -209
- package/dist/TitleEditor-DSqtle77.js +0 -198
- package/dist/ToggleSwitch-JykPyD_8.js +0 -36
- package/dist/Toolbar-BZPFfKrf.js +0 -3145
- package/dist/VersionPreviewBanner-DECaBwLq.js +0 -37
- package/dist/WrapperBlock-BsJv_Fiw.js +0 -44
- package/dist/cdn/chunks/AiAltTextPopover-SEEjkd-I.js +0 -106
- package/dist/cdn/chunks/AiAltTextPopover-SEEjkd-I.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-BGLLSKLm.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-DKDAaBNi.js +0 -474
- package/dist/cdn/chunks/AiChatPanel-DKDAaBNi.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-qf-cfEpy.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js +0 -34
- package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-DGBh6mqe.js +0 -142
- package/dist/cdn/chunks/CollaborationNotices-Bsf1rGW9.js +0 -77
- package/dist/cdn/chunks/CollaborationNotices-Bsf1rGW9.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-DoJnKLXI.js +0 -18
- package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js +0 -470
- package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-xobieKoU.js +0 -199
- package/dist/cdn/chunks/CountdownToolbar-xobieKoU.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-C7LfxaAY.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-BIi05UQu.js +0 -1051
- package/dist/cdn/chunks/LogicTagInsertButton-BIi05UQu.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-Cpcod6_U.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-BgKEVUtV.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-tBz8McZf.js +0 -71
- package/dist/cdn/chunks/MergeTagTextarea-tBz8McZf.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js +0 -631
- package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-CKtI-dof.js +0 -208
- package/dist/cdn/chunks/TemplateSettings-CKtI-dof.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-CDQTgESD.js +0 -209
- package/dist/cdn/chunks/TestEmailModal-CDQTgESD.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js +0 -198
- package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-J7Vwhvha.js +0 -38
- package/dist/cdn/chunks/ToggleSwitch-J7Vwhvha.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-CdpsvNOR.js +0 -3061
- package/dist/cdn/chunks/Toolbar-CdpsvNOR.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-Dvg0ZfAW.js +0 -39
- package/dist/cdn/chunks/VersionPreviewBanner-Dvg0ZfAW.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-C7Md56IT.js +0 -46
- package/dist/cdn/chunks/WrapperBlock-C7Md56IT.js.map +0 -1
- package/dist/cdn/chunks/ca-CD-Kt1qz.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-Cth2JCEh.js.map +0 -1
- package/dist/cdn/chunks/de-CeFJ6wbM.js.map +0 -1
- package/dist/cdn/chunks/draggable-Du8AUMFT.js.map +0 -1
- package/dist/cdn/chunks/en-D14i5nFh.js.map +0 -1
- package/dist/cdn/chunks/en-TIqv4ag3.js +0 -1
- package/dist/cdn/chunks/es-zDacbMhs.js.map +0 -1
- package/dist/cdn/chunks/fr-CSgYtjOd.js.map +0 -1
- package/dist/cdn/chunks/icons-okSPsLOa.js.map +0 -1
- package/dist/cdn/chunks/ja-B7H3ID8O.js.map +0 -1
- package/dist/cdn/chunks/keys-CUj6UA38.js +0 -11
- package/dist/cdn/chunks/keys-CUj6UA38.js.map +0 -1
- package/dist/cdn/chunks/nl-176ySmc5.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-C_KlfSW4.js +0 -198
- package/dist/cdn/chunks/normalizeMergeTagMarkup-C_KlfSW4.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-dDlTwX18.js.map +0 -1
- package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js +0 -72
- package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-jsTDmkbb.js +0 -2008
- package/dist/cdn/chunks/socialIcons-jsTDmkbb.js.map +0 -1
- package/dist/cdn/chunks/src-C7bkofBL.js.map +0 -1
- package/dist/cdn/chunks/src-DEd87i_U.js.map +0 -1
- package/dist/cdn/chunks/src-DwWrYnUj.js +0 -1404
- package/dist/cdn/chunks/src-DwWrYnUj.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-B8xVRiwX.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-BrY66C2y.js +0 -2582
- package/dist/cdn/chunks/useEditorCore-BrY66C2y.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-vjZJwKrV.js +0 -9
- package/dist/cdn/chunks/usePopoverPosition-DSMtmu2W.js +0 -70
- package/dist/cdn/chunks/usePopoverPosition-DSMtmu2W.js.map +0 -1
- package/dist/cdn/chunks/useScrollToBlock-vjQ0fe-L.js.map +0 -1
- package/dist/dist-CKi_npZM.js +0 -1344
- package/dist/dist-DyFArF_G.js +0 -4
- package/dist/dist-pA3ooG6N.js +0 -4
- package/dist/en-Db76vJbY.js +0 -1
- package/dist/keys-BgRERHzu.js +0 -9
- package/dist/normalizeMergeTagMarkup-CELnOlgK.js +0 -196
- package/dist/sanitizeHtml-BzfzpYJY.js +0 -942
- package/dist/socialIcons-D7MGsg0d.js +0 -2075
- package/dist/useEditorCore-BSo2sSID.js +0 -4059
- package/dist/useEditorRoot-BMcoCLBx.js +0 -7
- package/dist/usePopoverPosition-DV1PxL66.js +0 -68
- package/dist/withCurrentFont-B22FXAF5.js +0 -18
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import {
|
|
18
|
-
|
|
1
|
+
import { B as e, Ft as t, I as n, M as r, Mt as i, N as a, P as o, Pt as s, U as c, W as l, Y as u, Z as d, _ as f, a as p, c as m, ct as h, d as g, et as _, f as v, g as y, it as b, k as x, l as S, ot as C, r as w, u as T, v as E, w as D, y as O } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
|
|
2
|
+
import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-DlHp8xgy.js";
|
|
3
|
+
import { t as N } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
4
|
+
import { t as P } from "./createLucideIcon-Dw5e5gVE.js";
|
|
5
|
+
import { t as F } from "./check-ChQ0l8EQ.js";
|
|
6
|
+
import { t as I } from "./chevron-right-LUgdqdoW.js";
|
|
7
|
+
import { n as ee, t as L } from "./upload-BhmL4Vqx.js";
|
|
8
|
+
import { t as te } from "./link-C2_8yJno.js";
|
|
9
|
+
import { t as ne } from "./list-DLGs2n0V.js";
|
|
10
|
+
import { t as R } from "./loader-circle-BbDItE_O.js";
|
|
11
|
+
import { t as z } from "./pencil-BTUUECH4.js";
|
|
12
|
+
import { t as B } from "./plus-Dm7DN65T.js";
|
|
13
|
+
import { t as V } from "./refresh-cw-xMURqGWi.js";
|
|
14
|
+
import { t as re } from "./search-Cfr3W44N.js";
|
|
15
|
+
import { t as H } from "./trash-BL5gEFHN.js";
|
|
16
|
+
import { t as U } from "./x-B7NZYzhx.js";
|
|
17
|
+
import { h as ie } from "./dist-CX7skkvG.js";
|
|
18
|
+
import { a as W, n as ae, o as oe, r as se, s as ce, t as le } from "./dist-0alKVRc_.js";
|
|
19
|
+
var G = P({
|
|
19
20
|
name: "file",
|
|
20
21
|
size: 24,
|
|
21
22
|
node: [["path", {
|
|
@@ -25,14 +26,14 @@ var q = B({
|
|
|
25
26
|
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
26
27
|
key: "wfsgrz"
|
|
27
28
|
}]]
|
|
28
|
-
}),
|
|
29
|
+
}), K = P({
|
|
29
30
|
name: "folder",
|
|
30
31
|
size: 24,
|
|
31
32
|
node: [["path", {
|
|
32
33
|
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
|
|
33
34
|
key: "1kt360"
|
|
34
35
|
}]]
|
|
35
|
-
}),
|
|
36
|
+
}), ue = P({
|
|
36
37
|
name: "grid-2x2",
|
|
37
38
|
size: 24,
|
|
38
39
|
node: [
|
|
@@ -54,7 +55,7 @@ var q = B({
|
|
|
54
55
|
}]
|
|
55
56
|
],
|
|
56
57
|
aliases: ["grid-2-x-2"]
|
|
57
|
-
}),
|
|
58
|
+
}), q = P({
|
|
58
59
|
name: "panel-left",
|
|
59
60
|
size: 24,
|
|
60
61
|
node: [["rect", {
|
|
@@ -69,14 +70,14 @@ var q = B({
|
|
|
69
70
|
key: "fh3hqa"
|
|
70
71
|
}]],
|
|
71
72
|
aliases: ["sidebar"]
|
|
72
|
-
}),
|
|
73
|
+
}), de = P({
|
|
73
74
|
name: "star",
|
|
74
75
|
size: 24,
|
|
75
76
|
node: [["path", {
|
|
76
77
|
d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
|
|
77
78
|
key: "r04s7s"
|
|
78
79
|
}]]
|
|
79
|
-
}),
|
|
80
|
+
}), fe = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTarget"), pe = Symbol("templaticalMediaTranslations"), Y = Symbol("templaticalMediaUiTheme"), X = Symbol("templaticalMediaUiLocale"), me = { mediaLibrary: {
|
|
80
81
|
title: "Media Library",
|
|
81
82
|
searchPlaceholder: "Search files...",
|
|
82
83
|
allFiles: "All Files",
|
|
@@ -170,101 +171,101 @@ var q = B({
|
|
|
170
171
|
storageTooltip: "{used} of {total} used ({remaining} remaining)"
|
|
171
172
|
} };
|
|
172
173
|
// ../media-library/src/composables/useI18n.ts
|
|
173
|
-
function
|
|
174
|
-
let
|
|
175
|
-
function
|
|
174
|
+
function Z(e) {
|
|
175
|
+
let t = e ?? D(pe, null), n = (u(t) ? t.value : t) ?? me;
|
|
176
|
+
function r(e, t) {
|
|
176
177
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
177
178
|
}
|
|
178
179
|
return {
|
|
179
|
-
t:
|
|
180
|
-
format:
|
|
180
|
+
t: n,
|
|
181
|
+
format: r
|
|
181
182
|
};
|
|
182
183
|
}
|
|
183
184
|
// ../media-library/src/composables/useMediaCategories.ts
|
|
184
|
-
var
|
|
185
|
+
var he = [
|
|
185
186
|
"images",
|
|
186
187
|
"documents",
|
|
187
188
|
"videos",
|
|
188
189
|
"audio"
|
|
189
190
|
];
|
|
190
|
-
function
|
|
191
|
-
let
|
|
192
|
-
if (!
|
|
193
|
-
let
|
|
194
|
-
let e =
|
|
191
|
+
function Q(e) {
|
|
192
|
+
let t = e ?? D(fe, null);
|
|
193
|
+
if (!t) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
|
|
194
|
+
let n = t, r = m(() => !0), i = m(() => n.maxFileSize ?? Infinity), a = m(() => {
|
|
195
|
+
let e = n.accept;
|
|
195
196
|
if (e && e.length > 0) return e;
|
|
196
|
-
let t =
|
|
197
|
-
return t ? Object.keys(t) :
|
|
198
|
-
}),
|
|
199
|
-
let e =
|
|
200
|
-
return e ?
|
|
201
|
-
}),
|
|
202
|
-
function
|
|
203
|
-
let
|
|
204
|
-
return !
|
|
197
|
+
let t = n.mimeTypes;
|
|
198
|
+
return t ? Object.keys(t) : he;
|
|
199
|
+
}), o = m(() => {
|
|
200
|
+
let e = n.mimeTypes;
|
|
201
|
+
return e ? a.value.flatMap((t) => e[t] ?? []) : [];
|
|
202
|
+
}), s = m(() => o.value.join(",")), c = m(() => n.mimeTypes !== void 0);
|
|
203
|
+
function l(e, t) {
|
|
204
|
+
let r = n.mimeTypes;
|
|
205
|
+
return !r || (t && t.length > 0 ? t : Object.keys(r)).some((t) => r[t]?.includes(e) ?? !1);
|
|
206
|
+
}
|
|
207
|
+
function u(e) {
|
|
208
|
+
return l(e.type) && e.size <= i.value;
|
|
205
209
|
}
|
|
206
210
|
function d(e) {
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
function f(e) {
|
|
210
|
-
let t = r.mimeTypes;
|
|
211
|
+
let t = n.mimeTypes;
|
|
211
212
|
return t ? t.images?.includes(e) ?? !1 : e.startsWith("image/");
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
-
let t =
|
|
214
|
+
function f(e) {
|
|
215
|
+
let t = n.mimeTypes;
|
|
215
216
|
if (!t) return null;
|
|
216
217
|
for (let [n, r] of Object.entries(t)) if (r?.includes(e)) return n;
|
|
217
218
|
return null;
|
|
218
219
|
}
|
|
219
220
|
return {
|
|
220
|
-
isMediaLibraryEnabled:
|
|
221
|
-
allAcceptedMimeTypes:
|
|
222
|
-
allAcceptedInputString:
|
|
223
|
-
restrictsMimeTypes:
|
|
224
|
-
maxFileSize:
|
|
225
|
-
availableCategories:
|
|
226
|
-
isAcceptedMimeType:
|
|
227
|
-
isAcceptedFile:
|
|
228
|
-
isImageMimeType:
|
|
229
|
-
getCategoryForMimeType:
|
|
221
|
+
isMediaLibraryEnabled: r,
|
|
222
|
+
allAcceptedMimeTypes: o,
|
|
223
|
+
allAcceptedInputString: s,
|
|
224
|
+
restrictsMimeTypes: c,
|
|
225
|
+
maxFileSize: i,
|
|
226
|
+
availableCategories: a,
|
|
227
|
+
isAcceptedMimeType: l,
|
|
228
|
+
isAcceptedFile: u,
|
|
229
|
+
isImageMimeType: d,
|
|
230
|
+
getCategoryForMimeType: f
|
|
230
231
|
};
|
|
231
232
|
}
|
|
232
233
|
// ../media-library/src/composables/useFocusTrap.ts
|
|
233
234
|
var ge = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
234
|
-
function _e(
|
|
235
|
-
let
|
|
236
|
-
function
|
|
235
|
+
function _e(t, n) {
|
|
236
|
+
let r = null, i = null, a = null;
|
|
237
|
+
function o(e) {
|
|
237
238
|
if (!e) return document;
|
|
238
239
|
let t = e.getRootNode();
|
|
239
240
|
return t && "activeElement" in t ? t : document;
|
|
240
241
|
}
|
|
241
|
-
function
|
|
242
|
-
return
|
|
242
|
+
function s() {
|
|
243
|
+
return t.value ? Array.from(t.value.querySelectorAll(ge)).filter((e) => e.offsetParent !== null) : [];
|
|
243
244
|
}
|
|
244
|
-
function
|
|
245
|
-
if (
|
|
246
|
-
let n =
|
|
245
|
+
function c(e) {
|
|
246
|
+
if (e.key !== "Tab") return;
|
|
247
|
+
let n = s();
|
|
247
248
|
if (n.length === 0) return;
|
|
248
|
-
let r = n[0], i = n[n.length - 1],
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
function
|
|
252
|
-
let
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
let
|
|
256
|
-
|
|
257
|
-
}),
|
|
258
|
-
}
|
|
259
|
-
function
|
|
249
|
+
let r = n[0], i = n[n.length - 1], a = o(t.value).activeElement;
|
|
250
|
+
e.shiftKey ? a === r && (e.preventDefault(), i.focus()) : a === i && (e.preventDefault(), r.focus());
|
|
251
|
+
}
|
|
252
|
+
function l() {
|
|
253
|
+
let e = i !== null || a !== null;
|
|
254
|
+
e && u({ restoreFocus: !1 }), e || (r = o(t.value).activeElement), a = requestAnimationFrame(() => {
|
|
255
|
+
a = null;
|
|
256
|
+
let e = s();
|
|
257
|
+
e.length > 0 && (t.value?.querySelector("[autofocus], input:not([disabled])") ?? e[0]).focus();
|
|
258
|
+
}), i = W(t, "keydown", c);
|
|
259
|
+
}
|
|
260
|
+
function u(e = {}) {
|
|
260
261
|
let t = e.restoreFocus !== !1;
|
|
261
|
-
|
|
262
|
+
a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
|
|
262
263
|
}
|
|
263
|
-
let
|
|
264
|
-
e && t ?
|
|
264
|
+
let f = e([n, t], ([e, t]) => {
|
|
265
|
+
e && t ? l() : u();
|
|
265
266
|
}, { flush: "post" });
|
|
266
267
|
d(() => {
|
|
267
|
-
|
|
268
|
+
f(), u();
|
|
268
269
|
});
|
|
269
270
|
}
|
|
270
271
|
// ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -275,39 +276,39 @@ var ve = {
|
|
|
275
276
|
}, ye = ["onClick"], be = {
|
|
276
277
|
key: 1,
|
|
277
278
|
style: { color: "var(--tpl-text)" }
|
|
278
|
-
}, xe = /* @__PURE__ */
|
|
279
|
+
}, xe = /* @__PURE__ */ O({
|
|
279
280
|
__name: "MediaBreadcrumb",
|
|
280
281
|
props: {
|
|
281
282
|
folders: {},
|
|
282
283
|
currentFolderId: {}
|
|
283
284
|
},
|
|
284
285
|
emits: ["navigate"],
|
|
285
|
-
setup(e, { emit:
|
|
286
|
-
let
|
|
287
|
-
if (!
|
|
286
|
+
setup(e, { emit: n }) {
|
|
287
|
+
let i = e, a = n, { t: s } = Z(), c = m(() => {
|
|
288
|
+
if (!i.currentFolderId) return [];
|
|
288
289
|
let e = [];
|
|
289
|
-
return
|
|
290
|
+
return l(i.folders, i.currentFolderId, e), e;
|
|
290
291
|
});
|
|
291
|
-
function
|
|
292
|
+
function l(e, t, n) {
|
|
292
293
|
for (let r of e) {
|
|
293
294
|
if (r.id === t) return n.push(r), !0;
|
|
294
|
-
if (
|
|
295
|
+
if (l(r.children, t, n)) return n.unshift(r), !0;
|
|
295
296
|
}
|
|
296
297
|
return !1;
|
|
297
298
|
}
|
|
298
|
-
return (e,
|
|
299
|
+
return (e, n) => c.value.length > 0 ? (r(), v("div", ve, [S("button", {
|
|
299
300
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
300
301
|
style: { color: "var(--tpl-primary)" },
|
|
301
|
-
onClick:
|
|
302
|
-
},
|
|
302
|
+
onClick: n[0] ||= (e) => a("navigate", null)
|
|
303
|
+
}, t(h(s).mediaLibrary.allFiles), 1), (r(!0), v(w, null, o(c.value, (e, n) => (r(), v(w, { key: e.id }, [f(h(I), {
|
|
303
304
|
size: 12,
|
|
304
305
|
"stroke-width": 2
|
|
305
|
-
}),
|
|
306
|
+
}), n < c.value.length - 1 ? (r(), v("button", {
|
|
306
307
|
key: 0,
|
|
307
308
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
308
309
|
style: { color: "var(--tpl-primary)" },
|
|
309
|
-
onClick: (t) =>
|
|
310
|
-
},
|
|
310
|
+
onClick: (t) => a("navigate", e.id)
|
|
311
|
+
}, t(e.name), 9, ye)) : (r(), v("span", be, t(e.name), 1))], 64))), 128))])) : g("", !0);
|
|
311
312
|
}
|
|
312
313
|
}), Se = ["aria-expanded", "aria-label"], Ce = {
|
|
313
314
|
key: 1,
|
|
@@ -315,7 +316,7 @@ var ve = {
|
|
|
315
316
|
}, we = {
|
|
316
317
|
key: 0,
|
|
317
318
|
class: "tpl:truncate"
|
|
318
|
-
}, Te = ["onKeydown"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = ["title", "aria-label"], ke = { key: 0 }, Ae = ["placeholder", "onKeydown"], je = /* @__PURE__ */
|
|
319
|
+
}, Te = ["onKeydown"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = ["title", "aria-label"], ke = { key: 0 }, Ae = ["placeholder", "onKeydown"], je = /* @__PURE__ */ O({
|
|
319
320
|
__name: "MediaFolderTreeNode",
|
|
320
321
|
props: {
|
|
321
322
|
folder: {},
|
|
@@ -331,76 +332,76 @@ var ve = {
|
|
|
331
332
|
"renameFolder",
|
|
332
333
|
"deleteFolder"
|
|
333
334
|
],
|
|
334
|
-
setup(
|
|
335
|
-
let
|
|
335
|
+
setup(e, { emit: a }) {
|
|
336
|
+
let c = e, u = a, { t: d } = Z(), p = _(!1), y = _(!1), b = _(""), x = _(!1), C = _(""), E = _(!1), D = m(() => c.folder.children.length > 0), O = m(() => c.depth < 4), M = m(() => c.currentFolderId === c.folder.id), N = m(() => c.currentFolderId ? F(c.folder.children, c.currentFolderId) : !1), P = m(() => p.value || N.value);
|
|
336
337
|
function F(e, t) {
|
|
337
338
|
for (let n of e) if (n.id === t || F(n.children, t)) return !0;
|
|
338
339
|
return !1;
|
|
339
340
|
}
|
|
340
|
-
function
|
|
341
|
-
|
|
341
|
+
function ee() {
|
|
342
|
+
p.value = !p.value;
|
|
342
343
|
}
|
|
343
344
|
function L() {
|
|
344
|
-
|
|
345
|
+
y.value = !0, b.value = c.folder.name;
|
|
345
346
|
}
|
|
346
|
-
function
|
|
347
|
-
let e =
|
|
348
|
-
e && e !==
|
|
347
|
+
function te() {
|
|
348
|
+
let e = b.value.trim();
|
|
349
|
+
e && e !== c.folder.name && u("renameFolder", c.folder.id, e), y.value = !1, b.value = "";
|
|
349
350
|
}
|
|
350
|
-
function
|
|
351
|
-
|
|
351
|
+
function ne() {
|
|
352
|
+
y.value = !1, b.value = "";
|
|
352
353
|
}
|
|
353
|
-
function
|
|
354
|
-
|
|
354
|
+
function R() {
|
|
355
|
+
x.value = !0, C.value = "", p.value = !0;
|
|
355
356
|
}
|
|
356
357
|
function V() {
|
|
357
|
-
C.value.trim() &&
|
|
358
|
+
C.value.trim() && u("createFolder", C.value.trim(), c.folder.id), x.value = !1, C.value = "";
|
|
358
359
|
}
|
|
359
|
-
function
|
|
360
|
-
|
|
360
|
+
function re() {
|
|
361
|
+
x.value = !1, C.value = "";
|
|
361
362
|
}
|
|
362
|
-
function
|
|
363
|
-
E.value ? (
|
|
363
|
+
function U() {
|
|
364
|
+
E.value ? (u("deleteFolder", c.folder.id), E.value = !1) : E.value = !0;
|
|
364
365
|
}
|
|
365
|
-
function
|
|
366
|
+
function ie(e) {
|
|
366
367
|
let t = e.relatedTarget;
|
|
367
368
|
t && e.currentTarget.contains(t) || (E.value = !1);
|
|
368
369
|
}
|
|
369
|
-
return (
|
|
370
|
-
let
|
|
371
|
-
return
|
|
370
|
+
return (a, c) => {
|
|
371
|
+
let p = n("MediaFolderTreeNode", !0);
|
|
372
|
+
return r(), v("div", null, [S("div", {
|
|
372
373
|
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:
|
|
374
|
-
paddingLeft: `${
|
|
374
|
+
style: s({
|
|
375
|
+
paddingLeft: `${e.depth * 16 + 8}px`,
|
|
375
376
|
backgroundColor: M.value ? "var(--tpl-bg-active)" : "transparent",
|
|
376
377
|
color: M.value ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
377
378
|
}),
|
|
378
|
-
onFocusout:
|
|
379
|
+
onFocusout: ie
|
|
379
380
|
}, [
|
|
380
|
-
D.value ||
|
|
381
|
+
D.value || x.value ? (r(), v("button", {
|
|
381
382
|
key: 0,
|
|
382
383
|
type: "button",
|
|
383
384
|
class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
384
385
|
"aria-expanded": P.value,
|
|
385
|
-
"aria-label": P.value ?
|
|
386
|
-
onClick: A(
|
|
387
|
-
}, [f(
|
|
388
|
-
class:
|
|
386
|
+
"aria-label": P.value ? h(d).mediaLibrary.collapseFolder : h(d).mediaLibrary.expandFolder,
|
|
387
|
+
onClick: A(ee, ["stop"])
|
|
388
|
+
}, [f(h(I), {
|
|
389
|
+
class: i(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
|
|
389
390
|
size: 10,
|
|
390
391
|
"stroke-width": 2
|
|
391
|
-
}, null, 8, ["class"])], 8, Se)) : (
|
|
392
|
-
|
|
392
|
+
}, null, 8, ["class"])], 8, Se)) : (r(), v("span", Ce)),
|
|
393
|
+
S("button", {
|
|
393
394
|
type: "button",
|
|
394
395
|
class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
|
|
395
|
-
onClick:
|
|
396
|
-
}, [f(
|
|
396
|
+
onClick: c[0] ||= (t) => u("navigate", e.folder.id)
|
|
397
|
+
}, [f(h(K), {
|
|
397
398
|
class: "tpl:shrink-0",
|
|
398
399
|
size: 14,
|
|
399
400
|
"stroke-width": 1.5
|
|
400
|
-
}),
|
|
401
|
-
|
|
401
|
+
}), y.value ? g("", !0) : (r(), v("span", we, t(e.folder.name), 1))]),
|
|
402
|
+
y.value ? l((r(), v("input", {
|
|
402
403
|
key: 2,
|
|
403
|
-
"onUpdate:modelValue":
|
|
404
|
+
"onUpdate:modelValue": c[1] ||= (e) => b.value = e,
|
|
404
405
|
type: "text",
|
|
405
406
|
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
407
|
style: {
|
|
@@ -409,62 +410,62 @@ var ve = {
|
|
|
409
410
|
color: "var(--tpl-text)"
|
|
410
411
|
},
|
|
411
412
|
autofocus: "",
|
|
412
|
-
onKeydown: [j(
|
|
413
|
-
onBlur:
|
|
414
|
-
onClick:
|
|
415
|
-
}, null, 40, Te)), [[k,
|
|
416
|
-
|
|
413
|
+
onKeydown: [j(te, ["enter"]), j(A(ne, ["stop"]), ["escape"])],
|
|
414
|
+
onBlur: te,
|
|
415
|
+
onClick: c[2] ||= A(() => {}, ["stop"])
|
|
416
|
+
}, null, 40, Te)), [[k, b.value]]) : g("", !0),
|
|
417
|
+
y.value ? g("", !0) : (r(), v("span", {
|
|
417
418
|
key: 3,
|
|
418
|
-
class:
|
|
419
|
+
class: i(["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
420
|
}, [
|
|
420
|
-
O.value &&
|
|
421
|
+
O.value && e.canCreateFolder ? (r(), v("button", {
|
|
421
422
|
key: 0,
|
|
422
423
|
type: "button",
|
|
423
424
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
424
|
-
title:
|
|
425
|
-
"aria-label":
|
|
426
|
-
onClick: A(
|
|
427
|
-
}, [f(
|
|
425
|
+
title: h(d).mediaLibrary.addSubfolder,
|
|
426
|
+
"aria-label": h(d).mediaLibrary.addSubfolder,
|
|
427
|
+
onClick: A(R, ["stop"])
|
|
428
|
+
}, [f(h(B), {
|
|
428
429
|
size: 12,
|
|
429
430
|
"stroke-width": 2
|
|
430
431
|
})], 8, Ee)) : g("", !0),
|
|
431
|
-
|
|
432
|
+
e.canRenameFolder ? (r(), v("button", {
|
|
432
433
|
key: 1,
|
|
433
434
|
type: "button",
|
|
434
435
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
435
|
-
title:
|
|
436
|
-
"aria-label":
|
|
436
|
+
title: h(d).mediaLibrary.renameFolder,
|
|
437
|
+
"aria-label": h(d).mediaLibrary.renameFolder,
|
|
437
438
|
onClick: A(L, ["stop"])
|
|
438
|
-
}, [f(
|
|
439
|
+
}, [f(h(z), {
|
|
439
440
|
size: 12,
|
|
440
441
|
"stroke-width": 2
|
|
441
442
|
})], 8, De)) : g("", !0),
|
|
442
|
-
|
|
443
|
+
e.canDeleteFolder ? (r(), v("button", {
|
|
443
444
|
key: 2,
|
|
444
445
|
type: "button",
|
|
445
446
|
"data-testid": "media-folder-delete",
|
|
446
447
|
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 ?
|
|
449
|
-
onClick: A(
|
|
450
|
-
}, [f(
|
|
448
|
+
title: E.value ? h(d).mediaLibrary.deleteFolderConfirm : h(d).mediaLibrary.deleteFolder,
|
|
449
|
+
"aria-label": E.value ? h(d).mediaLibrary.deleteFolderConfirm : h(d).mediaLibrary.deleteFolder,
|
|
450
|
+
onClick: A(U, ["stop"])
|
|
451
|
+
}, [f(h(H), {
|
|
451
452
|
size: 12,
|
|
452
453
|
"stroke-width": 2,
|
|
453
454
|
style: { color: "var(--tpl-danger)" }
|
|
454
455
|
})], 8, Oe)) : g("", !0)
|
|
455
456
|
], 2))
|
|
456
|
-
], 36), P.value ? (
|
|
457
|
-
key:
|
|
458
|
-
folder:
|
|
459
|
-
"current-folder-id":
|
|
460
|
-
depth:
|
|
461
|
-
"can-create-folder":
|
|
462
|
-
"can-rename-folder":
|
|
463
|
-
"can-delete-folder":
|
|
464
|
-
onNavigate:
|
|
465
|
-
onCreateFolder:
|
|
466
|
-
onRenameFolder:
|
|
467
|
-
onDeleteFolder:
|
|
457
|
+
], 36), P.value ? (r(), v("div", ke, [(r(!0), v(w, null, o(e.folder.children, (t) => (r(), T(p, {
|
|
458
|
+
key: t.id,
|
|
459
|
+
folder: t,
|
|
460
|
+
"current-folder-id": e.currentFolderId,
|
|
461
|
+
depth: e.depth + 1,
|
|
462
|
+
"can-create-folder": e.canCreateFolder,
|
|
463
|
+
"can-rename-folder": e.canRenameFolder,
|
|
464
|
+
"can-delete-folder": e.canDeleteFolder,
|
|
465
|
+
onNavigate: c[3] ||= (e) => u("navigate", e),
|
|
466
|
+
onCreateFolder: c[4] ||= (e, t) => u("createFolder", e, t),
|
|
467
|
+
onRenameFolder: c[5] ||= (e, t) => u("renameFolder", e, t),
|
|
468
|
+
onDeleteFolder: c[6] ||= (e) => u("deleteFolder", e)
|
|
468
469
|
}, null, 8, [
|
|
469
470
|
"folder",
|
|
470
471
|
"current-folder-id",
|
|
@@ -472,12 +473,12 @@ var ve = {
|
|
|
472
473
|
"can-create-folder",
|
|
473
474
|
"can-rename-folder",
|
|
474
475
|
"can-delete-folder"
|
|
475
|
-
]))), 128)),
|
|
476
|
+
]))), 128)), x.value ? (r(), v("div", {
|
|
476
477
|
key: 0,
|
|
477
|
-
style:
|
|
478
|
+
style: s({ paddingLeft: `${(e.depth + 1) * 16 + 8}px` }),
|
|
478
479
|
class: "tpl:py-1.5 tpl:pr-2"
|
|
479
|
-
}, [
|
|
480
|
-
"onUpdate:modelValue":
|
|
480
|
+
}, [l(S("input", {
|
|
481
|
+
"onUpdate:modelValue": c[7] ||= (e) => C.value = e,
|
|
481
482
|
type: "text",
|
|
482
483
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
483
484
|
style: {
|
|
@@ -485,9 +486,9 @@ var ve = {
|
|
|
485
486
|
"background-color": "var(--tpl-bg)",
|
|
486
487
|
color: "var(--tpl-text)"
|
|
487
488
|
},
|
|
488
|
-
placeholder:
|
|
489
|
+
placeholder: h(d).mediaLibrary.subfolderName,
|
|
489
490
|
autofocus: "",
|
|
490
|
-
onKeydown: [j(V, ["enter"]), j(A(
|
|
491
|
+
onKeydown: [j(V, ["enter"]), j(A(re, ["stop"]), ["escape"])],
|
|
491
492
|
onBlur: V
|
|
492
493
|
}, null, 40, Ae), [[k, C.value]])], 4)) : g("", !0)])) : g("", !0)]);
|
|
493
494
|
};
|
|
@@ -498,7 +499,7 @@ var ve = {
|
|
|
498
499
|
}, Ne = {
|
|
499
500
|
key: 0,
|
|
500
501
|
class: "tpl:px-3 tpl:py-2"
|
|
501
|
-
}, Pe = ["placeholder", "onKeydown"], Fe = /* @__PURE__ */
|
|
502
|
+
}, Pe = ["placeholder", "onKeydown"], Fe = /* @__PURE__ */ O({
|
|
502
503
|
__name: "MediaFolderTree",
|
|
503
504
|
props: {
|
|
504
505
|
folders: {},
|
|
@@ -516,41 +517,41 @@ var ve = {
|
|
|
516
517
|
"deleteFolder",
|
|
517
518
|
"showFrequentlyUsed"
|
|
518
519
|
],
|
|
519
|
-
setup(
|
|
520
|
-
let
|
|
520
|
+
setup(e, { emit: n }) {
|
|
521
|
+
let i = n, { t: a } = Z(), c = _(!1), u = _("");
|
|
521
522
|
function d() {
|
|
522
|
-
|
|
523
|
+
c.value = !0, u.value = "";
|
|
523
524
|
}
|
|
524
525
|
function p() {
|
|
525
|
-
|
|
526
|
+
u.value.trim() && i("createFolder", u.value.trim()), c.value = !1, u.value = "";
|
|
526
527
|
}
|
|
527
528
|
function m() {
|
|
528
|
-
|
|
529
|
+
c.value = !1, u.value = "";
|
|
529
530
|
}
|
|
530
|
-
return (
|
|
531
|
-
|
|
531
|
+
return (n, _) => (r(), v("div", Me, [
|
|
532
|
+
S("button", {
|
|
532
533
|
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:
|
|
534
|
+
style: s({
|
|
535
|
+
backgroundColor: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
|
|
536
|
+
color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
536
537
|
}),
|
|
537
|
-
onClick:
|
|
538
|
-
}, [f(
|
|
538
|
+
onClick: _[0] ||= (e) => i("navigate", null)
|
|
539
|
+
}, [f(h(G), {
|
|
539
540
|
size: 14,
|
|
540
541
|
"stroke-width": 1.5
|
|
541
|
-
}),
|
|
542
|
-
(
|
|
543
|
-
key:
|
|
544
|
-
folder:
|
|
545
|
-
"current-folder-id":
|
|
542
|
+
}), y(" " + t(h(a).mediaLibrary.allFiles), 1)], 4),
|
|
543
|
+
(r(!0), v(w, null, o(e.folders, (t) => (r(), T(je, {
|
|
544
|
+
key: t.id,
|
|
545
|
+
folder: t,
|
|
546
|
+
"current-folder-id": e.currentFolderId,
|
|
546
547
|
depth: 0,
|
|
547
|
-
"can-create-folder":
|
|
548
|
-
"can-rename-folder":
|
|
549
|
-
"can-delete-folder":
|
|
550
|
-
onNavigate:
|
|
551
|
-
onCreateFolder:
|
|
552
|
-
onRenameFolder:
|
|
553
|
-
onDeleteFolder:
|
|
548
|
+
"can-create-folder": e.canCreateFolder,
|
|
549
|
+
"can-rename-folder": e.canRenameFolder,
|
|
550
|
+
"can-delete-folder": e.canDeleteFolder,
|
|
551
|
+
onNavigate: _[1] ||= (e) => i("navigate", e),
|
|
552
|
+
onCreateFolder: _[2] ||= (e, t) => i("createFolder", e, t),
|
|
553
|
+
onRenameFolder: _[3] ||= (e, t) => i("renameFolder", e, t),
|
|
554
|
+
onDeleteFolder: _[4] ||= (e) => i("deleteFolder", e)
|
|
554
555
|
}, null, 8, [
|
|
555
556
|
"folder",
|
|
556
557
|
"current-folder-id",
|
|
@@ -558,8 +559,8 @@ var ve = {
|
|
|
558
559
|
"can-rename-folder",
|
|
559
560
|
"can-delete-folder"
|
|
560
561
|
]))), 128)),
|
|
561
|
-
|
|
562
|
-
"onUpdate:modelValue":
|
|
562
|
+
c.value ? (r(), v("div", Ne, [l(S("input", {
|
|
563
|
+
"onUpdate:modelValue": _[5] ||= (e) => u.value = e,
|
|
563
564
|
type: "text",
|
|
564
565
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
565
566
|
style: {
|
|
@@ -567,42 +568,42 @@ var ve = {
|
|
|
567
568
|
"background-color": "var(--tpl-bg)",
|
|
568
569
|
color: "var(--tpl-text)"
|
|
569
570
|
},
|
|
570
|
-
placeholder:
|
|
571
|
+
placeholder: h(a).mediaLibrary.folderName,
|
|
571
572
|
autofocus: "",
|
|
572
573
|
onKeydown: [j(p, ["enter"]), j(A(m, ["stop"]), ["escape"])],
|
|
573
574
|
onBlur: p
|
|
574
|
-
}, null, 40, Pe), [[k,
|
|
575
|
-
!
|
|
575
|
+
}, null, 40, Pe), [[k, u.value]])])) : g("", !0),
|
|
576
|
+
!c.value && e.canCreateFolder ? (r(), v("button", {
|
|
576
577
|
key: 1,
|
|
577
578
|
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
579
|
style: { color: "var(--tpl-text-muted)" },
|
|
579
580
|
onClick: d
|
|
580
|
-
}, [f(
|
|
581
|
+
}, [f(h(B), {
|
|
581
582
|
size: 14,
|
|
582
583
|
"stroke-width": 1.5
|
|
583
|
-
}),
|
|
584
|
-
|
|
585
|
-
|
|
584
|
+
}), y(" " + t(h(a).mediaLibrary.newFolder), 1)])) : g("", !0),
|
|
585
|
+
_[7] ||= S("div", { class: "tpl:flex-1" }, null, -1),
|
|
586
|
+
e.hasFrequentlyUsed ? (r(), v("button", {
|
|
586
587
|
key: 2,
|
|
587
588
|
"data-testid": "media-frequently-used",
|
|
588
589
|
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:
|
|
590
|
+
style: s({
|
|
590
591
|
borderColor: "var(--tpl-border)",
|
|
591
|
-
backgroundColor:
|
|
592
|
-
color:
|
|
592
|
+
backgroundColor: e.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
|
|
593
|
+
color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
593
594
|
}),
|
|
594
|
-
onClick:
|
|
595
|
-
}, [f(
|
|
595
|
+
onClick: _[6] ||= (e) => i("showFrequentlyUsed")
|
|
596
|
+
}, [f(h(de), {
|
|
596
597
|
size: 14,
|
|
597
598
|
"stroke-width": 1.5
|
|
598
|
-
}),
|
|
599
|
+
}), y(" " + t(h(a).mediaLibrary.frequentlyUsed), 1)], 4)) : g("", !0)
|
|
599
600
|
]));
|
|
600
601
|
}
|
|
601
|
-
}), Ie = /* @__PURE__ */
|
|
602
|
+
}), Ie = /* @__PURE__ */ O({
|
|
602
603
|
__name: "MediaFileIcon",
|
|
603
604
|
props: { mimeType: {} },
|
|
604
605
|
setup(e) {
|
|
605
|
-
let
|
|
606
|
+
let n = e, i = {
|
|
606
607
|
"application/pdf": {
|
|
607
608
|
label: "PDF",
|
|
608
609
|
color: "var(--tpl-danger)",
|
|
@@ -693,16 +694,16 @@ var ve = {
|
|
|
693
694
|
bgColor: "var(--tpl-secondary-light)",
|
|
694
695
|
icon: "audio"
|
|
695
696
|
}
|
|
696
|
-
},
|
|
697
|
+
}, a = {
|
|
697
698
|
label: "FILE",
|
|
698
699
|
color: "var(--tpl-text-muted)",
|
|
699
700
|
bgColor: "var(--tpl-bg-hover)",
|
|
700
701
|
icon: "document"
|
|
701
|
-
},
|
|
702
|
-
return (e,
|
|
702
|
+
}, o = m(() => i[n.mimeType] ?? a);
|
|
703
|
+
return (e, n) => (r(), v("div", {
|
|
703
704
|
class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2",
|
|
704
|
-
style:
|
|
705
|
-
}, [
|
|
705
|
+
style: s({ backgroundColor: o.value.bgColor })
|
|
706
|
+
}, [o.value.icon === "document" ? (r(), v("svg", {
|
|
706
707
|
key: 0,
|
|
707
708
|
width: "60",
|
|
708
709
|
height: "60",
|
|
@@ -710,23 +711,23 @@ var ve = {
|
|
|
710
711
|
fill: "none",
|
|
711
712
|
stroke: "currentColor",
|
|
712
713
|
"stroke-width": "1.5",
|
|
713
|
-
style:
|
|
714
|
-
}, [...
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
714
|
+
style: s({ color: o.value.color })
|
|
715
|
+
}, [...n[0] ||= [
|
|
716
|
+
S("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
|
|
717
|
+
S("polyline", { points: "14 2 14 8 20 8" }, null, -1),
|
|
718
|
+
S("line", {
|
|
718
719
|
x1: "8",
|
|
719
720
|
y1: "13",
|
|
720
721
|
x2: "16",
|
|
721
722
|
y2: "13"
|
|
722
723
|
}, null, -1),
|
|
723
|
-
|
|
724
|
+
S("line", {
|
|
724
725
|
x1: "8",
|
|
725
726
|
y1: "17",
|
|
726
727
|
x2: "12",
|
|
727
728
|
y2: "17"
|
|
728
729
|
}, null, -1)
|
|
729
|
-
]], 4)) :
|
|
730
|
+
]], 4)) : o.value.icon === "video" ? (r(), v("svg", {
|
|
730
731
|
key: 1,
|
|
731
732
|
width: "40",
|
|
732
733
|
height: "40",
|
|
@@ -734,18 +735,18 @@ var ve = {
|
|
|
734
735
|
fill: "none",
|
|
735
736
|
stroke: "currentColor",
|
|
736
737
|
"stroke-width": "1.5",
|
|
737
|
-
style:
|
|
738
|
-
}, [...
|
|
738
|
+
style: s({ color: o.value.color })
|
|
739
|
+
}, [...n[1] ||= [S("rect", {
|
|
739
740
|
x: "2",
|
|
740
741
|
y: "4",
|
|
741
742
|
width: "20",
|
|
742
743
|
height: "16",
|
|
743
744
|
rx: "2"
|
|
744
|
-
}, null, -1),
|
|
745
|
+
}, null, -1), S("polygon", {
|
|
745
746
|
points: "10,8 16,12 10,16",
|
|
746
747
|
fill: "currentColor",
|
|
747
748
|
stroke: "none"
|
|
748
|
-
}, null, -1)]], 4)) : (
|
|
749
|
+
}, null, -1)]], 4)) : (r(), v("svg", {
|
|
749
750
|
key: 2,
|
|
750
751
|
width: "40",
|
|
751
752
|
height: "40",
|
|
@@ -753,23 +754,23 @@ var ve = {
|
|
|
753
754
|
fill: "none",
|
|
754
755
|
stroke: "currentColor",
|
|
755
756
|
"stroke-width": "1.5",
|
|
756
|
-
style:
|
|
757
|
-
}, [...
|
|
758
|
-
|
|
759
|
-
|
|
757
|
+
style: s({ color: o.value.color })
|
|
758
|
+
}, [...n[2] ||= [
|
|
759
|
+
S("path", { d: "M9 18V5l12-2v13" }, null, -1),
|
|
760
|
+
S("circle", {
|
|
760
761
|
cx: "6",
|
|
761
762
|
cy: "18",
|
|
762
763
|
r: "3"
|
|
763
764
|
}, null, -1),
|
|
764
|
-
|
|
765
|
+
S("circle", {
|
|
765
766
|
cx: "18",
|
|
766
767
|
cy: "16",
|
|
767
768
|
r: "3"
|
|
768
769
|
}, null, -1)
|
|
769
|
-
]], 4)),
|
|
770
|
+
]], 4)), S("span", {
|
|
770
771
|
class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
|
|
771
|
-
style:
|
|
772
|
-
},
|
|
772
|
+
style: s({ color: o.value.color })
|
|
773
|
+
}, t(o.value.label), 5)], 4));
|
|
773
774
|
}
|
|
774
775
|
});
|
|
775
776
|
// ../media-library/src/utils/formatAbsoluteDate.ts
|
|
@@ -869,7 +870,7 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
869
870
|
}, ft = {
|
|
870
871
|
key: 4,
|
|
871
872
|
class: "tpl:flex tpl:justify-center tpl:py-4"
|
|
872
|
-
}, pt = /*#__PURE__*/
|
|
873
|
+
}, pt = /*#__PURE__*/ N(/* @__PURE__ */ O({
|
|
873
874
|
__name: "MediaGrid",
|
|
874
875
|
props: {
|
|
875
876
|
items: {},
|
|
@@ -890,8 +891,8 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
890
891
|
"replace",
|
|
891
892
|
"confirm"
|
|
892
893
|
],
|
|
893
|
-
setup(
|
|
894
|
-
let
|
|
894
|
+
setup(e, { emit: n }) {
|
|
895
|
+
let a = e, c = n, { isAcceptedMimeType: l, isImageMimeType: u } = Q();
|
|
895
896
|
function d(e) {
|
|
896
897
|
return e.mimeType ?? "";
|
|
897
898
|
}
|
|
@@ -899,130 +900,130 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
899
900
|
return e.thumbnailUrl ?? e.url;
|
|
900
901
|
}
|
|
901
902
|
function m(e) {
|
|
902
|
-
return !
|
|
903
|
+
return !a.accept || a.accept.length === 0 || l(d(e), a.accept);
|
|
903
904
|
}
|
|
904
|
-
function
|
|
905
|
-
return
|
|
905
|
+
function b(e) {
|
|
906
|
+
return a.canUpdate === !0 && e.canUpdate !== !1;
|
|
906
907
|
}
|
|
907
|
-
function
|
|
908
|
-
return
|
|
908
|
+
function x(e) {
|
|
909
|
+
return a.canReplace === !0 && e.canUpdate !== !1;
|
|
909
910
|
}
|
|
910
|
-
function
|
|
911
|
-
t.metaKey || t.ctrlKey ?
|
|
911
|
+
function C(e, t) {
|
|
912
|
+
t.metaKey || t.ctrlKey ? c("toggle", e.id) : c("select", e);
|
|
912
913
|
}
|
|
913
|
-
function
|
|
914
|
-
m(e) &&
|
|
914
|
+
function E(e) {
|
|
915
|
+
m(e) && c("confirm", e);
|
|
915
916
|
}
|
|
916
917
|
function O(e, t) {
|
|
917
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(),
|
|
918
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), c("select", e));
|
|
918
919
|
}
|
|
919
920
|
function k(e) {
|
|
920
|
-
return
|
|
921
|
+
return a.selectedIds.has(e.id);
|
|
921
922
|
}
|
|
922
923
|
function j(e) {
|
|
923
924
|
return k(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
|
|
924
925
|
}
|
|
925
|
-
let { t: M } =
|
|
926
|
-
|
|
927
|
-
e &&
|
|
926
|
+
let { t: M } = Z(), N = D(X, null), P = _(null);
|
|
927
|
+
ce(P, ([{ isIntersecting: e }]) => {
|
|
928
|
+
e && a.hasMore && !a.isLoading && c("loadMore");
|
|
928
929
|
}, { threshold: .1 });
|
|
929
|
-
function
|
|
930
|
+
function I(e) {
|
|
930
931
|
return Le(e, N?.value, {
|
|
931
932
|
year: "numeric",
|
|
932
933
|
month: "short",
|
|
933
934
|
day: "numeric"
|
|
934
935
|
});
|
|
935
936
|
}
|
|
936
|
-
return (
|
|
937
|
-
|
|
937
|
+
return (n, a) => (r(), v("div", ze, [
|
|
938
|
+
e.isLoading && e.items.length === 0 ? (r(), v("div", {
|
|
938
939
|
key: 0,
|
|
939
940
|
role: "status",
|
|
940
941
|
"aria-busy": "true",
|
|
941
|
-
"aria-label":
|
|
942
|
-
class:
|
|
943
|
-
}, [(
|
|
944
|
-
key:
|
|
945
|
-
class:
|
|
942
|
+
"aria-label": h(M).mediaLibrary.loading,
|
|
943
|
+
class: i(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
|
|
944
|
+
}, [(r(), v(w, null, o(8, (t) => S("div", {
|
|
945
|
+
key: t,
|
|
946
|
+
class: i(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
|
|
946
947
|
style: { "background-color": "var(--tpl-bg-hover)" },
|
|
947
948
|
"aria-hidden": "true"
|
|
948
|
-
}, null, 2)), 64))], 10, Be)) :
|
|
949
|
+
}, null, 2)), 64))], 10, Be)) : e.items.length === 0 ? (r(), v("div", Ve, [f(h(G), {
|
|
949
950
|
class: "tpl:mb-3",
|
|
950
951
|
size: 40,
|
|
951
952
|
"stroke-width": 1,
|
|
952
953
|
style: { color: "var(--tpl-text-dim)" }
|
|
953
|
-
}),
|
|
954
|
+
}), S("p", He, t(e.searchQuery ? h(M).mediaLibrary.noSearchResults : h(M).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (r(), v("div", {
|
|
954
955
|
key: 3,
|
|
955
956
|
role: "listbox",
|
|
956
|
-
"aria-label":
|
|
957
|
+
"aria-label": h(M).mediaLibrary.filesListAriaLabel,
|
|
957
958
|
"aria-multiselectable": "true",
|
|
958
959
|
class: "tpl:flex tpl:flex-col tpl:gap-1"
|
|
959
|
-
}, [(
|
|
960
|
+
}, [(r(!0), v(w, null, o(e.items, (e) => (r(), v("div", {
|
|
960
961
|
key: e.id,
|
|
961
962
|
role: "option",
|
|
962
963
|
tabindex: "0",
|
|
963
964
|
"data-testid": "media-library-item",
|
|
964
|
-
class:
|
|
965
|
+
class: i(["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
966
|
"data-media-id": e.id,
|
|
966
967
|
"aria-selected": k(e),
|
|
967
968
|
"aria-label": e.filename || e.url,
|
|
968
|
-
style:
|
|
969
|
-
onClick: (t) =>
|
|
970
|
-
onDblclick: (t) =>
|
|
969
|
+
style: s({ backgroundColor: k(e) ? "var(--tpl-bg-hover)" : "transparent" }),
|
|
970
|
+
onClick: (t) => C(e, t),
|
|
971
|
+
onDblclick: (t) => E(e),
|
|
971
972
|
onKeydown: (t) => O(e, t)
|
|
972
973
|
}, [
|
|
973
|
-
|
|
974
|
+
S("div", rt, [h(u)(d(e)) ? (r(), v("img", {
|
|
974
975
|
key: 0,
|
|
975
976
|
src: p(e),
|
|
976
977
|
alt: e.filename || e.url,
|
|
977
978
|
class: "tpl:size-full tpl:object-cover",
|
|
978
979
|
loading: "lazy"
|
|
979
|
-
}, null, 8, it)) : (
|
|
980
|
-
|
|
981
|
-
e.size == null ? g("", !0) : (
|
|
982
|
-
e.createdAt ? (
|
|
983
|
-
|
|
980
|
+
}, null, 8, it)) : (r(), v("div", at, [f(Ie, { "mime-type": d(e) }, null, 8, ["mime-type"])]))]),
|
|
981
|
+
S("div", ot, [S("p", st, t(e.filename || e.url), 1), S("p", ct, [
|
|
982
|
+
e.size == null ? g("", !0) : (r(), v(w, { key: 0 }, [y(t(h($)(e.size)), 1)], 64)),
|
|
983
|
+
e.createdAt ? (r(), v(w, { key: 1 }, [e.size == null ? g("", !0) : (r(), v(w, { key: 0 }, [y(" · ")], 64)), y(" " + t(I(e.createdAt)), 1)], 64)) : g("", !0),
|
|
984
|
+
h(u)(d(e)) && e.width && e.height ? (r(), v(w, { key: 2 }, [y(" · " + t(e.width) + "×" + t(e.height), 1)], 64)) : g("", !0)
|
|
984
985
|
])]),
|
|
985
|
-
|
|
986
|
+
S("div", { class: i(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(e)]) }, [b(e) ? (r(), v("button", {
|
|
986
987
|
key: 0,
|
|
987
988
|
type: "button",
|
|
988
989
|
"data-testid": "media-edit",
|
|
989
990
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
990
991
|
style: { color: "var(--tpl-text-muted)" },
|
|
991
|
-
title:
|
|
992
|
-
"aria-label":
|
|
993
|
-
onClick: A((t) =>
|
|
994
|
-
}, [f(
|
|
992
|
+
title: h(M).mediaLibrary.editFile,
|
|
993
|
+
"aria-label": h(M).mediaLibrary.editFile,
|
|
994
|
+
onClick: A((t) => c("edit", e), ["stop"])
|
|
995
|
+
}, [f(h(z), {
|
|
995
996
|
size: 12,
|
|
996
997
|
"stroke-width": 2
|
|
997
|
-
})], 8, lt)) : g("", !0),
|
|
998
|
+
})], 8, lt)) : g("", !0), x(e) ? (r(), v("button", {
|
|
998
999
|
key: 1,
|
|
999
1000
|
type: "button",
|
|
1000
1001
|
"data-testid": "media-replace",
|
|
1001
1002
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
1002
1003
|
style: { color: "var(--tpl-text-muted)" },
|
|
1003
|
-
title:
|
|
1004
|
-
"aria-label":
|
|
1005
|
-
onClick: A((t) =>
|
|
1006
|
-
}, [f(
|
|
1004
|
+
title: h(M).mediaLibrary.replaceFile,
|
|
1005
|
+
"aria-label": h(M).mediaLibrary.replaceFile,
|
|
1006
|
+
onClick: A((t) => c("replace", e), ["stop"])
|
|
1007
|
+
}, [f(h(V), {
|
|
1007
1008
|
size: 12,
|
|
1008
1009
|
"stroke-width": 2
|
|
1009
1010
|
})], 8, ut)) : g("", !0)], 2),
|
|
1010
|
-
k(e) ? (
|
|
1011
|
+
k(e) ? (r(), v("div", dt, [f(h(F), {
|
|
1011
1012
|
size: 12,
|
|
1012
1013
|
"stroke-width": 3
|
|
1013
1014
|
})])) : g("", !0)
|
|
1014
|
-
], 46, nt))), 128))], 8, tt)) : (
|
|
1015
|
+
], 46, nt))), 128))], 8, tt)) : (r(), v("div", {
|
|
1015
1016
|
key: 2,
|
|
1016
1017
|
role: "listbox",
|
|
1017
|
-
"aria-label":
|
|
1018
|
+
"aria-label": h(M).mediaLibrary.filesListAriaLabel,
|
|
1018
1019
|
"aria-multiselectable": "true",
|
|
1019
1020
|
class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
|
|
1020
|
-
}, [(
|
|
1021
|
+
}, [(r(!0), v(w, null, o(e.items, (e) => (r(), v("div", {
|
|
1021
1022
|
key: e.id,
|
|
1022
1023
|
role: "option",
|
|
1023
1024
|
tabindex: "0",
|
|
1024
1025
|
"data-testid": "media-library-item",
|
|
1025
|
-
class:
|
|
1026
|
+
class: i(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
|
|
1026
1027
|
"tpl:cursor-pointer",
|
|
1027
1028
|
!m(e) && !k(e) ? "tpl:opacity-60" : "",
|
|
1028
1029
|
k(e) ? "tpl-media-item--selected" : ""
|
|
@@ -1030,26 +1031,26 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1030
1031
|
"data-media-id": e.id,
|
|
1031
1032
|
"aria-selected": k(e),
|
|
1032
1033
|
"aria-label": e.filename || e.url,
|
|
1033
|
-
style:
|
|
1034
|
+
style: s({
|
|
1034
1035
|
borderColor: k(e) ? "var(--tpl-primary)" : "transparent",
|
|
1035
1036
|
backgroundColor: !m(e) && !k(e) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
|
|
1036
1037
|
}),
|
|
1037
|
-
onClick: (t) =>
|
|
1038
|
-
onDblclick: (t) =>
|
|
1038
|
+
onClick: (t) => C(e, t),
|
|
1039
|
+
onDblclick: (t) => E(e),
|
|
1039
1040
|
onKeydown: (t) => O(e, t)
|
|
1040
1041
|
}, [
|
|
1041
|
-
|
|
1042
|
+
S("div", Ge, [h(u)(d(e)) ? (r(), v("img", {
|
|
1042
1043
|
key: 0,
|
|
1043
1044
|
src: p(e),
|
|
1044
1045
|
alt: e.filename || e.url,
|
|
1045
1046
|
class: "tpl:size-full tpl:object-cover",
|
|
1046
1047
|
loading: "lazy"
|
|
1047
|
-
}, null, 8, Ke)) : (
|
|
1048
|
+
}, null, 8, Ke)) : (r(), T(Ie, {
|
|
1048
1049
|
key: 1,
|
|
1049
1050
|
"mime-type": d(e)
|
|
1050
1051
|
}, null, 8, ["mime-type"]))]),
|
|
1051
|
-
|
|
1052
|
-
|
|
1052
|
+
S("div", qe, [S("p", Je, t(e.filename || e.url), 1), S("p", Ye, [e.size == null ? g("", !0) : (r(), v("span", Xe, t(h($)(e.size)), 1)), h(u)(d(e)) && e.width && e.height ? (r(), v("span", Ze, t(e.width) + "×" + t(e.height), 1)) : g("", !0)])]),
|
|
1053
|
+
S("div", { class: i(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(e)]) }, [b(e) ? (r(), v("button", {
|
|
1053
1054
|
key: 0,
|
|
1054
1055
|
type: "button",
|
|
1055
1056
|
"data-testid": "media-edit",
|
|
@@ -1058,13 +1059,13 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1058
1059
|
"background-color": "var(--tpl-overlay)",
|
|
1059
1060
|
color: "var(--tpl-on-primary)"
|
|
1060
1061
|
},
|
|
1061
|
-
title:
|
|
1062
|
-
"aria-label":
|
|
1063
|
-
onClick: A((t) =>
|
|
1064
|
-
}, [f(
|
|
1062
|
+
title: h(M).mediaLibrary.editFile,
|
|
1063
|
+
"aria-label": h(M).mediaLibrary.editFile,
|
|
1064
|
+
onClick: A((t) => c("edit", e), ["stop"])
|
|
1065
|
+
}, [f(h(z), {
|
|
1065
1066
|
size: 11,
|
|
1066
1067
|
"stroke-width": 2
|
|
1067
|
-
})], 8, Qe)) : g("", !0),
|
|
1068
|
+
})], 8, Qe)) : g("", !0), x(e) ? (r(), v("button", {
|
|
1068
1069
|
key: 1,
|
|
1069
1070
|
type: "button",
|
|
1070
1071
|
"data-testid": "media-replace",
|
|
@@ -1073,24 +1074,24 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1073
1074
|
"background-color": "var(--tpl-overlay)",
|
|
1074
1075
|
color: "var(--tpl-on-primary)"
|
|
1075
1076
|
},
|
|
1076
|
-
title:
|
|
1077
|
-
"aria-label":
|
|
1078
|
-
onClick: A((t) =>
|
|
1079
|
-
}, [f(
|
|
1077
|
+
title: h(M).mediaLibrary.replaceFile,
|
|
1078
|
+
"aria-label": h(M).mediaLibrary.replaceFile,
|
|
1079
|
+
onClick: A((t) => c("replace", e), ["stop"])
|
|
1080
|
+
}, [f(h(V), {
|
|
1080
1081
|
size: 11,
|
|
1081
1082
|
"stroke-width": 2
|
|
1082
1083
|
})], 8, $e)) : g("", !0)], 2),
|
|
1083
|
-
k(e) ? (
|
|
1084
|
+
k(e) ? (r(), v("div", et, [f(h(F), {
|
|
1084
1085
|
size: 12,
|
|
1085
1086
|
"stroke-width": 3
|
|
1086
1087
|
})])) : g("", !0)
|
|
1087
1088
|
], 46, We))), 128))], 8, Ue)),
|
|
1088
|
-
|
|
1089
|
+
S("div", {
|
|
1089
1090
|
ref_key: "sentinelRef",
|
|
1090
1091
|
ref: P,
|
|
1091
1092
|
class: "tpl:h-4"
|
|
1092
1093
|
}, null, 512),
|
|
1093
|
-
|
|
1094
|
+
e.isLoading && e.items.length > 0 ? (r(), v("div", ft, [f(h(R), {
|
|
1094
1095
|
class: "tpl-spinner",
|
|
1095
1096
|
size: 20,
|
|
1096
1097
|
"stroke-width": 2,
|
|
@@ -1117,7 +1118,7 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1117
1118
|
}, yt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, bt = ["disabled"], xt = ["disabled"], St = {
|
|
1118
1119
|
key: 0,
|
|
1119
1120
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
1120
|
-
}, Ct = { key: 1 }, wt = /* @__PURE__ */
|
|
1121
|
+
}, Ct = { key: 1 }, wt = /* @__PURE__ */ O({
|
|
1121
1122
|
__name: "MediaImportUrlModal",
|
|
1122
1123
|
props: {
|
|
1123
1124
|
visible: { type: Boolean },
|
|
@@ -1125,24 +1126,24 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1125
1126
|
error: {}
|
|
1126
1127
|
},
|
|
1127
1128
|
emits: ["import", "close"],
|
|
1128
|
-
setup(n, { emit:
|
|
1129
|
-
let
|
|
1130
|
-
|
|
1131
|
-
e && (
|
|
1129
|
+
setup(n, { emit: a }) {
|
|
1130
|
+
let o = n, s = a, { t: u } = Z(), d = D(Y, null), b = D(J, _(null)), x = _("");
|
|
1131
|
+
e(() => o.visible, (e) => {
|
|
1132
|
+
e && (x.value = "");
|
|
1132
1133
|
});
|
|
1133
|
-
function S() {
|
|
1134
|
-
let e = m.value.trim();
|
|
1135
|
-
e && !a.isImporting && o("import", e);
|
|
1136
|
-
}
|
|
1137
1134
|
function C() {
|
|
1138
|
-
|
|
1135
|
+
let e = x.value.trim();
|
|
1136
|
+
e && !o.isImporting && s("import", e);
|
|
1139
1137
|
}
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
function D(e) {
|
|
1143
|
-
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), S()), e.key === "Escape" && C();
|
|
1138
|
+
function w() {
|
|
1139
|
+
o.isImporting || s("close");
|
|
1144
1140
|
}
|
|
1145
|
-
|
|
1141
|
+
let E = _(null);
|
|
1142
|
+
_e(E, m(() => o.visible));
|
|
1143
|
+
function O(e) {
|
|
1144
|
+
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), C()), e.key === "Escape" && w();
|
|
1145
|
+
}
|
|
1146
|
+
return (e, a) => (r(), T(p, { to: h(b) || "body" }, [f(M, {
|
|
1146
1147
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1147
1148
|
"enter-from-class": "tpl:opacity-0",
|
|
1148
1149
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1150,14 +1151,14 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1150
1151
|
"leave-from-class": "tpl:opacity-100",
|
|
1151
1152
|
"leave-to-class": "tpl:opacity-0"
|
|
1152
1153
|
}, {
|
|
1153
|
-
default:
|
|
1154
|
+
default: c(() => [n.visible ? (r(), v("div", {
|
|
1154
1155
|
key: 0,
|
|
1155
|
-
"data-tpl-theme":
|
|
1156
|
-
class:
|
|
1156
|
+
"data-tpl-theme": h(d),
|
|
1157
|
+
class: i([h(b) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1157
1158
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1158
|
-
onClick: A(
|
|
1159
|
-
onKeydown:
|
|
1160
|
-
}, [
|
|
1159
|
+
onClick: A(w, ["self"]),
|
|
1160
|
+
onKeydown: O
|
|
1161
|
+
}, [S("div", {
|
|
1161
1162
|
ref_key: "dialogRef",
|
|
1162
1163
|
ref: E,
|
|
1163
1164
|
role: "dialog",
|
|
@@ -1166,11 +1167,11 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1166
1167
|
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
1168
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1168
1169
|
}, [
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
"onUpdate:modelValue":
|
|
1170
|
+
S("h3", ht, t(h(u).mediaLibrary.importFromUrl), 1),
|
|
1171
|
+
S("div", gt, [l(S("input", {
|
|
1172
|
+
"onUpdate:modelValue": a[0] ||= (e) => x.value = e,
|
|
1172
1173
|
type: "url",
|
|
1173
|
-
"aria-label":
|
|
1174
|
+
"aria-label": h(u).mediaLibrary.importFromUrl,
|
|
1174
1175
|
"aria-invalid": !!n.error,
|
|
1175
1176
|
"aria-describedby": n.error ? "tpl-media-import-error" : void 0,
|
|
1176
1177
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
@@ -1179,33 +1180,33 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1179
1180
|
"background-color": "var(--tpl-bg)",
|
|
1180
1181
|
color: "var(--tpl-text)"
|
|
1181
1182
|
},
|
|
1182
|
-
placeholder:
|
|
1183
|
+
placeholder: h(u).mediaLibrary.importUrlPlaceholder,
|
|
1183
1184
|
disabled: n.isImporting,
|
|
1184
1185
|
autofocus: ""
|
|
1185
|
-
}, null, 8, _t), [[k,
|
|
1186
|
-
n.error ? (
|
|
1187
|
-
|
|
1188
|
-
class:
|
|
1186
|
+
}, null, 8, _t), [[k, x.value]])]),
|
|
1187
|
+
n.error ? (r(), v("p", vt, t(n.error), 1)) : g("", !0),
|
|
1188
|
+
S("div", yt, [S("button", {
|
|
1189
|
+
class: i(["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
1190
|
style: {
|
|
1190
1191
|
"border-color": "var(--tpl-border)",
|
|
1191
1192
|
color: "var(--tpl-text)",
|
|
1192
1193
|
"background-color": "var(--tpl-bg)"
|
|
1193
1194
|
},
|
|
1194
1195
|
disabled: n.isImporting,
|
|
1195
|
-
onClick:
|
|
1196
|
-
},
|
|
1196
|
+
onClick: w
|
|
1197
|
+
}, t(h(u).mediaLibrary.cancel), 11, bt), S("button", {
|
|
1197
1198
|
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
1199
|
style: {
|
|
1199
1200
|
"background-color": "var(--tpl-primary)",
|
|
1200
1201
|
color: "var(--tpl-on-primary)"
|
|
1201
1202
|
},
|
|
1202
|
-
disabled: !
|
|
1203
|
-
onClick:
|
|
1204
|
-
}, [n.isImporting ? (
|
|
1203
|
+
disabled: !x.value.trim() || n.isImporting,
|
|
1204
|
+
onClick: C
|
|
1205
|
+
}, [n.isImporting ? (r(), v("span", St, [f(h(R), {
|
|
1205
1206
|
class: "tpl:animate-spin",
|
|
1206
1207
|
size: 12,
|
|
1207
1208
|
"stroke-width": 2
|
|
1208
|
-
}),
|
|
1209
|
+
}), y(" " + t(h(u).mediaLibrary.importing), 1)])) : (r(), v("span", Ct, t(h(u).mediaLibrary.import), 1))], 8, xt)])
|
|
1209
1210
|
], 512)], 42, mt)) : g("", !0)]),
|
|
1210
1211
|
_: 1
|
|
1211
1212
|
})], 8, ["to"]));
|
|
@@ -1214,15 +1215,15 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1214
1215
|
key: 0,
|
|
1215
1216
|
class: "tpl:shrink-0",
|
|
1216
1217
|
style: { color: "var(--tpl-text-dim)" }
|
|
1217
|
-
}, kt = /* @__PURE__ */
|
|
1218
|
+
}, kt = /* @__PURE__ */ O({
|
|
1218
1219
|
__name: "MediaMovePicker",
|
|
1219
1220
|
props: {
|
|
1220
1221
|
folders: {},
|
|
1221
1222
|
currentFolderId: {}
|
|
1222
1223
|
},
|
|
1223
1224
|
emits: ["select", "close"],
|
|
1224
|
-
setup(
|
|
1225
|
-
let
|
|
1225
|
+
setup(e, { emit: n }) {
|
|
1226
|
+
let i = n, { t: a } = Z(), c = _(null);
|
|
1226
1227
|
function l(e, t = 0) {
|
|
1227
1228
|
let n = [];
|
|
1228
1229
|
for (let r of e) n.push({
|
|
@@ -1232,44 +1233,44 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1232
1233
|
}), r.children.length && n.push(...l(r.children, t + 1));
|
|
1233
1234
|
return n;
|
|
1234
1235
|
}
|
|
1235
|
-
return
|
|
1236
|
-
|
|
1237
|
-
}), (
|
|
1236
|
+
return le(c, () => {
|
|
1237
|
+
i("close");
|
|
1238
|
+
}), (n, u) => (r(), v("div", {
|
|
1238
1239
|
ref_key: "pickerRef",
|
|
1239
|
-
ref:
|
|
1240
|
+
ref: c,
|
|
1240
1241
|
"data-testid": "media-move-picker",
|
|
1241
1242
|
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
1243
|
style: {
|
|
1243
1244
|
"border-color": "var(--tpl-border)",
|
|
1244
1245
|
"background-color": "var(--tpl-bg-elevated)"
|
|
1245
1246
|
}
|
|
1246
|
-
}, [
|
|
1247
|
+
}, [S("div", Tt, [e.currentFolderId === null ? g("", !0) : (r(), v("button", {
|
|
1247
1248
|
key: 0,
|
|
1248
1249
|
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
1250
|
style: { color: "var(--tpl-text)" },
|
|
1250
|
-
onClick:
|
|
1251
|
-
}, [f(
|
|
1251
|
+
onClick: u[0] ||= (e) => i("select", null)
|
|
1252
|
+
}, [f(h(G), {
|
|
1252
1253
|
class: "tpl:shrink-0",
|
|
1253
1254
|
size: 14,
|
|
1254
1255
|
"stroke-width": 1.5
|
|
1255
|
-
}),
|
|
1256
|
-
key:
|
|
1256
|
+
}), y(" " + t(h(a).mediaLibrary.moveToRoot), 1)])), (r(!0), v(w, null, o(l(e.folders), (n) => (r(), v("button", {
|
|
1257
|
+
key: n.id,
|
|
1257
1258
|
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:
|
|
1259
|
+
style: s({
|
|
1260
|
+
paddingLeft: `${n.depth * 16 + 12}px`,
|
|
1261
|
+
color: n.id === e.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
|
|
1262
|
+
opacity: n.id === e.currentFolderId ? .5 : 1
|
|
1262
1263
|
}),
|
|
1263
|
-
disabled:
|
|
1264
|
-
onClick: (
|
|
1264
|
+
disabled: n.id === e.currentFolderId,
|
|
1265
|
+
onClick: (e) => i("select", n.id)
|
|
1265
1266
|
}, [
|
|
1266
|
-
f(
|
|
1267
|
+
f(h(K), {
|
|
1267
1268
|
class: "tpl:shrink-0",
|
|
1268
1269
|
size: 14,
|
|
1269
1270
|
"stroke-width": 1.5
|
|
1270
1271
|
}),
|
|
1271
|
-
|
|
1272
|
-
|
|
1272
|
+
S("span", Dt, t(n.name), 1),
|
|
1273
|
+
n.id === e.currentFolderId ? (r(), v("span", Ot, t(h(a).mediaLibrary.currentFolder), 1)) : g("", !0)
|
|
1273
1274
|
], 12, Et))), 128))])], 512));
|
|
1274
1275
|
}
|
|
1275
1276
|
}), At = { class: "tpl:flex tpl:items-center tpl:gap-3" }, jt = ["src", "alt"], Mt = {
|
|
@@ -1282,68 +1283,68 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1282
1283
|
}, Ft = {
|
|
1283
1284
|
class: "tpl:mt-0.5 tpl:text-[10px]",
|
|
1284
1285
|
style: { color: "var(--tpl-text-muted)" }
|
|
1285
|
-
}, It = /*#__PURE__*/
|
|
1286
|
+
}, It = /*#__PURE__*/ N(/* @__PURE__ */ O({
|
|
1286
1287
|
__name: "MediaPreviewPanel",
|
|
1287
1288
|
props: {
|
|
1288
1289
|
item: {},
|
|
1289
1290
|
folders: {}
|
|
1290
1291
|
},
|
|
1291
1292
|
setup(e) {
|
|
1292
|
-
let n = e,
|
|
1293
|
-
function
|
|
1293
|
+
let n = e, a = D(X, null), { isImageMimeType: o } = Q();
|
|
1294
|
+
function s(e, t, n = []) {
|
|
1294
1295
|
for (let r of e) {
|
|
1295
1296
|
let e = [...n, r.name];
|
|
1296
1297
|
if (r.id === t) return e;
|
|
1297
1298
|
if (r.children.length) {
|
|
1298
|
-
let n =
|
|
1299
|
+
let n = s(r.children, t, e);
|
|
1299
1300
|
if (n) return n;
|
|
1300
1301
|
}
|
|
1301
1302
|
}
|
|
1302
1303
|
return null;
|
|
1303
1304
|
}
|
|
1304
|
-
let
|
|
1305
|
+
let c = m(() => {
|
|
1305
1306
|
if (!n.item.folderId || !n.folders) return null;
|
|
1306
|
-
let e =
|
|
1307
|
+
let e = s(n.folders, n.item.folderId);
|
|
1307
1308
|
return e ? e.join("/") : null;
|
|
1308
|
-
}),
|
|
1309
|
-
function
|
|
1310
|
-
return Le(e,
|
|
1309
|
+
}), l = m(() => n.item.mimeType ?? ""), u = m(() => o(l.value));
|
|
1310
|
+
function d(e) {
|
|
1311
|
+
return Le(e, a?.value, {
|
|
1311
1312
|
year: "numeric",
|
|
1312
1313
|
month: "short",
|
|
1313
1314
|
day: "numeric"
|
|
1314
1315
|
});
|
|
1315
1316
|
}
|
|
1316
|
-
let
|
|
1317
|
-
return (
|
|
1317
|
+
let p = m(() => n.item.filename || n.item.url);
|
|
1318
|
+
return (n, a) => (r(), v("div", At, [u.value ? (r(), v("img", {
|
|
1318
1319
|
key: 0,
|
|
1319
1320
|
src: e.item.url,
|
|
1320
|
-
alt: e.item.alt ||
|
|
1321
|
+
alt: e.item.alt || p.value,
|
|
1321
1322
|
class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
|
|
1322
1323
|
style: { border: "1px solid var(--tpl-border)" }
|
|
1323
|
-
}, null, 8, jt)) : (
|
|
1324
|
-
"mime-type":
|
|
1324
|
+
}, null, 8, jt)) : (r(), v("div", Mt, [f(Ie, {
|
|
1325
|
+
"mime-type": l.value,
|
|
1325
1326
|
class: "tpl-preview-icon"
|
|
1326
|
-
}, null, 8, ["mime-type"])])),
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
e.item.size == null ? g("", !0) : (
|
|
1330
|
-
e.item.createdAt ? (
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
f(
|
|
1327
|
+
}, null, 8, ["mime-type"])])), S("div", Nt, [
|
|
1328
|
+
S("p", Pt, t(p.value), 1),
|
|
1329
|
+
S("p", Ft, [
|
|
1330
|
+
e.item.size == null ? g("", !0) : (r(), v(w, { key: 0 }, [y(t(h($)(e.item.size)), 1)], 64)),
|
|
1331
|
+
e.item.createdAt ? (r(), v(w, { key: 1 }, [e.item.size == null ? g("", !0) : (r(), v(w, { key: 0 }, [y(" · ")], 64)), y(" " + t(d(e.item.createdAt)), 1)], 64)) : g("", !0),
|
|
1332
|
+
u.value && e.item.width && e.item.height ? (r(), v(w, { key: 2 }, [y(" · " + t(e.item.width) + "×" + t(e.item.height) + "px ", 1)], 64)) : g("", !0),
|
|
1333
|
+
c.value ? (r(), v(w, { key: 3 }, [
|
|
1334
|
+
a[0] ||= y(" · ", -1),
|
|
1335
|
+
f(h(K), {
|
|
1335
1336
|
class: "tpl:mb-px tpl:inline",
|
|
1336
1337
|
size: 9,
|
|
1337
1338
|
"stroke-width": 2
|
|
1338
1339
|
}),
|
|
1339
|
-
|
|
1340
|
+
y(" " + t(c.value), 1)
|
|
1340
1341
|
], 64)) : g("", !0)
|
|
1341
1342
|
]),
|
|
1342
|
-
|
|
1343
|
+
u.value ? (r(), v("p", {
|
|
1343
1344
|
key: 0,
|
|
1344
|
-
class:
|
|
1345
|
+
class: i(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt }]),
|
|
1345
1346
|
style: { color: "var(--tpl-text-dim)" }
|
|
1346
|
-
},
|
|
1347
|
+
}, t(e.item.alt || "\xA0"), 3)) : g("", !0)
|
|
1347
1348
|
])]));
|
|
1348
1349
|
}
|
|
1349
1350
|
}), [["__scopeId", "data-v-50993988"]]), Lt = ["data-tpl-theme"], Rt = {
|
|
@@ -1376,7 +1377,7 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1376
1377
|
role: "alert",
|
|
1377
1378
|
class: "tpl:mb-3 tpl:text-xs",
|
|
1378
1379
|
style: { color: "var(--tpl-danger)" }
|
|
1379
|
-
}, qt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Jt = ["disabled"], Yt = ["disabled"], Xt = /* @__PURE__ */
|
|
1380
|
+
}, qt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Jt = ["disabled"], Yt = ["disabled"], Xt = /* @__PURE__ */ O({
|
|
1380
1381
|
__name: "MediaReplaceModal",
|
|
1381
1382
|
props: {
|
|
1382
1383
|
visible: { type: Boolean },
|
|
@@ -1386,28 +1387,28 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1386
1387
|
error: {}
|
|
1387
1388
|
},
|
|
1388
1389
|
emits: ["replace", "close"],
|
|
1389
|
-
setup(n, { emit:
|
|
1390
|
-
let
|
|
1391
|
-
if (!
|
|
1392
|
-
let e = (
|
|
1390
|
+
setup(n, { emit: a }) {
|
|
1391
|
+
let o = n, s = a, { t: l } = Z(), u = D(Y, null), d = D(J, _(null)), y = _(null), b = _(null), x = m(() => {
|
|
1392
|
+
if (!o.item) return "";
|
|
1393
|
+
let e = (o.item.filename ?? "").split(".");
|
|
1393
1394
|
return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
|
|
1394
|
-
}),
|
|
1395
|
-
|
|
1396
|
-
e || (
|
|
1395
|
+
}), C = m(() => x.value ? `.${x.value}` : "*"), w = m(() => (o.usageInfo?.templateCount ?? 0) > 0);
|
|
1396
|
+
e(() => o.visible, (e) => {
|
|
1397
|
+
e || (b.value = null, y.value && (y.value.value = ""));
|
|
1397
1398
|
});
|
|
1398
1399
|
function E(e) {
|
|
1399
1400
|
let t = e.target;
|
|
1400
|
-
t.files && t.files.length > 0 && (
|
|
1401
|
+
t.files && t.files.length > 0 && (b.value = t.files[0]);
|
|
1401
1402
|
}
|
|
1402
|
-
function
|
|
1403
|
-
|
|
1403
|
+
function O() {
|
|
1404
|
+
b.value && s("replace", b.value);
|
|
1404
1405
|
}
|
|
1405
|
-
let k =
|
|
1406
|
-
_e(k,
|
|
1406
|
+
let k = _(null);
|
|
1407
|
+
_e(k, m(() => o.visible && o.item !== null));
|
|
1407
1408
|
function j(e) {
|
|
1408
|
-
e.stopPropagation(), e.key === "Escape" &&
|
|
1409
|
+
e.stopPropagation(), e.key === "Escape" && s("close");
|
|
1409
1410
|
}
|
|
1410
|
-
return (e,
|
|
1411
|
+
return (e, a) => (r(), T(p, { to: h(d) || "body" }, [f(M, {
|
|
1411
1412
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1412
1413
|
"enter-from-class": "tpl:opacity-0",
|
|
1413
1414
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1415,14 +1416,14 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1415
1416
|
"leave-from-class": "tpl:opacity-100",
|
|
1416
1417
|
"leave-to-class": "tpl:opacity-0"
|
|
1417
1418
|
}, {
|
|
1418
|
-
default:
|
|
1419
|
+
default: c(() => [n.visible && n.item ? (r(), v("div", {
|
|
1419
1420
|
key: 0,
|
|
1420
|
-
"data-tpl-theme":
|
|
1421
|
-
class:
|
|
1421
|
+
"data-tpl-theme": h(u),
|
|
1422
|
+
class: i([h(d) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1422
1423
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1423
|
-
onClick:
|
|
1424
|
+
onClick: a[1] ||= A((e) => s("close"), ["self"]),
|
|
1424
1425
|
onKeydown: j
|
|
1425
|
-
}, [
|
|
1426
|
+
}, [S("div", {
|
|
1426
1427
|
ref_key: "dialogRef",
|
|
1427
1428
|
ref: k,
|
|
1428
1429
|
role: "dialog",
|
|
@@ -1431,15 +1432,15 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1431
1432
|
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
1433
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1433
1434
|
}, [
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1435
|
+
S("h3", Rt, t(h(l).mediaLibrary.replaceWarningTitle), 1),
|
|
1436
|
+
S("p", zt, t(h(l).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${x.value}`)), 1),
|
|
1437
|
+
w.value ? (r(), v("p", Bt, t(h(l).mediaLibrary.replaceWarningUsageNote.replace("{count}", n.usageInfo.templateCount.toString())), 1)) : g("", !0),
|
|
1438
|
+
S("div", Vt, [S("p", Ht, t(n.item.filename), 1)]),
|
|
1439
|
+
S("div", Ut, [S("label", Wt, t(h(l).mediaLibrary.replaceSelectFile), 1), S("input", {
|
|
1439
1440
|
ref_key: "fileInputRef",
|
|
1440
|
-
ref:
|
|
1441
|
+
ref: y,
|
|
1441
1442
|
type: "file",
|
|
1442
|
-
accept:
|
|
1443
|
+
accept: C.value,
|
|
1443
1444
|
"aria-invalid": !!n.error,
|
|
1444
1445
|
"aria-describedby": n.error ? "tpl-media-replace-error" : void 0,
|
|
1445
1446
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
|
|
@@ -1450,8 +1451,8 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1450
1451
|
},
|
|
1451
1452
|
onChange: E
|
|
1452
1453
|
}, null, 40, Gt)]),
|
|
1453
|
-
n.error ? (
|
|
1454
|
-
|
|
1454
|
+
n.error ? (r(), v("p", Kt, t(n.error), 1)) : g("", !0),
|
|
1455
|
+
S("div", qt, [S("button", {
|
|
1455
1456
|
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
1457
|
style: {
|
|
1457
1458
|
"border-color": "var(--tpl-border)",
|
|
@@ -1459,16 +1460,16 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1459
1460
|
"background-color": "var(--tpl-bg)"
|
|
1460
1461
|
},
|
|
1461
1462
|
disabled: n.isReplacing,
|
|
1462
|
-
onClick:
|
|
1463
|
-
},
|
|
1463
|
+
onClick: a[0] ||= (e) => s("close")
|
|
1464
|
+
}, t(h(l).mediaLibrary.cancel), 9, Jt), S("button", {
|
|
1464
1465
|
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
1466
|
style: {
|
|
1466
1467
|
"background-color": "var(--tpl-primary)",
|
|
1467
1468
|
color: "var(--tpl-on-primary)"
|
|
1468
1469
|
},
|
|
1469
|
-
disabled: !
|
|
1470
|
-
onClick:
|
|
1471
|
-
},
|
|
1470
|
+
disabled: !b.value || n.isReplacing,
|
|
1471
|
+
onClick: O
|
|
1472
|
+
}, t(n.isReplacing ? h(l).mediaLibrary.replacing : h(l).mediaLibrary.replace), 9, Yt)])
|
|
1472
1473
|
], 512)], 42, Lt)) : g("", !0)]),
|
|
1473
1474
|
_: 1
|
|
1474
1475
|
})], 8, ["to"]));
|
|
@@ -1512,71 +1513,71 @@ var Qt = [
|
|
|
1512
1513
|
role: "alert",
|
|
1513
1514
|
class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
|
|
1514
1515
|
style: { color: "var(--tpl-danger)" }
|
|
1515
|
-
}, an = /* @__PURE__ */
|
|
1516
|
+
}, an = /* @__PURE__ */ O({
|
|
1516
1517
|
__name: "MediaUploadZone",
|
|
1517
1518
|
props: {
|
|
1518
1519
|
isUploading: { type: Boolean },
|
|
1519
1520
|
uploadProgress: {}
|
|
1520
1521
|
},
|
|
1521
1522
|
emits: ["upload"],
|
|
1522
|
-
setup(
|
|
1523
|
-
let
|
|
1523
|
+
setup(e, { emit: n }) {
|
|
1524
|
+
let a = n, { t: o, format: s } = Z(), c = D(X, null), { allAcceptedInputString: l, restrictsMimeTypes: u, availableCategories: d, maxFileSize: p, isAcceptedFile: y } = Q(), b = {
|
|
1524
1525
|
images: "filterImages",
|
|
1525
1526
|
documents: "filterDocuments",
|
|
1526
1527
|
videos: "filterVideos",
|
|
1527
1528
|
audio: "filterAudio"
|
|
1528
|
-
},
|
|
1529
|
-
let e =
|
|
1530
|
-
return Number.isFinite(p.value) ? o
|
|
1529
|
+
}, x = m(() => {
|
|
1530
|
+
let e = o.mediaLibrary, t = u.value ? Zt(d.value.map((t) => e[b[t]]), c?.value) : o.mediaLibrary.acceptedAnyType;
|
|
1531
|
+
return Number.isFinite(p.value) ? s(o.mediaLibrary.acceptedFormatsMaxSize, {
|
|
1531
1532
|
formats: t,
|
|
1532
1533
|
size: $(p.value)
|
|
1533
1534
|
}) : t;
|
|
1534
|
-
}),
|
|
1535
|
-
function
|
|
1535
|
+
}), C = _([]), T = _();
|
|
1536
|
+
function E(e) {
|
|
1536
1537
|
let t = [], n = [];
|
|
1537
|
-
for (let r of Array.from(e))
|
|
1538
|
-
|
|
1538
|
+
for (let r of Array.from(e)) y(r) ? t.push(r) : n.push(r.name);
|
|
1539
|
+
C.value = n, t.length && a("upload", t);
|
|
1539
1540
|
}
|
|
1540
|
-
let { isOverDropZone: O } =
|
|
1541
|
-
e?.length &&
|
|
1542
|
-
} }), { open: k, onChange: A } =
|
|
1541
|
+
let { isOverDropZone: O } = se(T, { onDrop: (e) => {
|
|
1542
|
+
e?.length && E(e);
|
|
1543
|
+
} }), { open: k, onChange: A } = oe({
|
|
1543
1544
|
accept: l.value,
|
|
1544
1545
|
multiple: !0
|
|
1545
1546
|
});
|
|
1546
1547
|
return A((e) => {
|
|
1547
|
-
e?.length &&
|
|
1548
|
-
}), (
|
|
1548
|
+
e?.length && E(e);
|
|
1549
|
+
}), (n, a) => (r(), v(w, null, [S("button", {
|
|
1549
1550
|
ref_key: "dropZoneRef",
|
|
1550
|
-
ref:
|
|
1551
|
+
ref: T,
|
|
1551
1552
|
type: "button",
|
|
1552
1553
|
"data-testid": "media-upload-zone",
|
|
1553
|
-
class:
|
|
1554
|
-
"aria-label":
|
|
1555
|
-
"aria-describedby":
|
|
1556
|
-
"aria-busy":
|
|
1554
|
+
class: i(["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", h(O) ? "tpl-upload-zone-active" : ""]),
|
|
1555
|
+
"aria-label": h(o).mediaLibrary.dropOrClick,
|
|
1556
|
+
"aria-describedby": e.isUploading ? void 0 : "tpl-media-upload-hint",
|
|
1557
|
+
"aria-busy": e.isUploading,
|
|
1557
1558
|
style: {
|
|
1558
1559
|
"border-color": "var(--tpl-border-light)",
|
|
1559
1560
|
"background-color": "var(--tpl-bg)"
|
|
1560
1561
|
},
|
|
1561
|
-
onClick:
|
|
1562
|
-
}, [
|
|
1562
|
+
onClick: a[0] ||= (e) => h(k)()
|
|
1563
|
+
}, [e.isUploading ? (r(), v("div", $t, [f(h(R), {
|
|
1563
1564
|
class: "tpl-spinner",
|
|
1564
1565
|
size: 20,
|
|
1565
1566
|
"stroke-width": 2,
|
|
1566
1567
|
style: { color: "var(--tpl-primary)" }
|
|
1567
|
-
}),
|
|
1568
|
-
current:
|
|
1569
|
-
total:
|
|
1570
|
-
}) :
|
|
1571
|
-
f(
|
|
1568
|
+
}), S("span", en, t(e.uploadProgress && e.uploadProgress.total > 1 ? h(s)(h(o).mediaLibrary.uploadingProgress, {
|
|
1569
|
+
current: e.uploadProgress.current,
|
|
1570
|
+
total: e.uploadProgress.total
|
|
1571
|
+
}) : h(o).mediaLibrary.uploading), 1)])) : (r(), v(w, { key: 1 }, [
|
|
1572
|
+
f(h(L), {
|
|
1572
1573
|
class: "tpl:mb-2",
|
|
1573
1574
|
size: 24,
|
|
1574
1575
|
"stroke-width": 1.5,
|
|
1575
1576
|
style: { color: "var(--tpl-text-dim)" }
|
|
1576
1577
|
}),
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
], 64))], 10, Qt),
|
|
1578
|
+
S("p", tn, t(h(o).mediaLibrary.dropOrClick), 1),
|
|
1579
|
+
S("p", nn, t(x.value), 1)
|
|
1580
|
+
], 64))], 10, Qt), C.value.length ? (r(), v("p", rn, t(h(s)(h(o).mediaLibrary.uploadRejected, { files: C.value.join(", ") })), 1)) : g("", !0)], 64));
|
|
1580
1581
|
}
|
|
1581
1582
|
}), on = ["aria-label"], sn = [
|
|
1582
1583
|
"width",
|
|
@@ -1602,41 +1603,41 @@ var Qt = [
|
|
|
1602
1603
|
"background-color": "var(--tpl-text)",
|
|
1603
1604
|
color: "var(--tpl-bg-elevated)"
|
|
1604
1605
|
}
|
|
1605
|
-
}, dn = /* @__PURE__ */
|
|
1606
|
+
}, dn = /* @__PURE__ */ O({
|
|
1606
1607
|
__name: "StorageProgressRing",
|
|
1607
1608
|
props: {
|
|
1608
1609
|
usedBytes: {},
|
|
1609
1610
|
limitBytes: {},
|
|
1610
1611
|
size: {}
|
|
1611
1612
|
},
|
|
1612
|
-
setup(
|
|
1613
|
-
let n =
|
|
1614
|
-
used:
|
|
1613
|
+
setup(e) {
|
|
1614
|
+
let n = e, { t: i, format: a } = Z(), o = _(!1), s = m(() => n.size ?? 24), l = m(() => Math.max(2, s.value / 8)), u = m(() => (s.value - l.value) / 2), d = m(() => 2 * Math.PI * u.value), p = m(() => n.limitBytes <= 0 ? 0 : Math.min(100, n.usedBytes / n.limitBytes * 100)), h = m(() => d.value - p.value / 100 * d.value), b = m(() => p.value >= 95 ? "var(--tpl-danger)" : p.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), x = m(() => $(n.usedBytes)), C = m(() => $(n.limitBytes)), w = m(() => Math.max(0, n.limitBytes - n.usedBytes)), T = m(() => $(w.value)), E = m(() => a(i.mediaLibrary.storageTooltip, {
|
|
1615
|
+
used: x.value,
|
|
1615
1616
|
total: C.value,
|
|
1616
1617
|
remaining: T.value
|
|
1617
1618
|
}));
|
|
1618
|
-
return (e,
|
|
1619
|
+
return (e, n) => (r(), v("div", {
|
|
1619
1620
|
"data-testid": "media-storage-ring",
|
|
1620
1621
|
class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
|
|
1621
1622
|
tabindex: "0",
|
|
1622
1623
|
"aria-label": E.value,
|
|
1623
|
-
onMouseenter:
|
|
1624
|
-
onMouseleave:
|
|
1625
|
-
onFocus:
|
|
1626
|
-
onBlur:
|
|
1627
|
-
}, [(
|
|
1624
|
+
onMouseenter: n[0] ||= (e) => o.value = !0,
|
|
1625
|
+
onMouseleave: n[1] ||= (e) => o.value = !1,
|
|
1626
|
+
onFocus: n[2] ||= (e) => o.value = !0,
|
|
1627
|
+
onBlur: n[3] ||= (e) => o.value = !1
|
|
1628
|
+
}, [(r(), v("svg", {
|
|
1628
1629
|
width: s.value,
|
|
1629
1630
|
height: s.value,
|
|
1630
1631
|
class: "tpl:-rotate-90",
|
|
1631
1632
|
viewBox: `0 0 ${s.value} ${s.value}`
|
|
1632
|
-
}, [
|
|
1633
|
+
}, [S("circle", {
|
|
1633
1634
|
cx: s.value / 2,
|
|
1634
1635
|
cy: s.value / 2,
|
|
1635
1636
|
r: u.value,
|
|
1636
1637
|
fill: "none",
|
|
1637
1638
|
"stroke-width": l.value,
|
|
1638
1639
|
style: { stroke: "var(--tpl-border)" }
|
|
1639
|
-
}, null, 8, cn),
|
|
1640
|
+
}, null, 8, cn), S("circle", {
|
|
1640
1641
|
cx: s.value / 2,
|
|
1641
1642
|
cy: s.value / 2,
|
|
1642
1643
|
r: u.value,
|
|
@@ -1645,7 +1646,7 @@ var Qt = [
|
|
|
1645
1646
|
stroke: b.value,
|
|
1646
1647
|
"stroke-linecap": "round",
|
|
1647
1648
|
"stroke-dasharray": d.value,
|
|
1648
|
-
"stroke-dashoffset":
|
|
1649
|
+
"stroke-dashoffset": h.value,
|
|
1649
1650
|
class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
|
|
1650
1651
|
}, null, 8, ln)], 8, sn)), f(M, {
|
|
1651
1652
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
@@ -1655,7 +1656,7 @@ var Qt = [
|
|
|
1655
1656
|
"leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
1656
1657
|
"leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
|
|
1657
1658
|
}, {
|
|
1658
|
-
default:
|
|
1659
|
+
default: c(() => [o.value ? (r(), v("div", un, [y(t(E.value) + " ", 1), n[4] ||= S("div", {
|
|
1659
1660
|
class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
|
|
1660
1661
|
style: { "background-color": "var(--tpl-text)" }
|
|
1661
1662
|
}, null, -1)])) : g("", !0)]),
|
|
@@ -1683,41 +1684,41 @@ function pn(t) {
|
|
|
1683
1684
|
function i() {
|
|
1684
1685
|
return "value" in r && typeof r.value == "object" ? r.value : r;
|
|
1685
1686
|
}
|
|
1686
|
-
let a =
|
|
1687
|
+
let a = _("grid"), o = _(!1), s = _(""), c = _(null), l = _(!1), u = _(!1), d = m(() => n.previewItem.value?.url ?? null), f = m(() => n.frequentlyUsedItems.value.length > 0), p = m(() => n.viewMode.value === "frequently-used" ? n.frequentlyUsedItems.value : n.items.value), h = m(() => Object.values(n.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = m(() => fn(n.folders.value)), v = {
|
|
1687
1688
|
images: () => i().mediaLibrary.filterImages,
|
|
1688
1689
|
documents: () => i().mediaLibrary.filterDocuments,
|
|
1689
1690
|
videos: () => i().mediaLibrary.filterVideos,
|
|
1690
1691
|
audio: () => i().mediaLibrary.filterAudio
|
|
1691
1692
|
};
|
|
1692
|
-
function
|
|
1693
|
-
return
|
|
1693
|
+
function y(e) {
|
|
1694
|
+
return v[e]?.() ?? e;
|
|
1694
1695
|
}
|
|
1695
|
-
|
|
1696
|
+
e(o, (e) => {
|
|
1696
1697
|
e && n.loadFolders();
|
|
1697
1698
|
});
|
|
1698
|
-
let
|
|
1699
|
+
let b = ie((e) => {
|
|
1699
1700
|
n.search(e);
|
|
1700
1701
|
}, 300);
|
|
1701
|
-
function
|
|
1702
|
-
s.value = e,
|
|
1702
|
+
function x(e) {
|
|
1703
|
+
s.value = e, b(e);
|
|
1703
1704
|
}
|
|
1704
|
-
let { copy:
|
|
1705
|
+
let { copy: S, copied: C } = ae({
|
|
1705
1706
|
copiedDuring: 2e3,
|
|
1706
1707
|
legacy: !0
|
|
1707
1708
|
});
|
|
1708
|
-
async function
|
|
1709
|
+
async function w(e) {
|
|
1709
1710
|
await n.uploadFiles(e);
|
|
1710
1711
|
}
|
|
1711
|
-
function
|
|
1712
|
+
function T(e) {
|
|
1712
1713
|
n.selectItem(e);
|
|
1713
1714
|
}
|
|
1714
|
-
async function
|
|
1715
|
+
async function E(e, t) {
|
|
1715
1716
|
await n.createFolder(e, t);
|
|
1716
1717
|
}
|
|
1717
|
-
async function
|
|
1718
|
+
async function D(e, t) {
|
|
1718
1719
|
await n.renameFolder(e, t);
|
|
1719
1720
|
}
|
|
1720
|
-
async function
|
|
1721
|
+
async function O(e) {
|
|
1721
1722
|
await n.deleteFolder(e);
|
|
1722
1723
|
}
|
|
1723
1724
|
function k(e) {
|
|
@@ -1732,16 +1733,16 @@ function pn(t) {
|
|
|
1732
1733
|
async function M(e) {
|
|
1733
1734
|
u.value = !1, await n.moveSelected(e);
|
|
1734
1735
|
}
|
|
1735
|
-
async function
|
|
1736
|
+
async function N() {
|
|
1736
1737
|
await n.checkUsageBeforeDelete();
|
|
1737
1738
|
}
|
|
1738
|
-
function
|
|
1739
|
+
function P(e) {
|
|
1739
1740
|
n.checkUsageBeforeReplace(e);
|
|
1740
1741
|
}
|
|
1741
|
-
async function
|
|
1742
|
+
async function F(e) {
|
|
1742
1743
|
await n.replaceFile(e);
|
|
1743
1744
|
}
|
|
1744
|
-
function
|
|
1745
|
+
function I() {
|
|
1745
1746
|
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
1747
|
}
|
|
1747
1748
|
return {
|
|
@@ -1754,392 +1755,392 @@ function pn(t) {
|
|
|
1754
1755
|
selectedUrl: d,
|
|
1755
1756
|
hasFrequentlyUsed: f,
|
|
1756
1757
|
displayItems: p,
|
|
1757
|
-
hasUsedFiles:
|
|
1758
|
+
hasUsedFiles: h,
|
|
1758
1759
|
folderTree: g,
|
|
1759
|
-
copy:
|
|
1760
|
-
copied:
|
|
1761
|
-
getCategoryLabel:
|
|
1762
|
-
handleSearchInput:
|
|
1763
|
-
handleUpload:
|
|
1764
|
-
handleSelect:
|
|
1765
|
-
handleCreateFolder:
|
|
1766
|
-
handleRenameFolder:
|
|
1767
|
-
handleDeleteFolder:
|
|
1760
|
+
copy: S,
|
|
1761
|
+
copied: C,
|
|
1762
|
+
getCategoryLabel: y,
|
|
1763
|
+
handleSearchInput: x,
|
|
1764
|
+
handleUpload: w,
|
|
1765
|
+
handleSelect: T,
|
|
1766
|
+
handleCreateFolder: E,
|
|
1767
|
+
handleRenameFolder: D,
|
|
1768
|
+
handleDeleteFolder: O,
|
|
1768
1769
|
handleEditItem: k,
|
|
1769
1770
|
handleEditSave: A,
|
|
1770
1771
|
handleImportFromUrl: j,
|
|
1771
1772
|
handleMoveToFolder: M,
|
|
1772
|
-
handleDeleteClick:
|
|
1773
|
-
handleReplaceItem:
|
|
1774
|
-
handleReplaceFile:
|
|
1775
|
-
resetUI:
|
|
1773
|
+
handleDeleteClick: N,
|
|
1774
|
+
handleReplaceItem: P,
|
|
1775
|
+
handleReplaceFile: F,
|
|
1776
|
+
resetUI: I
|
|
1776
1777
|
};
|
|
1777
1778
|
}
|
|
1778
1779
|
// ../media-library/src/composable.ts
|
|
1779
|
-
function mn(
|
|
1780
|
-
let { provider:
|
|
1781
|
-
function j(
|
|
1780
|
+
function mn(e) {
|
|
1781
|
+
let { provider: t } = e, n = _([]), r = _([]), i = _(null), a = _("files"), o = _(""), s = _(null), c = _("newest"), l = _(!1), u = _(!1), d = _(!1), f = _(null), p = _(null), m = _(/* @__PURE__ */ new Set()), h = _(null), g = _([]), v = _({}), y = _(!1), b = _([]), x = _(!1), S = _(null), w = _(!1), T = _(null), E = _(!1), D = _(null), O = _(null), k = _(null), A = 0;
|
|
1782
|
+
function j(t) {
|
|
1782
1783
|
try {
|
|
1783
|
-
|
|
1784
|
-
} catch (
|
|
1785
|
-
|
|
1784
|
+
t();
|
|
1785
|
+
} catch (t) {
|
|
1786
|
+
e.onError?.(t);
|
|
1786
1787
|
}
|
|
1787
1788
|
}
|
|
1788
1789
|
function M() {
|
|
1789
|
-
return
|
|
1790
|
+
return t.folders === !1 ? null : t.folders;
|
|
1790
1791
|
}
|
|
1791
1792
|
function N() {
|
|
1792
|
-
return
|
|
1793
|
+
return C(e.templateId);
|
|
1793
1794
|
}
|
|
1794
1795
|
function P(e) {
|
|
1795
1796
|
let t = {};
|
|
1796
|
-
|
|
1797
|
+
o.value ? t.search = o.value : i.value != null && (t.folderId = i.value), s.value && (t.category = s.value), e && (t.cursor = e);
|
|
1797
1798
|
let n = N();
|
|
1798
1799
|
return n && (t.templateId = n), t;
|
|
1799
1800
|
}
|
|
1800
1801
|
async function F() {
|
|
1801
|
-
let
|
|
1802
|
-
|
|
1802
|
+
let r = ++A;
|
|
1803
|
+
l.value = !0;
|
|
1803
1804
|
let i = P();
|
|
1804
1805
|
try {
|
|
1805
|
-
let
|
|
1806
|
-
if (
|
|
1807
|
-
|
|
1808
|
-
} catch (
|
|
1809
|
-
if (
|
|
1810
|
-
|
|
1806
|
+
let e = await t.list(i);
|
|
1807
|
+
if (r !== A) return;
|
|
1808
|
+
n.value = e.items, f.value = e.nextCursor ?? null, d.value = !!e.nextCursor;
|
|
1809
|
+
} catch (t) {
|
|
1810
|
+
if (r !== A) return;
|
|
1811
|
+
e.onError?.(t);
|
|
1811
1812
|
} finally {
|
|
1812
|
-
|
|
1813
|
+
r === A && (l.value = !1);
|
|
1813
1814
|
}
|
|
1814
1815
|
}
|
|
1815
1816
|
async function I() {
|
|
1816
|
-
if (!
|
|
1817
|
-
let
|
|
1818
|
-
|
|
1819
|
-
let i = P(
|
|
1817
|
+
if (!d.value || !f.value || l.value) return;
|
|
1818
|
+
let r = ++A;
|
|
1819
|
+
l.value = !0;
|
|
1820
|
+
let i = P(f.value);
|
|
1820
1821
|
try {
|
|
1821
|
-
let
|
|
1822
|
-
if (
|
|
1823
|
-
|
|
1824
|
-
} catch (
|
|
1825
|
-
if (
|
|
1826
|
-
|
|
1822
|
+
let e = await t.list(i);
|
|
1823
|
+
if (r !== A) return;
|
|
1824
|
+
n.value = [...n.value, ...e.items], f.value = e.nextCursor ?? null, d.value = !!e.nextCursor;
|
|
1825
|
+
} catch (t) {
|
|
1826
|
+
if (r !== A) return;
|
|
1827
|
+
e.onError?.(t);
|
|
1827
1828
|
} finally {
|
|
1828
|
-
|
|
1829
|
+
r === A && (l.value = !1);
|
|
1829
1830
|
}
|
|
1830
1831
|
}
|
|
1832
|
+
async function ee(e) {
|
|
1833
|
+
o.value = e, await F();
|
|
1834
|
+
}
|
|
1831
1835
|
async function L(e) {
|
|
1832
1836
|
s.value = e, await F();
|
|
1833
1837
|
}
|
|
1834
|
-
async function
|
|
1838
|
+
async function te(e) {
|
|
1835
1839
|
c.value = e, await F();
|
|
1836
1840
|
}
|
|
1837
|
-
async function
|
|
1838
|
-
|
|
1839
|
-
}
|
|
1840
|
-
async function B(e) {
|
|
1841
|
-
o.value = "files", a.value = e, s.value = "", g.value = /* @__PURE__ */ new Set(), _.value = null, await F();
|
|
1841
|
+
async function ne(e) {
|
|
1842
|
+
a.value = "files", i.value = e, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await F();
|
|
1842
1843
|
}
|
|
1843
|
-
async function
|
|
1844
|
-
|
|
1844
|
+
async function R() {
|
|
1845
|
+
a.value = "frequently-used", i.value = null, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await W();
|
|
1845
1846
|
}
|
|
1846
|
-
async function
|
|
1847
|
-
let { create:
|
|
1848
|
-
if (typeof
|
|
1849
|
-
|
|
1847
|
+
async function z(r) {
|
|
1848
|
+
let { create: a } = t;
|
|
1849
|
+
if (typeof a != "function") return null;
|
|
1850
|
+
u.value = !0;
|
|
1850
1851
|
try {
|
|
1851
|
-
let
|
|
1852
|
-
|
|
1852
|
+
let e = { file: r };
|
|
1853
|
+
i.value != null && (e.folderId = i.value);
|
|
1853
1854
|
let o = N();
|
|
1854
|
-
o && (
|
|
1855
|
-
let s = await
|
|
1856
|
-
return
|
|
1857
|
-
} catch (
|
|
1858
|
-
return
|
|
1855
|
+
o && (e.templateId = o);
|
|
1856
|
+
let s = await a(e);
|
|
1857
|
+
return n.value = [s, ...n.value], j(() => t.onCreated?.(s)), s;
|
|
1858
|
+
} catch (t) {
|
|
1859
|
+
return e.onError?.(t), null;
|
|
1859
1860
|
} finally {
|
|
1860
|
-
|
|
1861
|
+
u.value = !1;
|
|
1861
1862
|
}
|
|
1862
1863
|
}
|
|
1863
|
-
async function
|
|
1864
|
-
let { create:
|
|
1865
|
-
if (typeof
|
|
1866
|
-
|
|
1864
|
+
async function B(r) {
|
|
1865
|
+
let { create: a } = t;
|
|
1866
|
+
if (typeof a == "function") {
|
|
1867
|
+
u.value = !0, p.value = {
|
|
1867
1868
|
current: 0,
|
|
1868
|
-
total:
|
|
1869
|
+
total: r.length
|
|
1869
1870
|
};
|
|
1870
1871
|
try {
|
|
1871
|
-
for (let o = 0; o <
|
|
1872
|
-
|
|
1872
|
+
for (let o = 0; o < r.length; o++) {
|
|
1873
|
+
p.value = {
|
|
1873
1874
|
current: o + 1,
|
|
1874
|
-
total:
|
|
1875
|
+
total: r.length
|
|
1875
1876
|
};
|
|
1876
1877
|
try {
|
|
1877
|
-
let
|
|
1878
|
-
|
|
1878
|
+
let e = { file: r[o] };
|
|
1879
|
+
i.value != null && (e.folderId = i.value);
|
|
1879
1880
|
let s = N();
|
|
1880
|
-
s && (
|
|
1881
|
-
let c = await
|
|
1882
|
-
|
|
1883
|
-
} catch (
|
|
1884
|
-
|
|
1881
|
+
s && (e.templateId = s);
|
|
1882
|
+
let c = await a(e);
|
|
1883
|
+
n.value = [c, ...n.value], j(() => t.onCreated?.(c));
|
|
1884
|
+
} catch (t) {
|
|
1885
|
+
e.onError?.(t);
|
|
1885
1886
|
}
|
|
1886
1887
|
}
|
|
1887
1888
|
} finally {
|
|
1888
|
-
|
|
1889
|
+
u.value = !1, p.value = null;
|
|
1889
1890
|
}
|
|
1890
1891
|
}
|
|
1891
1892
|
}
|
|
1892
|
-
async function
|
|
1893
|
-
if (
|
|
1894
|
-
let { move:
|
|
1895
|
-
if (typeof
|
|
1896
|
-
let
|
|
1897
|
-
if (
|
|
1898
|
-
let
|
|
1899
|
-
|
|
1900
|
-
} else
|
|
1901
|
-
|
|
1902
|
-
} catch (
|
|
1903
|
-
|
|
1893
|
+
async function V(t) {
|
|
1894
|
+
if (m.value.size === 0) return;
|
|
1895
|
+
let { move: r } = M() ?? { move: !1 };
|
|
1896
|
+
if (typeof r == "function") try {
|
|
1897
|
+
let e = await r([...m.value], t);
|
|
1898
|
+
if (i.value === null) {
|
|
1899
|
+
let t = new Map(e.map((e) => [e.id, e]));
|
|
1900
|
+
n.value = n.value.map((e) => t.get(e.id) ?? e);
|
|
1901
|
+
} else n.value = n.value.filter((e) => !m.value.has(e.id));
|
|
1902
|
+
m.value = /* @__PURE__ */ new Set(), h.value = null;
|
|
1903
|
+
} catch (t) {
|
|
1904
|
+
e.onError?.(t);
|
|
1904
1905
|
}
|
|
1905
1906
|
}
|
|
1906
|
-
async function re(
|
|
1907
|
-
let { update: o } =
|
|
1907
|
+
async function re(r, i, a) {
|
|
1908
|
+
let { update: o } = t;
|
|
1908
1909
|
if (typeof o != "function") return !1;
|
|
1909
1910
|
try {
|
|
1910
|
-
let
|
|
1911
|
-
a !== void 0 && (
|
|
1912
|
-
let s = await o(
|
|
1913
|
-
return
|
|
1914
|
-
} catch (
|
|
1915
|
-
return
|
|
1911
|
+
let e = { filename: i };
|
|
1912
|
+
a !== void 0 && (e.alt = a);
|
|
1913
|
+
let s = await o(r, e);
|
|
1914
|
+
return n.value = n.value.map((e) => e.id === r ? s : e), h.value?.id === r && (h.value = s), j(() => t.onUpdated?.(s)), !0;
|
|
1915
|
+
} catch (t) {
|
|
1916
|
+
return e.onError?.(t), !1;
|
|
1916
1917
|
}
|
|
1917
1918
|
}
|
|
1918
|
-
function
|
|
1919
|
+
function H(e) {
|
|
1919
1920
|
let t = /* @__PURE__ */ new Map();
|
|
1920
|
-
for (let
|
|
1921
|
-
for (let n of
|
|
1921
|
+
for (let r of n.value) e.includes(r.id) && t.set(r.id, r);
|
|
1922
|
+
for (let n of g.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
|
|
1922
1923
|
return [...t.values()];
|
|
1923
1924
|
}
|
|
1924
|
-
function
|
|
1925
|
-
|
|
1925
|
+
function U(e) {
|
|
1926
|
+
n.value = n.value.filter((t) => !e.includes(t.id)), g.value = g.value.filter((t) => !e.includes(t.id)), m.value = /* @__PURE__ */ new Set(), h.value = null;
|
|
1926
1927
|
}
|
|
1927
|
-
async function
|
|
1928
|
-
if (
|
|
1929
|
-
let { delete:
|
|
1930
|
-
if (typeof
|
|
1931
|
-
let r = [...
|
|
1928
|
+
async function ie() {
|
|
1929
|
+
if (m.value.size === 0) return;
|
|
1930
|
+
let { delete: n } = t;
|
|
1931
|
+
if (typeof n != "function") return;
|
|
1932
|
+
let r = [...m.value], i = H(r);
|
|
1932
1933
|
try {
|
|
1933
|
-
await
|
|
1934
|
-
for (let e of i) j(() =>
|
|
1935
|
-
} catch (
|
|
1936
|
-
|
|
1934
|
+
await n(r), U(r);
|
|
1935
|
+
for (let e of i) j(() => t.onDeleted?.(e));
|
|
1936
|
+
} catch (t) {
|
|
1937
|
+
e.onError?.(t);
|
|
1937
1938
|
}
|
|
1938
1939
|
}
|
|
1939
1940
|
async function W() {
|
|
1940
|
-
let { frequentlyUsed:
|
|
1941
|
-
if (typeof
|
|
1942
|
-
|
|
1943
|
-
} catch (
|
|
1944
|
-
|
|
1941
|
+
let { frequentlyUsed: n } = t;
|
|
1942
|
+
if (typeof n == "function") try {
|
|
1943
|
+
g.value = await n();
|
|
1944
|
+
} catch (t) {
|
|
1945
|
+
e.onError?.(t);
|
|
1945
1946
|
}
|
|
1946
1947
|
}
|
|
1947
|
-
async function
|
|
1948
|
-
if (
|
|
1949
|
-
|
|
1950
|
-
let { checkUsage:
|
|
1951
|
-
if (typeof
|
|
1948
|
+
async function ae() {
|
|
1949
|
+
if (m.value.size === 0) return !1;
|
|
1950
|
+
b.value = [...m.value];
|
|
1951
|
+
let { checkUsage: n } = t;
|
|
1952
|
+
if (typeof n != "function") return v.value = {}, y.value = !0, !1;
|
|
1952
1953
|
try {
|
|
1953
|
-
let
|
|
1954
|
-
|
|
1955
|
-
let
|
|
1956
|
-
return
|
|
1957
|
-
} catch (
|
|
1958
|
-
return
|
|
1954
|
+
let e = await n(b.value);
|
|
1955
|
+
v.value = e;
|
|
1956
|
+
let t = Object.values(e).some((e) => e.templateCount > 0);
|
|
1957
|
+
return y.value = !0, t;
|
|
1958
|
+
} catch (t) {
|
|
1959
|
+
return e.onError?.(t), !1;
|
|
1959
1960
|
}
|
|
1960
1961
|
}
|
|
1961
|
-
async function
|
|
1962
|
-
let { delete:
|
|
1963
|
-
if (typeof
|
|
1964
|
-
let r =
|
|
1962
|
+
async function oe() {
|
|
1963
|
+
let { delete: n } = t;
|
|
1964
|
+
if (typeof n != "function" || (y.value = !1, b.value.length === 0)) return;
|
|
1965
|
+
let r = b.value, i = H(r);
|
|
1965
1966
|
try {
|
|
1966
|
-
await
|
|
1967
|
-
for (let e of i) j(() =>
|
|
1968
|
-
} catch (
|
|
1969
|
-
|
|
1967
|
+
await n(r), U(r), b.value = [], v.value = {};
|
|
1968
|
+
for (let e of i) j(() => t.onDeleted?.(e));
|
|
1969
|
+
} catch (t) {
|
|
1970
|
+
e.onError?.(t);
|
|
1970
1971
|
}
|
|
1971
1972
|
}
|
|
1972
|
-
function
|
|
1973
|
-
|
|
1973
|
+
function se() {
|
|
1974
|
+
y.value = !1, b.value = [], v.value = {};
|
|
1974
1975
|
}
|
|
1975
|
-
async function
|
|
1976
|
-
let
|
|
1977
|
-
if (typeof
|
|
1978
|
-
|
|
1976
|
+
async function ce(r) {
|
|
1977
|
+
let a = t.importFromUrl;
|
|
1978
|
+
if (typeof a != "function") return null;
|
|
1979
|
+
x.value = !0, S.value = null;
|
|
1979
1980
|
try {
|
|
1980
|
-
let
|
|
1981
|
-
return
|
|
1982
|
-
} catch (
|
|
1983
|
-
return
|
|
1981
|
+
let e = await a(r, i.value, N());
|
|
1982
|
+
return n.value = [e, ...n.value], j(() => t.onCreated?.(e)), e;
|
|
1983
|
+
} catch (t) {
|
|
1984
|
+
return S.value = t instanceof Error ? t.message : "Import failed", e.onError?.(t), null;
|
|
1984
1985
|
} finally {
|
|
1985
|
-
|
|
1986
|
+
x.value = !1;
|
|
1986
1987
|
}
|
|
1987
1988
|
}
|
|
1988
|
-
function
|
|
1989
|
-
let t = new Set(
|
|
1990
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
1989
|
+
function le(e) {
|
|
1990
|
+
let t = new Set(m.value);
|
|
1991
|
+
t.has(e) ? t.delete(e) : t.add(e), m.value = t;
|
|
1991
1992
|
}
|
|
1992
|
-
function
|
|
1993
|
-
|
|
1993
|
+
function G() {
|
|
1994
|
+
m.value = /* @__PURE__ */ new Set(), h.value = null;
|
|
1994
1995
|
}
|
|
1995
|
-
function
|
|
1996
|
-
|
|
1996
|
+
function K(e) {
|
|
1997
|
+
h.value = e, m.value = /* @__PURE__ */ new Set([e.id]);
|
|
1997
1998
|
}
|
|
1998
|
-
async function
|
|
1999
|
-
let { storage:
|
|
2000
|
-
if (typeof
|
|
1999
|
+
async function ue() {
|
|
2000
|
+
let { storage: n } = t;
|
|
2001
|
+
if (typeof n != "function") k.value = null;
|
|
2001
2002
|
else try {
|
|
2002
|
-
k.value = await
|
|
2003
|
-
} catch (
|
|
2004
|
-
|
|
2003
|
+
k.value = await n();
|
|
2004
|
+
} catch (t) {
|
|
2005
|
+
e.onError?.(t);
|
|
2005
2006
|
}
|
|
2006
2007
|
}
|
|
2007
|
-
async function
|
|
2008
|
-
let
|
|
2009
|
-
if (
|
|
2010
|
-
|
|
2011
|
-
} catch (
|
|
2012
|
-
|
|
2008
|
+
async function q() {
|
|
2009
|
+
let t = M();
|
|
2010
|
+
if (t) try {
|
|
2011
|
+
r.value = await t.list();
|
|
2012
|
+
} catch (t) {
|
|
2013
|
+
e.onError?.(t);
|
|
2013
2014
|
}
|
|
2014
2015
|
}
|
|
2015
|
-
async function
|
|
2016
|
+
async function de(t, n) {
|
|
2016
2017
|
let { create: r } = M() ?? { create: !1 };
|
|
2017
2018
|
if (typeof r != "function") return null;
|
|
2018
2019
|
try {
|
|
2019
|
-
let
|
|
2020
|
-
n !== void 0 && (
|
|
2021
|
-
let i = await r(
|
|
2022
|
-
return await
|
|
2023
|
-
} catch (
|
|
2024
|
-
return
|
|
2020
|
+
let e = { name: t };
|
|
2021
|
+
n !== void 0 && (e.parentId = n);
|
|
2022
|
+
let i = await r(e);
|
|
2023
|
+
return await q(), i;
|
|
2024
|
+
} catch (t) {
|
|
2025
|
+
return e.onError?.(t), null;
|
|
2025
2026
|
}
|
|
2026
2027
|
}
|
|
2027
|
-
function
|
|
2028
|
+
function fe(e, t) {
|
|
2028
2029
|
for (let n of e) if (n.id === t) return n;
|
|
2029
2030
|
return null;
|
|
2030
2031
|
}
|
|
2031
|
-
async function
|
|
2032
|
+
async function J(t, n) {
|
|
2032
2033
|
let { update: r } = M() ?? { update: !1 };
|
|
2033
2034
|
if (typeof r == "function") try {
|
|
2034
|
-
await r(
|
|
2035
|
-
} catch (
|
|
2036
|
-
|
|
2035
|
+
await r(t, { name: n }), await q();
|
|
2036
|
+
} catch (t) {
|
|
2037
|
+
e.onError?.(t);
|
|
2037
2038
|
}
|
|
2038
2039
|
}
|
|
2039
|
-
async function
|
|
2040
|
+
async function pe(t) {
|
|
2040
2041
|
let { delete: n } = M() ?? { delete: !1 };
|
|
2041
2042
|
if (typeof n == "function") try {
|
|
2042
|
-
let
|
|
2043
|
-
await n(
|
|
2044
|
-
} catch (
|
|
2045
|
-
|
|
2043
|
+
let e = fe(r.value, t)?.parentId ?? null;
|
|
2044
|
+
await n(t), i.value === t && (i.value = e), await q(), await F();
|
|
2045
|
+
} catch (t) {
|
|
2046
|
+
e.onError?.(t);
|
|
2046
2047
|
}
|
|
2047
2048
|
}
|
|
2048
|
-
async function
|
|
2049
|
-
D.value =
|
|
2050
|
-
let { checkUsage: r } =
|
|
2049
|
+
async function Y(n) {
|
|
2050
|
+
D.value = n, T.value = null;
|
|
2051
|
+
let { checkUsage: r } = t;
|
|
2051
2052
|
if (typeof r != "function") O.value = null, E.value = !0;
|
|
2052
2053
|
else try {
|
|
2053
|
-
let
|
|
2054
|
-
O.value =
|
|
2055
|
-
} catch (
|
|
2056
|
-
|
|
2054
|
+
let e = await r([n.id]);
|
|
2055
|
+
O.value = e[n.id] ?? null, E.value = !0;
|
|
2056
|
+
} catch (t) {
|
|
2057
|
+
e.onError?.(t);
|
|
2057
2058
|
}
|
|
2058
2059
|
}
|
|
2059
|
-
function
|
|
2060
|
+
function X() {
|
|
2060
2061
|
E.value = !1, D.value = null, O.value = null, T.value = null;
|
|
2061
2062
|
}
|
|
2062
|
-
function
|
|
2063
|
-
|
|
2063
|
+
function me(e) {
|
|
2064
|
+
n.value = n.value.map((t) => t.id === e.id ? e : t), g.value = g.value.map((t) => t.id === e.id ? e : t), h.value?.id === e.id && (h.value = e), j(() => t.onUpdated?.(e));
|
|
2064
2065
|
}
|
|
2065
|
-
async function
|
|
2066
|
-
let { replace: r } =
|
|
2066
|
+
async function Z(n) {
|
|
2067
|
+
let { replace: r } = t;
|
|
2067
2068
|
if (typeof r != "function" || !D.value) return null;
|
|
2068
2069
|
w.value = !0, T.value = null;
|
|
2069
2070
|
try {
|
|
2070
|
-
let
|
|
2071
|
-
return
|
|
2072
|
-
} catch (
|
|
2073
|
-
return T.value =
|
|
2071
|
+
let e = await r(D.value.id, n);
|
|
2072
|
+
return me(e), E.value = !1, D.value = null, O.value = null, e;
|
|
2073
|
+
} catch (t) {
|
|
2074
|
+
return T.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
|
|
2074
2075
|
} finally {
|
|
2075
2076
|
w.value = !1;
|
|
2076
2077
|
}
|
|
2077
2078
|
}
|
|
2078
|
-
async function
|
|
2079
|
-
let { replace: i } =
|
|
2079
|
+
async function he(n, r) {
|
|
2080
|
+
let { replace: i } = t;
|
|
2080
2081
|
if (typeof i != "function") return null;
|
|
2081
2082
|
try {
|
|
2082
|
-
let
|
|
2083
|
-
return
|
|
2084
|
-
} catch (
|
|
2085
|
-
return
|
|
2083
|
+
let e = await i(n, r);
|
|
2084
|
+
return me(e), e;
|
|
2085
|
+
} catch (t) {
|
|
2086
|
+
return e.onError?.(t), null;
|
|
2086
2087
|
}
|
|
2087
2088
|
}
|
|
2088
2089
|
return {
|
|
2089
|
-
items:
|
|
2090
|
-
folders:
|
|
2091
|
-
currentFolderId:
|
|
2092
|
-
viewMode:
|
|
2093
|
-
searchQuery:
|
|
2094
|
-
categoryFilter:
|
|
2095
|
-
sortOption:
|
|
2096
|
-
isLoading:
|
|
2097
|
-
isUploading:
|
|
2098
|
-
uploadProgress:
|
|
2099
|
-
hasMore:
|
|
2100
|
-
selectedItems:
|
|
2101
|
-
previewItem:
|
|
2102
|
-
frequentlyUsedItems:
|
|
2103
|
-
deleteUsageInfo:
|
|
2104
|
-
showDeleteWarning:
|
|
2090
|
+
items: n,
|
|
2091
|
+
folders: r,
|
|
2092
|
+
currentFolderId: i,
|
|
2093
|
+
viewMode: a,
|
|
2094
|
+
searchQuery: o,
|
|
2095
|
+
categoryFilter: s,
|
|
2096
|
+
sortOption: c,
|
|
2097
|
+
isLoading: l,
|
|
2098
|
+
isUploading: u,
|
|
2099
|
+
uploadProgress: p,
|
|
2100
|
+
hasMore: d,
|
|
2101
|
+
selectedItems: m,
|
|
2102
|
+
previewItem: h,
|
|
2103
|
+
frequentlyUsedItems: g,
|
|
2104
|
+
deleteUsageInfo: v,
|
|
2105
|
+
showDeleteWarning: y,
|
|
2105
2106
|
loadItems: F,
|
|
2106
2107
|
loadMore: I,
|
|
2107
|
-
search:
|
|
2108
|
-
filterByCategory:
|
|
2109
|
-
sortBy:
|
|
2110
|
-
navigateToFolder:
|
|
2111
|
-
showFrequentlyUsed:
|
|
2112
|
-
uploadFile:
|
|
2113
|
-
uploadFiles:
|
|
2114
|
-
moveSelected:
|
|
2108
|
+
search: ee,
|
|
2109
|
+
filterByCategory: L,
|
|
2110
|
+
sortBy: te,
|
|
2111
|
+
navigateToFolder: ne,
|
|
2112
|
+
showFrequentlyUsed: R,
|
|
2113
|
+
uploadFile: z,
|
|
2114
|
+
uploadFiles: B,
|
|
2115
|
+
moveSelected: V,
|
|
2115
2116
|
updateFile: re,
|
|
2116
|
-
deleteSelected:
|
|
2117
|
-
isImportingFromUrl:
|
|
2118
|
-
importFromUrlError:
|
|
2119
|
-
importFromUrl:
|
|
2120
|
-
toggleSelection:
|
|
2121
|
-
clearSelection:
|
|
2122
|
-
selectItem:
|
|
2123
|
-
loadFolders:
|
|
2124
|
-
createFolder:
|
|
2125
|
-
renameFolder:
|
|
2126
|
-
deleteFolder:
|
|
2127
|
-
findFolderInTree:
|
|
2117
|
+
deleteSelected: ie,
|
|
2118
|
+
isImportingFromUrl: x,
|
|
2119
|
+
importFromUrlError: S,
|
|
2120
|
+
importFromUrl: ce,
|
|
2121
|
+
toggleSelection: le,
|
|
2122
|
+
clearSelection: G,
|
|
2123
|
+
selectItem: K,
|
|
2124
|
+
loadFolders: q,
|
|
2125
|
+
createFolder: de,
|
|
2126
|
+
renameFolder: J,
|
|
2127
|
+
deleteFolder: pe,
|
|
2128
|
+
findFolderInTree: fe,
|
|
2128
2129
|
loadFrequentlyUsed: W,
|
|
2129
|
-
checkUsageBeforeDelete:
|
|
2130
|
-
confirmDelete:
|
|
2131
|
-
cancelDelete:
|
|
2130
|
+
checkUsageBeforeDelete: ae,
|
|
2131
|
+
confirmDelete: oe,
|
|
2132
|
+
cancelDelete: se,
|
|
2132
2133
|
isReplacing: w,
|
|
2133
2134
|
replaceError: T,
|
|
2134
2135
|
showReplaceWarning: E,
|
|
2135
2136
|
pendingReplaceItem: D,
|
|
2136
2137
|
replaceUsageInfo: O,
|
|
2137
|
-
checkUsageBeforeReplace:
|
|
2138
|
-
cancelReplace:
|
|
2139
|
-
replaceFile:
|
|
2140
|
-
replaceMediaDirectly:
|
|
2138
|
+
checkUsageBeforeReplace: Y,
|
|
2139
|
+
cancelReplace: X,
|
|
2140
|
+
replaceFile: Z,
|
|
2141
|
+
replaceMediaDirectly: he,
|
|
2141
2142
|
storageInfo: k,
|
|
2142
|
-
loadStorage:
|
|
2143
|
+
loadStorage: ue
|
|
2143
2144
|
};
|
|
2144
2145
|
}
|
|
2145
2146
|
// ../media-library/src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -2218,7 +2219,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2218
2219
|
}, Yn = {
|
|
2219
2220
|
key: 1,
|
|
2220
2221
|
class: "tpl:relative"
|
|
2221
|
-
}, Xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Zn = ["data-testid", "disabled"], Qn = /* @__PURE__ */
|
|
2222
|
+
}, Xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Zn = ["data-testid", "disabled"], Qn = /* @__PURE__ */ O({
|
|
2222
2223
|
__name: "MediaLibraryChrome",
|
|
2223
2224
|
props: {
|
|
2224
2225
|
provider: {},
|
|
@@ -2235,111 +2236,111 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2235
2236
|
"confirm",
|
|
2236
2237
|
"ready"
|
|
2237
2238
|
],
|
|
2238
|
-
setup(
|
|
2239
|
-
let
|
|
2239
|
+
setup(n, { expose: l, emit: u }) {
|
|
2240
|
+
let d = n, p = u, _ = E(() => import("./MediaEditModal-LnG-cF_S.js")), b = m(() => d.translations), C = m(() => d.confirmTestId ?? "media-confirm"), D = {
|
|
2240
2241
|
get maxFileSize() {
|
|
2241
|
-
return
|
|
2242
|
+
return d.provider.maxFileSize;
|
|
2242
2243
|
},
|
|
2243
2244
|
get mimeTypes() {
|
|
2244
|
-
return
|
|
2245
|
+
return d.provider.mimeTypes;
|
|
2245
2246
|
},
|
|
2246
2247
|
get accept() {
|
|
2247
|
-
return
|
|
2248
|
+
return d.accept;
|
|
2248
2249
|
}
|
|
2249
2250
|
};
|
|
2250
|
-
a(
|
|
2251
|
-
let { isAcceptedMimeType:
|
|
2252
|
-
provider:
|
|
2253
|
-
templateId: () =>
|
|
2254
|
-
onError: (e) =>
|
|
2251
|
+
a(fe, D);
|
|
2252
|
+
let { isAcceptedMimeType: O, availableCategories: k } = Q(D), j = mn({
|
|
2253
|
+
provider: d.provider,
|
|
2254
|
+
templateId: () => d.templateId,
|
|
2255
|
+
onError: (e) => d.onError?.(e)
|
|
2255
2256
|
}), N = pn({
|
|
2256
2257
|
library: j,
|
|
2257
|
-
translations:
|
|
2258
|
-
}), P =
|
|
2259
|
-
let e =
|
|
2258
|
+
translations: b
|
|
2259
|
+
}), P = m(() => typeof d.provider.create == "function"), I = m(() => d.provider.folders !== !1), L = m(() => typeof d.provider.importFromUrl == "function"), R = m(() => typeof d.provider.delete == "function"), z = m(() => typeof d.provider.update == "function"), B = m(() => typeof d.provider.replace == "function"), V = m(() => typeof d.provider.frequentlyUsed == "function"), H = m(() => {
|
|
2260
|
+
let e = d.provider.folders;
|
|
2260
2261
|
return e !== !1 && typeof e.move == "function";
|
|
2261
|
-
}),
|
|
2262
|
-
let e =
|
|
2262
|
+
}), ie = m(() => {
|
|
2263
|
+
let e = d.provider.folders;
|
|
2263
2264
|
return e !== !1 && typeof e.create == "function";
|
|
2264
|
-
}),
|
|
2265
|
-
let e =
|
|
2265
|
+
}), W = m(() => {
|
|
2266
|
+
let e = d.provider.folders;
|
|
2266
2267
|
return e !== !1 && typeof e.update == "function";
|
|
2267
|
-
}),
|
|
2268
|
-
let e =
|
|
2268
|
+
}), ae = m(() => {
|
|
2269
|
+
let e = d.provider.folders;
|
|
2269
2270
|
return e !== !1 && typeof e.delete == "function";
|
|
2270
|
-
}),
|
|
2271
|
+
}), oe = m(() => j.isLoading.value && N.displayItems.value.length === 0), se = m(() => {
|
|
2271
2272
|
let e = j.previewItem.value;
|
|
2272
|
-
return e ? !
|
|
2273
|
-
}),
|
|
2274
|
-
if (!
|
|
2273
|
+
return e ? !d.accept?.length || O(e.mimeType ?? "", d.accept) : !1;
|
|
2274
|
+
}), ce = m(() => {
|
|
2275
|
+
if (!R.value) return 0;
|
|
2275
2276
|
let e = 0;
|
|
2276
2277
|
for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
|
|
2277
2278
|
return e;
|
|
2278
|
-
}),
|
|
2279
|
-
function
|
|
2280
|
-
return
|
|
2279
|
+
}), le = m(() => N.showImportUrlModal.value || N.editingItem.value !== null || j.showReplaceWarning.value);
|
|
2280
|
+
function G() {
|
|
2281
|
+
return le.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : j.showDeleteWarning.value ? (j.cancelDelete(), !0) : !1;
|
|
2281
2282
|
}
|
|
2282
|
-
function
|
|
2283
|
-
|
|
2283
|
+
function K() {
|
|
2284
|
+
se.value && j.previewItem.value && p("confirm", j.previewItem.value);
|
|
2284
2285
|
}
|
|
2285
|
-
function
|
|
2286
|
+
function de(e) {
|
|
2286
2287
|
let t = e.target.value;
|
|
2287
2288
|
j.filterByCategory(t || null);
|
|
2288
2289
|
}
|
|
2289
|
-
async function
|
|
2290
|
+
async function J() {
|
|
2290
2291
|
let e = /* @__PURE__ */ new Set();
|
|
2291
2292
|
for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
|
|
2292
2293
|
j.selectedItems.value = e, await N.handleDeleteClick();
|
|
2293
2294
|
}
|
|
2294
|
-
return
|
|
2295
|
+
return e(() => d.accept, (e) => {
|
|
2295
2296
|
e?.length === 1 && (j.categoryFilter.value = e[0]);
|
|
2296
|
-
}, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(),
|
|
2297
|
+
}, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), p("ready"), x(() => {
|
|
2297
2298
|
N.resetUI();
|
|
2298
|
-
}),
|
|
2299
|
-
nestedDialogOpen:
|
|
2300
|
-
handleEscape:
|
|
2299
|
+
}), l({
|
|
2300
|
+
nestedDialogOpen: le,
|
|
2301
|
+
handleEscape: G,
|
|
2301
2302
|
library: j,
|
|
2302
2303
|
ui: N
|
|
2303
|
-
}), (
|
|
2304
|
-
|
|
2305
|
-
|
|
2304
|
+
}), (e, a) => (r(), v("div", hn, [
|
|
2305
|
+
S("div", gn, [S("h2", _n, t(b.value.mediaLibrary.title), 1), S("div", vn, [
|
|
2306
|
+
h(j).storageInfo.value ? (r(), T(dn, {
|
|
2306
2307
|
key: 0,
|
|
2307
|
-
"used-bytes":
|
|
2308
|
-
"limit-bytes":
|
|
2308
|
+
"used-bytes": h(j).storageInfo.value.usedBytes,
|
|
2309
|
+
"limit-bytes": h(j).storageInfo.value.limitBytes,
|
|
2309
2310
|
size: 22
|
|
2310
2311
|
}, null, 8, ["used-bytes", "limit-bytes"])) : g("", !0),
|
|
2311
|
-
|
|
2312
|
-
value:
|
|
2312
|
+
S("div", yn, [S("input", {
|
|
2313
|
+
value: h(N).searchInput.value,
|
|
2313
2314
|
type: "search",
|
|
2314
|
-
disabled:
|
|
2315
|
-
"aria-label":
|
|
2315
|
+
disabled: oe.value,
|
|
2316
|
+
"aria-label": b.value.mediaLibrary.searchAriaLabel,
|
|
2316
2317
|
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
2318
|
style: {
|
|
2318
2319
|
"border-color": "var(--tpl-border)",
|
|
2319
2320
|
"background-color": "var(--tpl-bg)",
|
|
2320
2321
|
color: "var(--tpl-text)"
|
|
2321
2322
|
},
|
|
2322
|
-
placeholder:
|
|
2323
|
-
onInput:
|
|
2324
|
-
}, null, 40, bn), f(
|
|
2323
|
+
placeholder: b.value.mediaLibrary.searchPlaceholder,
|
|
2324
|
+
onInput: a[0] ||= (e) => h(N).handleSearchInput(e.target.value)
|
|
2325
|
+
}, null, 40, bn), f(h(re), {
|
|
2325
2326
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
2326
2327
|
size: 13,
|
|
2327
2328
|
"stroke-width": 2,
|
|
2328
2329
|
style: { color: "var(--tpl-text-dim)" }
|
|
2329
2330
|
})]),
|
|
2330
|
-
|
|
2331
|
+
n.showClose ? (r(), v("button", {
|
|
2331
2332
|
key: 1,
|
|
2332
2333
|
type: "button",
|
|
2333
|
-
"aria-label":
|
|
2334
|
+
"aria-label": b.value.mediaLibrary.close,
|
|
2334
2335
|
class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2335
2336
|
style: { color: "var(--tpl-text-muted)" },
|
|
2336
|
-
onClick:
|
|
2337
|
-
}, [f(
|
|
2337
|
+
onClick: a[1] ||= (e) => p("close")
|
|
2338
|
+
}, [f(h(U), {
|
|
2338
2339
|
size: 18,
|
|
2339
2340
|
"stroke-width": 2
|
|
2340
2341
|
})], 8, xn)) : g("", !0)
|
|
2341
2342
|
])]),
|
|
2342
|
-
|
|
2343
|
+
S("div", Sn, [f(M, {
|
|
2343
2344
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
2344
2345
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
2345
2346
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -2347,19 +2348,19 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2347
2348
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
2348
2349
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
2349
2350
|
}, {
|
|
2350
|
-
default:
|
|
2351
|
-
folders:
|
|
2352
|
-
"current-folder-id":
|
|
2353
|
-
"view-mode":
|
|
2354
|
-
"has-frequently-used":
|
|
2355
|
-
"can-create-folder":
|
|
2356
|
-
"can-rename-folder":
|
|
2357
|
-
"can-delete-folder":
|
|
2358
|
-
onNavigate:
|
|
2359
|
-
onCreateFolder:
|
|
2360
|
-
onRenameFolder:
|
|
2361
|
-
onDeleteFolder:
|
|
2362
|
-
onShowFrequentlyUsed:
|
|
2351
|
+
default: c(() => [I.value && h(N).showSidebar.value ? (r(), v("div", Cn, [f(Fe, {
|
|
2352
|
+
folders: h(N).folderTree.value,
|
|
2353
|
+
"current-folder-id": h(j).currentFolderId.value,
|
|
2354
|
+
"view-mode": h(j).viewMode.value,
|
|
2355
|
+
"has-frequently-used": V.value && h(N).hasFrequentlyUsed.value,
|
|
2356
|
+
"can-create-folder": ie.value,
|
|
2357
|
+
"can-rename-folder": W.value,
|
|
2358
|
+
"can-delete-folder": ae.value,
|
|
2359
|
+
onNavigate: h(j).navigateToFolder,
|
|
2360
|
+
onCreateFolder: h(N).handleCreateFolder,
|
|
2361
|
+
onRenameFolder: h(N).handleRenameFolder,
|
|
2362
|
+
onDeleteFolder: h(N).handleDeleteFolder,
|
|
2363
|
+
onShowFrequentlyUsed: h(j).showFrequentlyUsed
|
|
2363
2364
|
}, null, 8, [
|
|
2364
2365
|
"folders",
|
|
2365
2366
|
"current-folder-id",
|
|
@@ -2375,88 +2376,88 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2375
2376
|
"onShowFrequentlyUsed"
|
|
2376
2377
|
])])) : g("", !0)]),
|
|
2377
2378
|
_: 1
|
|
2378
|
-
}),
|
|
2379
|
-
|
|
2379
|
+
}), S("div", wn, [S("div", Tn, [S("div", En, [
|
|
2380
|
+
I.value ? (r(), v("button", {
|
|
2380
2381
|
key: 0,
|
|
2381
2382
|
type: "button",
|
|
2382
2383
|
"data-testid": "media-folder-toggle",
|
|
2383
2384
|
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:
|
|
2385
|
+
style: s({
|
|
2386
|
+
color: h(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2387
|
+
backgroundColor: h(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
|
|
2388
|
+
border: h(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
|
|
2388
2389
|
}),
|
|
2389
|
-
title:
|
|
2390
|
-
"aria-label":
|
|
2391
|
-
"aria-pressed":
|
|
2392
|
-
onClick:
|
|
2393
|
-
}, [f(
|
|
2390
|
+
title: h(N).showSidebar.value ? b.value.mediaLibrary.hideFolders : b.value.mediaLibrary.showFolders,
|
|
2391
|
+
"aria-label": h(N).showSidebar.value ? b.value.mediaLibrary.hideFolders : b.value.mediaLibrary.showFolders,
|
|
2392
|
+
"aria-pressed": h(N).showSidebar.value,
|
|
2393
|
+
onClick: a[2] ||= (e) => h(N).showSidebar.value = !h(N).showSidebar.value
|
|
2394
|
+
}, [f(h(q), {
|
|
2394
2395
|
size: 16,
|
|
2395
2396
|
"stroke-width": 2
|
|
2396
2397
|
})], 12, Dn)) : g("", !0),
|
|
2397
|
-
|
|
2398
|
+
h(j).viewMode.value === "frequently-used" ? (r(), v("span", On, t(b.value.mediaLibrary.frequentlyUsed), 1)) : (r(), T(xe, {
|
|
2398
2399
|
key: 2,
|
|
2399
|
-
folders:
|
|
2400
|
-
"current-folder-id":
|
|
2401
|
-
onNavigate:
|
|
2400
|
+
folders: h(N).folderTree.value,
|
|
2401
|
+
"current-folder-id": h(j).currentFolderId.value,
|
|
2402
|
+
onNavigate: h(j).navigateToFolder
|
|
2402
2403
|
}, null, 8, [
|
|
2403
2404
|
"folders",
|
|
2404
2405
|
"current-folder-id",
|
|
2405
2406
|
"onNavigate"
|
|
2406
2407
|
])),
|
|
2407
|
-
|
|
2408
|
+
S("div", kn, [S("button", {
|
|
2408
2409
|
type: "button",
|
|
2409
2410
|
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:
|
|
2411
|
+
style: s({
|
|
2412
|
+
color: h(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2413
|
+
backgroundColor: h(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2413
2414
|
}),
|
|
2414
|
-
title:
|
|
2415
|
-
"aria-label":
|
|
2416
|
-
"aria-pressed":
|
|
2417
|
-
onClick:
|
|
2418
|
-
}, [f(
|
|
2415
|
+
title: b.value.mediaLibrary.viewGrid,
|
|
2416
|
+
"aria-label": b.value.mediaLibrary.viewGrid,
|
|
2417
|
+
"aria-pressed": h(N).layoutMode.value === "grid",
|
|
2418
|
+
onClick: a[3] ||= (e) => h(N).layoutMode.value = "grid"
|
|
2419
|
+
}, [f(h(ue), {
|
|
2419
2420
|
size: 14,
|
|
2420
2421
|
"stroke-width": 2
|
|
2421
|
-
})], 12, An),
|
|
2422
|
+
})], 12, An), S("button", {
|
|
2422
2423
|
type: "button",
|
|
2423
2424
|
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:
|
|
2425
|
+
style: s({
|
|
2426
|
+
color: h(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2427
|
+
backgroundColor: h(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2427
2428
|
}),
|
|
2428
|
-
title:
|
|
2429
|
-
"aria-label":
|
|
2430
|
-
"aria-pressed":
|
|
2431
|
-
onClick:
|
|
2432
|
-
}, [f(
|
|
2429
|
+
title: b.value.mediaLibrary.viewList,
|
|
2430
|
+
"aria-label": b.value.mediaLibrary.viewList,
|
|
2431
|
+
"aria-pressed": h(N).layoutMode.value === "list",
|
|
2432
|
+
onClick: a[4] ||= (e) => h(N).layoutMode.value = "list"
|
|
2433
|
+
}, [f(h(ne), {
|
|
2433
2434
|
size: 14,
|
|
2434
2435
|
"stroke-width": 2
|
|
2435
2436
|
})], 12, jn)])
|
|
2436
|
-
]),
|
|
2437
|
+
]), S("div", Mn, [h(k).length > 1 ? (r(), v("select", {
|
|
2437
2438
|
key: 0,
|
|
2438
|
-
"aria-label":
|
|
2439
|
+
"aria-label": b.value.mediaLibrary.filterAriaLabel,
|
|
2439
2440
|
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
2441
|
style: {
|
|
2441
2442
|
"border-color": "var(--tpl-border)",
|
|
2442
2443
|
"background-color": "var(--tpl-bg)",
|
|
2443
2444
|
color: "var(--tpl-text)"
|
|
2444
2445
|
},
|
|
2445
|
-
value:
|
|
2446
|
-
onChange:
|
|
2447
|
-
}, [
|
|
2446
|
+
value: h(j).categoryFilter.value ?? "",
|
|
2447
|
+
onChange: de
|
|
2448
|
+
}, [S("option", Pn, t(b.value.mediaLibrary.filterAll), 1), (r(!0), v(w, null, o(h(k), (e) => (r(), v("option", {
|
|
2448
2449
|
key: e,
|
|
2449
2450
|
value: e
|
|
2450
|
-
},
|
|
2451
|
+
}, t(h(N).getCategoryLabel(e)), 9, Fn))), 128))], 40, Nn)) : g("", !0)])]), S("div", In, [h(j).viewMode.value === "files" && (P.value || L.value) ? (r(), v("div", Ln, [P.value ? (r(), T(an, {
|
|
2451
2452
|
key: 0,
|
|
2452
|
-
"is-uploading":
|
|
2453
|
-
"upload-progress":
|
|
2454
|
-
onUpload:
|
|
2453
|
+
"is-uploading": h(j).isUploading.value,
|
|
2454
|
+
"upload-progress": h(j).uploadProgress.value,
|
|
2455
|
+
onUpload: h(N).handleUpload
|
|
2455
2456
|
}, null, 8, [
|
|
2456
2457
|
"is-uploading",
|
|
2457
2458
|
"upload-progress",
|
|
2458
2459
|
"onUpload"
|
|
2459
|
-
])) : g("", !0),
|
|
2460
|
+
])) : g("", !0), L.value ? (r(), v("button", {
|
|
2460
2461
|
key: 1,
|
|
2461
2462
|
"data-testid": "media-import-url",
|
|
2462
2463
|
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,26 +2466,26 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2465
2466
|
color: "var(--tpl-text-muted)",
|
|
2466
2467
|
"background-color": "var(--tpl-bg)"
|
|
2467
2468
|
},
|
|
2468
|
-
onClick:
|
|
2469
|
-
}, [f(
|
|
2469
|
+
onClick: a[5] ||= (e) => h(N).showImportUrlModal.value = !0
|
|
2470
|
+
}, [f(h(te), {
|
|
2470
2471
|
size: 14,
|
|
2471
2472
|
"stroke-width": 2
|
|
2472
|
-
}),
|
|
2473
|
-
items:
|
|
2474
|
-
"selected-ids":
|
|
2475
|
-
"is-loading":
|
|
2476
|
-
"has-more":
|
|
2477
|
-
accept:
|
|
2478
|
-
layout:
|
|
2479
|
-
"search-query":
|
|
2480
|
-
"can-update":
|
|
2481
|
-
"can-replace":
|
|
2482
|
-
onSelect:
|
|
2483
|
-
onToggle:
|
|
2484
|
-
onLoadMore:
|
|
2485
|
-
onEdit:
|
|
2486
|
-
onReplace:
|
|
2487
|
-
onConfirm:
|
|
2473
|
+
}), y(" " + t(b.value.mediaLibrary.importFromUrl), 1)])) : g("", !0)])) : g("", !0), f(pt, {
|
|
2474
|
+
items: h(N).displayItems.value,
|
|
2475
|
+
"selected-ids": h(j).selectedItems.value,
|
|
2476
|
+
"is-loading": h(j).isLoading.value,
|
|
2477
|
+
"has-more": h(j).viewMode.value === "files" && h(j).hasMore.value,
|
|
2478
|
+
accept: n.accept,
|
|
2479
|
+
layout: h(N).layoutMode.value,
|
|
2480
|
+
"search-query": h(j).searchQuery.value,
|
|
2481
|
+
"can-update": z.value,
|
|
2482
|
+
"can-replace": B.value,
|
|
2483
|
+
onSelect: h(N).handleSelect,
|
|
2484
|
+
onToggle: h(j).toggleSelection,
|
|
2485
|
+
onLoadMore: h(j).loadMore,
|
|
2486
|
+
onEdit: h(N).handleEditItem,
|
|
2487
|
+
onReplace: h(N).handleReplaceItem,
|
|
2488
|
+
onConfirm: K
|
|
2488
2489
|
}, null, 8, [
|
|
2489
2490
|
"items",
|
|
2490
2491
|
"selected-ids",
|
|
@@ -2502,37 +2503,37 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2502
2503
|
"onReplace"
|
|
2503
2504
|
])])])]),
|
|
2504
2505
|
f(wt, {
|
|
2505
|
-
visible:
|
|
2506
|
-
"is-importing":
|
|
2507
|
-
error:
|
|
2508
|
-
onImport:
|
|
2509
|
-
onClose:
|
|
2506
|
+
visible: h(N).showImportUrlModal.value,
|
|
2507
|
+
"is-importing": h(j).isImportingFromUrl.value,
|
|
2508
|
+
error: h(j).importFromUrlError.value,
|
|
2509
|
+
onImport: h(N).handleImportFromUrl,
|
|
2510
|
+
onClose: a[6] ||= (e) => h(N).showImportUrlModal.value = !1
|
|
2510
2511
|
}, null, 8, [
|
|
2511
2512
|
"visible",
|
|
2512
2513
|
"is-importing",
|
|
2513
2514
|
"error",
|
|
2514
2515
|
"onImport"
|
|
2515
2516
|
]),
|
|
2516
|
-
|
|
2517
|
+
h(N).editingItem.value ? (r(), T(h(_), {
|
|
2517
2518
|
key: 0,
|
|
2518
2519
|
visible: !0,
|
|
2519
|
-
item:
|
|
2520
|
-
save:
|
|
2521
|
-
"can-crop":
|
|
2522
|
-
onClose:
|
|
2520
|
+
item: h(N).editingItem.value,
|
|
2521
|
+
save: h(N).handleEditSave,
|
|
2522
|
+
"can-crop": B.value && h(N).editingItem.value.canUpdate !== !1,
|
|
2523
|
+
onClose: a[7] ||= (e) => h(N).editingItem.value = null
|
|
2523
2524
|
}, null, 8, [
|
|
2524
2525
|
"item",
|
|
2525
2526
|
"save",
|
|
2526
2527
|
"can-crop"
|
|
2527
2528
|
])) : g("", !0),
|
|
2528
2529
|
f(Xt, {
|
|
2529
|
-
visible:
|
|
2530
|
-
item:
|
|
2531
|
-
"usage-info":
|
|
2532
|
-
"is-replacing":
|
|
2533
|
-
error:
|
|
2534
|
-
onReplace:
|
|
2535
|
-
onClose:
|
|
2530
|
+
visible: h(j).showReplaceWarning.value,
|
|
2531
|
+
item: h(j).pendingReplaceItem.value,
|
|
2532
|
+
"usage-info": h(j).replaceUsageInfo.value,
|
|
2533
|
+
"is-replacing": h(j).isReplacing.value,
|
|
2534
|
+
error: h(j).replaceError.value,
|
|
2535
|
+
onReplace: h(N).handleReplaceFile,
|
|
2536
|
+
onClose: h(j).cancelReplace
|
|
2536
2537
|
}, null, 8, [
|
|
2537
2538
|
"visible",
|
|
2538
2539
|
"item",
|
|
@@ -2550,7 +2551,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2550
2551
|
"leave-from-class": "tpl:opacity-100",
|
|
2551
2552
|
"leave-to-class": "tpl:opacity-0"
|
|
2552
2553
|
}, {
|
|
2553
|
-
default:
|
|
2554
|
+
default: c(() => [h(j).showDeleteWarning.value ? (r(), v("div", {
|
|
2554
2555
|
key: 0,
|
|
2555
2556
|
role: "dialog",
|
|
2556
2557
|
"aria-modal": "true",
|
|
@@ -2561,79 +2562,79 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2561
2562
|
"backdrop-filter": "blur(8px)",
|
|
2562
2563
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2563
2564
|
},
|
|
2564
|
-
onClick:
|
|
2565
|
-
}, [
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
class:
|
|
2565
|
+
onClick: a[10] ||= A((...e) => h(j).cancelDelete && h(j).cancelDelete(...e), ["self"])
|
|
2566
|
+
}, [S("div", Rn, [
|
|
2567
|
+
S("h3", zn, t(b.value.mediaLibrary.deleteWarningTitle), 1),
|
|
2568
|
+
S("p", {
|
|
2569
|
+
class: i(["tpl:text-xs", h(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
2569
2570
|
style: { color: "var(--tpl-text-muted)" }
|
|
2570
|
-
},
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
key:
|
|
2571
|
+
}, t(b.value.mediaLibrary.deleteWarningMessage), 3),
|
|
2572
|
+
h(N).hasUsedFiles.value ? (r(), v("p", Bn, t(b.value.mediaLibrary.deleteWarningUsageNote), 1)) : g("", !0),
|
|
2573
|
+
h(N).hasUsedFiles.value ? (r(), v("div", Vn, [(r(!0), v(w, null, o(h(j).deleteUsageInfo.value, (e, n) => (r(), v("div", {
|
|
2574
|
+
key: n,
|
|
2574
2575
|
class: "tpl:text-xs",
|
|
2575
2576
|
style: { color: "var(--tpl-text)" }
|
|
2576
|
-
}, [e.templateCount > 0 ? (
|
|
2577
|
-
|
|
2577
|
+
}, [e.templateCount > 0 ? (r(), v(w, { key: 0 }, [S("span", Hn, t(h(N).displayItems.value.find((e) => e.id === n)?.filename || n), 1), S("span", Un, " - " + t(b.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : g("", !0)]))), 128))])) : g("", !0),
|
|
2578
|
+
S("div", Wn, [S("button", {
|
|
2578
2579
|
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
2580
|
style: {
|
|
2580
2581
|
"border-color": "var(--tpl-border)",
|
|
2581
2582
|
color: "var(--tpl-text)",
|
|
2582
2583
|
"background-color": "var(--tpl-bg)"
|
|
2583
2584
|
},
|
|
2584
|
-
onClick:
|
|
2585
|
-
},
|
|
2585
|
+
onClick: a[8] ||= (...e) => h(j).cancelDelete && h(j).cancelDelete(...e)
|
|
2586
|
+
}, t(b.value.mediaLibrary.cancel), 1), S("button", {
|
|
2586
2587
|
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
2588
|
style: {
|
|
2588
2589
|
"border-color": "var(--tpl-danger)",
|
|
2589
2590
|
color: "var(--tpl-danger)",
|
|
2590
2591
|
"background-color": "var(--tpl-bg)"
|
|
2591
2592
|
},
|
|
2592
|
-
onClick:
|
|
2593
|
-
},
|
|
2593
|
+
onClick: a[9] ||= (...e) => h(j).confirmDelete && h(j).confirmDelete(...e)
|
|
2594
|
+
}, t(h(N).hasUsedFiles.value ? b.value.mediaLibrary.deleteAnyway : b.value.mediaLibrary.confirmDelete), 1)])
|
|
2594
2595
|
])])) : g("", !0)]),
|
|
2595
2596
|
_: 1
|
|
2596
2597
|
}),
|
|
2597
|
-
|
|
2598
|
+
S("div", Gn, [S("div", Kn, [h(j).previewItem.value ? (r(), T(It, {
|
|
2598
2599
|
key: 0,
|
|
2599
|
-
item:
|
|
2600
|
-
folders:
|
|
2601
|
-
}, null, 8, ["item", "folders"])) : g("", !0)]),
|
|
2600
|
+
item: h(j).previewItem.value,
|
|
2601
|
+
folders: h(N).folderTree.value
|
|
2602
|
+
}, null, 8, ["item", "folders"])) : g("", !0)]), S("div", qn, [h(j).selectedItems.value.size > 0 ? (r(), v("div", Jn, [h(j).previewItem.value ? (r(), v("button", {
|
|
2602
2603
|
key: 0,
|
|
2603
2604
|
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:
|
|
2605
|
+
style: s({
|
|
2606
|
+
borderColor: h(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
|
|
2607
|
+
color: h(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
|
|
2607
2608
|
backgroundColor: "var(--tpl-bg)"
|
|
2608
2609
|
}),
|
|
2609
|
-
onClick:
|
|
2610
|
-
}, [
|
|
2610
|
+
onClick: a[11] ||= (e) => h(N).copy(h(N).selectedUrl.value)
|
|
2611
|
+
}, [h(N).copied.value ? (r(), T(h(F), {
|
|
2611
2612
|
key: 1,
|
|
2612
2613
|
size: 12,
|
|
2613
2614
|
"stroke-width": 2
|
|
2614
|
-
})) : (
|
|
2615
|
+
})) : (r(), T(h(ee), {
|
|
2615
2616
|
key: 0,
|
|
2616
2617
|
size: 12,
|
|
2617
2618
|
"stroke-width": 2
|
|
2618
|
-
})),
|
|
2619
|
+
})), y(" " + t(h(N).copied.value ? b.value.mediaLibrary.copied : b.value.mediaLibrary.copyUrl), 1)], 4)) : g("", !0), H.value ? (r(), v("div", Yn, [S("button", {
|
|
2619
2620
|
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
2621
|
style: {
|
|
2621
2622
|
"border-color": "var(--tpl-border)",
|
|
2622
2623
|
color: "var(--tpl-text)",
|
|
2623
2624
|
"background-color": "var(--tpl-bg)"
|
|
2624
2625
|
},
|
|
2625
|
-
onClick:
|
|
2626
|
-
},
|
|
2626
|
+
onClick: a[12] ||= (e) => h(N).showMovePicker.value = !h(N).showMovePicker.value
|
|
2627
|
+
}, t(b.value.mediaLibrary.moveSelected), 1), h(N).showMovePicker.value ? (r(), T(kt, {
|
|
2627
2628
|
key: 0,
|
|
2628
|
-
folders:
|
|
2629
|
-
"current-folder-id":
|
|
2630
|
-
onSelect:
|
|
2631
|
-
onClose:
|
|
2629
|
+
folders: h(N).folderTree.value,
|
|
2630
|
+
"current-folder-id": h(j).currentFolderId.value,
|
|
2631
|
+
onSelect: h(N).handleMoveToFolder,
|
|
2632
|
+
onClose: a[13] ||= (e) => h(N).showMovePicker.value = !1
|
|
2632
2633
|
}, null, 8, [
|
|
2633
2634
|
"folders",
|
|
2634
2635
|
"current-folder-id",
|
|
2635
2636
|
"onSelect"
|
|
2636
|
-
])) : g("", !0)])) : g("", !0)])) : g("", !0),
|
|
2637
|
+
])) : g("", !0)])) : g("", !0)])) : g("", !0), S("div", Xn, [ce.value > 0 ? (r(), v("button", {
|
|
2637
2638
|
key: 0,
|
|
2638
2639
|
"data-testid": "media-delete",
|
|
2639
2640
|
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",
|
|
@@ -2642,24 +2643,24 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2642
2643
|
color: "var(--tpl-danger)",
|
|
2643
2644
|
"background-color": "var(--tpl-bg)"
|
|
2644
2645
|
},
|
|
2645
|
-
onClick:
|
|
2646
|
-
},
|
|
2646
|
+
onClick: J
|
|
2647
|
+
}, t(b.value.mediaLibrary.deleteSelected), 1)) : g("", !0), n.showConfirm ? (r(), v("button", {
|
|
2647
2648
|
key: 1,
|
|
2648
|
-
"data-testid":
|
|
2649
|
+
"data-testid": C.value,
|
|
2649
2650
|
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
2651
|
style: {
|
|
2651
2652
|
"background-color": "var(--tpl-primary)",
|
|
2652
2653
|
color: "var(--tpl-on-primary)"
|
|
2653
2654
|
},
|
|
2654
|
-
disabled: !
|
|
2655
|
-
onClick:
|
|
2656
|
-
},
|
|
2655
|
+
disabled: !se.value,
|
|
2656
|
+
onClick: K
|
|
2657
|
+
}, t(n.accept?.length ? b.value.mediaLibrary.selectImage : b.value.mediaLibrary.selectFile), 9, Zn)) : g("", !0)])])])
|
|
2657
2658
|
]));
|
|
2658
2659
|
}
|
|
2659
2660
|
}), $n = /* #__PURE__ */ Object.assign({
|
|
2660
2661
|
"./locales/ca.ts": () => import("./ca-Cc6eL0ZS.js"),
|
|
2661
2662
|
"./locales/de.ts": () => import("./de-DtrXVcuY.js"),
|
|
2662
|
-
"./locales/en.ts": () => import("./en-
|
|
2663
|
+
"./locales/en.ts": () => import("./en-DTtwco2Q.js"),
|
|
2663
2664
|
"./locales/es.ts": () => import("./es-Dw_h7Oll.js"),
|
|
2664
2665
|
"./locales/fr.ts": () => import("./fr-BJaeKu_8.js"),
|
|
2665
2666
|
"./locales/ja.ts": () => import("./ja-Cu2HdYaK.js"),
|
|
@@ -2688,7 +2689,7 @@ async function or(e) {
|
|
|
2688
2689
|
return (await t()).default;
|
|
2689
2690
|
}
|
|
2690
2691
|
// ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
|
|
2691
|
-
var sr = ["data-tpl-theme"], cr = /* @__PURE__ */
|
|
2692
|
+
var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
|
|
2692
2693
|
__name: "MediaLibraryModal",
|
|
2693
2694
|
props: {
|
|
2694
2695
|
visible: { type: Boolean },
|
|
@@ -2702,24 +2703,24 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
|
|
|
2702
2703
|
},
|
|
2703
2704
|
emits: ["close", "select"],
|
|
2704
2705
|
setup(t, { emit: n }) {
|
|
2705
|
-
let
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
}, { immediate: !0 }), a(
|
|
2709
|
-
let
|
|
2710
|
-
a(
|
|
2711
|
-
let
|
|
2712
|
-
a(
|
|
2713
|
-
let
|
|
2714
|
-
_e(
|
|
2715
|
-
function
|
|
2716
|
-
e.key === "Escape" && (
|
|
2706
|
+
let o = t, s = n, l = _(null);
|
|
2707
|
+
e(() => o.locale, async (e) => {
|
|
2708
|
+
l.value = await or(e ?? "en");
|
|
2709
|
+
}, { immediate: !0 }), a(pe, l);
|
|
2710
|
+
let u = m(() => o.uiTheme);
|
|
2711
|
+
a(Y, u);
|
|
2712
|
+
let d = b(() => o.popoverTarget ?? null);
|
|
2713
|
+
a(J, d), a(X, b(() => o.locale));
|
|
2714
|
+
let h = _(null), y = _(null);
|
|
2715
|
+
_e(h, m(() => o.visible && l.value !== null && !y.value?.nestedDialogOpen));
|
|
2716
|
+
function x(e) {
|
|
2717
|
+
e.key === "Escape" && (y.value?.handleEscape() ? e.preventDefault() : s("close"));
|
|
2717
2718
|
}
|
|
2718
|
-
|
|
2719
|
-
function
|
|
2720
|
-
|
|
2719
|
+
W(document, "keydown", x);
|
|
2720
|
+
function C(e) {
|
|
2721
|
+
s("select", e), s("close");
|
|
2721
2722
|
}
|
|
2722
|
-
return (e, n) => (
|
|
2723
|
+
return (e, n) => (r(), T(p, { to: t.popoverTarget || "body" }, [f(M, {
|
|
2723
2724
|
"enter-active-class": "tpl:transition tpl:duration-200",
|
|
2724
2725
|
"enter-from-class": "tpl:opacity-0",
|
|
2725
2726
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2727,20 +2728,20 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
|
|
|
2727
2728
|
"leave-from-class": "tpl:opacity-100",
|
|
2728
2729
|
"leave-to-class": "tpl:opacity-0"
|
|
2729
2730
|
}, {
|
|
2730
|
-
default:
|
|
2731
|
+
default: c(() => [t.visible && l.value ? (r(), v("div", {
|
|
2731
2732
|
key: 0,
|
|
2732
2733
|
"data-testid": "media-library-modal",
|
|
2733
|
-
"data-tpl-theme":
|
|
2734
|
-
class:
|
|
2734
|
+
"data-tpl-theme": u.value,
|
|
2735
|
+
class: i([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
2736
|
style: {
|
|
2736
2737
|
"background-color": "var(--tpl-overlay)",
|
|
2737
2738
|
"backdrop-filter": "blur(8px)",
|
|
2738
2739
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2739
2740
|
},
|
|
2740
|
-
onClick: n[1] ||= A((e) =>
|
|
2741
|
-
}, [
|
|
2741
|
+
onClick: n[1] ||= A((e) => s("close"), ["self"])
|
|
2742
|
+
}, [S("div", {
|
|
2742
2743
|
ref_key: "dialogRef",
|
|
2743
|
-
ref:
|
|
2744
|
+
ref: h,
|
|
2744
2745
|
role: "dialog",
|
|
2745
2746
|
"aria-modal": "true",
|
|
2746
2747
|
"aria-labelledby": "tpl-media-library-title",
|
|
@@ -2757,17 +2758,17 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
|
|
|
2757
2758
|
}
|
|
2758
2759
|
}, [f(Qn, {
|
|
2759
2760
|
ref_key: "chromeRef",
|
|
2760
|
-
ref:
|
|
2761
|
+
ref: y,
|
|
2761
2762
|
provider: t.provider,
|
|
2762
2763
|
accept: t.accept,
|
|
2763
2764
|
"template-id": t.templateId,
|
|
2764
2765
|
"on-error": t.onError,
|
|
2765
|
-
translations:
|
|
2766
|
+
translations: l.value,
|
|
2766
2767
|
"show-close": "",
|
|
2767
2768
|
"show-confirm": "",
|
|
2768
2769
|
"confirm-test-id": "media-confirm",
|
|
2769
|
-
onClose: n[0] ||= (e) =>
|
|
2770
|
-
onConfirm:
|
|
2770
|
+
onClose: n[0] ||= (e) => s("close"),
|
|
2771
|
+
onConfirm: C
|
|
2771
2772
|
}, null, 8, [
|
|
2772
2773
|
"provider",
|
|
2773
2774
|
"accept",
|
|
@@ -2779,4 +2780,4 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
|
|
|
2779
2780
|
})], 8, ["to"]));
|
|
2780
2781
|
}
|
|
2781
2782
|
});
|
|
2782
|
-
export { cr as MediaLibraryModal,
|
|
2783
|
+
export { cr as MediaLibraryModal, J as a, me as i, Q as n, Y as o, Z as r, _e as t };
|