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