@templatical/editor 0.48.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
- package/dist/AiAltTextReview-DoBEudnE.js +206 -0
- package/dist/AiChatPanel-Bs6sES3b.js +550 -0
- package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
- package/dist/AiPanels-CfN7A-ZA.js +33 -0
- package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
- package/dist/{BlockIssueBadge-BShkuJis.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
- package/dist/{BlockPreviewCanvas-tzAtDkXH.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
- package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
- package/dist/CloudPanels-B4F5m7vy.js +168 -0
- package/dist/CollaborationNotices-CNuDp7Y2.js +76 -0
- package/dist/CollaboratorBar-BtHPiuHq.js +123 -0
- package/dist/{CommentsPanel-DiWzYtnZ.js → CommentsPanel-CyCM-BvT.js} +4 -4
- package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
- package/dist/{cdn/chunks/CountdownBlock-Dasj191h.js → CountdownBlock-DR4Xm2-T.js} +24 -26
- package/dist/{CountdownToolbar-C4y3Ft7H.js → CountdownToolbar-CEIMPojJ.js} +56 -56
- package/dist/IssuesPanel-C8nMUccy.js +360 -0
- package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-B0RKQWq3.js} +2 -2
- package/dist/{LogicTagInsertButton-B1_Wy0AN.js → LogicTagInsertButton-CqfU52CO.js} +272 -267
- package/dist/{cdn/chunks/MediaEditModal-zXfcArr4.js → MediaEditModal-DHtkZ4OU.js} +202 -186
- package/dist/{MediaPanels-9mDBv4aL.js → MediaPanels-CGcOB2pR.js} +4 -4
- package/dist/{MergeTagInput-fOewuF27.js → MergeTagInput-YnEkorTZ.js} +26 -26
- package/dist/{MergeTagModeToggle-BXamLcv7.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
- package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
- package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
- package/dist/{RestoreVersionDialog-BEKXx9xk.js → RestoreVersionDialog-Bq_IGOLJ.js} +22 -22
- package/dist/{RichTextEditorContent-D7kp7iig.js → RichTextEditorContent-AOM6fylS.js} +48 -48
- package/dist/{SaveBlockDialog-SJu0lecx.js → SaveBlockDialog-C8GngfQx.js} +88 -88
- package/dist/{cdn/chunks/SavedBlocksBrowserModal-CtnB58p_.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
- package/dist/{SavedBlocksPanels-Dr5Fxx9Z.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
- package/dist/{SavedBlocksPickBar-DnEWBZJy.js → SavedBlocksPickBar-BjcTiV87.js} +14 -14
- package/dist/TemplateSettings-BVBWpiDU.js +237 -0
- package/dist/{TestEmailModal-CbRY8HQx.js → TestEmailModal-SyhO9bn3.js} +57 -57
- package/dist/{TestEmailPanel-NAOmt3xi.js → TestEmailPanel-BDd2Rtav.js} +4 -4
- package/dist/{TitleEditor-Cc3DHbuN.js → TitleEditor-pxD53y_l.js} +75 -75
- package/dist/ToggleSwitch-D51U9cmR.js +37 -0
- package/dist/Toolbar-CZSPZYbj.js +3153 -0
- package/dist/{TplModal-Bz4-IZ9R.js → TplModal-DCzBzicE.js} +19 -19
- package/dist/{VersionHistoryMenu-CjV1d1zk.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
- package/dist/{VersionHistoryPanels-BtwxrKJn.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
- package/dist/{VersionPreviewBanner-BLAei1kj.js → VersionPreviewBanner-DUGF0tUJ.js} +10 -10
- package/dist/WrapperBlock-BO619LAb.js +45 -0
- package/dist/aiErrors-D5UOoYOt.js +41 -0
- package/dist/aiImageContext-BH4Ss1h3.js +48 -0
- package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
- package/dist/{blockTypeIcons-CEDZytqP.js → blockTypeIcons-NzaYvAI4.js} +15 -14
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-CbNzJM3I.js → ca-C7mTzW1r.js} +147 -8
- package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
- package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
- package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
- package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
- package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
- package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
- package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js → BlockPreviewCanvas-D0--EQkP.js} +39 -39
- package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
- package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-awqHfJqC.js → CloudPanels-C3jsxo_f.js} +52 -100
- package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
- package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js +78 -0
- package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-Dfzm6A9A.js +72 -0
- package/dist/cdn/chunks/CollaboratorBar-Dfzm6A9A.js.map +1 -0
- package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
- package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
- package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
- package/dist/{CountdownBlock-zx39Dyby.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js → CountdownToolbar-Cjud2Tos.js} +71 -71
- package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
- package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
- package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-BIcL4NiY.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js → LogicTagInsertButton-CsL2JDOG.js} +374 -369
- package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
- package/dist/{MediaEditModal-ByOvznRC.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
- package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
- package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
- package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js → MergeTagInput-C8U-7LxL.js} +34 -34
- package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
- package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
- package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js → RestoreVersionDialog-CdA5osuA.js} +26 -26
- package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
- package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js → SaveBlockDialog-CijargAy.js} +78 -78
- package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js → SavedBlocksPickBar-BPRaJBv3.js} +19 -19
- package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
- package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js → TestEmailModal-BUVTj3Ic.js} +54 -54
- package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
- package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
- package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
- package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
- package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
- package/dist/cdn/chunks/{Toolbar-C_x2TfFk.js → Toolbar-DoprRgTn.js} +1097 -1101
- package/dist/cdn/chunks/Toolbar-DoprRgTn.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DC_eodTV.js → TplModal-BXQzmsJX.js} +21 -21
- package/dist/cdn/chunks/{TplModal-DC_eodTV.js.map → TplModal-BXQzmsJX.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
- package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js → VersionPreviewBanner-BaGcn-b1.js} +13 -13
- package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
- package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
- package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
- package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
- package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
- package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
- package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
- package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
- package/dist/{ca-CbNzJM3I.js → cdn/chunks/ca-C7mTzW1r.js} +149 -6
- package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
- package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js +1408 -0
- package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
- package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
- package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
- package/dist/{de-DMquBpZM.js → cdn/chunks/de-DNuYQTmS.js} +149 -6
- package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
- package/dist/{dist-CUWI-IvA.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
- package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Bo8Thh8v.js.map} +1 -1
- package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
- package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-S-rLGqax.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-DZ0gwUJ6.js} +1359 -1266
- package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js → editor-modal-CI6EfeMd.js} +881 -881
- package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
- package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
- package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
- package/dist/{en-C8Mp71sO.js → cdn/chunks/en-CW71OK66.js} +149 -6
- package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
- package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
- package/dist/{es-Byq4tthI.js → cdn/chunks/es-DdK7zQfi.js} +149 -6
- package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
- package/dist/cdn/chunks/{extensions-hJ9VqzDc.js → extensions-taJTZlLK.js} +71 -71
- package/dist/cdn/chunks/{extensions-hJ9VqzDc.js.map → extensions-taJTZlLK.js.map} +1 -1
- package/dist/{fr-B3j35HEw.js → cdn/chunks/fr-Dz5Bgb7-.js} +149 -6
- package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
- package/dist/cdn/chunks/{icons-aTYwH5-g.js → icons-DNX6StSs.js} +183 -150
- package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
- package/dist/{ja-D7txAuGS.js → cdn/chunks/ja-Di-zJiT8.js} +149 -6
- package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
- package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
- package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
- package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
- package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
- package/dist/{nl-ClJ3BY3F.js → cdn/chunks/nl-CvVuHYFL.js} +149 -6
- package/dist/cdn/chunks/nl-CvVuHYFL.js.map +1 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
- package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
- package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
- package/dist/{pt-BR-DibcXcmv.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +149 -6
- package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
- package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
- package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
- package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
- package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
- package/dist/cdn/chunks/{src-DYCDeBDM.js → src-BNFnxfrA.js} +694 -329
- package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
- package/dist/cdn/chunks/{src-dZ4D_tuP.js → src-BcTUmgLe.js} +181 -181
- package/dist/cdn/chunks/src-BcTUmgLe.js.map +1 -0
- package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
- package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-CtVrAViq.js} +44 -44
- package/dist/cdn/chunks/tiptap-CtVrAViq.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-AVXhzbhQ.js} +4 -4
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-CbVubQhM.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-CbVubQhM.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js → useLogicTag-B49Nc53Y.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js → useMergeTag-B0KryMj8.js} +7 -7
- package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-C829ps5i.js} +4 -4
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
- package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
- package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js → withCurrentFont-DFPXeVfG.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2235 -1311
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ClwqRMgv.js → check-yYsp5Xpk.js} +1 -1
- package/dist/{chevron-down-te6qn-zE.js → chevron-down-DTmD06_j.js} +1 -1
- package/dist/{chevron-right-W2hbH1FM.js → chevron-right-BSeYZOxc.js} +1 -1
- package/dist/{chevron-up-Bf5Zo7o4.js → chevron-up-BOApwrxi.js} +1 -1
- package/dist/{circle-alert-CIEGV5DN.js → circle-alert-BMszY8im.js} +1 -1
- package/dist/{clock-Y4cx0gkJ.js → clock-HADxnl6-.js} +1 -1
- package/dist/createCloudRuntime-DVQI_ReU.js +1379 -0
- package/dist/{createLucideIcon-CYHXK9hn.js → createLucideIcon-0lYYH3EW.js} +6 -6
- package/dist/de-DBOTcDj2.js +20 -0
- package/dist/{cdn/chunks/de-DMquBpZM.js → de-DNuYQTmS.js} +147 -8
- package/dist/{cdn/chunks/dist-CjL6JHML.js → dist-C7EtxNCb.js} +49 -51
- package/dist/{dist-DuufrR8O.js → dist-C_dV9QAx.js} +130 -130
- package/dist/{cdn/chunks/dist-MNQYSEWU.js → dist-DI4_YSnG.js} +111 -110
- package/dist/{dist-tsmnQugO.js → dist-DtOF3bDW.js} +648 -294
- package/dist/{editor-modal-AlVLkU91.js → editor-modal-Bzhl-PgI.js} +832 -834
- package/dist/en-CDhWRrF_.js +20 -0
- package/dist/{cdn/chunks/en-C8Mp71sO.js → en-CW71OK66.js} +147 -8
- package/dist/en-DwV15ltA.js +1 -0
- package/dist/{cdn/chunks/es-Byq4tthI.js → es-DdK7zQfi.js} +147 -8
- package/dist/{extensions-pjO8VGkM.js → extensions-CdyweA50.js} +54 -54
- package/dist/{eye-Ddnz8nnm.js → eye-DWkSvYpj.js} +1 -1
- package/dist/{cdn/chunks/fr-B3j35HEw.js → fr-Dz5Bgb7-.js} +147 -8
- package/dist/image-DesWjcZ4.js +28 -0
- package/dist/index.d.ts +640 -48
- package/dist/{info-DXLmzoeY.js → info-ClWJGoZy.js} +1 -1
- package/dist/{cdn/chunks/ja-D7txAuGS.js → ja-Di-zJiT8.js} +147 -8
- package/dist/keys-Zd9KWRD1.js +10 -0
- package/dist/{link-Cel46wgo.js → link-BqRicFTA.js} +1 -1
- package/dist/{list-Cl0GwiV9.js → list-bojQr9bn.js} +1 -1
- package/dist/{loader-circle-uAwpvfys.js → loader-circle-B2B8LbUu.js} +1 -1
- package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
- package/dist/{message-circle-DWU1pTM_.js → message-circle-BEuiNsyZ.js} +1 -1
- package/dist/{cdn/chunks/nl-ClJ3BY3F.js → nl-CvVuHYFL.js} +147 -8
- package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
- package/dist/{package-CbyG_yU_.js → package-DCROB4aM.js} +1 -1
- package/dist/{pencil-BzoDcwKu.js → pencil-CEotCKbf.js} +1 -1
- package/dist/{preRenderCustomBlocks-DMP5RuHl.js → preRenderCustomBlocks-D8rr61_z.js} +3 -3
- package/dist/pt-BR-CHM-ZKvE.js +20 -0
- package/dist/{cdn/chunks/pt-BR-DibcXcmv.js → pt-BR-ZhO4vgyq.js} +147 -8
- package/dist/{refresh-cw-9WinWixo.js → refresh-cw-C6M2mHNC.js} +12 -2
- package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
- package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
- package/dist/{search-CqgGq1gG.js → search-Cy99zPYf.js} +1 -1
- package/dist/{send-Ceo3c9Db.js → send-BDLJFsf3.js} +1 -1
- package/dist/{smartphone-CcLaCpGK.js → smartphone-CVvQaNA4.js} +1 -1
- package/dist/socialIcons-Dd-jRiVe.js +2086 -0
- package/dist/{sparkles-Do9XjAuT.js → sparkles-Ce0Qz0ox.js} +1 -1
- package/dist/square-BWlolnXe.js +15 -0
- package/dist/style.css +1 -1
- package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
- package/dist/templatical-editor.js +2272 -1327
- package/dist/{text-align-start-DvzC0HQA.js → text-align-start-D1V5gPTy.js} +1 -1
- package/dist/{trash-vlINTx32.js → trash-CZfiUFmw.js} +1 -1
- package/dist/{triangle-alert-MRYSJ9T2.js → triangle-alert-CFDzyFC7.js} +1 -1
- package/dist/upload-BJfvdIrD.js +36 -0
- package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-Dcjua65H.js} +5 -5
- package/dist/{useEditorCore-PvErWWsp.js → useEditorCore-BTLeAVlM.js} +1534 -1549
- package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-DUy67lJu.js} +2 -2
- package/dist/{useI18n-CxVEpurs.js → useI18n-BdoY7xDE.js} +4 -4
- package/dist/{useLogicTag-BHn67tDd.js → useLogicTag-DKLZ1T9H.js} +3 -3
- package/dist/{useMergeTag-CRkm5Ig6.js → useMergeTag-Bhdx7AKk.js} +5 -5
- package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-BZea45XK.js} +2 -2
- package/dist/useScrollToBlock-FmNMALM_.js +74 -0
- package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1182 -1087
- package/dist/{withCurrentFont-CxRGeHO3.js → withCurrentFont-BATJHNve.js} +1 -1
- package/dist/{x-Cd6SFw8r.js → x-CZ0Js0hA.js} +1 -1
- package/package.json +17 -15
- package/dist/AiChatSidebar-DxPHFNoT.js +0 -230
- package/dist/AiFeatureMenu-C8GVqu1d.js +0 -57
- package/dist/CloudHeaderExtras-CUSftQdm.js +0 -59
- package/dist/CloudPanels-Dgw7tb4R.js +0 -216
- package/dist/CollaboratorBar-5rfopCPx.js +0 -103
- package/dist/CommentsSidebar-BOqj16Al.js +0 -500
- package/dist/DesignReferenceSidebar-BWAi3eQQ.js +0 -279
- package/dist/IssuesPanel-C-x3I012.js +0 -117
- package/dist/ParagraphEditor-BVjOwwHx.js +0 -797
- package/dist/SavedBlocksBrowserModal-DbmIS5uK.js +0 -360
- package/dist/TemplateScoringPanel-ynbGl-sr.js +0 -273
- package/dist/TemplateSettings-Bi01S3H3.js +0 -246
- package/dist/ToggleSwitch-Ozc7YU38.js +0 -102
- package/dist/Toolbar-B-2lO0I8.js +0 -3156
- package/dist/WrapperBlock-D0qgNqjD.js +0 -45
- package/dist/cdn/chunks/AiChatSidebar-Dk0rJBQN.js +0 -205
- package/dist/cdn/chunks/AiChatSidebar-Dk0rJBQN.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-B7b0w8ZS.js +0 -57
- package/dist/cdn/chunks/AiFeatureMenu-B7b0w8ZS.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js +0 -60
- package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-awqHfJqC.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js +0 -52
- package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-CbzxwsyI.js +0 -20
- package/dist/cdn/chunks/CommentsSidebar-DWPHZuQm.js +0 -470
- package/dist/cdn/chunks/DesignReferenceSidebar-BW9cHnA9.js +0 -229
- package/dist/cdn/chunks/DesignReferenceSidebar-BW9cHnA9.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-cXf9ywA4.js +0 -100
- package/dist/cdn/chunks/IssuesPanel-cXf9ywA4.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-BMB9vShs.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-zXfcArr4.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-Cp4XB_dH.js +0 -45
- package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js +0 -632
- package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-BhEOMzEQ.js +0 -38
- package/dist/cdn/chunks/TemplateScoringPanel-BrWqJCSP.js +0 -237
- package/dist/cdn/chunks/TemplateScoringPanel-BrWqJCSP.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-BkkWTDHD.js +0 -208
- package/dist/cdn/chunks/TestEmailPanel-DxrKuctP.js +0 -35
- package/dist/cdn/chunks/TitleEditor-CsZiG3TT.js +0 -199
- package/dist/cdn/chunks/ToggleSwitch-BB-bQADJ.js +0 -104
- package/dist/cdn/chunks/ToggleSwitch-BB-bQADJ.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-DXSqmaLS.js +0 -48
- package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +0 -47
- package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +0 -22
- package/dist/cdn/chunks/ca-CbNzJM3I.js.map +0 -1
- package/dist/cdn/chunks/cloud-BHClP3e2.js +0 -1736
- package/dist/cdn/chunks/cloud-BHClP3e2.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js +0 -400
- package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +0 -1
- package/dist/cdn/chunks/de-DMquBpZM.js.map +0 -1
- package/dist/cdn/chunks/de-mMY5yQJu.js +0 -93
- package/dist/cdn/chunks/de-mMY5yQJu.js.map +0 -1
- package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
- package/dist/cdn/chunks/en-C8Mp71sO.js.map +0 -1
- package/dist/cdn/chunks/en-ChVeGQBY.js +0 -93
- package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
- package/dist/cdn/chunks/en-eWpiXyZu.js +0 -1
- package/dist/cdn/chunks/es-Byq4tthI.js.map +0 -1
- package/dist/cdn/chunks/fr-B3j35HEw.js.map +0 -1
- package/dist/cdn/chunks/icons-aTYwH5-g.js.map +0 -1
- package/dist/cdn/chunks/ja-D7txAuGS.js.map +0 -1
- package/dist/cdn/chunks/keys-HI-INbkz.js +0 -12
- package/dist/cdn/chunks/keys-HI-INbkz.js.map +0 -1
- package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
- package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CoCwRUi0.js +0 -93
- package/dist/cdn/chunks/pt-BR-CoCwRUi0.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +0 -1
- package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +0 -1279
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +0 -1
- package/dist/cdn/chunks/src-DYCDeBDM.js.map +0 -1
- package/dist/cdn/chunks/src-DlFlC9Tt.js +0 -1272
- package/dist/cdn/chunks/src-DlFlC9Tt.js.map +0 -1
- package/dist/cdn/chunks/src-dZ4D_tuP.js.map +0 -1
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js +0 -6
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
- package/dist/cdn/chunks/useAliveFlag-DCB96vzR.js +0 -12
- package/dist/cdn/chunks/useAliveFlag-DCB96vzR.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js +0 -2602
- package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
- package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js +0 -21
- package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js.map +0 -1
- package/dist/cloud-B5xwm_4X.js +0 -1689
- package/dist/copy-BEcsAlfB.js +0 -19
- package/dist/createCloudRuntime-zNPkF6T9.js +0 -398
- package/dist/de-mMY5yQJu.js +0 -91
- package/dist/dist-DAAJogrx.js +0 -407
- package/dist/en-B0FUfNwz.js +0 -1
- package/dist/en-ChVeGQBY.js +0 -91
- package/dist/image-up-CM_HC0Dx.js +0 -27
- package/dist/keys-BKFq19a2.js +0 -10
- package/dist/plus-8cDvoCjZ.js +0 -14
- package/dist/pt-BR-CoCwRUi0.js +0 -91
- package/dist/shield-check-uDAwur5D.js +0 -14
- package/dist/socialIcons-PTiwhLoC.js +0 -1359
- package/dist/timeouts-Cv2jvusx.js +0 -4
- package/dist/upload-CtNOI6J2.js +0 -21
- package/dist/useAliveFlag-Dd06mRxe.js +0 -10
- package/dist/useScrollToBlock-CXmcHQQN.js +0 -47
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as N } from "./dist-
|
|
3
|
-
import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-
|
|
4
|
-
import { B,
|
|
1
|
+
import { $ as e, C as t, D as n, F as r, I as i, J as a, P as o, R as s, S as c, U as l, V as u, W as d, X as f, _ as p, b as m, c as h, dt as g, f as _, g as v, h as y, it as b, j as x, l as S, lt as C, m as w, n as T, o as E, ot as D, p as O, rt as k, u as A, ut as j, x as M } from "./draggable-DZ0gwUJ6.js";
|
|
2
|
+
import { h as N } from "./dist-Bo8Thh8v.js";
|
|
3
|
+
import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-S-rLGqax.js";
|
|
4
|
+
import { Ct as B, G as V, H as ee, It as te, J as ne, M as re, Ot as ie, R as H, St as U, at as ae, f as W, lt as oe, ot as G, s as K, t as se, w as ce, yt as le, zt as ue } from "./icons-DNX6StSs.js";
|
|
5
5
|
import { t as q } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
6
6
|
//#region ../media-library/src/keys.ts
|
|
7
7
|
var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTarget"), fe = Symbol("templaticalMediaTranslations"), Y = Symbol("templaticalMediaUiTheme"), X = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
|
|
@@ -100,7 +100,7 @@ var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTa
|
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region ../media-library/src/composables/useI18n.ts
|
|
102
102
|
function Z(e) {
|
|
103
|
-
let t = e ?? n(fe, null), r = (
|
|
103
|
+
let t = e ?? n(fe, null), r = (a(t) ? t.value : t) ?? pe;
|
|
104
104
|
function i(e, t) {
|
|
105
105
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
106
106
|
}
|
|
@@ -120,15 +120,15 @@ var me = [
|
|
|
120
120
|
function Q(e) {
|
|
121
121
|
let t = e ?? n(de, null);
|
|
122
122
|
if (!t) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
|
|
123
|
-
let r = t, i =
|
|
123
|
+
let r = t, i = O(() => !0), a = O(() => r.maxFileSize ?? Infinity), o = O(() => {
|
|
124
124
|
let e = r.accept;
|
|
125
125
|
if (e && e.length > 0) return e;
|
|
126
126
|
let t = r.mimeTypes;
|
|
127
127
|
return t ? Object.keys(t) : me;
|
|
128
|
-
}), s =
|
|
128
|
+
}), s = O(() => {
|
|
129
129
|
let e = r.mimeTypes;
|
|
130
130
|
return e ? o.value.flatMap((t) => e[t] ?? []) : [];
|
|
131
|
-
}), c =
|
|
131
|
+
}), c = O(() => s.value.join(",")), l = O(() => r.mimeTypes !== void 0);
|
|
132
132
|
function u(e, t) {
|
|
133
133
|
let n = r.mimeTypes;
|
|
134
134
|
return !n || (t && t.length > 0 ? t : Object.keys(n)).some((t) => n[t]?.includes(e) ?? !1);
|
|
@@ -162,40 +162,40 @@ function Q(e) {
|
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region ../media-library/src/composables/useFocusTrap.ts
|
|
164
164
|
var he = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
165
|
-
function ge(e,
|
|
166
|
-
let
|
|
167
|
-
function
|
|
165
|
+
function ge(e, t) {
|
|
166
|
+
let n = null, r = null, i = null;
|
|
167
|
+
function a(e) {
|
|
168
168
|
if (!e) return document;
|
|
169
169
|
let t = e.getRootNode();
|
|
170
170
|
return t && "activeElement" in t ? t : document;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function o() {
|
|
173
173
|
return e.value ? Array.from(e.value.querySelectorAll(he)).filter((e) => e.offsetParent !== null) : [];
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function s(t) {
|
|
176
176
|
if (t.key !== "Tab") return;
|
|
177
|
-
let n =
|
|
177
|
+
let n = o();
|
|
178
178
|
if (n.length === 0) return;
|
|
179
|
-
let r = n[0], i = n[n.length - 1],
|
|
180
|
-
t.shiftKey ?
|
|
181
|
-
}
|
|
182
|
-
function
|
|
183
|
-
let t =
|
|
184
|
-
t &&
|
|
185
|
-
|
|
186
|
-
let t =
|
|
179
|
+
let r = n[0], i = n[n.length - 1], s = a(e.value).activeElement;
|
|
180
|
+
t.shiftKey ? s === r && (t.preventDefault(), i.focus()) : s === i && (t.preventDefault(), r.focus());
|
|
181
|
+
}
|
|
182
|
+
function c() {
|
|
183
|
+
let t = r !== null || i !== null;
|
|
184
|
+
t && l({ restoreFocus: !1 }), t || (n = a(e.value).activeElement), i = requestAnimationFrame(() => {
|
|
185
|
+
i = null;
|
|
186
|
+
let t = o();
|
|
187
187
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
188
|
-
}),
|
|
188
|
+
}), r = P(e, "keydown", s);
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function l(e = {}) {
|
|
191
191
|
let t = e.restoreFocus !== !1;
|
|
192
|
-
|
|
192
|
+
i !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(i), i = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
|
|
193
193
|
}
|
|
194
|
-
let
|
|
195
|
-
e && t ?
|
|
194
|
+
let d = u([t, e], ([e, t]) => {
|
|
195
|
+
e && t ? c() : l();
|
|
196
196
|
}, { flush: "post" });
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
f(() => {
|
|
198
|
+
d(), l();
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
@@ -207,7 +207,7 @@ var _e = {
|
|
|
207
207
|
}, ve = ["onClick"], ye = {
|
|
208
208
|
key: 1,
|
|
209
209
|
style: { color: "var(--tpl-text)" }
|
|
210
|
-
}, be = /* @__PURE__ */
|
|
210
|
+
}, be = /* @__PURE__ */ t({
|
|
211
211
|
__name: "MediaBreadcrumb",
|
|
212
212
|
props: {
|
|
213
213
|
folders: {},
|
|
@@ -215,7 +215,7 @@ var _e = {
|
|
|
215
215
|
},
|
|
216
216
|
emits: ["navigate"],
|
|
217
217
|
setup(e, { emit: t }) {
|
|
218
|
-
let n = e,
|
|
218
|
+
let n = e, r = t, { t: a } = Z(), s = O(() => {
|
|
219
219
|
if (!n.currentFolderId) return [];
|
|
220
220
|
let e = [];
|
|
221
221
|
return c(n.folders, n.currentFolderId, e), e;
|
|
@@ -227,19 +227,19 @@ var _e = {
|
|
|
227
227
|
}
|
|
228
228
|
return !1;
|
|
229
229
|
}
|
|
230
|
-
return (e, t) => s.value.length > 0 ? (o(),
|
|
230
|
+
return (e, t) => s.value.length > 0 ? (o(), p("div", _e, [w("button", {
|
|
231
231
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
232
232
|
style: { color: "var(--tpl-primary)" },
|
|
233
|
-
onClick: t[0] ||= (e) =>
|
|
234
|
-
},
|
|
233
|
+
onClick: t[0] ||= (e) => r("navigate", null)
|
|
234
|
+
}, g(D(a).mediaLibrary.allFiles), 1), (o(!0), p(A, null, i(s.value, (e, t) => (o(), p(A, { key: e.id }, [M(D(te), {
|
|
235
235
|
size: 12,
|
|
236
236
|
"stroke-width": 2
|
|
237
|
-
}), t < s.value.length - 1 ? (o(),
|
|
237
|
+
}), t < s.value.length - 1 ? (o(), p("button", {
|
|
238
238
|
key: 0,
|
|
239
239
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
240
240
|
style: { color: "var(--tpl-primary)" },
|
|
241
|
-
onClick: (t) =>
|
|
242
|
-
},
|
|
241
|
+
onClick: (t) => r("navigate", e.id)
|
|
242
|
+
}, g(e.name), 9, ve)) : (o(), p("span", ye, g(e.name), 1))], 64))), 128))])) : v("", !0);
|
|
243
243
|
}
|
|
244
244
|
}), xe = ["aria-expanded", "aria-label"], Se = {
|
|
245
245
|
key: 1,
|
|
@@ -247,7 +247,7 @@ var _e = {
|
|
|
247
247
|
}, Ce = {
|
|
248
248
|
key: 0,
|
|
249
249
|
class: "tpl:truncate"
|
|
250
|
-
}, we = ["onKeydown"], Te = ["title", "aria-label"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = { key: 0 }, ke = ["placeholder", "onKeydown"], Ae = /* @__PURE__ */
|
|
250
|
+
}, we = ["onKeydown"], Te = ["title", "aria-label"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = { key: 0 }, ke = ["placeholder", "onKeydown"], Ae = /* @__PURE__ */ t({
|
|
251
251
|
__name: "MediaFolderTreeNode",
|
|
252
252
|
props: {
|
|
253
253
|
folder: {},
|
|
@@ -263,8 +263,8 @@ var _e = {
|
|
|
263
263
|
"renameFolder",
|
|
264
264
|
"deleteFolder"
|
|
265
265
|
],
|
|
266
|
-
setup(
|
|
267
|
-
let
|
|
266
|
+
setup(t, { emit: n }) {
|
|
267
|
+
let r = t, a = n, { t: c } = Z(), l = e(!1), u = e(!1), f = e(""), m = e(!1), _ = e(""), b = e(!1), x = O(() => r.folder.children.length > 0), T = O(() => r.depth < 4), k = O(() => r.currentFolderId === r.folder.id), N = O(() => r.currentFolderId ? F(r.folder.children, r.currentFolderId) : !1), P = O(() => l.value || N.value);
|
|
268
268
|
function F(e, t) {
|
|
269
269
|
for (let n of e) if (n.id === t || F(n.children, t)) return !0;
|
|
270
270
|
return !1;
|
|
@@ -273,66 +273,66 @@ var _e = {
|
|
|
273
273
|
l.value = !l.value;
|
|
274
274
|
}
|
|
275
275
|
function L() {
|
|
276
|
-
|
|
276
|
+
u.value = !0, f.value = r.folder.name;
|
|
277
277
|
}
|
|
278
278
|
function R() {
|
|
279
|
-
let e =
|
|
280
|
-
e && e !==
|
|
279
|
+
let e = f.value.trim();
|
|
280
|
+
e && e !== r.folder.name && a("renameFolder", r.folder.id, e), u.value = !1, f.value = "";
|
|
281
281
|
}
|
|
282
282
|
function z() {
|
|
283
|
-
|
|
283
|
+
u.value = !1, f.value = "";
|
|
284
284
|
}
|
|
285
285
|
function B() {
|
|
286
|
-
|
|
286
|
+
m.value = !0, _.value = "", l.value = !0;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
289
|
-
|
|
288
|
+
function ne() {
|
|
289
|
+
_.value.trim() && a("createFolder", _.value.trim(), r.folder.id), m.value = !1, _.value = "";
|
|
290
290
|
}
|
|
291
|
-
function
|
|
292
|
-
|
|
291
|
+
function re() {
|
|
292
|
+
m.value = !1, _.value = "";
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
|
|
294
|
+
function ie() {
|
|
295
|
+
b.value ? (a("deleteFolder", r.folder.id), b.value = !1) : b.value = !0;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function H(e) {
|
|
298
298
|
let t = e.relatedTarget;
|
|
299
|
-
t && e.currentTarget.contains(t) || (
|
|
299
|
+
t && e.currentTarget.contains(t) || (b.value = !1);
|
|
300
300
|
}
|
|
301
|
-
return (
|
|
302
|
-
let
|
|
303
|
-
return o(),
|
|
301
|
+
return (e, n) => {
|
|
302
|
+
let r = s("MediaFolderTreeNode", !0);
|
|
303
|
+
return o(), p("div", null, [w("div", {
|
|
304
304
|
class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
305
|
-
style:
|
|
306
|
-
paddingLeft: `${
|
|
307
|
-
backgroundColor:
|
|
308
|
-
color:
|
|
305
|
+
style: j({
|
|
306
|
+
paddingLeft: `${t.depth * 16 + 8}px`,
|
|
307
|
+
backgroundColor: k.value ? "var(--tpl-bg-active)" : "transparent",
|
|
308
|
+
color: k.value ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
309
309
|
}),
|
|
310
|
-
onFocusout:
|
|
310
|
+
onFocusout: H
|
|
311
311
|
}, [
|
|
312
|
-
|
|
312
|
+
x.value || m.value ? (o(), p("button", {
|
|
313
313
|
key: 0,
|
|
314
314
|
type: "button",
|
|
315
315
|
class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
316
316
|
"aria-expanded": P.value,
|
|
317
|
-
"aria-label": P.value ?
|
|
318
|
-
onClick:
|
|
319
|
-
}, [
|
|
320
|
-
class:
|
|
317
|
+
"aria-label": P.value ? D(c).mediaLibrary.collapseFolder : D(c).mediaLibrary.expandFolder,
|
|
318
|
+
onClick: S(I, ["stop"])
|
|
319
|
+
}, [M(D(te), {
|
|
320
|
+
class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
|
|
321
321
|
size: 10,
|
|
322
322
|
"stroke-width": 2
|
|
323
|
-
}, null, 8, ["class"])], 8, xe)) : (o(),
|
|
324
|
-
|
|
323
|
+
}, null, 8, ["class"])], 8, xe)) : (o(), p("span", Se)),
|
|
324
|
+
w("button", {
|
|
325
325
|
type: "button",
|
|
326
326
|
class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
|
|
327
|
-
onClick: n[0] ||= (
|
|
328
|
-
}, [
|
|
327
|
+
onClick: n[0] ||= (e) => a("navigate", t.folder.id)
|
|
328
|
+
}, [M(D(U), {
|
|
329
329
|
class: "tpl:shrink-0",
|
|
330
330
|
size: 14,
|
|
331
331
|
"stroke-width": 1.5
|
|
332
|
-
}),
|
|
333
|
-
|
|
332
|
+
}), u.value ? v("", !0) : (o(), p("span", Ce, g(t.folder.name), 1))]),
|
|
333
|
+
u.value ? d((o(), p("input", {
|
|
334
334
|
key: 2,
|
|
335
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
335
|
+
"onUpdate:modelValue": n[1] ||= (e) => f.value = e,
|
|
336
336
|
type: "text",
|
|
337
337
|
class: "tpl:min-w-0 tpl:flex-1 tpl:rounded tpl:border tpl:px-1.5 tpl:py-0.5 tpl:text-xs tpl:outline-none",
|
|
338
338
|
style: {
|
|
@@ -341,62 +341,62 @@ var _e = {
|
|
|
341
341
|
color: "var(--tpl-text)"
|
|
342
342
|
},
|
|
343
343
|
autofocus: "",
|
|
344
|
-
onKeydown: [
|
|
344
|
+
onKeydown: [h(R, ["enter"]), h(S(z, ["stop"]), ["escape"])],
|
|
345
345
|
onBlur: R,
|
|
346
|
-
onClick: n[2] ||=
|
|
347
|
-
}, null, 40, we)), [[
|
|
348
|
-
|
|
346
|
+
onClick: n[2] ||= S(() => {}, ["stop"])
|
|
347
|
+
}, null, 40, we)), [[E, f.value]]) : v("", !0),
|
|
348
|
+
u.value ? v("", !0) : (o(), p("span", {
|
|
349
349
|
key: 3,
|
|
350
|
-
class:
|
|
350
|
+
class: C(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", k.value || b.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
|
|
351
351
|
}, [
|
|
352
|
-
|
|
352
|
+
T.value && t.canCreateFolder ? (o(), p("button", {
|
|
353
353
|
key: 0,
|
|
354
354
|
type: "button",
|
|
355
355
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
356
|
-
title:
|
|
357
|
-
"aria-label":
|
|
358
|
-
onClick:
|
|
359
|
-
}, [
|
|
356
|
+
title: D(c).mediaLibrary.addSubfolder,
|
|
357
|
+
"aria-label": D(c).mediaLibrary.addSubfolder,
|
|
358
|
+
onClick: S(B, ["stop"])
|
|
359
|
+
}, [M(D(ee), {
|
|
360
360
|
size: 12,
|
|
361
361
|
"stroke-width": 2
|
|
362
|
-
})], 8, Te)) :
|
|
363
|
-
|
|
362
|
+
})], 8, Te)) : v("", !0),
|
|
363
|
+
t.canRenameFolder ? (o(), p("button", {
|
|
364
364
|
key: 1,
|
|
365
365
|
type: "button",
|
|
366
366
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
367
|
-
title:
|
|
368
|
-
"aria-label":
|
|
369
|
-
onClick:
|
|
370
|
-
}, [
|
|
367
|
+
title: D(c).mediaLibrary.renameFolder,
|
|
368
|
+
"aria-label": D(c).mediaLibrary.renameFolder,
|
|
369
|
+
onClick: S(L, ["stop"])
|
|
370
|
+
}, [M(D(V), {
|
|
371
371
|
size: 12,
|
|
372
372
|
"stroke-width": 2
|
|
373
|
-
})], 8, Ee)) :
|
|
374
|
-
|
|
373
|
+
})], 8, Ee)) : v("", !0),
|
|
374
|
+
t.canDeleteFolder ? (o(), p("button", {
|
|
375
375
|
key: 2,
|
|
376
376
|
type: "button",
|
|
377
377
|
"data-testid": "media-folder-delete",
|
|
378
378
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
379
|
-
title:
|
|
380
|
-
"aria-label":
|
|
381
|
-
onClick:
|
|
382
|
-
}, [
|
|
379
|
+
title: b.value ? D(c).mediaLibrary.deleteFolderConfirm : D(c).mediaLibrary.deleteFolder,
|
|
380
|
+
"aria-label": b.value ? D(c).mediaLibrary.deleteFolderConfirm : D(c).mediaLibrary.deleteFolder,
|
|
381
|
+
onClick: S(ie, ["stop"])
|
|
382
|
+
}, [M(D(W), {
|
|
383
383
|
size: 12,
|
|
384
384
|
"stroke-width": 2,
|
|
385
385
|
style: { color: "var(--tpl-danger)" }
|
|
386
|
-
})], 8, De)) :
|
|
386
|
+
})], 8, De)) : v("", !0)
|
|
387
387
|
], 2))
|
|
388
|
-
], 36), P.value ? (o(),
|
|
389
|
-
key:
|
|
390
|
-
folder:
|
|
391
|
-
"current-folder-id":
|
|
392
|
-
depth:
|
|
393
|
-
"can-create-folder":
|
|
394
|
-
"can-rename-folder":
|
|
395
|
-
"can-delete-folder":
|
|
396
|
-
onNavigate: n[3] ||= (e) =>
|
|
397
|
-
onCreateFolder: n[4] ||= (e, t) =>
|
|
398
|
-
onRenameFolder: n[5] ||= (e, t) =>
|
|
399
|
-
onDeleteFolder: n[6] ||= (e) =>
|
|
388
|
+
], 36), P.value ? (o(), p("div", Oe, [(o(!0), p(A, null, i(t.folder.children, (e) => (o(), y(r, {
|
|
389
|
+
key: e.id,
|
|
390
|
+
folder: e,
|
|
391
|
+
"current-folder-id": t.currentFolderId,
|
|
392
|
+
depth: t.depth + 1,
|
|
393
|
+
"can-create-folder": t.canCreateFolder,
|
|
394
|
+
"can-rename-folder": t.canRenameFolder,
|
|
395
|
+
"can-delete-folder": t.canDeleteFolder,
|
|
396
|
+
onNavigate: n[3] ||= (e) => a("navigate", e),
|
|
397
|
+
onCreateFolder: n[4] ||= (e, t) => a("createFolder", e, t),
|
|
398
|
+
onRenameFolder: n[5] ||= (e, t) => a("renameFolder", e, t),
|
|
399
|
+
onDeleteFolder: n[6] ||= (e) => a("deleteFolder", e)
|
|
400
400
|
}, null, 8, [
|
|
401
401
|
"folder",
|
|
402
402
|
"current-folder-id",
|
|
@@ -404,12 +404,12 @@ var _e = {
|
|
|
404
404
|
"can-create-folder",
|
|
405
405
|
"can-rename-folder",
|
|
406
406
|
"can-delete-folder"
|
|
407
|
-
]))), 128)),
|
|
407
|
+
]))), 128)), m.value ? (o(), p("div", {
|
|
408
408
|
key: 0,
|
|
409
|
-
style:
|
|
409
|
+
style: j({ paddingLeft: `${(t.depth + 1) * 16 + 8}px` }),
|
|
410
410
|
class: "tpl:py-1.5 tpl:pr-2"
|
|
411
|
-
}, [
|
|
412
|
-
"onUpdate:modelValue": n[7] ||= (e) =>
|
|
411
|
+
}, [d(w("input", {
|
|
412
|
+
"onUpdate:modelValue": n[7] ||= (e) => _.value = e,
|
|
413
413
|
type: "text",
|
|
414
414
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
415
415
|
style: {
|
|
@@ -417,11 +417,11 @@ var _e = {
|
|
|
417
417
|
"background-color": "var(--tpl-bg)",
|
|
418
418
|
color: "var(--tpl-text)"
|
|
419
419
|
},
|
|
420
|
-
placeholder:
|
|
420
|
+
placeholder: D(c).mediaLibrary.subfolderName,
|
|
421
421
|
autofocus: "",
|
|
422
|
-
onKeydown: [
|
|
423
|
-
onBlur:
|
|
424
|
-
}, null, 40, ke), [[
|
|
422
|
+
onKeydown: [h(ne, ["enter"]), h(S(re, ["stop"]), ["escape"])],
|
|
423
|
+
onBlur: ne
|
|
424
|
+
}, null, 40, ke), [[E, _.value]])], 4)) : v("", !0)])) : v("", !0)]);
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
427
|
}), je = {
|
|
@@ -430,7 +430,7 @@ var _e = {
|
|
|
430
430
|
}, Me = {
|
|
431
431
|
key: 0,
|
|
432
432
|
class: "tpl:px-3 tpl:py-2"
|
|
433
|
-
}, Ne = ["placeholder", "onKeydown"], Pe = /* @__PURE__ */
|
|
433
|
+
}, Ne = ["placeholder", "onKeydown"], Pe = /* @__PURE__ */ t({
|
|
434
434
|
__name: "MediaFolderTree",
|
|
435
435
|
props: {
|
|
436
436
|
folders: {},
|
|
@@ -448,41 +448,41 @@ var _e = {
|
|
|
448
448
|
"deleteFolder",
|
|
449
449
|
"showFrequentlyUsed"
|
|
450
450
|
],
|
|
451
|
-
setup(
|
|
452
|
-
let
|
|
451
|
+
setup(t, { emit: n }) {
|
|
452
|
+
let r = n, { t: a } = Z(), s = e(!1), c = e("");
|
|
453
453
|
function l() {
|
|
454
|
-
|
|
454
|
+
s.value = !0, c.value = "";
|
|
455
455
|
}
|
|
456
|
-
function
|
|
457
|
-
|
|
456
|
+
function u() {
|
|
457
|
+
c.value.trim() && r("createFolder", c.value.trim()), s.value = !1, c.value = "";
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
|
|
459
|
+
function f() {
|
|
460
|
+
s.value = !1, c.value = "";
|
|
461
461
|
}
|
|
462
|
-
return (
|
|
463
|
-
|
|
462
|
+
return (e, n) => (o(), p("div", je, [
|
|
463
|
+
w("button", {
|
|
464
464
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
465
|
-
style:
|
|
466
|
-
backgroundColor:
|
|
467
|
-
color:
|
|
465
|
+
style: j({
|
|
466
|
+
backgroundColor: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
|
|
467
|
+
color: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
468
468
|
}),
|
|
469
|
-
onClick:
|
|
470
|
-
}, [
|
|
469
|
+
onClick: n[0] ||= (e) => r("navigate", null)
|
|
470
|
+
}, [M(D(B), {
|
|
471
471
|
size: 14,
|
|
472
472
|
"stroke-width": 1.5
|
|
473
|
-
}),
|
|
474
|
-
(o(!0),
|
|
475
|
-
key:
|
|
476
|
-
folder:
|
|
477
|
-
"current-folder-id":
|
|
473
|
+
}), m(" " + g(D(a).mediaLibrary.allFiles), 1)], 4),
|
|
474
|
+
(o(!0), p(A, null, i(t.folders, (e) => (o(), y(Ae, {
|
|
475
|
+
key: e.id,
|
|
476
|
+
folder: e,
|
|
477
|
+
"current-folder-id": t.currentFolderId,
|
|
478
478
|
depth: 0,
|
|
479
|
-
"can-create-folder":
|
|
480
|
-
"can-rename-folder":
|
|
481
|
-
"can-delete-folder":
|
|
482
|
-
onNavigate:
|
|
483
|
-
onCreateFolder:
|
|
484
|
-
onRenameFolder:
|
|
485
|
-
onDeleteFolder:
|
|
479
|
+
"can-create-folder": t.canCreateFolder,
|
|
480
|
+
"can-rename-folder": t.canRenameFolder,
|
|
481
|
+
"can-delete-folder": t.canDeleteFolder,
|
|
482
|
+
onNavigate: n[1] ||= (e) => r("navigate", e),
|
|
483
|
+
onCreateFolder: n[2] ||= (e, t) => r("createFolder", e, t),
|
|
484
|
+
onRenameFolder: n[3] ||= (e, t) => r("renameFolder", e, t),
|
|
485
|
+
onDeleteFolder: n[4] ||= (e) => r("deleteFolder", e)
|
|
486
486
|
}, null, 8, [
|
|
487
487
|
"folder",
|
|
488
488
|
"current-folder-id",
|
|
@@ -490,8 +490,8 @@ var _e = {
|
|
|
490
490
|
"can-rename-folder",
|
|
491
491
|
"can-delete-folder"
|
|
492
492
|
]))), 128)),
|
|
493
|
-
|
|
494
|
-
"onUpdate:modelValue":
|
|
493
|
+
s.value ? (o(), p("div", Me, [d(w("input", {
|
|
494
|
+
"onUpdate:modelValue": n[5] ||= (e) => c.value = e,
|
|
495
495
|
type: "text",
|
|
496
496
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
497
497
|
style: {
|
|
@@ -499,38 +499,38 @@ var _e = {
|
|
|
499
499
|
"background-color": "var(--tpl-bg)",
|
|
500
500
|
color: "var(--tpl-text)"
|
|
501
501
|
},
|
|
502
|
-
placeholder:
|
|
502
|
+
placeholder: D(a).mediaLibrary.folderName,
|
|
503
503
|
autofocus: "",
|
|
504
|
-
onKeydown: [
|
|
505
|
-
onBlur:
|
|
506
|
-
}, null, 40, Ne), [[
|
|
507
|
-
!
|
|
504
|
+
onKeydown: [h(u, ["enter"]), h(S(f, ["stop"]), ["escape"])],
|
|
505
|
+
onBlur: u
|
|
506
|
+
}, null, 40, Ne), [[E, c.value]])])) : v("", !0),
|
|
507
|
+
!s.value && t.canCreateFolder ? (o(), p("button", {
|
|
508
508
|
key: 1,
|
|
509
509
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
510
510
|
style: { color: "var(--tpl-text-muted)" },
|
|
511
511
|
onClick: l
|
|
512
|
-
}, [
|
|
512
|
+
}, [M(D(ee), {
|
|
513
513
|
size: 14,
|
|
514
514
|
"stroke-width": 1.5
|
|
515
|
-
}),
|
|
516
|
-
|
|
517
|
-
|
|
515
|
+
}), m(" " + g(D(a).mediaLibrary.newFolder), 1)])) : v("", !0),
|
|
516
|
+
n[7] ||= w("div", { class: "tpl:flex-1" }, null, -1),
|
|
517
|
+
t.hasFrequentlyUsed ? (o(), p("button", {
|
|
518
518
|
key: 2,
|
|
519
519
|
"data-testid": "media-frequently-used",
|
|
520
520
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:border-t tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
521
|
-
style:
|
|
521
|
+
style: j({
|
|
522
522
|
borderColor: "var(--tpl-border)",
|
|
523
|
-
backgroundColor:
|
|
524
|
-
color:
|
|
523
|
+
backgroundColor: t.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
|
|
524
|
+
color: t.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
525
525
|
}),
|
|
526
|
-
onClick:
|
|
527
|
-
}, [
|
|
526
|
+
onClick: n[6] ||= (e) => r("showFrequentlyUsed")
|
|
527
|
+
}, [M(D(ce), {
|
|
528
528
|
size: 14,
|
|
529
529
|
"stroke-width": 1.5
|
|
530
|
-
}),
|
|
530
|
+
}), m(" " + g(D(a).mediaLibrary.frequentlyUsed), 1)], 4)) : v("", !0)
|
|
531
531
|
]));
|
|
532
532
|
}
|
|
533
|
-
}), Fe = /* @__PURE__ */
|
|
533
|
+
}), Fe = /* @__PURE__ */ t({
|
|
534
534
|
__name: "MediaFileIcon",
|
|
535
535
|
props: { mimeType: {} },
|
|
536
536
|
setup(e) {
|
|
@@ -630,11 +630,11 @@ var _e = {
|
|
|
630
630
|
color: "var(--tpl-text-muted)",
|
|
631
631
|
bgColor: "var(--tpl-bg-hover)",
|
|
632
632
|
icon: "document"
|
|
633
|
-
}, i =
|
|
634
|
-
return (e, t) => (o(),
|
|
633
|
+
}, i = O(() => n[t.mimeType] ?? r);
|
|
634
|
+
return (e, t) => (o(), p("div", {
|
|
635
635
|
class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2",
|
|
636
|
-
style:
|
|
637
|
-
}, [i.value.icon === "document" ? (o(),
|
|
636
|
+
style: j({ backgroundColor: i.value.bgColor })
|
|
637
|
+
}, [i.value.icon === "document" ? (o(), p("svg", {
|
|
638
638
|
key: 0,
|
|
639
639
|
width: "60",
|
|
640
640
|
height: "60",
|
|
@@ -642,23 +642,23 @@ var _e = {
|
|
|
642
642
|
fill: "none",
|
|
643
643
|
stroke: "currentColor",
|
|
644
644
|
"stroke-width": "1.5",
|
|
645
|
-
style:
|
|
645
|
+
style: j({ color: i.value.color })
|
|
646
646
|
}, [...t[0] ||= [
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
647
|
+
w("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
|
|
648
|
+
w("polyline", { points: "14 2 14 8 20 8" }, null, -1),
|
|
649
|
+
w("line", {
|
|
650
650
|
x1: "8",
|
|
651
651
|
y1: "13",
|
|
652
652
|
x2: "16",
|
|
653
653
|
y2: "13"
|
|
654
654
|
}, null, -1),
|
|
655
|
-
|
|
655
|
+
w("line", {
|
|
656
656
|
x1: "8",
|
|
657
657
|
y1: "17",
|
|
658
658
|
x2: "12",
|
|
659
659
|
y2: "17"
|
|
660
660
|
}, null, -1)
|
|
661
|
-
]], 4)) : i.value.icon === "video" ? (o(),
|
|
661
|
+
]], 4)) : i.value.icon === "video" ? (o(), p("svg", {
|
|
662
662
|
key: 1,
|
|
663
663
|
width: "40",
|
|
664
664
|
height: "40",
|
|
@@ -666,18 +666,18 @@ var _e = {
|
|
|
666
666
|
fill: "none",
|
|
667
667
|
stroke: "currentColor",
|
|
668
668
|
"stroke-width": "1.5",
|
|
669
|
-
style:
|
|
670
|
-
}, [...t[1] ||= [
|
|
669
|
+
style: j({ color: i.value.color })
|
|
670
|
+
}, [...t[1] ||= [w("rect", {
|
|
671
671
|
x: "2",
|
|
672
672
|
y: "4",
|
|
673
673
|
width: "20",
|
|
674
674
|
height: "16",
|
|
675
675
|
rx: "2"
|
|
676
|
-
}, null, -1),
|
|
676
|
+
}, null, -1), w("polygon", {
|
|
677
677
|
points: "10,8 16,12 10,16",
|
|
678
678
|
fill: "currentColor",
|
|
679
679
|
stroke: "none"
|
|
680
|
-
}, null, -1)]], 4)) : (o(),
|
|
680
|
+
}, null, -1)]], 4)) : (o(), p("svg", {
|
|
681
681
|
key: 2,
|
|
682
682
|
width: "40",
|
|
683
683
|
height: "40",
|
|
@@ -685,23 +685,23 @@ var _e = {
|
|
|
685
685
|
fill: "none",
|
|
686
686
|
stroke: "currentColor",
|
|
687
687
|
"stroke-width": "1.5",
|
|
688
|
-
style:
|
|
688
|
+
style: j({ color: i.value.color })
|
|
689
689
|
}, [...t[2] ||= [
|
|
690
|
-
|
|
691
|
-
|
|
690
|
+
w("path", { d: "M9 18V5l12-2v13" }, null, -1),
|
|
691
|
+
w("circle", {
|
|
692
692
|
cx: "6",
|
|
693
693
|
cy: "18",
|
|
694
694
|
r: "3"
|
|
695
695
|
}, null, -1),
|
|
696
|
-
|
|
696
|
+
w("circle", {
|
|
697
697
|
cx: "18",
|
|
698
698
|
cy: "16",
|
|
699
699
|
r: "3"
|
|
700
700
|
}, null, -1)
|
|
701
|
-
]], 4)),
|
|
701
|
+
]], 4)), w("span", {
|
|
702
702
|
class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
|
|
703
|
-
style:
|
|
704
|
-
},
|
|
703
|
+
style: j({ color: i.value.color })
|
|
704
|
+
}, g(i.value.label), 5)], 4));
|
|
705
705
|
}
|
|
706
706
|
});
|
|
707
707
|
//#endregion
|
|
@@ -804,7 +804,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
804
804
|
}, dt = {
|
|
805
805
|
key: 4,
|
|
806
806
|
class: "tpl:flex tpl:justify-center tpl:py-4"
|
|
807
|
-
}, ft = /*#__PURE__*/ q(/* @__PURE__ */
|
|
807
|
+
}, ft = /*#__PURE__*/ q(/* @__PURE__ */ t({
|
|
808
808
|
__name: "MediaGrid",
|
|
809
809
|
props: {
|
|
810
810
|
items: {},
|
|
@@ -825,41 +825,41 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
825
825
|
"replace",
|
|
826
826
|
"confirm"
|
|
827
827
|
],
|
|
828
|
-
setup(
|
|
829
|
-
let
|
|
828
|
+
setup(t, { emit: r }) {
|
|
829
|
+
let a = t, s = r, { isAcceptedMimeType: c, isImageMimeType: l } = Q();
|
|
830
830
|
function u(e) {
|
|
831
831
|
return e.mimeType ?? "";
|
|
832
832
|
}
|
|
833
833
|
function d(e) {
|
|
834
834
|
return e.thumbnailUrl ?? e.url;
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
return !
|
|
836
|
+
function f(e) {
|
|
837
|
+
return !a.accept || a.accept.length === 0 || c(u(e), a.accept);
|
|
838
838
|
}
|
|
839
|
-
function
|
|
840
|
-
return
|
|
839
|
+
function h(e) {
|
|
840
|
+
return a.canUpdate === !0 && e.canUpdate !== !1;
|
|
841
841
|
}
|
|
842
842
|
function _(e) {
|
|
843
|
-
return
|
|
843
|
+
return a.canReplace === !0 && e.canUpdate !== !1;
|
|
844
844
|
}
|
|
845
|
-
function
|
|
846
|
-
t.metaKey || t.ctrlKey ?
|
|
845
|
+
function b(e, t) {
|
|
846
|
+
t.metaKey || t.ctrlKey ? s("toggle", e.id) : s("select", e);
|
|
847
847
|
}
|
|
848
|
-
function
|
|
849
|
-
|
|
848
|
+
function x(e) {
|
|
849
|
+
f(e) && s("confirm", e);
|
|
850
850
|
}
|
|
851
851
|
function T(e, t) {
|
|
852
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(),
|
|
852
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), s("select", e));
|
|
853
853
|
}
|
|
854
|
-
function
|
|
855
|
-
return
|
|
854
|
+
function E(e) {
|
|
855
|
+
return a.selectedIds.has(e.id);
|
|
856
856
|
}
|
|
857
857
|
function O(e) {
|
|
858
|
-
return
|
|
858
|
+
return E(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
|
|
859
859
|
}
|
|
860
|
-
let { t:
|
|
860
|
+
let { t: k } = Z(), N = n(X, null), P = e(null);
|
|
861
861
|
R(P, ([{ isIntersecting: e }]) => {
|
|
862
|
-
e &&
|
|
862
|
+
e && a.hasMore && !a.isLoading && s("loadMore");
|
|
863
863
|
}, { threshold: .1 });
|
|
864
864
|
function F(e) {
|
|
865
865
|
return Ie(e, N?.value, {
|
|
@@ -868,123 +868,123 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
868
868
|
day: "numeric"
|
|
869
869
|
});
|
|
870
870
|
}
|
|
871
|
-
return (
|
|
872
|
-
|
|
871
|
+
return (e, n) => (o(), p("div", Re, [
|
|
872
|
+
t.isLoading && t.items.length === 0 ? (o(), p("div", {
|
|
873
873
|
key: 0,
|
|
874
874
|
role: "status",
|
|
875
875
|
"aria-busy": "true",
|
|
876
|
-
"aria-label":
|
|
877
|
-
class:
|
|
878
|
-
}, [(o(),
|
|
879
|
-
key:
|
|
880
|
-
class:
|
|
876
|
+
"aria-label": D(k).mediaLibrary.loading,
|
|
877
|
+
class: C(t.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
|
|
878
|
+
}, [(o(), p(A, null, i(8, (e) => w("div", {
|
|
879
|
+
key: e,
|
|
880
|
+
class: C(["tpl-pulse tpl:rounded-lg", t.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
|
|
881
881
|
style: { "background-color": "var(--tpl-bg-hover)" },
|
|
882
882
|
"aria-hidden": "true"
|
|
883
|
-
}, null, 2)), 64))], 10, ze)) :
|
|
883
|
+
}, null, 2)), 64))], 10, ze)) : t.items.length === 0 ? (o(), p("div", Be, [M(D(B), {
|
|
884
884
|
class: "tpl:mb-3",
|
|
885
885
|
size: 40,
|
|
886
886
|
"stroke-width": 1,
|
|
887
887
|
style: { color: "var(--tpl-text-dim)" }
|
|
888
|
-
}),
|
|
888
|
+
}), w("p", Ve, g(t.searchQuery ? D(k).mediaLibrary.noSearchResults : D(k).mediaLibrary.noFiles), 1)])) : t.layout === "list" ? (o(), p("div", {
|
|
889
889
|
key: 3,
|
|
890
890
|
role: "listbox",
|
|
891
|
-
"aria-label":
|
|
891
|
+
"aria-label": D(k).mediaLibrary.filesListAriaLabel,
|
|
892
892
|
"aria-multiselectable": "true",
|
|
893
893
|
class: "tpl:flex tpl:flex-col tpl:gap-1"
|
|
894
|
-
}, [(o(!0),
|
|
894
|
+
}, [(o(!0), p(A, null, i(t.items, (e) => (o(), p("div", {
|
|
895
895
|
key: e.id,
|
|
896
896
|
role: "option",
|
|
897
897
|
tabindex: "0",
|
|
898
898
|
"data-testid": "media-library-item",
|
|
899
|
-
class:
|
|
899
|
+
class: C(["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", [!f(e) && !E(e) ? "tpl:opacity-60" : ""]]),
|
|
900
900
|
"data-media-id": e.id,
|
|
901
|
-
"aria-selected":
|
|
901
|
+
"aria-selected": E(e),
|
|
902
902
|
"aria-label": e.filename || e.url,
|
|
903
|
-
style:
|
|
904
|
-
onClick: (t) =>
|
|
905
|
-
onDblclick: (t) =>
|
|
903
|
+
style: j({ backgroundColor: E(e) ? "var(--tpl-bg-hover)" : "transparent" }),
|
|
904
|
+
onClick: (t) => b(e, t),
|
|
905
|
+
onDblclick: (t) => x(e),
|
|
906
906
|
onKeydown: (t) => T(e, t)
|
|
907
907
|
}, [
|
|
908
|
-
|
|
908
|
+
w("div", nt, [D(l)(u(e)) ? (o(), p("img", {
|
|
909
909
|
key: 0,
|
|
910
910
|
src: d(e),
|
|
911
911
|
alt: e.filename || e.url,
|
|
912
912
|
class: "tpl:size-full tpl:object-cover",
|
|
913
913
|
loading: "lazy"
|
|
914
|
-
}, null, 8, rt)) : (o(),
|
|
915
|
-
|
|
916
|
-
e.size == null ?
|
|
917
|
-
e.createdAt ? (o(),
|
|
918
|
-
|
|
914
|
+
}, null, 8, rt)) : (o(), p("div", it, [M(Fe, { "mime-type": u(e) }, null, 8, ["mime-type"])]))]),
|
|
915
|
+
w("div", at, [w("p", ot, g(e.filename || e.url), 1), w("p", st, [
|
|
916
|
+
e.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(g(D($)(e.size)), 1)], 64)),
|
|
917
|
+
e.createdAt ? (o(), p(A, { key: 1 }, [e.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(" · ")], 64)), m(" " + g(F(e.createdAt)), 1)], 64)) : v("", !0),
|
|
918
|
+
D(l)(u(e)) && e.width && e.height ? (o(), p(A, { key: 2 }, [m(" · " + g(e.width) + "×" + g(e.height), 1)], 64)) : v("", !0)
|
|
919
919
|
])]),
|
|
920
|
-
|
|
920
|
+
w("div", { class: C(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", O(e)]) }, [h(e) ? (o(), p("button", {
|
|
921
921
|
key: 0,
|
|
922
922
|
type: "button",
|
|
923
923
|
"data-testid": "media-edit",
|
|
924
924
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
925
925
|
style: { color: "var(--tpl-text-muted)" },
|
|
926
|
-
title:
|
|
927
|
-
"aria-label":
|
|
928
|
-
onClick:
|
|
929
|
-
}, [
|
|
926
|
+
title: D(k).mediaLibrary.editFile,
|
|
927
|
+
"aria-label": D(k).mediaLibrary.editFile,
|
|
928
|
+
onClick: S((t) => s("edit", e), ["stop"])
|
|
929
|
+
}, [M(D(V), {
|
|
930
930
|
size: 12,
|
|
931
931
|
"stroke-width": 2
|
|
932
|
-
})], 8, ct)) :
|
|
932
|
+
})], 8, ct)) : v("", !0), _(e) ? (o(), p("button", {
|
|
933
933
|
key: 1,
|
|
934
934
|
type: "button",
|
|
935
935
|
"data-testid": "media-replace",
|
|
936
936
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
937
937
|
style: { color: "var(--tpl-text-muted)" },
|
|
938
|
-
title:
|
|
939
|
-
"aria-label":
|
|
940
|
-
onClick:
|
|
941
|
-
}, [
|
|
938
|
+
title: D(k).mediaLibrary.replaceFile,
|
|
939
|
+
"aria-label": D(k).mediaLibrary.replaceFile,
|
|
940
|
+
onClick: S((t) => s("replace", e), ["stop"])
|
|
941
|
+
}, [M(D(H), {
|
|
942
942
|
size: 12,
|
|
943
943
|
"stroke-width": 2
|
|
944
|
-
})], 8, lt)) :
|
|
945
|
-
|
|
944
|
+
})], 8, lt)) : v("", !0)], 2),
|
|
945
|
+
E(e) ? (o(), p("div", ut, [M(D(ue), {
|
|
946
946
|
size: 12,
|
|
947
947
|
"stroke-width": 3
|
|
948
|
-
})])) :
|
|
949
|
-
], 46, tt))), 128))], 8, et)) : (o(),
|
|
948
|
+
})])) : v("", !0)
|
|
949
|
+
], 46, tt))), 128))], 8, et)) : (o(), p("div", {
|
|
950
950
|
key: 2,
|
|
951
951
|
role: "listbox",
|
|
952
|
-
"aria-label":
|
|
952
|
+
"aria-label": D(k).mediaLibrary.filesListAriaLabel,
|
|
953
953
|
"aria-multiselectable": "true",
|
|
954
954
|
class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
|
|
955
|
-
}, [(o(!0),
|
|
955
|
+
}, [(o(!0), p(A, null, i(t.items, (e) => (o(), p("div", {
|
|
956
956
|
key: e.id,
|
|
957
957
|
role: "option",
|
|
958
958
|
tabindex: "0",
|
|
959
959
|
"data-testid": "media-library-item",
|
|
960
|
-
class:
|
|
960
|
+
class: C(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
|
|
961
961
|
"tpl:cursor-pointer",
|
|
962
|
-
!
|
|
963
|
-
|
|
962
|
+
!f(e) && !E(e) ? "tpl:opacity-60" : "",
|
|
963
|
+
E(e) ? "tpl-media-item--selected" : ""
|
|
964
964
|
]]),
|
|
965
965
|
"data-media-id": e.id,
|
|
966
|
-
"aria-selected":
|
|
966
|
+
"aria-selected": E(e),
|
|
967
967
|
"aria-label": e.filename || e.url,
|
|
968
|
-
style:
|
|
969
|
-
borderColor:
|
|
970
|
-
backgroundColor: !
|
|
968
|
+
style: j({
|
|
969
|
+
borderColor: E(e) ? "var(--tpl-primary)" : "transparent",
|
|
970
|
+
backgroundColor: !f(e) && !E(e) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
|
|
971
971
|
}),
|
|
972
|
-
onClick: (t) =>
|
|
973
|
-
onDblclick: (t) =>
|
|
972
|
+
onClick: (t) => b(e, t),
|
|
973
|
+
onDblclick: (t) => x(e),
|
|
974
974
|
onKeydown: (t) => T(e, t)
|
|
975
975
|
}, [
|
|
976
|
-
|
|
976
|
+
w("div", We, [D(l)(u(e)) ? (o(), p("img", {
|
|
977
977
|
key: 0,
|
|
978
978
|
src: d(e),
|
|
979
979
|
alt: e.filename || e.url,
|
|
980
980
|
class: "tpl:size-full tpl:object-cover",
|
|
981
981
|
loading: "lazy"
|
|
982
|
-
}, null, 8, Ge)) : (o(),
|
|
982
|
+
}, null, 8, Ge)) : (o(), y(Fe, {
|
|
983
983
|
key: 1,
|
|
984
984
|
"mime-type": u(e)
|
|
985
985
|
}, null, 8, ["mime-type"]))]),
|
|
986
|
-
|
|
987
|
-
|
|
986
|
+
w("div", Ke, [w("p", qe, g(e.filename || e.url), 1), w("p", Je, [e.size == null ? v("", !0) : (o(), p("span", Ye, g(D($)(e.size)), 1)), D(l)(u(e)) && e.width && e.height ? (o(), p("span", Xe, g(e.width) + "×" + g(e.height), 1)) : v("", !0)])]),
|
|
987
|
+
w("div", { class: C(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", O(e)]) }, [h(e) ? (o(), p("button", {
|
|
988
988
|
key: 0,
|
|
989
989
|
type: "button",
|
|
990
990
|
"data-testid": "media-edit",
|
|
@@ -993,13 +993,13 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
993
993
|
"background-color": "var(--tpl-overlay)",
|
|
994
994
|
color: "var(--tpl-on-primary)"
|
|
995
995
|
},
|
|
996
|
-
title:
|
|
997
|
-
"aria-label":
|
|
998
|
-
onClick:
|
|
999
|
-
}, [
|
|
996
|
+
title: D(k).mediaLibrary.editFile,
|
|
997
|
+
"aria-label": D(k).mediaLibrary.editFile,
|
|
998
|
+
onClick: S((t) => s("edit", e), ["stop"])
|
|
999
|
+
}, [M(D(V), {
|
|
1000
1000
|
size: 11,
|
|
1001
1001
|
"stroke-width": 2
|
|
1002
|
-
})], 8, Ze)) :
|
|
1002
|
+
})], 8, Ze)) : v("", !0), _(e) ? (o(), p("button", {
|
|
1003
1003
|
key: 1,
|
|
1004
1004
|
type: "button",
|
|
1005
1005
|
"data-testid": "media-replace",
|
|
@@ -1008,29 +1008,29 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1008
1008
|
"background-color": "var(--tpl-overlay)",
|
|
1009
1009
|
color: "var(--tpl-on-primary)"
|
|
1010
1010
|
},
|
|
1011
|
-
title:
|
|
1012
|
-
"aria-label":
|
|
1013
|
-
onClick:
|
|
1014
|
-
}, [
|
|
1011
|
+
title: D(k).mediaLibrary.replaceFile,
|
|
1012
|
+
"aria-label": D(k).mediaLibrary.replaceFile,
|
|
1013
|
+
onClick: S((t) => s("replace", e), ["stop"])
|
|
1014
|
+
}, [M(D(H), {
|
|
1015
1015
|
size: 11,
|
|
1016
1016
|
"stroke-width": 2
|
|
1017
|
-
})], 8, Qe)) :
|
|
1018
|
-
|
|
1017
|
+
})], 8, Qe)) : v("", !0)], 2),
|
|
1018
|
+
E(e) ? (o(), p("div", $e, [M(D(ue), {
|
|
1019
1019
|
size: 12,
|
|
1020
1020
|
"stroke-width": 3
|
|
1021
|
-
})])) :
|
|
1021
|
+
})])) : v("", !0)
|
|
1022
1022
|
], 46, Ue))), 128))], 8, He)),
|
|
1023
|
-
|
|
1023
|
+
w("div", {
|
|
1024
1024
|
ref_key: "sentinelRef",
|
|
1025
1025
|
ref: P,
|
|
1026
1026
|
class: "tpl:h-4"
|
|
1027
1027
|
}, null, 512),
|
|
1028
|
-
|
|
1028
|
+
t.isLoading && t.items.length > 0 ? (o(), p("div", dt, [M(D(G), {
|
|
1029
1029
|
class: "tpl-spinner",
|
|
1030
1030
|
size: 20,
|
|
1031
1031
|
"stroke-width": 2,
|
|
1032
1032
|
style: { color: "var(--tpl-primary)" }
|
|
1033
|
-
})])) :
|
|
1033
|
+
})])) : v("", !0)
|
|
1034
1034
|
]));
|
|
1035
1035
|
}
|
|
1036
1036
|
}), [["__scopeId", "data-v-57c35946"]]), pt = ["data-tpl-theme"], mt = {
|
|
@@ -1052,7 +1052,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1052
1052
|
}, vt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, yt = ["disabled"], bt = ["disabled"], xt = {
|
|
1053
1053
|
key: 0,
|
|
1054
1054
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
1055
|
-
}, St = { key: 1 }, Ct = /* @__PURE__ */
|
|
1055
|
+
}, St = { key: 1 }, Ct = /* @__PURE__ */ t({
|
|
1056
1056
|
__name: "MediaImportUrlModal",
|
|
1057
1057
|
props: {
|
|
1058
1058
|
visible: { type: Boolean },
|
|
@@ -1060,24 +1060,24 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1060
1060
|
error: {}
|
|
1061
1061
|
},
|
|
1062
1062
|
emits: ["import", "close"],
|
|
1063
|
-
setup(
|
|
1064
|
-
let
|
|
1065
|
-
|
|
1066
|
-
e && (
|
|
1063
|
+
setup(t, { emit: r }) {
|
|
1064
|
+
let i = t, a = r, { t: s } = Z(), c = n(Y, null), f = n(J, e(null)), h = e("");
|
|
1065
|
+
u(() => i.visible, (e) => {
|
|
1066
|
+
e && (h.value = "");
|
|
1067
1067
|
});
|
|
1068
|
-
function
|
|
1069
|
-
let e =
|
|
1070
|
-
e && !
|
|
1068
|
+
function b() {
|
|
1069
|
+
let e = h.value.trim();
|
|
1070
|
+
e && !i.isImporting && a("import", e);
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
|
|
1072
|
+
function x() {
|
|
1073
|
+
i.isImporting || a("close");
|
|
1074
1074
|
}
|
|
1075
|
-
let
|
|
1076
|
-
ge(
|
|
1077
|
-
function
|
|
1078
|
-
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(),
|
|
1075
|
+
let k = e(null);
|
|
1076
|
+
ge(k, O(() => i.visible));
|
|
1077
|
+
function A(e) {
|
|
1078
|
+
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), b()), e.key === "Escape" && x();
|
|
1079
1079
|
}
|
|
1080
|
-
return (
|
|
1080
|
+
return (e, n) => (o(), y(_, { to: D(f) || "body" }, [M(T, {
|
|
1081
1081
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1082
1082
|
"enter-from-class": "tpl:opacity-0",
|
|
1083
1083
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1085,63 +1085,63 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1085
1085
|
"leave-from-class": "tpl:opacity-100",
|
|
1086
1086
|
"leave-to-class": "tpl:opacity-0"
|
|
1087
1087
|
}, {
|
|
1088
|
-
default:
|
|
1088
|
+
default: l(() => [t.visible ? (o(), p("div", {
|
|
1089
1089
|
key: 0,
|
|
1090
|
-
"data-tpl-theme":
|
|
1091
|
-
class:
|
|
1090
|
+
"data-tpl-theme": D(c),
|
|
1091
|
+
class: C([D(f) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1092
1092
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1093
|
-
onClick:
|
|
1094
|
-
onKeydown:
|
|
1095
|
-
}, [
|
|
1093
|
+
onClick: S(x, ["self"]),
|
|
1094
|
+
onKeydown: A
|
|
1095
|
+
}, [w("div", {
|
|
1096
1096
|
ref_key: "dialogRef",
|
|
1097
|
-
ref:
|
|
1097
|
+
ref: k,
|
|
1098
1098
|
role: "dialog",
|
|
1099
1099
|
"aria-modal": "true",
|
|
1100
1100
|
"aria-labelledby": "tpl-media-import-title",
|
|
1101
1101
|
class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
1102
1102
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1103
1103
|
}, [
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1104
|
+
w("h3", mt, g(D(s).mediaLibrary.importFromUrl), 1),
|
|
1105
|
+
w("div", ht, [d(w("input", {
|
|
1106
|
+
"onUpdate:modelValue": n[0] ||= (e) => h.value = e,
|
|
1107
1107
|
type: "url",
|
|
1108
|
-
"aria-label":
|
|
1109
|
-
"aria-invalid": !!
|
|
1110
|
-
"aria-describedby":
|
|
1108
|
+
"aria-label": D(s).mediaLibrary.importFromUrl,
|
|
1109
|
+
"aria-invalid": !!t.error,
|
|
1110
|
+
"aria-describedby": t.error ? "tpl-media-import-error" : void 0,
|
|
1111
1111
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
1112
1112
|
style: {
|
|
1113
1113
|
"border-color": "var(--tpl-border)",
|
|
1114
1114
|
"background-color": "var(--tpl-bg)",
|
|
1115
1115
|
color: "var(--tpl-text)"
|
|
1116
1116
|
},
|
|
1117
|
-
placeholder:
|
|
1118
|
-
disabled:
|
|
1117
|
+
placeholder: D(s).mediaLibrary.importUrlPlaceholder,
|
|
1118
|
+
disabled: t.isImporting,
|
|
1119
1119
|
autofocus: ""
|
|
1120
|
-
}, null, 8, gt), [[
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
class:
|
|
1120
|
+
}, null, 8, gt), [[E, h.value]])]),
|
|
1121
|
+
t.error ? (o(), p("p", _t, g(t.error), 1)) : v("", !0),
|
|
1122
|
+
w("div", vt, [w("button", {
|
|
1123
|
+
class: C(["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": t.isImporting }]),
|
|
1124
1124
|
style: {
|
|
1125
1125
|
"border-color": "var(--tpl-border)",
|
|
1126
1126
|
color: "var(--tpl-text)",
|
|
1127
1127
|
"background-color": "var(--tpl-bg)"
|
|
1128
1128
|
},
|
|
1129
|
-
disabled:
|
|
1130
|
-
onClick:
|
|
1131
|
-
},
|
|
1129
|
+
disabled: t.isImporting,
|
|
1130
|
+
onClick: x
|
|
1131
|
+
}, g(D(s).mediaLibrary.cancel), 11, yt), w("button", {
|
|
1132
1132
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
1133
1133
|
style: {
|
|
1134
1134
|
"background-color": "var(--tpl-primary)",
|
|
1135
1135
|
color: "var(--tpl-on-primary)"
|
|
1136
1136
|
},
|
|
1137
|
-
disabled: !
|
|
1138
|
-
onClick:
|
|
1139
|
-
}, [
|
|
1137
|
+
disabled: !h.value.trim() || t.isImporting,
|
|
1138
|
+
onClick: b
|
|
1139
|
+
}, [t.isImporting ? (o(), p("span", xt, [M(D(G), {
|
|
1140
1140
|
class: "tpl:animate-spin",
|
|
1141
1141
|
size: 12,
|
|
1142
1142
|
"stroke-width": 2
|
|
1143
|
-
}),
|
|
1144
|
-
], 512)], 42, pt)) :
|
|
1143
|
+
}), m(" " + g(D(s).mediaLibrary.importing), 1)])) : (o(), p("span", St, g(D(s).mediaLibrary.import), 1))], 8, bt)])
|
|
1144
|
+
], 512)], 42, pt)) : v("", !0)]),
|
|
1145
1145
|
_: 1
|
|
1146
1146
|
})], 8, ["to"]));
|
|
1147
1147
|
}
|
|
@@ -1149,62 +1149,62 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1149
1149
|
key: 0,
|
|
1150
1150
|
class: "tpl:shrink-0",
|
|
1151
1151
|
style: { color: "var(--tpl-text-dim)" }
|
|
1152
|
-
}, Ot = /* @__PURE__ */
|
|
1152
|
+
}, Ot = /* @__PURE__ */ t({
|
|
1153
1153
|
__name: "MediaMovePicker",
|
|
1154
1154
|
props: {
|
|
1155
1155
|
folders: {},
|
|
1156
1156
|
currentFolderId: {}
|
|
1157
1157
|
},
|
|
1158
1158
|
emits: ["select", "close"],
|
|
1159
|
-
setup(
|
|
1160
|
-
let
|
|
1161
|
-
function
|
|
1159
|
+
setup(t, { emit: n }) {
|
|
1160
|
+
let r = n, { t: a } = Z(), s = e(null);
|
|
1161
|
+
function c(e, t = 0) {
|
|
1162
1162
|
let n = [];
|
|
1163
1163
|
for (let r of e) n.push({
|
|
1164
1164
|
id: r.id,
|
|
1165
1165
|
name: r.name,
|
|
1166
1166
|
depth: t
|
|
1167
|
-
}), r.children.length && n.push(...
|
|
1167
|
+
}), r.children.length && n.push(...c(r.children, t + 1));
|
|
1168
1168
|
return n;
|
|
1169
1169
|
}
|
|
1170
|
-
return z(
|
|
1171
|
-
|
|
1172
|
-
}), (
|
|
1170
|
+
return z(s, () => {
|
|
1171
|
+
r("close");
|
|
1172
|
+
}), (e, n) => (o(), p("div", {
|
|
1173
1173
|
ref_key: "pickerRef",
|
|
1174
|
-
ref:
|
|
1174
|
+
ref: s,
|
|
1175
1175
|
"data-testid": "media-move-picker",
|
|
1176
1176
|
class: "tpl:absolute tpl:bottom-full tpl:left-0 tpl:z-10 tpl:mb-2 tpl:w-56 tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:shadow-lg",
|
|
1177
1177
|
style: {
|
|
1178
1178
|
"border-color": "var(--tpl-border)",
|
|
1179
1179
|
"background-color": "var(--tpl-bg-elevated)"
|
|
1180
1180
|
}
|
|
1181
|
-
}, [
|
|
1181
|
+
}, [w("div", wt, [t.currentFolderId === null ? v("", !0) : (o(), p("button", {
|
|
1182
1182
|
key: 0,
|
|
1183
1183
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
1184
1184
|
style: { color: "var(--tpl-text)" },
|
|
1185
|
-
onClick:
|
|
1186
|
-
}, [
|
|
1185
|
+
onClick: n[0] ||= (e) => r("select", null)
|
|
1186
|
+
}, [M(D(B), {
|
|
1187
1187
|
class: "tpl:shrink-0",
|
|
1188
1188
|
size: 14,
|
|
1189
1189
|
"stroke-width": 1.5
|
|
1190
|
-
}),
|
|
1191
|
-
key:
|
|
1190
|
+
}), m(" " + g(D(a).mediaLibrary.moveToRoot), 1)])), (o(!0), p(A, null, i(c(t.folders), (e) => (o(), p("button", {
|
|
1191
|
+
key: e.id,
|
|
1192
1192
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:py-1.5 tpl:pr-3 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
1193
|
-
style:
|
|
1194
|
-
paddingLeft: `${
|
|
1195
|
-
color:
|
|
1196
|
-
opacity:
|
|
1193
|
+
style: j({
|
|
1194
|
+
paddingLeft: `${e.depth * 16 + 12}px`,
|
|
1195
|
+
color: e.id === t.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
|
|
1196
|
+
opacity: e.id === t.currentFolderId ? .5 : 1
|
|
1197
1197
|
}),
|
|
1198
|
-
disabled:
|
|
1199
|
-
onClick: (
|
|
1198
|
+
disabled: e.id === t.currentFolderId,
|
|
1199
|
+
onClick: (t) => r("select", e.id)
|
|
1200
1200
|
}, [
|
|
1201
|
-
|
|
1201
|
+
M(D(U), {
|
|
1202
1202
|
class: "tpl:shrink-0",
|
|
1203
1203
|
size: 14,
|
|
1204
1204
|
"stroke-width": 1.5
|
|
1205
1205
|
}),
|
|
1206
|
-
|
|
1207
|
-
|
|
1206
|
+
w("span", Et, g(e.name), 1),
|
|
1207
|
+
e.id === t.currentFolderId ? (o(), p("span", Dt, g(D(a).mediaLibrary.currentFolder), 1)) : v("", !0)
|
|
1208
1208
|
], 12, Tt))), 128))])], 512));
|
|
1209
1209
|
}
|
|
1210
1210
|
}), kt = { class: "tpl:flex tpl:items-center tpl:gap-3" }, At = ["src", "alt"], jt = {
|
|
@@ -1217,7 +1217,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1217
1217
|
}, Pt = {
|
|
1218
1218
|
class: "tpl:mt-0.5 tpl:text-[10px]",
|
|
1219
1219
|
style: { color: "var(--tpl-text-muted)" }
|
|
1220
|
-
}, Ft = /*#__PURE__*/ q(/* @__PURE__ */
|
|
1220
|
+
}, Ft = /*#__PURE__*/ q(/* @__PURE__ */ t({
|
|
1221
1221
|
__name: "MediaPreviewPanel",
|
|
1222
1222
|
props: {
|
|
1223
1223
|
item: {},
|
|
@@ -1236,11 +1236,11 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
return null;
|
|
1238
1238
|
}
|
|
1239
|
-
let s =
|
|
1239
|
+
let s = O(() => {
|
|
1240
1240
|
if (!t.item.folderId || !t.folders) return null;
|
|
1241
1241
|
let e = a(t.folders, t.item.folderId);
|
|
1242
1242
|
return e ? e.join("/") : null;
|
|
1243
|
-
}), c =
|
|
1243
|
+
}), c = O(() => t.item.mimeType ?? ""), l = O(() => i(c.value));
|
|
1244
1244
|
function u(e) {
|
|
1245
1245
|
return Ie(e, r?.value, {
|
|
1246
1246
|
year: "numeric",
|
|
@@ -1248,37 +1248,37 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1248
1248
|
day: "numeric"
|
|
1249
1249
|
});
|
|
1250
1250
|
}
|
|
1251
|
-
let d =
|
|
1252
|
-
return (t, n) => (o(),
|
|
1251
|
+
let d = O(() => t.item.filename || t.item.url);
|
|
1252
|
+
return (t, n) => (o(), p("div", kt, [l.value ? (o(), p("img", {
|
|
1253
1253
|
key: 0,
|
|
1254
1254
|
src: e.item.url,
|
|
1255
1255
|
alt: e.item.alt || d.value,
|
|
1256
1256
|
class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
|
|
1257
1257
|
style: { border: "1px solid var(--tpl-border)" }
|
|
1258
|
-
}, null, 8, At)) : (o(),
|
|
1258
|
+
}, null, 8, At)) : (o(), p("div", jt, [M(Fe, {
|
|
1259
1259
|
"mime-type": c.value,
|
|
1260
1260
|
class: "tpl-preview-icon"
|
|
1261
|
-
}, null, 8, ["mime-type"])])),
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
e.item.size == null ?
|
|
1265
|
-
e.item.createdAt ? (o(),
|
|
1266
|
-
l.value && e.item.width && e.item.height ? (o(),
|
|
1267
|
-
s.value ? (o(),
|
|
1268
|
-
n[0] ||=
|
|
1269
|
-
|
|
1261
|
+
}, null, 8, ["mime-type"])])), w("div", Mt, [
|
|
1262
|
+
w("p", Nt, g(d.value), 1),
|
|
1263
|
+
w("p", Pt, [
|
|
1264
|
+
e.item.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(g(D($)(e.item.size)), 1)], 64)),
|
|
1265
|
+
e.item.createdAt ? (o(), p(A, { key: 1 }, [e.item.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(" · ")], 64)), m(" " + g(u(e.item.createdAt)), 1)], 64)) : v("", !0),
|
|
1266
|
+
l.value && e.item.width && e.item.height ? (o(), p(A, { key: 2 }, [m(" · " + g(e.item.width) + "×" + g(e.item.height) + "px ", 1)], 64)) : v("", !0),
|
|
1267
|
+
s.value ? (o(), p(A, { key: 3 }, [
|
|
1268
|
+
n[0] ||= m(" · ", -1),
|
|
1269
|
+
M(D(U), {
|
|
1270
1270
|
class: "tpl:mb-px tpl:inline",
|
|
1271
1271
|
size: 9,
|
|
1272
1272
|
"stroke-width": 2
|
|
1273
1273
|
}),
|
|
1274
|
-
|
|
1275
|
-
], 64)) :
|
|
1274
|
+
m(" " + g(s.value), 1)
|
|
1275
|
+
], 64)) : v("", !0)
|
|
1276
1276
|
]),
|
|
1277
|
-
l.value ? (o(),
|
|
1277
|
+
l.value ? (o(), p("p", {
|
|
1278
1278
|
key: 0,
|
|
1279
|
-
class:
|
|
1279
|
+
class: C(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt }]),
|
|
1280
1280
|
style: { color: "var(--tpl-text-dim)" }
|
|
1281
|
-
},
|
|
1281
|
+
}, g(e.item.alt || "\xA0"), 3)) : v("", !0)
|
|
1282
1282
|
])]));
|
|
1283
1283
|
}
|
|
1284
1284
|
}), [["__scopeId", "data-v-50993988"]]), It = ["data-tpl-theme"], Lt = {
|
|
@@ -1311,7 +1311,7 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1311
1311
|
role: "alert",
|
|
1312
1312
|
class: "tpl:mb-3 tpl:text-xs",
|
|
1313
1313
|
style: { color: "var(--tpl-danger)" }
|
|
1314
|
-
}, Kt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, qt = ["disabled"], Jt = ["disabled"], Yt = /* @__PURE__ */
|
|
1314
|
+
}, Kt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, qt = ["disabled"], Jt = ["disabled"], Yt = /* @__PURE__ */ t({
|
|
1315
1315
|
__name: "MediaReplaceModal",
|
|
1316
1316
|
props: {
|
|
1317
1317
|
visible: { type: Boolean },
|
|
@@ -1321,28 +1321,28 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1321
1321
|
error: {}
|
|
1322
1322
|
},
|
|
1323
1323
|
emits: ["replace", "close"],
|
|
1324
|
-
setup(
|
|
1325
|
-
let
|
|
1326
|
-
if (!
|
|
1327
|
-
let e = (
|
|
1324
|
+
setup(t, { emit: r }) {
|
|
1325
|
+
let i = t, a = r, { t: s } = Z(), c = n(Y, null), d = n(J, e(null)), f = e(null), m = e(null), h = O(() => {
|
|
1326
|
+
if (!i.item) return "";
|
|
1327
|
+
let e = (i.item.filename ?? "").split(".");
|
|
1328
1328
|
return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
|
|
1329
|
-
}),
|
|
1330
|
-
|
|
1331
|
-
e || (
|
|
1329
|
+
}), b = O(() => h.value ? `.${h.value}` : "*"), x = O(() => (i.usageInfo?.templateCount ?? 0) > 0);
|
|
1330
|
+
u(() => i.visible, (e) => {
|
|
1331
|
+
e || (m.value = null, f.value && (f.value.value = ""));
|
|
1332
1332
|
});
|
|
1333
|
-
function
|
|
1333
|
+
function E(e) {
|
|
1334
1334
|
let t = e.target;
|
|
1335
|
-
t.files && t.files.length > 0 && (
|
|
1335
|
+
t.files && t.files.length > 0 && (m.value = t.files[0]);
|
|
1336
1336
|
}
|
|
1337
1337
|
function k() {
|
|
1338
|
-
|
|
1338
|
+
m.value && a("replace", m.value);
|
|
1339
1339
|
}
|
|
1340
|
-
let
|
|
1341
|
-
ge(
|
|
1342
|
-
function
|
|
1343
|
-
e.stopPropagation(), e.key === "Escape" &&
|
|
1340
|
+
let A = e(null);
|
|
1341
|
+
ge(A, O(() => i.visible && i.item !== null));
|
|
1342
|
+
function j(e) {
|
|
1343
|
+
e.stopPropagation(), e.key === "Escape" && a("close");
|
|
1344
1344
|
}
|
|
1345
|
-
return (
|
|
1345
|
+
return (e, n) => (o(), y(_, { to: D(d) || "body" }, [M(T, {
|
|
1346
1346
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1347
1347
|
"enter-from-class": "tpl:opacity-0",
|
|
1348
1348
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1350,61 +1350,61 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
|
|
|
1350
1350
|
"leave-from-class": "tpl:opacity-100",
|
|
1351
1351
|
"leave-to-class": "tpl:opacity-0"
|
|
1352
1352
|
}, {
|
|
1353
|
-
default:
|
|
1353
|
+
default: l(() => [t.visible && t.item ? (o(), p("div", {
|
|
1354
1354
|
key: 0,
|
|
1355
|
-
"data-tpl-theme":
|
|
1356
|
-
class:
|
|
1355
|
+
"data-tpl-theme": D(c),
|
|
1356
|
+
class: C([D(d) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1357
1357
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1358
|
-
onClick: n[1] ||=
|
|
1359
|
-
onKeydown:
|
|
1360
|
-
}, [
|
|
1358
|
+
onClick: n[1] ||= S((e) => a("close"), ["self"]),
|
|
1359
|
+
onKeydown: j
|
|
1360
|
+
}, [w("div", {
|
|
1361
1361
|
ref_key: "dialogRef",
|
|
1362
|
-
ref:
|
|
1362
|
+
ref: A,
|
|
1363
1363
|
role: "dialog",
|
|
1364
1364
|
"aria-modal": "true",
|
|
1365
1365
|
"aria-labelledby": "tpl-media-replace-title",
|
|
1366
1366
|
class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
1367
1367
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1368
1368
|
}, [
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1369
|
+
w("h3", Lt, g(D(s).mediaLibrary.replaceWarningTitle), 1),
|
|
1370
|
+
w("p", Rt, g(D(s).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${h.value}`)), 1),
|
|
1371
|
+
x.value ? (o(), p("p", zt, g(D(s).mediaLibrary.replaceWarningUsageNote.replace("{count}", t.usageInfo.templateCount.toString())), 1)) : v("", !0),
|
|
1372
|
+
w("div", Bt, [w("p", Vt, g(t.item.filename), 1)]),
|
|
1373
|
+
w("div", Ht, [w("label", Ut, g(D(s).mediaLibrary.replaceSelectFile), 1), w("input", {
|
|
1374
1374
|
ref_key: "fileInputRef",
|
|
1375
|
-
ref:
|
|
1375
|
+
ref: f,
|
|
1376
1376
|
type: "file",
|
|
1377
|
-
accept:
|
|
1378
|
-
"aria-invalid": !!
|
|
1379
|
-
"aria-describedby":
|
|
1377
|
+
accept: b.value,
|
|
1378
|
+
"aria-invalid": !!t.error,
|
|
1379
|
+
"aria-describedby": t.error ? "tpl-media-replace-error" : void 0,
|
|
1380
1380
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
|
|
1381
1381
|
style: {
|
|
1382
1382
|
"border-color": "var(--tpl-border)",
|
|
1383
1383
|
"background-color": "var(--tpl-bg)",
|
|
1384
1384
|
color: "var(--tpl-text)"
|
|
1385
1385
|
},
|
|
1386
|
-
onChange:
|
|
1386
|
+
onChange: E
|
|
1387
1387
|
}, null, 40, Wt)]),
|
|
1388
|
-
|
|
1389
|
-
|
|
1388
|
+
t.error ? (o(), p("p", Gt, g(t.error), 1)) : v("", !0),
|
|
1389
|
+
w("div", Kt, [w("button", {
|
|
1390
1390
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
1391
1391
|
style: {
|
|
1392
1392
|
"border-color": "var(--tpl-border)",
|
|
1393
1393
|
color: "var(--tpl-text)",
|
|
1394
1394
|
"background-color": "var(--tpl-bg)"
|
|
1395
1395
|
},
|
|
1396
|
-
disabled:
|
|
1397
|
-
onClick: n[0] ||= (e) =>
|
|
1398
|
-
},
|
|
1396
|
+
disabled: t.isReplacing,
|
|
1397
|
+
onClick: n[0] ||= (e) => a("close")
|
|
1398
|
+
}, g(D(s).mediaLibrary.cancel), 9, qt), w("button", {
|
|
1399
1399
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
1400
1400
|
style: {
|
|
1401
1401
|
"background-color": "var(--tpl-primary)",
|
|
1402
1402
|
color: "var(--tpl-on-primary)"
|
|
1403
1403
|
},
|
|
1404
|
-
disabled: !
|
|
1404
|
+
disabled: !m.value || t.isReplacing,
|
|
1405
1405
|
onClick: k
|
|
1406
|
-
},
|
|
1407
|
-
], 512)], 42, It)) :
|
|
1406
|
+
}, g(t.isReplacing ? D(s).mediaLibrary.replacing : D(s).mediaLibrary.replace), 9, Jt)])
|
|
1407
|
+
], 512)], 42, It)) : v("", !0)]),
|
|
1408
1408
|
_: 1
|
|
1409
1409
|
})], 8, ["to"]));
|
|
1410
1410
|
}
|
|
@@ -1449,71 +1449,71 @@ var Zt = [
|
|
|
1449
1449
|
role: "alert",
|
|
1450
1450
|
class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
|
|
1451
1451
|
style: { color: "var(--tpl-danger)" }
|
|
1452
|
-
}, rn = /* @__PURE__ */
|
|
1452
|
+
}, rn = /* @__PURE__ */ t({
|
|
1453
1453
|
__name: "MediaUploadZone",
|
|
1454
1454
|
props: {
|
|
1455
1455
|
isUploading: { type: Boolean },
|
|
1456
1456
|
uploadProgress: {}
|
|
1457
1457
|
},
|
|
1458
1458
|
emits: ["upload"],
|
|
1459
|
-
setup(
|
|
1460
|
-
let
|
|
1459
|
+
setup(t, { emit: r }) {
|
|
1460
|
+
let i = r, { t: a, format: s } = Z(), c = n(X, null), { allAcceptedInputString: l, restrictsMimeTypes: u, availableCategories: d, maxFileSize: f, isAcceptedFile: m } = Q(), h = {
|
|
1461
1461
|
images: "filterImages",
|
|
1462
1462
|
documents: "filterDocuments",
|
|
1463
1463
|
videos: "filterVideos",
|
|
1464
1464
|
audio: "filterAudio"
|
|
1465
|
-
},
|
|
1466
|
-
let e =
|
|
1467
|
-
return Number.isFinite(
|
|
1465
|
+
}, _ = O(() => {
|
|
1466
|
+
let e = a.mediaLibrary, t = u.value ? Xt(d.value.map((t) => e[h[t]]), c?.value) : a.mediaLibrary.acceptedAnyType;
|
|
1467
|
+
return Number.isFinite(f.value) ? s(a.mediaLibrary.acceptedFormatsMaxSize, {
|
|
1468
1468
|
formats: t,
|
|
1469
|
-
size: $(
|
|
1469
|
+
size: $(f.value)
|
|
1470
1470
|
}) : t;
|
|
1471
|
-
}),
|
|
1472
|
-
function
|
|
1471
|
+
}), y = e([]), b = e();
|
|
1472
|
+
function x(e) {
|
|
1473
1473
|
let t = [], n = [];
|
|
1474
|
-
for (let r of Array.from(e))
|
|
1475
|
-
|
|
1474
|
+
for (let r of Array.from(e)) m(r) ? t.push(r) : n.push(r.name);
|
|
1475
|
+
y.value = n, t.length && i("upload", t);
|
|
1476
1476
|
}
|
|
1477
|
-
let { isOverDropZone:
|
|
1478
|
-
e?.length &&
|
|
1479
|
-
} }), { open:
|
|
1477
|
+
let { isOverDropZone: S } = L(b, { onDrop: (e) => {
|
|
1478
|
+
e?.length && x(e);
|
|
1479
|
+
} }), { open: T, onChange: E } = I({
|
|
1480
1480
|
accept: l.value,
|
|
1481
1481
|
multiple: !0
|
|
1482
1482
|
});
|
|
1483
|
-
return
|
|
1484
|
-
e?.length &&
|
|
1485
|
-
}), (
|
|
1483
|
+
return E((e) => {
|
|
1484
|
+
e?.length && x(e);
|
|
1485
|
+
}), (e, n) => (o(), p(A, null, [w("button", {
|
|
1486
1486
|
ref_key: "dropZoneRef",
|
|
1487
|
-
ref:
|
|
1487
|
+
ref: b,
|
|
1488
1488
|
type: "button",
|
|
1489
1489
|
"data-testid": "media-upload-zone",
|
|
1490
|
-
class:
|
|
1491
|
-
"aria-label":
|
|
1492
|
-
"aria-describedby":
|
|
1493
|
-
"aria-busy":
|
|
1490
|
+
class: C(["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", D(S) ? "tpl-upload-zone-active" : ""]),
|
|
1491
|
+
"aria-label": D(a).mediaLibrary.dropOrClick,
|
|
1492
|
+
"aria-describedby": t.isUploading ? void 0 : "tpl-media-upload-hint",
|
|
1493
|
+
"aria-busy": t.isUploading,
|
|
1494
1494
|
style: {
|
|
1495
1495
|
"border-color": "var(--tpl-border-light)",
|
|
1496
1496
|
"background-color": "var(--tpl-bg)"
|
|
1497
1497
|
},
|
|
1498
|
-
onClick: n[0] ||= (e) =>
|
|
1499
|
-
}, [
|
|
1498
|
+
onClick: n[0] ||= (e) => D(T)()
|
|
1499
|
+
}, [t.isUploading ? (o(), p("div", Qt, [M(D(G), {
|
|
1500
1500
|
class: "tpl-spinner",
|
|
1501
1501
|
size: 20,
|
|
1502
1502
|
"stroke-width": 2,
|
|
1503
1503
|
style: { color: "var(--tpl-primary)" }
|
|
1504
|
-
}),
|
|
1505
|
-
current:
|
|
1506
|
-
total:
|
|
1507
|
-
}) :
|
|
1508
|
-
|
|
1504
|
+
}), w("span", $t, g(t.uploadProgress && t.uploadProgress.total > 1 ? D(s)(D(a).mediaLibrary.uploadingProgress, {
|
|
1505
|
+
current: t.uploadProgress.current,
|
|
1506
|
+
total: t.uploadProgress.total
|
|
1507
|
+
}) : D(a).mediaLibrary.uploading), 1)])) : (o(), p(A, { key: 1 }, [
|
|
1508
|
+
M(D(K), {
|
|
1509
1509
|
class: "tpl:mb-2",
|
|
1510
1510
|
size: 24,
|
|
1511
1511
|
"stroke-width": 1.5,
|
|
1512
1512
|
style: { color: "var(--tpl-text-dim)" }
|
|
1513
1513
|
}),
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
], 64))], 10, Zt),
|
|
1514
|
+
w("p", en, g(D(a).mediaLibrary.dropOrClick), 1),
|
|
1515
|
+
w("p", tn, g(_.value), 1)
|
|
1516
|
+
], 64))], 10, Zt), y.value.length ? (o(), p("p", nn, g(D(s)(D(a).mediaLibrary.uploadRejected, { files: y.value.join(", ") })), 1)) : v("", !0)], 64));
|
|
1517
1517
|
}
|
|
1518
1518
|
}), an = ["aria-label"], on = [
|
|
1519
1519
|
"width",
|
|
@@ -1539,52 +1539,52 @@ var Zt = [
|
|
|
1539
1539
|
"background-color": "var(--tpl-text)",
|
|
1540
1540
|
color: "var(--tpl-bg-elevated)"
|
|
1541
1541
|
}
|
|
1542
|
-
}, un = /* @__PURE__ */
|
|
1542
|
+
}, un = /* @__PURE__ */ t({
|
|
1543
1543
|
__name: "StorageProgressRing",
|
|
1544
1544
|
props: {
|
|
1545
1545
|
usedBytes: {},
|
|
1546
1546
|
limitBytes: {},
|
|
1547
1547
|
size: {}
|
|
1548
1548
|
},
|
|
1549
|
-
setup(
|
|
1550
|
-
let
|
|
1551
|
-
used:
|
|
1549
|
+
setup(t) {
|
|
1550
|
+
let n = t, { t: r, format: i } = Z(), a = e(!1), s = O(() => n.size ?? 24), c = O(() => Math.max(2, s.value / 8)), u = O(() => (s.value - c.value) / 2), d = O(() => 2 * Math.PI * u.value), f = O(() => n.limitBytes <= 0 ? 0 : Math.min(100, n.usedBytes / n.limitBytes * 100)), h = O(() => d.value - f.value / 100 * d.value), _ = O(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), y = O(() => $(n.usedBytes)), b = O(() => $(n.limitBytes)), x = O(() => Math.max(0, n.limitBytes - n.usedBytes)), S = O(() => $(x.value)), C = O(() => i(r.mediaLibrary.storageTooltip, {
|
|
1551
|
+
used: y.value,
|
|
1552
1552
|
total: b.value,
|
|
1553
1553
|
remaining: S.value
|
|
1554
1554
|
}));
|
|
1555
|
-
return (e, t) => (o(),
|
|
1555
|
+
return (e, t) => (o(), p("div", {
|
|
1556
1556
|
"data-testid": "media-storage-ring",
|
|
1557
1557
|
class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
|
|
1558
1558
|
tabindex: "0",
|
|
1559
|
-
"aria-label":
|
|
1559
|
+
"aria-label": C.value,
|
|
1560
1560
|
onMouseenter: t[0] ||= (e) => a.value = !0,
|
|
1561
1561
|
onMouseleave: t[1] ||= (e) => a.value = !1,
|
|
1562
1562
|
onFocus: t[2] ||= (e) => a.value = !0,
|
|
1563
1563
|
onBlur: t[3] ||= (e) => a.value = !1
|
|
1564
|
-
}, [(o(),
|
|
1564
|
+
}, [(o(), p("svg", {
|
|
1565
1565
|
width: s.value,
|
|
1566
1566
|
height: s.value,
|
|
1567
1567
|
class: "tpl:-rotate-90",
|
|
1568
1568
|
viewBox: `0 0 ${s.value} ${s.value}`
|
|
1569
|
-
}, [
|
|
1569
|
+
}, [w("circle", {
|
|
1570
1570
|
cx: s.value / 2,
|
|
1571
1571
|
cy: s.value / 2,
|
|
1572
1572
|
r: u.value,
|
|
1573
1573
|
fill: "none",
|
|
1574
|
-
"stroke-width":
|
|
1574
|
+
"stroke-width": c.value,
|
|
1575
1575
|
style: { stroke: "var(--tpl-border)" }
|
|
1576
|
-
}, null, 8, sn),
|
|
1576
|
+
}, null, 8, sn), w("circle", {
|
|
1577
1577
|
cx: s.value / 2,
|
|
1578
1578
|
cy: s.value / 2,
|
|
1579
1579
|
r: u.value,
|
|
1580
1580
|
fill: "none",
|
|
1581
|
-
"stroke-width":
|
|
1582
|
-
stroke:
|
|
1581
|
+
"stroke-width": c.value,
|
|
1582
|
+
stroke: _.value,
|
|
1583
1583
|
"stroke-linecap": "round",
|
|
1584
1584
|
"stroke-dasharray": d.value,
|
|
1585
|
-
"stroke-dashoffset":
|
|
1585
|
+
"stroke-dashoffset": h.value,
|
|
1586
1586
|
class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
|
|
1587
|
-
}, null, 8, cn)], 8, on)),
|
|
1587
|
+
}, null, 8, cn)], 8, on)), M(T, {
|
|
1588
1588
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1589
1589
|
"enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
|
|
1590
1590
|
"enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
@@ -1592,10 +1592,10 @@ var Zt = [
|
|
|
1592
1592
|
"leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
1593
1593
|
"leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
|
|
1594
1594
|
}, {
|
|
1595
|
-
default:
|
|
1595
|
+
default: l(() => [a.value ? (o(), p("div", ln, [m(g(C.value) + " ", 1), t[4] ||= w("div", {
|
|
1596
1596
|
class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
|
|
1597
1597
|
style: { "background-color": "var(--tpl-text)" }
|
|
1598
|
-
}, null, -1)])) :
|
|
1598
|
+
}, null, -1)])) : v("", !0)]),
|
|
1599
1599
|
_: 1
|
|
1600
1600
|
})], 40, an));
|
|
1601
1601
|
}
|
|
@@ -1617,56 +1617,56 @@ function dn(e) {
|
|
|
1617
1617
|
}
|
|
1618
1618
|
//#endregion
|
|
1619
1619
|
//#region ../media-library/src/composables/useMediaLibraryUI.ts
|
|
1620
|
-
function fn(
|
|
1621
|
-
let { library: n, translations: r } =
|
|
1620
|
+
function fn(t) {
|
|
1621
|
+
let { library: n, translations: r } = t;
|
|
1622
1622
|
function i() {
|
|
1623
1623
|
return "value" in r && typeof r.value == "object" ? r.value : r;
|
|
1624
1624
|
}
|
|
1625
|
-
let a =
|
|
1625
|
+
let a = e("grid"), o = e(!1), s = e(""), c = e(null), l = e(!1), d = e(!1), f = O(() => n.previewItem.value?.url ?? null), p = O(() => n.frequentlyUsedItems.value.length > 0), m = O(() => n.viewMode.value === "frequently-used" ? n.frequentlyUsedItems.value : n.items.value), h = O(() => Object.values(n.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = O(() => dn(n.folders.value)), _ = {
|
|
1626
1626
|
images: () => i().mediaLibrary.filterImages,
|
|
1627
1627
|
documents: () => i().mediaLibrary.filterDocuments,
|
|
1628
1628
|
videos: () => i().mediaLibrary.filterVideos,
|
|
1629
1629
|
audio: () => i().mediaLibrary.filterAudio
|
|
1630
1630
|
};
|
|
1631
|
-
function
|
|
1632
|
-
return
|
|
1631
|
+
function v(e) {
|
|
1632
|
+
return _[e]?.() ?? e;
|
|
1633
1633
|
}
|
|
1634
|
-
|
|
1634
|
+
u(o, (e) => {
|
|
1635
1635
|
e && n.loadFolders();
|
|
1636
1636
|
});
|
|
1637
|
-
let
|
|
1637
|
+
let y = N((e) => {
|
|
1638
1638
|
n.search(e);
|
|
1639
1639
|
}, 300);
|
|
1640
|
-
function
|
|
1641
|
-
s.value = e,
|
|
1640
|
+
function b(e) {
|
|
1641
|
+
s.value = e, y(e);
|
|
1642
1642
|
}
|
|
1643
|
-
let { copy:
|
|
1643
|
+
let { copy: x, copied: S } = F({
|
|
1644
1644
|
copiedDuring: 2e3,
|
|
1645
1645
|
legacy: !0
|
|
1646
1646
|
});
|
|
1647
|
-
async function
|
|
1647
|
+
async function C(e) {
|
|
1648
1648
|
await n.uploadFiles(e);
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function w(e) {
|
|
1651
1651
|
n.selectItem(e);
|
|
1652
1652
|
}
|
|
1653
|
-
async function
|
|
1653
|
+
async function T(e, t) {
|
|
1654
1654
|
await n.createFolder(e, t);
|
|
1655
1655
|
}
|
|
1656
|
-
async function
|
|
1656
|
+
async function E(e, t) {
|
|
1657
1657
|
await n.renameFolder(e, t);
|
|
1658
1658
|
}
|
|
1659
|
-
async function
|
|
1659
|
+
async function D(e) {
|
|
1660
1660
|
await n.deleteFolder(e);
|
|
1661
1661
|
}
|
|
1662
1662
|
function k(e) {
|
|
1663
|
-
|
|
1663
|
+
c.value = e;
|
|
1664
1664
|
}
|
|
1665
1665
|
async function A(e, t, r, i) {
|
|
1666
|
-
return i && !await n.replaceMediaDirectly(e, i.file) ? "failed" : await n.updateFile(e, t, r) ? (
|
|
1666
|
+
return i && !await n.replaceMediaDirectly(e, i.file) ? "failed" : await n.updateFile(e, t, r) ? (c.value = null, "saved") : i ? "replaced" : "failed";
|
|
1667
1667
|
}
|
|
1668
1668
|
async function j(e) {
|
|
1669
|
-
await n.importFromUrl(e) && (
|
|
1669
|
+
await n.importFromUrl(e) && (l.value = !1);
|
|
1670
1670
|
}
|
|
1671
1671
|
async function M(e) {
|
|
1672
1672
|
d.value = !1, await n.moveSelected(e);
|
|
@@ -1681,29 +1681,29 @@ function fn(e) {
|
|
|
1681
1681
|
await n.replaceFile(e);
|
|
1682
1682
|
}
|
|
1683
1683
|
function R() {
|
|
1684
|
-
n.clearSelection(), n.cancelDelete(), n.cancelReplace(), s.value = "", n.searchQuery.value = "", n.categoryFilter.value = null, n.sortOption.value = "newest", n.viewMode.value = "files",
|
|
1684
|
+
n.clearSelection(), n.cancelDelete(), n.cancelReplace(), s.value = "", n.searchQuery.value = "", n.categoryFilter.value = null, n.sortOption.value = "newest", n.viewMode.value = "files", c.value = null, l.value = !1;
|
|
1685
1685
|
}
|
|
1686
1686
|
return {
|
|
1687
1687
|
layoutMode: a,
|
|
1688
1688
|
showSidebar: o,
|
|
1689
1689
|
searchInput: s,
|
|
1690
|
-
editingItem:
|
|
1691
|
-
showImportUrlModal:
|
|
1690
|
+
editingItem: c,
|
|
1691
|
+
showImportUrlModal: l,
|
|
1692
1692
|
showMovePicker: d,
|
|
1693
1693
|
selectedUrl: f,
|
|
1694
1694
|
hasFrequentlyUsed: p,
|
|
1695
1695
|
displayItems: m,
|
|
1696
1696
|
hasUsedFiles: h,
|
|
1697
1697
|
folderTree: g,
|
|
1698
|
-
copy:
|
|
1699
|
-
copied:
|
|
1700
|
-
getCategoryLabel:
|
|
1701
|
-
handleSearchInput:
|
|
1702
|
-
handleUpload:
|
|
1703
|
-
handleSelect:
|
|
1704
|
-
handleCreateFolder:
|
|
1705
|
-
handleRenameFolder:
|
|
1706
|
-
handleDeleteFolder:
|
|
1698
|
+
copy: x,
|
|
1699
|
+
copied: S,
|
|
1700
|
+
getCategoryLabel: v,
|
|
1701
|
+
handleSearchInput: b,
|
|
1702
|
+
handleUpload: C,
|
|
1703
|
+
handleSelect: w,
|
|
1704
|
+
handleCreateFolder: T,
|
|
1705
|
+
handleRenameFolder: E,
|
|
1706
|
+
handleDeleteFolder: D,
|
|
1707
1707
|
handleEditItem: k,
|
|
1708
1708
|
handleEditSave: A,
|
|
1709
1709
|
handleImportFromUrl: j,
|
|
@@ -1716,112 +1716,112 @@ function fn(e) {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
//#endregion
|
|
1718
1718
|
//#region ../media-library/src/composable.ts
|
|
1719
|
-
function pn(
|
|
1720
|
-
let { provider:
|
|
1721
|
-
function j(
|
|
1719
|
+
function pn(t) {
|
|
1720
|
+
let { provider: n } = t, r = e([]), i = e([]), a = e(null), o = e("files"), s = e(""), c = e(null), l = e("newest"), u = e(!1), d = e(!1), f = e(!1), p = e(null), m = e(null), h = e(/* @__PURE__ */ new Set()), g = e(null), _ = e([]), v = e({}), y = e(!1), x = e([]), S = e(!1), C = e(null), w = e(!1), T = e(null), E = e(!1), D = e(null), O = e(null), k = e(null), A = 0;
|
|
1721
|
+
function j(e) {
|
|
1722
1722
|
try {
|
|
1723
|
-
|
|
1724
|
-
} catch (
|
|
1725
|
-
|
|
1723
|
+
e();
|
|
1724
|
+
} catch (e) {
|
|
1725
|
+
t.onError?.(e);
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
1728
|
function M() {
|
|
1729
|
-
return
|
|
1729
|
+
return n.folders === !1 ? null : n.folders;
|
|
1730
1730
|
}
|
|
1731
1731
|
function N() {
|
|
1732
|
-
return
|
|
1732
|
+
return b(t.templateId);
|
|
1733
1733
|
}
|
|
1734
1734
|
function P(e) {
|
|
1735
1735
|
let t = {};
|
|
1736
|
-
|
|
1736
|
+
s.value ? t.search = s.value : a.value != null && (t.folderId = a.value), c.value && (t.category = c.value), e && (t.cursor = e);
|
|
1737
1737
|
let n = N();
|
|
1738
1738
|
return n && (t.templateId = n), t;
|
|
1739
1739
|
}
|
|
1740
1740
|
async function F() {
|
|
1741
|
-
let
|
|
1741
|
+
let e = ++A;
|
|
1742
1742
|
u.value = !0;
|
|
1743
1743
|
let i = P();
|
|
1744
1744
|
try {
|
|
1745
|
-
let
|
|
1746
|
-
if (
|
|
1747
|
-
|
|
1748
|
-
} catch (
|
|
1749
|
-
if (
|
|
1750
|
-
|
|
1745
|
+
let t = await n.list(i);
|
|
1746
|
+
if (e !== A) return;
|
|
1747
|
+
r.value = t.items, p.value = t.nextCursor ?? null, f.value = !!t.nextCursor;
|
|
1748
|
+
} catch (n) {
|
|
1749
|
+
if (e !== A) return;
|
|
1750
|
+
t.onError?.(n);
|
|
1751
1751
|
} finally {
|
|
1752
|
-
|
|
1752
|
+
e === A && (u.value = !1);
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
1755
|
async function I() {
|
|
1756
1756
|
if (!f.value || !p.value || u.value) return;
|
|
1757
|
-
let
|
|
1757
|
+
let e = ++A;
|
|
1758
1758
|
u.value = !0;
|
|
1759
1759
|
let i = P(p.value);
|
|
1760
1760
|
try {
|
|
1761
|
-
let
|
|
1762
|
-
if (
|
|
1763
|
-
|
|
1764
|
-
} catch (
|
|
1765
|
-
if (
|
|
1766
|
-
|
|
1761
|
+
let t = await n.list(i);
|
|
1762
|
+
if (e !== A) return;
|
|
1763
|
+
r.value = [...r.value, ...t.items], p.value = t.nextCursor ?? null, f.value = !!t.nextCursor;
|
|
1764
|
+
} catch (n) {
|
|
1765
|
+
if (e !== A) return;
|
|
1766
|
+
t.onError?.(n);
|
|
1767
1767
|
} finally {
|
|
1768
|
-
|
|
1768
|
+
e === A && (u.value = !1);
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
async function L(e) {
|
|
1772
|
-
|
|
1772
|
+
s.value = e, await F();
|
|
1773
1773
|
}
|
|
1774
1774
|
async function R(e) {
|
|
1775
|
-
|
|
1775
|
+
c.value = e, await F();
|
|
1776
1776
|
}
|
|
1777
1777
|
async function z(e) {
|
|
1778
1778
|
l.value = e, await F();
|
|
1779
1779
|
}
|
|
1780
1780
|
async function B(e) {
|
|
1781
|
-
|
|
1781
|
+
o.value = "files", a.value = e, s.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
|
|
1782
1782
|
}
|
|
1783
1783
|
async function V() {
|
|
1784
|
-
|
|
1784
|
+
o.value = "frequently-used", a.value = null, s.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await ae();
|
|
1785
1785
|
}
|
|
1786
|
-
async function ee(
|
|
1787
|
-
let { create:
|
|
1788
|
-
if (typeof
|
|
1786
|
+
async function ee(e) {
|
|
1787
|
+
let { create: i } = n;
|
|
1788
|
+
if (typeof i != "function") return null;
|
|
1789
1789
|
d.value = !0;
|
|
1790
1790
|
try {
|
|
1791
|
-
let
|
|
1792
|
-
|
|
1791
|
+
let t = { file: e };
|
|
1792
|
+
a.value != null && (t.folderId = a.value);
|
|
1793
1793
|
let o = N();
|
|
1794
|
-
o && (
|
|
1795
|
-
let s = await
|
|
1796
|
-
return
|
|
1797
|
-
} catch (
|
|
1798
|
-
return
|
|
1794
|
+
o && (t.templateId = o);
|
|
1795
|
+
let s = await i(t);
|
|
1796
|
+
return r.value = [s, ...r.value], j(() => n.onCreated?.(s)), s;
|
|
1797
|
+
} catch (e) {
|
|
1798
|
+
return t.onError?.(e), null;
|
|
1799
1799
|
} finally {
|
|
1800
1800
|
d.value = !1;
|
|
1801
1801
|
}
|
|
1802
1802
|
}
|
|
1803
|
-
async function te(
|
|
1804
|
-
let { create:
|
|
1805
|
-
if (typeof
|
|
1803
|
+
async function te(e) {
|
|
1804
|
+
let { create: i } = n;
|
|
1805
|
+
if (typeof i == "function") {
|
|
1806
1806
|
d.value = !0, m.value = {
|
|
1807
1807
|
current: 0,
|
|
1808
|
-
total:
|
|
1808
|
+
total: e.length
|
|
1809
1809
|
};
|
|
1810
1810
|
try {
|
|
1811
|
-
for (let o = 0; o <
|
|
1811
|
+
for (let o = 0; o < e.length; o++) {
|
|
1812
1812
|
m.value = {
|
|
1813
1813
|
current: o + 1,
|
|
1814
|
-
total:
|
|
1814
|
+
total: e.length
|
|
1815
1815
|
};
|
|
1816
1816
|
try {
|
|
1817
|
-
let
|
|
1818
|
-
|
|
1817
|
+
let t = { file: e[o] };
|
|
1818
|
+
a.value != null && (t.folderId = a.value);
|
|
1819
1819
|
let s = N();
|
|
1820
|
-
s && (
|
|
1821
|
-
let c = await
|
|
1822
|
-
|
|
1823
|
-
} catch (
|
|
1824
|
-
|
|
1820
|
+
s && (t.templateId = s);
|
|
1821
|
+
let c = await i(t);
|
|
1822
|
+
r.value = [c, ...r.value], j(() => n.onCreated?.(c));
|
|
1823
|
+
} catch (e) {
|
|
1824
|
+
t.onError?.(e);
|
|
1825
1825
|
}
|
|
1826
1826
|
}
|
|
1827
1827
|
} finally {
|
|
@@ -1829,209 +1829,209 @@ function pn(e) {
|
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
|
-
async function
|
|
1832
|
+
async function ne(e) {
|
|
1833
1833
|
if (h.value.size === 0) return;
|
|
1834
|
-
let { move:
|
|
1835
|
-
if (typeof
|
|
1836
|
-
let
|
|
1837
|
-
if (
|
|
1838
|
-
let
|
|
1839
|
-
|
|
1840
|
-
} else
|
|
1834
|
+
let { move: n } = M() ?? { move: !1 };
|
|
1835
|
+
if (typeof n == "function") try {
|
|
1836
|
+
let t = await n([...h.value], e);
|
|
1837
|
+
if (a.value === null) {
|
|
1838
|
+
let e = new Map(t.map((e) => [e.id, e]));
|
|
1839
|
+
r.value = r.value.map((t) => e.get(t.id) ?? t);
|
|
1840
|
+
} else r.value = r.value.filter((e) => !h.value.has(e.id));
|
|
1841
1841
|
h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
1842
|
-
} catch (
|
|
1843
|
-
|
|
1842
|
+
} catch (e) {
|
|
1843
|
+
t.onError?.(e);
|
|
1844
1844
|
}
|
|
1845
1845
|
}
|
|
1846
|
-
async function
|
|
1847
|
-
let { update: o } =
|
|
1846
|
+
async function re(e, i, a) {
|
|
1847
|
+
let { update: o } = n;
|
|
1848
1848
|
if (typeof o != "function") return !1;
|
|
1849
1849
|
try {
|
|
1850
|
-
let
|
|
1851
|
-
a !== void 0 && (
|
|
1852
|
-
let s = await o(
|
|
1853
|
-
return
|
|
1854
|
-
} catch (
|
|
1855
|
-
return
|
|
1850
|
+
let t = { filename: i };
|
|
1851
|
+
a !== void 0 && (t.alt = a);
|
|
1852
|
+
let s = await o(e, t);
|
|
1853
|
+
return r.value = r.value.map((t) => t.id === e ? s : t), g.value?.id === e && (g.value = s), j(() => n.onUpdated?.(s)), !0;
|
|
1854
|
+
} catch (e) {
|
|
1855
|
+
return t.onError?.(e), !1;
|
|
1856
1856
|
}
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1858
|
+
function ie(e) {
|
|
1859
1859
|
let t = /* @__PURE__ */ new Map();
|
|
1860
|
-
for (let
|
|
1860
|
+
for (let n of r.value) e.includes(n.id) && t.set(n.id, n);
|
|
1861
1861
|
for (let n of _.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
|
|
1862
1862
|
return [...t.values()];
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1865
|
-
|
|
1864
|
+
function H(e) {
|
|
1865
|
+
r.value = r.value.filter((t) => !e.includes(t.id)), _.value = _.value.filter((t) => !e.includes(t.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
1866
1866
|
}
|
|
1867
|
-
async function
|
|
1867
|
+
async function U() {
|
|
1868
1868
|
if (h.value.size === 0) return;
|
|
1869
|
-
let { delete:
|
|
1870
|
-
if (typeof
|
|
1871
|
-
let r = [...h.value], i =
|
|
1869
|
+
let { delete: e } = n;
|
|
1870
|
+
if (typeof e != "function") return;
|
|
1871
|
+
let r = [...h.value], i = ie(r);
|
|
1872
1872
|
try {
|
|
1873
|
-
await
|
|
1874
|
-
for (let e of i) j(() =>
|
|
1875
|
-
} catch (
|
|
1876
|
-
|
|
1873
|
+
await e(r), H(r);
|
|
1874
|
+
for (let e of i) j(() => n.onDeleted?.(e));
|
|
1875
|
+
} catch (e) {
|
|
1876
|
+
t.onError?.(e);
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
1879
|
-
async function
|
|
1880
|
-
let { frequentlyUsed:
|
|
1881
|
-
if (typeof
|
|
1882
|
-
_.value = await
|
|
1883
|
-
} catch (
|
|
1884
|
-
|
|
1879
|
+
async function ae() {
|
|
1880
|
+
let { frequentlyUsed: e } = n;
|
|
1881
|
+
if (typeof e == "function") try {
|
|
1882
|
+
_.value = await e();
|
|
1883
|
+
} catch (e) {
|
|
1884
|
+
t.onError?.(e);
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
|
-
async function
|
|
1887
|
+
async function W() {
|
|
1888
1888
|
if (h.value.size === 0) return !1;
|
|
1889
|
-
|
|
1890
|
-
let { checkUsage:
|
|
1891
|
-
if (typeof
|
|
1889
|
+
x.value = [...h.value];
|
|
1890
|
+
let { checkUsage: e } = n;
|
|
1891
|
+
if (typeof e != "function") return v.value = {}, y.value = !0, !1;
|
|
1892
1892
|
try {
|
|
1893
|
-
let
|
|
1894
|
-
v.value =
|
|
1895
|
-
let
|
|
1896
|
-
return y.value = !0,
|
|
1897
|
-
} catch (
|
|
1898
|
-
return
|
|
1893
|
+
let t = await e(x.value);
|
|
1894
|
+
v.value = t;
|
|
1895
|
+
let n = Object.values(t).some((e) => e.templateCount > 0);
|
|
1896
|
+
return y.value = !0, n;
|
|
1897
|
+
} catch (e) {
|
|
1898
|
+
return t.onError?.(e), !1;
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
1901
|
async function oe() {
|
|
1902
|
-
let { delete:
|
|
1903
|
-
if (typeof
|
|
1904
|
-
let r =
|
|
1902
|
+
let { delete: e } = n;
|
|
1903
|
+
if (typeof e != "function" || (y.value = !1, x.value.length === 0)) return;
|
|
1904
|
+
let r = x.value, i = ie(r);
|
|
1905
1905
|
try {
|
|
1906
|
-
await
|
|
1907
|
-
for (let e of i) j(() =>
|
|
1908
|
-
} catch (
|
|
1909
|
-
|
|
1906
|
+
await e(r), H(r), x.value = [], v.value = {};
|
|
1907
|
+
for (let e of i) j(() => n.onDeleted?.(e));
|
|
1908
|
+
} catch (e) {
|
|
1909
|
+
t.onError?.(e);
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
1912
|
function G() {
|
|
1913
|
-
y.value = !1,
|
|
1913
|
+
y.value = !1, x.value = [], v.value = {};
|
|
1914
1914
|
}
|
|
1915
|
-
async function
|
|
1916
|
-
let
|
|
1917
|
-
if (typeof
|
|
1918
|
-
|
|
1915
|
+
async function K(e) {
|
|
1916
|
+
let i = n.importFromUrl;
|
|
1917
|
+
if (typeof i != "function") return null;
|
|
1918
|
+
S.value = !0, C.value = null;
|
|
1919
1919
|
try {
|
|
1920
|
-
let
|
|
1921
|
-
return
|
|
1922
|
-
} catch (
|
|
1923
|
-
return
|
|
1920
|
+
let t = await i(e, a.value, N());
|
|
1921
|
+
return r.value = [t, ...r.value], j(() => n.onCreated?.(t)), t;
|
|
1922
|
+
} catch (e) {
|
|
1923
|
+
return C.value = e instanceof Error ? e.message : "Import failed", t.onError?.(e), null;
|
|
1924
1924
|
} finally {
|
|
1925
|
-
|
|
1925
|
+
S.value = !1;
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
|
-
function
|
|
1928
|
+
function se(e) {
|
|
1929
1929
|
let t = new Set(h.value);
|
|
1930
1930
|
t.has(e) ? t.delete(e) : t.add(e), h.value = t;
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function ce() {
|
|
1933
1933
|
h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function le(e) {
|
|
1936
1936
|
g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
|
|
1937
1937
|
}
|
|
1938
1938
|
async function ue() {
|
|
1939
|
-
let { storage:
|
|
1940
|
-
if (typeof
|
|
1939
|
+
let { storage: e } = n;
|
|
1940
|
+
if (typeof e != "function") k.value = null;
|
|
1941
1941
|
else try {
|
|
1942
|
-
k.value = await
|
|
1943
|
-
} catch (
|
|
1944
|
-
|
|
1942
|
+
k.value = await e();
|
|
1943
|
+
} catch (e) {
|
|
1944
|
+
t.onError?.(e);
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
1947
|
async function q() {
|
|
1948
|
-
let
|
|
1949
|
-
if (
|
|
1950
|
-
|
|
1951
|
-
} catch (
|
|
1952
|
-
|
|
1948
|
+
let e = M();
|
|
1949
|
+
if (e) try {
|
|
1950
|
+
i.value = await e.list();
|
|
1951
|
+
} catch (e) {
|
|
1952
|
+
t.onError?.(e);
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
|
-
async function de(
|
|
1955
|
+
async function de(e, n) {
|
|
1956
1956
|
let { create: r } = M() ?? { create: !1 };
|
|
1957
1957
|
if (typeof r != "function") return null;
|
|
1958
1958
|
try {
|
|
1959
|
-
let
|
|
1960
|
-
n !== void 0 && (
|
|
1961
|
-
let i = await r(
|
|
1959
|
+
let t = { name: e };
|
|
1960
|
+
n !== void 0 && (t.parentId = n);
|
|
1961
|
+
let i = await r(t);
|
|
1962
1962
|
return await q(), i;
|
|
1963
|
-
} catch (
|
|
1964
|
-
return
|
|
1963
|
+
} catch (e) {
|
|
1964
|
+
return t.onError?.(e), null;
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
1967
1967
|
function J(e, t) {
|
|
1968
1968
|
for (let n of e) if (n.id === t) return n;
|
|
1969
1969
|
return null;
|
|
1970
1970
|
}
|
|
1971
|
-
async function fe(
|
|
1971
|
+
async function fe(e, n) {
|
|
1972
1972
|
let { update: r } = M() ?? { update: !1 };
|
|
1973
1973
|
if (typeof r == "function") try {
|
|
1974
|
-
await r(
|
|
1975
|
-
} catch (
|
|
1976
|
-
|
|
1974
|
+
await r(e, { name: n }), await q();
|
|
1975
|
+
} catch (e) {
|
|
1976
|
+
t.onError?.(e);
|
|
1977
1977
|
}
|
|
1978
1978
|
}
|
|
1979
|
-
async function Y(
|
|
1979
|
+
async function Y(e) {
|
|
1980
1980
|
let { delete: n } = M() ?? { delete: !1 };
|
|
1981
1981
|
if (typeof n == "function") try {
|
|
1982
|
-
let
|
|
1983
|
-
await n(
|
|
1984
|
-
} catch (
|
|
1985
|
-
|
|
1982
|
+
let t = J(i.value, e)?.parentId ?? null;
|
|
1983
|
+
await n(e), a.value === e && (a.value = t), await q(), await F();
|
|
1984
|
+
} catch (e) {
|
|
1985
|
+
t.onError?.(e);
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
|
-
async function X(
|
|
1989
|
-
|
|
1990
|
-
let { checkUsage: r } =
|
|
1991
|
-
if (typeof r != "function")
|
|
1988
|
+
async function X(e) {
|
|
1989
|
+
D.value = e, T.value = null;
|
|
1990
|
+
let { checkUsage: r } = n;
|
|
1991
|
+
if (typeof r != "function") O.value = null, E.value = !0;
|
|
1992
1992
|
else try {
|
|
1993
|
-
let
|
|
1994
|
-
|
|
1995
|
-
} catch (
|
|
1996
|
-
|
|
1993
|
+
let t = await r([e.id]);
|
|
1994
|
+
O.value = t[e.id] ?? null, E.value = !0;
|
|
1995
|
+
} catch (e) {
|
|
1996
|
+
t.onError?.(e);
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
1999
|
function pe() {
|
|
2000
|
-
|
|
2000
|
+
E.value = !1, D.value = null, O.value = null, T.value = null;
|
|
2001
2001
|
}
|
|
2002
2002
|
function Z(e) {
|
|
2003
|
-
|
|
2003
|
+
r.value = r.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), j(() => n.onUpdated?.(e));
|
|
2004
2004
|
}
|
|
2005
|
-
async function me(
|
|
2006
|
-
let { replace: r } =
|
|
2007
|
-
if (typeof r != "function" || !
|
|
2008
|
-
|
|
2005
|
+
async function me(e) {
|
|
2006
|
+
let { replace: r } = n;
|
|
2007
|
+
if (typeof r != "function" || !D.value) return null;
|
|
2008
|
+
w.value = !0, T.value = null;
|
|
2009
2009
|
try {
|
|
2010
|
-
let
|
|
2011
|
-
return Z(
|
|
2012
|
-
} catch (
|
|
2013
|
-
return
|
|
2010
|
+
let t = await r(D.value.id, e);
|
|
2011
|
+
return Z(t), E.value = !1, D.value = null, O.value = null, t;
|
|
2012
|
+
} catch (e) {
|
|
2013
|
+
return T.value = e instanceof Error ? e.message : "Replace failed", t.onError?.(e), null;
|
|
2014
2014
|
} finally {
|
|
2015
|
-
|
|
2015
|
+
w.value = !1;
|
|
2016
2016
|
}
|
|
2017
2017
|
}
|
|
2018
|
-
async function Q(
|
|
2019
|
-
let { replace: i } =
|
|
2018
|
+
async function Q(e, r) {
|
|
2019
|
+
let { replace: i } = n;
|
|
2020
2020
|
if (typeof i != "function") return null;
|
|
2021
2021
|
try {
|
|
2022
|
-
let
|
|
2023
|
-
return Z(
|
|
2024
|
-
} catch (
|
|
2025
|
-
return
|
|
2022
|
+
let t = await i(e, r);
|
|
2023
|
+
return Z(t), t;
|
|
2024
|
+
} catch (e) {
|
|
2025
|
+
return t.onError?.(e), null;
|
|
2026
2026
|
}
|
|
2027
2027
|
}
|
|
2028
2028
|
return {
|
|
2029
|
-
items:
|
|
2030
|
-
folders:
|
|
2031
|
-
currentFolderId:
|
|
2032
|
-
viewMode:
|
|
2033
|
-
searchQuery:
|
|
2034
|
-
categoryFilter:
|
|
2029
|
+
items: r,
|
|
2030
|
+
folders: i,
|
|
2031
|
+
currentFolderId: a,
|
|
2032
|
+
viewMode: o,
|
|
2033
|
+
searchQuery: s,
|
|
2034
|
+
categoryFilter: c,
|
|
2035
2035
|
sortOption: l,
|
|
2036
2036
|
isLoading: u,
|
|
2037
2037
|
isUploading: d,
|
|
@@ -2051,29 +2051,29 @@ function pn(e) {
|
|
|
2051
2051
|
showFrequentlyUsed: V,
|
|
2052
2052
|
uploadFile: ee,
|
|
2053
2053
|
uploadFiles: te,
|
|
2054
|
-
moveSelected:
|
|
2055
|
-
updateFile:
|
|
2056
|
-
deleteSelected:
|
|
2057
|
-
isImportingFromUrl:
|
|
2058
|
-
importFromUrlError:
|
|
2059
|
-
importFromUrl:
|
|
2060
|
-
toggleSelection:
|
|
2061
|
-
clearSelection:
|
|
2062
|
-
selectItem:
|
|
2054
|
+
moveSelected: ne,
|
|
2055
|
+
updateFile: re,
|
|
2056
|
+
deleteSelected: U,
|
|
2057
|
+
isImportingFromUrl: S,
|
|
2058
|
+
importFromUrlError: C,
|
|
2059
|
+
importFromUrl: K,
|
|
2060
|
+
toggleSelection: se,
|
|
2061
|
+
clearSelection: ce,
|
|
2062
|
+
selectItem: le,
|
|
2063
2063
|
loadFolders: q,
|
|
2064
2064
|
createFolder: de,
|
|
2065
2065
|
renameFolder: fe,
|
|
2066
2066
|
deleteFolder: Y,
|
|
2067
2067
|
findFolderInTree: J,
|
|
2068
|
-
loadFrequentlyUsed:
|
|
2069
|
-
checkUsageBeforeDelete:
|
|
2068
|
+
loadFrequentlyUsed: ae,
|
|
2069
|
+
checkUsageBeforeDelete: W,
|
|
2070
2070
|
confirmDelete: oe,
|
|
2071
2071
|
cancelDelete: G,
|
|
2072
|
-
isReplacing:
|
|
2073
|
-
replaceError:
|
|
2074
|
-
showReplaceWarning:
|
|
2075
|
-
pendingReplaceItem:
|
|
2076
|
-
replaceUsageInfo:
|
|
2072
|
+
isReplacing: w,
|
|
2073
|
+
replaceError: T,
|
|
2074
|
+
showReplaceWarning: E,
|
|
2075
|
+
pendingReplaceItem: D,
|
|
2076
|
+
replaceUsageInfo: O,
|
|
2077
2077
|
checkUsageBeforeReplace: X,
|
|
2078
2078
|
cancelReplace: pe,
|
|
2079
2079
|
replaceFile: me,
|
|
@@ -2159,7 +2159,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2159
2159
|
}, Jn = {
|
|
2160
2160
|
key: 1,
|
|
2161
2161
|
class: "tpl:relative"
|
|
2162
|
-
}, Yn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xn = ["data-testid", "disabled"], Zn = /* @__PURE__ */
|
|
2162
|
+
}, Yn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xn = ["data-testid", "disabled"], Zn = /* @__PURE__ */ t({
|
|
2163
2163
|
__name: "MediaLibraryChrome",
|
|
2164
2164
|
props: {
|
|
2165
2165
|
provider: {},
|
|
@@ -2176,110 +2176,110 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2176
2176
|
"confirm",
|
|
2177
2177
|
"ready"
|
|
2178
2178
|
],
|
|
2179
|
-
setup(
|
|
2180
|
-
let
|
|
2179
|
+
setup(e, { expose: t, emit: n }) {
|
|
2180
|
+
let a = e, s = n, d = c(() => import("./MediaEditModal-BuHCiyMu.js")), f = O(() => a.translations), h = O(() => a.confirmTestId ?? "media-confirm"), _ = {
|
|
2181
2181
|
get maxFileSize() {
|
|
2182
|
-
return
|
|
2182
|
+
return a.provider.maxFileSize;
|
|
2183
2183
|
},
|
|
2184
2184
|
get mimeTypes() {
|
|
2185
|
-
return
|
|
2185
|
+
return a.provider.mimeTypes;
|
|
2186
2186
|
},
|
|
2187
2187
|
get accept() {
|
|
2188
|
-
return
|
|
2188
|
+
return a.accept;
|
|
2189
2189
|
}
|
|
2190
2190
|
};
|
|
2191
|
-
|
|
2192
|
-
let { isAcceptedMimeType:
|
|
2193
|
-
provider:
|
|
2194
|
-
templateId: () =>
|
|
2195
|
-
onError: (e) =>
|
|
2191
|
+
r(de, _);
|
|
2192
|
+
let { isAcceptedMimeType: b, availableCategories: E } = Q(_), k = pn({
|
|
2193
|
+
provider: a.provider,
|
|
2194
|
+
templateId: () => a.templateId,
|
|
2195
|
+
onError: (e) => a.onError?.(e)
|
|
2196
2196
|
}), N = fn({
|
|
2197
|
-
library:
|
|
2198
|
-
translations:
|
|
2199
|
-
}), P =
|
|
2200
|
-
let e =
|
|
2197
|
+
library: k,
|
|
2198
|
+
translations: f
|
|
2199
|
+
}), P = O(() => typeof a.provider.create == "function"), F = O(() => a.provider.folders !== !1), I = O(() => typeof a.provider.importFromUrl == "function"), L = O(() => typeof a.provider.delete == "function"), R = O(() => typeof a.provider.update == "function"), z = O(() => typeof a.provider.replace == "function"), B = O(() => typeof a.provider.frequentlyUsed == "function"), V = O(() => {
|
|
2200
|
+
let e = a.provider.folders;
|
|
2201
2201
|
return e !== !1 && typeof e.move == "function";
|
|
2202
|
-
}),
|
|
2203
|
-
let e =
|
|
2202
|
+
}), ee = O(() => {
|
|
2203
|
+
let e = a.provider.folders;
|
|
2204
2204
|
return e !== !1 && typeof e.create == "function";
|
|
2205
|
-
}),
|
|
2206
|
-
let e =
|
|
2205
|
+
}), te = O(() => {
|
|
2206
|
+
let e = a.provider.folders;
|
|
2207
2207
|
return e !== !1 && typeof e.update == "function";
|
|
2208
|
-
}),
|
|
2209
|
-
let e =
|
|
2208
|
+
}), H = O(() => {
|
|
2209
|
+
let e = a.provider.folders;
|
|
2210
2210
|
return e !== !1 && typeof e.delete == "function";
|
|
2211
|
-
}),
|
|
2212
|
-
let e =
|
|
2213
|
-
return e ? !
|
|
2214
|
-
}),
|
|
2211
|
+
}), U = O(() => k.isLoading.value && N.displayItems.value.length === 0), W = O(() => {
|
|
2212
|
+
let e = k.previewItem.value;
|
|
2213
|
+
return e ? !a.accept?.length || b(e.mimeType ?? "", a.accept) : !1;
|
|
2214
|
+
}), G = O(() => {
|
|
2215
2215
|
if (!L.value) return 0;
|
|
2216
2216
|
let e = 0;
|
|
2217
|
-
for (let t of
|
|
2217
|
+
for (let t of k.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
|
|
2218
2218
|
return e;
|
|
2219
|
-
}),
|
|
2220
|
-
function
|
|
2221
|
-
return
|
|
2219
|
+
}), K = O(() => N.showImportUrlModal.value || N.editingItem.value !== null || k.showReplaceWarning.value);
|
|
2220
|
+
function ce() {
|
|
2221
|
+
return K.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : k.showDeleteWarning.value ? (k.cancelDelete(), !0) : !1;
|
|
2222
2222
|
}
|
|
2223
2223
|
function q() {
|
|
2224
|
-
|
|
2224
|
+
W.value && k.previewItem.value && s("confirm", k.previewItem.value);
|
|
2225
2225
|
}
|
|
2226
2226
|
function J(e) {
|
|
2227
|
-
|
|
2227
|
+
k.filterByCategory(e.target.value || null);
|
|
2228
2228
|
}
|
|
2229
2229
|
async function fe() {
|
|
2230
2230
|
let e = /* @__PURE__ */ new Set();
|
|
2231
|
-
for (let t of
|
|
2232
|
-
|
|
2231
|
+
for (let t of k.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
|
|
2232
|
+
k.selectedItems.value = e, await N.handleDeleteClick();
|
|
2233
2233
|
}
|
|
2234
|
-
return
|
|
2235
|
-
e?.length === 1 && (
|
|
2236
|
-
}, { immediate: !0 }),
|
|
2234
|
+
return u(() => a.accept, (e) => {
|
|
2235
|
+
e?.length === 1 && (k.categoryFilter.value = e[0]);
|
|
2236
|
+
}, { immediate: !0 }), k.loadItems(), k.loadFrequentlyUsed(), k.loadStorage(), s("ready"), x(() => {
|
|
2237
2237
|
N.resetUI();
|
|
2238
|
-
}),
|
|
2239
|
-
nestedDialogOpen:
|
|
2240
|
-
handleEscape:
|
|
2241
|
-
library:
|
|
2238
|
+
}), t({
|
|
2239
|
+
nestedDialogOpen: K,
|
|
2240
|
+
handleEscape: ce,
|
|
2241
|
+
library: k,
|
|
2242
2242
|
ui: N
|
|
2243
|
-
}), (
|
|
2244
|
-
|
|
2245
|
-
|
|
2243
|
+
}), (t, n) => (o(), p("div", mn, [
|
|
2244
|
+
w("div", hn, [w("h2", gn, g(f.value.mediaLibrary.title), 1), w("div", _n, [
|
|
2245
|
+
D(k).storageInfo.value ? (o(), y(un, {
|
|
2246
2246
|
key: 0,
|
|
2247
|
-
"used-bytes":
|
|
2248
|
-
"limit-bytes":
|
|
2247
|
+
"used-bytes": D(k).storageInfo.value.usedBytes,
|
|
2248
|
+
"limit-bytes": D(k).storageInfo.value.limitBytes,
|
|
2249
2249
|
size: 22
|
|
2250
|
-
}, null, 8, ["used-bytes", "limit-bytes"])) :
|
|
2251
|
-
|
|
2252
|
-
value:
|
|
2250
|
+
}, null, 8, ["used-bytes", "limit-bytes"])) : v("", !0),
|
|
2251
|
+
w("div", vn, [w("input", {
|
|
2252
|
+
value: D(N).searchInput.value,
|
|
2253
2253
|
type: "search",
|
|
2254
|
-
disabled:
|
|
2255
|
-
"aria-label":
|
|
2254
|
+
disabled: U.value,
|
|
2255
|
+
"aria-label": f.value.mediaLibrary.searchAriaLabel,
|
|
2256
2256
|
class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
2257
2257
|
style: {
|
|
2258
2258
|
"border-color": "var(--tpl-border)",
|
|
2259
2259
|
"background-color": "var(--tpl-bg)",
|
|
2260
2260
|
color: "var(--tpl-text)"
|
|
2261
2261
|
},
|
|
2262
|
-
placeholder:
|
|
2263
|
-
onInput:
|
|
2264
|
-
}, null, 40, yn),
|
|
2262
|
+
placeholder: f.value.mediaLibrary.searchPlaceholder,
|
|
2263
|
+
onInput: n[0] ||= (e) => D(N).handleSearchInput(e.target.value)
|
|
2264
|
+
}, null, 40, yn), M(D(re), {
|
|
2265
2265
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
2266
2266
|
size: 13,
|
|
2267
2267
|
"stroke-width": 2,
|
|
2268
2268
|
style: { color: "var(--tpl-text-dim)" }
|
|
2269
2269
|
})]),
|
|
2270
|
-
|
|
2270
|
+
e.showClose ? (o(), p("button", {
|
|
2271
2271
|
key: 1,
|
|
2272
2272
|
type: "button",
|
|
2273
|
-
"aria-label":
|
|
2273
|
+
"aria-label": f.value.mediaLibrary.close,
|
|
2274
2274
|
class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2275
2275
|
style: { color: "var(--tpl-text-muted)" },
|
|
2276
|
-
onClick:
|
|
2277
|
-
}, [
|
|
2276
|
+
onClick: n[1] ||= (e) => s("close")
|
|
2277
|
+
}, [M(D(se), {
|
|
2278
2278
|
size: 18,
|
|
2279
2279
|
"stroke-width": 2
|
|
2280
|
-
})], 8, bn)) :
|
|
2280
|
+
})], 8, bn)) : v("", !0)
|
|
2281
2281
|
])]),
|
|
2282
|
-
|
|
2282
|
+
w("div", xn, [M(T, {
|
|
2283
2283
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
2284
2284
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
2285
2285
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -2287,19 +2287,19 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2287
2287
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
2288
2288
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
2289
2289
|
}, {
|
|
2290
|
-
default:
|
|
2291
|
-
folders:
|
|
2292
|
-
"current-folder-id":
|
|
2293
|
-
"view-mode":
|
|
2294
|
-
"has-frequently-used": B.value &&
|
|
2295
|
-
"can-create-folder":
|
|
2296
|
-
"can-rename-folder":
|
|
2297
|
-
"can-delete-folder":
|
|
2298
|
-
onNavigate:
|
|
2299
|
-
onCreateFolder:
|
|
2300
|
-
onRenameFolder:
|
|
2301
|
-
onDeleteFolder:
|
|
2302
|
-
onShowFrequentlyUsed:
|
|
2290
|
+
default: l(() => [F.value && D(N).showSidebar.value ? (o(), p("div", Sn, [M(Pe, {
|
|
2291
|
+
folders: D(N).folderTree.value,
|
|
2292
|
+
"current-folder-id": D(k).currentFolderId.value,
|
|
2293
|
+
"view-mode": D(k).viewMode.value,
|
|
2294
|
+
"has-frequently-used": B.value && D(N).hasFrequentlyUsed.value,
|
|
2295
|
+
"can-create-folder": ee.value,
|
|
2296
|
+
"can-rename-folder": te.value,
|
|
2297
|
+
"can-delete-folder": H.value,
|
|
2298
|
+
onNavigate: D(k).navigateToFolder,
|
|
2299
|
+
onCreateFolder: D(N).handleCreateFolder,
|
|
2300
|
+
onRenameFolder: D(N).handleRenameFolder,
|
|
2301
|
+
onDeleteFolder: D(N).handleDeleteFolder,
|
|
2302
|
+
onShowFrequentlyUsed: D(k).showFrequentlyUsed
|
|
2303
2303
|
}, null, 8, [
|
|
2304
2304
|
"folders",
|
|
2305
2305
|
"current-folder-id",
|
|
@@ -2313,90 +2313,90 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2313
2313
|
"onRenameFolder",
|
|
2314
2314
|
"onDeleteFolder",
|
|
2315
2315
|
"onShowFrequentlyUsed"
|
|
2316
|
-
])])) :
|
|
2316
|
+
])])) : v("", !0)]),
|
|
2317
2317
|
_: 1
|
|
2318
|
-
}),
|
|
2319
|
-
F.value ? (o(),
|
|
2318
|
+
}), w("div", Cn, [w("div", wn, [w("div", Tn, [
|
|
2319
|
+
F.value ? (o(), p("button", {
|
|
2320
2320
|
key: 0,
|
|
2321
2321
|
type: "button",
|
|
2322
2322
|
"data-testid": "media-folder-toggle",
|
|
2323
2323
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2324
|
-
style:
|
|
2325
|
-
color:
|
|
2326
|
-
backgroundColor:
|
|
2327
|
-
border:
|
|
2324
|
+
style: j({
|
|
2325
|
+
color: D(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2326
|
+
backgroundColor: D(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
|
|
2327
|
+
border: D(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
|
|
2328
2328
|
}),
|
|
2329
|
-
title:
|
|
2330
|
-
"aria-label":
|
|
2331
|
-
"aria-pressed":
|
|
2332
|
-
onClick:
|
|
2333
|
-
}, [
|
|
2329
|
+
title: D(N).showSidebar.value ? f.value.mediaLibrary.hideFolders : f.value.mediaLibrary.showFolders,
|
|
2330
|
+
"aria-label": D(N).showSidebar.value ? f.value.mediaLibrary.hideFolders : f.value.mediaLibrary.showFolders,
|
|
2331
|
+
"aria-pressed": D(N).showSidebar.value,
|
|
2332
|
+
onClick: n[2] ||= (e) => D(N).showSidebar.value = !D(N).showSidebar.value
|
|
2333
|
+
}, [M(D(ne), {
|
|
2334
2334
|
size: 16,
|
|
2335
2335
|
"stroke-width": 2
|
|
2336
|
-
})], 12, En)) :
|
|
2337
|
-
|
|
2336
|
+
})], 12, En)) : v("", !0),
|
|
2337
|
+
D(k).viewMode.value === "frequently-used" ? (o(), p("span", Dn, g(f.value.mediaLibrary.frequentlyUsed), 1)) : (o(), y(be, {
|
|
2338
2338
|
key: 2,
|
|
2339
|
-
folders:
|
|
2340
|
-
"current-folder-id":
|
|
2341
|
-
onNavigate:
|
|
2339
|
+
folders: D(N).folderTree.value,
|
|
2340
|
+
"current-folder-id": D(k).currentFolderId.value,
|
|
2341
|
+
onNavigate: D(k).navigateToFolder
|
|
2342
2342
|
}, null, 8, [
|
|
2343
2343
|
"folders",
|
|
2344
2344
|
"current-folder-id",
|
|
2345
2345
|
"onNavigate"
|
|
2346
2346
|
])),
|
|
2347
|
-
|
|
2347
|
+
w("div", On, [w("button", {
|
|
2348
2348
|
type: "button",
|
|
2349
2349
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2350
|
-
style:
|
|
2351
|
-
color:
|
|
2352
|
-
backgroundColor:
|
|
2350
|
+
style: j({
|
|
2351
|
+
color: D(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2352
|
+
backgroundColor: D(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2353
2353
|
}),
|
|
2354
|
-
title:
|
|
2355
|
-
"aria-label":
|
|
2356
|
-
"aria-pressed":
|
|
2357
|
-
onClick:
|
|
2358
|
-
}, [
|
|
2354
|
+
title: f.value.mediaLibrary.viewGrid,
|
|
2355
|
+
"aria-label": f.value.mediaLibrary.viewGrid,
|
|
2356
|
+
"aria-pressed": D(N).layoutMode.value === "grid",
|
|
2357
|
+
onClick: n[3] ||= (e) => D(N).layoutMode.value = "grid"
|
|
2358
|
+
}, [M(D(le), {
|
|
2359
2359
|
size: 14,
|
|
2360
2360
|
"stroke-width": 2
|
|
2361
|
-
})], 12, kn),
|
|
2361
|
+
})], 12, kn), w("button", {
|
|
2362
2362
|
type: "button",
|
|
2363
2363
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2364
|
-
style:
|
|
2365
|
-
color:
|
|
2366
|
-
backgroundColor:
|
|
2364
|
+
style: j({
|
|
2365
|
+
color: D(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2366
|
+
backgroundColor: D(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2367
2367
|
}),
|
|
2368
|
-
title:
|
|
2369
|
-
"aria-label":
|
|
2370
|
-
"aria-pressed":
|
|
2371
|
-
onClick:
|
|
2372
|
-
}, [
|
|
2368
|
+
title: f.value.mediaLibrary.viewList,
|
|
2369
|
+
"aria-label": f.value.mediaLibrary.viewList,
|
|
2370
|
+
"aria-pressed": D(N).layoutMode.value === "list",
|
|
2371
|
+
onClick: n[4] ||= (e) => D(N).layoutMode.value = "list"
|
|
2372
|
+
}, [M(D(ae), {
|
|
2373
2373
|
size: 14,
|
|
2374
2374
|
"stroke-width": 2
|
|
2375
2375
|
})], 12, An)])
|
|
2376
|
-
]),
|
|
2376
|
+
]), w("div", jn, [D(E).length > 1 ? (o(), p("select", {
|
|
2377
2377
|
key: 0,
|
|
2378
|
-
"aria-label":
|
|
2378
|
+
"aria-label": f.value.mediaLibrary.filterAriaLabel,
|
|
2379
2379
|
class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
|
|
2380
2380
|
style: {
|
|
2381
2381
|
"border-color": "var(--tpl-border)",
|
|
2382
2382
|
"background-color": "var(--tpl-bg)",
|
|
2383
2383
|
color: "var(--tpl-text)"
|
|
2384
2384
|
},
|
|
2385
|
-
value:
|
|
2385
|
+
value: D(k).categoryFilter.value ?? "",
|
|
2386
2386
|
onChange: J
|
|
2387
|
-
}, [
|
|
2387
|
+
}, [w("option", Nn, g(f.value.mediaLibrary.filterAll), 1), (o(!0), p(A, null, i(D(E), (e) => (o(), p("option", {
|
|
2388
2388
|
key: e,
|
|
2389
2389
|
value: e
|
|
2390
|
-
},
|
|
2390
|
+
}, g(D(N).getCategoryLabel(e)), 9, Pn))), 128))], 40, Mn)) : v("", !0)])]), w("div", Fn, [D(k).viewMode.value === "files" && (P.value || I.value) ? (o(), p("div", In, [P.value ? (o(), y(rn, {
|
|
2391
2391
|
key: 0,
|
|
2392
|
-
"is-uploading":
|
|
2393
|
-
"upload-progress":
|
|
2394
|
-
onUpload:
|
|
2392
|
+
"is-uploading": D(k).isUploading.value,
|
|
2393
|
+
"upload-progress": D(k).uploadProgress.value,
|
|
2394
|
+
onUpload: D(N).handleUpload
|
|
2395
2395
|
}, null, 8, [
|
|
2396
2396
|
"is-uploading",
|
|
2397
2397
|
"upload-progress",
|
|
2398
2398
|
"onUpload"
|
|
2399
|
-
])) :
|
|
2399
|
+
])) : v("", !0), I.value ? (o(), p("button", {
|
|
2400
2400
|
key: 1,
|
|
2401
2401
|
"data-testid": "media-import-url",
|
|
2402
2402
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
@@ -2405,25 +2405,25 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2405
2405
|
color: "var(--tpl-text-muted)",
|
|
2406
2406
|
"background-color": "var(--tpl-bg)"
|
|
2407
2407
|
},
|
|
2408
|
-
onClick:
|
|
2409
|
-
}, [
|
|
2408
|
+
onClick: n[5] ||= (e) => D(N).showImportUrlModal.value = !0
|
|
2409
|
+
}, [M(D(oe), {
|
|
2410
2410
|
size: 14,
|
|
2411
2411
|
"stroke-width": 2
|
|
2412
|
-
}),
|
|
2413
|
-
items:
|
|
2414
|
-
"selected-ids":
|
|
2415
|
-
"is-loading":
|
|
2416
|
-
"has-more":
|
|
2417
|
-
accept:
|
|
2418
|
-
layout:
|
|
2419
|
-
"search-query":
|
|
2412
|
+
}), m(" " + g(f.value.mediaLibrary.importFromUrl), 1)])) : v("", !0)])) : v("", !0), M(ft, {
|
|
2413
|
+
items: D(N).displayItems.value,
|
|
2414
|
+
"selected-ids": D(k).selectedItems.value,
|
|
2415
|
+
"is-loading": D(k).isLoading.value,
|
|
2416
|
+
"has-more": D(k).viewMode.value === "files" && D(k).hasMore.value,
|
|
2417
|
+
accept: e.accept,
|
|
2418
|
+
layout: D(N).layoutMode.value,
|
|
2419
|
+
"search-query": D(k).searchQuery.value,
|
|
2420
2420
|
"can-update": R.value,
|
|
2421
2421
|
"can-replace": z.value,
|
|
2422
|
-
onSelect:
|
|
2423
|
-
onToggle:
|
|
2424
|
-
onLoadMore:
|
|
2425
|
-
onEdit:
|
|
2426
|
-
onReplace:
|
|
2422
|
+
onSelect: D(N).handleSelect,
|
|
2423
|
+
onToggle: D(k).toggleSelection,
|
|
2424
|
+
onLoadMore: D(k).loadMore,
|
|
2425
|
+
onEdit: D(N).handleEditItem,
|
|
2426
|
+
onReplace: D(N).handleReplaceItem,
|
|
2427
2427
|
onConfirm: q
|
|
2428
2428
|
}, null, 8, [
|
|
2429
2429
|
"items",
|
|
@@ -2441,38 +2441,38 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2441
2441
|
"onEdit",
|
|
2442
2442
|
"onReplace"
|
|
2443
2443
|
])])])]),
|
|
2444
|
-
|
|
2445
|
-
visible:
|
|
2446
|
-
"is-importing":
|
|
2447
|
-
error:
|
|
2448
|
-
onImport:
|
|
2449
|
-
onClose:
|
|
2444
|
+
M(Ct, {
|
|
2445
|
+
visible: D(N).showImportUrlModal.value,
|
|
2446
|
+
"is-importing": D(k).isImportingFromUrl.value,
|
|
2447
|
+
error: D(k).importFromUrlError.value,
|
|
2448
|
+
onImport: D(N).handleImportFromUrl,
|
|
2449
|
+
onClose: n[6] ||= (e) => D(N).showImportUrlModal.value = !1
|
|
2450
2450
|
}, null, 8, [
|
|
2451
2451
|
"visible",
|
|
2452
2452
|
"is-importing",
|
|
2453
2453
|
"error",
|
|
2454
2454
|
"onImport"
|
|
2455
2455
|
]),
|
|
2456
|
-
|
|
2456
|
+
D(N).editingItem.value ? (o(), y(D(d), {
|
|
2457
2457
|
key: 0,
|
|
2458
2458
|
visible: !0,
|
|
2459
|
-
item:
|
|
2460
|
-
save:
|
|
2461
|
-
"can-crop": z.value &&
|
|
2462
|
-
onClose:
|
|
2459
|
+
item: D(N).editingItem.value,
|
|
2460
|
+
save: D(N).handleEditSave,
|
|
2461
|
+
"can-crop": z.value && D(N).editingItem.value.canUpdate !== !1,
|
|
2462
|
+
onClose: n[7] ||= (e) => D(N).editingItem.value = null
|
|
2463
2463
|
}, null, 8, [
|
|
2464
2464
|
"item",
|
|
2465
2465
|
"save",
|
|
2466
2466
|
"can-crop"
|
|
2467
|
-
])) :
|
|
2468
|
-
|
|
2469
|
-
visible:
|
|
2470
|
-
item:
|
|
2471
|
-
"usage-info":
|
|
2472
|
-
"is-replacing":
|
|
2473
|
-
error:
|
|
2474
|
-
onReplace:
|
|
2475
|
-
onClose:
|
|
2467
|
+
])) : v("", !0),
|
|
2468
|
+
M(Yt, {
|
|
2469
|
+
visible: D(k).showReplaceWarning.value,
|
|
2470
|
+
item: D(k).pendingReplaceItem.value,
|
|
2471
|
+
"usage-info": D(k).replaceUsageInfo.value,
|
|
2472
|
+
"is-replacing": D(k).isReplacing.value,
|
|
2473
|
+
error: D(k).replaceError.value,
|
|
2474
|
+
onReplace: D(N).handleReplaceFile,
|
|
2475
|
+
onClose: D(k).cancelReplace
|
|
2476
2476
|
}, null, 8, [
|
|
2477
2477
|
"visible",
|
|
2478
2478
|
"item",
|
|
@@ -2482,7 +2482,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2482
2482
|
"onReplace",
|
|
2483
2483
|
"onClose"
|
|
2484
2484
|
]),
|
|
2485
|
-
|
|
2485
|
+
M(T, {
|
|
2486
2486
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
2487
2487
|
"enter-from-class": "tpl:opacity-0",
|
|
2488
2488
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2490,7 +2490,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2490
2490
|
"leave-from-class": "tpl:opacity-100",
|
|
2491
2491
|
"leave-to-class": "tpl:opacity-0"
|
|
2492
2492
|
}, {
|
|
2493
|
-
default:
|
|
2493
|
+
default: l(() => [D(k).showDeleteWarning.value ? (o(), p("div", {
|
|
2494
2494
|
key: 0,
|
|
2495
2495
|
role: "dialog",
|
|
2496
2496
|
"aria-modal": "true",
|
|
@@ -2501,79 +2501,79 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2501
2501
|
"backdrop-filter": "blur(8px)",
|
|
2502
2502
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2503
2503
|
},
|
|
2504
|
-
onClick:
|
|
2505
|
-
}, [
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
class:
|
|
2504
|
+
onClick: n[10] ||= S((...e) => D(k).cancelDelete && D(k).cancelDelete(...e), ["self"])
|
|
2505
|
+
}, [w("div", Ln, [
|
|
2506
|
+
w("h3", Rn, g(f.value.mediaLibrary.deleteWarningTitle), 1),
|
|
2507
|
+
w("p", {
|
|
2508
|
+
class: C(["tpl:text-xs", D(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
2509
2509
|
style: { color: "var(--tpl-text-muted)" }
|
|
2510
|
-
},
|
|
2511
|
-
|
|
2512
|
-
|
|
2510
|
+
}, g(f.value.mediaLibrary.deleteWarningMessage), 3),
|
|
2511
|
+
D(N).hasUsedFiles.value ? (o(), p("p", zn, g(f.value.mediaLibrary.deleteWarningUsageNote), 1)) : v("", !0),
|
|
2512
|
+
D(N).hasUsedFiles.value ? (o(), p("div", Bn, [(o(!0), p(A, null, i(D(k).deleteUsageInfo.value, (e, t) => (o(), p("div", {
|
|
2513
2513
|
key: t,
|
|
2514
2514
|
class: "tpl:text-xs",
|
|
2515
2515
|
style: { color: "var(--tpl-text)" }
|
|
2516
|
-
}, [e.templateCount > 0 ? (o(),
|
|
2517
|
-
|
|
2516
|
+
}, [e.templateCount > 0 ? (o(), p(A, { key: 0 }, [w("span", Vn, g(D(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", Hn, " - " + g(f.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : v("", !0)]))), 128))])) : v("", !0),
|
|
2517
|
+
w("div", Un, [w("button", {
|
|
2518
2518
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2519
2519
|
style: {
|
|
2520
2520
|
"border-color": "var(--tpl-border)",
|
|
2521
2521
|
color: "var(--tpl-text)",
|
|
2522
2522
|
"background-color": "var(--tpl-bg)"
|
|
2523
2523
|
},
|
|
2524
|
-
onClick:
|
|
2525
|
-
},
|
|
2524
|
+
onClick: n[8] ||= (...e) => D(k).cancelDelete && D(k).cancelDelete(...e)
|
|
2525
|
+
}, g(f.value.mediaLibrary.cancel), 1), w("button", {
|
|
2526
2526
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2527
2527
|
style: {
|
|
2528
2528
|
"border-color": "var(--tpl-danger)",
|
|
2529
2529
|
color: "var(--tpl-danger)",
|
|
2530
2530
|
"background-color": "var(--tpl-bg)"
|
|
2531
2531
|
},
|
|
2532
|
-
onClick:
|
|
2533
|
-
},
|
|
2534
|
-
])])) :
|
|
2532
|
+
onClick: n[9] ||= (...e) => D(k).confirmDelete && D(k).confirmDelete(...e)
|
|
2533
|
+
}, g(D(N).hasUsedFiles.value ? f.value.mediaLibrary.deleteAnyway : f.value.mediaLibrary.confirmDelete), 1)])
|
|
2534
|
+
])])) : v("", !0)]),
|
|
2535
2535
|
_: 1
|
|
2536
2536
|
}),
|
|
2537
|
-
|
|
2537
|
+
w("div", Wn, [w("div", Gn, [D(k).previewItem.value ? (o(), y(Ft, {
|
|
2538
2538
|
key: 0,
|
|
2539
|
-
item:
|
|
2540
|
-
folders:
|
|
2541
|
-
}, null, 8, ["item", "folders"])) :
|
|
2539
|
+
item: D(k).previewItem.value,
|
|
2540
|
+
folders: D(N).folderTree.value
|
|
2541
|
+
}, null, 8, ["item", "folders"])) : v("", !0)]), w("div", Kn, [D(k).selectedItems.value.size > 0 ? (o(), p("div", qn, [D(k).previewItem.value ? (o(), p("button", {
|
|
2542
2542
|
key: 0,
|
|
2543
2543
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2544
|
-
style:
|
|
2545
|
-
borderColor:
|
|
2546
|
-
color:
|
|
2544
|
+
style: j({
|
|
2545
|
+
borderColor: D(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
|
|
2546
|
+
color: D(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
|
|
2547
2547
|
backgroundColor: "var(--tpl-bg)"
|
|
2548
2548
|
}),
|
|
2549
|
-
onClick:
|
|
2550
|
-
}, [
|
|
2549
|
+
onClick: n[11] ||= (e) => D(N).copy(D(N).selectedUrl.value)
|
|
2550
|
+
}, [D(N).copied.value ? (o(), y(D(ue), {
|
|
2551
2551
|
key: 1,
|
|
2552
2552
|
size: 12,
|
|
2553
2553
|
"stroke-width": 2
|
|
2554
|
-
})) : (o(),
|
|
2554
|
+
})) : (o(), y(D(ie), {
|
|
2555
2555
|
key: 0,
|
|
2556
2556
|
size: 12,
|
|
2557
2557
|
"stroke-width": 2
|
|
2558
|
-
})),
|
|
2558
|
+
})), m(" " + g(D(N).copied.value ? f.value.mediaLibrary.copied : f.value.mediaLibrary.copyUrl), 1)], 4)) : v("", !0), V.value ? (o(), p("div", Jn, [w("button", {
|
|
2559
2559
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2560
2560
|
style: {
|
|
2561
2561
|
"border-color": "var(--tpl-border)",
|
|
2562
2562
|
color: "var(--tpl-text)",
|
|
2563
2563
|
"background-color": "var(--tpl-bg)"
|
|
2564
2564
|
},
|
|
2565
|
-
onClick:
|
|
2566
|
-
},
|
|
2565
|
+
onClick: n[12] ||= (e) => D(N).showMovePicker.value = !D(N).showMovePicker.value
|
|
2566
|
+
}, g(f.value.mediaLibrary.moveSelected), 1), D(N).showMovePicker.value ? (o(), y(Ot, {
|
|
2567
2567
|
key: 0,
|
|
2568
|
-
folders:
|
|
2569
|
-
"current-folder-id":
|
|
2570
|
-
onSelect:
|
|
2571
|
-
onClose:
|
|
2568
|
+
folders: D(N).folderTree.value,
|
|
2569
|
+
"current-folder-id": D(k).currentFolderId.value,
|
|
2570
|
+
onSelect: D(N).handleMoveToFolder,
|
|
2571
|
+
onClose: n[13] ||= (e) => D(N).showMovePicker.value = !1
|
|
2572
2572
|
}, null, 8, [
|
|
2573
2573
|
"folders",
|
|
2574
2574
|
"current-folder-id",
|
|
2575
2575
|
"onSelect"
|
|
2576
|
-
])) :
|
|
2576
|
+
])) : v("", !0)])) : v("", !0)])) : v("", !0), w("div", Yn, [G.value > 0 ? (o(), p("button", {
|
|
2577
2577
|
key: 0,
|
|
2578
2578
|
"data-testid": "media-delete",
|
|
2579
2579
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
@@ -2583,23 +2583,23 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2583
2583
|
"background-color": "var(--tpl-bg)"
|
|
2584
2584
|
},
|
|
2585
2585
|
onClick: fe
|
|
2586
|
-
},
|
|
2586
|
+
}, g(f.value.mediaLibrary.deleteSelected), 1)) : v("", !0), e.showConfirm ? (o(), p("button", {
|
|
2587
2587
|
key: 1,
|
|
2588
|
-
"data-testid":
|
|
2588
|
+
"data-testid": h.value,
|
|
2589
2589
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
2590
2590
|
style: {
|
|
2591
2591
|
"background-color": "var(--tpl-primary)",
|
|
2592
2592
|
color: "var(--tpl-on-primary)"
|
|
2593
2593
|
},
|
|
2594
|
-
disabled: !
|
|
2594
|
+
disabled: !W.value,
|
|
2595
2595
|
onClick: q
|
|
2596
|
-
},
|
|
2596
|
+
}, g(e.accept?.length ? f.value.mediaLibrary.selectImage : f.value.mediaLibrary.selectFile), 9, Xn)) : v("", !0)])])])
|
|
2597
2597
|
]));
|
|
2598
2598
|
}
|
|
2599
2599
|
}), Qn = /* #__PURE__ */ Object.assign({
|
|
2600
2600
|
"./locales/ca.ts": () => import("./ca-CYQH3J0b.js"),
|
|
2601
2601
|
"./locales/de.ts": () => import("./de-JvCTMJPy.js"),
|
|
2602
|
-
"./locales/en.ts": () => import("./en-
|
|
2602
|
+
"./locales/en.ts": () => import("./en-ifvu6oPv.js"),
|
|
2603
2603
|
"./locales/es.ts": () => import("./es-CAv-Vldw.js"),
|
|
2604
2604
|
"./locales/fr.ts": () => import("./fr-DVPtxpR6.js"),
|
|
2605
2605
|
"./locales/ja.ts": () => import("./ja-dcWzjStz.js"),
|
|
@@ -2629,7 +2629,7 @@ async function ar(e) {
|
|
|
2629
2629
|
}
|
|
2630
2630
|
//#endregion
|
|
2631
2631
|
//#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
|
|
2632
|
-
var or = ["data-tpl-theme"], sr = /* @__PURE__ */
|
|
2632
|
+
var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
|
|
2633
2633
|
__name: "MediaLibraryModal",
|
|
2634
2634
|
props: {
|
|
2635
2635
|
visible: { type: Boolean },
|
|
@@ -2642,25 +2642,25 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ l({
|
|
|
2642
2642
|
onError: { type: Function }
|
|
2643
2643
|
},
|
|
2644
2644
|
emits: ["close", "select"],
|
|
2645
|
-
setup(
|
|
2646
|
-
let
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
}, { immediate: !0 }),
|
|
2650
|
-
let
|
|
2651
|
-
|
|
2652
|
-
let d =
|
|
2653
|
-
|
|
2654
|
-
let f =
|
|
2655
|
-
ge(f,
|
|
2656
|
-
function
|
|
2645
|
+
setup(t, { emit: n }) {
|
|
2646
|
+
let i = t, a = n, s = e(null);
|
|
2647
|
+
u(() => i.locale, async (e) => {
|
|
2648
|
+
s.value = await ar(e ?? "en");
|
|
2649
|
+
}, { immediate: !0 }), r(fe, s);
|
|
2650
|
+
let c = O(() => i.uiTheme);
|
|
2651
|
+
r(Y, c);
|
|
2652
|
+
let d = k(() => i.popoverTarget ?? null);
|
|
2653
|
+
r(J, d), r(X, k(() => i.locale));
|
|
2654
|
+
let f = e(null), m = e(null);
|
|
2655
|
+
ge(f, O(() => i.visible && s.value !== null && !m.value?.nestedDialogOpen));
|
|
2656
|
+
function h(e) {
|
|
2657
2657
|
e.key === "Escape" && (m.value?.handleEscape() ? e.preventDefault() : a("close"));
|
|
2658
2658
|
}
|
|
2659
|
-
P(document, "keydown",
|
|
2660
|
-
function
|
|
2659
|
+
P(document, "keydown", h);
|
|
2660
|
+
function g(e) {
|
|
2661
2661
|
a("select", e), a("close");
|
|
2662
2662
|
}
|
|
2663
|
-
return (
|
|
2663
|
+
return (e, n) => (o(), y(_, { to: t.popoverTarget || "body" }, [M(T, {
|
|
2664
2664
|
"enter-active-class": "tpl:transition tpl:duration-200",
|
|
2665
2665
|
"enter-from-class": "tpl:opacity-0",
|
|
2666
2666
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2668,18 +2668,18 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ l({
|
|
|
2668
2668
|
"leave-from-class": "tpl:opacity-100",
|
|
2669
2669
|
"leave-to-class": "tpl:opacity-0"
|
|
2670
2670
|
}, {
|
|
2671
|
-
default:
|
|
2671
|
+
default: l(() => [t.visible && s.value ? (o(), p("div", {
|
|
2672
2672
|
key: 0,
|
|
2673
2673
|
"data-testid": "media-library-modal",
|
|
2674
|
-
"data-tpl-theme":
|
|
2675
|
-
class:
|
|
2674
|
+
"data-tpl-theme": c.value,
|
|
2675
|
+
class: C([t.popoverTarget ? void 0 : "tpl", "tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
2676
2676
|
style: {
|
|
2677
2677
|
"background-color": "var(--tpl-overlay)",
|
|
2678
2678
|
"backdrop-filter": "blur(8px)",
|
|
2679
2679
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2680
2680
|
},
|
|
2681
|
-
onClick: n[1] ||=
|
|
2682
|
-
}, [
|
|
2681
|
+
onClick: n[1] ||= S((e) => a("close"), ["self"])
|
|
2682
|
+
}, [w("div", {
|
|
2683
2683
|
ref_key: "dialogRef",
|
|
2684
2684
|
ref: f,
|
|
2685
2685
|
role: "dialog",
|
|
@@ -2696,26 +2696,26 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ l({
|
|
|
2696
2696
|
border: "1px solid var(--tpl-border)",
|
|
2697
2697
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
2698
2698
|
}
|
|
2699
|
-
}, [
|
|
2699
|
+
}, [M(Zn, {
|
|
2700
2700
|
ref_key: "chromeRef",
|
|
2701
2701
|
ref: m,
|
|
2702
|
-
provider:
|
|
2703
|
-
accept:
|
|
2704
|
-
"template-id":
|
|
2705
|
-
"on-error":
|
|
2706
|
-
translations:
|
|
2702
|
+
provider: t.provider,
|
|
2703
|
+
accept: t.accept,
|
|
2704
|
+
"template-id": t.templateId,
|
|
2705
|
+
"on-error": t.onError,
|
|
2706
|
+
translations: s.value,
|
|
2707
2707
|
"show-close": "",
|
|
2708
2708
|
"show-confirm": "",
|
|
2709
2709
|
"confirm-test-id": "media-confirm",
|
|
2710
2710
|
onClose: n[0] ||= (e) => a("close"),
|
|
2711
|
-
onConfirm:
|
|
2711
|
+
onConfirm: g
|
|
2712
2712
|
}, null, 8, [
|
|
2713
2713
|
"provider",
|
|
2714
2714
|
"accept",
|
|
2715
2715
|
"template-id",
|
|
2716
2716
|
"on-error",
|
|
2717
2717
|
"translations"
|
|
2718
|
-
])], 512)], 10, or)) :
|
|
2718
|
+
])], 512)], 10, or)) : v("", !0)]),
|
|
2719
2719
|
_: 1
|
|
2720
2720
|
})], 8, ["to"]));
|
|
2721
2721
|
}
|
|
@@ -2723,4 +2723,4 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ l({
|
|
|
2723
2723
|
//#endregion
|
|
2724
2724
|
export { sr as MediaLibraryModal, J as a, pe as i, Q as n, Y as o, Z as r, ge as t };
|
|
2725
2725
|
|
|
2726
|
-
//# sourceMappingURL=editor-modal-
|
|
2726
|
+
//# sourceMappingURL=editor-modal-CI6EfeMd.js.map
|