@templatical/editor 0.51.1 → 0.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +208 -0
- package/dist/{AiAltTextPopover-BZQ95GXL.js → AiAltTextPopover-DawbUywc.js} +16 -17
- package/dist/{AiAltTextReview-DoBEudnE.js → AiAltTextReview-9ySsXOTU.js} +25 -26
- package/dist/{AiChatPanel-Bs6sES3b.js → AiChatPanel-CupPhmsN.js} +141 -143
- package/dist/{AiPanels-CfN7A-ZA.js → AiPanels-DqT4PgQ0.js} +6 -8
- package/dist/{AiRewriteMenu-C3ZfDDYy.js → AiRewriteMenu-28agTycW.js} +66 -67
- package/dist/BlockIssueBadge-BxpDy3u-.js +33 -0
- package/dist/{BlockPreviewCanvas-BXNLLLYi.js → BlockPreviewCanvas-B-4bmJ3t.js} +26 -27
- package/dist/{CloudHeaderExtras-CsJMEiyN.js → CloudHeaderExtras-QI82yF54.js} +4 -5
- package/dist/{CloudPanels-B4F5m7vy.js → CloudPanels-BKJaLkUN.js} +52 -53
- package/dist/{CollaborationNotices-CNuDp7Y2.js → CollaborationNotices-CTw4JThq.js} +12 -13
- package/dist/{CollaboratorBar-BtHPiuHq.js → CollaboratorBar-CXQqN3VP.js} +16 -17
- package/dist/{CommentsPanel-CyCM-BvT.js → CommentsPanel-DwwFuh1h.js} +3 -5
- package/dist/CommentsSidebar-9ZfiC2DO.js +500 -0
- package/dist/{CountdownBlock-DR4Xm2-T.js → CountdownBlock-CU2yTWtF.js} +21 -22
- package/dist/{CountdownToolbar-CEIMPojJ.js → CountdownToolbar-BqoYzf_6.js} +55 -56
- package/dist/IssuesPanel-4ykrf1ax.js +359 -0
- package/dist/{LoadingTrack-B0RKQWq3.js → LoadingTrack-DM4g6j7b.js} +3 -4
- package/dist/{LogicTagInsertButton-CqfU52CO.js → LogicTagInsertButton-CfscnwCn.js} +243 -250
- package/dist/{MediaEditModal-DHtkZ4OU.js → MediaEditModal-Dy08GEwE.js} +449 -452
- package/dist/{MediaPanels-CGcOB2pR.js → MediaPanels-BgEp7iCp.js} +3 -5
- package/dist/{MergeTagInput-YnEkorTZ.js → MergeTagInput-B9dtUthD.js} +14 -15
- package/dist/{MergeTagModeToggle-Dhb1DAcQ.js → MergeTagModeToggle-DxujhYJ4.js} +30 -31
- package/dist/{MergeTagTextarea-e4lnwtqZ.js → MergeTagTextarea-CPFEjJZd.js} +12 -13
- package/dist/{ParagraphEditor-B6NK0ytw.js → ParagraphEditor-CWXfurGh.js} +233 -236
- package/dist/{RestoreVersionDialog-Bq_IGOLJ.js → RestoreVersionDialog-C4s_JYCx.js} +16 -17
- package/dist/{RichTextEditorContent-AOM6fylS.js → RichTextEditorContent-o6HmE8GR.js} +40 -40
- package/dist/{SaveBlockDialog-C8GngfQx.js → SaveBlockDialog-CWLrly6l.js} +58 -59
- package/dist/SavedBlocksBrowserModal-CE8n4EBS.js +359 -0
- package/dist/{SavedBlocksPanels-C2s3q0pJ.js → SavedBlocksPanels-BE1N9rNZ.js} +7 -9
- package/dist/{SavedBlocksPickBar-BjcTiV87.js → SavedBlocksPickBar-Dwl94xhP.js} +14 -15
- package/dist/{TemplateSettings-BVBWpiDU.js → TemplateSettings-CS0f1Ues.js} +75 -76
- package/dist/{TestEmailModal-SyhO9bn3.js → TestEmailModal-DBD0X5nV.js} +54 -56
- package/dist/{TestEmailPanel-BDd2Rtav.js → TestEmailPanel-DaFjP9QK.js} +3 -5
- package/dist/{TitleEditor-pxD53y_l.js → TitleEditor-DSqtle77.js} +78 -79
- package/dist/{ToggleSwitch-D51U9cmR.js → ToggleSwitch-JykPyD_8.js} +5 -6
- package/dist/{Toolbar-CZSPZYbj.js → Toolbar-BZPFfKrf.js} +977 -985
- package/dist/{TplModal-DCzBzicE.js → TplModal-DLMssVlt.js} +16 -17
- package/dist/{VersionHistoryMenu-BQeWPT85.js → VersionHistoryMenu-BkbYUs0Q.js} +37 -38
- package/dist/{VersionHistoryPanels-BBm7YbRQ.js → VersionHistoryPanels-DP7HaYWv.js} +5 -7
- package/dist/{VersionPreviewBanner-DUGF0tUJ.js → VersionPreviewBanner-DECaBwLq.js} +11 -12
- package/dist/WrapperBlock-BsJv_Fiw.js +44 -0
- package/dist/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
- package/dist/{aiErrors-D5UOoYOt.js → aiErrors-C3QEMB0x.js} +3 -5
- package/dist/{aiImageContext-BH4Ss1h3.js → aiImageContext-BQ5mQ6B5.js} +2 -3
- package/dist/{aiRewritePreview-DLGM05Ge.js → aiRewritePreview-DlMyx6Si.js} +1 -2
- package/dist/{blockTypeIcons-NzaYvAI4.js → blockTypeIcons-BHjlPnPf.js} +23 -23
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-C7mTzW1r.js → ca-CD-Kt1qz.js} +1 -2
- package/dist/{ca-CYQH3J0b.js → ca-Cc6eL0ZS.js} +1 -2
- package/dist/cdn/chunks/{AiAltTextPopover-CQu0Q_ZX.js → AiAltTextPopover-SEEjkd-I.js} +24 -25
- package/dist/cdn/chunks/{AiAltTextPopover-CQu0Q_ZX.js.map → AiAltTextPopover-SEEjkd-I.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-CI2HbWfn.js → AiAltTextReview-BGLLSKLm.js} +43 -44
- package/dist/cdn/chunks/{AiAltTextReview-CI2HbWfn.js.map → AiAltTextReview-BGLLSKLm.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-BYqn1bKu.js → AiChatPanel-DKDAaBNi.js} +129 -131
- package/dist/cdn/chunks/{AiChatPanel-BYqn1bKu.js.map → AiChatPanel-DKDAaBNi.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-CIFKQv8Y.js → AiPanels-0wBarZSH.js} +5 -7
- package/dist/cdn/chunks/{AiPanels-CIFKQv8Y.js.map → AiPanels-0wBarZSH.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-Bhh71zcc.js → AiRewriteMenu-qf-cfEpy.js} +52 -53
- package/dist/cdn/chunks/AiRewriteMenu-qf-cfEpy.js.map +1 -0
- package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js +34 -0
- package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-D0--EQkP.js → BlockPreviewCanvas-DGBh6mqe.js} +22 -23
- package/dist/cdn/chunks/{BlockPreviewCanvas-D0--EQkP.js.map → BlockPreviewCanvas-DGBh6mqe.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DaUU8P8R.js → CloudHeaderExtras-BMNK_F9p.js} +4 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-DaUU8P8R.js.map → CloudHeaderExtras-BMNK_F9p.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-C3jsxo_f.js → CloudPanels-JMWIoVWh.js} +34 -35
- package/dist/cdn/chunks/{CloudPanels-C3jsxo_f.js.map → CloudPanels-JMWIoVWh.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-DjRI8gvs.js → CollaborationNotices-Bsf1rGW9.js} +13 -14
- package/dist/cdn/chunks/{CollaborationNotices-DjRI8gvs.js.map → CollaborationNotices-Bsf1rGW9.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-Dfzm6A9A.js → CollaboratorBar-CXByAoUz.js} +16 -17
- package/dist/cdn/chunks/{CollaboratorBar-Dfzm6A9A.js.map → CollaboratorBar-CXByAoUz.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CSO79OeX.js → CommentsPanel-DoJnKLXI.js} +4 -6
- package/dist/cdn/chunks/{CommentsPanel-CSO79OeX.js.map → CommentsPanel-DoJnKLXI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CCvplq1Z.js → CommentsSidebar-CUtgvdBC.js} +110 -110
- package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-C6USdwk3.js → CountdownBlock-BqRw147R.js} +19 -20
- package/dist/cdn/chunks/{CountdownBlock-C6USdwk3.js.map → CountdownBlock-BqRw147R.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Cjud2Tos.js → CountdownToolbar-xobieKoU.js} +28 -29
- package/dist/cdn/chunks/{CountdownToolbar-Cjud2Tos.js.map → CountdownToolbar-xobieKoU.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BaWHPDxZ.js → IssuesPanel-C7LfxaAY.js} +76 -77
- package/dist/cdn/chunks/{IssuesPanel-BaWHPDxZ.js.map → IssuesPanel-C7LfxaAY.js.map} +1 -1
- package/dist/cdn/chunks/LoadingTrack-CZuLTazv.js +11 -0
- package/dist/cdn/chunks/{LoadingTrack-BIcL4NiY.js.map → LoadingTrack-CZuLTazv.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CsL2JDOG.js → LogicTagInsertButton-BIi05UQu.js} +258 -265
- package/dist/cdn/chunks/{LogicTagInsertButton-CsL2JDOG.js.map → LogicTagInsertButton-BIi05UQu.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-BuHCiyMu.js → MediaEditModal-Cpcod6_U.js} +152 -155
- package/dist/cdn/chunks/{MediaEditModal-BuHCiyMu.js.map → MediaEditModal-Cpcod6_U.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-DAgUf_T1.js → MediaPanels-BIdcW_1f.js} +4 -6
- package/dist/cdn/chunks/{MediaPanels-DAgUf_T1.js.map → MediaPanels-BIdcW_1f.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-C8U-7LxL.js → MergeTagInput-BvWg8o5E.js} +35 -36
- package/dist/cdn/chunks/{MergeTagInput-C8U-7LxL.js.map → MergeTagInput-BvWg8o5E.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Mm-p0A52.js → MergeTagModeToggle-BgKEVUtV.js} +28 -29
- package/dist/cdn/chunks/{MergeTagModeToggle-Mm-p0A52.js.map → MergeTagModeToggle-BgKEVUtV.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-DuLScsWM.js → MergeTagTextarea-tBz8McZf.js} +33 -34
- package/dist/cdn/chunks/{MergeTagTextarea-DuLScsWM.js.map → MergeTagTextarea-tBz8McZf.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CqSj6Ayz.js → ParagraphEditor-B3Rj_cWF.js} +197 -200
- package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-CdA5osuA.js → RestoreVersionDialog-CjOdD2xj.js} +21 -22
- package/dist/cdn/chunks/{RestoreVersionDialog-CdA5osuA.js.map → RestoreVersionDialog-CjOdD2xj.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Q1d2xqBT.js → RichTextEditorContent-DNjR_sNN.js} +30 -31
- package/dist/cdn/chunks/{RichTextEditorContent-Q1d2xqBT.js.map → RichTextEditorContent-DNjR_sNN.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CijargAy.js → SaveBlockDialog-CUhpawq0.js} +77 -78
- package/dist/cdn/chunks/{SaveBlockDialog-CijargAy.js.map → SaveBlockDialog-CUhpawq0.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-BPYcRoGa.js +356 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DtOz_X5S.js.map → SavedBlocksBrowserModal-BPYcRoGa.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BowyED5h.js → SavedBlocksPanels-C6--Bc81.js} +4 -6
- package/dist/cdn/chunks/{SavedBlocksPanels-BowyED5h.js.map → SavedBlocksPanels-C6--Bc81.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BPRaJBv3.js → SavedBlocksPickBar-DUavxpbU.js} +16 -17
- package/dist/cdn/chunks/{SavedBlocksPickBar-BPRaJBv3.js.map → SavedBlocksPickBar-DUavxpbU.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-ByZeBO34.js → TemplateSettings-CKtI-dof.js} +72 -73
- package/dist/cdn/chunks/{TemplateSettings-ByZeBO34.js.map → TemplateSettings-CKtI-dof.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-BUVTj3Ic.js → TestEmailModal-CDQTgESD.js} +68 -70
- package/dist/cdn/chunks/{TestEmailModal-BUVTj3Ic.js.map → TestEmailModal-CDQTgESD.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BxutYoWg.js → TestEmailPanel-CcUpEpAn.js} +4 -6
- package/dist/cdn/chunks/{TestEmailPanel-BxutYoWg.js.map → TestEmailPanel-CcUpEpAn.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Ccv6uoTz.js → TitleEditor-Cob7RLyK.js} +71 -72
- package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js.map +1 -0
- package/dist/cdn/chunks/{ToggleSwitch-Ctdmj621.js → ToggleSwitch-J7Vwhvha.js} +6 -7
- package/dist/cdn/chunks/{ToggleSwitch-Ctdmj621.js.map → ToggleSwitch-J7Vwhvha.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-DoprRgTn.js → Toolbar-CdpsvNOR.js} +977 -985
- package/dist/cdn/chunks/{Toolbar-DoprRgTn.js.map → Toolbar-CdpsvNOR.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-CFPDgbwQ.js +51 -0
- package/dist/cdn/chunks/{TplModal-BXQzmsJX.js.map → TplModal-CFPDgbwQ.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-BF2fNCvq.js → VersionHistoryMenu-BYlLRvRJ.js} +34 -35
- package/dist/cdn/chunks/{VersionHistoryMenu-BF2fNCvq.js.map → VersionHistoryMenu-BYlLRvRJ.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-Dal0Uk69.js → VersionHistoryPanels-C6SOVoiT.js} +4 -6
- package/dist/cdn/chunks/{VersionHistoryPanels-Dal0Uk69.js.map → VersionHistoryPanels-C6SOVoiT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BaGcn-b1.js → VersionPreviewBanner-Dvg0ZfAW.js} +12 -13
- package/dist/cdn/chunks/{VersionPreviewBanner-BaGcn-b1.js.map → VersionPreviewBanner-Dvg0ZfAW.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-DkQJtLz0.js → WrapperBlock-C7Md56IT.js} +14 -15
- package/dist/cdn/chunks/{WrapperBlock-DkQJtLz0.js.map → WrapperBlock-C7Md56IT.js.map} +1 -1
- package/dist/cdn/chunks/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
- package/dist/cdn/chunks/{aiErrors-D5UOoYOt.js → aiErrors-C3QEMB0x.js} +4 -6
- package/dist/cdn/chunks/{aiErrors-D5UOoYOt.js.map → aiErrors-C3QEMB0x.js.map} +1 -1
- package/dist/cdn/chunks/{aiImageContext-BH4Ss1h3.js → aiImageContext-BQ5mQ6B5.js} +3 -4
- package/dist/cdn/chunks/{aiImageContext-BH4Ss1h3.js.map → aiImageContext-BQ5mQ6B5.js.map} +1 -1
- package/dist/cdn/chunks/{aiRewritePreview-DLGM05Ge.js → aiRewritePreview-DlMyx6Si.js} +2 -3
- package/dist/cdn/chunks/{aiRewritePreview-DLGM05Ge.js.map → aiRewritePreview-DlMyx6Si.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js +21 -0
- package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js.map +1 -0
- package/dist/cdn/chunks/{ca-C7mTzW1r.js → ca-CD-Kt1qz.js} +2 -3
- package/dist/cdn/chunks/{ca-C7mTzW1r.js.map → ca-CD-Kt1qz.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CYQH3J0b.js → ca-Cc6eL0ZS.js} +2 -3
- package/dist/cdn/chunks/{ca-CYQH3J0b.js.map → ca-Cc6eL0ZS.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-DpBWhrv3.js → createCloudRuntime-Cth2JCEh.js} +58 -77
- package/dist/cdn/chunks/{createCloudRuntime-DpBWhrv3.js.map → createCloudRuntime-Cth2JCEh.js.map} +1 -1
- package/dist/cdn/chunks/{de-DBOTcDj2.js → de-6M4JoHoD.js} +2 -3
- package/dist/cdn/chunks/{de-DBOTcDj2.js.map → de-6M4JoHoD.js.map} +1 -1
- package/dist/cdn/chunks/{de-DNuYQTmS.js → de-CeFJ6wbM.js} +2 -3
- package/dist/cdn/chunks/{de-DNuYQTmS.js.map → de-CeFJ6wbM.js.map} +1 -1
- package/dist/cdn/chunks/{de-JvCTMJPy.js → de-DtrXVcuY.js} +2 -3
- package/dist/cdn/chunks/{de-JvCTMJPy.js.map → de-DtrXVcuY.js.map} +1 -1
- package/dist/cdn/chunks/{dist-Bo8Thh8v.js → dist-8ym3y-pH.js} +44 -45
- package/dist/cdn/chunks/{dist-Bo8Thh8v.js.map → dist-8ym3y-pH.js.map} +1 -1
- package/dist/{dist-DI4_YSnG.js → cdn/chunks/dist-BMzNabtD.js} +107 -109
- package/dist/cdn/chunks/{dist-S-rLGqax.js.map → dist-BMzNabtD.js.map} +1 -1
- package/dist/cdn/chunks/dompurify-JVtr5-B1.js +872 -0
- package/dist/cdn/chunks/dompurify-JVtr5-B1.js.map +1 -0
- package/dist/cdn/chunks/{draggable-DZ0gwUJ6.js → draggable-Du8AUMFT.js} +654 -654
- package/dist/cdn/chunks/draggable-Du8AUMFT.js.map +1 -0
- package/dist/{editor-modal-Bzhl-PgI.js → cdn/chunks/editor-modal-CyCe560f.js} +893 -979
- package/dist/cdn/chunks/{editor-modal-CI6EfeMd.js.map → editor-modal-CyCe560f.js.map} +1 -1
- package/dist/cdn/chunks/{emojiData-6m0DBh7O.js → emojiData-CBNuCfum.js} +2 -3
- package/dist/cdn/chunks/{emojiData-6m0DBh7O.js.map → emojiData-CBNuCfum.js.map} +1 -1
- package/dist/cdn/chunks/{en-CW71OK66.js → en-D14i5nFh.js} +2 -3
- package/dist/cdn/chunks/{en-CW71OK66.js.map → en-D14i5nFh.js.map} +1 -1
- package/dist/cdn/chunks/{en-CDhWRrF_.js → en-FzUuJ8HW.js} +2 -3
- package/dist/cdn/chunks/{en-CDhWRrF_.js.map → en-FzUuJ8HW.js.map} +1 -1
- package/dist/cdn/chunks/en-TIqv4ag3.js +1 -0
- package/dist/cdn/chunks/{es-CAv-Vldw.js → es-Dw_h7Oll.js} +2 -3
- package/dist/cdn/chunks/{es-CAv-Vldw.js.map → es-Dw_h7Oll.js.map} +1 -1
- package/dist/cdn/chunks/{es-DdK7zQfi.js → es-zDacbMhs.js} +2 -3
- package/dist/cdn/chunks/{es-DdK7zQfi.js.map → es-zDacbMhs.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-taJTZlLK.js → extensions-CFF2KWy-.js} +60 -65
- package/dist/cdn/chunks/{extensions-taJTZlLK.js.map → extensions-CFF2KWy-.js.map} +1 -1
- package/dist/cdn/chunks/{formatAbsoluteDateTime-DMmop3C-.js → formatAbsoluteDateTime-Ck2_zXra.js} +2 -3
- package/dist/cdn/chunks/{formatAbsoluteDateTime-DMmop3C-.js.map → formatAbsoluteDateTime-Ck2_zXra.js.map} +1 -1
- package/dist/cdn/chunks/{formatRelativeTime-CtUU-QZ8.js → formatRelativeTime-BTD8Ktt-.js} +1 -2
- package/dist/cdn/chunks/{formatRelativeTime-CtUU-QZ8.js.map → formatRelativeTime-BTD8Ktt-.js.map} +1 -1
- package/dist/cdn/chunks/{fr-DVPtxpR6.js → fr-BJaeKu_8.js} +2 -3
- package/dist/cdn/chunks/{fr-DVPtxpR6.js.map → fr-BJaeKu_8.js.map} +1 -1
- package/dist/cdn/chunks/{fr-Dz5Bgb7-.js → fr-CSgYtjOd.js} +2 -3
- package/dist/cdn/chunks/{fr-Dz5Bgb7-.js.map → fr-CSgYtjOd.js.map} +1 -1
- package/dist/cdn/chunks/{htmlparser-CDRsn-gn.js → htmlparser-hu3YnNQU.js} +6 -11
- package/dist/cdn/chunks/{htmlparser-CDRsn-gn.js.map → htmlparser-hu3YnNQU.js.map} +1 -1
- package/dist/cdn/chunks/{icons-DNX6StSs.js → icons-okSPsLOa.js} +111 -114
- package/dist/cdn/chunks/icons-okSPsLOa.js.map +1 -0
- package/dist/cdn/chunks/{ja-Di-zJiT8.js → ja-B7H3ID8O.js} +2 -3
- package/dist/cdn/chunks/{ja-Di-zJiT8.js.map → ja-B7H3ID8O.js.map} +1 -1
- package/dist/cdn/chunks/{ja-dcWzjStz.js → ja-Cu2HdYaK.js} +2 -3
- package/dist/cdn/chunks/{ja-dcWzjStz.js.map → ja-Cu2HdYaK.js.map} +1 -1
- package/dist/cdn/chunks/{keys-BTpmg2Tt.js → keys-CUj6UA38.js} +3 -4
- package/dist/cdn/chunks/{keys-BTpmg2Tt.js.map → keys-CUj6UA38.js.map} +1 -1
- package/dist/{liquid.browser-Ct2-EezB.js → cdn/chunks/liquid.browser-rubac0VA.js} +993 -937
- package/dist/cdn/chunks/liquid.browser-rubac0VA.js.map +1 -0
- package/dist/cdn/chunks/{logger-Tj0RPskW.js → logger-CqQTfJGx.js} +2 -3
- package/dist/cdn/chunks/{logger-Tj0RPskW.js.map → logger-CqQTfJGx.js.map} +1 -1
- package/dist/cdn/chunks/{nl-CvVuHYFL.js → nl-176ySmc5.js} +2 -3
- package/dist/cdn/chunks/{nl-CvVuHYFL.js.map → nl-176ySmc5.js.map} +1 -1
- package/dist/cdn/chunks/{nl-LZNqQgE4.js → nl-1Ai2NykB.js} +2 -3
- package/dist/cdn/chunks/{nl-LZNqQgE4.js.map → nl-1Ai2NykB.js.map} +1 -1
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-DyePIGqu.js → normalizeMergeTagMarkup-C_KlfSW4.js} +3 -4
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-DyePIGqu.js.map → normalizeMergeTagMarkup-C_KlfSW4.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dc-QLntG.js → preRenderCustomBlocks-BcXIz7oJ.js} +6 -7
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dc-QLntG.js.map → preRenderCustomBlocks-BcXIz7oJ.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-CHM-ZKvE.js → pt-BR-Bp92Fc6J.js} +2 -3
- package/dist/cdn/chunks/{pt-BR-CHM-ZKvE.js.map → pt-BR-Bp92Fc6J.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-D6P_mNwA.js → pt-BR-CIbp__Z7.js} +2 -3
- package/dist/cdn/chunks/{pt-BR-D6P_mNwA.js.map → pt-BR-CIbp__Z7.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-ZhO4vgyq.js → pt-BR-dDlTwX18.js} +2 -3
- package/dist/cdn/chunks/{pt-BR-ZhO4vgyq.js.map → pt-BR-dDlTwX18.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-Cs4GGEtd.js → pusher-x9rNqzon.js} +3 -4
- package/dist/cdn/chunks/{pusher-Cs4GGEtd.js.map → pusher-x9rNqzon.js.map} +1 -1
- package/dist/cdn/chunks/{readableTextColor-f8Kykfnh.js → readableTextColor-BfZUGnVj.js} +2 -3
- package/dist/cdn/chunks/{readableTextColor-f8Kykfnh.js.map → readableTextColor-BfZUGnVj.js.map} +1 -1
- package/dist/cdn/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
- package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js +72 -0
- package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js.map +1 -0
- package/dist/cdn/chunks/{socialIcons-BBvsTwCV.js → socialIcons-jsTDmkbb.js} +608 -632
- package/dist/cdn/chunks/{socialIcons-BBvsTwCV.js.map → socialIcons-jsTDmkbb.js.map} +1 -1
- package/dist/cdn/chunks/src-C7bkofBL.js +647 -0
- package/dist/cdn/chunks/src-C7bkofBL.js.map +1 -0
- package/dist/cdn/chunks/{src-Bs_yxk3h.js → src-DEd87i_U.js} +502 -537
- package/dist/cdn/chunks/src-DEd87i_U.js.map +1 -0
- package/dist/cdn/chunks/{src-BNFnxfrA.js → src-DwWrYnUj.js} +188 -171
- package/dist/cdn/chunks/src-DwWrYnUj.js.map +1 -0
- package/dist/cdn/chunks/{styleConstants-v1dNKgJf.js → styleConstants-B8xVRiwX.js} +2 -3
- package/dist/cdn/chunks/{styleConstants-v1dNKgJf.js.map → styleConstants-B8xVRiwX.js.map} +1 -1
- package/dist/cdn/chunks/{templateSettingsFields-YCFVBVYh.js → templateSettingsFields-cjlP-jdw.js} +2 -3
- package/dist/cdn/chunks/{templateSettingsFields-YCFVBVYh.js.map → templateSettingsFields-cjlP-jdw.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-CtVrAViq.js → tiptap-CbiTlECY.js} +3402 -3278
- package/dist/cdn/chunks/tiptap-CbiTlECY.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-AVXhzbhQ.js → useCloudI18n-DY8_-ETE.js} +4 -5
- package/dist/cdn/chunks/{useCloudI18n-AVXhzbhQ.js.map → useCloudI18n-DY8_-ETE.js.map} +1 -1
- package/dist/cdn/chunks/useEditorCore-BrY66C2y.js +2582 -0
- package/dist/cdn/chunks/useEditorCore-BrY66C2y.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-vjZJwKrV.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-CR5GjJD6.js.map → useEditorRoot-vjZJwKrV.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-CbVubQhM.js → useI18n-D8pY4LTq.js} +4 -5
- package/dist/cdn/chunks/{useI18n-CbVubQhM.js.map → useI18n-D8pY4LTq.js.map} +1 -1
- package/dist/{useLogicTag-DKLZ1T9H.js → cdn/chunks/useLogicTag-DBJDtpKA.js} +6 -5
- package/dist/cdn/chunks/{useLogicTag-B49Nc53Y.js.map → useLogicTag-DBJDtpKA.js.map} +1 -1
- package/dist/{useMergeTag-Bhdx7AKk.js → cdn/chunks/useMergeTag-B-aG--s1.js} +8 -7
- package/dist/cdn/chunks/{useMergeTag-B0KryMj8.js.map → useMergeTag-B-aG--s1.js.map} +1 -1
- package/dist/{usePopoverPosition-BZea45XK.js → cdn/chunks/usePopoverPosition-DSMtmu2W.js} +8 -10
- package/dist/cdn/chunks/{usePopoverPosition-C829ps5i.js.map → usePopoverPosition-DSMtmu2W.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CAwvulog.js → useScrollToBlock-vjQ0fe-L.js} +5 -7
- package/dist/cdn/chunks/{useScrollToBlock-CAwvulog.js.map → useScrollToBlock-vjQ0fe-L.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-DFPXeVfG.js → withCurrentFont-hZTvYBHO.js} +3 -4
- package/dist/cdn/chunks/{withCurrentFont-DFPXeVfG.js.map → withCurrentFont-hZTvYBHO.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1433 -1454
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-yYsp5Xpk.js → check-BZ8o0eet.js} +1 -2
- package/dist/{chevron-down-DTmD06_j.js → chevron-down-DfAAfILv.js} +1 -2
- package/dist/{chevron-right-BSeYZOxc.js → chevron-right-Bk4mGdr7.js} +1 -2
- package/dist/{chevron-up-BOApwrxi.js → chevron-up-MhUf_azW.js} +1 -2
- package/dist/{circle-alert-BMszY8im.js → circle-alert-CShJwVFv.js} +1 -2
- package/dist/{clock-HADxnl6-.js → clock-CTfD6OCt.js} +1 -2
- package/dist/{createCloudRuntime-DVQI_ReU.js → createCloudRuntime-DCgO4A1r.js} +31 -37
- package/dist/{createLucideIcon-0lYYH3EW.js → createLucideIcon-CvhTA2KG.js} +6 -11
- package/dist/{de-DBOTcDj2.js → de-6M4JoHoD.js} +1 -2
- package/dist/{de-DNuYQTmS.js → de-CeFJ6wbM.js} +1 -2
- package/dist/{de-JvCTMJPy.js → de-DtrXVcuY.js} +1 -2
- package/dist/{dist-BC-ZEYLd.js → dist-BF5zEHop.js} +2 -3
- package/dist/{dist-CyBwSiAa.js → dist-BS5uKktL.js} +2 -3
- package/dist/{cdn/chunks/dist-S-rLGqax.js → dist-ByCWA2Tv.js} +101 -101
- package/dist/{dist-DtOF3bDW.js → dist-CKi_npZM.js} +378 -343
- package/dist/{dist-C7EtxNCb.js → dist-CVy-7PHQ.js} +55 -56
- package/dist/{dist-Cr7RPxI9.js → dist-CWSG7Kj0.js} +478 -461
- package/dist/{dist-DXyGqIDE.js → dist-Cy8I5scI.js} +2 -3
- package/dist/{dist-C_dV9QAx.js → dist-D6cMdrfG.js} +133 -133
- package/dist/{dist-DVNjPKsH.js → dist-D6fZec6r.js} +3 -4
- package/dist/{dist-CuLwJF7H.js → dist-Dd5MU2Ev.js} +23 -14
- package/dist/dist-DyFArF_G.js +4 -0
- package/dist/{dist-DBxgrOeo.js → dist-V7W1UhVr.js} +1882 -1792
- package/dist/{dist-DPcf6XZ8.js → dist-p3wymUDt.js} +2 -3
- package/dist/dist-pA3ooG6N.js +4 -0
- package/dist/{dist-3HpYixwF.js → dist-txQLT2sF.js} +173 -161
- package/dist/{cdn/chunks/editor-modal-CI6EfeMd.js → editor-modal-zaZHcmlO.js} +915 -859
- package/dist/{emojiData-6m0DBh7O.js → emojiData-CBNuCfum.js} +1 -2
- package/dist/{en-CW71OK66.js → en-D14i5nFh.js} +1 -2
- package/dist/en-Db76vJbY.js +1 -0
- package/dist/{en-CDhWRrF_.js → en-FzUuJ8HW.js} +1 -2
- package/dist/{es-CAv-Vldw.js → es-Dw_h7Oll.js} +1 -2
- package/dist/{es-DdK7zQfi.js → es-zDacbMhs.js} +1 -2
- package/dist/{extensions-CdyweA50.js → extensions-fo_c-vqf.js} +82 -91
- package/dist/{eye-DWkSvYpj.js → eye-7W4t5e0Q.js} +1 -2
- package/dist/{formatAbsoluteDateTime-DMmop3C-.js → formatAbsoluteDateTime-Ck2_zXra.js} +1 -2
- package/dist/{formatRelativeTime-CtUU-QZ8.js → formatRelativeTime-BTD8Ktt-.js} +0 -1
- package/dist/{fr-DVPtxpR6.js → fr-BJaeKu_8.js} +1 -2
- package/dist/{fr-Dz5Bgb7-.js → fr-CSgYtjOd.js} +1 -2
- package/dist/{image-DesWjcZ4.js → image-BDiRFzSd.js} +1 -2
- package/dist/index.d.ts +6 -6
- package/dist/{info-ClWJGoZy.js → info-Cxi3-Kh9.js} +1 -2
- package/dist/{ja-Di-zJiT8.js → ja-B7H3ID8O.js} +1 -2
- package/dist/{ja-dcWzjStz.js → ja-Cu2HdYaK.js} +1 -2
- package/dist/{keys-Zd9KWRD1.js → keys-BgRERHzu.js} +2 -3
- package/dist/{link-BqRicFTA.js → link-ju_2Cmir.js} +1 -2
- package/dist/{cdn/chunks/liquid.browser-Bbt17cVz.js → liquid.browser-DUXEekoN.js} +991 -939
- package/dist/{list-bojQr9bn.js → list-DYZJf0aZ.js} +1 -2
- package/dist/{loader-circle-B2B8LbUu.js → loader-circle-BZRD0a4I.js} +1 -2
- package/dist/{logger-k9Nbj3Cp.js → logger-BOu7oEtk.js} +1 -2
- package/dist/{message-circle-BEuiNsyZ.js → message-circle-DuEw4Zfx.js} +1 -2
- package/dist/{nl-CvVuHYFL.js → nl-176ySmc5.js} +1 -2
- package/dist/{nl-LZNqQgE4.js → nl-1Ai2NykB.js} +1 -2
- package/dist/{normalizeMergeTagMarkup-P6SUBuPv.js → normalizeMergeTagMarkup-CELnOlgK.js} +30 -31
- package/dist/{package-DCROB4aM.js → package-CePMr2kK.js} +1 -2
- package/dist/{pencil-CEotCKbf.js → pencil-D3aFCL7c.js} +1 -2
- package/dist/{preRenderCustomBlocks-D8rr61_z.js → preRenderCustomBlocks--_xc0XK3.js} +4 -5
- package/dist/{pt-BR-CHM-ZKvE.js → pt-BR-Bp92Fc6J.js} +1 -2
- package/dist/{pt-BR-D6P_mNwA.js → pt-BR-CIbp__Z7.js} +1 -2
- package/dist/{pt-BR-ZhO4vgyq.js → pt-BR-dDlTwX18.js} +1 -2
- package/dist/{readableTextColor-f8Kykfnh.js → readableTextColor-BfZUGnVj.js} +1 -2
- package/dist/{refresh-cw-C6M2mHNC.js → refresh-cw-xnro7_Sk.js} +1 -2
- package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/dist/{runtime-dom.esm-bundler-B8WCZWUm.js → runtime-dom.esm-bundler-BURR-bj5.js} +121 -122
- package/dist/sanitizeHtml-BzfzpYJY.js +942 -0
- package/dist/{search-Cy99zPYf.js → search-CDrstRBv.js} +1 -2
- package/dist/{send-BDLJFsf3.js → send-DROkPOaX.js} +1 -2
- package/dist/{smartphone-CVvQaNA4.js → smartphone-Bx6u_tjn.js} +1 -2
- package/dist/{socialIcons-Dd-jRiVe.js → socialIcons-D7MGsg0d.js} +553 -564
- package/dist/{sparkles-Ce0Qz0ox.js → sparkles-CdaTtvoz.js} +1 -2
- package/dist/{square-BWlolnXe.js → square-BbCROH_f.js} +1 -2
- package/dist/style.css +1 -1
- package/dist/{styleConstants-v1dNKgJf.js → styleConstants-B8xVRiwX.js} +1 -2
- package/dist/{templateSettingsFields-YCFVBVYh.js → templateSettingsFields-cjlP-jdw.js} +1 -2
- package/dist/templatical-editor.js +1231 -1251
- package/dist/{text-align-start-D1V5gPTy.js → text-align-start-CGacJ9Vw.js} +1 -2
- package/dist/{trash-CZfiUFmw.js → trash-DxCd7zIy.js} +1 -2
- package/dist/{triangle-alert-CFDzyFC7.js → triangle-alert-7_oaitpf.js} +1 -2
- package/dist/{upload-BJfvdIrD.js → upload-DuFEOi_0.js} +1 -2
- package/dist/{useCloudI18n-Dcjua65H.js → useCloudI18n-DEMmUKuO.js} +3 -4
- package/dist/{useEditorCore-BTLeAVlM.js → useEditorCore-BSo2sSID.js} +1568 -1573
- package/dist/useEditorRoot-BMcoCLBx.js +7 -0
- package/dist/{useI18n-BdoY7xDE.js → useI18n-BBrHTdu8.js} +3 -4
- package/dist/{cdn/chunks/useLogicTag-B49Nc53Y.js → useLogicTag-ZPC39rfH.js} +4 -7
- package/dist/{cdn/chunks/useMergeTag-B0KryMj8.js → useMergeTag-BQ4qqWpQ.js} +6 -9
- package/dist/{cdn/chunks/usePopoverPosition-C829ps5i.js → usePopoverPosition-DV1PxL66.js} +6 -12
- package/dist/{useScrollToBlock-FmNMALM_.js → useScrollToBlock-BSyAV4pk.js} +4 -6
- package/dist/{vue.runtime.esm-bundler-DgFJ6GPG.js → vue.runtime.esm-bundler-CnEeTfhs.js} +1001 -1002
- package/dist/{withCurrentFont-BATJHNve.js → withCurrentFont-B22FXAF5.js} +2 -3
- package/dist/{x-CZ0Js0hA.js → x-BpfG7v9g.js} +1 -2
- package/package.json +26 -24
- package/dist/BlockIssueBadge-CKwZ1Vgn.js +0 -34
- package/dist/CommentsSidebar-Ca3DyFOX.js +0 -500
- package/dist/IssuesPanel-C8nMUccy.js +0 -360
- package/dist/SavedBlocksBrowserModal-wnkvxpm_.js +0 -360
- package/dist/WrapperBlock-BO619LAb.js +0 -45
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-DAn2vsMJ.js +0 -35
- package/dist/cdn/chunks/BlockIssueBadge-DAn2vsMJ.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js.map +0 -1
- package/dist/cdn/chunks/LoadingTrack-BIcL4NiY.js +0 -12
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +0 -357
- package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js.map +0 -1
- package/dist/cdn/chunks/TplModal-BXQzmsJX.js +0 -52
- package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +0 -22
- package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js.map +0 -1
- package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +0 -1
- package/dist/cdn/chunks/en-ifvu6oPv.js +0 -1
- package/dist/cdn/chunks/icons-DNX6StSs.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-Bbt17cVz.js.map +0 -1
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +0 -62
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +0 -1
- package/dist/cdn/chunks/src-BNFnxfrA.js.map +0 -1
- package/dist/cdn/chunks/src-Bs_yxk3h.js.map +0 -1
- package/dist/cdn/chunks/src-YGkzYyu0.js +0 -649
- package/dist/cdn/chunks/src-YGkzYyu0.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CtVrAViq.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +0 -2586
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +0 -10
- package/dist/dist-BPFcLKTw.js +0 -5
- package/dist/dist-D7Yj7E-F.js +0 -5
- package/dist/en-DwV15ltA.js +0 -1
- package/dist/sanitizeRichTextHtml-DeISfLFr.js +0 -60
- package/dist/useEditorRoot-DUy67lJu.js +0 -8
|
@@ -1,10 +1,82 @@
|
|
|
1
|
-
import { $ as e, C as t,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { $ as e, C as t, F as n, H as r, J as i, M as a, Mt as o, N as s, Nt as c, O as l, U as u, X as d, _ as f, a as p, at as m, c as h, d as g, f as _, g as v, j as y, jt as b, l as x, r as S, rt as C, st as w, u as T, v as E, y as D, z as O } from "./vue.runtime.esm-bundler-CnEeTfhs.js";
|
|
2
|
+
import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-BURR-bj5.js";
|
|
3
|
+
import { h as N } from "./dist-CVy-7PHQ.js";
|
|
4
|
+
import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-ByCWA2Tv.js";
|
|
5
|
+
import { t as B } from "./createLucideIcon-CvhTA2KG.js";
|
|
6
|
+
import { t as V } from "./check-BZ8o0eet.js";
|
|
7
|
+
import { t as ee } from "./chevron-right-Bk4mGdr7.js";
|
|
8
|
+
import { n as te, t as ne } from "./upload-DuFEOi_0.js";
|
|
9
|
+
import { t as re } from "./link-ju_2Cmir.js";
|
|
10
|
+
import { t as ie } from "./list-DYZJf0aZ.js";
|
|
11
|
+
import { t as H } from "./loader-circle-BZRD0a4I.js";
|
|
12
|
+
import { t as U } from "./pencil-D3aFCL7c.js";
|
|
13
|
+
import { n as W, t as G } from "./refresh-cw-xnro7_Sk.js";
|
|
14
|
+
import { t as ae } from "./search-CDrstRBv.js";
|
|
15
|
+
import { t as oe } from "./trash-DxCd7zIy.js";
|
|
16
|
+
import { t as se } from "./x-BpfG7v9g.js";
|
|
17
|
+
import { t as K } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
18
|
+
var q = B({
|
|
19
|
+
name: "file",
|
|
20
|
+
size: 24,
|
|
21
|
+
node: [["path", {
|
|
22
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
23
|
+
key: "1oefj6"
|
|
24
|
+
}], ["path", {
|
|
25
|
+
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
26
|
+
key: "wfsgrz"
|
|
27
|
+
}]]
|
|
28
|
+
}), J = B({
|
|
29
|
+
name: "folder",
|
|
30
|
+
size: 24,
|
|
31
|
+
node: [["path", {
|
|
32
|
+
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
|
+
key: "1kt360"
|
|
34
|
+
}]]
|
|
35
|
+
}), ce = B({
|
|
36
|
+
name: "grid-2x2",
|
|
37
|
+
size: 24,
|
|
38
|
+
node: [
|
|
39
|
+
["path", {
|
|
40
|
+
d: "M12 3v18",
|
|
41
|
+
key: "108xh3"
|
|
42
|
+
}],
|
|
43
|
+
["path", {
|
|
44
|
+
d: "M3 12h18",
|
|
45
|
+
key: "1i2n21"
|
|
46
|
+
}],
|
|
47
|
+
["rect", {
|
|
48
|
+
x: "3",
|
|
49
|
+
y: "3",
|
|
50
|
+
width: "18",
|
|
51
|
+
height: "18",
|
|
52
|
+
rx: "2",
|
|
53
|
+
key: "h1oib"
|
|
54
|
+
}]
|
|
55
|
+
],
|
|
56
|
+
aliases: ["grid-2-x-2"]
|
|
57
|
+
}), Y = B({
|
|
58
|
+
name: "panel-left",
|
|
59
|
+
size: 24,
|
|
60
|
+
node: [["rect", {
|
|
61
|
+
width: "18",
|
|
62
|
+
height: "18",
|
|
63
|
+
x: "3",
|
|
64
|
+
y: "3",
|
|
65
|
+
rx: "2",
|
|
66
|
+
key: "afitv7"
|
|
67
|
+
}], ["path", {
|
|
68
|
+
d: "M9 3v18",
|
|
69
|
+
key: "fh3hqa"
|
|
70
|
+
}]],
|
|
71
|
+
aliases: ["sidebar"]
|
|
72
|
+
}), le = B({
|
|
73
|
+
name: "star",
|
|
74
|
+
size: 24,
|
|
75
|
+
node: [["path", {
|
|
76
|
+
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
|
+
key: "r04s7s"
|
|
78
|
+
}]]
|
|
79
|
+
}), ue = Symbol("templaticalMediaLimits"), X = Symbol("templaticalMediaPopoverTarget"), de = Symbol("templaticalMediaTranslations"), fe = Symbol("templaticalMediaUiTheme"), Z = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
|
|
8
80
|
title: "Media Library",
|
|
9
81
|
searchPlaceholder: "Search files...",
|
|
10
82
|
allFiles: "All Files",
|
|
@@ -97,38 +169,36 @@ var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTa
|
|
|
97
169
|
deleteFolderConfirm: "Confirm delete",
|
|
98
170
|
storageTooltip: "{used} of {total} used ({remaining} remaining)"
|
|
99
171
|
} };
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
function i(e, t) {
|
|
172
|
+
// ../media-library/src/composables/useI18n.ts
|
|
173
|
+
function Q(e) {
|
|
174
|
+
let n = e ?? t(de, null), r = (i(n) ? n.value : n) ?? pe;
|
|
175
|
+
function a(e, t) {
|
|
105
176
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
106
177
|
}
|
|
107
178
|
return {
|
|
108
179
|
t: r,
|
|
109
|
-
format:
|
|
180
|
+
format: a
|
|
110
181
|
};
|
|
111
182
|
}
|
|
112
|
-
|
|
113
|
-
//#region ../media-library/src/composables/useMediaCategories.ts
|
|
183
|
+
// ../media-library/src/composables/useMediaCategories.ts
|
|
114
184
|
var me = [
|
|
115
185
|
"images",
|
|
116
186
|
"documents",
|
|
117
187
|
"videos",
|
|
118
188
|
"audio"
|
|
119
189
|
];
|
|
120
|
-
function
|
|
121
|
-
let
|
|
122
|
-
if (!
|
|
123
|
-
let r =
|
|
190
|
+
function he(e) {
|
|
191
|
+
let n = e ?? t(ue, null);
|
|
192
|
+
if (!n) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
|
|
193
|
+
let r = n, i = h(() => !0), a = h(() => r.maxFileSize ?? Infinity), o = h(() => {
|
|
124
194
|
let e = r.accept;
|
|
125
195
|
if (e && e.length > 0) return e;
|
|
126
196
|
let t = r.mimeTypes;
|
|
127
197
|
return t ? Object.keys(t) : me;
|
|
128
|
-
}), s =
|
|
198
|
+
}), s = h(() => {
|
|
129
199
|
let e = r.mimeTypes;
|
|
130
200
|
return e ? o.value.flatMap((t) => e[t] ?? []) : [];
|
|
131
|
-
}), c =
|
|
201
|
+
}), c = h(() => s.value.join(",")), l = h(() => r.mimeTypes !== void 0);
|
|
132
202
|
function u(e, t) {
|
|
133
203
|
let n = r.mimeTypes;
|
|
134
204
|
return !n || (t && t.length > 0 ? t : Object.keys(n)).some((t) => n[t]?.includes(e) ?? !1);
|
|
@@ -159,10 +229,9 @@ function Q(e) {
|
|
|
159
229
|
getCategoryForMimeType: p
|
|
160
230
|
};
|
|
161
231
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
function ge(e, t) {
|
|
232
|
+
// ../media-library/src/composables/useFocusTrap.ts
|
|
233
|
+
var ge = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
234
|
+
function _e(e, t) {
|
|
166
235
|
let n = null, r = null, i = null;
|
|
167
236
|
function a(e) {
|
|
168
237
|
if (!e) return document;
|
|
@@ -170,7 +239,7 @@ function ge(e, t) {
|
|
|
170
239
|
return t && "activeElement" in t ? t : document;
|
|
171
240
|
}
|
|
172
241
|
function o() {
|
|
173
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
242
|
+
return e.value ? Array.from(e.value.querySelectorAll(ge)).filter((e) => e.offsetParent !== null) : [];
|
|
174
243
|
}
|
|
175
244
|
function s(t) {
|
|
176
245
|
if (t.key !== "Tab") return;
|
|
@@ -191,23 +260,22 @@ function ge(e, t) {
|
|
|
191
260
|
let t = e.restoreFocus !== !1;
|
|
192
261
|
i !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(i), i = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
|
|
193
262
|
}
|
|
194
|
-
let
|
|
263
|
+
let u = O([t, e], ([e, t]) => {
|
|
195
264
|
e && t ? c() : l();
|
|
196
265
|
}, { flush: "post" });
|
|
197
|
-
|
|
198
|
-
|
|
266
|
+
d(() => {
|
|
267
|
+
u(), l();
|
|
199
268
|
});
|
|
200
269
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
var _e = {
|
|
270
|
+
// ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
271
|
+
var ve = {
|
|
204
272
|
key: 0,
|
|
205
273
|
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
|
|
206
274
|
style: { color: "var(--tpl-text-muted)" }
|
|
207
|
-
},
|
|
275
|
+
}, ye = ["onClick"], be = {
|
|
208
276
|
key: 1,
|
|
209
277
|
style: { color: "var(--tpl-text)" }
|
|
210
|
-
},
|
|
278
|
+
}, xe = /* @__PURE__ */ D({
|
|
211
279
|
__name: "MediaBreadcrumb",
|
|
212
280
|
props: {
|
|
213
281
|
folders: {},
|
|
@@ -215,39 +283,39 @@ var _e = {
|
|
|
215
283
|
},
|
|
216
284
|
emits: ["navigate"],
|
|
217
285
|
setup(e, { emit: t }) {
|
|
218
|
-
let n = e, r = t, { t:
|
|
286
|
+
let n = e, r = t, { t: i } = Q(), a = h(() => {
|
|
219
287
|
if (!n.currentFolderId) return [];
|
|
220
288
|
let e = [];
|
|
221
|
-
return
|
|
289
|
+
return o(n.folders, n.currentFolderId, e), e;
|
|
222
290
|
});
|
|
223
|
-
function
|
|
291
|
+
function o(e, t, n) {
|
|
224
292
|
for (let r of e) {
|
|
225
293
|
if (r.id === t) return n.push(r), !0;
|
|
226
|
-
if (
|
|
294
|
+
if (o(r.children, t, n)) return n.unshift(r), !0;
|
|
227
295
|
}
|
|
228
296
|
return !1;
|
|
229
297
|
}
|
|
230
|
-
return (e, t) =>
|
|
298
|
+
return (e, t) => a.value.length > 0 ? (y(), _("div", ve, [x("button", {
|
|
231
299
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
232
300
|
style: { color: "var(--tpl-primary)" },
|
|
233
301
|
onClick: t[0] ||= (e) => r("navigate", null)
|
|
234
|
-
},
|
|
302
|
+
}, c(w(i).mediaLibrary.allFiles), 1), (y(!0), _(S, null, s(a.value, (e, t) => (y(), _(S, { key: e.id }, [f(w(ee), {
|
|
235
303
|
size: 12,
|
|
236
304
|
"stroke-width": 2
|
|
237
|
-
}), t <
|
|
305
|
+
}), t < a.value.length - 1 ? (y(), _("button", {
|
|
238
306
|
key: 0,
|
|
239
307
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
240
308
|
style: { color: "var(--tpl-primary)" },
|
|
241
309
|
onClick: (t) => r("navigate", e.id)
|
|
242
|
-
},
|
|
310
|
+
}, c(e.name), 9, ye)) : (y(), _("span", be, c(e.name), 1))], 64))), 128))])) : g("", !0);
|
|
243
311
|
}
|
|
244
|
-
}),
|
|
312
|
+
}), Se = ["aria-expanded", "aria-label"], Ce = {
|
|
245
313
|
key: 1,
|
|
246
314
|
class: "tpl:size-4 tpl:shrink-0"
|
|
247
|
-
},
|
|
315
|
+
}, we = {
|
|
248
316
|
key: 0,
|
|
249
317
|
class: "tpl:truncate"
|
|
250
|
-
},
|
|
318
|
+
}, Te = ["onKeydown"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = ["title", "aria-label"], ke = { key: 0 }, Ae = ["placeholder", "onKeydown"], je = /* @__PURE__ */ D({
|
|
251
319
|
__name: "MediaFolderTreeNode",
|
|
252
320
|
props: {
|
|
253
321
|
folder: {},
|
|
@@ -263,76 +331,76 @@ var _e = {
|
|
|
263
331
|
"renameFolder",
|
|
264
332
|
"deleteFolder"
|
|
265
333
|
],
|
|
266
|
-
setup(t, { emit:
|
|
267
|
-
let
|
|
334
|
+
setup(t, { emit: r }) {
|
|
335
|
+
let i = t, a = r, { t: l } = Q(), d = e(!1), p = e(!1), m = e(""), v = e(!1), C = e(""), E = e(!1), D = h(() => i.folder.children.length > 0), O = h(() => i.depth < 4), M = h(() => i.currentFolderId === i.folder.id), N = h(() => i.currentFolderId ? F(i.folder.children, i.currentFolderId) : !1), P = h(() => d.value || N.value);
|
|
268
336
|
function F(e, t) {
|
|
269
337
|
for (let n of e) if (n.id === t || F(n.children, t)) return !0;
|
|
270
338
|
return !1;
|
|
271
339
|
}
|
|
272
340
|
function I() {
|
|
273
|
-
|
|
341
|
+
d.value = !d.value;
|
|
274
342
|
}
|
|
275
343
|
function L() {
|
|
276
|
-
|
|
344
|
+
p.value = !0, m.value = i.folder.name;
|
|
277
345
|
}
|
|
278
346
|
function R() {
|
|
279
|
-
let e =
|
|
280
|
-
e && e !==
|
|
347
|
+
let e = m.value.trim();
|
|
348
|
+
e && e !== i.folder.name && a("renameFolder", i.folder.id, e), p.value = !1, m.value = "";
|
|
281
349
|
}
|
|
282
350
|
function z() {
|
|
283
|
-
|
|
351
|
+
p.value = !1, m.value = "";
|
|
284
352
|
}
|
|
285
353
|
function B() {
|
|
286
|
-
|
|
354
|
+
v.value = !0, C.value = "", d.value = !0;
|
|
287
355
|
}
|
|
288
|
-
function
|
|
289
|
-
|
|
356
|
+
function V() {
|
|
357
|
+
C.value.trim() && a("createFolder", C.value.trim(), i.folder.id), v.value = !1, C.value = "";
|
|
290
358
|
}
|
|
291
|
-
function
|
|
292
|
-
|
|
359
|
+
function te() {
|
|
360
|
+
v.value = !1, C.value = "";
|
|
293
361
|
}
|
|
294
|
-
function
|
|
295
|
-
|
|
362
|
+
function ne() {
|
|
363
|
+
E.value ? (a("deleteFolder", i.folder.id), E.value = !1) : E.value = !0;
|
|
296
364
|
}
|
|
297
|
-
function
|
|
365
|
+
function re(e) {
|
|
298
366
|
let t = e.relatedTarget;
|
|
299
|
-
t && e.currentTarget.contains(t) || (
|
|
367
|
+
t && e.currentTarget.contains(t) || (E.value = !1);
|
|
300
368
|
}
|
|
301
|
-
return (e,
|
|
302
|
-
let
|
|
303
|
-
return
|
|
369
|
+
return (e, r) => {
|
|
370
|
+
let i = n("MediaFolderTreeNode", !0);
|
|
371
|
+
return y(), _("div", null, [x("div", {
|
|
304
372
|
class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
305
|
-
style:
|
|
373
|
+
style: o({
|
|
306
374
|
paddingLeft: `${t.depth * 16 + 8}px`,
|
|
307
|
-
backgroundColor:
|
|
308
|
-
color:
|
|
375
|
+
backgroundColor: M.value ? "var(--tpl-bg-active)" : "transparent",
|
|
376
|
+
color: M.value ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
309
377
|
}),
|
|
310
|
-
onFocusout:
|
|
378
|
+
onFocusout: re
|
|
311
379
|
}, [
|
|
312
|
-
|
|
380
|
+
D.value || v.value ? (y(), _("button", {
|
|
313
381
|
key: 0,
|
|
314
382
|
type: "button",
|
|
315
383
|
class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
316
384
|
"aria-expanded": P.value,
|
|
317
|
-
"aria-label": P.value ?
|
|
318
|
-
onClick:
|
|
319
|
-
}, [
|
|
320
|
-
class:
|
|
385
|
+
"aria-label": P.value ? w(l).mediaLibrary.collapseFolder : w(l).mediaLibrary.expandFolder,
|
|
386
|
+
onClick: A(I, ["stop"])
|
|
387
|
+
}, [f(w(ee), {
|
|
388
|
+
class: b(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
|
|
321
389
|
size: 10,
|
|
322
390
|
"stroke-width": 2
|
|
323
|
-
}, null, 8, ["class"])], 8,
|
|
324
|
-
|
|
391
|
+
}, null, 8, ["class"])], 8, Se)) : (y(), _("span", Ce)),
|
|
392
|
+
x("button", {
|
|
325
393
|
type: "button",
|
|
326
394
|
class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
|
|
327
|
-
onClick:
|
|
328
|
-
}, [
|
|
395
|
+
onClick: r[0] ||= (e) => a("navigate", t.folder.id)
|
|
396
|
+
}, [f(w(J), {
|
|
329
397
|
class: "tpl:shrink-0",
|
|
330
398
|
size: 14,
|
|
331
399
|
"stroke-width": 1.5
|
|
332
|
-
}),
|
|
333
|
-
|
|
400
|
+
}), p.value ? g("", !0) : (y(), _("span", we, c(t.folder.name), 1))]),
|
|
401
|
+
p.value ? u((y(), _("input", {
|
|
334
402
|
key: 2,
|
|
335
|
-
"onUpdate:modelValue":
|
|
403
|
+
"onUpdate:modelValue": r[1] ||= (e) => m.value = e,
|
|
336
404
|
type: "text",
|
|
337
405
|
class: "tpl:min-w-0 tpl:flex-1 tpl:rounded tpl:border tpl:px-1.5 tpl:py-0.5 tpl:text-xs tpl:outline-none",
|
|
338
406
|
style: {
|
|
@@ -341,51 +409,51 @@ var _e = {
|
|
|
341
409
|
color: "var(--tpl-text)"
|
|
342
410
|
},
|
|
343
411
|
autofocus: "",
|
|
344
|
-
onKeydown: [
|
|
412
|
+
onKeydown: [j(R, ["enter"]), j(A(z, ["stop"]), ["escape"])],
|
|
345
413
|
onBlur: R,
|
|
346
|
-
onClick:
|
|
347
|
-
}, null, 40,
|
|
348
|
-
|
|
414
|
+
onClick: r[2] ||= A(() => {}, ["stop"])
|
|
415
|
+
}, null, 40, Te)), [[k, m.value]]) : g("", !0),
|
|
416
|
+
p.value ? g("", !0) : (y(), _("span", {
|
|
349
417
|
key: 3,
|
|
350
|
-
class:
|
|
418
|
+
class: b(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", M.value || E.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
|
|
351
419
|
}, [
|
|
352
|
-
|
|
420
|
+
O.value && t.canCreateFolder ? (y(), _("button", {
|
|
353
421
|
key: 0,
|
|
354
422
|
type: "button",
|
|
355
423
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
356
|
-
title:
|
|
357
|
-
"aria-label":
|
|
358
|
-
onClick:
|
|
359
|
-
}, [
|
|
424
|
+
title: w(l).mediaLibrary.addSubfolder,
|
|
425
|
+
"aria-label": w(l).mediaLibrary.addSubfolder,
|
|
426
|
+
onClick: A(B, ["stop"])
|
|
427
|
+
}, [f(w(W), {
|
|
360
428
|
size: 12,
|
|
361
429
|
"stroke-width": 2
|
|
362
|
-
})], 8,
|
|
363
|
-
t.canRenameFolder ? (
|
|
430
|
+
})], 8, Ee)) : g("", !0),
|
|
431
|
+
t.canRenameFolder ? (y(), _("button", {
|
|
364
432
|
key: 1,
|
|
365
433
|
type: "button",
|
|
366
434
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
367
|
-
title:
|
|
368
|
-
"aria-label":
|
|
369
|
-
onClick:
|
|
370
|
-
}, [
|
|
435
|
+
title: w(l).mediaLibrary.renameFolder,
|
|
436
|
+
"aria-label": w(l).mediaLibrary.renameFolder,
|
|
437
|
+
onClick: A(L, ["stop"])
|
|
438
|
+
}, [f(w(U), {
|
|
371
439
|
size: 12,
|
|
372
440
|
"stroke-width": 2
|
|
373
|
-
})], 8,
|
|
374
|
-
t.canDeleteFolder ? (
|
|
441
|
+
})], 8, De)) : g("", !0),
|
|
442
|
+
t.canDeleteFolder ? (y(), _("button", {
|
|
375
443
|
key: 2,
|
|
376
444
|
type: "button",
|
|
377
445
|
"data-testid": "media-folder-delete",
|
|
378
446
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
379
|
-
title:
|
|
380
|
-
"aria-label":
|
|
381
|
-
onClick:
|
|
382
|
-
}, [
|
|
447
|
+
title: E.value ? w(l).mediaLibrary.deleteFolderConfirm : w(l).mediaLibrary.deleteFolder,
|
|
448
|
+
"aria-label": E.value ? w(l).mediaLibrary.deleteFolderConfirm : w(l).mediaLibrary.deleteFolder,
|
|
449
|
+
onClick: A(ne, ["stop"])
|
|
450
|
+
}, [f(w(oe), {
|
|
383
451
|
size: 12,
|
|
384
452
|
"stroke-width": 2,
|
|
385
453
|
style: { color: "var(--tpl-danger)" }
|
|
386
|
-
})], 8,
|
|
454
|
+
})], 8, Oe)) : g("", !0)
|
|
387
455
|
], 2))
|
|
388
|
-
], 36), P.value ? (
|
|
456
|
+
], 36), P.value ? (y(), _("div", ke, [(y(!0), _(S, null, s(t.folder.children, (e) => (y(), T(i, {
|
|
389
457
|
key: e.id,
|
|
390
458
|
folder: e,
|
|
391
459
|
"current-folder-id": t.currentFolderId,
|
|
@@ -393,10 +461,10 @@ var _e = {
|
|
|
393
461
|
"can-create-folder": t.canCreateFolder,
|
|
394
462
|
"can-rename-folder": t.canRenameFolder,
|
|
395
463
|
"can-delete-folder": t.canDeleteFolder,
|
|
396
|
-
onNavigate:
|
|
397
|
-
onCreateFolder:
|
|
398
|
-
onRenameFolder:
|
|
399
|
-
onDeleteFolder:
|
|
464
|
+
onNavigate: r[3] ||= (e) => a("navigate", e),
|
|
465
|
+
onCreateFolder: r[4] ||= (e, t) => a("createFolder", e, t),
|
|
466
|
+
onRenameFolder: r[5] ||= (e, t) => a("renameFolder", e, t),
|
|
467
|
+
onDeleteFolder: r[6] ||= (e) => a("deleteFolder", e)
|
|
400
468
|
}, null, 8, [
|
|
401
469
|
"folder",
|
|
402
470
|
"current-folder-id",
|
|
@@ -404,12 +472,12 @@ var _e = {
|
|
|
404
472
|
"can-create-folder",
|
|
405
473
|
"can-rename-folder",
|
|
406
474
|
"can-delete-folder"
|
|
407
|
-
]))), 128)),
|
|
475
|
+
]))), 128)), v.value ? (y(), _("div", {
|
|
408
476
|
key: 0,
|
|
409
|
-
style:
|
|
477
|
+
style: o({ paddingLeft: `${(t.depth + 1) * 16 + 8}px` }),
|
|
410
478
|
class: "tpl:py-1.5 tpl:pr-2"
|
|
411
|
-
}, [
|
|
412
|
-
"onUpdate:modelValue":
|
|
479
|
+
}, [u(x("input", {
|
|
480
|
+
"onUpdate:modelValue": r[7] ||= (e) => C.value = e,
|
|
413
481
|
type: "text",
|
|
414
482
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
415
483
|
style: {
|
|
@@ -417,20 +485,20 @@ var _e = {
|
|
|
417
485
|
"background-color": "var(--tpl-bg)",
|
|
418
486
|
color: "var(--tpl-text)"
|
|
419
487
|
},
|
|
420
|
-
placeholder:
|
|
488
|
+
placeholder: w(l).mediaLibrary.subfolderName,
|
|
421
489
|
autofocus: "",
|
|
422
|
-
onKeydown: [
|
|
423
|
-
onBlur:
|
|
424
|
-
}, null, 40,
|
|
490
|
+
onKeydown: [j(V, ["enter"]), j(A(te, ["stop"]), ["escape"])],
|
|
491
|
+
onBlur: V
|
|
492
|
+
}, null, 40, Ae), [[k, C.value]])], 4)) : g("", !0)])) : g("", !0)]);
|
|
425
493
|
};
|
|
426
494
|
}
|
|
427
|
-
}),
|
|
495
|
+
}), Me = {
|
|
428
496
|
"data-testid": "media-folder-tree",
|
|
429
497
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto"
|
|
430
|
-
},
|
|
498
|
+
}, Ne = {
|
|
431
499
|
key: 0,
|
|
432
500
|
class: "tpl:px-3 tpl:py-2"
|
|
433
|
-
},
|
|
501
|
+
}, Pe = ["placeholder", "onKeydown"], Fe = /* @__PURE__ */ D({
|
|
434
502
|
__name: "MediaFolderTree",
|
|
435
503
|
props: {
|
|
436
504
|
folders: {},
|
|
@@ -449,29 +517,29 @@ var _e = {
|
|
|
449
517
|
"showFrequentlyUsed"
|
|
450
518
|
],
|
|
451
519
|
setup(t, { emit: n }) {
|
|
452
|
-
let r = n, { t:
|
|
453
|
-
function
|
|
454
|
-
|
|
520
|
+
let r = n, { t: i } = Q(), a = e(!1), l = e("");
|
|
521
|
+
function d() {
|
|
522
|
+
a.value = !0, l.value = "";
|
|
455
523
|
}
|
|
456
|
-
function
|
|
457
|
-
|
|
524
|
+
function p() {
|
|
525
|
+
l.value.trim() && r("createFolder", l.value.trim()), a.value = !1, l.value = "";
|
|
458
526
|
}
|
|
459
|
-
function
|
|
460
|
-
|
|
527
|
+
function m() {
|
|
528
|
+
a.value = !1, l.value = "";
|
|
461
529
|
}
|
|
462
|
-
return (e, n) => (
|
|
463
|
-
|
|
530
|
+
return (e, n) => (y(), _("div", Me, [
|
|
531
|
+
x("button", {
|
|
464
532
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
465
|
-
style:
|
|
533
|
+
style: o({
|
|
466
534
|
backgroundColor: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
|
|
467
535
|
color: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
468
536
|
}),
|
|
469
537
|
onClick: n[0] ||= (e) => r("navigate", null)
|
|
470
|
-
}, [
|
|
538
|
+
}, [f(w(q), {
|
|
471
539
|
size: 14,
|
|
472
540
|
"stroke-width": 1.5
|
|
473
|
-
}),
|
|
474
|
-
(
|
|
541
|
+
}), v(" " + c(w(i).mediaLibrary.allFiles), 1)], 4),
|
|
542
|
+
(y(!0), _(S, null, s(t.folders, (e) => (y(), T(je, {
|
|
475
543
|
key: e.id,
|
|
476
544
|
folder: e,
|
|
477
545
|
"current-folder-id": t.currentFolderId,
|
|
@@ -490,8 +558,8 @@ var _e = {
|
|
|
490
558
|
"can-rename-folder",
|
|
491
559
|
"can-delete-folder"
|
|
492
560
|
]))), 128)),
|
|
493
|
-
|
|
494
|
-
"onUpdate:modelValue": n[5] ||= (e) =>
|
|
561
|
+
a.value ? (y(), _("div", Ne, [u(x("input", {
|
|
562
|
+
"onUpdate:modelValue": n[5] ||= (e) => l.value = e,
|
|
495
563
|
type: "text",
|
|
496
564
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
497
565
|
style: {
|
|
@@ -499,38 +567,38 @@ var _e = {
|
|
|
499
567
|
"background-color": "var(--tpl-bg)",
|
|
500
568
|
color: "var(--tpl-text)"
|
|
501
569
|
},
|
|
502
|
-
placeholder:
|
|
570
|
+
placeholder: w(i).mediaLibrary.folderName,
|
|
503
571
|
autofocus: "",
|
|
504
|
-
onKeydown: [
|
|
505
|
-
onBlur:
|
|
506
|
-
}, null, 40,
|
|
507
|
-
!
|
|
572
|
+
onKeydown: [j(p, ["enter"]), j(A(m, ["stop"]), ["escape"])],
|
|
573
|
+
onBlur: p
|
|
574
|
+
}, null, 40, Pe), [[k, l.value]])])) : g("", !0),
|
|
575
|
+
!a.value && t.canCreateFolder ? (y(), _("button", {
|
|
508
576
|
key: 1,
|
|
509
577
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
510
578
|
style: { color: "var(--tpl-text-muted)" },
|
|
511
|
-
onClick:
|
|
512
|
-
}, [
|
|
579
|
+
onClick: d
|
|
580
|
+
}, [f(w(W), {
|
|
513
581
|
size: 14,
|
|
514
582
|
"stroke-width": 1.5
|
|
515
|
-
}),
|
|
516
|
-
n[7] ||=
|
|
517
|
-
t.hasFrequentlyUsed ? (
|
|
583
|
+
}), v(" " + c(w(i).mediaLibrary.newFolder), 1)])) : g("", !0),
|
|
584
|
+
n[7] ||= x("div", { class: "tpl:flex-1" }, null, -1),
|
|
585
|
+
t.hasFrequentlyUsed ? (y(), _("button", {
|
|
518
586
|
key: 2,
|
|
519
587
|
"data-testid": "media-frequently-used",
|
|
520
588
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:border-t tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
521
|
-
style:
|
|
589
|
+
style: o({
|
|
522
590
|
borderColor: "var(--tpl-border)",
|
|
523
591
|
backgroundColor: t.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
|
|
524
592
|
color: t.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
525
593
|
}),
|
|
526
594
|
onClick: n[6] ||= (e) => r("showFrequentlyUsed")
|
|
527
|
-
}, [
|
|
595
|
+
}, [f(w(le), {
|
|
528
596
|
size: 14,
|
|
529
597
|
"stroke-width": 1.5
|
|
530
|
-
}),
|
|
598
|
+
}), v(" " + c(w(i).mediaLibrary.frequentlyUsed), 1)], 4)) : g("", !0)
|
|
531
599
|
]));
|
|
532
600
|
}
|
|
533
|
-
}),
|
|
601
|
+
}), Ie = /* @__PURE__ */ D({
|
|
534
602
|
__name: "MediaFileIcon",
|
|
535
603
|
props: { mimeType: {} },
|
|
536
604
|
setup(e) {
|
|
@@ -630,11 +698,11 @@ var _e = {
|
|
|
630
698
|
color: "var(--tpl-text-muted)",
|
|
631
699
|
bgColor: "var(--tpl-bg-hover)",
|
|
632
700
|
icon: "document"
|
|
633
|
-
}, i =
|
|
634
|
-
return (e, t) => (
|
|
701
|
+
}, i = h(() => n[t.mimeType] ?? r);
|
|
702
|
+
return (e, t) => (y(), _("div", {
|
|
635
703
|
class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2",
|
|
636
|
-
style:
|
|
637
|
-
}, [i.value.icon === "document" ? (
|
|
704
|
+
style: o({ backgroundColor: i.value.bgColor })
|
|
705
|
+
}, [i.value.icon === "document" ? (y(), _("svg", {
|
|
638
706
|
key: 0,
|
|
639
707
|
width: "60",
|
|
640
708
|
height: "60",
|
|
@@ -642,23 +710,23 @@ var _e = {
|
|
|
642
710
|
fill: "none",
|
|
643
711
|
stroke: "currentColor",
|
|
644
712
|
"stroke-width": "1.5",
|
|
645
|
-
style:
|
|
713
|
+
style: o({ color: i.value.color })
|
|
646
714
|
}, [...t[0] ||= [
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
715
|
+
x("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
|
|
716
|
+
x("polyline", { points: "14 2 14 8 20 8" }, null, -1),
|
|
717
|
+
x("line", {
|
|
650
718
|
x1: "8",
|
|
651
719
|
y1: "13",
|
|
652
720
|
x2: "16",
|
|
653
721
|
y2: "13"
|
|
654
722
|
}, null, -1),
|
|
655
|
-
|
|
723
|
+
x("line", {
|
|
656
724
|
x1: "8",
|
|
657
725
|
y1: "17",
|
|
658
726
|
x2: "12",
|
|
659
727
|
y2: "17"
|
|
660
728
|
}, null, -1)
|
|
661
|
-
]], 4)) : i.value.icon === "video" ? (
|
|
729
|
+
]], 4)) : i.value.icon === "video" ? (y(), _("svg", {
|
|
662
730
|
key: 1,
|
|
663
731
|
width: "40",
|
|
664
732
|
height: "40",
|
|
@@ -666,18 +734,18 @@ var _e = {
|
|
|
666
734
|
fill: "none",
|
|
667
735
|
stroke: "currentColor",
|
|
668
736
|
"stroke-width": "1.5",
|
|
669
|
-
style:
|
|
670
|
-
}, [...t[1] ||= [
|
|
737
|
+
style: o({ color: i.value.color })
|
|
738
|
+
}, [...t[1] ||= [x("rect", {
|
|
671
739
|
x: "2",
|
|
672
740
|
y: "4",
|
|
673
741
|
width: "20",
|
|
674
742
|
height: "16",
|
|
675
743
|
rx: "2"
|
|
676
|
-
}, null, -1),
|
|
744
|
+
}, null, -1), x("polygon", {
|
|
677
745
|
points: "10,8 16,12 10,16",
|
|
678
746
|
fill: "currentColor",
|
|
679
747
|
stroke: "none"
|
|
680
|
-
}, null, -1)]], 4)) : (
|
|
748
|
+
}, null, -1)]], 4)) : (y(), _("svg", {
|
|
681
749
|
key: 2,
|
|
682
750
|
width: "40",
|
|
683
751
|
height: "40",
|
|
@@ -685,28 +753,27 @@ var _e = {
|
|
|
685
753
|
fill: "none",
|
|
686
754
|
stroke: "currentColor",
|
|
687
755
|
"stroke-width": "1.5",
|
|
688
|
-
style:
|
|
756
|
+
style: o({ color: i.value.color })
|
|
689
757
|
}, [...t[2] ||= [
|
|
690
|
-
|
|
691
|
-
|
|
758
|
+
x("path", { d: "M9 18V5l12-2v13" }, null, -1),
|
|
759
|
+
x("circle", {
|
|
692
760
|
cx: "6",
|
|
693
761
|
cy: "18",
|
|
694
762
|
r: "3"
|
|
695
763
|
}, null, -1),
|
|
696
|
-
|
|
764
|
+
x("circle", {
|
|
697
765
|
cx: "18",
|
|
698
766
|
cy: "16",
|
|
699
767
|
r: "3"
|
|
700
768
|
}, null, -1)
|
|
701
|
-
]], 4)),
|
|
769
|
+
]], 4)), x("span", {
|
|
702
770
|
class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
|
|
703
|
-
style:
|
|
704
|
-
},
|
|
771
|
+
style: o({ color: i.value.color })
|
|
772
|
+
}, c(i.value.label), 5)], 4));
|
|
705
773
|
}
|
|
706
774
|
});
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
function Ie(e, t, n) {
|
|
775
|
+
// ../media-library/src/utils/formatAbsoluteDate.ts
|
|
776
|
+
function Le(e, t, n) {
|
|
710
777
|
let r = new Date(e);
|
|
711
778
|
if (Number.isNaN(r.getTime())) return "";
|
|
712
779
|
let i = t?.trim().replace(/_/g, "-") || void 0;
|
|
@@ -716,9 +783,8 @@ function Ie(e, t, n) {
|
|
|
716
783
|
return r.toLocaleDateString(void 0, n);
|
|
717
784
|
}
|
|
718
785
|
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
var Le = [
|
|
786
|
+
// ../media-library/src/utils/formatFileSize.ts
|
|
787
|
+
var Re = [
|
|
722
788
|
"B",
|
|
723
789
|
"KB",
|
|
724
790
|
"MB",
|
|
@@ -726,39 +792,38 @@ var Le = [
|
|
|
726
792
|
];
|
|
727
793
|
function $(e) {
|
|
728
794
|
let t = e, n = 0;
|
|
729
|
-
for (; t >= 1024 && n <
|
|
730
|
-
return `${Math.round(t * 10) / 10} ${
|
|
795
|
+
for (; t >= 1024 && n < Re.length - 1;) t /= 1024, n += 1;
|
|
796
|
+
return `${Math.round(t * 10) / 10} ${Re[n]}`;
|
|
731
797
|
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
798
|
+
// ../media-library/src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
|
|
799
|
+
var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
735
800
|
key: 1,
|
|
736
801
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-16"
|
|
737
|
-
},
|
|
802
|
+
}, He = {
|
|
738
803
|
class: "tpl:text-xs",
|
|
739
804
|
style: { color: "var(--tpl-text-muted)" }
|
|
740
|
-
},
|
|
805
|
+
}, Ue = ["aria-label"], We = [
|
|
741
806
|
"data-media-id",
|
|
742
807
|
"aria-selected",
|
|
743
808
|
"aria-label",
|
|
744
809
|
"onClick",
|
|
745
810
|
"onDblclick",
|
|
746
811
|
"onKeydown"
|
|
747
|
-
],
|
|
812
|
+
], Ge = { class: "tpl:aspect-square" }, Ke = ["src", "alt"], qe = { class: "tpl:px-2 tpl:py-1.5" }, Je = {
|
|
748
813
|
class: "tpl:truncate tpl:text-[10px] tpl:font-medium",
|
|
749
814
|
style: { color: "var(--tpl-text)" }
|
|
750
|
-
},
|
|
815
|
+
}, Ye = {
|
|
751
816
|
class: "tpl:flex tpl:justify-between tpl:text-[10px]",
|
|
752
817
|
style: { color: "var(--tpl-text-muted)" }
|
|
753
|
-
},
|
|
818
|
+
}, Xe = { key: 0 }, Ze = { key: 1 }, Qe = [
|
|
754
819
|
"title",
|
|
755
820
|
"aria-label",
|
|
756
821
|
"onClick"
|
|
757
|
-
],
|
|
822
|
+
], $e = [
|
|
758
823
|
"title",
|
|
759
824
|
"aria-label",
|
|
760
825
|
"onClick"
|
|
761
|
-
],
|
|
826
|
+
], et = {
|
|
762
827
|
key: 0,
|
|
763
828
|
"aria-hidden": "true",
|
|
764
829
|
class: "tpl:absolute tpl:top-1.5 tpl:right-1.5 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full",
|
|
@@ -766,34 +831,34 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
766
831
|
"background-color": "var(--tpl-primary)",
|
|
767
832
|
color: "var(--tpl-on-primary)"
|
|
768
833
|
}
|
|
769
|
-
},
|
|
834
|
+
}, tt = ["aria-label"], nt = [
|
|
770
835
|
"data-media-id",
|
|
771
836
|
"aria-selected",
|
|
772
837
|
"aria-label",
|
|
773
838
|
"onClick",
|
|
774
839
|
"onDblclick",
|
|
775
840
|
"onKeydown"
|
|
776
|
-
],
|
|
841
|
+
], rt = {
|
|
777
842
|
class: "tpl:size-10 tpl:shrink-0 tpl:overflow-hidden tpl:rounded",
|
|
778
843
|
style: { "background-color": "var(--tpl-bg-hover)" }
|
|
779
|
-
},
|
|
844
|
+
}, it = ["src", "alt"], at = {
|
|
780
845
|
key: 1,
|
|
781
846
|
class: "tpl-list-icon tpl:size-full"
|
|
782
|
-
},
|
|
847
|
+
}, ot = { class: "tpl:min-w-0 tpl:flex-1" }, st = {
|
|
783
848
|
class: "tpl:truncate tpl:text-xs tpl:font-medium",
|
|
784
849
|
style: { color: "var(--tpl-text)" }
|
|
785
|
-
},
|
|
850
|
+
}, ct = {
|
|
786
851
|
class: "tpl:text-[10px]",
|
|
787
852
|
style: { color: "var(--tpl-text-muted)" }
|
|
788
|
-
},
|
|
853
|
+
}, lt = [
|
|
789
854
|
"title",
|
|
790
855
|
"aria-label",
|
|
791
856
|
"onClick"
|
|
792
|
-
],
|
|
857
|
+
], ut = [
|
|
793
858
|
"title",
|
|
794
859
|
"aria-label",
|
|
795
860
|
"onClick"
|
|
796
|
-
],
|
|
861
|
+
], dt = {
|
|
797
862
|
key: 0,
|
|
798
863
|
"aria-hidden": "true",
|
|
799
864
|
class: "tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full",
|
|
@@ -801,10 +866,10 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
801
866
|
"background-color": "var(--tpl-primary)",
|
|
802
867
|
color: "var(--tpl-on-primary)"
|
|
803
868
|
}
|
|
804
|
-
},
|
|
869
|
+
}, ft = {
|
|
805
870
|
key: 4,
|
|
806
871
|
class: "tpl:flex tpl:justify-center tpl:py-4"
|
|
807
|
-
},
|
|
872
|
+
}, pt = /*#__PURE__*/ K(/* @__PURE__ */ D({
|
|
808
873
|
__name: "MediaGrid",
|
|
809
874
|
props: {
|
|
810
875
|
items: {},
|
|
@@ -825,166 +890,166 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
825
890
|
"replace",
|
|
826
891
|
"confirm"
|
|
827
892
|
],
|
|
828
|
-
setup(
|
|
829
|
-
let
|
|
830
|
-
function
|
|
893
|
+
setup(n, { emit: r }) {
|
|
894
|
+
let i = n, a = r, { isAcceptedMimeType: l, isImageMimeType: u } = he();
|
|
895
|
+
function d(e) {
|
|
831
896
|
return e.mimeType ?? "";
|
|
832
897
|
}
|
|
833
|
-
function
|
|
898
|
+
function p(e) {
|
|
834
899
|
return e.thumbnailUrl ?? e.url;
|
|
835
900
|
}
|
|
836
|
-
function
|
|
837
|
-
return !
|
|
901
|
+
function m(e) {
|
|
902
|
+
return !i.accept || i.accept.length === 0 || l(d(e), i.accept);
|
|
838
903
|
}
|
|
839
904
|
function h(e) {
|
|
840
|
-
return
|
|
905
|
+
return i.canUpdate === !0 && e.canUpdate !== !1;
|
|
841
906
|
}
|
|
842
|
-
function
|
|
843
|
-
return
|
|
907
|
+
function C(e) {
|
|
908
|
+
return i.canReplace === !0 && e.canUpdate !== !1;
|
|
844
909
|
}
|
|
845
|
-
function
|
|
846
|
-
t.metaKey || t.ctrlKey ?
|
|
910
|
+
function E(e, t) {
|
|
911
|
+
t.metaKey || t.ctrlKey ? a("toggle", e.id) : a("select", e);
|
|
847
912
|
}
|
|
848
|
-
function
|
|
849
|
-
|
|
913
|
+
function D(e) {
|
|
914
|
+
m(e) && a("confirm", e);
|
|
850
915
|
}
|
|
851
|
-
function
|
|
852
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(),
|
|
916
|
+
function O(e, t) {
|
|
917
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), a("select", e));
|
|
853
918
|
}
|
|
854
|
-
function
|
|
855
|
-
return
|
|
919
|
+
function k(e) {
|
|
920
|
+
return i.selectedIds.has(e.id);
|
|
856
921
|
}
|
|
857
|
-
function
|
|
858
|
-
return
|
|
922
|
+
function j(e) {
|
|
923
|
+
return k(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
|
|
859
924
|
}
|
|
860
|
-
let { t:
|
|
925
|
+
let { t: M } = Q(), N = t(Z, null), P = e(null);
|
|
861
926
|
R(P, ([{ isIntersecting: e }]) => {
|
|
862
|
-
e &&
|
|
927
|
+
e && i.hasMore && !i.isLoading && a("loadMore");
|
|
863
928
|
}, { threshold: .1 });
|
|
864
929
|
function F(e) {
|
|
865
|
-
return
|
|
930
|
+
return Le(e, N?.value, {
|
|
866
931
|
year: "numeric",
|
|
867
932
|
month: "short",
|
|
868
933
|
day: "numeric"
|
|
869
934
|
});
|
|
870
935
|
}
|
|
871
|
-
return (e,
|
|
872
|
-
|
|
936
|
+
return (e, t) => (y(), _("div", ze, [
|
|
937
|
+
n.isLoading && n.items.length === 0 ? (y(), _("div", {
|
|
873
938
|
key: 0,
|
|
874
939
|
role: "status",
|
|
875
940
|
"aria-busy": "true",
|
|
876
|
-
"aria-label":
|
|
877
|
-
class:
|
|
878
|
-
}, [(
|
|
941
|
+
"aria-label": w(M).mediaLibrary.loading,
|
|
942
|
+
class: b(n.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
|
|
943
|
+
}, [(y(), _(S, null, s(8, (e) => x("div", {
|
|
879
944
|
key: e,
|
|
880
|
-
class:
|
|
945
|
+
class: b(["tpl-pulse tpl:rounded-lg", n.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
|
|
881
946
|
style: { "background-color": "var(--tpl-bg-hover)" },
|
|
882
947
|
"aria-hidden": "true"
|
|
883
|
-
}, null, 2)), 64))], 10,
|
|
948
|
+
}, null, 2)), 64))], 10, Be)) : n.items.length === 0 ? (y(), _("div", Ve, [f(w(q), {
|
|
884
949
|
class: "tpl:mb-3",
|
|
885
950
|
size: 40,
|
|
886
951
|
"stroke-width": 1,
|
|
887
952
|
style: { color: "var(--tpl-text-dim)" }
|
|
888
|
-
}),
|
|
953
|
+
}), x("p", He, c(n.searchQuery ? w(M).mediaLibrary.noSearchResults : w(M).mediaLibrary.noFiles), 1)])) : n.layout === "list" ? (y(), _("div", {
|
|
889
954
|
key: 3,
|
|
890
955
|
role: "listbox",
|
|
891
|
-
"aria-label":
|
|
956
|
+
"aria-label": w(M).mediaLibrary.filesListAriaLabel,
|
|
892
957
|
"aria-multiselectable": "true",
|
|
893
958
|
class: "tpl:flex tpl:flex-col tpl:gap-1"
|
|
894
|
-
}, [(
|
|
959
|
+
}, [(y(!0), _(S, null, s(n.items, (e) => (y(), _("div", {
|
|
895
960
|
key: e.id,
|
|
896
961
|
role: "option",
|
|
897
962
|
tabindex: "0",
|
|
898
963
|
"data-testid": "media-library-item",
|
|
899
|
-
class:
|
|
964
|
+
class: b(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!m(e) && !k(e) ? "tpl:opacity-60" : ""]]),
|
|
900
965
|
"data-media-id": e.id,
|
|
901
|
-
"aria-selected":
|
|
966
|
+
"aria-selected": k(e),
|
|
902
967
|
"aria-label": e.filename || e.url,
|
|
903
|
-
style:
|
|
904
|
-
onClick: (t) =>
|
|
905
|
-
onDblclick: (t) =>
|
|
906
|
-
onKeydown: (t) =>
|
|
968
|
+
style: o({ backgroundColor: k(e) ? "var(--tpl-bg-hover)" : "transparent" }),
|
|
969
|
+
onClick: (t) => E(e, t),
|
|
970
|
+
onDblclick: (t) => D(e),
|
|
971
|
+
onKeydown: (t) => O(e, t)
|
|
907
972
|
}, [
|
|
908
|
-
|
|
973
|
+
x("div", rt, [w(u)(d(e)) ? (y(), _("img", {
|
|
909
974
|
key: 0,
|
|
910
|
-
src:
|
|
975
|
+
src: p(e),
|
|
911
976
|
alt: e.filename || e.url,
|
|
912
977
|
class: "tpl:size-full tpl:object-cover",
|
|
913
978
|
loading: "lazy"
|
|
914
|
-
}, null, 8,
|
|
915
|
-
|
|
916
|
-
e.size == null ?
|
|
917
|
-
e.createdAt ? (
|
|
918
|
-
|
|
979
|
+
}, null, 8, it)) : (y(), _("div", at, [f(Ie, { "mime-type": d(e) }, null, 8, ["mime-type"])]))]),
|
|
980
|
+
x("div", ot, [x("p", st, c(e.filename || e.url), 1), x("p", ct, [
|
|
981
|
+
e.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(c(w($)(e.size)), 1)], 64)),
|
|
982
|
+
e.createdAt ? (y(), _(S, { key: 1 }, [e.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(" · ")], 64)), v(" " + c(F(e.createdAt)), 1)], 64)) : g("", !0),
|
|
983
|
+
w(u)(d(e)) && e.width && e.height ? (y(), _(S, { key: 2 }, [v(" · " + c(e.width) + "×" + c(e.height), 1)], 64)) : g("", !0)
|
|
919
984
|
])]),
|
|
920
|
-
|
|
985
|
+
x("div", { class: b(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(e)]) }, [h(e) ? (y(), _("button", {
|
|
921
986
|
key: 0,
|
|
922
987
|
type: "button",
|
|
923
988
|
"data-testid": "media-edit",
|
|
924
989
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
925
990
|
style: { color: "var(--tpl-text-muted)" },
|
|
926
|
-
title:
|
|
927
|
-
"aria-label":
|
|
928
|
-
onClick:
|
|
929
|
-
}, [
|
|
991
|
+
title: w(M).mediaLibrary.editFile,
|
|
992
|
+
"aria-label": w(M).mediaLibrary.editFile,
|
|
993
|
+
onClick: A((t) => a("edit", e), ["stop"])
|
|
994
|
+
}, [f(w(U), {
|
|
930
995
|
size: 12,
|
|
931
996
|
"stroke-width": 2
|
|
932
|
-
})], 8,
|
|
997
|
+
})], 8, lt)) : g("", !0), C(e) ? (y(), _("button", {
|
|
933
998
|
key: 1,
|
|
934
999
|
type: "button",
|
|
935
1000
|
"data-testid": "media-replace",
|
|
936
1001
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
937
1002
|
style: { color: "var(--tpl-text-muted)" },
|
|
938
|
-
title:
|
|
939
|
-
"aria-label":
|
|
940
|
-
onClick:
|
|
941
|
-
}, [
|
|
1003
|
+
title: w(M).mediaLibrary.replaceFile,
|
|
1004
|
+
"aria-label": w(M).mediaLibrary.replaceFile,
|
|
1005
|
+
onClick: A((t) => a("replace", e), ["stop"])
|
|
1006
|
+
}, [f(w(G), {
|
|
942
1007
|
size: 12,
|
|
943
1008
|
"stroke-width": 2
|
|
944
|
-
})], 8,
|
|
945
|
-
|
|
1009
|
+
})], 8, ut)) : g("", !0)], 2),
|
|
1010
|
+
k(e) ? (y(), _("div", dt, [f(w(V), {
|
|
946
1011
|
size: 12,
|
|
947
1012
|
"stroke-width": 3
|
|
948
|
-
})])) :
|
|
949
|
-
], 46,
|
|
1013
|
+
})])) : g("", !0)
|
|
1014
|
+
], 46, nt))), 128))], 8, tt)) : (y(), _("div", {
|
|
950
1015
|
key: 2,
|
|
951
1016
|
role: "listbox",
|
|
952
|
-
"aria-label":
|
|
1017
|
+
"aria-label": w(M).mediaLibrary.filesListAriaLabel,
|
|
953
1018
|
"aria-multiselectable": "true",
|
|
954
1019
|
class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
|
|
955
|
-
}, [(
|
|
1020
|
+
}, [(y(!0), _(S, null, s(n.items, (e) => (y(), _("div", {
|
|
956
1021
|
key: e.id,
|
|
957
1022
|
role: "option",
|
|
958
1023
|
tabindex: "0",
|
|
959
1024
|
"data-testid": "media-library-item",
|
|
960
|
-
class:
|
|
1025
|
+
class: b(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
|
|
961
1026
|
"tpl:cursor-pointer",
|
|
962
|
-
!
|
|
963
|
-
|
|
1027
|
+
!m(e) && !k(e) ? "tpl:opacity-60" : "",
|
|
1028
|
+
k(e) ? "tpl-media-item--selected" : ""
|
|
964
1029
|
]]),
|
|
965
1030
|
"data-media-id": e.id,
|
|
966
|
-
"aria-selected":
|
|
1031
|
+
"aria-selected": k(e),
|
|
967
1032
|
"aria-label": e.filename || e.url,
|
|
968
|
-
style:
|
|
969
|
-
borderColor:
|
|
970
|
-
backgroundColor: !
|
|
1033
|
+
style: o({
|
|
1034
|
+
borderColor: k(e) ? "var(--tpl-primary)" : "transparent",
|
|
1035
|
+
backgroundColor: !m(e) && !k(e) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
|
|
971
1036
|
}),
|
|
972
|
-
onClick: (t) =>
|
|
973
|
-
onDblclick: (t) =>
|
|
974
|
-
onKeydown: (t) =>
|
|
1037
|
+
onClick: (t) => E(e, t),
|
|
1038
|
+
onDblclick: (t) => D(e),
|
|
1039
|
+
onKeydown: (t) => O(e, t)
|
|
975
1040
|
}, [
|
|
976
|
-
|
|
1041
|
+
x("div", Ge, [w(u)(d(e)) ? (y(), _("img", {
|
|
977
1042
|
key: 0,
|
|
978
|
-
src:
|
|
1043
|
+
src: p(e),
|
|
979
1044
|
alt: e.filename || e.url,
|
|
980
1045
|
class: "tpl:size-full tpl:object-cover",
|
|
981
1046
|
loading: "lazy"
|
|
982
|
-
}, null, 8,
|
|
1047
|
+
}, null, 8, Ke)) : (y(), T(Ie, {
|
|
983
1048
|
key: 1,
|
|
984
|
-
"mime-type":
|
|
1049
|
+
"mime-type": d(e)
|
|
985
1050
|
}, null, 8, ["mime-type"]))]),
|
|
986
|
-
|
|
987
|
-
|
|
1051
|
+
x("div", qe, [x("p", Je, c(e.filename || e.url), 1), x("p", Ye, [e.size == null ? g("", !0) : (y(), _("span", Xe, c(w($)(e.size)), 1)), w(u)(d(e)) && e.width && e.height ? (y(), _("span", Ze, c(e.width) + "×" + c(e.height), 1)) : g("", !0)])]),
|
|
1052
|
+
x("div", { class: b(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(e)]) }, [h(e) ? (y(), _("button", {
|
|
988
1053
|
key: 0,
|
|
989
1054
|
type: "button",
|
|
990
1055
|
"data-testid": "media-edit",
|
|
@@ -993,13 +1058,13 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
993
1058
|
"background-color": "var(--tpl-overlay)",
|
|
994
1059
|
color: "var(--tpl-on-primary)"
|
|
995
1060
|
},
|
|
996
|
-
title:
|
|
997
|
-
"aria-label":
|
|
998
|
-
onClick:
|
|
999
|
-
}, [
|
|
1061
|
+
title: w(M).mediaLibrary.editFile,
|
|
1062
|
+
"aria-label": w(M).mediaLibrary.editFile,
|
|
1063
|
+
onClick: A((t) => a("edit", e), ["stop"])
|
|
1064
|
+
}, [f(w(U), {
|
|
1000
1065
|
size: 11,
|
|
1001
1066
|
"stroke-width": 2
|
|
1002
|
-
})], 8,
|
|
1067
|
+
})], 8, Qe)) : g("", !0), C(e) ? (y(), _("button", {
|
|
1003
1068
|
key: 1,
|
|
1004
1069
|
type: "button",
|
|
1005
1070
|
"data-testid": "media-replace",
|
|
@@ -1008,51 +1073,51 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1008
1073
|
"background-color": "var(--tpl-overlay)",
|
|
1009
1074
|
color: "var(--tpl-on-primary)"
|
|
1010
1075
|
},
|
|
1011
|
-
title:
|
|
1012
|
-
"aria-label":
|
|
1013
|
-
onClick:
|
|
1014
|
-
}, [
|
|
1076
|
+
title: w(M).mediaLibrary.replaceFile,
|
|
1077
|
+
"aria-label": w(M).mediaLibrary.replaceFile,
|
|
1078
|
+
onClick: A((t) => a("replace", e), ["stop"])
|
|
1079
|
+
}, [f(w(G), {
|
|
1015
1080
|
size: 11,
|
|
1016
1081
|
"stroke-width": 2
|
|
1017
|
-
})], 8,
|
|
1018
|
-
|
|
1082
|
+
})], 8, $e)) : g("", !0)], 2),
|
|
1083
|
+
k(e) ? (y(), _("div", et, [f(w(V), {
|
|
1019
1084
|
size: 12,
|
|
1020
1085
|
"stroke-width": 3
|
|
1021
|
-
})])) :
|
|
1022
|
-
], 46,
|
|
1023
|
-
|
|
1086
|
+
})])) : g("", !0)
|
|
1087
|
+
], 46, We))), 128))], 8, Ue)),
|
|
1088
|
+
x("div", {
|
|
1024
1089
|
ref_key: "sentinelRef",
|
|
1025
1090
|
ref: P,
|
|
1026
1091
|
class: "tpl:h-4"
|
|
1027
1092
|
}, null, 512),
|
|
1028
|
-
|
|
1093
|
+
n.isLoading && n.items.length > 0 ? (y(), _("div", ft, [f(w(H), {
|
|
1029
1094
|
class: "tpl-spinner",
|
|
1030
1095
|
size: 20,
|
|
1031
1096
|
"stroke-width": 2,
|
|
1032
1097
|
style: { color: "var(--tpl-primary)" }
|
|
1033
|
-
})])) :
|
|
1098
|
+
})])) : g("", !0)
|
|
1034
1099
|
]));
|
|
1035
1100
|
}
|
|
1036
|
-
}), [["__scopeId", "data-v-57c35946"]]),
|
|
1101
|
+
}), [["__scopeId", "data-v-57c35946"]]), mt = ["data-tpl-theme"], ht = {
|
|
1037
1102
|
id: "tpl-media-import-title",
|
|
1038
1103
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold",
|
|
1039
1104
|
style: { color: "var(--tpl-text)" }
|
|
1040
|
-
},
|
|
1105
|
+
}, gt = { class: "tpl:mb-3" }, _t = [
|
|
1041
1106
|
"aria-label",
|
|
1042
1107
|
"aria-invalid",
|
|
1043
1108
|
"aria-describedby",
|
|
1044
1109
|
"placeholder",
|
|
1045
1110
|
"disabled"
|
|
1046
|
-
],
|
|
1111
|
+
], vt = {
|
|
1047
1112
|
key: 0,
|
|
1048
1113
|
id: "tpl-media-import-error",
|
|
1049
1114
|
role: "alert",
|
|
1050
1115
|
class: "tpl:mb-3 tpl:text-xs",
|
|
1051
1116
|
style: { color: "var(--tpl-danger)" }
|
|
1052
|
-
},
|
|
1117
|
+
}, yt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, bt = ["disabled"], xt = ["disabled"], St = {
|
|
1053
1118
|
key: 0,
|
|
1054
1119
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
1055
|
-
},
|
|
1120
|
+
}, Ct = { key: 1 }, wt = /* @__PURE__ */ D({
|
|
1056
1121
|
__name: "MediaImportUrlModal",
|
|
1057
1122
|
props: {
|
|
1058
1123
|
visible: { type: Boolean },
|
|
@@ -1060,24 +1125,24 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1060
1125
|
error: {}
|
|
1061
1126
|
},
|
|
1062
1127
|
emits: ["import", "close"],
|
|
1063
|
-
setup(
|
|
1064
|
-
let
|
|
1065
|
-
|
|
1066
|
-
e && (
|
|
1128
|
+
setup(n, { emit: i }) {
|
|
1129
|
+
let a = n, o = i, { t: s } = Q(), l = t(fe, null), d = t(X, e(null)), m = e("");
|
|
1130
|
+
O(() => a.visible, (e) => {
|
|
1131
|
+
e && (m.value = "");
|
|
1067
1132
|
});
|
|
1068
|
-
function
|
|
1069
|
-
let e =
|
|
1070
|
-
e && !
|
|
1133
|
+
function S() {
|
|
1134
|
+
let e = m.value.trim();
|
|
1135
|
+
e && !a.isImporting && o("import", e);
|
|
1071
1136
|
}
|
|
1072
|
-
function
|
|
1073
|
-
|
|
1137
|
+
function C() {
|
|
1138
|
+
a.isImporting || o("close");
|
|
1074
1139
|
}
|
|
1075
|
-
let
|
|
1076
|
-
|
|
1077
|
-
function
|
|
1078
|
-
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(),
|
|
1140
|
+
let E = e(null);
|
|
1141
|
+
_e(E, h(() => a.visible));
|
|
1142
|
+
function D(e) {
|
|
1143
|
+
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), S()), e.key === "Escape" && C();
|
|
1079
1144
|
}
|
|
1080
|
-
return (e,
|
|
1145
|
+
return (e, t) => (y(), T(p, { to: w(d) || "body" }, [f(M, {
|
|
1081
1146
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1082
1147
|
"enter-from-class": "tpl:opacity-0",
|
|
1083
1148
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1085,71 +1150,71 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1085
1150
|
"leave-from-class": "tpl:opacity-100",
|
|
1086
1151
|
"leave-to-class": "tpl:opacity-0"
|
|
1087
1152
|
}, {
|
|
1088
|
-
default:
|
|
1153
|
+
default: r(() => [n.visible ? (y(), _("div", {
|
|
1089
1154
|
key: 0,
|
|
1090
|
-
"data-tpl-theme":
|
|
1091
|
-
class:
|
|
1155
|
+
"data-tpl-theme": w(l),
|
|
1156
|
+
class: b([w(d) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1092
1157
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1093
|
-
onClick:
|
|
1094
|
-
onKeydown:
|
|
1095
|
-
}, [
|
|
1158
|
+
onClick: A(C, ["self"]),
|
|
1159
|
+
onKeydown: D
|
|
1160
|
+
}, [x("div", {
|
|
1096
1161
|
ref_key: "dialogRef",
|
|
1097
|
-
ref:
|
|
1162
|
+
ref: E,
|
|
1098
1163
|
role: "dialog",
|
|
1099
1164
|
"aria-modal": "true",
|
|
1100
1165
|
"aria-labelledby": "tpl-media-import-title",
|
|
1101
1166
|
class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
1102
1167
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1103
1168
|
}, [
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
"onUpdate:modelValue":
|
|
1169
|
+
x("h3", ht, c(w(s).mediaLibrary.importFromUrl), 1),
|
|
1170
|
+
x("div", gt, [u(x("input", {
|
|
1171
|
+
"onUpdate:modelValue": t[0] ||= (e) => m.value = e,
|
|
1107
1172
|
type: "url",
|
|
1108
|
-
"aria-label":
|
|
1109
|
-
"aria-invalid": !!
|
|
1110
|
-
"aria-describedby":
|
|
1173
|
+
"aria-label": w(s).mediaLibrary.importFromUrl,
|
|
1174
|
+
"aria-invalid": !!n.error,
|
|
1175
|
+
"aria-describedby": n.error ? "tpl-media-import-error" : void 0,
|
|
1111
1176
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
1112
1177
|
style: {
|
|
1113
1178
|
"border-color": "var(--tpl-border)",
|
|
1114
1179
|
"background-color": "var(--tpl-bg)",
|
|
1115
1180
|
color: "var(--tpl-text)"
|
|
1116
1181
|
},
|
|
1117
|
-
placeholder:
|
|
1118
|
-
disabled:
|
|
1182
|
+
placeholder: w(s).mediaLibrary.importUrlPlaceholder,
|
|
1183
|
+
disabled: n.isImporting,
|
|
1119
1184
|
autofocus: ""
|
|
1120
|
-
}, null, 8,
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
class:
|
|
1185
|
+
}, null, 8, _t), [[k, m.value]])]),
|
|
1186
|
+
n.error ? (y(), _("p", vt, c(n.error), 1)) : g("", !0),
|
|
1187
|
+
x("div", yt, [x("button", {
|
|
1188
|
+
class: b(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150", { "tpl:cursor-not-allowed tpl:opacity-50": n.isImporting }]),
|
|
1124
1189
|
style: {
|
|
1125
1190
|
"border-color": "var(--tpl-border)",
|
|
1126
1191
|
color: "var(--tpl-text)",
|
|
1127
1192
|
"background-color": "var(--tpl-bg)"
|
|
1128
1193
|
},
|
|
1129
|
-
disabled:
|
|
1130
|
-
onClick:
|
|
1131
|
-
},
|
|
1194
|
+
disabled: n.isImporting,
|
|
1195
|
+
onClick: C
|
|
1196
|
+
}, c(w(s).mediaLibrary.cancel), 11, bt), x("button", {
|
|
1132
1197
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
1133
1198
|
style: {
|
|
1134
1199
|
"background-color": "var(--tpl-primary)",
|
|
1135
1200
|
color: "var(--tpl-on-primary)"
|
|
1136
1201
|
},
|
|
1137
|
-
disabled: !
|
|
1138
|
-
onClick:
|
|
1139
|
-
}, [
|
|
1202
|
+
disabled: !m.value.trim() || n.isImporting,
|
|
1203
|
+
onClick: S
|
|
1204
|
+
}, [n.isImporting ? (y(), _("span", St, [f(w(H), {
|
|
1140
1205
|
class: "tpl:animate-spin",
|
|
1141
1206
|
size: 12,
|
|
1142
1207
|
"stroke-width": 2
|
|
1143
|
-
}),
|
|
1144
|
-
], 512)], 42,
|
|
1208
|
+
}), v(" " + c(w(s).mediaLibrary.importing), 1)])) : (y(), _("span", Ct, c(w(s).mediaLibrary.import), 1))], 8, xt)])
|
|
1209
|
+
], 512)], 42, mt)) : g("", !0)]),
|
|
1145
1210
|
_: 1
|
|
1146
1211
|
})], 8, ["to"]));
|
|
1147
1212
|
}
|
|
1148
|
-
}),
|
|
1213
|
+
}), Tt = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, Et = ["disabled", "onClick"], Dt = { class: "tpl:truncate" }, Ot = {
|
|
1149
1214
|
key: 0,
|
|
1150
1215
|
class: "tpl:shrink-0",
|
|
1151
1216
|
style: { color: "var(--tpl-text-dim)" }
|
|
1152
|
-
},
|
|
1217
|
+
}, kt = /* @__PURE__ */ D({
|
|
1153
1218
|
__name: "MediaMovePicker",
|
|
1154
1219
|
props: {
|
|
1155
1220
|
folders: {},
|
|
@@ -1157,40 +1222,40 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1157
1222
|
},
|
|
1158
1223
|
emits: ["select", "close"],
|
|
1159
1224
|
setup(t, { emit: n }) {
|
|
1160
|
-
let r = n, { t:
|
|
1161
|
-
function
|
|
1225
|
+
let r = n, { t: i } = Q(), a = e(null);
|
|
1226
|
+
function l(e, t = 0) {
|
|
1162
1227
|
let n = [];
|
|
1163
1228
|
for (let r of e) n.push({
|
|
1164
1229
|
id: r.id,
|
|
1165
1230
|
name: r.name,
|
|
1166
1231
|
depth: t
|
|
1167
|
-
}), r.children.length && n.push(...
|
|
1232
|
+
}), r.children.length && n.push(...l(r.children, t + 1));
|
|
1168
1233
|
return n;
|
|
1169
1234
|
}
|
|
1170
|
-
return z(
|
|
1235
|
+
return z(a, () => {
|
|
1171
1236
|
r("close");
|
|
1172
|
-
}), (e, n) => (
|
|
1237
|
+
}), (e, n) => (y(), _("div", {
|
|
1173
1238
|
ref_key: "pickerRef",
|
|
1174
|
-
ref:
|
|
1239
|
+
ref: a,
|
|
1175
1240
|
"data-testid": "media-move-picker",
|
|
1176
1241
|
class: "tpl:absolute tpl:bottom-full tpl:left-0 tpl:z-10 tpl:mb-2 tpl:w-56 tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:shadow-lg",
|
|
1177
1242
|
style: {
|
|
1178
1243
|
"border-color": "var(--tpl-border)",
|
|
1179
1244
|
"background-color": "var(--tpl-bg-elevated)"
|
|
1180
1245
|
}
|
|
1181
|
-
}, [
|
|
1246
|
+
}, [x("div", Tt, [t.currentFolderId === null ? g("", !0) : (y(), _("button", {
|
|
1182
1247
|
key: 0,
|
|
1183
1248
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
1184
1249
|
style: { color: "var(--tpl-text)" },
|
|
1185
1250
|
onClick: n[0] ||= (e) => r("select", null)
|
|
1186
|
-
}, [
|
|
1251
|
+
}, [f(w(q), {
|
|
1187
1252
|
class: "tpl:shrink-0",
|
|
1188
1253
|
size: 14,
|
|
1189
1254
|
"stroke-width": 1.5
|
|
1190
|
-
}),
|
|
1255
|
+
}), v(" " + c(w(i).mediaLibrary.moveToRoot), 1)])), (y(!0), _(S, null, s(l(t.folders), (e) => (y(), _("button", {
|
|
1191
1256
|
key: e.id,
|
|
1192
1257
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:py-1.5 tpl:pr-3 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
1193
|
-
style:
|
|
1258
|
+
style: o({
|
|
1194
1259
|
paddingLeft: `${e.depth * 16 + 12}px`,
|
|
1195
1260
|
color: e.id === t.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
|
|
1196
1261
|
opacity: e.id === t.currentFolderId ? .5 : 1
|
|
@@ -1198,33 +1263,33 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1198
1263
|
disabled: e.id === t.currentFolderId,
|
|
1199
1264
|
onClick: (t) => r("select", e.id)
|
|
1200
1265
|
}, [
|
|
1201
|
-
|
|
1266
|
+
f(w(J), {
|
|
1202
1267
|
class: "tpl:shrink-0",
|
|
1203
1268
|
size: 14,
|
|
1204
1269
|
"stroke-width": 1.5
|
|
1205
1270
|
}),
|
|
1206
|
-
|
|
1207
|
-
e.id === t.currentFolderId ? (
|
|
1208
|
-
], 12,
|
|
1271
|
+
x("span", Dt, c(e.name), 1),
|
|
1272
|
+
e.id === t.currentFolderId ? (y(), _("span", Ot, c(w(i).mediaLibrary.currentFolder), 1)) : g("", !0)
|
|
1273
|
+
], 12, Et))), 128))])], 512));
|
|
1209
1274
|
}
|
|
1210
|
-
}),
|
|
1275
|
+
}), At = { class: "tpl:flex tpl:items-center tpl:gap-3" }, jt = ["src", "alt"], Mt = {
|
|
1211
1276
|
key: 1,
|
|
1212
1277
|
class: "tpl:flex tpl:size-10 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded",
|
|
1213
1278
|
style: { border: "1px solid var(--tpl-border)" }
|
|
1214
|
-
},
|
|
1279
|
+
}, Nt = { class: "tpl:min-w-0 tpl:flex-1" }, Pt = {
|
|
1215
1280
|
class: "tpl:truncate tpl:text-xs tpl:font-medium",
|
|
1216
1281
|
style: { color: "var(--tpl-text)" }
|
|
1217
|
-
},
|
|
1282
|
+
}, Ft = {
|
|
1218
1283
|
class: "tpl:mt-0.5 tpl:text-[10px]",
|
|
1219
1284
|
style: { color: "var(--tpl-text-muted)" }
|
|
1220
|
-
},
|
|
1285
|
+
}, It = /*#__PURE__*/ K(/* @__PURE__ */ D({
|
|
1221
1286
|
__name: "MediaPreviewPanel",
|
|
1222
1287
|
props: {
|
|
1223
1288
|
item: {},
|
|
1224
1289
|
folders: {}
|
|
1225
1290
|
},
|
|
1226
1291
|
setup(e) {
|
|
1227
|
-
let
|
|
1292
|
+
let n = e, r = t(Z, null), { isImageMimeType: i } = he();
|
|
1228
1293
|
function a(e, t, n = []) {
|
|
1229
1294
|
for (let r of e) {
|
|
1230
1295
|
let e = [...n, r.name];
|
|
@@ -1236,82 +1301,82 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1236
1301
|
}
|
|
1237
1302
|
return null;
|
|
1238
1303
|
}
|
|
1239
|
-
let
|
|
1240
|
-
if (!
|
|
1241
|
-
let e = a(
|
|
1304
|
+
let o = h(() => {
|
|
1305
|
+
if (!n.item.folderId || !n.folders) return null;
|
|
1306
|
+
let e = a(n.folders, n.item.folderId);
|
|
1242
1307
|
return e ? e.join("/") : null;
|
|
1243
|
-
}),
|
|
1308
|
+
}), s = h(() => n.item.mimeType ?? ""), l = h(() => i(s.value));
|
|
1244
1309
|
function u(e) {
|
|
1245
|
-
return
|
|
1310
|
+
return Le(e, r?.value, {
|
|
1246
1311
|
year: "numeric",
|
|
1247
1312
|
month: "short",
|
|
1248
1313
|
day: "numeric"
|
|
1249
1314
|
});
|
|
1250
1315
|
}
|
|
1251
|
-
let d =
|
|
1252
|
-
return (t, n) => (
|
|
1316
|
+
let d = h(() => n.item.filename || n.item.url);
|
|
1317
|
+
return (t, n) => (y(), _("div", At, [l.value ? (y(), _("img", {
|
|
1253
1318
|
key: 0,
|
|
1254
1319
|
src: e.item.url,
|
|
1255
1320
|
alt: e.item.alt || d.value,
|
|
1256
1321
|
class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
|
|
1257
1322
|
style: { border: "1px solid var(--tpl-border)" }
|
|
1258
|
-
}, null, 8,
|
|
1259
|
-
"mime-type":
|
|
1323
|
+
}, null, 8, jt)) : (y(), _("div", Mt, [f(Ie, {
|
|
1324
|
+
"mime-type": s.value,
|
|
1260
1325
|
class: "tpl-preview-icon"
|
|
1261
|
-
}, null, 8, ["mime-type"])])),
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
e.item.size == null ?
|
|
1265
|
-
e.item.createdAt ? (
|
|
1266
|
-
l.value && e.item.width && e.item.height ? (
|
|
1267
|
-
|
|
1268
|
-
n[0] ||=
|
|
1269
|
-
|
|
1326
|
+
}, null, 8, ["mime-type"])])), x("div", Nt, [
|
|
1327
|
+
x("p", Pt, c(d.value), 1),
|
|
1328
|
+
x("p", Ft, [
|
|
1329
|
+
e.item.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(c(w($)(e.item.size)), 1)], 64)),
|
|
1330
|
+
e.item.createdAt ? (y(), _(S, { key: 1 }, [e.item.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(" · ")], 64)), v(" " + c(u(e.item.createdAt)), 1)], 64)) : g("", !0),
|
|
1331
|
+
l.value && e.item.width && e.item.height ? (y(), _(S, { key: 2 }, [v(" · " + c(e.item.width) + "×" + c(e.item.height) + "px ", 1)], 64)) : g("", !0),
|
|
1332
|
+
o.value ? (y(), _(S, { key: 3 }, [
|
|
1333
|
+
n[0] ||= v(" · ", -1),
|
|
1334
|
+
f(w(J), {
|
|
1270
1335
|
class: "tpl:mb-px tpl:inline",
|
|
1271
1336
|
size: 9,
|
|
1272
1337
|
"stroke-width": 2
|
|
1273
1338
|
}),
|
|
1274
|
-
|
|
1275
|
-
], 64)) :
|
|
1339
|
+
v(" " + c(o.value), 1)
|
|
1340
|
+
], 64)) : g("", !0)
|
|
1276
1341
|
]),
|
|
1277
|
-
l.value ? (
|
|
1342
|
+
l.value ? (y(), _("p", {
|
|
1278
1343
|
key: 0,
|
|
1279
|
-
class:
|
|
1344
|
+
class: b(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt }]),
|
|
1280
1345
|
style: { color: "var(--tpl-text-dim)" }
|
|
1281
|
-
},
|
|
1346
|
+
}, c(e.item.alt || "\xA0"), 3)) : g("", !0)
|
|
1282
1347
|
])]));
|
|
1283
1348
|
}
|
|
1284
|
-
}), [["__scopeId", "data-v-50993988"]]),
|
|
1349
|
+
}), [["__scopeId", "data-v-50993988"]]), Lt = ["data-tpl-theme"], Rt = {
|
|
1285
1350
|
id: "tpl-media-replace-title",
|
|
1286
1351
|
class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
|
|
1287
1352
|
style: { color: "var(--tpl-text)" }
|
|
1288
|
-
},
|
|
1353
|
+
}, zt = {
|
|
1289
1354
|
class: "tpl:mb-2 tpl:text-xs",
|
|
1290
1355
|
style: { color: "var(--tpl-text-muted)" }
|
|
1291
|
-
},
|
|
1356
|
+
}, Bt = {
|
|
1292
1357
|
key: 0,
|
|
1293
1358
|
class: "tpl:mb-3 tpl:text-xs",
|
|
1294
1359
|
style: { color: "var(--tpl-text-muted)" }
|
|
1295
|
-
},
|
|
1360
|
+
}, Vt = {
|
|
1296
1361
|
class: "tpl:mb-3 tpl:rounded tpl:border tpl:p-2",
|
|
1297
1362
|
style: { "border-color": "var(--tpl-border)" }
|
|
1298
|
-
},
|
|
1363
|
+
}, Ht = {
|
|
1299
1364
|
class: "tpl:truncate tpl:text-xs tpl:font-medium",
|
|
1300
1365
|
style: { color: "var(--tpl-text)" }
|
|
1301
|
-
},
|
|
1366
|
+
}, Ut = { class: "tpl:mb-4" }, Wt = {
|
|
1302
1367
|
class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
|
|
1303
1368
|
style: { color: "var(--tpl-text-muted)" }
|
|
1304
|
-
},
|
|
1369
|
+
}, Gt = [
|
|
1305
1370
|
"accept",
|
|
1306
1371
|
"aria-invalid",
|
|
1307
1372
|
"aria-describedby"
|
|
1308
|
-
],
|
|
1373
|
+
], Kt = {
|
|
1309
1374
|
key: 1,
|
|
1310
1375
|
id: "tpl-media-replace-error",
|
|
1311
1376
|
role: "alert",
|
|
1312
1377
|
class: "tpl:mb-3 tpl:text-xs",
|
|
1313
1378
|
style: { color: "var(--tpl-danger)" }
|
|
1314
|
-
},
|
|
1379
|
+
}, qt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Jt = ["disabled"], Yt = ["disabled"], Xt = /* @__PURE__ */ D({
|
|
1315
1380
|
__name: "MediaReplaceModal",
|
|
1316
1381
|
props: {
|
|
1317
1382
|
visible: { type: Boolean },
|
|
@@ -1321,28 +1386,28 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1321
1386
|
error: {}
|
|
1322
1387
|
},
|
|
1323
1388
|
emits: ["replace", "close"],
|
|
1324
|
-
setup(
|
|
1325
|
-
let
|
|
1326
|
-
if (!
|
|
1327
|
-
let e = (
|
|
1389
|
+
setup(n, { emit: i }) {
|
|
1390
|
+
let a = n, o = i, { t: s } = Q(), l = t(fe, null), u = t(X, e(null)), d = e(null), m = e(null), v = h(() => {
|
|
1391
|
+
if (!a.item) return "";
|
|
1392
|
+
let e = (a.item.filename ?? "").split(".");
|
|
1328
1393
|
return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
|
|
1329
|
-
}),
|
|
1330
|
-
|
|
1331
|
-
e || (m.value = null,
|
|
1394
|
+
}), S = h(() => v.value ? `.${v.value}` : "*"), C = h(() => (a.usageInfo?.templateCount ?? 0) > 0);
|
|
1395
|
+
O(() => a.visible, (e) => {
|
|
1396
|
+
e || (m.value = null, d.value && (d.value.value = ""));
|
|
1332
1397
|
});
|
|
1333
1398
|
function E(e) {
|
|
1334
1399
|
let t = e.target;
|
|
1335
1400
|
t.files && t.files.length > 0 && (m.value = t.files[0]);
|
|
1336
1401
|
}
|
|
1337
|
-
function
|
|
1338
|
-
m.value &&
|
|
1402
|
+
function D() {
|
|
1403
|
+
m.value && o("replace", m.value);
|
|
1339
1404
|
}
|
|
1340
|
-
let
|
|
1341
|
-
|
|
1405
|
+
let k = e(null);
|
|
1406
|
+
_e(k, h(() => a.visible && a.item !== null));
|
|
1342
1407
|
function j(e) {
|
|
1343
|
-
e.stopPropagation(), e.key === "Escape" &&
|
|
1408
|
+
e.stopPropagation(), e.key === "Escape" && o("close");
|
|
1344
1409
|
}
|
|
1345
|
-
return (e,
|
|
1410
|
+
return (e, t) => (y(), T(p, { to: w(u) || "body" }, [f(M, {
|
|
1346
1411
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1347
1412
|
"enter-from-class": "tpl:opacity-0",
|
|
1348
1413
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1350,33 +1415,33 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1350
1415
|
"leave-from-class": "tpl:opacity-100",
|
|
1351
1416
|
"leave-to-class": "tpl:opacity-0"
|
|
1352
1417
|
}, {
|
|
1353
|
-
default:
|
|
1418
|
+
default: r(() => [n.visible && n.item ? (y(), _("div", {
|
|
1354
1419
|
key: 0,
|
|
1355
|
-
"data-tpl-theme":
|
|
1356
|
-
class:
|
|
1420
|
+
"data-tpl-theme": w(l),
|
|
1421
|
+
class: b([w(u) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1357
1422
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1358
|
-
onClick:
|
|
1423
|
+
onClick: t[1] ||= A((e) => o("close"), ["self"]),
|
|
1359
1424
|
onKeydown: j
|
|
1360
|
-
}, [
|
|
1425
|
+
}, [x("div", {
|
|
1361
1426
|
ref_key: "dialogRef",
|
|
1362
|
-
ref:
|
|
1427
|
+
ref: k,
|
|
1363
1428
|
role: "dialog",
|
|
1364
1429
|
"aria-modal": "true",
|
|
1365
1430
|
"aria-labelledby": "tpl-media-replace-title",
|
|
1366
1431
|
class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
1367
1432
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1368
1433
|
}, [
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1434
|
+
x("h3", Rt, c(w(s).mediaLibrary.replaceWarningTitle), 1),
|
|
1435
|
+
x("p", zt, c(w(s).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${v.value}`)), 1),
|
|
1436
|
+
C.value ? (y(), _("p", Bt, c(w(s).mediaLibrary.replaceWarningUsageNote.replace("{count}", n.usageInfo.templateCount.toString())), 1)) : g("", !0),
|
|
1437
|
+
x("div", Vt, [x("p", Ht, c(n.item.filename), 1)]),
|
|
1438
|
+
x("div", Ut, [x("label", Wt, c(w(s).mediaLibrary.replaceSelectFile), 1), x("input", {
|
|
1374
1439
|
ref_key: "fileInputRef",
|
|
1375
|
-
ref:
|
|
1440
|
+
ref: d,
|
|
1376
1441
|
type: "file",
|
|
1377
|
-
accept:
|
|
1378
|
-
"aria-invalid": !!
|
|
1379
|
-
"aria-describedby":
|
|
1442
|
+
accept: S.value,
|
|
1443
|
+
"aria-invalid": !!n.error,
|
|
1444
|
+
"aria-describedby": n.error ? "tpl-media-replace-error" : void 0,
|
|
1380
1445
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
|
|
1381
1446
|
style: {
|
|
1382
1447
|
"border-color": "var(--tpl-border)",
|
|
@@ -1384,34 +1449,33 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1384
1449
|
color: "var(--tpl-text)"
|
|
1385
1450
|
},
|
|
1386
1451
|
onChange: E
|
|
1387
|
-
}, null, 40,
|
|
1388
|
-
|
|
1389
|
-
|
|
1452
|
+
}, null, 40, Gt)]),
|
|
1453
|
+
n.error ? (y(), _("p", Kt, c(n.error), 1)) : g("", !0),
|
|
1454
|
+
x("div", qt, [x("button", {
|
|
1390
1455
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
1391
1456
|
style: {
|
|
1392
1457
|
"border-color": "var(--tpl-border)",
|
|
1393
1458
|
color: "var(--tpl-text)",
|
|
1394
1459
|
"background-color": "var(--tpl-bg)"
|
|
1395
1460
|
},
|
|
1396
|
-
disabled:
|
|
1397
|
-
onClick:
|
|
1398
|
-
},
|
|
1461
|
+
disabled: n.isReplacing,
|
|
1462
|
+
onClick: t[0] ||= (e) => o("close")
|
|
1463
|
+
}, c(w(s).mediaLibrary.cancel), 9, Jt), x("button", {
|
|
1399
1464
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
1400
1465
|
style: {
|
|
1401
1466
|
"background-color": "var(--tpl-primary)",
|
|
1402
1467
|
color: "var(--tpl-on-primary)"
|
|
1403
1468
|
},
|
|
1404
|
-
disabled: !m.value ||
|
|
1405
|
-
onClick:
|
|
1406
|
-
},
|
|
1407
|
-
], 512)], 42,
|
|
1469
|
+
disabled: !m.value || n.isReplacing,
|
|
1470
|
+
onClick: D
|
|
1471
|
+
}, c(n.isReplacing ? w(s).mediaLibrary.replacing : w(s).mediaLibrary.replace), 9, Yt)])
|
|
1472
|
+
], 512)], 42, Lt)) : g("", !0)]),
|
|
1408
1473
|
_: 1
|
|
1409
1474
|
})], 8, ["to"]));
|
|
1410
1475
|
}
|
|
1411
1476
|
});
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
function Xt(e, t) {
|
|
1477
|
+
// ../media-library/src/utils/formatList.ts
|
|
1478
|
+
function Zt(e, t) {
|
|
1415
1479
|
let n = {
|
|
1416
1480
|
style: "narrow",
|
|
1417
1481
|
type: "conjunction"
|
|
@@ -1423,108 +1487,107 @@ function Xt(e, t) {
|
|
|
1423
1487
|
return new Intl.ListFormat(void 0, n).format(e);
|
|
1424
1488
|
}
|
|
1425
1489
|
}
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
var Zt = [
|
|
1490
|
+
// ../media-library/src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
|
|
1491
|
+
var Qt = [
|
|
1429
1492
|
"aria-label",
|
|
1430
1493
|
"aria-describedby",
|
|
1431
1494
|
"aria-busy"
|
|
1432
|
-
],
|
|
1495
|
+
], $t = {
|
|
1433
1496
|
key: 0,
|
|
1434
1497
|
class: "tpl:flex tpl:items-center tpl:gap-2"
|
|
1435
|
-
}, $t = {
|
|
1436
|
-
class: "tpl:text-xs",
|
|
1437
|
-
style: { color: "var(--tpl-text-muted)" }
|
|
1438
1498
|
}, en = {
|
|
1439
1499
|
class: "tpl:text-xs",
|
|
1440
1500
|
style: { color: "var(--tpl-text-muted)" }
|
|
1441
1501
|
}, tn = {
|
|
1502
|
+
class: "tpl:text-xs",
|
|
1503
|
+
style: { color: "var(--tpl-text-muted)" }
|
|
1504
|
+
}, nn = {
|
|
1442
1505
|
id: "tpl-media-upload-hint",
|
|
1443
1506
|
"data-testid": "media-upload-hint",
|
|
1444
1507
|
class: "tpl:mt-1 tpl:text-[10px]",
|
|
1445
1508
|
style: { color: "var(--tpl-text-dim)" }
|
|
1446
|
-
},
|
|
1509
|
+
}, rn = {
|
|
1447
1510
|
key: 0,
|
|
1448
1511
|
"data-testid": "media-upload-rejected",
|
|
1449
1512
|
role: "alert",
|
|
1450
1513
|
class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
|
|
1451
1514
|
style: { color: "var(--tpl-danger)" }
|
|
1452
|
-
},
|
|
1515
|
+
}, an = /* @__PURE__ */ D({
|
|
1453
1516
|
__name: "MediaUploadZone",
|
|
1454
1517
|
props: {
|
|
1455
1518
|
isUploading: { type: Boolean },
|
|
1456
1519
|
uploadProgress: {}
|
|
1457
1520
|
},
|
|
1458
1521
|
emits: ["upload"],
|
|
1459
|
-
setup(
|
|
1460
|
-
let i = r, { t: a, format:
|
|
1522
|
+
setup(n, { emit: r }) {
|
|
1523
|
+
let i = r, { t: a, format: o } = Q(), s = t(Z, null), { allAcceptedInputString: l, restrictsMimeTypes: u, availableCategories: d, maxFileSize: p, isAcceptedFile: m } = he(), v = {
|
|
1461
1524
|
images: "filterImages",
|
|
1462
1525
|
documents: "filterDocuments",
|
|
1463
1526
|
videos: "filterVideos",
|
|
1464
1527
|
audio: "filterAudio"
|
|
1465
|
-
},
|
|
1466
|
-
let e = a.mediaLibrary, t = u.value ?
|
|
1467
|
-
return Number.isFinite(
|
|
1528
|
+
}, C = h(() => {
|
|
1529
|
+
let e = a.mediaLibrary, t = u.value ? Zt(d.value.map((t) => e[v[t]]), s?.value) : a.mediaLibrary.acceptedAnyType;
|
|
1530
|
+
return Number.isFinite(p.value) ? o(a.mediaLibrary.acceptedFormatsMaxSize, {
|
|
1468
1531
|
formats: t,
|
|
1469
|
-
size: $(
|
|
1532
|
+
size: $(p.value)
|
|
1470
1533
|
}) : t;
|
|
1471
|
-
}),
|
|
1472
|
-
function
|
|
1534
|
+
}), T = e([]), E = e();
|
|
1535
|
+
function D(e) {
|
|
1473
1536
|
let t = [], n = [];
|
|
1474
1537
|
for (let r of Array.from(e)) m(r) ? t.push(r) : n.push(r.name);
|
|
1475
|
-
|
|
1538
|
+
T.value = n, t.length && i("upload", t);
|
|
1476
1539
|
}
|
|
1477
|
-
let { isOverDropZone:
|
|
1478
|
-
e?.length &&
|
|
1479
|
-
} }), { open:
|
|
1540
|
+
let { isOverDropZone: O } = L(E, { onDrop: (e) => {
|
|
1541
|
+
e?.length && D(e);
|
|
1542
|
+
} }), { open: k, onChange: A } = I({
|
|
1480
1543
|
accept: l.value,
|
|
1481
1544
|
multiple: !0
|
|
1482
1545
|
});
|
|
1483
|
-
return
|
|
1484
|
-
e?.length &&
|
|
1485
|
-
}), (e,
|
|
1546
|
+
return A((e) => {
|
|
1547
|
+
e?.length && D(e);
|
|
1548
|
+
}), (e, t) => (y(), _(S, null, [x("button", {
|
|
1486
1549
|
ref_key: "dropZoneRef",
|
|
1487
|
-
ref:
|
|
1550
|
+
ref: E,
|
|
1488
1551
|
type: "button",
|
|
1489
1552
|
"data-testid": "media-upload-zone",
|
|
1490
|
-
class:
|
|
1491
|
-
"aria-label":
|
|
1492
|
-
"aria-describedby":
|
|
1493
|
-
"aria-busy":
|
|
1553
|
+
class: b(["tpl-upload-zone tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", w(O) ? "tpl-upload-zone-active" : ""]),
|
|
1554
|
+
"aria-label": w(a).mediaLibrary.dropOrClick,
|
|
1555
|
+
"aria-describedby": n.isUploading ? void 0 : "tpl-media-upload-hint",
|
|
1556
|
+
"aria-busy": n.isUploading,
|
|
1494
1557
|
style: {
|
|
1495
1558
|
"border-color": "var(--tpl-border-light)",
|
|
1496
1559
|
"background-color": "var(--tpl-bg)"
|
|
1497
1560
|
},
|
|
1498
|
-
onClick:
|
|
1499
|
-
}, [
|
|
1561
|
+
onClick: t[0] ||= (e) => w(k)()
|
|
1562
|
+
}, [n.isUploading ? (y(), _("div", $t, [f(w(H), {
|
|
1500
1563
|
class: "tpl-spinner",
|
|
1501
1564
|
size: 20,
|
|
1502
1565
|
"stroke-width": 2,
|
|
1503
1566
|
style: { color: "var(--tpl-primary)" }
|
|
1504
|
-
}),
|
|
1505
|
-
current:
|
|
1506
|
-
total:
|
|
1507
|
-
}) :
|
|
1508
|
-
|
|
1567
|
+
}), x("span", en, c(n.uploadProgress && n.uploadProgress.total > 1 ? w(o)(w(a).mediaLibrary.uploadingProgress, {
|
|
1568
|
+
current: n.uploadProgress.current,
|
|
1569
|
+
total: n.uploadProgress.total
|
|
1570
|
+
}) : w(a).mediaLibrary.uploading), 1)])) : (y(), _(S, { key: 1 }, [
|
|
1571
|
+
f(w(ne), {
|
|
1509
1572
|
class: "tpl:mb-2",
|
|
1510
1573
|
size: 24,
|
|
1511
1574
|
"stroke-width": 1.5,
|
|
1512
1575
|
style: { color: "var(--tpl-text-dim)" }
|
|
1513
1576
|
}),
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
], 64))], 10,
|
|
1577
|
+
x("p", tn, c(w(a).mediaLibrary.dropOrClick), 1),
|
|
1578
|
+
x("p", nn, c(C.value), 1)
|
|
1579
|
+
], 64))], 10, Qt), T.value.length ? (y(), _("p", rn, c(w(o)(w(a).mediaLibrary.uploadRejected, { files: T.value.join(", ") })), 1)) : g("", !0)], 64));
|
|
1517
1580
|
}
|
|
1518
|
-
}),
|
|
1581
|
+
}), on = ["aria-label"], sn = [
|
|
1519
1582
|
"width",
|
|
1520
1583
|
"height",
|
|
1521
1584
|
"viewBox"
|
|
1522
|
-
],
|
|
1585
|
+
], cn = [
|
|
1523
1586
|
"cx",
|
|
1524
1587
|
"cy",
|
|
1525
1588
|
"r",
|
|
1526
1589
|
"stroke-width"
|
|
1527
|
-
],
|
|
1590
|
+
], ln = [
|
|
1528
1591
|
"cx",
|
|
1529
1592
|
"cy",
|
|
1530
1593
|
"r",
|
|
@@ -1532,14 +1595,14 @@ var Zt = [
|
|
|
1532
1595
|
"stroke",
|
|
1533
1596
|
"stroke-dasharray",
|
|
1534
1597
|
"stroke-dashoffset"
|
|
1535
|
-
],
|
|
1598
|
+
], un = {
|
|
1536
1599
|
key: 0,
|
|
1537
1600
|
class: "tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:-translate-x-1/2 tpl:rounded-md tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:whitespace-nowrap tpl:shadow-lg",
|
|
1538
1601
|
style: {
|
|
1539
1602
|
"background-color": "var(--tpl-text)",
|
|
1540
1603
|
color: "var(--tpl-bg-elevated)"
|
|
1541
1604
|
}
|
|
1542
|
-
},
|
|
1605
|
+
}, dn = /* @__PURE__ */ D({
|
|
1543
1606
|
__name: "StorageProgressRing",
|
|
1544
1607
|
props: {
|
|
1545
1608
|
usedBytes: {},
|
|
@@ -1547,44 +1610,44 @@ var Zt = [
|
|
|
1547
1610
|
size: {}
|
|
1548
1611
|
},
|
|
1549
1612
|
setup(t) {
|
|
1550
|
-
let n = t, { t:
|
|
1551
|
-
used:
|
|
1552
|
-
total:
|
|
1553
|
-
remaining:
|
|
1613
|
+
let n = t, { t: i, format: a } = Q(), o = e(!1), s = h(() => n.size ?? 24), l = h(() => Math.max(2, s.value / 8)), u = h(() => (s.value - l.value) / 2), d = h(() => 2 * Math.PI * u.value), p = h(() => n.limitBytes <= 0 ? 0 : Math.min(100, n.usedBytes / n.limitBytes * 100)), m = h(() => d.value - p.value / 100 * d.value), b = h(() => p.value >= 95 ? "var(--tpl-danger)" : p.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), S = h(() => $(n.usedBytes)), C = h(() => $(n.limitBytes)), w = h(() => Math.max(0, n.limitBytes - n.usedBytes)), T = h(() => $(w.value)), E = h(() => a(i.mediaLibrary.storageTooltip, {
|
|
1614
|
+
used: S.value,
|
|
1615
|
+
total: C.value,
|
|
1616
|
+
remaining: T.value
|
|
1554
1617
|
}));
|
|
1555
|
-
return (e, t) => (
|
|
1618
|
+
return (e, t) => (y(), _("div", {
|
|
1556
1619
|
"data-testid": "media-storage-ring",
|
|
1557
1620
|
class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
|
|
1558
1621
|
tabindex: "0",
|
|
1559
|
-
"aria-label":
|
|
1560
|
-
onMouseenter: t[0] ||= (e) =>
|
|
1561
|
-
onMouseleave: t[1] ||= (e) =>
|
|
1562
|
-
onFocus: t[2] ||= (e) =>
|
|
1563
|
-
onBlur: t[3] ||= (e) =>
|
|
1564
|
-
}, [(
|
|
1622
|
+
"aria-label": E.value,
|
|
1623
|
+
onMouseenter: t[0] ||= (e) => o.value = !0,
|
|
1624
|
+
onMouseleave: t[1] ||= (e) => o.value = !1,
|
|
1625
|
+
onFocus: t[2] ||= (e) => o.value = !0,
|
|
1626
|
+
onBlur: t[3] ||= (e) => o.value = !1
|
|
1627
|
+
}, [(y(), _("svg", {
|
|
1565
1628
|
width: s.value,
|
|
1566
1629
|
height: s.value,
|
|
1567
1630
|
class: "tpl:-rotate-90",
|
|
1568
1631
|
viewBox: `0 0 ${s.value} ${s.value}`
|
|
1569
|
-
}, [
|
|
1632
|
+
}, [x("circle", {
|
|
1570
1633
|
cx: s.value / 2,
|
|
1571
1634
|
cy: s.value / 2,
|
|
1572
1635
|
r: u.value,
|
|
1573
1636
|
fill: "none",
|
|
1574
|
-
"stroke-width":
|
|
1637
|
+
"stroke-width": l.value,
|
|
1575
1638
|
style: { stroke: "var(--tpl-border)" }
|
|
1576
|
-
}, null, 8,
|
|
1639
|
+
}, null, 8, cn), x("circle", {
|
|
1577
1640
|
cx: s.value / 2,
|
|
1578
1641
|
cy: s.value / 2,
|
|
1579
1642
|
r: u.value,
|
|
1580
1643
|
fill: "none",
|
|
1581
|
-
"stroke-width":
|
|
1582
|
-
stroke:
|
|
1644
|
+
"stroke-width": l.value,
|
|
1645
|
+
stroke: b.value,
|
|
1583
1646
|
"stroke-linecap": "round",
|
|
1584
1647
|
"stroke-dasharray": d.value,
|
|
1585
|
-
"stroke-dashoffset":
|
|
1648
|
+
"stroke-dashoffset": m.value,
|
|
1586
1649
|
class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
|
|
1587
|
-
}, null, 8,
|
|
1650
|
+
}, null, 8, ln)], 8, sn)), f(M, {
|
|
1588
1651
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1589
1652
|
"enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
|
|
1590
1653
|
"enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
@@ -1592,17 +1655,16 @@ var Zt = [
|
|
|
1592
1655
|
"leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
1593
1656
|
"leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
|
|
1594
1657
|
}, {
|
|
1595
|
-
default:
|
|
1658
|
+
default: r(() => [o.value ? (y(), _("div", un, [v(c(E.value) + " ", 1), t[4] ||= x("div", {
|
|
1596
1659
|
class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
|
|
1597
1660
|
style: { "background-color": "var(--tpl-text)" }
|
|
1598
|
-
}, null, -1)])) :
|
|
1661
|
+
}, null, -1)])) : g("", !0)]),
|
|
1599
1662
|
_: 1
|
|
1600
|
-
})], 40,
|
|
1663
|
+
})], 40, on));
|
|
1601
1664
|
}
|
|
1602
1665
|
});
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
function dn(e) {
|
|
1666
|
+
// ../media-library/src/utils/treeFolders.ts
|
|
1667
|
+
function fn(e) {
|
|
1606
1668
|
let t = /* @__PURE__ */ new Map();
|
|
1607
1669
|
for (let n of e) t.set(n.id, {
|
|
1608
1670
|
...n,
|
|
@@ -1615,14 +1677,13 @@ function dn(e) {
|
|
|
1615
1677
|
}
|
|
1616
1678
|
return n;
|
|
1617
1679
|
}
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
function fn(t) {
|
|
1680
|
+
// ../media-library/src/composables/useMediaLibraryUI.ts
|
|
1681
|
+
function pn(t) {
|
|
1621
1682
|
let { library: n, translations: r } = t;
|
|
1622
1683
|
function i() {
|
|
1623
1684
|
return "value" in r && typeof r.value == "object" ? r.value : r;
|
|
1624
1685
|
}
|
|
1625
|
-
let a = e("grid"), o = e(!1), s = e(""), c = e(null), l = e(!1),
|
|
1686
|
+
let a = e("grid"), o = e(!1), s = e(""), c = e(null), l = e(!1), u = e(!1), d = h(() => n.previewItem.value?.url ?? null), f = h(() => n.frequentlyUsedItems.value.length > 0), p = h(() => n.viewMode.value === "frequently-used" ? n.frequentlyUsedItems.value : n.items.value), m = h(() => Object.values(n.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = h(() => fn(n.folders.value)), _ = {
|
|
1626
1687
|
images: () => i().mediaLibrary.filterImages,
|
|
1627
1688
|
documents: () => i().mediaLibrary.filterDocuments,
|
|
1628
1689
|
videos: () => i().mediaLibrary.filterVideos,
|
|
@@ -1631,7 +1692,7 @@ function fn(t) {
|
|
|
1631
1692
|
function v(e) {
|
|
1632
1693
|
return _[e]?.() ?? e;
|
|
1633
1694
|
}
|
|
1634
|
-
|
|
1695
|
+
O(o, (e) => {
|
|
1635
1696
|
e && n.loadFolders();
|
|
1636
1697
|
});
|
|
1637
1698
|
let y = N((e) => {
|
|
@@ -1669,7 +1730,7 @@ function fn(t) {
|
|
|
1669
1730
|
await n.importFromUrl(e) && (l.value = !1);
|
|
1670
1731
|
}
|
|
1671
1732
|
async function M(e) {
|
|
1672
|
-
|
|
1733
|
+
u.value = !1, await n.moveSelected(e);
|
|
1673
1734
|
}
|
|
1674
1735
|
async function P() {
|
|
1675
1736
|
await n.checkUsageBeforeDelete();
|
|
@@ -1689,11 +1750,11 @@ function fn(t) {
|
|
|
1689
1750
|
searchInput: s,
|
|
1690
1751
|
editingItem: c,
|
|
1691
1752
|
showImportUrlModal: l,
|
|
1692
|
-
showMovePicker:
|
|
1693
|
-
selectedUrl:
|
|
1694
|
-
hasFrequentlyUsed:
|
|
1695
|
-
displayItems:
|
|
1696
|
-
hasUsedFiles:
|
|
1753
|
+
showMovePicker: u,
|
|
1754
|
+
selectedUrl: d,
|
|
1755
|
+
hasFrequentlyUsed: f,
|
|
1756
|
+
displayItems: p,
|
|
1757
|
+
hasUsedFiles: m,
|
|
1697
1758
|
folderTree: g,
|
|
1698
1759
|
copy: x,
|
|
1699
1760
|
copied: S,
|
|
@@ -1714,10 +1775,9 @@ function fn(t) {
|
|
|
1714
1775
|
resetUI: R
|
|
1715
1776
|
};
|
|
1716
1777
|
}
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
let { provider: n } = t, r = e([]), i = e([]), a = e(null), o = e("files"), s = e(""), c = e(null), l = e("newest"), u = e(!1), d = e(!1), f = e(!1), p = e(null), m = e(null), h = e(/* @__PURE__ */ new Set()), g = e(null), _ = e([]), v = e({}), y = e(!1), x = e([]), S = e(!1), C = e(null), w = e(!1), T = e(null), E = e(!1), D = e(null), O = e(null), k = e(null), A = 0;
|
|
1778
|
+
// ../media-library/src/composable.ts
|
|
1779
|
+
function mn(t) {
|
|
1780
|
+
let { provider: n } = t, r = e([]), i = e([]), a = e(null), o = e("files"), s = e(""), c = e(null), l = e("newest"), u = e(!1), d = e(!1), f = e(!1), p = e(null), h = e(null), g = e(/* @__PURE__ */ new Set()), _ = e(null), v = e([]), y = e({}), b = e(!1), x = e([]), S = e(!1), C = e(null), w = e(!1), T = e(null), E = e(!1), D = e(null), O = e(null), k = e(null), A = 0;
|
|
1721
1781
|
function j(e) {
|
|
1722
1782
|
try {
|
|
1723
1783
|
e();
|
|
@@ -1729,7 +1789,7 @@ function pn(t) {
|
|
|
1729
1789
|
return n.folders === !1 ? null : n.folders;
|
|
1730
1790
|
}
|
|
1731
1791
|
function N() {
|
|
1732
|
-
return
|
|
1792
|
+
return m(t.templateId);
|
|
1733
1793
|
}
|
|
1734
1794
|
function P(e) {
|
|
1735
1795
|
let t = {};
|
|
@@ -1778,10 +1838,10 @@ function pn(t) {
|
|
|
1778
1838
|
l.value = e, await F();
|
|
1779
1839
|
}
|
|
1780
1840
|
async function B(e) {
|
|
1781
|
-
o.value = "files", a.value = e, s.value = "",
|
|
1841
|
+
o.value = "files", a.value = e, s.value = "", g.value = /* @__PURE__ */ new Set(), _.value = null, await F();
|
|
1782
1842
|
}
|
|
1783
1843
|
async function V() {
|
|
1784
|
-
o.value = "frequently-used", a.value = null, s.value = "",
|
|
1844
|
+
o.value = "frequently-used", a.value = null, s.value = "", g.value = /* @__PURE__ */ new Set(), _.value = null, await W();
|
|
1785
1845
|
}
|
|
1786
1846
|
async function ee(e) {
|
|
1787
1847
|
let { create: i } = n;
|
|
@@ -1803,13 +1863,13 @@ function pn(t) {
|
|
|
1803
1863
|
async function te(e) {
|
|
1804
1864
|
let { create: i } = n;
|
|
1805
1865
|
if (typeof i == "function") {
|
|
1806
|
-
d.value = !0,
|
|
1866
|
+
d.value = !0, h.value = {
|
|
1807
1867
|
current: 0,
|
|
1808
1868
|
total: e.length
|
|
1809
1869
|
};
|
|
1810
1870
|
try {
|
|
1811
1871
|
for (let o = 0; o < e.length; o++) {
|
|
1812
|
-
|
|
1872
|
+
h.value = {
|
|
1813
1873
|
current: o + 1,
|
|
1814
1874
|
total: e.length
|
|
1815
1875
|
};
|
|
@@ -1825,20 +1885,20 @@ function pn(t) {
|
|
|
1825
1885
|
}
|
|
1826
1886
|
}
|
|
1827
1887
|
} finally {
|
|
1828
|
-
d.value = !1,
|
|
1888
|
+
d.value = !1, h.value = null;
|
|
1829
1889
|
}
|
|
1830
1890
|
}
|
|
1831
1891
|
}
|
|
1832
1892
|
async function ne(e) {
|
|
1833
|
-
if (
|
|
1893
|
+
if (g.value.size === 0) return;
|
|
1834
1894
|
let { move: n } = M() ?? { move: !1 };
|
|
1835
1895
|
if (typeof n == "function") try {
|
|
1836
|
-
let t = await n([...
|
|
1896
|
+
let t = await n([...g.value], e);
|
|
1837
1897
|
if (a.value === null) {
|
|
1838
1898
|
let e = new Map(t.map((e) => [e.id, e]));
|
|
1839
1899
|
r.value = r.value.map((t) => e.get(t.id) ?? t);
|
|
1840
|
-
} else r.value = r.value.filter((e) => !
|
|
1841
|
-
|
|
1900
|
+
} else r.value = r.value.filter((e) => !g.value.has(e.id));
|
|
1901
|
+
g.value = /* @__PURE__ */ new Set(), _.value = null;
|
|
1842
1902
|
} catch (e) {
|
|
1843
1903
|
t.onError?.(e);
|
|
1844
1904
|
}
|
|
@@ -1850,7 +1910,7 @@ function pn(t) {
|
|
|
1850
1910
|
let t = { filename: i };
|
|
1851
1911
|
a !== void 0 && (t.alt = a);
|
|
1852
1912
|
let s = await o(e, t);
|
|
1853
|
-
return r.value = r.value.map((t) => t.id === e ? s : t),
|
|
1913
|
+
return r.value = r.value.map((t) => t.id === e ? s : t), _.value?.id === e && (_.value = s), j(() => n.onUpdated?.(s)), !0;
|
|
1854
1914
|
} catch (e) {
|
|
1855
1915
|
return t.onError?.(e), !1;
|
|
1856
1916
|
}
|
|
@@ -1858,17 +1918,17 @@ function pn(t) {
|
|
|
1858
1918
|
function ie(e) {
|
|
1859
1919
|
let t = /* @__PURE__ */ new Map();
|
|
1860
1920
|
for (let n of r.value) e.includes(n.id) && t.set(n.id, n);
|
|
1861
|
-
for (let n of
|
|
1921
|
+
for (let n of v.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
|
|
1862
1922
|
return [...t.values()];
|
|
1863
1923
|
}
|
|
1864
1924
|
function H(e) {
|
|
1865
|
-
r.value = r.value.filter((t) => !e.includes(t.id)),
|
|
1925
|
+
r.value = r.value.filter((t) => !e.includes(t.id)), v.value = v.value.filter((t) => !e.includes(t.id)), g.value = /* @__PURE__ */ new Set(), _.value = null;
|
|
1866
1926
|
}
|
|
1867
1927
|
async function U() {
|
|
1868
|
-
if (
|
|
1928
|
+
if (g.value.size === 0) return;
|
|
1869
1929
|
let { delete: e } = n;
|
|
1870
1930
|
if (typeof e != "function") return;
|
|
1871
|
-
let r = [...
|
|
1931
|
+
let r = [...g.value], i = ie(r);
|
|
1872
1932
|
try {
|
|
1873
1933
|
await e(r), H(r);
|
|
1874
1934
|
for (let e of i) j(() => n.onDeleted?.(e));
|
|
@@ -1876,43 +1936,43 @@ function pn(t) {
|
|
|
1876
1936
|
t.onError?.(e);
|
|
1877
1937
|
}
|
|
1878
1938
|
}
|
|
1879
|
-
async function
|
|
1939
|
+
async function W() {
|
|
1880
1940
|
let { frequentlyUsed: e } = n;
|
|
1881
1941
|
if (typeof e == "function") try {
|
|
1882
|
-
|
|
1942
|
+
v.value = await e();
|
|
1883
1943
|
} catch (e) {
|
|
1884
1944
|
t.onError?.(e);
|
|
1885
1945
|
}
|
|
1886
1946
|
}
|
|
1887
|
-
async function
|
|
1888
|
-
if (
|
|
1889
|
-
x.value = [...
|
|
1947
|
+
async function G() {
|
|
1948
|
+
if (g.value.size === 0) return !1;
|
|
1949
|
+
x.value = [...g.value];
|
|
1890
1950
|
let { checkUsage: e } = n;
|
|
1891
|
-
if (typeof e != "function") return
|
|
1951
|
+
if (typeof e != "function") return y.value = {}, b.value = !0, !1;
|
|
1892
1952
|
try {
|
|
1893
1953
|
let t = await e(x.value);
|
|
1894
|
-
|
|
1954
|
+
y.value = t;
|
|
1895
1955
|
let n = Object.values(t).some((e) => e.templateCount > 0);
|
|
1896
|
-
return
|
|
1956
|
+
return b.value = !0, n;
|
|
1897
1957
|
} catch (e) {
|
|
1898
1958
|
return t.onError?.(e), !1;
|
|
1899
1959
|
}
|
|
1900
1960
|
}
|
|
1901
|
-
async function
|
|
1961
|
+
async function ae() {
|
|
1902
1962
|
let { delete: e } = n;
|
|
1903
|
-
if (typeof e != "function" || (
|
|
1963
|
+
if (typeof e != "function" || (b.value = !1, x.value.length === 0)) return;
|
|
1904
1964
|
let r = x.value, i = ie(r);
|
|
1905
1965
|
try {
|
|
1906
|
-
await e(r), H(r), x.value = [],
|
|
1966
|
+
await e(r), H(r), x.value = [], y.value = {};
|
|
1907
1967
|
for (let e of i) j(() => n.onDeleted?.(e));
|
|
1908
1968
|
} catch (e) {
|
|
1909
1969
|
t.onError?.(e);
|
|
1910
1970
|
}
|
|
1911
1971
|
}
|
|
1912
|
-
function
|
|
1913
|
-
|
|
1972
|
+
function oe() {
|
|
1973
|
+
b.value = !1, x.value = [], y.value = {};
|
|
1914
1974
|
}
|
|
1915
|
-
async function
|
|
1975
|
+
async function se(e) {
|
|
1916
1976
|
let i = n.importFromUrl;
|
|
1917
1977
|
if (typeof i != "function") return null;
|
|
1918
1978
|
S.value = !0, C.value = null;
|
|
@@ -1925,17 +1985,17 @@ function pn(t) {
|
|
|
1925
1985
|
S.value = !1;
|
|
1926
1986
|
}
|
|
1927
1987
|
}
|
|
1928
|
-
function
|
|
1929
|
-
let t = new Set(
|
|
1930
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
1988
|
+
function K(e) {
|
|
1989
|
+
let t = new Set(g.value);
|
|
1990
|
+
t.has(e) ? t.delete(e) : t.add(e), g.value = t;
|
|
1931
1991
|
}
|
|
1932
|
-
function
|
|
1933
|
-
|
|
1992
|
+
function q() {
|
|
1993
|
+
g.value = /* @__PURE__ */ new Set(), _.value = null;
|
|
1934
1994
|
}
|
|
1935
|
-
function
|
|
1936
|
-
|
|
1995
|
+
function J(e) {
|
|
1996
|
+
_.value = e, g.value = /* @__PURE__ */ new Set([e.id]);
|
|
1937
1997
|
}
|
|
1938
|
-
async function
|
|
1998
|
+
async function ce() {
|
|
1939
1999
|
let { storage: e } = n;
|
|
1940
2000
|
if (typeof e != "function") k.value = null;
|
|
1941
2001
|
else try {
|
|
@@ -1944,7 +2004,7 @@ function pn(t) {
|
|
|
1944
2004
|
t.onError?.(e);
|
|
1945
2005
|
}
|
|
1946
2006
|
}
|
|
1947
|
-
async function
|
|
2007
|
+
async function Y() {
|
|
1948
2008
|
let e = M();
|
|
1949
2009
|
if (e) try {
|
|
1950
2010
|
i.value = await e.list();
|
|
@@ -1952,40 +2012,40 @@ function pn(t) {
|
|
|
1952
2012
|
t.onError?.(e);
|
|
1953
2013
|
}
|
|
1954
2014
|
}
|
|
1955
|
-
async function
|
|
2015
|
+
async function le(e, n) {
|
|
1956
2016
|
let { create: r } = M() ?? { create: !1 };
|
|
1957
2017
|
if (typeof r != "function") return null;
|
|
1958
2018
|
try {
|
|
1959
2019
|
let t = { name: e };
|
|
1960
2020
|
n !== void 0 && (t.parentId = n);
|
|
1961
2021
|
let i = await r(t);
|
|
1962
|
-
return await
|
|
2022
|
+
return await Y(), i;
|
|
1963
2023
|
} catch (e) {
|
|
1964
2024
|
return t.onError?.(e), null;
|
|
1965
2025
|
}
|
|
1966
2026
|
}
|
|
1967
|
-
function
|
|
2027
|
+
function ue(e, t) {
|
|
1968
2028
|
for (let n of e) if (n.id === t) return n;
|
|
1969
2029
|
return null;
|
|
1970
2030
|
}
|
|
1971
|
-
async function
|
|
2031
|
+
async function X(e, n) {
|
|
1972
2032
|
let { update: r } = M() ?? { update: !1 };
|
|
1973
2033
|
if (typeof r == "function") try {
|
|
1974
|
-
await r(e, { name: n }), await
|
|
2034
|
+
await r(e, { name: n }), await Y();
|
|
1975
2035
|
} catch (e) {
|
|
1976
2036
|
t.onError?.(e);
|
|
1977
2037
|
}
|
|
1978
2038
|
}
|
|
1979
|
-
async function
|
|
2039
|
+
async function de(e) {
|
|
1980
2040
|
let { delete: n } = M() ?? { delete: !1 };
|
|
1981
2041
|
if (typeof n == "function") try {
|
|
1982
|
-
let t =
|
|
1983
|
-
await n(e), a.value === e && (a.value = t), await
|
|
2042
|
+
let t = ue(i.value, e)?.parentId ?? null;
|
|
2043
|
+
await n(e), a.value === e && (a.value = t), await Y(), await F();
|
|
1984
2044
|
} catch (e) {
|
|
1985
2045
|
t.onError?.(e);
|
|
1986
2046
|
}
|
|
1987
2047
|
}
|
|
1988
|
-
async function
|
|
2048
|
+
async function fe(e) {
|
|
1989
2049
|
D.value = e, T.value = null;
|
|
1990
2050
|
let { checkUsage: r } = n;
|
|
1991
2051
|
if (typeof r != "function") O.value = null, E.value = !0;
|
|
@@ -1996,31 +2056,31 @@ function pn(t) {
|
|
|
1996
2056
|
t.onError?.(e);
|
|
1997
2057
|
}
|
|
1998
2058
|
}
|
|
1999
|
-
function
|
|
2059
|
+
function Z() {
|
|
2000
2060
|
E.value = !1, D.value = null, O.value = null, T.value = null;
|
|
2001
2061
|
}
|
|
2002
|
-
function
|
|
2003
|
-
r.value = r.value.map((t) => t.id === e.id ? e : t),
|
|
2062
|
+
function pe(e) {
|
|
2063
|
+
r.value = r.value.map((t) => t.id === e.id ? e : t), v.value = v.value.map((t) => t.id === e.id ? e : t), _.value?.id === e.id && (_.value = e), j(() => n.onUpdated?.(e));
|
|
2004
2064
|
}
|
|
2005
|
-
async function
|
|
2065
|
+
async function Q(e) {
|
|
2006
2066
|
let { replace: r } = n;
|
|
2007
2067
|
if (typeof r != "function" || !D.value) return null;
|
|
2008
2068
|
w.value = !0, T.value = null;
|
|
2009
2069
|
try {
|
|
2010
2070
|
let t = await r(D.value.id, e);
|
|
2011
|
-
return
|
|
2071
|
+
return pe(t), E.value = !1, D.value = null, O.value = null, t;
|
|
2012
2072
|
} catch (e) {
|
|
2013
2073
|
return T.value = e instanceof Error ? e.message : "Replace failed", t.onError?.(e), null;
|
|
2014
2074
|
} finally {
|
|
2015
2075
|
w.value = !1;
|
|
2016
2076
|
}
|
|
2017
2077
|
}
|
|
2018
|
-
async function
|
|
2078
|
+
async function me(e, r) {
|
|
2019
2079
|
let { replace: i } = n;
|
|
2020
2080
|
if (typeof i != "function") return null;
|
|
2021
2081
|
try {
|
|
2022
2082
|
let t = await i(e, r);
|
|
2023
|
-
return
|
|
2083
|
+
return pe(t), t;
|
|
2024
2084
|
} catch (e) {
|
|
2025
2085
|
return t.onError?.(e), null;
|
|
2026
2086
|
}
|
|
@@ -2035,13 +2095,13 @@ function pn(t) {
|
|
|
2035
2095
|
sortOption: l,
|
|
2036
2096
|
isLoading: u,
|
|
2037
2097
|
isUploading: d,
|
|
2038
|
-
uploadProgress:
|
|
2098
|
+
uploadProgress: h,
|
|
2039
2099
|
hasMore: f,
|
|
2040
|
-
selectedItems:
|
|
2041
|
-
previewItem:
|
|
2042
|
-
frequentlyUsedItems:
|
|
2043
|
-
deleteUsageInfo:
|
|
2044
|
-
showDeleteWarning:
|
|
2100
|
+
selectedItems: g,
|
|
2101
|
+
previewItem: _,
|
|
2102
|
+
frequentlyUsedItems: v,
|
|
2103
|
+
deleteUsageInfo: y,
|
|
2104
|
+
showDeleteWarning: b,
|
|
2045
2105
|
loadItems: F,
|
|
2046
2106
|
loadMore: I,
|
|
2047
2107
|
search: L,
|
|
@@ -2056,110 +2116,109 @@ function pn(t) {
|
|
|
2056
2116
|
deleteSelected: U,
|
|
2057
2117
|
isImportingFromUrl: S,
|
|
2058
2118
|
importFromUrlError: C,
|
|
2059
|
-
importFromUrl:
|
|
2060
|
-
toggleSelection:
|
|
2061
|
-
clearSelection:
|
|
2062
|
-
selectItem:
|
|
2063
|
-
loadFolders:
|
|
2064
|
-
createFolder:
|
|
2065
|
-
renameFolder:
|
|
2066
|
-
deleteFolder:
|
|
2067
|
-
findFolderInTree:
|
|
2068
|
-
loadFrequentlyUsed:
|
|
2069
|
-
checkUsageBeforeDelete:
|
|
2070
|
-
confirmDelete:
|
|
2071
|
-
cancelDelete:
|
|
2119
|
+
importFromUrl: se,
|
|
2120
|
+
toggleSelection: K,
|
|
2121
|
+
clearSelection: q,
|
|
2122
|
+
selectItem: J,
|
|
2123
|
+
loadFolders: Y,
|
|
2124
|
+
createFolder: le,
|
|
2125
|
+
renameFolder: X,
|
|
2126
|
+
deleteFolder: de,
|
|
2127
|
+
findFolderInTree: ue,
|
|
2128
|
+
loadFrequentlyUsed: W,
|
|
2129
|
+
checkUsageBeforeDelete: G,
|
|
2130
|
+
confirmDelete: ae,
|
|
2131
|
+
cancelDelete: oe,
|
|
2072
2132
|
isReplacing: w,
|
|
2073
2133
|
replaceError: T,
|
|
2074
2134
|
showReplaceWarning: E,
|
|
2075
2135
|
pendingReplaceItem: D,
|
|
2076
2136
|
replaceUsageInfo: O,
|
|
2077
|
-
checkUsageBeforeReplace:
|
|
2078
|
-
cancelReplace:
|
|
2079
|
-
replaceFile:
|
|
2080
|
-
replaceMediaDirectly:
|
|
2137
|
+
checkUsageBeforeReplace: fe,
|
|
2138
|
+
cancelReplace: Z,
|
|
2139
|
+
replaceFile: Q,
|
|
2140
|
+
replaceMediaDirectly: me,
|
|
2081
2141
|
storageInfo: k,
|
|
2082
|
-
loadStorage:
|
|
2142
|
+
loadStorage: ce
|
|
2083
2143
|
};
|
|
2084
2144
|
}
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, hn = {
|
|
2145
|
+
// ../media-library/src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
|
|
2146
|
+
var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, gn = {
|
|
2088
2147
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
|
|
2089
2148
|
style: { "border-color": "var(--tpl-border)" }
|
|
2090
|
-
},
|
|
2149
|
+
}, _n = {
|
|
2091
2150
|
id: "tpl-media-library-title",
|
|
2092
2151
|
class: "tpl:text-sm tpl:font-semibold",
|
|
2093
2152
|
style: { color: "var(--tpl-text)" }
|
|
2094
|
-
},
|
|
2153
|
+
}, vn = { class: "tpl:flex tpl:items-center tpl:gap-3" }, yn = { class: "tpl:relative" }, bn = [
|
|
2095
2154
|
"value",
|
|
2096
2155
|
"disabled",
|
|
2097
2156
|
"aria-label",
|
|
2098
2157
|
"placeholder"
|
|
2099
|
-
],
|
|
2158
|
+
], xn = ["aria-label"], Sn = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, Cn = {
|
|
2100
2159
|
key: 0,
|
|
2101
2160
|
class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
|
|
2102
2161
|
style: {
|
|
2103
2162
|
"border-color": "var(--tpl-border)",
|
|
2104
2163
|
"background-color": "var(--tpl-bg)"
|
|
2105
2164
|
}
|
|
2106
|
-
},
|
|
2165
|
+
}, wn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, Tn = {
|
|
2107
2166
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
|
|
2108
2167
|
style: { "border-color": "var(--tpl-border)" }
|
|
2109
|
-
},
|
|
2168
|
+
}, En = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Dn = [
|
|
2110
2169
|
"title",
|
|
2111
2170
|
"aria-label",
|
|
2112
2171
|
"aria-pressed"
|
|
2113
|
-
],
|
|
2172
|
+
], On = {
|
|
2114
2173
|
key: 1,
|
|
2115
2174
|
class: "tpl:text-xs tpl:font-medium",
|
|
2116
2175
|
style: { color: "var(--tpl-text)" }
|
|
2117
|
-
},
|
|
2176
|
+
}, kn = {
|
|
2118
2177
|
class: "tpl:flex tpl:rounded-md tpl:p-0.5",
|
|
2119
2178
|
style: {
|
|
2120
2179
|
border: "1px solid var(--tpl-border)",
|
|
2121
2180
|
"background-color": "var(--tpl-bg)"
|
|
2122
2181
|
}
|
|
2123
|
-
},
|
|
2182
|
+
}, An = [
|
|
2124
2183
|
"title",
|
|
2125
2184
|
"aria-label",
|
|
2126
2185
|
"aria-pressed"
|
|
2127
|
-
],
|
|
2186
|
+
], jn = [
|
|
2128
2187
|
"title",
|
|
2129
2188
|
"aria-label",
|
|
2130
2189
|
"aria-pressed"
|
|
2131
|
-
],
|
|
2190
|
+
], Mn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Nn = ["aria-label", "value"], Pn = { value: "" }, Fn = ["value"], In = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Ln = {
|
|
2132
2191
|
key: 0,
|
|
2133
2192
|
class: "tpl:px-4 tpl:pt-3"
|
|
2134
|
-
},
|
|
2193
|
+
}, Rn = {
|
|
2135
2194
|
class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
|
|
2136
2195
|
style: {
|
|
2137
2196
|
"background-color": "var(--tpl-bg-elevated)",
|
|
2138
2197
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
2139
2198
|
}
|
|
2140
|
-
},
|
|
2199
|
+
}, zn = {
|
|
2141
2200
|
id: "tpl-media-delete-title",
|
|
2142
2201
|
class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
|
|
2143
2202
|
style: { color: "var(--tpl-text)" }
|
|
2144
|
-
},
|
|
2203
|
+
}, Bn = {
|
|
2145
2204
|
key: 0,
|
|
2146
2205
|
"data-testid": "media-delete-usage",
|
|
2147
2206
|
class: "tpl:mb-4 tpl:text-xs",
|
|
2148
2207
|
style: { color: "var(--tpl-text-muted)" }
|
|
2149
|
-
},
|
|
2208
|
+
}, Vn = {
|
|
2150
2209
|
key: 1,
|
|
2151
2210
|
class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
|
|
2152
2211
|
style: { "border-color": "var(--tpl-border)" }
|
|
2153
|
-
},
|
|
2212
|
+
}, Hn = { class: "tpl:font-medium" }, Un = { style: { color: "var(--tpl-text-muted)" } }, Wn = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Gn = {
|
|
2154
2213
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
|
|
2155
2214
|
style: { "border-color": "var(--tpl-border)" }
|
|
2156
|
-
},
|
|
2215
|
+
}, Kn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, qn = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Jn = {
|
|
2157
2216
|
key: 0,
|
|
2158
2217
|
class: "tpl:flex tpl:items-center tpl:gap-2"
|
|
2159
|
-
},
|
|
2218
|
+
}, Yn = {
|
|
2160
2219
|
key: 1,
|
|
2161
2220
|
class: "tpl:relative"
|
|
2162
|
-
},
|
|
2221
|
+
}, Xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Zn = ["data-testid", "disabled"], Qn = /* @__PURE__ */ D({
|
|
2163
2222
|
__name: "MediaLibraryChrome",
|
|
2164
2223
|
props: {
|
|
2165
2224
|
provider: {},
|
|
@@ -2177,109 +2236,110 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2177
2236
|
"ready"
|
|
2178
2237
|
],
|
|
2179
2238
|
setup(e, { expose: t, emit: n }) {
|
|
2180
|
-
let
|
|
2239
|
+
let i = e, u = n, d = E(() => import("./MediaEditModal-Dy08GEwE.js")), p = h(() => i.translations), m = h(() => i.confirmTestId ?? "media-confirm"), C = {
|
|
2181
2240
|
get maxFileSize() {
|
|
2182
|
-
return
|
|
2241
|
+
return i.provider.maxFileSize;
|
|
2183
2242
|
},
|
|
2184
2243
|
get mimeTypes() {
|
|
2185
|
-
return
|
|
2244
|
+
return i.provider.mimeTypes;
|
|
2186
2245
|
},
|
|
2187
2246
|
get accept() {
|
|
2188
|
-
return
|
|
2247
|
+
return i.accept;
|
|
2189
2248
|
}
|
|
2190
2249
|
};
|
|
2191
|
-
|
|
2192
|
-
let { isAcceptedMimeType:
|
|
2193
|
-
provider:
|
|
2194
|
-
templateId: () =>
|
|
2195
|
-
onError: (e) =>
|
|
2196
|
-
}), N =
|
|
2197
|
-
library:
|
|
2198
|
-
translations:
|
|
2199
|
-
}), P =
|
|
2200
|
-
let e =
|
|
2250
|
+
a(ue, C);
|
|
2251
|
+
let { isAcceptedMimeType: D, availableCategories: k } = he(C), j = mn({
|
|
2252
|
+
provider: i.provider,
|
|
2253
|
+
templateId: () => i.templateId,
|
|
2254
|
+
onError: (e) => i.onError?.(e)
|
|
2255
|
+
}), N = pn({
|
|
2256
|
+
library: j,
|
|
2257
|
+
translations: p
|
|
2258
|
+
}), P = h(() => typeof i.provider.create == "function"), F = h(() => i.provider.folders !== !1), I = h(() => typeof i.provider.importFromUrl == "function"), L = h(() => typeof i.provider.delete == "function"), R = h(() => typeof i.provider.update == "function"), z = h(() => typeof i.provider.replace == "function"), B = h(() => typeof i.provider.frequentlyUsed == "function"), ee = h(() => {
|
|
2259
|
+
let e = i.provider.folders;
|
|
2201
2260
|
return e !== !1 && typeof e.move == "function";
|
|
2202
|
-
}),
|
|
2203
|
-
let e =
|
|
2261
|
+
}), ne = h(() => {
|
|
2262
|
+
let e = i.provider.folders;
|
|
2204
2263
|
return e !== !1 && typeof e.create == "function";
|
|
2205
|
-
}),
|
|
2206
|
-
let e =
|
|
2264
|
+
}), H = h(() => {
|
|
2265
|
+
let e = i.provider.folders;
|
|
2207
2266
|
return e !== !1 && typeof e.update == "function";
|
|
2208
|
-
}),
|
|
2209
|
-
let e =
|
|
2267
|
+
}), U = h(() => {
|
|
2268
|
+
let e = i.provider.folders;
|
|
2210
2269
|
return e !== !1 && typeof e.delete == "function";
|
|
2211
|
-
}),
|
|
2212
|
-
let e =
|
|
2213
|
-
return e ? !
|
|
2214
|
-
}),
|
|
2270
|
+
}), W = h(() => j.isLoading.value && N.displayItems.value.length === 0), G = h(() => {
|
|
2271
|
+
let e = j.previewItem.value;
|
|
2272
|
+
return e ? !i.accept?.length || D(e.mimeType ?? "", i.accept) : !1;
|
|
2273
|
+
}), oe = h(() => {
|
|
2215
2274
|
if (!L.value) return 0;
|
|
2216
2275
|
let e = 0;
|
|
2217
|
-
for (let t of
|
|
2276
|
+
for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
|
|
2218
2277
|
return e;
|
|
2219
|
-
}), K =
|
|
2220
|
-
function ce() {
|
|
2221
|
-
return K.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : k.showDeleteWarning.value ? (k.cancelDelete(), !0) : !1;
|
|
2222
|
-
}
|
|
2278
|
+
}), K = h(() => N.showImportUrlModal.value || N.editingItem.value !== null || j.showReplaceWarning.value);
|
|
2223
2279
|
function q() {
|
|
2224
|
-
|
|
2280
|
+
return K.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : j.showDeleteWarning.value ? (j.cancelDelete(), !0) : !1;
|
|
2225
2281
|
}
|
|
2226
|
-
function J(
|
|
2227
|
-
|
|
2282
|
+
function J() {
|
|
2283
|
+
G.value && j.previewItem.value && u("confirm", j.previewItem.value);
|
|
2228
2284
|
}
|
|
2229
|
-
|
|
2285
|
+
function le(e) {
|
|
2286
|
+
let t = e.target.value;
|
|
2287
|
+
j.filterByCategory(t || null);
|
|
2288
|
+
}
|
|
2289
|
+
async function X() {
|
|
2230
2290
|
let e = /* @__PURE__ */ new Set();
|
|
2231
|
-
for (let t of
|
|
2232
|
-
|
|
2291
|
+
for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
|
|
2292
|
+
j.selectedItems.value = e, await N.handleDeleteClick();
|
|
2233
2293
|
}
|
|
2234
|
-
return
|
|
2235
|
-
e?.length === 1 && (
|
|
2236
|
-
}, { immediate: !0 }),
|
|
2294
|
+
return O(() => i.accept, (e) => {
|
|
2295
|
+
e?.length === 1 && (j.categoryFilter.value = e[0]);
|
|
2296
|
+
}, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), u("ready"), l(() => {
|
|
2237
2297
|
N.resetUI();
|
|
2238
2298
|
}), t({
|
|
2239
2299
|
nestedDialogOpen: K,
|
|
2240
|
-
handleEscape:
|
|
2241
|
-
library:
|
|
2300
|
+
handleEscape: q,
|
|
2301
|
+
library: j,
|
|
2242
2302
|
ui: N
|
|
2243
|
-
}), (t, n) => (
|
|
2244
|
-
|
|
2245
|
-
|
|
2303
|
+
}), (t, n) => (y(), _("div", hn, [
|
|
2304
|
+
x("div", gn, [x("h2", _n, c(p.value.mediaLibrary.title), 1), x("div", vn, [
|
|
2305
|
+
w(j).storageInfo.value ? (y(), T(dn, {
|
|
2246
2306
|
key: 0,
|
|
2247
|
-
"used-bytes":
|
|
2248
|
-
"limit-bytes":
|
|
2307
|
+
"used-bytes": w(j).storageInfo.value.usedBytes,
|
|
2308
|
+
"limit-bytes": w(j).storageInfo.value.limitBytes,
|
|
2249
2309
|
size: 22
|
|
2250
|
-
}, null, 8, ["used-bytes", "limit-bytes"])) :
|
|
2251
|
-
|
|
2252
|
-
value:
|
|
2310
|
+
}, null, 8, ["used-bytes", "limit-bytes"])) : g("", !0),
|
|
2311
|
+
x("div", yn, [x("input", {
|
|
2312
|
+
value: w(N).searchInput.value,
|
|
2253
2313
|
type: "search",
|
|
2254
|
-
disabled:
|
|
2255
|
-
"aria-label":
|
|
2314
|
+
disabled: W.value,
|
|
2315
|
+
"aria-label": p.value.mediaLibrary.searchAriaLabel,
|
|
2256
2316
|
class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
2257
2317
|
style: {
|
|
2258
2318
|
"border-color": "var(--tpl-border)",
|
|
2259
2319
|
"background-color": "var(--tpl-bg)",
|
|
2260
2320
|
color: "var(--tpl-text)"
|
|
2261
2321
|
},
|
|
2262
|
-
placeholder:
|
|
2263
|
-
onInput: n[0] ||= (e) =>
|
|
2264
|
-
}, null, 40,
|
|
2322
|
+
placeholder: p.value.mediaLibrary.searchPlaceholder,
|
|
2323
|
+
onInput: n[0] ||= (e) => w(N).handleSearchInput(e.target.value)
|
|
2324
|
+
}, null, 40, bn), f(w(ae), {
|
|
2265
2325
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
2266
2326
|
size: 13,
|
|
2267
2327
|
"stroke-width": 2,
|
|
2268
2328
|
style: { color: "var(--tpl-text-dim)" }
|
|
2269
2329
|
})]),
|
|
2270
|
-
e.showClose ? (
|
|
2330
|
+
e.showClose ? (y(), _("button", {
|
|
2271
2331
|
key: 1,
|
|
2272
2332
|
type: "button",
|
|
2273
|
-
"aria-label":
|
|
2333
|
+
"aria-label": p.value.mediaLibrary.close,
|
|
2274
2334
|
class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2275
2335
|
style: { color: "var(--tpl-text-muted)" },
|
|
2276
|
-
onClick: n[1] ||= (e) =>
|
|
2277
|
-
}, [
|
|
2336
|
+
onClick: n[1] ||= (e) => u("close")
|
|
2337
|
+
}, [f(w(se), {
|
|
2278
2338
|
size: 18,
|
|
2279
2339
|
"stroke-width": 2
|
|
2280
|
-
})], 8,
|
|
2340
|
+
})], 8, xn)) : g("", !0)
|
|
2281
2341
|
])]),
|
|
2282
|
-
|
|
2342
|
+
x("div", Sn, [f(M, {
|
|
2283
2343
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
2284
2344
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
2285
2345
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -2287,19 +2347,19 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2287
2347
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
2288
2348
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
2289
2349
|
}, {
|
|
2290
|
-
default:
|
|
2291
|
-
folders:
|
|
2292
|
-
"current-folder-id":
|
|
2293
|
-
"view-mode":
|
|
2294
|
-
"has-frequently-used": B.value &&
|
|
2295
|
-
"can-create-folder":
|
|
2296
|
-
"can-rename-folder":
|
|
2297
|
-
"can-delete-folder":
|
|
2298
|
-
onNavigate:
|
|
2299
|
-
onCreateFolder:
|
|
2300
|
-
onRenameFolder:
|
|
2301
|
-
onDeleteFolder:
|
|
2302
|
-
onShowFrequentlyUsed:
|
|
2350
|
+
default: r(() => [F.value && w(N).showSidebar.value ? (y(), _("div", Cn, [f(Fe, {
|
|
2351
|
+
folders: w(N).folderTree.value,
|
|
2352
|
+
"current-folder-id": w(j).currentFolderId.value,
|
|
2353
|
+
"view-mode": w(j).viewMode.value,
|
|
2354
|
+
"has-frequently-used": B.value && w(N).hasFrequentlyUsed.value,
|
|
2355
|
+
"can-create-folder": ne.value,
|
|
2356
|
+
"can-rename-folder": H.value,
|
|
2357
|
+
"can-delete-folder": U.value,
|
|
2358
|
+
onNavigate: w(j).navigateToFolder,
|
|
2359
|
+
onCreateFolder: w(N).handleCreateFolder,
|
|
2360
|
+
onRenameFolder: w(N).handleRenameFolder,
|
|
2361
|
+
onDeleteFolder: w(N).handleDeleteFolder,
|
|
2362
|
+
onShowFrequentlyUsed: w(j).showFrequentlyUsed
|
|
2303
2363
|
}, null, 8, [
|
|
2304
2364
|
"folders",
|
|
2305
2365
|
"current-folder-id",
|
|
@@ -2313,90 +2373,90 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2313
2373
|
"onRenameFolder",
|
|
2314
2374
|
"onDeleteFolder",
|
|
2315
2375
|
"onShowFrequentlyUsed"
|
|
2316
|
-
])])) :
|
|
2376
|
+
])])) : g("", !0)]),
|
|
2317
2377
|
_: 1
|
|
2318
|
-
}),
|
|
2319
|
-
F.value ? (
|
|
2378
|
+
}), x("div", wn, [x("div", Tn, [x("div", En, [
|
|
2379
|
+
F.value ? (y(), _("button", {
|
|
2320
2380
|
key: 0,
|
|
2321
2381
|
type: "button",
|
|
2322
2382
|
"data-testid": "media-folder-toggle",
|
|
2323
2383
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2324
|
-
style:
|
|
2325
|
-
color:
|
|
2326
|
-
backgroundColor:
|
|
2327
|
-
border:
|
|
2384
|
+
style: o({
|
|
2385
|
+
color: w(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2386
|
+
backgroundColor: w(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
|
|
2387
|
+
border: w(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
|
|
2328
2388
|
}),
|
|
2329
|
-
title:
|
|
2330
|
-
"aria-label":
|
|
2331
|
-
"aria-pressed":
|
|
2332
|
-
onClick: n[2] ||= (e) =>
|
|
2333
|
-
}, [
|
|
2389
|
+
title: w(N).showSidebar.value ? p.value.mediaLibrary.hideFolders : p.value.mediaLibrary.showFolders,
|
|
2390
|
+
"aria-label": w(N).showSidebar.value ? p.value.mediaLibrary.hideFolders : p.value.mediaLibrary.showFolders,
|
|
2391
|
+
"aria-pressed": w(N).showSidebar.value,
|
|
2392
|
+
onClick: n[2] ||= (e) => w(N).showSidebar.value = !w(N).showSidebar.value
|
|
2393
|
+
}, [f(w(Y), {
|
|
2334
2394
|
size: 16,
|
|
2335
2395
|
"stroke-width": 2
|
|
2336
|
-
})], 12,
|
|
2337
|
-
|
|
2396
|
+
})], 12, Dn)) : g("", !0),
|
|
2397
|
+
w(j).viewMode.value === "frequently-used" ? (y(), _("span", On, c(p.value.mediaLibrary.frequentlyUsed), 1)) : (y(), T(xe, {
|
|
2338
2398
|
key: 2,
|
|
2339
|
-
folders:
|
|
2340
|
-
"current-folder-id":
|
|
2341
|
-
onNavigate:
|
|
2399
|
+
folders: w(N).folderTree.value,
|
|
2400
|
+
"current-folder-id": w(j).currentFolderId.value,
|
|
2401
|
+
onNavigate: w(j).navigateToFolder
|
|
2342
2402
|
}, null, 8, [
|
|
2343
2403
|
"folders",
|
|
2344
2404
|
"current-folder-id",
|
|
2345
2405
|
"onNavigate"
|
|
2346
2406
|
])),
|
|
2347
|
-
|
|
2407
|
+
x("div", kn, [x("button", {
|
|
2348
2408
|
type: "button",
|
|
2349
2409
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2350
|
-
style:
|
|
2351
|
-
color:
|
|
2352
|
-
backgroundColor:
|
|
2410
|
+
style: o({
|
|
2411
|
+
color: w(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2412
|
+
backgroundColor: w(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2353
2413
|
}),
|
|
2354
|
-
title:
|
|
2355
|
-
"aria-label":
|
|
2356
|
-
"aria-pressed":
|
|
2357
|
-
onClick: n[3] ||= (e) =>
|
|
2358
|
-
}, [
|
|
2414
|
+
title: p.value.mediaLibrary.viewGrid,
|
|
2415
|
+
"aria-label": p.value.mediaLibrary.viewGrid,
|
|
2416
|
+
"aria-pressed": w(N).layoutMode.value === "grid",
|
|
2417
|
+
onClick: n[3] ||= (e) => w(N).layoutMode.value = "grid"
|
|
2418
|
+
}, [f(w(ce), {
|
|
2359
2419
|
size: 14,
|
|
2360
2420
|
"stroke-width": 2
|
|
2361
|
-
})], 12,
|
|
2421
|
+
})], 12, An), x("button", {
|
|
2362
2422
|
type: "button",
|
|
2363
2423
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2364
|
-
style:
|
|
2365
|
-
color:
|
|
2366
|
-
backgroundColor:
|
|
2424
|
+
style: o({
|
|
2425
|
+
color: w(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2426
|
+
backgroundColor: w(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2367
2427
|
}),
|
|
2368
|
-
title:
|
|
2369
|
-
"aria-label":
|
|
2370
|
-
"aria-pressed":
|
|
2371
|
-
onClick: n[4] ||= (e) =>
|
|
2372
|
-
}, [
|
|
2428
|
+
title: p.value.mediaLibrary.viewList,
|
|
2429
|
+
"aria-label": p.value.mediaLibrary.viewList,
|
|
2430
|
+
"aria-pressed": w(N).layoutMode.value === "list",
|
|
2431
|
+
onClick: n[4] ||= (e) => w(N).layoutMode.value = "list"
|
|
2432
|
+
}, [f(w(ie), {
|
|
2373
2433
|
size: 14,
|
|
2374
2434
|
"stroke-width": 2
|
|
2375
|
-
})], 12,
|
|
2376
|
-
]),
|
|
2435
|
+
})], 12, jn)])
|
|
2436
|
+
]), x("div", Mn, [w(k).length > 1 ? (y(), _("select", {
|
|
2377
2437
|
key: 0,
|
|
2378
|
-
"aria-label":
|
|
2438
|
+
"aria-label": p.value.mediaLibrary.filterAriaLabel,
|
|
2379
2439
|
class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
|
|
2380
2440
|
style: {
|
|
2381
2441
|
"border-color": "var(--tpl-border)",
|
|
2382
2442
|
"background-color": "var(--tpl-bg)",
|
|
2383
2443
|
color: "var(--tpl-text)"
|
|
2384
2444
|
},
|
|
2385
|
-
value:
|
|
2386
|
-
onChange:
|
|
2387
|
-
}, [
|
|
2445
|
+
value: w(j).categoryFilter.value ?? "",
|
|
2446
|
+
onChange: le
|
|
2447
|
+
}, [x("option", Pn, c(p.value.mediaLibrary.filterAll), 1), (y(!0), _(S, null, s(w(k), (e) => (y(), _("option", {
|
|
2388
2448
|
key: e,
|
|
2389
2449
|
value: e
|
|
2390
|
-
},
|
|
2450
|
+
}, c(w(N).getCategoryLabel(e)), 9, Fn))), 128))], 40, Nn)) : g("", !0)])]), x("div", In, [w(j).viewMode.value === "files" && (P.value || I.value) ? (y(), _("div", Ln, [P.value ? (y(), T(an, {
|
|
2391
2451
|
key: 0,
|
|
2392
|
-
"is-uploading":
|
|
2393
|
-
"upload-progress":
|
|
2394
|
-
onUpload:
|
|
2452
|
+
"is-uploading": w(j).isUploading.value,
|
|
2453
|
+
"upload-progress": w(j).uploadProgress.value,
|
|
2454
|
+
onUpload: w(N).handleUpload
|
|
2395
2455
|
}, null, 8, [
|
|
2396
2456
|
"is-uploading",
|
|
2397
2457
|
"upload-progress",
|
|
2398
2458
|
"onUpload"
|
|
2399
|
-
])) :
|
|
2459
|
+
])) : g("", !0), I.value ? (y(), _("button", {
|
|
2400
2460
|
key: 1,
|
|
2401
2461
|
"data-testid": "media-import-url",
|
|
2402
2462
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
@@ -2405,26 +2465,26 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2405
2465
|
color: "var(--tpl-text-muted)",
|
|
2406
2466
|
"background-color": "var(--tpl-bg)"
|
|
2407
2467
|
},
|
|
2408
|
-
onClick: n[5] ||= (e) =>
|
|
2409
|
-
}, [
|
|
2468
|
+
onClick: n[5] ||= (e) => w(N).showImportUrlModal.value = !0
|
|
2469
|
+
}, [f(w(re), {
|
|
2410
2470
|
size: 14,
|
|
2411
2471
|
"stroke-width": 2
|
|
2412
|
-
}),
|
|
2413
|
-
items:
|
|
2414
|
-
"selected-ids":
|
|
2415
|
-
"is-loading":
|
|
2416
|
-
"has-more":
|
|
2472
|
+
}), v(" " + c(p.value.mediaLibrary.importFromUrl), 1)])) : g("", !0)])) : g("", !0), f(pt, {
|
|
2473
|
+
items: w(N).displayItems.value,
|
|
2474
|
+
"selected-ids": w(j).selectedItems.value,
|
|
2475
|
+
"is-loading": w(j).isLoading.value,
|
|
2476
|
+
"has-more": w(j).viewMode.value === "files" && w(j).hasMore.value,
|
|
2417
2477
|
accept: e.accept,
|
|
2418
|
-
layout:
|
|
2419
|
-
"search-query":
|
|
2478
|
+
layout: w(N).layoutMode.value,
|
|
2479
|
+
"search-query": w(j).searchQuery.value,
|
|
2420
2480
|
"can-update": R.value,
|
|
2421
2481
|
"can-replace": z.value,
|
|
2422
|
-
onSelect:
|
|
2423
|
-
onToggle:
|
|
2424
|
-
onLoadMore:
|
|
2425
|
-
onEdit:
|
|
2426
|
-
onReplace:
|
|
2427
|
-
onConfirm:
|
|
2482
|
+
onSelect: w(N).handleSelect,
|
|
2483
|
+
onToggle: w(j).toggleSelection,
|
|
2484
|
+
onLoadMore: w(j).loadMore,
|
|
2485
|
+
onEdit: w(N).handleEditItem,
|
|
2486
|
+
onReplace: w(N).handleReplaceItem,
|
|
2487
|
+
onConfirm: J
|
|
2428
2488
|
}, null, 8, [
|
|
2429
2489
|
"items",
|
|
2430
2490
|
"selected-ids",
|
|
@@ -2441,38 +2501,38 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2441
2501
|
"onEdit",
|
|
2442
2502
|
"onReplace"
|
|
2443
2503
|
])])])]),
|
|
2444
|
-
|
|
2445
|
-
visible:
|
|
2446
|
-
"is-importing":
|
|
2447
|
-
error:
|
|
2448
|
-
onImport:
|
|
2449
|
-
onClose: n[6] ||= (e) =>
|
|
2504
|
+
f(wt, {
|
|
2505
|
+
visible: w(N).showImportUrlModal.value,
|
|
2506
|
+
"is-importing": w(j).isImportingFromUrl.value,
|
|
2507
|
+
error: w(j).importFromUrlError.value,
|
|
2508
|
+
onImport: w(N).handleImportFromUrl,
|
|
2509
|
+
onClose: n[6] ||= (e) => w(N).showImportUrlModal.value = !1
|
|
2450
2510
|
}, null, 8, [
|
|
2451
2511
|
"visible",
|
|
2452
2512
|
"is-importing",
|
|
2453
2513
|
"error",
|
|
2454
2514
|
"onImport"
|
|
2455
2515
|
]),
|
|
2456
|
-
|
|
2516
|
+
w(N).editingItem.value ? (y(), T(w(d), {
|
|
2457
2517
|
key: 0,
|
|
2458
2518
|
visible: !0,
|
|
2459
|
-
item:
|
|
2460
|
-
save:
|
|
2461
|
-
"can-crop": z.value &&
|
|
2462
|
-
onClose: n[7] ||= (e) =>
|
|
2519
|
+
item: w(N).editingItem.value,
|
|
2520
|
+
save: w(N).handleEditSave,
|
|
2521
|
+
"can-crop": z.value && w(N).editingItem.value.canUpdate !== !1,
|
|
2522
|
+
onClose: n[7] ||= (e) => w(N).editingItem.value = null
|
|
2463
2523
|
}, null, 8, [
|
|
2464
2524
|
"item",
|
|
2465
2525
|
"save",
|
|
2466
2526
|
"can-crop"
|
|
2467
|
-
])) :
|
|
2468
|
-
|
|
2469
|
-
visible:
|
|
2470
|
-
item:
|
|
2471
|
-
"usage-info":
|
|
2472
|
-
"is-replacing":
|
|
2473
|
-
error:
|
|
2474
|
-
onReplace:
|
|
2475
|
-
onClose:
|
|
2527
|
+
])) : g("", !0),
|
|
2528
|
+
f(Xt, {
|
|
2529
|
+
visible: w(j).showReplaceWarning.value,
|
|
2530
|
+
item: w(j).pendingReplaceItem.value,
|
|
2531
|
+
"usage-info": w(j).replaceUsageInfo.value,
|
|
2532
|
+
"is-replacing": w(j).isReplacing.value,
|
|
2533
|
+
error: w(j).replaceError.value,
|
|
2534
|
+
onReplace: w(N).handleReplaceFile,
|
|
2535
|
+
onClose: w(j).cancelReplace
|
|
2476
2536
|
}, null, 8, [
|
|
2477
2537
|
"visible",
|
|
2478
2538
|
"item",
|
|
@@ -2482,7 +2542,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2482
2542
|
"onReplace",
|
|
2483
2543
|
"onClose"
|
|
2484
2544
|
]),
|
|
2485
|
-
M
|
|
2545
|
+
f(M, {
|
|
2486
2546
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
2487
2547
|
"enter-from-class": "tpl:opacity-0",
|
|
2488
2548
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2490,7 +2550,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2490
2550
|
"leave-from-class": "tpl:opacity-100",
|
|
2491
2551
|
"leave-to-class": "tpl:opacity-0"
|
|
2492
2552
|
}, {
|
|
2493
|
-
default:
|
|
2553
|
+
default: r(() => [w(j).showDeleteWarning.value ? (y(), _("div", {
|
|
2494
2554
|
key: 0,
|
|
2495
2555
|
role: "dialog",
|
|
2496
2556
|
"aria-modal": "true",
|
|
@@ -2501,79 +2561,79 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2501
2561
|
"backdrop-filter": "blur(8px)",
|
|
2502
2562
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2503
2563
|
},
|
|
2504
|
-
onClick: n[10] ||=
|
|
2505
|
-
}, [
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
class:
|
|
2564
|
+
onClick: n[10] ||= A((...e) => w(j).cancelDelete && w(j).cancelDelete(...e), ["self"])
|
|
2565
|
+
}, [x("div", Rn, [
|
|
2566
|
+
x("h3", zn, c(p.value.mediaLibrary.deleteWarningTitle), 1),
|
|
2567
|
+
x("p", {
|
|
2568
|
+
class: b(["tpl:text-xs", w(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
2509
2569
|
style: { color: "var(--tpl-text-muted)" }
|
|
2510
|
-
},
|
|
2511
|
-
|
|
2512
|
-
|
|
2570
|
+
}, c(p.value.mediaLibrary.deleteWarningMessage), 3),
|
|
2571
|
+
w(N).hasUsedFiles.value ? (y(), _("p", Bn, c(p.value.mediaLibrary.deleteWarningUsageNote), 1)) : g("", !0),
|
|
2572
|
+
w(N).hasUsedFiles.value ? (y(), _("div", Vn, [(y(!0), _(S, null, s(w(j).deleteUsageInfo.value, (e, t) => (y(), _("div", {
|
|
2513
2573
|
key: t,
|
|
2514
2574
|
class: "tpl:text-xs",
|
|
2515
2575
|
style: { color: "var(--tpl-text)" }
|
|
2516
|
-
}, [e.templateCount > 0 ? (
|
|
2517
|
-
|
|
2576
|
+
}, [e.templateCount > 0 ? (y(), _(S, { key: 0 }, [x("span", Hn, c(w(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), x("span", Un, " - " + c(p.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : g("", !0)]))), 128))])) : g("", !0),
|
|
2577
|
+
x("div", Wn, [x("button", {
|
|
2518
2578
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2519
2579
|
style: {
|
|
2520
2580
|
"border-color": "var(--tpl-border)",
|
|
2521
2581
|
color: "var(--tpl-text)",
|
|
2522
2582
|
"background-color": "var(--tpl-bg)"
|
|
2523
2583
|
},
|
|
2524
|
-
onClick: n[8] ||= (...e) =>
|
|
2525
|
-
},
|
|
2584
|
+
onClick: n[8] ||= (...e) => w(j).cancelDelete && w(j).cancelDelete(...e)
|
|
2585
|
+
}, c(p.value.mediaLibrary.cancel), 1), x("button", {
|
|
2526
2586
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2527
2587
|
style: {
|
|
2528
2588
|
"border-color": "var(--tpl-danger)",
|
|
2529
2589
|
color: "var(--tpl-danger)",
|
|
2530
2590
|
"background-color": "var(--tpl-bg)"
|
|
2531
2591
|
},
|
|
2532
|
-
onClick: n[9] ||= (...e) =>
|
|
2533
|
-
},
|
|
2534
|
-
])])) :
|
|
2592
|
+
onClick: n[9] ||= (...e) => w(j).confirmDelete && w(j).confirmDelete(...e)
|
|
2593
|
+
}, c(w(N).hasUsedFiles.value ? p.value.mediaLibrary.deleteAnyway : p.value.mediaLibrary.confirmDelete), 1)])
|
|
2594
|
+
])])) : g("", !0)]),
|
|
2535
2595
|
_: 1
|
|
2536
2596
|
}),
|
|
2537
|
-
|
|
2597
|
+
x("div", Gn, [x("div", Kn, [w(j).previewItem.value ? (y(), T(It, {
|
|
2538
2598
|
key: 0,
|
|
2539
|
-
item:
|
|
2540
|
-
folders:
|
|
2541
|
-
}, null, 8, ["item", "folders"])) :
|
|
2599
|
+
item: w(j).previewItem.value,
|
|
2600
|
+
folders: w(N).folderTree.value
|
|
2601
|
+
}, null, 8, ["item", "folders"])) : g("", !0)]), x("div", qn, [w(j).selectedItems.value.size > 0 ? (y(), _("div", Jn, [w(j).previewItem.value ? (y(), _("button", {
|
|
2542
2602
|
key: 0,
|
|
2543
2603
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2544
|
-
style:
|
|
2545
|
-
borderColor:
|
|
2546
|
-
color:
|
|
2604
|
+
style: o({
|
|
2605
|
+
borderColor: w(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
|
|
2606
|
+
color: w(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
|
|
2547
2607
|
backgroundColor: "var(--tpl-bg)"
|
|
2548
2608
|
}),
|
|
2549
|
-
onClick: n[11] ||= (e) =>
|
|
2550
|
-
}, [
|
|
2609
|
+
onClick: n[11] ||= (e) => w(N).copy(w(N).selectedUrl.value)
|
|
2610
|
+
}, [w(N).copied.value ? (y(), T(w(V), {
|
|
2551
2611
|
key: 1,
|
|
2552
2612
|
size: 12,
|
|
2553
2613
|
"stroke-width": 2
|
|
2554
|
-
})) : (
|
|
2614
|
+
})) : (y(), T(w(te), {
|
|
2555
2615
|
key: 0,
|
|
2556
2616
|
size: 12,
|
|
2557
2617
|
"stroke-width": 2
|
|
2558
|
-
})),
|
|
2618
|
+
})), v(" " + c(w(N).copied.value ? p.value.mediaLibrary.copied : p.value.mediaLibrary.copyUrl), 1)], 4)) : g("", !0), ee.value ? (y(), _("div", Yn, [x("button", {
|
|
2559
2619
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2560
2620
|
style: {
|
|
2561
2621
|
"border-color": "var(--tpl-border)",
|
|
2562
2622
|
color: "var(--tpl-text)",
|
|
2563
2623
|
"background-color": "var(--tpl-bg)"
|
|
2564
2624
|
},
|
|
2565
|
-
onClick: n[12] ||= (e) =>
|
|
2566
|
-
},
|
|
2625
|
+
onClick: n[12] ||= (e) => w(N).showMovePicker.value = !w(N).showMovePicker.value
|
|
2626
|
+
}, c(p.value.mediaLibrary.moveSelected), 1), w(N).showMovePicker.value ? (y(), T(kt, {
|
|
2567
2627
|
key: 0,
|
|
2568
|
-
folders:
|
|
2569
|
-
"current-folder-id":
|
|
2570
|
-
onSelect:
|
|
2571
|
-
onClose: n[13] ||= (e) =>
|
|
2628
|
+
folders: w(N).folderTree.value,
|
|
2629
|
+
"current-folder-id": w(j).currentFolderId.value,
|
|
2630
|
+
onSelect: w(N).handleMoveToFolder,
|
|
2631
|
+
onClose: n[13] ||= (e) => w(N).showMovePicker.value = !1
|
|
2572
2632
|
}, null, 8, [
|
|
2573
2633
|
"folders",
|
|
2574
2634
|
"current-folder-id",
|
|
2575
2635
|
"onSelect"
|
|
2576
|
-
])) :
|
|
2636
|
+
])) : g("", !0)])) : g("", !0)])) : g("", !0), x("div", Xn, [oe.value > 0 ? (y(), _("button", {
|
|
2577
2637
|
key: 0,
|
|
2578
2638
|
"data-testid": "media-delete",
|
|
2579
2639
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
@@ -2582,54 +2642,53 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2582
2642
|
color: "var(--tpl-danger)",
|
|
2583
2643
|
"background-color": "var(--tpl-bg)"
|
|
2584
2644
|
},
|
|
2585
|
-
onClick:
|
|
2586
|
-
},
|
|
2645
|
+
onClick: X
|
|
2646
|
+
}, c(p.value.mediaLibrary.deleteSelected), 1)) : g("", !0), e.showConfirm ? (y(), _("button", {
|
|
2587
2647
|
key: 1,
|
|
2588
|
-
"data-testid":
|
|
2648
|
+
"data-testid": m.value,
|
|
2589
2649
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
2590
2650
|
style: {
|
|
2591
2651
|
"background-color": "var(--tpl-primary)",
|
|
2592
2652
|
color: "var(--tpl-on-primary)"
|
|
2593
2653
|
},
|
|
2594
|
-
disabled: !
|
|
2595
|
-
onClick:
|
|
2596
|
-
},
|
|
2654
|
+
disabled: !G.value,
|
|
2655
|
+
onClick: J
|
|
2656
|
+
}, c(e.accept?.length ? p.value.mediaLibrary.selectImage : p.value.mediaLibrary.selectFile), 9, Zn)) : g("", !0)])])])
|
|
2597
2657
|
]));
|
|
2598
2658
|
}
|
|
2599
|
-
}),
|
|
2600
|
-
"./locales/ca.ts": () => import("./ca-
|
|
2601
|
-
"./locales/de.ts": () => import("./de-
|
|
2602
|
-
"./locales/en.ts": () => import("./en-
|
|
2603
|
-
"./locales/es.ts": () => import("./es-
|
|
2604
|
-
"./locales/fr.ts": () => import("./fr-
|
|
2605
|
-
"./locales/ja.ts": () => import("./ja-
|
|
2606
|
-
"./locales/nl.ts": () => import("./nl-
|
|
2607
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
2659
|
+
}), $n = /* #__PURE__ */ Object.assign({
|
|
2660
|
+
"./locales/ca.ts": () => import("./ca-Cc6eL0ZS.js"),
|
|
2661
|
+
"./locales/de.ts": () => import("./de-DtrXVcuY.js"),
|
|
2662
|
+
"./locales/en.ts": () => import("./en-Db76vJbY.js"),
|
|
2663
|
+
"./locales/es.ts": () => import("./es-Dw_h7Oll.js"),
|
|
2664
|
+
"./locales/fr.ts": () => import("./fr-BJaeKu_8.js"),
|
|
2665
|
+
"./locales/ja.ts": () => import("./ja-Cu2HdYaK.js"),
|
|
2666
|
+
"./locales/nl.ts": () => import("./nl-1Ai2NykB.js"),
|
|
2667
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-CIbp__Z7.js")
|
|
2608
2668
|
});
|
|
2609
|
-
function
|
|
2669
|
+
function er(e) {
|
|
2610
2670
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
2611
2671
|
}
|
|
2612
|
-
var
|
|
2613
|
-
function tr(e) {
|
|
2614
|
-
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
2615
|
-
}
|
|
2672
|
+
var tr = er($n);
|
|
2616
2673
|
function nr(e) {
|
|
2617
|
-
|
|
2618
|
-
return er.find((e) => tr(e) === t);
|
|
2674
|
+
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
2619
2675
|
}
|
|
2620
2676
|
function rr(e) {
|
|
2621
|
-
|
|
2677
|
+
let t = nr(e);
|
|
2678
|
+
return tr.find((e) => nr(e) === t);
|
|
2622
2679
|
}
|
|
2623
2680
|
function ir(e) {
|
|
2624
|
-
return nr(e)
|
|
2681
|
+
return nr(e).split("-")[0];
|
|
2682
|
+
}
|
|
2683
|
+
function ar(e) {
|
|
2684
|
+
return rr(e) ?? rr(ir(e)) ?? "en";
|
|
2625
2685
|
}
|
|
2626
|
-
async function
|
|
2627
|
-
let t =
|
|
2686
|
+
async function or(e) {
|
|
2687
|
+
let t = $n[`./locales/${ar(e)}.ts`];
|
|
2628
2688
|
return (await t()).default;
|
|
2629
2689
|
}
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
|
|
2690
|
+
// ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
|
|
2691
|
+
var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
|
|
2633
2692
|
__name: "MediaLibraryModal",
|
|
2634
2693
|
props: {
|
|
2635
2694
|
visible: { type: Boolean },
|
|
@@ -2643,24 +2702,24 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
|
|
|
2643
2702
|
},
|
|
2644
2703
|
emits: ["close", "select"],
|
|
2645
2704
|
setup(t, { emit: n }) {
|
|
2646
|
-
let i = t,
|
|
2647
|
-
|
|
2648
|
-
s.value = await
|
|
2649
|
-
}, { immediate: !0 }),
|
|
2650
|
-
let c =
|
|
2651
|
-
|
|
2652
|
-
let
|
|
2653
|
-
|
|
2654
|
-
let
|
|
2655
|
-
|
|
2656
|
-
function
|
|
2657
|
-
e.key === "Escape" && (
|
|
2705
|
+
let i = t, o = n, s = e(null);
|
|
2706
|
+
O(() => i.locale, async (e) => {
|
|
2707
|
+
s.value = await or(e ?? "en");
|
|
2708
|
+
}, { immediate: !0 }), a(de, s);
|
|
2709
|
+
let c = h(() => i.uiTheme);
|
|
2710
|
+
a(fe, c);
|
|
2711
|
+
let l = C(() => i.popoverTarget ?? null);
|
|
2712
|
+
a(X, l), a(Z, C(() => i.locale));
|
|
2713
|
+
let u = e(null), d = e(null);
|
|
2714
|
+
_e(u, h(() => i.visible && s.value !== null && !d.value?.nestedDialogOpen));
|
|
2715
|
+
function m(e) {
|
|
2716
|
+
e.key === "Escape" && (d.value?.handleEscape() ? e.preventDefault() : o("close"));
|
|
2658
2717
|
}
|
|
2659
|
-
P(document, "keydown",
|
|
2660
|
-
function
|
|
2661
|
-
|
|
2718
|
+
P(document, "keydown", m);
|
|
2719
|
+
function v(e) {
|
|
2720
|
+
o("select", e), o("close");
|
|
2662
2721
|
}
|
|
2663
|
-
return (e, n) => (
|
|
2722
|
+
return (e, n) => (y(), T(p, { to: t.popoverTarget || "body" }, [f(M, {
|
|
2664
2723
|
"enter-active-class": "tpl:transition tpl:duration-200",
|
|
2665
2724
|
"enter-from-class": "tpl:opacity-0",
|
|
2666
2725
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2668,20 +2727,20 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
|
|
|
2668
2727
|
"leave-from-class": "tpl:opacity-100",
|
|
2669
2728
|
"leave-to-class": "tpl:opacity-0"
|
|
2670
2729
|
}, {
|
|
2671
|
-
default:
|
|
2730
|
+
default: r(() => [t.visible && s.value ? (y(), _("div", {
|
|
2672
2731
|
key: 0,
|
|
2673
2732
|
"data-testid": "media-library-modal",
|
|
2674
2733
|
"data-tpl-theme": c.value,
|
|
2675
|
-
class:
|
|
2734
|
+
class: b([t.popoverTarget ? void 0 : "tpl", "tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
2676
2735
|
style: {
|
|
2677
2736
|
"background-color": "var(--tpl-overlay)",
|
|
2678
2737
|
"backdrop-filter": "blur(8px)",
|
|
2679
2738
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2680
2739
|
},
|
|
2681
|
-
onClick: n[1] ||=
|
|
2682
|
-
}, [
|
|
2740
|
+
onClick: n[1] ||= A((e) => o("close"), ["self"])
|
|
2741
|
+
}, [x("div", {
|
|
2683
2742
|
ref_key: "dialogRef",
|
|
2684
|
-
ref:
|
|
2743
|
+
ref: u,
|
|
2685
2744
|
role: "dialog",
|
|
2686
2745
|
"aria-modal": "true",
|
|
2687
2746
|
"aria-labelledby": "tpl-media-library-title",
|
|
@@ -2696,9 +2755,9 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
|
|
|
2696
2755
|
border: "1px solid var(--tpl-border)",
|
|
2697
2756
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
2698
2757
|
}
|
|
2699
|
-
}, [
|
|
2758
|
+
}, [f(Qn, {
|
|
2700
2759
|
ref_key: "chromeRef",
|
|
2701
|
-
ref:
|
|
2760
|
+
ref: d,
|
|
2702
2761
|
provider: t.provider,
|
|
2703
2762
|
accept: t.accept,
|
|
2704
2763
|
"template-id": t.templateId,
|
|
@@ -2707,20 +2766,17 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
|
|
|
2707
2766
|
"show-close": "",
|
|
2708
2767
|
"show-confirm": "",
|
|
2709
2768
|
"confirm-test-id": "media-confirm",
|
|
2710
|
-
onClose: n[0] ||= (e) =>
|
|
2711
|
-
onConfirm:
|
|
2769
|
+
onClose: n[0] ||= (e) => o("close"),
|
|
2770
|
+
onConfirm: v
|
|
2712
2771
|
}, null, 8, [
|
|
2713
2772
|
"provider",
|
|
2714
2773
|
"accept",
|
|
2715
2774
|
"template-id",
|
|
2716
2775
|
"on-error",
|
|
2717
2776
|
"translations"
|
|
2718
|
-
])], 512)], 10,
|
|
2777
|
+
])], 512)], 10, sr)) : g("", !0)]),
|
|
2719
2778
|
_: 1
|
|
2720
2779
|
})], 8, ["to"]));
|
|
2721
2780
|
}
|
|
2722
2781
|
});
|
|
2723
|
-
|
|
2724
|
-
export { sr as MediaLibraryModal, J as a, pe as i, Q as n, Y as o, Z as r, ge as t };
|
|
2725
|
-
|
|
2726
|
-
//# sourceMappingURL=editor-modal-CI6EfeMd.js.map
|
|
2782
|
+
export { cr as MediaLibraryModal, X as a, pe as i, he as n, fe as o, Q as r, _e as t };
|