@fde-desktop/fde-core 0.4.8 → 0.4.9

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.
Files changed (250) hide show
  1. package/dist/{AccordionChevron-CJXAq5o5.js → AccordionChevron-DxpOyInK.js} +1 -1
  2. package/dist/AccordionChevron-kn5kSrEc.cjs +1 -0
  3. package/dist/{ActionIcon-CtVbYlGY.js → ActionIcon-Drh4p6Fv.js} +32 -32
  4. package/dist/ActionIcon-alk2zZD6.cjs +1 -0
  5. package/dist/AppEmptyState-BWCUbf-B.cjs +1 -0
  6. package/dist/AppEmptyState-Bxpit0JV.js +49 -0
  7. package/dist/AppIcon-BU7a3ZNH.cjs +1 -0
  8. package/dist/{AppIcon-DCDuaU-t.js → AppIcon-XumS3bIG.js} +4 -4
  9. package/dist/AppMenuBar-B9U0n1Vv.cjs +1 -0
  10. package/dist/AppMenuBar-CnIEVjr8.js +2049 -0
  11. package/dist/{Box-DRm8EabO.js → Box-DSKR_qaa.js} +257 -271
  12. package/dist/Box-zW6Twge8.cjs +1 -0
  13. package/dist/Button-DMlnrqyx.cjs +1 -0
  14. package/dist/{Button-k7SxX1Xl.js → Button-wTOTQKxF.js} +38 -38
  15. package/dist/CalendarApp-B_e1B1Yn.cjs +1 -0
  16. package/dist/CalendarApp-C-l9D6nd.cjs +1 -0
  17. package/dist/CalendarApp-D0ftTCTG.js +1399 -0
  18. package/dist/{Center-CyryG5zn.js → Center-CmxXB9ql.js} +1 -1
  19. package/dist/Center-DKUE2pER.cjs +1 -0
  20. package/dist/CheckIcon-CZhtJD1O.cjs +1 -0
  21. package/dist/{CheckIcon-C3WjIR2i.js → CheckIcon-N5qBqXQJ.js} +1 -1
  22. package/dist/CodeServerApp-BOoGwZ7r.cjs +1 -0
  23. package/dist/CodeServerApp-Be3I5EGg.cjs +1 -0
  24. package/dist/{CodeServerApp-DY94cy1a.js → CodeServerApp-DW18EZxa.js} +48 -47
  25. package/dist/{ColorPicker-DvRR-wlQ.js → ColorPicker-BCNqi02x.js} +364 -364
  26. package/dist/ColorPicker-BrDE7tMO.cjs +1 -0
  27. package/dist/CreateItemApp-B12M1E_1.cjs +1 -0
  28. package/dist/{CreateItemApp-CtdH1K1g.js → CreateItemApp-TAAprby3.js} +13 -13
  29. package/dist/CreateItemApp-ePB6ujNl.cjs +1 -0
  30. package/dist/DeviceInfoApp-BMF18BGo.cjs +1 -0
  31. package/dist/DeviceInfoApp-DRy0H3aT.cjs +1 -0
  32. package/dist/{DeviceInfoApp-C306YvtZ.js → DeviceInfoApp-lgpwkeRR.js} +7 -7
  33. package/dist/{DownloadProgress-hdupSUBT.js → DownloadProgress-EoyCaD5O.js} +15 -15
  34. package/dist/DownloadProgress-VNdj22U8.cjs +1 -0
  35. package/dist/{FileIcon-BCpGMI5U.js → FileIcon-7JaSR3Gn.js} +26 -25
  36. package/dist/FileIcon-CIXopWLv.cjs +1 -0
  37. package/dist/{FilePickerApp-DMGuvahM.js → FilePickerApp-DaMgEqKh.js} +115 -115
  38. package/dist/FilePickerApp-DjmuSFqa.cjs +1 -0
  39. package/dist/FilesApp-Bp7wfrBZ.cjs +1 -0
  40. package/dist/FilesApp-BpJJRKhi.cjs +1 -0
  41. package/dist/{FilesApp-VXrmtt63.js → FilesApp-Cj94QG5o.js} +21 -21
  42. package/dist/{Group-BzwlMeob.js → Group-CtBJSfCo.js} +1 -1
  43. package/dist/Group-Dsrf6lEK.cjs +1 -0
  44. package/dist/{ImageViewerApp-CWiP6zx-.js → ImageViewerApp-BaLP3gkO.js} +18 -17
  45. package/dist/ImageViewerApp-DlHGeB3S.cjs +1 -0
  46. package/dist/ImageViewerApp-DoXd_Swu.cjs +1 -0
  47. package/dist/{ImageViewerMenuBar-BULkh_Ku.js → ImageViewerMenuBar-CabGSi9r.js} +15 -14
  48. package/dist/ImageViewerMenuBar-SAI7UNz7.cjs +1 -0
  49. package/dist/ImageViewerMenuBar-_Jr29gii.cjs +1 -0
  50. package/dist/MenuEditApp-BJjlPTOa.cjs +1 -0
  51. package/dist/MenuEditApp-BTRppYnD.js +497 -0
  52. package/dist/MenuEditApp-JPsGT-S3.cjs +1 -0
  53. package/dist/MenuEditMenuBar-BydGkqMw.cjs +1 -0
  54. package/dist/MenuEditMenuBar-DptlwVPQ.cjs +1 -0
  55. package/dist/{MenuEditMenuBar-B94z4Umw.js → MenuEditMenuBar-x1IQrHP2.js} +13 -12
  56. package/dist/NotesApp-BOcRGO7w.cjs +1 -0
  57. package/dist/NotesApp-CQe7UfBC.js +364 -0
  58. package/dist/NotesApp-OL07JXRE.cjs +1 -0
  59. package/dist/NotesMenuBar-BSI_2Y7p.cjs +1 -0
  60. package/dist/NotesMenuBar-Df6aW85J.cjs +1 -0
  61. package/dist/{NotesMenuBar-BB4NkKGf.js → NotesMenuBar-VhpIe68v.js} +10 -9
  62. package/dist/{Paper-DtUYKmYn.js → Paper-BX_9odR6.js} +3 -3
  63. package/dist/Paper-D8-BaBx2.cjs +1 -0
  64. package/dist/PdfApp-CNEbty5v.cjs +1 -0
  65. package/dist/PdfApp-CVv3ZCaM.cjs +1 -0
  66. package/dist/PdfApp-DL_R9-Nc.js +39 -0
  67. package/dist/PdfMenuBar--E6kDyrT.cjs +1 -0
  68. package/dist/PdfMenuBar-DZCLSOpR.js +39 -0
  69. package/dist/PdfMenuBar-Dj5cJUkg.cjs +1 -0
  70. package/dist/SettingsApp-BlmHuAjT.js +1831 -0
  71. package/dist/SettingsApp-CNvIgf5B.cjs +1 -0
  72. package/dist/SettingsApp-DWxanNE4.cjs +1 -0
  73. package/dist/SettingsMenuBar-CBoOBCfx.cjs +1 -0
  74. package/dist/SettingsMenuBar-DQooFkZN.cjs +1 -0
  75. package/dist/SettingsMenuBar-YWiJHaxq.js +42 -0
  76. package/dist/Slider-BUiHxjKO.cjs +1 -0
  77. package/dist/{Slider-BNO-vDFn.js → Slider-t-NcD60t.js} +148 -147
  78. package/dist/{Stack-CuDEaP7e.js → Stack-Bp1Ek2Gp.js} +1 -1
  79. package/dist/Stack-D4jAiRfc.cjs +1 -0
  80. package/dist/StorybookApp-CDLV_kja.cjs +1 -0
  81. package/dist/{StorybookApp-WYninkJo.js → StorybookApp-DKwlPCmo.js} +1 -1
  82. package/dist/TerminalApp-BCB7i1lR.cjs +1 -0
  83. package/dist/TerminalApp-BYc_gHLe.js +326 -0
  84. package/dist/TerminalApp-Dviz6aP2.cjs +1 -0
  85. package/dist/{TerminalMenuBar-iKLydNda.js → TerminalMenuBar-D5tPmgR_.js} +15 -14
  86. package/dist/TerminalMenuBar-DNshPmCa.cjs +1 -0
  87. package/dist/TerminalMenuBar-HzMSR7XP.cjs +1 -0
  88. package/dist/{TextInput-C3qfxxWI.js → TextInput-C-JtGWn1.js} +264 -263
  89. package/dist/TextInput-CrsmcOip.cjs +1 -0
  90. package/dist/Tooltip-D5Cd9wtz.cjs +1 -0
  91. package/dist/Tooltip-DOeIvhrO.js +1142 -0
  92. package/dist/{UnstyledButton-CI3kyRck.js → UnstyledButton-DGaG-e_G.js} +1 -1
  93. package/dist/UnstyledButton-DX2pTahr.cjs +1 -0
  94. package/dist/UploaderApp-C6xA5Rrf2.cjs +1 -0
  95. package/dist/UploaderApp-DnHIRxB_.cjs +1 -0
  96. package/dist/{UploaderApp-C9W_yCT-.js → UploaderApp-qBfpukR_.js} +118 -117
  97. package/dist/VscIcon-CcMdrFoJ.cjs +1 -0
  98. package/dist/{VscIcon-DueRJVTe.js → VscIcon-DBfVnArE.js} +1 -1
  99. package/dist/create-safe-context-Bboj0GWC.cjs +1 -0
  100. package/dist/desktopStore-CZoA9VHO.cjs +1 -0
  101. package/dist/{desktopStore-B0R1-BeA.js → desktopStore-F8bgLqFl.js} +256 -393
  102. package/dist/getRuntime-BFK0-8R1.cjs +1 -0
  103. package/dist/{getRuntime-CCRXVzJH.js → getRuntime-DAPqFH2W.js} +5 -5
  104. package/dist/imageViewerStore-BB_tssZR.cjs +1 -0
  105. package/dist/{imageViewerStore-CJMRXaQh.js → imageViewerStore-C5kWz0o7.js} +1 -1
  106. package/dist/index.cjs +1 -53
  107. package/dist/index.css +1 -1
  108. package/dist/index.js +1293 -5468
  109. package/dist/is-element-CdV0xajp.cjs +1 -0
  110. package/dist/menuEditStore-CTeM_dns.cjs +1 -0
  111. package/dist/{menuEditStore-C8S_EedM.js → menuEditStore-Cj1zAwxQ.js} +1 -1
  112. package/dist/notesStore-BCEl1D_v.cjs +1 -0
  113. package/dist/{notesStore-DKRgTTFn.js → notesStore-BPyRTHEc.js} +1 -1
  114. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  115. package/dist/{settingsAppStore-KOeWRO6h.js → settingsAppStore-BDQ3ts1y.js} +1 -1
  116. package/dist/settingsAppStore-CMBc13VU.cjs +1 -0
  117. package/dist/{terminalStore-LWWjCvCe.js → terminalStore-IWdf4Mm6.js} +1 -1
  118. package/dist/terminalStore-iIuyodfK.cjs +1 -0
  119. package/dist/use-merged-ref-n9Gw9LNn.cjs +1 -0
  120. package/dist/{use-resolved-styles-api-AVDygMKo.cjs → use-resolved-styles-api-8OXE2oRq.cjs} +1 -1
  121. package/dist/{use-resolved-styles-api-pEOi2wiK.js → use-resolved-styles-api-DNUlJJZf.js} +1 -1
  122. package/dist/use-uncontrolled-DDJVQiM_.cjs +1 -0
  123. package/dist/{useAdaptiveDimensions-CunsU0mn.js → useAdaptiveDimensions-AVDc_qPa.js} +1 -1
  124. package/dist/useAdaptiveDimensions-CfITBJ_m.cjs +1 -0
  125. package/dist/{useCloseInterceptor-CuKAAFnj.js → useCloseInterceptor-BZd3VILp.js} +12 -12
  126. package/dist/useCloseInterceptor-yntBEzNc.cjs +1 -0
  127. package/dist/{useDynamicIcon-GJg3vWsJ.js → useDynamicIcon-Bf0t2foA.js} +1 -1
  128. package/dist/useDynamicIcon-DJ_il30E.cjs +1 -0
  129. package/dist/{useOpenApp-JHCPTBWa.js → useOpenApp-CBIm7Gzl.js} +3 -3
  130. package/dist/useOpenApp-DW4x79Zg.cjs +1 -0
  131. package/dist/useResolvedUrl-BkMPM1fM.cjs +1 -0
  132. package/dist/{useResolvedUrl-DFKXq598.js → useResolvedUrl-DQpLqOoL.js} +2 -2
  133. package/package.json +1 -1
  134. package/dist/AccordionChevron-DBXp38Lm.cjs +0 -1
  135. package/dist/ActionIcon-C_SfdBfx.cjs +0 -1
  136. package/dist/AppEmptyState-BTujnL_b.js +0 -4962
  137. package/dist/AppEmptyState-Dc4GaDfu.cjs +0 -1
  138. package/dist/AppIcon--qzR4sgf.cjs +0 -1
  139. package/dist/AppMenuBar-BiHbNg9V.cjs +0 -9
  140. package/dist/AppMenuBar-CHJy8OF0.js +0 -2639
  141. package/dist/Box-D_64wv6n.cjs +0 -1
  142. package/dist/Button-D0FXpkur.cjs +0 -1
  143. package/dist/CalendarApp-C1HvuJoa.cjs +0 -1
  144. package/dist/CalendarApp-DBEQqsS_.js +0 -1721
  145. package/dist/Center-T4No_FAa.cjs +0 -1
  146. package/dist/CheckIcon-CBMLR6Gc.cjs +0 -1
  147. package/dist/CodeServerApp-B3l5QPuG.cjs +0 -1
  148. package/dist/CodeServerApp-BpeALSaX.js +0 -2
  149. package/dist/CodeServerApp-CRjCngFv.cjs +0 -1
  150. package/dist/ColorPicker-BL4UbKCV.cjs +0 -1
  151. package/dist/CreateItemApp-BU9wmjKM.cjs +0 -1
  152. package/dist/CreateItemApp-t9F-a6wD.cjs +0 -1
  153. package/dist/DeviceInfoApp-Cdju_LIB.cjs +0 -1
  154. package/dist/DeviceInfoApp-CyB01v4D.cjs +0 -1
  155. package/dist/DownloadProgress-IRw1dzLX.cjs +0 -1
  156. package/dist/FileIcon-BCrsxmtt.cjs +0 -1
  157. package/dist/FilePickerApp-Eu0cr2Cm.cjs +0 -1
  158. package/dist/FilesApp-30OjnOuP.cjs +0 -1
  159. package/dist/FilesApp-BvlzPNuO.cjs +0 -1
  160. package/dist/Group-DhwePB84.cjs +0 -1
  161. package/dist/ImageViewerApp-BOz59TGc.cjs +0 -1
  162. package/dist/ImageViewerApp-BeqY6voE.cjs +0 -1
  163. package/dist/ImageViewerApp-DBAfJPSo.js +0 -2
  164. package/dist/ImageViewerMenuBar-Cb0Nr5-M.js +0 -2
  165. package/dist/ImageViewerMenuBar-CoEp0RxK.cjs +0 -1
  166. package/dist/ImageViewerMenuBar-zOkJtqKo.cjs +0 -1
  167. package/dist/MenuEditApp-BoKtj2GH.js +0 -2
  168. package/dist/MenuEditApp-D21sEp86.js +0 -2615
  169. package/dist/MenuEditApp-k3cPfTG9.cjs +0 -1
  170. package/dist/MenuEditApp-sz9GlLVH.cjs +0 -5
  171. package/dist/MenuEditMenuBar-6QxlIDpl.cjs +0 -1
  172. package/dist/MenuEditMenuBar-Bv6R42lf.js +0 -2
  173. package/dist/MenuEditMenuBar-CBsmH_-T.cjs +0 -1
  174. package/dist/NotesApp-BtR55Hva.cjs +0 -207
  175. package/dist/NotesApp-C59exz_9.js +0 -16154
  176. package/dist/NotesApp-D47I5LS_.js +0 -2
  177. package/dist/NotesApp-lOwsi2sg.cjs +0 -1
  178. package/dist/NotesMenuBar-BZITC74y.cjs +0 -1
  179. package/dist/NotesMenuBar-Bp0sPqyR.cjs +0 -1
  180. package/dist/NotesMenuBar-xlfODmMA.js +0 -2
  181. package/dist/Paper-DwCpwWwH.cjs +0 -1
  182. package/dist/PdfApp-1XbFGfoY.cjs +0 -1
  183. package/dist/PdfApp-BhIoJWeK.cjs +0 -1
  184. package/dist/PdfApp-C5Rt1Zaw.js +0 -2
  185. package/dist/PdfApp-C8Hwxxqh.js +0 -38
  186. package/dist/PdfMenuBar-BA9rKuMP.cjs +0 -1
  187. package/dist/PdfMenuBar-JXHqwxhZ.cjs +0 -1
  188. package/dist/PdfMenuBar-R0fu7oYF.js +0 -2
  189. package/dist/PdfMenuBar-sd-9Vk3h.js +0 -38
  190. package/dist/SettingsApp-BA-5B4RA.cjs +0 -1
  191. package/dist/SettingsApp-B_rev1xh.cjs +0 -1
  192. package/dist/SettingsApp-Ck4aUXs5.js +0 -2
  193. package/dist/SettingsApp-DUMKSA3K.js +0 -2425
  194. package/dist/SettingsMenuBar-BPwv8JQK.js +0 -41
  195. package/dist/SettingsMenuBar-D8R7hOik.js +0 -2
  196. package/dist/SettingsMenuBar-DDrjZLmg.cjs +0 -1
  197. package/dist/SettingsMenuBar-DQjUa8g1.cjs +0 -1
  198. package/dist/Slider-Bg_EIBg6.cjs +0 -1
  199. package/dist/Stack-BOaJgV3N.cjs +0 -1
  200. package/dist/StorybookApp-Bkr-7mXp.cjs +0 -1
  201. package/dist/TerminalApp-8XbsKAWa.js +0 -10041
  202. package/dist/TerminalApp-Bq2e7QQu.cjs +0 -1
  203. package/dist/TerminalApp-CVu3Axc9.js +0 -2
  204. package/dist/TerminalApp-b7_d0jRO.cjs +0 -36
  205. package/dist/TerminalMenuBar-Cb8x9laS.js +0 -2
  206. package/dist/TerminalMenuBar-De-FH5AE.cjs +0 -1
  207. package/dist/TerminalMenuBar-yOaWd-hn.cjs +0 -1
  208. package/dist/TextInput-DcYns3hz.cjs +0 -1
  209. package/dist/Tooltip-CAOO-qdx.js +0 -3185
  210. package/dist/Tooltip-DDh_x-CB.cjs +0 -1
  211. package/dist/UnstyledButton-Cl5RuIid.cjs +0 -1
  212. package/dist/UploaderApp-BZXW75A0.cjs +0 -1
  213. package/dist/UploaderApp-CPpStgP5.cjs +0 -1
  214. package/dist/UploaderApp-DHsMQN-f.js +0 -2
  215. package/dist/VscIcon-CxEmqD80.cjs +0 -1
  216. package/dist/chunk-BQCxAhux.js +0 -23
  217. package/dist/chunk-CiTBaPhY.cjs +0 -1
  218. package/dist/create-safe-context-95P-Bfg3.cjs +0 -1
  219. package/dist/desktopStore-Cox-Og1z.cjs +0 -1
  220. package/dist/fc-DejOsQyD.cjs +0 -1
  221. package/dist/fc-kd8WzIER.js +0 -20536
  222. package/dist/fc-xJ_v2ayq.cjs +0 -184
  223. package/dist/fi-BahYsbim.js +0 -9993
  224. package/dist/fi-BkhyTcZo.cjs +0 -1
  225. package/dist/getRuntime-BLXyQZBB.cjs +0 -1
  226. package/dist/iconBase-B4UCuSvv.cjs +0 -1
  227. package/dist/iconBase-D7iPes7B.js +0 -108
  228. package/dist/imageViewerStore-CH1qW6md.cjs +0 -1
  229. package/dist/is-element-BocgicRg.cjs +0 -1
  230. package/dist/menuEditStore-CU7IAg3L.cjs +0 -1
  231. package/dist/notesStore-zKmChTfF.cjs +0 -1
  232. package/dist/react-DYmzHD0X.js +0 -27
  233. package/dist/react-Dldg32sN.cjs +0 -1
  234. package/dist/settingsAppStore-BrlImdAH.cjs +0 -1
  235. package/dist/terminalStore-fZe5t7Ty.cjs +0 -1
  236. package/dist/use-merged-ref-BI9n1hUK.cjs +0 -1
  237. package/dist/use-uncontrolled-BPrfGv0W.cjs +0 -1
  238. package/dist/useAdaptiveDimensions-Btp0m5Pm.cjs +0 -1
  239. package/dist/useCloseInterceptor-a_6Lcuqj.cjs +0 -1
  240. package/dist/useDynamicIcon-SytdL1Tu.cjs +0 -1
  241. package/dist/useOpenApp-BdarhIgl.cjs +0 -1
  242. package/dist/useResolvedUrl-Be5ZlCX7.cjs +0 -1
  243. package/dist/useTranslation-DMRGdqZi.js +0 -279
  244. package/dist/useTranslation-D_O7S4RJ.cjs +0 -1
  245. package/dist/vsc-Ciibqbxo.cjs +0 -1
  246. package/dist/vsc-DGKSpOAR.js +0 -9574
  247. /package/dist/{Colors-hca6raEG.js → Colors-ClnDxnyA.js} +0 -0
  248. /package/dist/{Colors-BxX4G8kX.cjs → Colors-zP2AFgU3.cjs} +0 -0
  249. /package/dist/{useMenuBarUtils-Bp5PiztD.cjs → useMenuBarUtils-nJIPJGIQ.cjs} +0 -0
  250. /package/dist/{useMenuBarUtils-ChmpZjwu.js → useMenuBarUtils-nmu9yehT.js} +0 -0
@@ -1,13 +1,13 @@
1
- import { t as e } from "./TextInput-C3qfxxWI.js";
2
- import { t } from "./UnstyledButton-CI3kyRck.js";
3
- import { t as n } from "./Group-BzwlMeob.js";
4
- import { o as r } from "./getRuntime-CCRXVzJH.js";
5
- import { i, r as a, t as o } from "./FileIcon-BCpGMI5U.js";
6
- import { t as s } from "./Button-k7SxX1Xl.js";
7
- import { F as c, o as l } from "./desktopStore-B0R1-BeA.js";
8
- import { t as u } from "./useTranslation-DMRGdqZi.js";
9
- import { memo as d, useCallback as f, useState as p } from "react";
10
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
1
+ import { t as e } from "./TextInput-C-JtGWn1.js";
2
+ import { t } from "./UnstyledButton-DGaG-e_G.js";
3
+ import { t as n } from "./Group-CtBJSfCo.js";
4
+ import { o as r } from "./getRuntime-DAPqFH2W.js";
5
+ import { i, r as a, t as o } from "./FileIcon-7JaSR3Gn.js";
6
+ import { t as s } from "./Button-wTOTQKxF.js";
7
+ import { F as c, o as l } from "./desktopStore-F8bgLqFl.js";
8
+ import { memo as u, useCallback as d, useState as f } from "react";
9
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
10
+ import { useTranslation as g } from "react-i18next";
11
11
  //#region src/utils/buildBreadcrumbs.ts
12
12
  var _ = (e, t) => {
13
13
  let n = [{
@@ -43,74 +43,74 @@ var _ = (e, t) => {
43
43
  fileNameInput: "_fileNameInput_b2ks8_152",
44
44
  overlay: "_overlay_b2ks8_158",
45
45
  panel: "_panel_b2ks8_168"
46
- }, y = d(({ currentFolderId: e, fsNodes: t, onNavigate: n }) => {
46
+ }, y = u(({ currentFolderId: e, fsNodes: t, onNavigate: n }) => {
47
47
  let o = _(e, t);
48
- return /* @__PURE__ */ h("div", {
48
+ return /* @__PURE__ */ m("div", {
49
49
  className: v.breadcrumbBar,
50
- children: /* @__PURE__ */ h(a, {
50
+ children: /* @__PURE__ */ m(a, {
51
51
  separator: "›",
52
52
  classNames: { separator: v.breadcrumbSep },
53
- children: o.map((e, t) => t === o.length - 1 ? /* @__PURE__ */ h(r, {
53
+ children: o.map((e, t) => t === o.length - 1 ? /* @__PURE__ */ m(r, {
54
54
  size: "xs",
55
55
  fw: 500,
56
56
  children: e.name
57
- }, e.id ?? "root") : /* @__PURE__ */ h(i, {
57
+ }, e.id ?? "root") : /* @__PURE__ */ m(i, {
58
58
  size: "xs",
59
59
  onClick: () => n(e.id),
60
60
  children: e.name
61
61
  }, e.id ?? "root"))
62
62
  })
63
63
  });
64
- }), b = d(({ node: e, allNodes: n, currentFolderId: i, depth: a, onNavigate: s }) => {
64
+ }), b = u(({ node: e, allNodes: n, currentFolderId: i, depth: a, onNavigate: s }) => {
65
65
  let c = n.filter((t) => t.parentId === e.id && t.type === "folder");
66
- return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g(t, {
66
+ return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h(t, {
67
67
  className: v.treeItem,
68
68
  "data-active": i === e.id || void 0,
69
69
  style: { paddingLeft: 8 + a * 14 },
70
70
  onClick: () => s(e.id),
71
71
  "aria-label": e.name,
72
72
  "aria-current": i === e.id ? "page" : void 0,
73
- children: [/* @__PURE__ */ h(o, {
73
+ children: [/* @__PURE__ */ m(o, {
74
74
  type: "folder",
75
75
  folderNode: e,
76
76
  size: 14
77
- }), /* @__PURE__ */ h(r, {
77
+ }), /* @__PURE__ */ m(r, {
78
78
  size: "xs",
79
79
  ml: 6,
80
80
  truncate: !0,
81
81
  children: e.name
82
82
  })]
83
- }), c.map((e) => /* @__PURE__ */ h(b, {
83
+ }), c.map((e) => /* @__PURE__ */ m(b, {
84
84
  node: e,
85
85
  allNodes: n,
86
86
  currentFolderId: i,
87
87
  depth: a + 1,
88
88
  onNavigate: s
89
89
  }, e.id))] });
90
- }), x = d(({ currentFolderId: e, fsNodes: n, onNavigate: i }) => {
91
- let { t: a } = u("window"), s = n.filter((e) => e.parentId === null && e.type === "folder");
92
- return /* @__PURE__ */ h("aside", {
90
+ }), x = u(({ currentFolderId: e, fsNodes: n, onNavigate: i }) => {
91
+ let { t: a } = g("window"), s = n.filter((e) => e.parentId === null && e.type === "folder");
92
+ return /* @__PURE__ */ m("aside", {
93
93
  className: v.sidebar,
94
- children: /* @__PURE__ */ g("nav", {
94
+ children: /* @__PURE__ */ h("nav", {
95
95
  className: v.folderTree,
96
96
  "aria-label": a("fileDialog.folderTreeAria", { ns: "common" }),
97
- children: [/* @__PURE__ */ g(t, {
97
+ children: [/* @__PURE__ */ h(t, {
98
98
  className: v.treeItem,
99
99
  "data-active": e === null || void 0,
100
100
  style: { paddingLeft: 8 },
101
101
  onClick: () => i(null),
102
102
  "aria-label": a("common:labels.home"),
103
103
  "aria-current": e === null ? "page" : void 0,
104
- children: [/* @__PURE__ */ h(o, {
104
+ children: [/* @__PURE__ */ m(o, {
105
105
  type: "folder",
106
106
  size: 14
107
- }), /* @__PURE__ */ h(r, {
107
+ }), /* @__PURE__ */ m(r, {
108
108
  size: "xs",
109
109
  ml: 6,
110
110
  fw: 500,
111
111
  children: a("common:labels.home")
112
112
  })]
113
- }), s.map((t) => /* @__PURE__ */ h(b, {
113
+ }), s.map((t) => /* @__PURE__ */ m(b, {
114
114
  node: t,
115
115
  allNodes: n,
116
116
  currentFolderId: e,
@@ -119,37 +119,37 @@ var _ = (e, t) => {
119
119
  }, t.id))]
120
120
  })
121
121
  });
122
- }), S = d(({ currentFolderId: e, fsNodes: n, onNavigate: i, onItemDoubleClick: a }) => {
123
- let { t: s } = u("window"), l = n.filter((t) => t.parentId === e && t.type === "folder");
124
- if (l.length === 0) return /* @__PURE__ */ h("div", {
122
+ }), S = u(({ currentFolderId: e, fsNodes: n, onNavigate: i, onItemDoubleClick: a }) => {
123
+ let { t: s } = g("window"), l = n.filter((t) => t.parentId === e && t.type === "folder");
124
+ if (l.length === 0) return /* @__PURE__ */ m("div", {
125
125
  className: v.empty,
126
- children: /* @__PURE__ */ h(r, {
126
+ children: /* @__PURE__ */ m(r, {
127
127
  size: "sm",
128
128
  c: "dimmed",
129
129
  children: s("common:messages.noSubfolders")
130
130
  })
131
131
  });
132
- let d = c(l);
133
- return /* @__PURE__ */ h("div", {
132
+ let u = c(l);
133
+ return /* @__PURE__ */ m("div", {
134
134
  className: v.grid,
135
135
  role: "listbox",
136
136
  "aria-label": s("fileDialog.foldersAria", { ns: "common" }),
137
- children: d.map((e) => /* @__PURE__ */ g(t, {
137
+ children: u.map((e) => /* @__PURE__ */ h(t, {
138
138
  className: v.item,
139
139
  onDoubleClick: () => {
140
140
  i(e.id), a?.(e);
141
141
  },
142
142
  "aria-label": s("fileDialog.openFolder", { name: e.name }),
143
143
  role: "option",
144
- children: [/* @__PURE__ */ h("div", {
144
+ children: [/* @__PURE__ */ m("div", {
145
145
  className: v.icon,
146
- children: /* @__PURE__ */ h(o, {
146
+ children: /* @__PURE__ */ m(o, {
147
147
  type: "folder",
148
148
  name: e.name,
149
149
  folderNode: e,
150
150
  size: 32
151
151
  })
152
- }), /* @__PURE__ */ h(r, {
152
+ }), /* @__PURE__ */ m(r, {
153
153
  size: "xs",
154
154
  className: v.name,
155
155
  truncate: !0,
@@ -157,82 +157,82 @@ var _ = (e, t) => {
157
157
  })]
158
158
  }, e.id))
159
159
  });
160
- }), C = d(({ opened: e, children: t, ariaLabelKey: n, ariaLabelNs: r = "window" }) => {
161
- let { t: i } = u(r);
162
- return e ? /* @__PURE__ */ h("div", {
160
+ }), C = u(({ opened: e, children: t, ariaLabelKey: n, ariaLabelNs: r = "window" }) => {
161
+ let { t: i } = g(r);
162
+ return e ? /* @__PURE__ */ m("div", {
163
163
  className: v.overlay,
164
164
  role: "dialog",
165
165
  "aria-label": i(n),
166
- children: /* @__PURE__ */ h("div", {
166
+ children: /* @__PURE__ */ m("div", {
167
167
  className: v.panel,
168
168
  children: t
169
169
  })
170
170
  }) : null;
171
171
  }), w = ({ acceptedMimeTypes: e, onConfirm: i, onCancel: a }) => {
172
- let { t: d } = u("window"), m = l((e) => e.fsNodes), [_, b] = p(null), [S, C] = p(null), w = _ === null ? m.filter((e) => e.parentId === null) : m.filter((e) => e.parentId === _), T = w.filter((t) => {
172
+ let { t: u } = g("window"), p = l((e) => e.fsNodes), [_, b] = f(null), [S, C] = f(null), w = _ === null ? p.filter((e) => e.parentId === null) : p.filter((e) => e.parentId === _), T = w.filter((t) => {
173
173
  if (t.type === "folder") return !0;
174
174
  let n = t;
175
175
  return !e || e.length === 0 ? !0 : e.some((e) => n.mimeType === e || e.endsWith("/*") && n.mimeType?.startsWith(e.slice(0, -1)));
176
- }), E = f((e) => {
176
+ }), E = d((e) => {
177
177
  b(e), C(null);
178
- }, []), D = f((e) => {
178
+ }, []), D = d((e) => {
179
179
  e.type === "file" && C(e);
180
- }, []), O = f((e) => {
180
+ }, []), O = d((e) => {
181
181
  e.type === "folder" ? E(e.id) : i(e);
182
182
  }, [E, i]);
183
- return /* @__PURE__ */ g("div", {
183
+ return /* @__PURE__ */ h("div", {
184
184
  className: v.root,
185
185
  children: [
186
- /* @__PURE__ */ h(y, {
186
+ /* @__PURE__ */ m(y, {
187
187
  currentFolderId: _,
188
- fsNodes: m,
188
+ fsNodes: p,
189
189
  onNavigate: E
190
190
  }),
191
- /* @__PURE__ */ g("div", {
191
+ /* @__PURE__ */ h("div", {
192
192
  className: v.body,
193
- children: [/* @__PURE__ */ h(x, {
193
+ children: [/* @__PURE__ */ m(x, {
194
194
  currentFolderId: _,
195
- fsNodes: m,
195
+ fsNodes: p,
196
196
  onNavigate: E
197
- }), /* @__PURE__ */ h("main", {
197
+ }), /* @__PURE__ */ m("main", {
198
198
  className: v.content,
199
- children: T.length === 0 ? /* @__PURE__ */ h("div", {
199
+ children: T.length === 0 ? /* @__PURE__ */ m("div", {
200
200
  className: v.empty,
201
- children: /* @__PURE__ */ h(r, {
201
+ children: /* @__PURE__ */ m(r, {
202
202
  size: "sm",
203
203
  c: "dimmed",
204
- children: w.length === 0 ? d("common:messages.folderEmpty") : d("common:messages.noMatchingFiles")
204
+ children: w.length === 0 ? u("common:messages.folderEmpty") : u("common:messages.noMatchingFiles")
205
205
  })
206
- }) : /* @__PURE__ */ h("div", {
206
+ }) : /* @__PURE__ */ m("div", {
207
207
  className: v.grid,
208
208
  role: "listbox",
209
- "aria-label": d("fileDialog.filesAria", { ns: "common" }),
209
+ "aria-label": u("fileDialog.filesAria", { ns: "common" }),
210
210
  children: c(T).map((e) => {
211
211
  let n = S?.id === e.id;
212
- return /* @__PURE__ */ g(t, {
212
+ return /* @__PURE__ */ h(t, {
213
213
  className: v.item,
214
214
  "data-selected": n || void 0,
215
215
  "data-type": e.type,
216
216
  onClick: () => D(e),
217
217
  onDoubleClick: () => O(e),
218
- "aria-label": e.type === "folder" ? d("fileDialog.openFolder", {
218
+ "aria-label": e.type === "folder" ? u("fileDialog.openFolder", {
219
219
  name: e.name,
220
220
  ns: "window"
221
- }) : d("fileDialog.selectFile", {
221
+ }) : u("fileDialog.selectFile", {
222
222
  name: e.name,
223
223
  ns: "window"
224
224
  }),
225
225
  "aria-selected": e.type === "file" ? n : void 0,
226
226
  role: "option",
227
- children: [/* @__PURE__ */ h("div", {
227
+ children: [/* @__PURE__ */ m("div", {
228
228
  className: v.icon,
229
- children: /* @__PURE__ */ h(o, {
229
+ children: /* @__PURE__ */ m(o, {
230
230
  type: e.type,
231
231
  name: e.name,
232
232
  folderNode: e.type === "folder" ? e : void 0,
233
233
  size: 32
234
234
  })
235
- }), /* @__PURE__ */ h(r, {
235
+ }), /* @__PURE__ */ m(r, {
236
236
  size: "xs",
237
237
  className: v.name,
238
238
  truncate: !0,
@@ -243,96 +243,96 @@ var _ = (e, t) => {
243
243
  })
244
244
  })]
245
245
  }),
246
- /* @__PURE__ */ g("div", {
246
+ /* @__PURE__ */ h("div", {
247
247
  className: v.actionBar,
248
- children: [/* @__PURE__ */ h(r, {
248
+ children: [/* @__PURE__ */ m(r, {
249
249
  size: "xs",
250
250
  c: "dimmed",
251
251
  truncate: !0,
252
252
  className: v.selectedLabel,
253
- children: S ? S.name : d("common:messages.noFileSelected")
254
- }), /* @__PURE__ */ g(n, {
253
+ children: S ? S.name : u("common:messages.noFileSelected")
254
+ }), /* @__PURE__ */ h(n, {
255
255
  gap: "xs",
256
- children: [/* @__PURE__ */ h(s, {
256
+ children: [/* @__PURE__ */ m(s, {
257
257
  variant: "default",
258
258
  size: "xs",
259
259
  onClick: a,
260
- "aria-label": d("filePicker.cancelAria", { ns: "common" }),
261
- children: d("common:actions.cancel")
262
- }), /* @__PURE__ */ h(s, {
260
+ "aria-label": u("filePicker.cancelAria", { ns: "common" }),
261
+ children: u("common:actions.cancel")
262
+ }), /* @__PURE__ */ m(s, {
263
263
  size: "xs",
264
264
  disabled: !S,
265
265
  onClick: () => S && i(S),
266
- "aria-label": d("filePicker.openSelectedAria", { ns: "common" }),
267
- children: d("common:actions.open")
266
+ "aria-label": u("filePicker.openSelectedAria", { ns: "common" }),
267
+ children: u("common:actions.open")
268
268
  })]
269
269
  })]
270
270
  })
271
271
  ]
272
272
  });
273
- }, T = ({ opened: e, ...t }) => e ? /* @__PURE__ */ h(C, {
273
+ }, T = ({ opened: e, ...t }) => e ? /* @__PURE__ */ m(C, {
274
274
  opened: e,
275
275
  ariaLabelKey: "fileDialog.openFile",
276
- children: /* @__PURE__ */ h(w, { ...t })
276
+ children: /* @__PURE__ */ m(w, { ...t })
277
277
  }) : null, E = ({ initialName: t = "untitled.md", onConfirm: r, onCancel: i }) => {
278
- let { t: a } = u("window"), o = l((e) => e.fsNodes), [c, d] = p(null), [m, _] = p(t), b = f((e) => {
279
- d(e);
280
- }, []), C = f(() => {
281
- let e = m.trim();
278
+ let { t: a } = g("window"), o = l((e) => e.fsNodes), [c, u] = f(null), [p, _] = f(t), b = d((e) => {
279
+ u(e);
280
+ }, []), C = d(() => {
281
+ let e = p.trim();
282
282
  e && r({
283
283
  parentId: c,
284
284
  name: e.endsWith(".md") ? e : `${e}.md`
285
285
  });
286
286
  }, [
287
- m,
287
+ p,
288
288
  c,
289
289
  r
290
290
  ]);
291
- return /* @__PURE__ */ g("div", {
291
+ return /* @__PURE__ */ h("div", {
292
292
  className: v.root,
293
293
  children: [
294
- /* @__PURE__ */ h(y, {
294
+ /* @__PURE__ */ m(y, {
295
295
  currentFolderId: c,
296
296
  fsNodes: o,
297
297
  onNavigate: b
298
298
  }),
299
- /* @__PURE__ */ g("div", {
299
+ /* @__PURE__ */ h("div", {
300
300
  className: v.body,
301
- children: [/* @__PURE__ */ h(x, {
301
+ children: [/* @__PURE__ */ m(x, {
302
302
  currentFolderId: c,
303
303
  fsNodes: o,
304
304
  onNavigate: b
305
- }), /* @__PURE__ */ h("main", {
305
+ }), /* @__PURE__ */ m("main", {
306
306
  className: v.content,
307
- children: /* @__PURE__ */ h(S, {
307
+ children: /* @__PURE__ */ m(S, {
308
308
  currentFolderId: c,
309
309
  fsNodes: o,
310
310
  onNavigate: b
311
311
  })
312
312
  })]
313
313
  }),
314
- /* @__PURE__ */ g("div", {
314
+ /* @__PURE__ */ h("div", {
315
315
  className: v.saveActionBar,
316
- children: [/* @__PURE__ */ h(e, {
316
+ children: [/* @__PURE__ */ m(e, {
317
317
  size: "xs",
318
318
  placeholder: a("fileDialog.filename"),
319
- value: m,
319
+ value: p,
320
320
  onChange: (e) => _(e.currentTarget.value),
321
321
  onKeyDown: (e) => e.key === "Enter" && C(),
322
322
  "aria-label": a("filePicker.fileNameAria", { ns: "common" }),
323
323
  className: v.fileNameInput
324
- }), /* @__PURE__ */ g(n, {
324
+ }), /* @__PURE__ */ h(n, {
325
325
  gap: "xs",
326
326
  style: { flexShrink: 0 },
327
- children: [/* @__PURE__ */ h(s, {
327
+ children: [/* @__PURE__ */ m(s, {
328
328
  variant: "default",
329
329
  size: "xs",
330
330
  onClick: i,
331
331
  "aria-label": a("filePicker.cancelAria", { ns: "common" }),
332
332
  children: a("common:actions.cancel")
333
- }), /* @__PURE__ */ h(s, {
333
+ }), /* @__PURE__ */ m(s, {
334
334
  size: "xs",
335
- disabled: !m.trim(),
335
+ disabled: !p.trim(),
336
336
  onClick: C,
337
337
  "aria-label": a("fileDialog.saveFile"),
338
338
  children: a("common:actions.save")
@@ -341,58 +341,58 @@ var _ = (e, t) => {
341
341
  })
342
342
  ]
343
343
  });
344
- }, D = ({ opened: e, ...t }) => e ? /* @__PURE__ */ h(C, {
344
+ }, D = ({ opened: e, ...t }) => e ? /* @__PURE__ */ m(C, {
345
345
  opened: e,
346
346
  ariaLabelKey: "fileDialog.saveFile",
347
- children: /* @__PURE__ */ h(E, { ...t })
347
+ children: /* @__PURE__ */ m(E, { ...t })
348
348
  }) : null, O = ({ onConfirm: e, onCancel: t }) => {
349
- let { t: i } = u("window"), a = l((e) => e.fsNodes), [o, c] = p(null), d = f((e) => {
349
+ let { t: i } = g("window"), a = l((e) => e.fsNodes), [o, c] = f(null), u = d((e) => {
350
350
  c(e);
351
- }, []), m = f(() => {
351
+ }, []), p = d(() => {
352
352
  e(o);
353
353
  }, [o, e]);
354
- return /* @__PURE__ */ g("div", {
354
+ return /* @__PURE__ */ h("div", {
355
355
  className: v.root,
356
356
  children: [
357
- /* @__PURE__ */ h(y, {
357
+ /* @__PURE__ */ m(y, {
358
358
  currentFolderId: o,
359
359
  fsNodes: a,
360
- onNavigate: d
360
+ onNavigate: u
361
361
  }),
362
- /* @__PURE__ */ g("div", {
362
+ /* @__PURE__ */ h("div", {
363
363
  className: v.body,
364
- children: [/* @__PURE__ */ h(x, {
364
+ children: [/* @__PURE__ */ m(x, {
365
365
  currentFolderId: o,
366
366
  fsNodes: a,
367
- onNavigate: d
368
- }), /* @__PURE__ */ h("main", {
367
+ onNavigate: u
368
+ }), /* @__PURE__ */ m("main", {
369
369
  className: v.content,
370
- children: /* @__PURE__ */ h(S, {
370
+ children: /* @__PURE__ */ m(S, {
371
371
  currentFolderId: o,
372
372
  fsNodes: a,
373
- onNavigate: d
373
+ onNavigate: u
374
374
  })
375
375
  })]
376
376
  }),
377
- /* @__PURE__ */ g("div", {
377
+ /* @__PURE__ */ h("div", {
378
378
  className: v.actionBar,
379
- children: [/* @__PURE__ */ h(r, {
379
+ children: [/* @__PURE__ */ m(r, {
380
380
  size: "xs",
381
381
  c: "dimmed",
382
382
  truncate: !0,
383
383
  className: v.selectedLabel,
384
384
  children: o === null ? i("common:labels.home") : a.find((e) => e.id === o)?.name ?? ""
385
- }), /* @__PURE__ */ g(n, {
385
+ }), /* @__PURE__ */ h(n, {
386
386
  gap: "xs",
387
- children: [/* @__PURE__ */ h(s, {
387
+ children: [/* @__PURE__ */ m(s, {
388
388
  variant: "default",
389
389
  size: "xs",
390
390
  onClick: t,
391
391
  "aria-label": i("filePicker.cancelAria", { ns: "common" }),
392
392
  children: i("common:actions.cancel")
393
- }), /* @__PURE__ */ h(s, {
393
+ }), /* @__PURE__ */ m(s, {
394
394
  size: "xs",
395
- onClick: m,
395
+ onClick: p,
396
396
  "aria-label": i("fileDialog.selectFolder"),
397
397
  children: i("common:actions.select")
398
398
  })]
@@ -400,10 +400,10 @@ var _ = (e, t) => {
400
400
  })
401
401
  ]
402
402
  });
403
- }, k = ({ opened: e, ...t }) => e ? /* @__PURE__ */ h(C, {
403
+ }, k = ({ opened: e, ...t }) => e ? /* @__PURE__ */ m(C, {
404
404
  opened: e,
405
405
  ariaLabelKey: "fileDialog.selectFolder",
406
- children: /* @__PURE__ */ h(O, { ...t })
406
+ children: /* @__PURE__ */ m(O, { ...t })
407
407
  }) : null;
408
408
  //#endregion
409
409
  export { C as a, k as i, T as n, _ as o, D as r, w as t };
@@ -0,0 +1 @@
1
+ require(`./Box-zW6Twge8.cjs`);const e=require(`./TextInput-CrsmcOip.cjs`),t=require(`./UnstyledButton-DX2pTahr.cjs`),n=require(`./Group-Dsrf6lEK.cjs`),r=require(`./getRuntime-BFK0-8R1.cjs`),i=require(`./FileIcon-CIXopWLv.cjs`),a=require(`./Button-DMlnrqyx.cjs`),o=require(`./desktopStore-CZoA9VHO.cjs`);let s=require(`react`),c=require(`react/jsx-runtime`),l=require(`react-i18next`);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,s.memo)(({currentFolderId:e,fsNodes:t,onNavigate:n})=>{let a=u(e,t);return(0,c.jsx)(`div`,{className:d.breadcrumbBar,children:(0,c.jsx)(i.r,{separator:`›`,classNames:{separator:d.breadcrumbSep},children:a.map((e,t)=>t===a.length-1?(0,c.jsx)(r.o,{size:`xs`,fw:500,children:e.name},e.id??`root`):(0,c.jsx)(i.i,{size:`xs`,onClick:()=>n(e.id),children:e.name},e.id??`root`))})})}),p=(0,s.memo)(({node:e,allNodes:n,currentFolderId:a,depth:o,onNavigate:s})=>{let l=n.filter(t=>t.parentId===e.id&&t.type===`folder`);return(0,c.jsxs)(c.Fragment,{children:[(0,c.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,c.jsx)(i.t,{type:`folder`,folderNode:e,size:14}),(0,c.jsx)(r.o,{size:`xs`,ml:6,truncate:!0,children:e.name})]}),l.map(e=>(0,c.jsx)(p,{node:e,allNodes:n,currentFolderId:a,depth:o+1,onNavigate:s},e.id))]})}),m=(0,s.memo)(({currentFolderId:e,fsNodes:n,onNavigate:a})=>{let{t:o}=(0,l.useTranslation)(`window`),s=n.filter(e=>e.parentId===null&&e.type===`folder`);return(0,c.jsx)(`aside`,{className:d.sidebar,children:(0,c.jsxs)(`nav`,{className:d.folderTree,"aria-label":o(`fileDialog.folderTreeAria`,{ns:`common`}),children:[(0,c.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,c.jsx)(i.t,{type:`folder`,size:14}),(0,c.jsx)(r.o,{size:`xs`,ml:6,fw:500,children:o(`common:labels.home`)})]}),s.map(t=>(0,c.jsx)(p,{node:t,allNodes:n,currentFolderId:e,depth:1,onNavigate:a},t.id))]})})}),h=(0,s.memo)(({currentFolderId:e,fsNodes:n,onNavigate:a,onItemDoubleClick:s})=>{let{t:u}=(0,l.useTranslation)(`window`),f=n.filter(t=>t.parentId===e&&t.type===`folder`);if(f.length===0)return(0,c.jsx)(`div`,{className:d.empty,children:(0,c.jsx)(r.o,{size:`sm`,c:`dimmed`,children:u(`common:messages.noSubfolders`)})});let p=o.F(f);return(0,c.jsx)(`div`,{className:d.grid,role:`listbox`,"aria-label":u(`fileDialog.foldersAria`,{ns:`common`}),children:p.map(e=>(0,c.jsxs)(t.t,{className:d.item,onDoubleClick:()=>{a(e.id),s?.(e)},"aria-label":u(`fileDialog.openFolder`,{name:e.name}),role:`option`,children:[(0,c.jsx)(`div`,{className:d.icon,children:(0,c.jsx)(i.t,{type:`folder`,name:e.name,folderNode:e,size:32})}),(0,c.jsx)(r.o,{size:`xs`,className:d.name,truncate:!0,children:e.name})]},e.id))})}),g=(0,s.memo)(({opened:e,children:t,ariaLabelKey:n,ariaLabelNs:r=`window`})=>{let{t:i}=(0,l.useTranslation)(r);return e?(0,c.jsx)(`div`,{className:d.overlay,role:`dialog`,"aria-label":i(n),children:(0,c.jsx)(`div`,{className:d.panel,children:t})}):null}),_=({acceptedMimeTypes:e,onConfirm:u,onCancel:p})=>{let{t:h}=(0,l.useTranslation)(`window`),g=o.o(e=>e.fsNodes),[_,v]=(0,s.useState)(null),[y,b]=(0,s.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,s.useCallback)(e=>{v(e),b(null)},[]),w=(0,s.useCallback)(e=>{e.type===`file`&&b(e)},[]),T=(0,s.useCallback)(e=>{e.type===`folder`?C(e.id):u(e)},[C,u]);return(0,c.jsxs)(`div`,{className:d.root,children:[(0,c.jsx)(f,{currentFolderId:_,fsNodes:g,onNavigate:C}),(0,c.jsxs)(`div`,{className:d.body,children:[(0,c.jsx)(m,{currentFolderId:_,fsNodes:g,onNavigate:C}),(0,c.jsx)(`main`,{className:d.content,children:S.length===0?(0,c.jsx)(`div`,{className:d.empty,children:(0,c.jsx)(r.o,{size:`sm`,c:`dimmed`,children:x.length===0?h(`common:messages.folderEmpty`):h(`common:messages.noMatchingFiles`)})}):(0,c.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,c.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,c.jsx)(`div`,{className:d.icon,children:(0,c.jsx)(i.t,{type:e.type,name:e.name,folderNode:e.type===`folder`?e:void 0,size:32})}),(0,c.jsx)(r.o,{size:`xs`,className:d.name,truncate:!0,children:e.name})]},e.id)})})})]}),(0,c.jsxs)(`div`,{className:d.actionBar,children:[(0,c.jsx)(r.o,{size:`xs`,c:`dimmed`,truncate:!0,className:d.selectedLabel,children:y?y.name:h(`common:messages.noFileSelected`)}),(0,c.jsxs)(n.t,{gap:`xs`,children:[(0,c.jsx)(a.t,{variant:`default`,size:`xs`,onClick:p,"aria-label":h(`filePicker.cancelAria`,{ns:`common`}),children:h(`common:actions.cancel`)}),(0,c.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,c.jsx)(g,{opened:e,ariaLabelKey:`fileDialog.openFile`,children:(0,c.jsx)(_,{...t})}):null,y=({initialName:t=`untitled.md`,onConfirm:r,onCancel:i})=>{let{t:u}=(0,l.useTranslation)(`window`),p=o.o(e=>e.fsNodes),[g,_]=(0,s.useState)(null),[v,y]=(0,s.useState)(t),b=(0,s.useCallback)(e=>{_(e)},[]),x=(0,s.useCallback)(()=>{let e=v.trim();e&&r({parentId:g,name:e.endsWith(`.md`)?e:`${e}.md`})},[v,g,r]);return(0,c.jsxs)(`div`,{className:d.root,children:[(0,c.jsx)(f,{currentFolderId:g,fsNodes:p,onNavigate:b}),(0,c.jsxs)(`div`,{className:d.body,children:[(0,c.jsx)(m,{currentFolderId:g,fsNodes:p,onNavigate:b}),(0,c.jsx)(`main`,{className:d.content,children:(0,c.jsx)(h,{currentFolderId:g,fsNodes:p,onNavigate:b})})]}),(0,c.jsxs)(`div`,{className:d.saveActionBar,children:[(0,c.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,c.jsxs)(n.t,{gap:`xs`,style:{flexShrink:0},children:[(0,c.jsx)(a.t,{variant:`default`,size:`xs`,onClick:i,"aria-label":u(`filePicker.cancelAria`,{ns:`common`}),children:u(`common:actions.cancel`)}),(0,c.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,c.jsx)(g,{opened:e,ariaLabelKey:`fileDialog.saveFile`,children:(0,c.jsx)(y,{...t})}):null,x=({onConfirm:e,onCancel:t})=>{let{t:i}=(0,l.useTranslation)(`window`),u=o.o(e=>e.fsNodes),[p,g]=(0,s.useState)(null),_=(0,s.useCallback)(e=>{g(e)},[]),v=(0,s.useCallback)(()=>{e(p)},[p,e]);return(0,c.jsxs)(`div`,{className:d.root,children:[(0,c.jsx)(f,{currentFolderId:p,fsNodes:u,onNavigate:_}),(0,c.jsxs)(`div`,{className:d.body,children:[(0,c.jsx)(m,{currentFolderId:p,fsNodes:u,onNavigate:_}),(0,c.jsx)(`main`,{className:d.content,children:(0,c.jsx)(h,{currentFolderId:p,fsNodes:u,onNavigate:_})})]}),(0,c.jsxs)(`div`,{className:d.actionBar,children:[(0,c.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,c.jsxs)(n.t,{gap:`xs`,children:[(0,c.jsx)(a.t,{variant:`default`,size:`xs`,onClick:t,"aria-label":i(`filePicker.cancelAria`,{ns:`common`}),children:i(`common:actions.cancel`)}),(0,c.jsx)(a.t,{size:`xs`,onClick:v,"aria-label":i(`fileDialog.selectFolder`),children:i(`common:actions.select`)})]})]})]})},S=({opened:e,...t})=>e?(0,c.jsx)(g,{opened:e,ariaLabelKey:`fileDialog.selectFolder`,children:(0,c.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
+ const e=require(`./FilesApp-BpJJRKhi.cjs`);exports.default=e.t;
@@ -0,0 +1 @@
1
+ require(`./Box-zW6Twge8.cjs`);const e=require(`./UnstyledButton-DX2pTahr.cjs`),t=require(`./getRuntime-BFK0-8R1.cjs`),n=require(`./FileIcon-CIXopWLv.cjs`),r=require(`./useOpenApp-DW4x79Zg.cjs`),i=require(`./desktopStore-CZoA9VHO.cjs`);let a=require(`react`),o=require(`react/jsx-runtime`);var s=()=>{let e=i.o(e=>e.notifications),t=i.o(e=>e.addNotification),n=i.o(e=>e.removeNotification);return{notifications:e,notify:(0,a.useCallback)((e,n,r)=>{let a={id:i.ut(),title:e,message:n,fcIcon:r?.fcIcon,onClose:r?.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:r,onNodeContextMenu:a})=>{let s=i.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=i.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:r,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=i.o(e=>e.fsNodes),d=i.o(e=>e.openContextMenu),f=i.o(e=>e.setFilesCurrentFolderId),h=r.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=i.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}});
@@ -1,19 +1,19 @@
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";
1
+ import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
+ import { t } from "./UnstyledButton-DGaG-e_G.js";
3
+ import { o as n } from "./getRuntime-DAPqFH2W.js";
4
+ import { i as r, r as i, t as a } from "./FileIcon-7JaSR3Gn.js";
5
+ import { t as o } from "./useOpenApp-CBIm7Gzl.js";
6
+ import { I as s, o as c, ut as l, x as u } from "./desktopStore-F8bgLqFl.js";
7
7
  import { useCallback as d, useEffect as f, useState as p } from "react";
8
8
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
9
9
  //#region src/hooks/useNotifications.ts
10
10
  var _ = () => {
11
- let e = s((e) => e.notifications), t = s((e) => e.addNotification), n = s((e) => e.removeNotification);
11
+ let e = c((e) => e.notifications), t = c((e) => e.addNotification), n = c((e) => e.removeNotification);
12
12
  return {
13
13
  notifications: e,
14
14
  notify: d((e, n, r) => {
15
15
  let i = {
16
- id: c(),
16
+ id: l(),
17
17
  title: e,
18
18
  message: n,
19
19
  fcIcon: r?.fcIcon,
@@ -117,7 +117,7 @@ var _ = () => {
117
117
  })]
118
118
  });
119
119
  }, C = ({ nodes: e, onNavigate: t, onOpenFile: r, onNodeContextMenu: i }) => {
120
- let a = s((e) => e.filesSortMode);
120
+ let a = c((e) => e.filesSortMode);
121
121
  if (e.length === 0) return /* @__PURE__ */ h("div", {
122
122
  className: x.empty,
123
123
  children: /* @__PURE__ */ h(n, {
@@ -126,12 +126,12 @@ var _ = () => {
126
126
  children: "This folder is empty"
127
127
  })
128
128
  });
129
- let c = o(e, a);
129
+ let o = s(e, a);
130
130
  return /* @__PURE__ */ h("div", {
131
131
  className: x.grid,
132
132
  role: "listbox",
133
133
  "aria-label": "Files",
134
- children: c.map((e) => /* @__PURE__ */ h(S, {
134
+ children: o.map((e) => /* @__PURE__ */ h(S, {
135
135
  node: e,
136
136
  onNavigate: t,
137
137
  onOpenFile: r,
@@ -146,12 +146,12 @@ var _ = () => {
146
146
  sidebar: "_sidebar_13mxj_28",
147
147
  content: "_content_13mxj_35"
148
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]);
149
+ let t = e?.contentData?.initialFolderId, a = c((e) => e.fsNodes), s = c((e) => e.openContextMenu), l = c((e) => e.setFilesCurrentFolderId), m = o(), { notify: v } = _(), [y, x] = p(t ?? null), S = d((e) => {
150
+ x(e), l(e);
151
+ }, [l]);
152
152
  f(() => {
153
- c(t ?? null);
154
- }, [t, c]);
153
+ l(t ?? null);
154
+ }, [t, l]);
155
155
  let T = y === null ? a.filter((e) => e.parentId === null) : a.filter((e) => e.parentId === y), E = () => {
156
156
  let e = [{
157
157
  id: null,
@@ -167,12 +167,12 @@ var _ = () => {
167
167
  }
168
168
  return [...e, ...n];
169
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) => {
170
+ e.preventDefault(), e.stopPropagation(), s(e.clientX, e.clientY, "files");
171
+ }, [s]), O = d((e, t) => {
172
+ e.preventDefault(), e.stopPropagation(), s(e.clientX, e.clientY, "files", t);
173
+ }, [s]), k = d((e) => {
174
174
  try {
175
- let t = l(e);
175
+ let t = u(e);
176
176
  if (t) m(t.appId, { contentData: t.contentData });
177
177
  else {
178
178
  let t = e.mimeType || "unknown";
@@ -1,4 +1,4 @@
1
- import { O as e, P as t, c as n, l as r, r as i, t as a } from "./Box-DRm8EabO.js";
1
+ import { D as e, N as t, c as n, l as r, r as i, t as a } from "./Box-DSKR_qaa.js";
2
2
  import { Children as o } from "react";
3
3
  import { jsx as s } from "react/jsx-runtime";
4
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
@@ -0,0 +1 @@
1
+ const e=require(`./Box-zW6Twge8.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.D((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.N(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.N(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}});