@fde-desktop/fde-core 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccordionChevron-CJXAq5o5.js +26 -0
- package/dist/AccordionChevron-DBXp38Lm.cjs +1 -0
- package/dist/ActionIcon-C_SfdBfx.cjs +1 -0
- package/dist/ActionIcon-CtVbYlGY.js +145 -0
- package/dist/AppEmptyState-BTujnL_b.js +4962 -0
- package/dist/AppEmptyState-Dc4GaDfu.cjs +1 -0
- package/dist/AppIcon--qzR4sgf.cjs +1 -0
- package/dist/AppIcon-DCDuaU-t.js +80 -0
- package/dist/AppMenuBar-BiHbNg9V.cjs +9 -0
- package/dist/AppMenuBar-CHJy8OF0.js +2639 -0
- package/dist/Box-DRm8EabO.js +1593 -0
- package/dist/Box-D_64wv6n.cjs +1 -0
- package/dist/Button-D0FXpkur.cjs +1 -0
- package/dist/Button-k7SxX1Xl.js +178 -0
- package/dist/CalendarApp-C1HvuJoa.cjs +1 -0
- package/dist/CalendarApp-DBEQqsS_.js +1721 -0
- package/dist/Center-CyryG5zn.js +25 -0
- package/dist/Center-T4No_FAa.cjs +1 -0
- package/dist/CheckIcon-C3WjIR2i.js +25 -0
- package/dist/CheckIcon-CBMLR6Gc.cjs +1 -0
- package/dist/CodeServerApp-B3l5QPuG.cjs +1 -0
- package/dist/CodeServerApp-BpeALSaX.js +2 -0
- package/dist/CodeServerApp-CRjCngFv.cjs +1 -0
- package/dist/CodeServerApp-DY94cy1a.js +149 -0
- package/dist/ColorPicker-BL4UbKCV.cjs +1 -0
- package/dist/ColorPicker-DvRR-wlQ.js +997 -0
- package/dist/Colors-BxX4G8kX.cjs +1 -0
- package/dist/Colors-hca6raEG.js +15 -0
- package/dist/CreateItemApp-BU9wmjKM.cjs +1 -0
- package/dist/CreateItemApp-CtdH1K1g.js +400 -0
- package/dist/CreateItemApp-t9F-a6wD.cjs +1 -0
- package/dist/DeviceInfoApp-C306YvtZ.js +223 -0
- package/dist/DeviceInfoApp-Cdju_LIB.cjs +1 -0
- package/dist/DeviceInfoApp-CyB01v4D.cjs +1 -0
- package/dist/DownloadProgress-IRw1dzLX.cjs +1 -0
- package/dist/DownloadProgress-hdupSUBT.js +174 -0
- package/dist/FileIcon-BCpGMI5U.js +88 -0
- package/dist/FileIcon-BCrsxmtt.cjs +1 -0
- package/dist/FilePickerApp-DMGuvahM.js +409 -0
- package/dist/FilePickerApp-Eu0cr2Cm.cjs +1 -0
- package/dist/FilesApp-30OjnOuP.cjs +1 -0
- package/dist/FilesApp-BvlzPNuO.cjs +1 -0
- package/dist/FilesApp-VXrmtt63.js +225 -0
- package/dist/Group-BzwlMeob.js +48 -0
- package/dist/Group-DhwePB84.cjs +1 -0
- package/dist/ImageViewerApp-BOz59TGc.cjs +1 -0
- package/dist/ImageViewerApp-BeqY6voE.cjs +1 -0
- package/dist/ImageViewerApp-CWiP6zx-.js +68 -0
- package/dist/ImageViewerApp-DBAfJPSo.js +2 -0
- package/dist/ImageViewerMenuBar-BULkh_Ku.js +86 -0
- package/dist/ImageViewerMenuBar-Cb0Nr5-M.js +2 -0
- package/dist/ImageViewerMenuBar-CoEp0RxK.cjs +1 -0
- package/dist/ImageViewerMenuBar-zOkJtqKo.cjs +1 -0
- package/dist/MenuEditApp-BoKtj2GH.js +2 -0
- package/dist/MenuEditApp-D21sEp86.js +2615 -0
- package/dist/MenuEditApp-k3cPfTG9.cjs +1 -0
- package/dist/MenuEditApp-sz9GlLVH.cjs +5 -0
- package/dist/MenuEditMenuBar-6QxlIDpl.cjs +1 -0
- package/dist/MenuEditMenuBar-B94z4Umw.js +59 -0
- package/dist/MenuEditMenuBar-Bv6R42lf.js +2 -0
- package/dist/MenuEditMenuBar-CBsmH_-T.cjs +1 -0
- package/dist/NotesApp-BtR55Hva.cjs +207 -0
- package/dist/NotesApp-C59exz_9.js +16154 -0
- package/dist/NotesApp-D47I5LS_.js +2 -0
- package/dist/NotesApp-lOwsi2sg.cjs +1 -0
- package/dist/NotesMenuBar-BB4NkKGf.js +61 -0
- package/dist/NotesMenuBar-BZITC74y.cjs +1 -0
- package/dist/NotesMenuBar-Bp0sPqyR.cjs +1 -0
- package/dist/NotesMenuBar-xlfODmMA.js +2 -0
- package/dist/Paper-DtUYKmYn.js +30 -0
- package/dist/Paper-DwCpwWwH.cjs +1 -0
- package/dist/PdfApp-1XbFGfoY.cjs +1 -0
- package/dist/PdfApp-BhIoJWeK.cjs +1 -0
- package/dist/PdfApp-C5Rt1Zaw.js +2 -0
- package/dist/PdfApp-C8Hwxxqh.js +38 -0
- package/dist/PdfMenuBar-BA9rKuMP.cjs +1 -0
- package/dist/PdfMenuBar-JXHqwxhZ.cjs +1 -0
- package/dist/PdfMenuBar-R0fu7oYF.js +2 -0
- package/dist/PdfMenuBar-sd-9Vk3h.js +38 -0
- package/dist/SettingsApp-BA-5B4RA.cjs +1 -0
- package/dist/SettingsApp-B_rev1xh.cjs +1 -0
- package/dist/SettingsApp-Ck4aUXs5.js +2 -0
- package/dist/SettingsApp-DUMKSA3K.js +2425 -0
- package/dist/SettingsMenuBar-BPwv8JQK.js +41 -0
- package/dist/SettingsMenuBar-D8R7hOik.js +2 -0
- package/dist/SettingsMenuBar-DDrjZLmg.cjs +1 -0
- package/dist/SettingsMenuBar-DQjUa8g1.cjs +1 -0
- package/dist/Slider-BNO-vDFn.js +1175 -0
- package/dist/Slider-Bg_EIBg6.cjs +1 -0
- package/dist/Stack-BOaJgV3N.cjs +1 -0
- package/dist/Stack-CuDEaP7e.js +34 -0
- package/dist/StorybookApp-Bkr-7mXp.cjs +1 -0
- package/dist/StorybookApp-WYninkJo.js +10 -0
- package/dist/TerminalApp-8XbsKAWa.js +10041 -0
- package/dist/TerminalApp-Bq2e7QQu.cjs +1 -0
- package/dist/TerminalApp-CVu3Axc9.js +2 -0
- package/dist/TerminalApp-b7_d0jRO.cjs +36 -0
- package/dist/TerminalMenuBar-Cb8x9laS.js +2 -0
- package/dist/TerminalMenuBar-De-FH5AE.cjs +1 -0
- package/dist/TerminalMenuBar-iKLydNda.js +112 -0
- package/dist/TerminalMenuBar-yOaWd-hn.cjs +1 -0
- package/dist/TextInput-C3qfxxWI.js +980 -0
- package/dist/TextInput-DcYns3hz.cjs +1 -0
- package/dist/Tooltip-CAOO-qdx.js +3185 -0
- package/dist/Tooltip-DDh_x-CB.cjs +1 -0
- package/dist/UnstyledButton-CI3kyRck.js +25 -0
- package/dist/UnstyledButton-Cl5RuIid.cjs +1 -0
- package/dist/UploaderApp-BZXW75A0.cjs +1 -0
- package/dist/UploaderApp-C9W_yCT-.js +487 -0
- package/dist/UploaderApp-CPpStgP5.cjs +1 -0
- package/dist/UploaderApp-DHsMQN-f.js +2 -0
- package/dist/VscIcon-CxEmqD80.cjs +1 -0
- package/dist/VscIcon-DueRJVTe.js +8 -0
- package/dist/chunk-BQCxAhux.js +23 -0
- package/dist/chunk-CiTBaPhY.cjs +1 -0
- package/dist/create-safe-context-95P-Bfg3.cjs +1 -0
- package/dist/create-safe-context-XT2cxc14.js +12 -0
- package/dist/desktopStore-B0R1-BeA.js +1905 -0
- package/dist/desktopStore-Cox-Og1z.cjs +1 -0
- package/dist/fc-DejOsQyD.cjs +1 -0
- package/dist/fc-kd8WzIER.js +20536 -0
- package/dist/fc-xJ_v2ayq.cjs +184 -0
- package/dist/fi-BahYsbim.js +9993 -0
- package/dist/fi-BkhyTcZo.cjs +1 -0
- package/dist/getRuntime-BLXyQZBB.cjs +1 -0
- package/dist/getRuntime-CCRXVzJH.js +63 -0
- package/dist/iconBase-B4UCuSvv.cjs +1 -0
- package/dist/iconBase-D7iPes7B.js +108 -0
- package/dist/imageViewerStore-CH1qW6md.cjs +1 -0
- package/dist/imageViewerStore-CJMRXaQh.js +50 -0
- package/dist/index.cjs +53 -5642
- package/dist/index.css +2 -9192
- package/dist/index.d.ts +2258 -2019
- package/dist/index.js +8983 -4780
- package/dist/is-element-BocgicRg.cjs +1 -0
- package/dist/is-element-Bu_JY8Qy.js +7 -0
- package/dist/menuEditStore-C8S_EedM.js +38 -0
- package/dist/menuEditStore-CU7IAg3L.cjs +1 -0
- package/dist/notesStore-DKRgTTFn.js +36 -0
- package/dist/notesStore-zKmChTfF.cjs +1 -0
- package/dist/react-DYmzHD0X.js +27 -0
- package/dist/react-Dldg32sN.cjs +1 -0
- package/dist/settingsAppStore-BrlImdAH.cjs +1 -0
- package/dist/settingsAppStore-KOeWRO6h.js +29 -0
- package/dist/terminalStore-LWWjCvCe.js +30 -0
- package/dist/terminalStore-fZe5t7Ty.cjs +1 -0
- package/dist/use-merged-ref-BI9n1hUK.cjs +1 -0
- package/dist/use-merged-ref-BT8_u6vW.js +25 -0
- package/dist/use-resolved-styles-api-AVDygMKo.cjs +1 -0
- package/dist/use-resolved-styles-api-pEOi2wiK.js +21 -0
- package/dist/use-uncontrolled-A4hm9ATM.js +23 -0
- package/dist/use-uncontrolled-BPrfGv0W.cjs +1 -0
- package/dist/useAdaptiveDimensions-Btp0m5Pm.cjs +1 -0
- package/dist/useAdaptiveDimensions-CunsU0mn.js +40 -0
- package/dist/useCloseInterceptor-CuKAAFnj.js +51 -0
- package/dist/useCloseInterceptor-a_6Lcuqj.cjs +1 -0
- package/dist/useDynamicIcon-GJg3vWsJ.js +22 -0
- package/dist/useDynamicIcon-SytdL1Tu.cjs +1 -0
- package/dist/useMenuBarUtils-Bp5PiztD.cjs +1 -0
- package/dist/useMenuBarUtils-ChmpZjwu.js +6 -0
- package/dist/useOpenApp-BdarhIgl.cjs +1 -0
- package/dist/useOpenApp-JHCPTBWa.js +279 -0
- package/dist/useResolvedUrl-Be5ZlCX7.cjs +1 -0
- package/dist/useResolvedUrl-DFKXq598.js +30 -0
- package/dist/useTranslation-DMRGdqZi.js +279 -0
- package/dist/useTranslation-D_O7S4RJ.cjs +1 -0
- package/dist/vsc-Ciibqbxo.cjs +1 -0
- package/dist/vsc-DGKSpOAR.js +9574 -0
- package/package.json +7 -3
- package/dist/CalendarApp-CHLUCAI7.css +0 -744
- package/dist/CalendarApp-K7ZOUZ6C.js +0 -2
- package/dist/CalendarApp-OTGEERSS.cjs +0 -8
- package/dist/CodeServerApp-5KZGO7HL.css +0 -75
- package/dist/CodeServerApp-LUZFCQBI.js +0 -3
- package/dist/CodeServerApp-P3TMJPLY.cjs +0 -9
- package/dist/CreateItemApp-2EME6FYH.js +0 -8
- package/dist/CreateItemApp-BSEISPUS.cjs +0 -14
- package/dist/CreateItemApp-PQB5GTFG.css +0 -107
- package/dist/DeviceInfoApp-2MJFK32B.cjs +0 -11
- package/dist/DeviceInfoApp-KFYU3E43.js +0 -5
- package/dist/DeviceInfoApp-ZSMRSITP.css +0 -7
- package/dist/FilesApp-B7JR4PEP.cjs +0 -14
- package/dist/FilesApp-E6L5W3T2.css +0 -1817
- package/dist/FilesApp-HYTIWN3O.js +0 -8
- package/dist/ImageViewerApp-N2Q7E7WZ.css +0 -215
- package/dist/ImageViewerApp-PLHNQFZ3.js +0 -11
- package/dist/ImageViewerApp-UIXSGW2X.cjs +0 -17
- package/dist/ImageViewerMenuBar-I3TFKQPS.cjs +0 -14
- package/dist/ImageViewerMenuBar-TV5C6TM2.js +0 -5
- package/dist/ImageViewerMenuBar-XLK4LIHW.css +0 -56
- package/dist/MenuEditApp-4DB5UEWH.js +0 -9
- package/dist/MenuEditApp-B2ZMG4ZY.cjs +0 -15
- package/dist/MenuEditApp-YA6HSAMJ.css +0 -94
- package/dist/MenuEditMenuBar-7VHMZNRM.css +0 -56
- package/dist/MenuEditMenuBar-GF6L4PGZ.cjs +0 -15
- package/dist/MenuEditMenuBar-IUXFPZE5.js +0 -6
- package/dist/NotesApp-BZYASRVJ.cjs +0 -16
- package/dist/NotesApp-MW37NRSN.js +0 -10
- package/dist/NotesApp-TQ6IHDNX.css +0 -302
- package/dist/NotesMenuBar-25LKN3SE.cjs +0 -15
- package/dist/NotesMenuBar-MXLOX7OT.css +0 -56
- package/dist/NotesMenuBar-SRV3AIAL.js +0 -6
- package/dist/PdfApp-3ZINDODQ.cjs +0 -16
- package/dist/PdfApp-BUIC5U5H.css +0 -206
- package/dist/PdfApp-ZSYAQP7L.js +0 -10
- package/dist/PdfMenuBar-NLZC6JHS.js +0 -4
- package/dist/PdfMenuBar-QUM72EE4.css +0 -56
- package/dist/PdfMenuBar-WBRTKMLN.cjs +0 -13
- package/dist/SettingsApp-2ZNO7AVY.cjs +0 -20
- package/dist/SettingsApp-JVOSEFH3.css +0 -283
- package/dist/SettingsApp-ODZINK6T.js +0 -14
- package/dist/SettingsMenuBar-5CBSSMVM.css +0 -56
- package/dist/SettingsMenuBar-VLT6TTCM.js +0 -6
- package/dist/SettingsMenuBar-Y5QEXDEO.cjs +0 -15
- package/dist/StorybookApp-NQ244BER.css +0 -7
- package/dist/StorybookApp-NZDV4X3Y.js +0 -1
- package/dist/StorybookApp-VF3KIMU3.cjs +0 -7
- package/dist/TerminalApp-CDGWRBFJ.cjs +0 -10
- package/dist/TerminalApp-EAATMIMX.css +0 -77
- package/dist/TerminalApp-GCKJCM55.js +0 -4
- package/dist/TerminalMenuBar-3J26O26Q.css +0 -56
- package/dist/TerminalMenuBar-7BH7MGNJ.cjs +0 -14
- package/dist/TerminalMenuBar-7JAEQUZ4.js +0 -5
- package/dist/UploaderApp-6KV3TGCT.css +0 -1817
- package/dist/UploaderApp-MTRIYWV4.cjs +0 -16
- package/dist/UploaderApp-V3WUDCG2.js +0 -10
- package/dist/chunk-25GVAXBU.js +0 -215
- package/dist/chunk-2MYZWMDC.js +0 -444
- package/dist/chunk-2NGIGLVP.cjs +0 -219
- package/dist/chunk-2O3W6TLG.cjs +0 -49
- package/dist/chunk-2PSTHGTD.cjs +0 -42
- package/dist/chunk-2RQX7QBP.cjs +0 -148
- package/dist/chunk-2UW42GAP.cjs +0 -2308
- package/dist/chunk-43W6UDUZ.cjs +0 -19
- package/dist/chunk-4E45FBAH.js +0 -223
- package/dist/chunk-4KIMZJ3L.cjs +0 -88
- package/dist/chunk-4XURSNM4.js +0 -43
- package/dist/chunk-4ZCRYHL6.js +0 -407
- package/dist/chunk-57ZTJB2W.cjs +0 -2329
- package/dist/chunk-5C6IQE42.cjs +0 -35
- package/dist/chunk-5NOHYJNH.js +0 -84
- package/dist/chunk-5YH6AKEO.js +0 -146
- package/dist/chunk-7FGL7HGS.cjs +0 -83
- package/dist/chunk-7HQ6KUIO.cjs +0 -50
- package/dist/chunk-7Y7HB7FB.cjs +0 -53
- package/dist/chunk-ABIAPZ6S.cjs +0 -45
- package/dist/chunk-AU4IENXY.cjs +0 -449
- package/dist/chunk-BFMSPWLP.cjs +0 -165
- package/dist/chunk-BQCD5RAF.cjs +0 -48
- package/dist/chunk-BQL3YXMV.js +0 -17429
- package/dist/chunk-C6BEZNAM.cjs +0 -45
- package/dist/chunk-CV5PUHAE.cjs +0 -86
- package/dist/chunk-D5MVFFID.js +0 -42
- package/dist/chunk-D7R55WWT.js +0 -1601
- package/dist/chunk-DEVJOHGE.cjs +0 -38
- package/dist/chunk-DWP2SYF7.js +0 -55
- package/dist/chunk-E55VXNLK.cjs +0 -17498
- package/dist/chunk-EAELL43F.js +0 -42
- package/dist/chunk-EX5V2ZTU.js +0 -40
- package/dist/chunk-FH4ILMKF.js +0 -38
- package/dist/chunk-FNWS4ZKT.js +0 -48
- package/dist/chunk-FRHBM2U7.js +0 -33
- package/dist/chunk-FX2TPX3L.cjs +0 -45
- package/dist/chunk-GRYCUBJZ.js +0 -9
- package/dist/chunk-HIGKZ7UP.js +0 -2293
- package/dist/chunk-HWHBSAUC.js +0 -40
- package/dist/chunk-HYJJVB7G.js +0 -442
- package/dist/chunk-I5MJXFYW.cjs +0 -34
- package/dist/chunk-IDHP3R4I.js +0 -31
- package/dist/chunk-JEBKLIMU.cjs +0 -123
- package/dist/chunk-JX65IKJZ.cjs +0 -324
- package/dist/chunk-KGMXUBWQ.js +0 -280
- package/dist/chunk-KI5FXBOM.cjs +0 -286
- package/dist/chunk-KQHICFX3.js +0 -121
- package/dist/chunk-LMJE6V4N.cjs +0 -42
- package/dist/chunk-MVDGM5Y4.js +0 -68
- package/dist/chunk-NULEEBCG.js +0 -32
- package/dist/chunk-NVEGEK3N.js +0 -31
- package/dist/chunk-OJIDKDKF.js +0 -68
- package/dist/chunk-PDEZ7BIN.js +0 -541
- package/dist/chunk-PKPQA5NR.js +0 -15
- package/dist/chunk-PNDBLFJW.cjs +0 -50
- package/dist/chunk-PVBI2WRF.js +0 -77
- package/dist/chunk-Q3WA72BF.cjs +0 -70
- package/dist/chunk-QFGHYAD7.cjs +0 -237
- package/dist/chunk-RDIDAZ3S.cjs +0 -9
- package/dist/chunk-RGJPRXYY.js +0 -48
- package/dist/chunk-RQ6OZRUW.cjs +0 -41
- package/dist/chunk-SBE4SZAN.cjs +0 -226
- package/dist/chunk-TGWMOHAO.js +0 -17
- package/dist/chunk-U5JKHQBS.js +0 -234
- package/dist/chunk-UIQCTAVM.cjs +0 -59
- package/dist/chunk-VFPEMNSX.js +0 -47
- package/dist/chunk-VLWKVIYD.js +0 -162
- package/dist/chunk-W2Y22XR6.js +0 -2240
- package/dist/chunk-WHZGUG7Q.js +0 -36
- package/dist/chunk-WSA5WSHN.js +0 -283
- package/dist/chunk-XVASHRCE.cjs +0 -70
- package/dist/chunk-XYSMVQQD.cjs +0 -1608
- package/dist/chunk-Y2WL2M7M.js +0 -86
- package/dist/chunk-YAIWI4Z5.js +0 -7
- package/dist/chunk-YOHBUOZJ.cjs +0 -451
- package/dist/chunk-YP2PLNOF.cjs +0 -34
- package/dist/chunk-YSOLW4FS.cjs +0 -11
- package/dist/chunk-YSWU4OKP.cjs +0 -548
- package/dist/chunk-YY6OUR2U.js +0 -44
- package/dist/chunk-YZWS7FDT.cjs +0 -409
- package/dist/chunk-Z5YGWL65.cjs +0 -39
- package/dist/chunk-ZHNDXNL4.js +0 -45
- package/dist/chunk-ZX3EDZ5C.cjs +0 -17
- package/dist/index.d.cts +0 -2019
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./TextInput-DcYns3hz.cjs`),t=require(`./UnstyledButton-Cl5RuIid.cjs`),n=require(`./Group-DhwePB84.cjs`),r=require(`./getRuntime-BLXyQZBB.cjs`),i=require(`./FileIcon-BCrsxmtt.cjs`),a=require(`./Button-D0FXpkur.cjs`),o=require(`./desktopStore-Cox-Og1z.cjs`),s=require(`./useTranslation-D_O7S4RJ.cjs`);let c=require(`react`),l=require(`react/jsx-runtime`);var u=(e,t)=>{let n=[{id:null,name:`Home`}],r=e,i=[];for(;r!==null;){let e=t.find(e=>e.id===r);if(!e)break;i.unshift({id:e.id,name:e.name}),r=e.parentId}return[...n,...i]},d={root:`_root_b2ks8_1`,breadcrumbBar:`_breadcrumbBar_b2ks8_8`,breadcrumbSep:`_breadcrumbSep_b2ks8_15`,body:`_body_b2ks8_20`,sidebar:`_sidebar_b2ks8_27`,folderTree:`_folderTree_b2ks8_34`,treeItem:`_treeItem_b2ks8_41`,content:`_content_b2ks8_61`,grid:`_grid_b2ks8_67`,item:`_item_b2ks8_75`,icon:`_icon_b2ks8_97`,name:`_name_b2ks8_105`,empty:`_empty_b2ks8_117`,actionBar:`_actionBar_b2ks8_125`,selectedLabel:`_selectedLabel_b2ks8_136`,saveActionBar:`_saveActionBar_b2ks8_142`,fileNameInput:`_fileNameInput_b2ks8_152`,overlay:`_overlay_b2ks8_158`,panel:`_panel_b2ks8_168`},f=(0,c.memo)(({currentFolderId:e,fsNodes:t,onNavigate:n})=>{let a=u(e,t);return(0,l.jsx)(`div`,{className:d.breadcrumbBar,children:(0,l.jsx)(i.r,{separator:`›`,classNames:{separator:d.breadcrumbSep},children:a.map((e,t)=>t===a.length-1?(0,l.jsx)(r.o,{size:`xs`,fw:500,children:e.name},e.id??`root`):(0,l.jsx)(i.i,{size:`xs`,onClick:()=>n(e.id),children:e.name},e.id??`root`))})})}),p=(0,c.memo)(({node:e,allNodes:n,currentFolderId:a,depth:o,onNavigate:s})=>{let c=n.filter(t=>t.parentId===e.id&&t.type===`folder`);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(t.t,{className:d.treeItem,"data-active":a===e.id||void 0,style:{paddingLeft:8+o*14},onClick:()=>s(e.id),"aria-label":e.name,"aria-current":a===e.id?`page`:void 0,children:[(0,l.jsx)(i.t,{type:`folder`,folderNode:e,size:14}),(0,l.jsx)(r.o,{size:`xs`,ml:6,truncate:!0,children:e.name})]}),c.map(e=>(0,l.jsx)(p,{node:e,allNodes:n,currentFolderId:a,depth:o+1,onNavigate:s},e.id))]})}),m=(0,c.memo)(({currentFolderId:e,fsNodes:n,onNavigate:a})=>{let{t:o}=s.t(`window`),c=n.filter(e=>e.parentId===null&&e.type===`folder`);return(0,l.jsx)(`aside`,{className:d.sidebar,children:(0,l.jsxs)(`nav`,{className:d.folderTree,"aria-label":o(`fileDialog.folderTreeAria`,{ns:`common`}),children:[(0,l.jsxs)(t.t,{className:d.treeItem,"data-active":e===null||void 0,style:{paddingLeft:8},onClick:()=>a(null),"aria-label":o(`common:labels.home`),"aria-current":e===null?`page`:void 0,children:[(0,l.jsx)(i.t,{type:`folder`,size:14}),(0,l.jsx)(r.o,{size:`xs`,ml:6,fw:500,children:o(`common:labels.home`)})]}),c.map(t=>(0,l.jsx)(p,{node:t,allNodes:n,currentFolderId:e,depth:1,onNavigate:a},t.id))]})})}),h=(0,c.memo)(({currentFolderId:e,fsNodes:n,onNavigate:a,onItemDoubleClick:c})=>{let{t:u}=s.t(`window`),f=n.filter(t=>t.parentId===e&&t.type===`folder`);if(f.length===0)return(0,l.jsx)(`div`,{className:d.empty,children:(0,l.jsx)(r.o,{size:`sm`,c:`dimmed`,children:u(`common:messages.noSubfolders`)})});let p=o.F(f);return(0,l.jsx)(`div`,{className:d.grid,role:`listbox`,"aria-label":u(`fileDialog.foldersAria`,{ns:`common`}),children:p.map(e=>(0,l.jsxs)(t.t,{className:d.item,onDoubleClick:()=>{a(e.id),c?.(e)},"aria-label":u(`fileDialog.openFolder`,{name:e.name}),role:`option`,children:[(0,l.jsx)(`div`,{className:d.icon,children:(0,l.jsx)(i.t,{type:`folder`,name:e.name,folderNode:e,size:32})}),(0,l.jsx)(r.o,{size:`xs`,className:d.name,truncate:!0,children:e.name})]},e.id))})}),g=(0,c.memo)(({opened:e,children:t,ariaLabelKey:n,ariaLabelNs:r=`window`})=>{let{t:i}=s.t(r);return e?(0,l.jsx)(`div`,{className:d.overlay,role:`dialog`,"aria-label":i(n),children:(0,l.jsx)(`div`,{className:d.panel,children:t})}):null}),_=({acceptedMimeTypes:e,onConfirm:u,onCancel:p})=>{let{t:h}=s.t(`window`),g=o.o(e=>e.fsNodes),[_,v]=(0,c.useState)(null),[y,b]=(0,c.useState)(null),x=_===null?g.filter(e=>e.parentId===null):g.filter(e=>e.parentId===_),S=x.filter(t=>{if(t.type===`folder`)return!0;let n=t;return!e||e.length===0?!0:e.some(e=>n.mimeType===e||e.endsWith(`/*`)&&n.mimeType?.startsWith(e.slice(0,-1)))}),C=(0,c.useCallback)(e=>{v(e),b(null)},[]),w=(0,c.useCallback)(e=>{e.type===`file`&&b(e)},[]),T=(0,c.useCallback)(e=>{e.type===`folder`?C(e.id):u(e)},[C,u]);return(0,l.jsxs)(`div`,{className:d.root,children:[(0,l.jsx)(f,{currentFolderId:_,fsNodes:g,onNavigate:C}),(0,l.jsxs)(`div`,{className:d.body,children:[(0,l.jsx)(m,{currentFolderId:_,fsNodes:g,onNavigate:C}),(0,l.jsx)(`main`,{className:d.content,children:S.length===0?(0,l.jsx)(`div`,{className:d.empty,children:(0,l.jsx)(r.o,{size:`sm`,c:`dimmed`,children:x.length===0?h(`common:messages.folderEmpty`):h(`common:messages.noMatchingFiles`)})}):(0,l.jsx)(`div`,{className:d.grid,role:`listbox`,"aria-label":h(`fileDialog.filesAria`,{ns:`common`}),children:o.F(S).map(e=>{let n=y?.id===e.id;return(0,l.jsxs)(t.t,{className:d.item,"data-selected":n||void 0,"data-type":e.type,onClick:()=>w(e),onDoubleClick:()=>T(e),"aria-label":e.type===`folder`?h(`fileDialog.openFolder`,{name:e.name,ns:`window`}):h(`fileDialog.selectFile`,{name:e.name,ns:`window`}),"aria-selected":e.type===`file`?n:void 0,role:`option`,children:[(0,l.jsx)(`div`,{className:d.icon,children:(0,l.jsx)(i.t,{type:e.type,name:e.name,folderNode:e.type===`folder`?e:void 0,size:32})}),(0,l.jsx)(r.o,{size:`xs`,className:d.name,truncate:!0,children:e.name})]},e.id)})})})]}),(0,l.jsxs)(`div`,{className:d.actionBar,children:[(0,l.jsx)(r.o,{size:`xs`,c:`dimmed`,truncate:!0,className:d.selectedLabel,children:y?y.name:h(`common:messages.noFileSelected`)}),(0,l.jsxs)(n.t,{gap:`xs`,children:[(0,l.jsx)(a.t,{variant:`default`,size:`xs`,onClick:p,"aria-label":h(`filePicker.cancelAria`,{ns:`common`}),children:h(`common:actions.cancel`)}),(0,l.jsx)(a.t,{size:`xs`,disabled:!y,onClick:()=>y&&u(y),"aria-label":h(`filePicker.openSelectedAria`,{ns:`common`}),children:h(`common:actions.open`)})]})]})]})},v=({opened:e,...t})=>e?(0,l.jsx)(g,{opened:e,ariaLabelKey:`fileDialog.openFile`,children:(0,l.jsx)(_,{...t})}):null,y=({initialName:t=`untitled.md`,onConfirm:r,onCancel:i})=>{let{t:u}=s.t(`window`),p=o.o(e=>e.fsNodes),[g,_]=(0,c.useState)(null),[v,y]=(0,c.useState)(t),b=(0,c.useCallback)(e=>{_(e)},[]),x=(0,c.useCallback)(()=>{let e=v.trim();e&&r({parentId:g,name:e.endsWith(`.md`)?e:`${e}.md`})},[v,g,r]);return(0,l.jsxs)(`div`,{className:d.root,children:[(0,l.jsx)(f,{currentFolderId:g,fsNodes:p,onNavigate:b}),(0,l.jsxs)(`div`,{className:d.body,children:[(0,l.jsx)(m,{currentFolderId:g,fsNodes:p,onNavigate:b}),(0,l.jsx)(`main`,{className:d.content,children:(0,l.jsx)(h,{currentFolderId:g,fsNodes:p,onNavigate:b})})]}),(0,l.jsxs)(`div`,{className:d.saveActionBar,children:[(0,l.jsx)(e.t,{size:`xs`,placeholder:u(`fileDialog.filename`),value:v,onChange:e=>y(e.currentTarget.value),onKeyDown:e=>e.key===`Enter`&&x(),"aria-label":u(`filePicker.fileNameAria`,{ns:`common`}),className:d.fileNameInput}),(0,l.jsxs)(n.t,{gap:`xs`,style:{flexShrink:0},children:[(0,l.jsx)(a.t,{variant:`default`,size:`xs`,onClick:i,"aria-label":u(`filePicker.cancelAria`,{ns:`common`}),children:u(`common:actions.cancel`)}),(0,l.jsx)(a.t,{size:`xs`,disabled:!v.trim(),onClick:x,"aria-label":u(`fileDialog.saveFile`),children:u(`common:actions.save`)})]})]})]})},b=({opened:e,...t})=>e?(0,l.jsx)(g,{opened:e,ariaLabelKey:`fileDialog.saveFile`,children:(0,l.jsx)(y,{...t})}):null,x=({onConfirm:e,onCancel:t})=>{let{t:i}=s.t(`window`),u=o.o(e=>e.fsNodes),[p,g]=(0,c.useState)(null),_=(0,c.useCallback)(e=>{g(e)},[]),v=(0,c.useCallback)(()=>{e(p)},[p,e]);return(0,l.jsxs)(`div`,{className:d.root,children:[(0,l.jsx)(f,{currentFolderId:p,fsNodes:u,onNavigate:_}),(0,l.jsxs)(`div`,{className:d.body,children:[(0,l.jsx)(m,{currentFolderId:p,fsNodes:u,onNavigate:_}),(0,l.jsx)(`main`,{className:d.content,children:(0,l.jsx)(h,{currentFolderId:p,fsNodes:u,onNavigate:_})})]}),(0,l.jsxs)(`div`,{className:d.actionBar,children:[(0,l.jsx)(r.o,{size:`xs`,c:`dimmed`,truncate:!0,className:d.selectedLabel,children:p===null?i(`common:labels.home`):u.find(e=>e.id===p)?.name??``}),(0,l.jsxs)(n.t,{gap:`xs`,children:[(0,l.jsx)(a.t,{variant:`default`,size:`xs`,onClick:t,"aria-label":i(`filePicker.cancelAria`,{ns:`common`}),children:i(`common:actions.cancel`)}),(0,l.jsx)(a.t,{size:`xs`,onClick:v,"aria-label":i(`fileDialog.selectFolder`),children:i(`common:actions.select`)})]})]})]})},S=({opened:e,...t})=>e?(0,l.jsx)(g,{opened:e,ariaLabelKey:`fileDialog.selectFolder`,children:(0,l.jsx)(x,{...t})}):null;Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return _}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./UnstyledButton-Cl5RuIid.cjs`),t=require(`./getRuntime-BLXyQZBB.cjs`),n=require(`./FileIcon-BCrsxmtt.cjs`),r=require(`./desktopStore-Cox-Og1z.cjs`),i=require(`./useOpenApp-BdarhIgl.cjs`);let a=require(`react`),o=require(`react/jsx-runtime`);var s=()=>{let e=r.o(e=>e.notifications),t=r.o(e=>e.addNotification),n=r.o(e=>e.removeNotification);return{notifications:e,notify:(0,a.useCallback)((e,n,i)=>{let a={id:r.ut(),title:e,message:n,fcIcon:i?.fcIcon,onClose:i?.onClose};return t(a),a.id},[t]),dismiss:(0,a.useCallback)(e=>{n(e)},[n]),addNotification:t,removeNotification:n}},c={root:`_root_113j7_1`,item:`_item_113j7_9`},l=({node:r,allNodes:i,currentFolderId:a,depth:s,onNavigate:u})=>{let d=i.filter(e=>e.parentId===r.id&&e.type===`folder`);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(e.t,{className:c.item,"data-active":a===r.id||void 0,style:{paddingLeft:8+s*14},onClick:()=>u(r.id),"aria-label":r.name,"aria-current":a===r.id?`page`:void 0,children:[(0,o.jsx)(n.t,{type:`folder`,folderNode:r,size:14}),(0,o.jsx)(t.o,{size:`xs`,ml:6,truncate:!0,children:r.name})]}),d.map(e=>(0,o.jsx)(l,{node:e,allNodes:i,currentFolderId:a,depth:s+1,onNavigate:u},e.id))]})},u=({allNodes:r,currentFolderId:i,onNavigate:a})=>{let s=r.filter(e=>e.parentId===null&&e.type===`folder`);return(0,o.jsxs)(`nav`,{className:c.root,"aria-label":`Folder tree`,children:[(0,o.jsxs)(e.t,{className:c.item,"data-active":i===null||void 0,style:{paddingLeft:8},onClick:()=>a(null),"aria-label":`Home`,"aria-current":i===null?`page`:void 0,children:[(0,o.jsx)(n.t,{type:`folder`,size:14}),(0,o.jsx)(t.o,{size:`xs`,ml:6,fw:500,children:`Home`})]}),s.map(e=>(0,o.jsx)(l,{node:e,allNodes:r,currentFolderId:i,depth:1,onNavigate:a},e.id))]})},d={grid:`_grid_1cag6_1`,item:`_item_1cag6_9`,icon:`_icon_1cag6_26`,name:`_name_1cag6_34`,empty:`_empty_1cag6_46`},f=({node:r,onNavigate:i,onOpenFile:a,onContextMenu:s})=>{let c=()=>{r.type===`folder`?i(r.id):a(r)},l=r.type===`folder`?`Open folder ${r.name}`:`Open file ${r.name}`;return(0,o.jsxs)(e.t,{className:d.item,onDoubleClick:c,onContextMenu:e=>s(e,r.id),"aria-label":l,role:`option`,children:[(0,o.jsx)(`div`,{className:d.icon,children:(0,o.jsx)(n.t,{type:r.type,name:r.name,folderNode:r.type===`folder`?r:void 0,size:32})}),(0,o.jsx)(t.o,{size:`xs`,className:d.name,truncate:!0,children:r.name})]})},p=({nodes:e,onNavigate:n,onOpenFile:i,onNodeContextMenu:a})=>{let s=r.o(e=>e.filesSortMode);if(e.length===0)return(0,o.jsx)(`div`,{className:d.empty,children:(0,o.jsx)(t.o,{size:`sm`,c:`dimmed`,children:`This folder is empty`})});let c=r.I(e,s);return(0,o.jsx)(`div`,{className:d.grid,role:`listbox`,"aria-label":`Files`,children:c.map(e=>(0,o.jsx)(f,{node:e,onNavigate:n,onOpenFile:i,onContextMenu:a},e.id))})},m={root:`_root_13mxj_1`,breadcrumbBar:`_breadcrumbBar_13mxj_9`,breadcrumbSep:`_breadcrumbSep_13mxj_16`,body:`_body_13mxj_21`,sidebar:`_sidebar_13mxj_28`,content:`_content_13mxj_35`},h=({window:e})=>{let c=e?.contentData?.initialFolderId,l=r.o(e=>e.fsNodes),d=r.o(e=>e.openContextMenu),f=r.o(e=>e.setFilesCurrentFolderId),h=i.t(),{notify:g}=s(),[_,v]=(0,a.useState)(c??null),y=(0,a.useCallback)(e=>{v(e),f(e)},[f]);(0,a.useEffect)(()=>{f(c??null)},[c,f]);let b=_===null?l.filter(e=>e.parentId===null):l.filter(e=>e.parentId===_),x=()=>{let e=[{id:null,name:`Home`}],t=_,n=[];for(;t!==null;){let e=l.find(e=>e.id===t);if(!e)break;n.unshift({id:e.id,name:e.name}),t=e.parentId}return[...e,...n]},S=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),d(e.clientX,e.clientY,`files`)},[d]),C=(0,a.useCallback)((e,t)=>{e.preventDefault(),e.stopPropagation(),d(e.clientX,e.clientY,`files`,t)},[d]),w=(0,a.useCallback)(e=>{try{let t=r.x(e);if(t)h(t.appId,{contentData:t.contentData});else{let t=e.mimeType||`unknown`;console.warn(`[FilesApp] Unsupported file type: ${e.name} (${t})`),g(`Unsupported file type`,`Cannot open "${e.name}". File type "${t}" is not supported.`,{fcIcon:`FcDeleteRow`})}}catch(t){console.error(`[FilesApp] Error opening file:`,t),g(`Error opening file`,`An unexpected error occurred while opening "${e.name}".`,{fcIcon:`FcHighPriority`})}},[h,g]),T=x();return(0,o.jsxs)(`div`,{className:m.root,onContextMenu:S,children:[(0,o.jsx)(`div`,{className:m.breadcrumbBar,children:(0,o.jsx)(n.r,{separator:`›`,classNames:{separator:m.breadcrumbSep},children:T.map((e,r)=>r===T.length-1?(0,o.jsx)(t.o,{size:`xs`,fw:500,children:e.name},e.id??`root`):(0,o.jsx)(n.i,{size:`xs`,onClick:()=>y(e.id),children:e.name},e.id??`root`))})}),(0,o.jsxs)(`div`,{className:m.body,children:[(0,o.jsx)(`aside`,{className:m.sidebar,children:(0,o.jsx)(u,{allNodes:l,currentFolderId:_,onNavigate:y})}),(0,o.jsx)(`main`,{className:m.content,children:(0,o.jsx)(p,{nodes:b,onNavigate:y,onOpenFile:w,onNodeContextMenu:C})})]})]})};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./FilesApp-30OjnOuP.cjs`);exports.default=e.t;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { r as e } from "./chunk-BQCxAhux.js";
|
|
2
|
+
import { t } from "./UnstyledButton-CI3kyRck.js";
|
|
3
|
+
import { o as n } from "./getRuntime-CCRXVzJH.js";
|
|
4
|
+
import { i as r, r as i, t as a } from "./FileIcon-BCpGMI5U.js";
|
|
5
|
+
import { I as o, o as s, ut as c, x as l } from "./desktopStore-B0R1-BeA.js";
|
|
6
|
+
import { t as u } from "./useOpenApp-JHCPTBWa.js";
|
|
7
|
+
import { useCallback as d, useEffect as f, useState as p } from "react";
|
|
8
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
|
+
//#region src/hooks/useNotifications.ts
|
|
10
|
+
var _ = () => {
|
|
11
|
+
let e = s((e) => e.notifications), t = s((e) => e.addNotification), n = s((e) => e.removeNotification);
|
|
12
|
+
return {
|
|
13
|
+
notifications: e,
|
|
14
|
+
notify: d((e, n, r) => {
|
|
15
|
+
let i = {
|
|
16
|
+
id: c(),
|
|
17
|
+
title: e,
|
|
18
|
+
message: n,
|
|
19
|
+
fcIcon: r?.fcIcon,
|
|
20
|
+
onClose: r?.onClose
|
|
21
|
+
};
|
|
22
|
+
return t(i), i.id;
|
|
23
|
+
}, [t]),
|
|
24
|
+
dismiss: d((e) => {
|
|
25
|
+
n(e);
|
|
26
|
+
}, [n]),
|
|
27
|
+
addNotification: t,
|
|
28
|
+
removeNotification: n
|
|
29
|
+
};
|
|
30
|
+
}, v = {
|
|
31
|
+
root: "_root_113j7_1",
|
|
32
|
+
item: "_item_113j7_9"
|
|
33
|
+
}, y = ({ node: e, allNodes: r, currentFolderId: i, depth: o, onNavigate: s }) => {
|
|
34
|
+
let c = r.filter((t) => t.parentId === e.id && t.type === "folder");
|
|
35
|
+
return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g(t, {
|
|
36
|
+
className: v.item,
|
|
37
|
+
"data-active": i === e.id || void 0,
|
|
38
|
+
style: { paddingLeft: 8 + o * 14 },
|
|
39
|
+
onClick: () => s(e.id),
|
|
40
|
+
"aria-label": e.name,
|
|
41
|
+
"aria-current": i === e.id ? "page" : void 0,
|
|
42
|
+
children: [/* @__PURE__ */ h(a, {
|
|
43
|
+
type: "folder",
|
|
44
|
+
folderNode: e,
|
|
45
|
+
size: 14
|
|
46
|
+
}), /* @__PURE__ */ h(n, {
|
|
47
|
+
size: "xs",
|
|
48
|
+
ml: 6,
|
|
49
|
+
truncate: !0,
|
|
50
|
+
children: e.name
|
|
51
|
+
})]
|
|
52
|
+
}), c.map((e) => /* @__PURE__ */ h(y, {
|
|
53
|
+
node: e,
|
|
54
|
+
allNodes: r,
|
|
55
|
+
currentFolderId: i,
|
|
56
|
+
depth: o + 1,
|
|
57
|
+
onNavigate: s
|
|
58
|
+
}, e.id))] });
|
|
59
|
+
}, b = ({ allNodes: e, currentFolderId: r, onNavigate: i }) => {
|
|
60
|
+
let o = e.filter((e) => e.parentId === null && e.type === "folder");
|
|
61
|
+
return /* @__PURE__ */ g("nav", {
|
|
62
|
+
className: v.root,
|
|
63
|
+
"aria-label": "Folder tree",
|
|
64
|
+
children: [/* @__PURE__ */ g(t, {
|
|
65
|
+
className: v.item,
|
|
66
|
+
"data-active": r === null || void 0,
|
|
67
|
+
style: { paddingLeft: 8 },
|
|
68
|
+
onClick: () => i(null),
|
|
69
|
+
"aria-label": "Home",
|
|
70
|
+
"aria-current": r === null ? "page" : void 0,
|
|
71
|
+
children: [/* @__PURE__ */ h(a, {
|
|
72
|
+
type: "folder",
|
|
73
|
+
size: 14
|
|
74
|
+
}), /* @__PURE__ */ h(n, {
|
|
75
|
+
size: "xs",
|
|
76
|
+
ml: 6,
|
|
77
|
+
fw: 500,
|
|
78
|
+
children: "Home"
|
|
79
|
+
})]
|
|
80
|
+
}), o.map((t) => /* @__PURE__ */ h(y, {
|
|
81
|
+
node: t,
|
|
82
|
+
allNodes: e,
|
|
83
|
+
currentFolderId: r,
|
|
84
|
+
depth: 1,
|
|
85
|
+
onNavigate: i
|
|
86
|
+
}, t.id))]
|
|
87
|
+
});
|
|
88
|
+
}, x = {
|
|
89
|
+
grid: "_grid_1cag6_1",
|
|
90
|
+
item: "_item_1cag6_9",
|
|
91
|
+
icon: "_icon_1cag6_26",
|
|
92
|
+
name: "_name_1cag6_34",
|
|
93
|
+
empty: "_empty_1cag6_46"
|
|
94
|
+
}, S = ({ node: e, onNavigate: r, onOpenFile: i, onContextMenu: o }) => {
|
|
95
|
+
let s = () => {
|
|
96
|
+
e.type === "folder" ? r(e.id) : i(e);
|
|
97
|
+
}, c = e.type === "folder" ? `Open folder ${e.name}` : `Open file ${e.name}`;
|
|
98
|
+
return /* @__PURE__ */ g(t, {
|
|
99
|
+
className: x.item,
|
|
100
|
+
onDoubleClick: s,
|
|
101
|
+
onContextMenu: (t) => o(t, e.id),
|
|
102
|
+
"aria-label": c,
|
|
103
|
+
role: "option",
|
|
104
|
+
children: [/* @__PURE__ */ h("div", {
|
|
105
|
+
className: x.icon,
|
|
106
|
+
children: /* @__PURE__ */ h(a, {
|
|
107
|
+
type: e.type,
|
|
108
|
+
name: e.name,
|
|
109
|
+
folderNode: e.type === "folder" ? e : void 0,
|
|
110
|
+
size: 32
|
|
111
|
+
})
|
|
112
|
+
}), /* @__PURE__ */ h(n, {
|
|
113
|
+
size: "xs",
|
|
114
|
+
className: x.name,
|
|
115
|
+
truncate: !0,
|
|
116
|
+
children: e.name
|
|
117
|
+
})]
|
|
118
|
+
});
|
|
119
|
+
}, C = ({ nodes: e, onNavigate: t, onOpenFile: r, onNodeContextMenu: i }) => {
|
|
120
|
+
let a = s((e) => e.filesSortMode);
|
|
121
|
+
if (e.length === 0) return /* @__PURE__ */ h("div", {
|
|
122
|
+
className: x.empty,
|
|
123
|
+
children: /* @__PURE__ */ h(n, {
|
|
124
|
+
size: "sm",
|
|
125
|
+
c: "dimmed",
|
|
126
|
+
children: "This folder is empty"
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
let c = o(e, a);
|
|
130
|
+
return /* @__PURE__ */ h("div", {
|
|
131
|
+
className: x.grid,
|
|
132
|
+
role: "listbox",
|
|
133
|
+
"aria-label": "Files",
|
|
134
|
+
children: c.map((e) => /* @__PURE__ */ h(S, {
|
|
135
|
+
node: e,
|
|
136
|
+
onNavigate: t,
|
|
137
|
+
onOpenFile: r,
|
|
138
|
+
onContextMenu: i
|
|
139
|
+
}, e.id))
|
|
140
|
+
});
|
|
141
|
+
}, w = {
|
|
142
|
+
root: "_root_13mxj_1",
|
|
143
|
+
breadcrumbBar: "_breadcrumbBar_13mxj_9",
|
|
144
|
+
breadcrumbSep: "_breadcrumbSep_13mxj_16",
|
|
145
|
+
body: "_body_13mxj_21",
|
|
146
|
+
sidebar: "_sidebar_13mxj_28",
|
|
147
|
+
content: "_content_13mxj_35"
|
|
148
|
+
}, T = /* @__PURE__ */ e({ default: () => E }), E = ({ window: e }) => {
|
|
149
|
+
let t = e?.contentData?.initialFolderId, a = s((e) => e.fsNodes), o = s((e) => e.openContextMenu), c = s((e) => e.setFilesCurrentFolderId), m = u(), { notify: v } = _(), [y, x] = p(t ?? null), S = d((e) => {
|
|
150
|
+
x(e), c(e);
|
|
151
|
+
}, [c]);
|
|
152
|
+
f(() => {
|
|
153
|
+
c(t ?? null);
|
|
154
|
+
}, [t, c]);
|
|
155
|
+
let T = y === null ? a.filter((e) => e.parentId === null) : a.filter((e) => e.parentId === y), E = () => {
|
|
156
|
+
let e = [{
|
|
157
|
+
id: null,
|
|
158
|
+
name: "Home"
|
|
159
|
+
}], t = y, n = [];
|
|
160
|
+
for (; t !== null;) {
|
|
161
|
+
let e = a.find((e) => e.id === t);
|
|
162
|
+
if (!e) break;
|
|
163
|
+
n.unshift({
|
|
164
|
+
id: e.id,
|
|
165
|
+
name: e.name
|
|
166
|
+
}), t = e.parentId;
|
|
167
|
+
}
|
|
168
|
+
return [...e, ...n];
|
|
169
|
+
}, D = d((e) => {
|
|
170
|
+
e.preventDefault(), e.stopPropagation(), o(e.clientX, e.clientY, "files");
|
|
171
|
+
}, [o]), O = d((e, t) => {
|
|
172
|
+
e.preventDefault(), e.stopPropagation(), o(e.clientX, e.clientY, "files", t);
|
|
173
|
+
}, [o]), k = d((e) => {
|
|
174
|
+
try {
|
|
175
|
+
let t = l(e);
|
|
176
|
+
if (t) m(t.appId, { contentData: t.contentData });
|
|
177
|
+
else {
|
|
178
|
+
let t = e.mimeType || "unknown";
|
|
179
|
+
console.warn(`[FilesApp] Unsupported file type: ${e.name} (${t})`), v("Unsupported file type", `Cannot open "${e.name}". File type "${t}" is not supported.`, { fcIcon: "FcDeleteRow" });
|
|
180
|
+
}
|
|
181
|
+
} catch (t) {
|
|
182
|
+
console.error("[FilesApp] Error opening file:", t), v("Error opening file", `An unexpected error occurred while opening "${e.name}".`, { fcIcon: "FcHighPriority" });
|
|
183
|
+
}
|
|
184
|
+
}, [m, v]), A = E();
|
|
185
|
+
return /* @__PURE__ */ g("div", {
|
|
186
|
+
className: w.root,
|
|
187
|
+
onContextMenu: D,
|
|
188
|
+
children: [/* @__PURE__ */ h("div", {
|
|
189
|
+
className: w.breadcrumbBar,
|
|
190
|
+
children: /* @__PURE__ */ h(i, {
|
|
191
|
+
separator: "›",
|
|
192
|
+
classNames: { separator: w.breadcrumbSep },
|
|
193
|
+
children: A.map((e, t) => t === A.length - 1 ? /* @__PURE__ */ h(n, {
|
|
194
|
+
size: "xs",
|
|
195
|
+
fw: 500,
|
|
196
|
+
children: e.name
|
|
197
|
+
}, e.id ?? "root") : /* @__PURE__ */ h(r, {
|
|
198
|
+
size: "xs",
|
|
199
|
+
onClick: () => S(e.id),
|
|
200
|
+
children: e.name
|
|
201
|
+
}, e.id ?? "root"))
|
|
202
|
+
})
|
|
203
|
+
}), /* @__PURE__ */ g("div", {
|
|
204
|
+
className: w.body,
|
|
205
|
+
children: [/* @__PURE__ */ h("aside", {
|
|
206
|
+
className: w.sidebar,
|
|
207
|
+
children: /* @__PURE__ */ h(b, {
|
|
208
|
+
allNodes: a,
|
|
209
|
+
currentFolderId: y,
|
|
210
|
+
onNavigate: S
|
|
211
|
+
})
|
|
212
|
+
}), /* @__PURE__ */ h("main", {
|
|
213
|
+
className: w.content,
|
|
214
|
+
children: /* @__PURE__ */ h(C, {
|
|
215
|
+
nodes: T,
|
|
216
|
+
onNavigate: S,
|
|
217
|
+
onOpenFile: k,
|
|
218
|
+
onNodeContextMenu: O
|
|
219
|
+
})
|
|
220
|
+
})]
|
|
221
|
+
})]
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
//#endregion
|
|
225
|
+
export { T as n, _ as r, E as t };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { O as e, P as t, c as n, l as r, r as i, t as a } from "./Box-DRm8EabO.js";
|
|
2
|
+
import { Children as o } from "react";
|
|
3
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
4
|
+
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Group/filter-falsy-children/filter-falsy-children.mjs
|
|
5
|
+
function c(e) {
|
|
6
|
+
return o.toArray(e).filter(Boolean);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Group/Group.module.mjs
|
|
10
|
+
var l = { root: "m_4081bf90" }, u = {
|
|
11
|
+
preventGrowOverflow: !0,
|
|
12
|
+
gap: "md",
|
|
13
|
+
align: "center",
|
|
14
|
+
justify: "flex-start",
|
|
15
|
+
wrap: "wrap"
|
|
16
|
+
}, d = e((e, { grow: n, preventGrowOverflow: r, gap: i, align: a, justify: o, wrap: s }, { childWidth: c }) => ({ root: {
|
|
17
|
+
"--group-child-width": n && r ? c : void 0,
|
|
18
|
+
"--group-gap": t(i),
|
|
19
|
+
"--group-align": a,
|
|
20
|
+
"--group-justify": o,
|
|
21
|
+
"--group-wrap": s
|
|
22
|
+
} })), f = i((e) => {
|
|
23
|
+
let i = r("Group", u, e), { classNames: o, className: f, style: p, styles: m, unstyled: h, children: g, gap: _, align: v, justify: y, wrap: b, grow: x, preventGrowOverflow: S, vars: C, variant: w, __size: T, mod: E, attributes: D, ...O } = i, k = c(g), A = k.length, j = t(_ ?? "md");
|
|
24
|
+
return /* @__PURE__ */ s(a, {
|
|
25
|
+
...n({
|
|
26
|
+
name: "Group",
|
|
27
|
+
props: i,
|
|
28
|
+
stylesCtx: { childWidth: `calc(${100 / A}% - (${j} - ${j} / ${A}))` },
|
|
29
|
+
className: f,
|
|
30
|
+
style: p,
|
|
31
|
+
classes: l,
|
|
32
|
+
classNames: o,
|
|
33
|
+
styles: m,
|
|
34
|
+
unstyled: h,
|
|
35
|
+
attributes: D,
|
|
36
|
+
vars: C,
|
|
37
|
+
varsResolver: d
|
|
38
|
+
})("root"),
|
|
39
|
+
variant: w,
|
|
40
|
+
mod: [{ grow: x }, E],
|
|
41
|
+
size: T,
|
|
42
|
+
...O,
|
|
43
|
+
children: k
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
f.classes = l, f.varsResolver = d, f.displayName = "@mantine/core/Group";
|
|
47
|
+
//#endregion
|
|
48
|
+
export { f as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./Box-D_64wv6n.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`);function r(e){return t.Children.toArray(e).filter(Boolean)}var i={root:`m_4081bf90`},a={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},o=e.O((t,{grow:n,preventGrowOverflow:r,gap:i,align:a,justify:o,wrap:s},{childWidth:c})=>({root:{"--group-child-width":n&&r?c:void 0,"--group-gap":e.P(i),"--group-align":a,"--group-justify":o,"--group-wrap":s}})),s=e.r(t=>{let s=e.l(`Group`,a,t),{classNames:c,className:l,style:u,styles:d,unstyled:f,children:p,gap:m,align:h,justify:g,wrap:_,grow:v,preventGrowOverflow:y,vars:b,variant:x,__size:S,mod:C,attributes:w,...T}=s,E=r(p),D=E.length,O=e.P(m??`md`);return(0,n.jsx)(e.t,{...e.c({name:`Group`,props:s,stylesCtx:{childWidth:`calc(${100/D}% - (${O} - ${O} / ${D}))`},className:l,style:u,classes:i,classNames:c,styles:d,unstyled:f,attributes:w,vars:b,varsResolver:o})(`root`),variant:x,mod:[{grow:v},C],size:S,...T,children:E})});s.classes=i,s.varsResolver=o,s.displayName=`@mantine/core/Group`,Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./ImageViewerApp-BeqY6voE.cjs`);exports.default=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./desktopStore-Cox-Og1z.cjs`),t=require(`./AppEmptyState-Dc4GaDfu.cjs`),n=require(`./useTranslation-D_O7S4RJ.cjs`),r=require(`./useResolvedUrl-Be5ZlCX7.cjs`),i=require(`./FilePickerApp-Eu0cr2Cm.cjs`),a=require(`./imageViewerStore-CH1qW6md.cjs`);let o=require(`react`),s=require(`react/jsx-runtime`);var c={container:`_container_1btg4_1`,image:`_image_1btg4_12`,placeholder:`_placeholder_1btg4_19`},l=[...e.y,`image/*`],u=({window:e,notifyReady:u})=>{let{t:d}=n.t(`apps`),f=e,p=f?.id??``,m=f?.contentData?.src,[h,g]=(0,o.useState)(m),[_,v]=(0,o.useState)(!1),[y,b]=(0,o.useState)(null),x=(0,o.useRef)(null),S=a.r(e=>e.getDisplayZoom(p)),C=a.r(e=>e.getFitToWindow(p)),w=a.r(e=>e.updateCalculatedZoom),T=a.r(e=>e.reset),E=r.t(h);(0,o.useEffect)(()=>{T(p)},[p,T]),(0,o.useEffect)(()=>{if(!C||!y||!x.current)return;let e=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;w(p,y,{width:e,height:n})}});return e.observe(x.current),()=>e.disconnect()},[C,y,p,w]),(0,o.useEffect)(()=>{u?.({...f?.contentData??{},setPickerOpen:()=>v(!0)})},[f,u]);let D=(0,o.useCallback)(e=>{g(e.url??e.name),v(!1),T(p),b(null)},[p,T]),O=(0,o.useCallback)(e=>{let t=e.currentTarget;b({width:t.naturalWidth,height:t.naturalHeight})},[]),k=C?void 0:{transform:`scale(${S/100})`},A=E?(0,s.jsx)(`img`,{src:E,alt:E.split(`/`).pop()??`image`,className:c.image,style:k,onLoad:O}):(0,s.jsx)(t.t,{label:d(`imageViewer.noImage`)});return(0,s.jsxs)(`div`,{ref:x,className:c.container,"data-windowid":f?.id,children:[A,(0,s.jsx)(i.n,{opened:_,acceptedMimeTypes:l,onConfirm:D,onCancel:()=>v(!1)})]})};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { y as e } from "./desktopStore-B0R1-BeA.js";
|
|
2
|
+
import { t } from "./AppEmptyState-BTujnL_b.js";
|
|
3
|
+
import { t as n } from "./useTranslation-DMRGdqZi.js";
|
|
4
|
+
import { t as r } from "./useResolvedUrl-DFKXq598.js";
|
|
5
|
+
import { n as i } from "./FilePickerApp-DMGuvahM.js";
|
|
6
|
+
import { r as a } from "./imageViewerStore-CJMRXaQh.js";
|
|
7
|
+
import { useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
var f = {
|
|
10
|
+
container: "_container_1btg4_1",
|
|
11
|
+
image: "_image_1btg4_12",
|
|
12
|
+
placeholder: "_placeholder_1btg4_19"
|
|
13
|
+
}, p = [...e, "image/*"], m = ({ window: e, notifyReady: m }) => {
|
|
14
|
+
let { t: h } = n("apps"), g = e, _ = g?.id ?? "", v = g?.contentData?.src, [y, b] = l(v), [x, S] = l(!1), [C, w] = l(null), T = c(null), E = a((e) => e.getDisplayZoom(_)), D = a((e) => e.getFitToWindow(_)), O = a((e) => e.updateCalculatedZoom), k = a((e) => e.reset), A = r(y);
|
|
15
|
+
s(() => {
|
|
16
|
+
k(_);
|
|
17
|
+
}, [_, k]), s(() => {
|
|
18
|
+
if (!D || !C || !T.current) return;
|
|
19
|
+
let e = new ResizeObserver((e) => {
|
|
20
|
+
for (let t of e) {
|
|
21
|
+
let { width: e, height: n } = t.contentRect;
|
|
22
|
+
O(_, C, {
|
|
23
|
+
width: e,
|
|
24
|
+
height: n
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return e.observe(T.current), () => e.disconnect();
|
|
29
|
+
}, [
|
|
30
|
+
D,
|
|
31
|
+
C,
|
|
32
|
+
_,
|
|
33
|
+
O
|
|
34
|
+
]), s(() => {
|
|
35
|
+
m?.({
|
|
36
|
+
...g?.contentData ?? {},
|
|
37
|
+
setPickerOpen: () => S(!0)
|
|
38
|
+
});
|
|
39
|
+
}, [g, m]);
|
|
40
|
+
let j = o((e) => {
|
|
41
|
+
b(e.url ?? e.name), S(!1), k(_), w(null);
|
|
42
|
+
}, [_, k]), M = o((e) => {
|
|
43
|
+
let t = e.currentTarget;
|
|
44
|
+
w({
|
|
45
|
+
width: t.naturalWidth,
|
|
46
|
+
height: t.naturalHeight
|
|
47
|
+
});
|
|
48
|
+
}, []), N = D ? void 0 : { transform: `scale(${E / 100})` }, P = A ? /* @__PURE__ */ u("img", {
|
|
49
|
+
src: A,
|
|
50
|
+
alt: A.split("/").pop() ?? "image",
|
|
51
|
+
className: f.image,
|
|
52
|
+
style: N,
|
|
53
|
+
onLoad: M
|
|
54
|
+
}) : /* @__PURE__ */ u(t, { label: h("imageViewer.noImage") });
|
|
55
|
+
return /* @__PURE__ */ d("div", {
|
|
56
|
+
ref: T,
|
|
57
|
+
className: f.container,
|
|
58
|
+
"data-windowid": g?.id,
|
|
59
|
+
children: [P, /* @__PURE__ */ u(i, {
|
|
60
|
+
opened: x,
|
|
61
|
+
acceptedMimeTypes: p,
|
|
62
|
+
onConfirm: j,
|
|
63
|
+
onCancel: () => S(!1)
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { m as t };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { t as e } from "./AppMenuBar-CHJy8OF0.js";
|
|
2
|
+
import { t } from "./useTranslation-DMRGdqZi.js";
|
|
3
|
+
import { n, r, t as i } from "./imageViewerStore-CJMRXaQh.js";
|
|
4
|
+
import { memo as a, useCallback as o, useMemo as s } from "react";
|
|
5
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/Apps/ImageViewerApp/useImageViewerMenuBar.ts
|
|
7
|
+
var l = [
|
|
8
|
+
{
|
|
9
|
+
value: 25,
|
|
10
|
+
label: "25%"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
value: 50,
|
|
14
|
+
label: "50%"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
value: 75,
|
|
18
|
+
label: "75%"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
value: 100,
|
|
22
|
+
label: "100%"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
value: 200,
|
|
26
|
+
label: "200%"
|
|
27
|
+
}
|
|
28
|
+
], u = (e) => {
|
|
29
|
+
let { windowId: a, onOpenPicker: c, onExit: u } = e, { t: d } = t("common"), { t: f } = t("apps"), p = i(a), m = n(a), h = r((e) => e.setUserZoom), g = r((e) => e.setFitToWindow), _ = o((e) => g(a, e), [a, g]), v = o((e) => h(a, e), [a, h]);
|
|
30
|
+
return s(() => {
|
|
31
|
+
let e = `${f("imageViewer.zoom")}: ${p}%`;
|
|
32
|
+
return [
|
|
33
|
+
{
|
|
34
|
+
type: "menu",
|
|
35
|
+
label: d("menu.file"),
|
|
36
|
+
items: [
|
|
37
|
+
{
|
|
38
|
+
type: "item",
|
|
39
|
+
label: d("actions.open"),
|
|
40
|
+
icon: "FcOpenedFolder",
|
|
41
|
+
onClick: c ?? (() => {})
|
|
42
|
+
},
|
|
43
|
+
{ type: "divider" },
|
|
44
|
+
{
|
|
45
|
+
type: "item",
|
|
46
|
+
label: d("actions.exit"),
|
|
47
|
+
icon: "FcLeft",
|
|
48
|
+
onClick: u
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: "switch",
|
|
54
|
+
label: f("imageViewer.fitToWindow"),
|
|
55
|
+
checked: m,
|
|
56
|
+
onChange: _
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: "slider",
|
|
60
|
+
label: e,
|
|
61
|
+
min: 10,
|
|
62
|
+
max: 200,
|
|
63
|
+
value: p,
|
|
64
|
+
onChange: v,
|
|
65
|
+
marks: l,
|
|
66
|
+
labelFormat: (e) => `${e}%`
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
}, [
|
|
70
|
+
d,
|
|
71
|
+
f,
|
|
72
|
+
c,
|
|
73
|
+
u,
|
|
74
|
+
p,
|
|
75
|
+
m,
|
|
76
|
+
_,
|
|
77
|
+
v
|
|
78
|
+
]);
|
|
79
|
+
}, d = a(({ windowId: t, contentData: n, onExit: r }) => /* @__PURE__ */ c(e, { elements: u({
|
|
80
|
+
windowId: t,
|
|
81
|
+
onOpenPicker: n?.setPickerOpen,
|
|
82
|
+
onExit: r
|
|
83
|
+
}) }));
|
|
84
|
+
d.displayName = "ImageViewerMenuBar";
|
|
85
|
+
//#endregion
|
|
86
|
+
export { d as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./ImageViewerMenuBar-zOkJtqKo.cjs`);exports.ImageViewerMenuBar=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./AppMenuBar-BiHbNg9V.cjs`),t=require(`./useTranslation-D_O7S4RJ.cjs`),n=require(`./imageViewerStore-CH1qW6md.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`);var a=[{value:25,label:`25%`},{value:50,label:`50%`},{value:75,label:`75%`},{value:100,label:`100%`},{value:200,label:`200%`}],o=e=>{let{windowId:i,onOpenPicker:o,onExit:s}=e,{t:c}=t.t(`common`),{t:l}=t.t(`apps`),u=n.t(i),d=n.n(i),f=n.r(e=>e.setUserZoom),p=n.r(e=>e.setFitToWindow),m=(0,r.useCallback)(e=>p(i,e),[i,p]),h=(0,r.useCallback)(e=>f(i,e),[i,f]);return(0,r.useMemo)(()=>{let e=`${l(`imageViewer.zoom`)}: ${u}%`;return[{type:`menu`,label:c(`menu.file`),items:[{type:`item`,label:c(`actions.open`),icon:`FcOpenedFolder`,onClick:o??(()=>{})},{type:`divider`},{type:`item`,label:c(`actions.exit`),icon:`FcLeft`,onClick:s}]},{type:`switch`,label:l(`imageViewer.fitToWindow`),checked:d,onChange:m},{type:`slider`,label:e,min:10,max:200,value:u,onChange:h,marks:a,labelFormat:e=>`${e}%`}]},[c,l,o,s,u,d,m,h])},s=(0,r.memo)(({windowId:t,contentData:n,onExit:r})=>(0,i.jsx)(e.t,{elements:o({windowId:t,onOpenPicker:n?.setPickerOpen,onExit:r})}));s.displayName=`ImageViewerMenuBar`,Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|