@fde-desktop/fde-core 0.4.7 → 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 (284) hide show
  1. package/dist/AccordionChevron-DxpOyInK.js +26 -0
  2. package/dist/AccordionChevron-kn5kSrEc.cjs +1 -0
  3. package/dist/ActionIcon-Drh4p6Fv.js +145 -0
  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-XumS3bIG.js +80 -0
  9. package/dist/AppMenuBar-B9U0n1Vv.cjs +1 -0
  10. package/dist/AppMenuBar-CnIEVjr8.js +2049 -0
  11. package/dist/Box-DSKR_qaa.js +1579 -0
  12. package/dist/Box-zW6Twge8.cjs +1 -0
  13. package/dist/Button-DMlnrqyx.cjs +1 -0
  14. package/dist/Button-wTOTQKxF.js +178 -0
  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-CmxXB9ql.js +25 -0
  19. package/dist/Center-DKUE2pER.cjs +1 -0
  20. package/dist/CheckIcon-CZhtJD1O.cjs +1 -0
  21. package/dist/CheckIcon-N5qBqXQJ.js +25 -0
  22. package/dist/CodeServerApp-BOoGwZ7r.cjs +1 -0
  23. package/dist/CodeServerApp-Be3I5EGg.cjs +1 -0
  24. package/dist/CodeServerApp-DW18EZxa.js +150 -0
  25. package/dist/ColorPicker-BCNqi02x.js +997 -0
  26. package/dist/ColorPicker-BrDE7tMO.cjs +1 -0
  27. package/dist/Colors-ClnDxnyA.js +15 -0
  28. package/dist/Colors-zP2AFgU3.cjs +1 -0
  29. package/dist/CreateItemApp-B12M1E_1.cjs +1 -0
  30. package/dist/CreateItemApp-TAAprby3.js +400 -0
  31. package/dist/CreateItemApp-ePB6ujNl.cjs +1 -0
  32. package/dist/DeviceInfoApp-BMF18BGo.cjs +1 -0
  33. package/dist/DeviceInfoApp-DRy0H3aT.cjs +1 -0
  34. package/dist/DeviceInfoApp-lgpwkeRR.js +223 -0
  35. package/dist/DownloadProgress-EoyCaD5O.js +174 -0
  36. package/dist/DownloadProgress-VNdj22U8.cjs +1 -0
  37. package/dist/FileIcon-7JaSR3Gn.js +89 -0
  38. package/dist/FileIcon-CIXopWLv.cjs +1 -0
  39. package/dist/FilePickerApp-DaMgEqKh.js +409 -0
  40. package/dist/FilePickerApp-DjmuSFqa.cjs +1 -0
  41. package/dist/FilesApp-Bp7wfrBZ.cjs +1 -0
  42. package/dist/FilesApp-BpJJRKhi.cjs +1 -0
  43. package/dist/FilesApp-Cj94QG5o.js +225 -0
  44. package/dist/Group-CtBJSfCo.js +48 -0
  45. package/dist/Group-Dsrf6lEK.cjs +1 -0
  46. package/dist/ImageViewerApp-BaLP3gkO.js +69 -0
  47. package/dist/ImageViewerApp-DlHGeB3S.cjs +1 -0
  48. package/dist/ImageViewerApp-DoXd_Swu.cjs +1 -0
  49. package/dist/ImageViewerMenuBar-CabGSi9r.js +87 -0
  50. package/dist/ImageViewerMenuBar-SAI7UNz7.cjs +1 -0
  51. package/dist/ImageViewerMenuBar-_Jr29gii.cjs +1 -0
  52. package/dist/MenuEditApp-BJjlPTOa.cjs +1 -0
  53. package/dist/MenuEditApp-BTRppYnD.js +497 -0
  54. package/dist/MenuEditApp-JPsGT-S3.cjs +1 -0
  55. package/dist/MenuEditMenuBar-BydGkqMw.cjs +1 -0
  56. package/dist/MenuEditMenuBar-DptlwVPQ.cjs +1 -0
  57. package/dist/MenuEditMenuBar-x1IQrHP2.js +60 -0
  58. package/dist/NotesApp-BOcRGO7w.cjs +1 -0
  59. package/dist/NotesApp-CQe7UfBC.js +364 -0
  60. package/dist/NotesApp-OL07JXRE.cjs +1 -0
  61. package/dist/NotesMenuBar-BSI_2Y7p.cjs +1 -0
  62. package/dist/NotesMenuBar-Df6aW85J.cjs +1 -0
  63. package/dist/NotesMenuBar-VhpIe68v.js +62 -0
  64. package/dist/Paper-BX_9odR6.js +30 -0
  65. package/dist/Paper-D8-BaBx2.cjs +1 -0
  66. package/dist/PdfApp-CNEbty5v.cjs +1 -0
  67. package/dist/PdfApp-CVv3ZCaM.cjs +1 -0
  68. package/dist/PdfApp-DL_R9-Nc.js +39 -0
  69. package/dist/PdfMenuBar--E6kDyrT.cjs +1 -0
  70. package/dist/PdfMenuBar-DZCLSOpR.js +39 -0
  71. package/dist/PdfMenuBar-Dj5cJUkg.cjs +1 -0
  72. package/dist/SettingsApp-BlmHuAjT.js +1831 -0
  73. package/dist/SettingsApp-CNvIgf5B.cjs +1 -0
  74. package/dist/SettingsApp-DWxanNE4.cjs +1 -0
  75. package/dist/SettingsMenuBar-CBoOBCfx.cjs +1 -0
  76. package/dist/SettingsMenuBar-DQooFkZN.cjs +1 -0
  77. package/dist/SettingsMenuBar-YWiJHaxq.js +42 -0
  78. package/dist/Slider-BUiHxjKO.cjs +1 -0
  79. package/dist/Slider-t-NcD60t.js +1176 -0
  80. package/dist/Stack-Bp1Ek2Gp.js +34 -0
  81. package/dist/Stack-D4jAiRfc.cjs +1 -0
  82. package/dist/StorybookApp-CDLV_kja.cjs +1 -0
  83. package/dist/StorybookApp-DKwlPCmo.js +10 -0
  84. package/dist/TerminalApp-BCB7i1lR.cjs +1 -0
  85. package/dist/TerminalApp-BYc_gHLe.js +326 -0
  86. package/dist/TerminalApp-Dviz6aP2.cjs +1 -0
  87. package/dist/TerminalMenuBar-D5tPmgR_.js +113 -0
  88. package/dist/TerminalMenuBar-DNshPmCa.cjs +1 -0
  89. package/dist/TerminalMenuBar-HzMSR7XP.cjs +1 -0
  90. package/dist/TextInput-C-JtGWn1.js +981 -0
  91. package/dist/TextInput-CrsmcOip.cjs +1 -0
  92. package/dist/Tooltip-D5Cd9wtz.cjs +1 -0
  93. package/dist/Tooltip-DOeIvhrO.js +1142 -0
  94. package/dist/UnstyledButton-DGaG-e_G.js +25 -0
  95. package/dist/UnstyledButton-DX2pTahr.cjs +1 -0
  96. package/dist/UploaderApp-C6xA5Rrf2.cjs +1 -0
  97. package/dist/UploaderApp-DnHIRxB_.cjs +1 -0
  98. package/dist/UploaderApp-qBfpukR_.js +488 -0
  99. package/dist/VscIcon-CcMdrFoJ.cjs +1 -0
  100. package/dist/VscIcon-DBfVnArE.js +8 -0
  101. package/dist/create-safe-context-Bboj0GWC.cjs +1 -0
  102. package/dist/create-safe-context-XT2cxc14.js +12 -0
  103. package/dist/desktopStore-CZoA9VHO.cjs +1 -0
  104. package/dist/desktopStore-F8bgLqFl.js +1768 -0
  105. package/dist/getRuntime-BFK0-8R1.cjs +1 -0
  106. package/dist/getRuntime-DAPqFH2W.js +63 -0
  107. package/dist/imageViewerStore-BB_tssZR.cjs +1 -0
  108. package/dist/imageViewerStore-C5kWz0o7.js +50 -0
  109. package/dist/index.cjs +1 -5642
  110. package/dist/index.css +2 -9192
  111. package/dist/index.d.ts +2258 -2019
  112. package/dist/index.js +4826 -4798
  113. package/dist/is-element-Bu_JY8Qy.js +7 -0
  114. package/dist/is-element-CdV0xajp.cjs +1 -0
  115. package/dist/menuEditStore-CTeM_dns.cjs +1 -0
  116. package/dist/menuEditStore-Cj1zAwxQ.js +38 -0
  117. package/dist/notesStore-BCEl1D_v.cjs +1 -0
  118. package/dist/notesStore-BPyRTHEc.js +36 -0
  119. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  120. package/dist/settingsAppStore-BDQ3ts1y.js +29 -0
  121. package/dist/settingsAppStore-CMBc13VU.cjs +1 -0
  122. package/dist/terminalStore-IWdf4Mm6.js +30 -0
  123. package/dist/terminalStore-iIuyodfK.cjs +1 -0
  124. package/dist/use-merged-ref-BT8_u6vW.js +25 -0
  125. package/dist/use-merged-ref-n9Gw9LNn.cjs +1 -0
  126. package/dist/use-resolved-styles-api-8OXE2oRq.cjs +1 -0
  127. package/dist/use-resolved-styles-api-DNUlJJZf.js +21 -0
  128. package/dist/use-uncontrolled-A4hm9ATM.js +23 -0
  129. package/dist/use-uncontrolled-DDJVQiM_.cjs +1 -0
  130. package/dist/useAdaptiveDimensions-AVDc_qPa.js +40 -0
  131. package/dist/useAdaptiveDimensions-CfITBJ_m.cjs +1 -0
  132. package/dist/useCloseInterceptor-BZd3VILp.js +51 -0
  133. package/dist/useCloseInterceptor-yntBEzNc.cjs +1 -0
  134. package/dist/useDynamicIcon-Bf0t2foA.js +22 -0
  135. package/dist/useDynamicIcon-DJ_il30E.cjs +1 -0
  136. package/dist/useMenuBarUtils-nJIPJGIQ.cjs +1 -0
  137. package/dist/useMenuBarUtils-nmu9yehT.js +6 -0
  138. package/dist/useOpenApp-CBIm7Gzl.js +279 -0
  139. package/dist/useOpenApp-DW4x79Zg.cjs +1 -0
  140. package/dist/useResolvedUrl-BkMPM1fM.cjs +1 -0
  141. package/dist/useResolvedUrl-DQpLqOoL.js +30 -0
  142. package/package.json +7 -3
  143. package/dist/CalendarApp-CHLUCAI7.css +0 -744
  144. package/dist/CalendarApp-K7ZOUZ6C.js +0 -2
  145. package/dist/CalendarApp-OTGEERSS.cjs +0 -8
  146. package/dist/CodeServerApp-5KZGO7HL.css +0 -75
  147. package/dist/CodeServerApp-LUZFCQBI.js +0 -3
  148. package/dist/CodeServerApp-P3TMJPLY.cjs +0 -9
  149. package/dist/CreateItemApp-ESQ42VHH.js +0 -8
  150. package/dist/CreateItemApp-PQB5GTFG.css +0 -107
  151. package/dist/CreateItemApp-RFE3REWZ.cjs +0 -14
  152. package/dist/DeviceInfoApp-XNIS6ZY6.js +0 -5
  153. package/dist/DeviceInfoApp-ZNLQNOKI.cjs +0 -11
  154. package/dist/DeviceInfoApp-ZSMRSITP.css +0 -7
  155. package/dist/FilesApp-4GEU64QN.js +0 -8
  156. package/dist/FilesApp-E6L5W3T2.css +0 -1817
  157. package/dist/FilesApp-QSLB5IWR.cjs +0 -14
  158. package/dist/ImageViewerApp-N2Q7E7WZ.css +0 -215
  159. package/dist/ImageViewerApp-NCVDKLB3.js +0 -11
  160. package/dist/ImageViewerApp-QB373H5Z.cjs +0 -17
  161. package/dist/ImageViewerMenuBar-I3TFKQPS.cjs +0 -14
  162. package/dist/ImageViewerMenuBar-TV5C6TM2.js +0 -5
  163. package/dist/ImageViewerMenuBar-XLK4LIHW.css +0 -56
  164. package/dist/MenuEditApp-5EFYAPFC.cjs +0 -15
  165. package/dist/MenuEditApp-V5XOPIHX.js +0 -9
  166. package/dist/MenuEditApp-YA6HSAMJ.css +0 -94
  167. package/dist/MenuEditMenuBar-7VHMZNRM.css +0 -56
  168. package/dist/MenuEditMenuBar-GF6L4PGZ.cjs +0 -15
  169. package/dist/MenuEditMenuBar-IUXFPZE5.js +0 -6
  170. package/dist/NotesApp-2YNT7Y3D.js +0 -10
  171. package/dist/NotesApp-IAEE7YHU.cjs +0 -16
  172. package/dist/NotesApp-TQ6IHDNX.css +0 -302
  173. package/dist/NotesMenuBar-25LKN3SE.cjs +0 -15
  174. package/dist/NotesMenuBar-MXLOX7OT.css +0 -56
  175. package/dist/NotesMenuBar-SRV3AIAL.js +0 -6
  176. package/dist/PdfApp-67XIX6AM.js +0 -10
  177. package/dist/PdfApp-BUIC5U5H.css +0 -206
  178. package/dist/PdfApp-GZ6RHTBR.cjs +0 -16
  179. package/dist/PdfMenuBar-NLZC6JHS.js +0 -4
  180. package/dist/PdfMenuBar-QUM72EE4.css +0 -56
  181. package/dist/PdfMenuBar-WBRTKMLN.cjs +0 -13
  182. package/dist/SettingsApp-BPLMGPNK.cjs +0 -20
  183. package/dist/SettingsApp-JVOSEFH3.css +0 -283
  184. package/dist/SettingsApp-LUDIXCYY.js +0 -14
  185. package/dist/SettingsMenuBar-5CBSSMVM.css +0 -56
  186. package/dist/SettingsMenuBar-VLT6TTCM.js +0 -6
  187. package/dist/SettingsMenuBar-Y5QEXDEO.cjs +0 -15
  188. package/dist/StorybookApp-NQ244BER.css +0 -7
  189. package/dist/StorybookApp-NZDV4X3Y.js +0 -1
  190. package/dist/StorybookApp-VF3KIMU3.cjs +0 -7
  191. package/dist/TerminalApp-CDGWRBFJ.cjs +0 -10
  192. package/dist/TerminalApp-EAATMIMX.css +0 -77
  193. package/dist/TerminalApp-GCKJCM55.js +0 -4
  194. package/dist/TerminalMenuBar-3J26O26Q.css +0 -56
  195. package/dist/TerminalMenuBar-7BH7MGNJ.cjs +0 -14
  196. package/dist/TerminalMenuBar-7JAEQUZ4.js +0 -5
  197. package/dist/UploaderApp-6KV3TGCT.css +0 -1817
  198. package/dist/UploaderApp-FJC2J4I5.js +0 -10
  199. package/dist/UploaderApp-HLXJYJZQ.cjs +0 -16
  200. package/dist/chunk-2PSTHGTD.cjs +0 -42
  201. package/dist/chunk-2RQX7QBP.cjs +0 -148
  202. package/dist/chunk-43W6UDUZ.cjs +0 -19
  203. package/dist/chunk-4E45FBAH.js +0 -223
  204. package/dist/chunk-4E4U2A25.cjs +0 -237
  205. package/dist/chunk-4QHX7CMN.cjs +0 -38
  206. package/dist/chunk-4XURSNM4.js +0 -43
  207. package/dist/chunk-4ZCRYHL6.js +0 -407
  208. package/dist/chunk-5C6IQE42.cjs +0 -35
  209. package/dist/chunk-5HUYQDQF.js +0 -36
  210. package/dist/chunk-5NOHYJNH.js +0 -84
  211. package/dist/chunk-5QFZW6HW.js +0 -2241
  212. package/dist/chunk-5YH6AKEO.js +0 -146
  213. package/dist/chunk-756GPSPM.js +0 -283
  214. package/dist/chunk-7WUYUTPN.js +0 -2293
  215. package/dist/chunk-7XCMBW64.js +0 -162
  216. package/dist/chunk-7Y7HB7FB.cjs +0 -53
  217. package/dist/chunk-ABIAPZ6S.cjs +0 -45
  218. package/dist/chunk-ACHGJKCI.cjs +0 -286
  219. package/dist/chunk-BQCD5RAF.cjs +0 -48
  220. package/dist/chunk-BQL3YXMV.js +0 -17429
  221. package/dist/chunk-C3XER4N3.js +0 -442
  222. package/dist/chunk-C6BEZNAM.cjs +0 -45
  223. package/dist/chunk-CILU6BWC.cjs +0 -548
  224. package/dist/chunk-CV5PUHAE.cjs +0 -86
  225. package/dist/chunk-D5MVFFID.js +0 -42
  226. package/dist/chunk-D7R55WWT.js +0 -1601
  227. package/dist/chunk-DFYDUXWP.cjs +0 -34
  228. package/dist/chunk-DWP2SYF7.js +0 -55
  229. package/dist/chunk-E55VXNLK.cjs +0 -17498
  230. package/dist/chunk-E5FW77FG.js +0 -77
  231. package/dist/chunk-EAELL43F.js +0 -42
  232. package/dist/chunk-EX5V2ZTU.js +0 -40
  233. package/dist/chunk-FD7QZCTN.cjs +0 -2329
  234. package/dist/chunk-FH4ILMKF.js +0 -38
  235. package/dist/chunk-FRHBM2U7.js +0 -33
  236. package/dist/chunk-FX2TPX3L.cjs +0 -45
  237. package/dist/chunk-GPXNLTPI.cjs +0 -451
  238. package/dist/chunk-GRYCUBJZ.js +0 -9
  239. package/dist/chunk-HPHHS7FJ.cjs +0 -49
  240. package/dist/chunk-HWHBSAUC.js +0 -40
  241. package/dist/chunk-IDHP3R4I.js +0 -31
  242. package/dist/chunk-IHWGT3DL.js +0 -86
  243. package/dist/chunk-JEBKLIMU.cjs +0 -123
  244. package/dist/chunk-KDZLBI6F.cjs +0 -324
  245. package/dist/chunk-KQHICFX3.js +0 -121
  246. package/dist/chunk-LMJE6V4N.cjs +0 -42
  247. package/dist/chunk-MCHPDWVH.js +0 -444
  248. package/dist/chunk-MVDGM5Y4.js +0 -68
  249. package/dist/chunk-N36HBL53.cjs +0 -165
  250. package/dist/chunk-NV5GNFA3.js +0 -541
  251. package/dist/chunk-NVEGEK3N.js +0 -31
  252. package/dist/chunk-OJIDKDKF.js +0 -68
  253. package/dist/chunk-PGGNSLM7.js +0 -215
  254. package/dist/chunk-PKPQA5NR.js +0 -15
  255. package/dist/chunk-PNDBLFJW.cjs +0 -50
  256. package/dist/chunk-Q3WA72BF.cjs +0 -70
  257. package/dist/chunk-RDIDAZ3S.cjs +0 -9
  258. package/dist/chunk-RGJPRXYY.js +0 -48
  259. package/dist/chunk-RPSYXORB.cjs +0 -219
  260. package/dist/chunk-RQ6OZRUW.cjs +0 -41
  261. package/dist/chunk-SBE4SZAN.cjs +0 -226
  262. package/dist/chunk-TAFNCDUI.js +0 -234
  263. package/dist/chunk-TFIDSENE.cjs +0 -88
  264. package/dist/chunk-TGWMOHAO.js +0 -17
  265. package/dist/chunk-UA6XSTW6.js +0 -48
  266. package/dist/chunk-UIQCTAVM.cjs +0 -59
  267. package/dist/chunk-UKYESVDS.cjs +0 -50
  268. package/dist/chunk-V4N255NL.cjs +0 -2309
  269. package/dist/chunk-VO6KXO2I.js +0 -32
  270. package/dist/chunk-WXSTSC3D.cjs +0 -83
  271. package/dist/chunk-XSK7BWYO.js +0 -47
  272. package/dist/chunk-XVAPJ4PP.cjs +0 -449
  273. package/dist/chunk-XVASHRCE.cjs +0 -70
  274. package/dist/chunk-XYSMVQQD.cjs +0 -1608
  275. package/dist/chunk-YAIWI4Z5.js +0 -7
  276. package/dist/chunk-YGYOLDKR.js +0 -280
  277. package/dist/chunk-YP2PLNOF.cjs +0 -34
  278. package/dist/chunk-YSOLW4FS.cjs +0 -11
  279. package/dist/chunk-YY6OUR2U.js +0 -44
  280. package/dist/chunk-YZWS7FDT.cjs +0 -409
  281. package/dist/chunk-Z5YGWL65.cjs +0 -39
  282. package/dist/chunk-ZHNDXNL4.js +0 -45
  283. package/dist/chunk-ZX3EDZ5C.cjs +0 -17
  284. package/dist/index.d.cts +0 -2019
@@ -0,0 +1,364 @@
1
+ import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
+ import { a as t, b as n, o as r } from "./desktopStore-F8bgLqFl.js";
3
+ import { i } from "./useCloseInterceptor-BZd3VILp.js";
4
+ import { t as a } from "./VscIcon-DBfVnArE.js";
5
+ import { n as o, r as s } from "./FilePickerApp-DaMgEqKh.js";
6
+ import { n as c } from "./notesStore-BPyRTHEc.js";
7
+ import { useCallback as l, useEffect as u, useRef as d, useState as f } from "react";
8
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
9
+ import { create as h } from "zustand";
10
+ import { createJSONStorage as g, persist as _ } from "zustand/middleware";
11
+ import { useTranslation as v } from "react-i18next";
12
+ import { EditorContent as y, useEditor as b, useEditorState as x } from "@tiptap/react";
13
+ import S from "@tiptap/starter-kit";
14
+ import { Markdown as C } from "@tiptap/markdown";
15
+ import { Extension as w } from "@tiptap/core";
16
+ //#region src/stores/AppTempMemory.ts
17
+ var T = h()(_((e, t) => ({
18
+ snapshots: {},
19
+ setSnapshot: (t, n) => e((e) => ({ snapshots: {
20
+ ...e.snapshots,
21
+ [t]: n
22
+ } })),
23
+ getSnapshot: (e) => {
24
+ let { snapshots: n } = t();
25
+ return n[e] ?? null;
26
+ },
27
+ clearSnapshot: (t) => e((e) => {
28
+ let n = { ...e.snapshots };
29
+ return delete n[t], { snapshots: n };
30
+ })
31
+ }), {
32
+ name: "fde-desktop:appTempMemory",
33
+ storage: g(() => localStorage)
34
+ })), E = {
35
+ container: "_container_3xue5_1",
36
+ toolbar: "_toolbar_3xue5_11",
37
+ toolbarBtn: "_toolbarBtn_3xue5_22",
38
+ active: "_active_3xue5_57",
39
+ separator: "_separator_3xue5_63",
40
+ editorContent: "_editorContent_3xue5_71"
41
+ }, D = /* @__PURE__ */ e({ default: () => A }), ee = [...n], O = w.create({
42
+ name: "clearMarksOnEnter",
43
+ addKeyboardShortcuts() {
44
+ return { Enter: ({ editor: e }) => {
45
+ let { state: t, dispatch: n } = e.view, { selection: r, schema: i } = t, { $from: a, empty: o } = r;
46
+ return !o || a.parent.type !== i.nodes.paragraph ? !1 : (n(t.tr.split(a.pos).setStoredMarks([])), !0);
47
+ } };
48
+ }
49
+ }), k = "Desktop/NotesAppWelcome.md", A = ({ window: e, notifyReady: n }) => {
50
+ let { t: h } = v("notes"), g = e, _ = g?.id, w = _ ? `notesApp-${_}` : "notesApp", D = g?.contentData, [A, j] = f(D?.initialName ?? h("untitled")), [M, N] = f(!1), P = d("save"), [F, I] = f(D?.fileId ?? null), L = d(D?.initialContent ?? ""), [R, z] = f(!1), B = c((e) => e.states[_ ?? ""]?.contentLoaded ?? !1), V = c((e) => e.setContentLoaded);
51
+ u(() => {
52
+ _ && c.getState().reset(_);
53
+ }, [_]), u(() => {
54
+ _ && c.getState().setIsDirty(_, R);
55
+ }, [_, R]);
56
+ let H = r((e) => e.createFile), U = r((e) => e.updateFile), W = r((e) => e.fsNodes), G = b({
57
+ extensions: [
58
+ S,
59
+ C,
60
+ O
61
+ ],
62
+ content: D?.initialContent ?? "",
63
+ contentType: "markdown",
64
+ shouldRerenderOnTransaction: !1,
65
+ onCreate: () => {
66
+ let e = G?.getMarkdown() ?? "";
67
+ L.current = e, w && T.getState().setSnapshot(w, e);
68
+ },
69
+ onUpdate: () => {
70
+ let e = G?.getMarkdown() ?? "", t = e !== (L.current ?? "");
71
+ z(t), !t && w && T.getState().setSnapshot(w, e);
72
+ }
73
+ });
74
+ u(() => {
75
+ if (!F || !G || B) return;
76
+ let e = W.find((e) => e.id === F);
77
+ if (!e || e.type !== "file") return;
78
+ let t = e;
79
+ t.content && t.content !== (L.current ?? "") && (L.current = t.content, w && T.getState().setSnapshot(w, t.content), G.commands.setContent(t.content, {
80
+ emitUpdate: !1,
81
+ contentType: "markdown"
82
+ }), V(_, !0));
83
+ }, [
84
+ F,
85
+ G,
86
+ w,
87
+ W,
88
+ B,
89
+ _,
90
+ V
91
+ ]), u(() => {
92
+ if (!G || !_ || B) return;
93
+ let e = !1, n = new AbortController();
94
+ return (async () => {
95
+ try {
96
+ if (D?.initialContent) {
97
+ e || (G.commands.setContent(D.initialContent, {
98
+ emitUpdate: !1,
99
+ contentType: "markdown"
100
+ }), V(_, !0));
101
+ return;
102
+ }
103
+ if (D?.url) {
104
+ let r = await t(D.url, n.signal);
105
+ !e && r && (G.commands.setContent(r, {
106
+ emitUpdate: !1,
107
+ contentType: "markdown"
108
+ }), V(_, !0));
109
+ return;
110
+ }
111
+ if (D?.fileId) return;
112
+ let r = await fetch(`/${k}`, { signal: n.signal });
113
+ if (!e && r.ok) {
114
+ let e = await r.text();
115
+ G.commands.setContent(e, {
116
+ emitUpdate: !1,
117
+ contentType: "markdown"
118
+ }), V(_, !0);
119
+ }
120
+ } catch (t) {
121
+ !e && t instanceof Error && t.name !== "AbortError" && console.warn("Failed to load content:", t);
122
+ }
123
+ })(), () => {
124
+ e = !0, n.abort();
125
+ };
126
+ }, [
127
+ G,
128
+ D,
129
+ _,
130
+ B,
131
+ V
132
+ ]);
133
+ let K = l(() => G ? G.getMarkdown() : "", [G]), q = l(() => {
134
+ G?.commands.setContent("", {
135
+ emitUpdate: !1,
136
+ contentType: "markdown"
137
+ }), I(null), j("untitled.md"), L.current = "", z(!1), _ && V(_, !0);
138
+ }, [
139
+ G,
140
+ _,
141
+ V
142
+ ]), J = l(() => {
143
+ G && (F ? (U(F, K()), L.current = K(), z(!1)) : (P.current = "save", N(!0)));
144
+ }, [
145
+ G,
146
+ K,
147
+ U,
148
+ F
149
+ ]), Y = l(() => {
150
+ G && (P.current = "saveAs", N(!0));
151
+ }, [G]), X = l(async ({ parentId: e, name: t }) => {
152
+ if (!G) return;
153
+ let n = K();
154
+ if (P.current === "saveAs" || !F) {
155
+ let r = await H(t, n, e);
156
+ I(r.id), j(r.name);
157
+ } else await U(F, n);
158
+ L.current = n, z(!1), N(!1);
159
+ }, [
160
+ G,
161
+ K,
162
+ H,
163
+ U,
164
+ F
165
+ ]), [te, Z] = f(!1), ne = l((e) => {
166
+ I(e.id), j(e.name), L.current = e.content ?? "", z(!1), Z(!1);
167
+ let n = e.url;
168
+ n ? t(n).then((e) => {
169
+ e && (G?.commands.setContent(e, {
170
+ emitUpdate: !1,
171
+ contentType: "markdown"
172
+ }), _ && V(_, !0));
173
+ }) : e.content && (G?.commands.setContent(e.content, {
174
+ emitUpdate: !1,
175
+ contentType: "markdown"
176
+ }), _ && V(_, !0));
177
+ }, [
178
+ G,
179
+ _,
180
+ V
181
+ ]), Q = l(() => Z(!0), []);
182
+ u(() => {
183
+ let e = {
184
+ new: q,
185
+ save: J,
186
+ saveAs: Y
187
+ };
188
+ n?.({
189
+ ...g?.contentData ?? {},
190
+ actions: e,
191
+ setPickerOpen: Q,
192
+ isDirty: R
193
+ });
194
+ }, [
195
+ q,
196
+ J,
197
+ Y,
198
+ g,
199
+ n,
200
+ Q,
201
+ R
202
+ ]), i({
203
+ isDirtyGetter: l(() => (G?.getMarkdown() ?? "") !== (L.current ?? ""), [G]),
204
+ windowId: _,
205
+ onDiscard: () => {
206
+ if (!G) return;
207
+ let e = L.current ?? "";
208
+ G.commands.setContent(e, {
209
+ emitUpdate: !1,
210
+ contentType: "markdown"
211
+ }), z(!1);
212
+ },
213
+ onSave: J
214
+ });
215
+ let $ = x({
216
+ editor: G,
217
+ selector: (e) => ({
218
+ canUndo: e.editor?.can().undo() ?? !1,
219
+ canRedo: e.editor?.can().redo() ?? !1,
220
+ isBold: e.editor?.isActive("bold") ?? !1,
221
+ isItalic: e.editor?.isActive("italic") ?? !1,
222
+ isStrike: e.editor?.isActive("strike") ?? !1,
223
+ isCode: e.editor?.isActive("code") ?? !1,
224
+ isH1: e.editor?.isActive("heading", { level: 1 }) ?? !1,
225
+ isH2: e.editor?.isActive("heading", { level: 2 }) ?? !1,
226
+ isBulletList: e.editor?.isActive("bulletList") ?? !1,
227
+ isOrderedList: e.editor?.isActive("orderedList") ?? !1,
228
+ isBlockquote: e.editor?.isActive("blockquote") ?? !1,
229
+ isCodeBlock: e.editor?.isActive("codeBlock") ?? !1
230
+ })
231
+ });
232
+ return /* @__PURE__ */ m("div", {
233
+ className: E.container,
234
+ "data-windowid": g?.id,
235
+ children: [
236
+ /* @__PURE__ */ m("div", {
237
+ className: E.toolbar,
238
+ role: "toolbar",
239
+ "aria-label": h("toolbar.formatting"),
240
+ children: [
241
+ /* @__PURE__ */ p("button", {
242
+ className: `${E.toolbarBtn} ${$?.isBold ? E.active : ""}`,
243
+ onClick: () => G?.chain().focus().toggleBold().run(),
244
+ disabled: !G?.can().chain().focus().toggleBold().run(),
245
+ title: h("toolbar.bold"),
246
+ "aria-label": h("toolbar.bold"),
247
+ children: /* @__PURE__ */ p(a, { name: "VscBold" })
248
+ }),
249
+ /* @__PURE__ */ p("button", {
250
+ className: `${E.toolbarBtn} ${$?.isItalic ? E.active : ""}`,
251
+ onClick: () => G?.chain().focus().toggleItalic().run(),
252
+ disabled: !G?.can().chain().focus().toggleItalic().run(),
253
+ title: h("toolbar.italic"),
254
+ "aria-label": h("toolbar.italic"),
255
+ children: /* @__PURE__ */ p(a, { name: "VscItalic" })
256
+ }),
257
+ /* @__PURE__ */ p("button", {
258
+ className: `${E.toolbarBtn} ${$?.isStrike ? E.active : ""}`,
259
+ onClick: () => G?.chain().focus().toggleStrike().run(),
260
+ disabled: !G?.can().chain().focus().toggleStrike().run(),
261
+ title: h("toolbar.strikethrough"),
262
+ "aria-label": h("toolbar.strikethrough"),
263
+ children: /* @__PURE__ */ p("s", { children: "S" })
264
+ }),
265
+ /* @__PURE__ */ p("button", {
266
+ className: `${E.toolbarBtn} ${$?.isCode ? E.active : ""}`,
267
+ onClick: () => G?.chain().focus().toggleCode().run(),
268
+ disabled: !G?.can().chain().focus().toggleCode().run(),
269
+ title: h("toolbar.inlineCode"),
270
+ "aria-label": h("toolbar.inlineCode"),
271
+ children: /* @__PURE__ */ p(a, { name: "VscCode" })
272
+ }),
273
+ /* @__PURE__ */ p("span", { className: E.separator }),
274
+ /* @__PURE__ */ p("button", {
275
+ className: `${E.toolbarBtn} ${$?.isH1 ? E.active : ""}`,
276
+ onClick: () => G?.chain().focus().toggleHeading({ level: 1 }).run(),
277
+ title: h("toolbar.heading1"),
278
+ "aria-label": h("toolbar.heading1"),
279
+ children: /* @__PURE__ */ p("strong", { children: "H1" })
280
+ }),
281
+ /* @__PURE__ */ p("button", {
282
+ className: `${E.toolbarBtn} ${$?.isH2 ? E.active : ""}`,
283
+ onClick: () => G?.chain().focus().toggleHeading({ level: 2 }).run(),
284
+ title: h("toolbar.heading2"),
285
+ "aria-label": h("toolbar.heading2"),
286
+ children: /* @__PURE__ */ p("strong", { children: "H2" })
287
+ }),
288
+ /* @__PURE__ */ p("span", { className: E.separator }),
289
+ /* @__PURE__ */ p("button", {
290
+ className: `${E.toolbarBtn} ${$?.isBulletList ? E.active : ""}`,
291
+ onClick: () => G?.chain().focus().toggleBulletList().run(),
292
+ title: h("toolbar.bulletList"),
293
+ "aria-label": h("toolbar.bulletList"),
294
+ children: /* @__PURE__ */ p(a, { name: "VscListUnordered" })
295
+ }),
296
+ /* @__PURE__ */ p("button", {
297
+ className: `${E.toolbarBtn} ${$?.isOrderedList ? E.active : ""}`,
298
+ onClick: () => G?.chain().focus().toggleOrderedList().run(),
299
+ title: h("toolbar.orderedList"),
300
+ "aria-label": h("toolbar.orderedList"),
301
+ children: /* @__PURE__ */ p(a, { name: "VscListOrdered" })
302
+ }),
303
+ /* @__PURE__ */ p("span", { className: E.separator }),
304
+ /* @__PURE__ */ p("button", {
305
+ className: `${E.toolbarBtn} ${$?.isBlockquote ? E.active : ""}`,
306
+ onClick: () => G?.chain().focus().toggleBlockquote().run(),
307
+ title: h("toolbar.blockquote"),
308
+ "aria-label": h("toolbar.blockquote"),
309
+ children: /* @__PURE__ */ p(a, { name: "VscQuote" })
310
+ }),
311
+ /* @__PURE__ */ p("button", {
312
+ className: `${E.toolbarBtn} ${$?.isCodeBlock ? E.active : ""}`,
313
+ onClick: () => G?.chain().focus().toggleCodeBlock().run(),
314
+ title: h("toolbar.codeBlock"),
315
+ "aria-label": h("toolbar.codeBlock"),
316
+ children: /* @__PURE__ */ p(a, { name: "VscTerminal" })
317
+ }),
318
+ /* @__PURE__ */ p("button", {
319
+ className: E.toolbarBtn,
320
+ onClick: () => G?.chain().focus().setHorizontalRule().run(),
321
+ title: h("toolbar.horizontalRule"),
322
+ "aria-label": h("toolbar.horizontalRule"),
323
+ children: /* @__PURE__ */ p(a, { name: "VscHorizontalRule" })
324
+ }),
325
+ /* @__PURE__ */ p("span", { className: E.separator }),
326
+ /* @__PURE__ */ p("button", {
327
+ className: E.toolbarBtn,
328
+ onClick: () => G?.chain().focus().undo().run(),
329
+ disabled: !$?.canUndo,
330
+ title: h("common:actions.undo"),
331
+ "aria-label": h("common:actions.undo"),
332
+ children: /* @__PURE__ */ p(a, { name: "VscDiscard" })
333
+ }),
334
+ /* @__PURE__ */ p("button", {
335
+ className: E.toolbarBtn,
336
+ onClick: () => G?.chain().focus().redo().run(),
337
+ disabled: !$?.canRedo,
338
+ title: h("common:actions.redo"),
339
+ "aria-label": h("common:actions.redo"),
340
+ children: /* @__PURE__ */ p(a, { name: "VscRedo" })
341
+ })
342
+ ]
343
+ }),
344
+ /* @__PURE__ */ p(y, {
345
+ editor: G,
346
+ className: E.editorContent
347
+ }),
348
+ /* @__PURE__ */ p(o, {
349
+ opened: te,
350
+ acceptedMimeTypes: ee,
351
+ onConfirm: ne,
352
+ onCancel: () => Z(!1)
353
+ }),
354
+ /* @__PURE__ */ p(s, {
355
+ opened: M,
356
+ initialName: A,
357
+ onConfirm: X,
358
+ onCancel: () => N(!1)
359
+ })
360
+ ]
361
+ });
362
+ };
363
+ //#endregion
364
+ export { D as n, T as r, A as t };
@@ -0,0 +1 @@
1
+ const e=require(`./NotesApp-BOcRGO7w.cjs`);exports.default=e.t;
@@ -0,0 +1 @@
1
+ const e=require(`./NotesMenuBar-Df6aW85J.cjs`);exports.NotesMenuBar=e.t;
@@ -0,0 +1 @@
1
+ require(`./Box-zW6Twge8.cjs`);const e=require(`./AppMenuBar-B9U0n1Vv.cjs`),t=require(`./notesStore-BCEl1D_v.cjs`),n=require(`./useMenuBarUtils-nJIPJGIQ.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`),a=require(`react-i18next`);var o=e=>{let{windowId:i,contentData:o,onExit:s}=e,{t:c}=(0,a.useTranslation)(`common`),l=t.t(i),u=o?.actions,d=o?.setPickerOpen;return(0,r.useMemo)(()=>n.t([{type:`menu`,label:c(`menu.file`),items:[{type:`item`,label:c(`actions.new`),icon:`FcEditImage`,onClick:()=>u?.new?.()},{type:`item`,label:c(`actions.open`),icon:`FcOpenedFolder`,onClick:()=>d?.()},{type:`divider`},{type:`item`,label:c(`actions.save`),icon:`FcInspection`,onClick:()=>u?.save?.(),disabled:!l},{type:`item`,label:c(`actions.saveAs`),icon:`FcDeployment`,onClick:()=>u?.saveAs?.()},{type:`divider`},{type:`item`,label:c(`actions.exit`),icon:`FcLeft`,onClick:s}]}],l),[c,u,d,l,s])},s=({windowId:t,contentData:n,onExit:r})=>(0,i.jsx)(e.t,{elements:o({windowId:t,contentData:n,onExit:r})});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
@@ -0,0 +1,62 @@
1
+ import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
+ import { t } from "./AppMenuBar-CnIEVjr8.js";
3
+ import { t as n } from "./notesStore-BPyRTHEc.js";
4
+ import { t as r } from "./useMenuBarUtils-nmu9yehT.js";
5
+ import { useMemo as i } from "react";
6
+ import { jsx as a } from "react/jsx-runtime";
7
+ import { useTranslation as o } from "react-i18next";
8
+ //#region src/components/Apps/NotesApp/useNotesMenuBar.ts
9
+ var s = (e) => {
10
+ let { windowId: t, contentData: a, onExit: s } = e, { t: c } = o("common"), l = n(t), u = a?.actions, d = a?.setPickerOpen;
11
+ return i(() => r([{
12
+ type: "menu",
13
+ label: c("menu.file"),
14
+ items: [
15
+ {
16
+ type: "item",
17
+ label: c("actions.new"),
18
+ icon: "FcEditImage",
19
+ onClick: () => u?.new?.()
20
+ },
21
+ {
22
+ type: "item",
23
+ label: c("actions.open"),
24
+ icon: "FcOpenedFolder",
25
+ onClick: () => d?.()
26
+ },
27
+ { type: "divider" },
28
+ {
29
+ type: "item",
30
+ label: c("actions.save"),
31
+ icon: "FcInspection",
32
+ onClick: () => u?.save?.(),
33
+ disabled: !l
34
+ },
35
+ {
36
+ type: "item",
37
+ label: c("actions.saveAs"),
38
+ icon: "FcDeployment",
39
+ onClick: () => u?.saveAs?.()
40
+ },
41
+ { type: "divider" },
42
+ {
43
+ type: "item",
44
+ label: c("actions.exit"),
45
+ icon: "FcLeft",
46
+ onClick: s
47
+ }
48
+ ]
49
+ }], l), [
50
+ c,
51
+ u,
52
+ d,
53
+ l,
54
+ s
55
+ ]);
56
+ }, c = /* @__PURE__ */ e({ NotesMenuBar: () => l }), l = ({ windowId: e, contentData: n, onExit: r }) => /* @__PURE__ */ a(t, { elements: s({
57
+ windowId: e,
58
+ contentData: n,
59
+ onExit: r
60
+ }) });
61
+ //#endregion
62
+ export { c as n, l as t };
@@ -0,0 +1,30 @@
1
+ import { A as e, D as t, c as n, j as r, l as i, n as a, t as o } from "./Box-DSKR_qaa.js";
2
+ import { jsx as s } from "react/jsx-runtime";
3
+ //#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Paper/Paper.module.mjs
4
+ var c = { root: "m_1b7284a3" }, l = t((t, { radius: n, shadow: i }) => ({ root: {
5
+ "--paper-radius": n === void 0 ? void 0 : e(n),
6
+ "--paper-shadow": r(i)
7
+ } })), u = a((e) => {
8
+ let t = i("Paper", null, e), { classNames: r, className: a, style: u, styles: d, unstyled: f, withBorder: p, vars: m, radius: h, shadow: g, variant: _, mod: v, attributes: y, ...b } = t, x = n({
9
+ name: "Paper",
10
+ props: t,
11
+ classes: c,
12
+ className: a,
13
+ style: u,
14
+ classNames: r,
15
+ styles: d,
16
+ unstyled: f,
17
+ attributes: y,
18
+ vars: m,
19
+ varsResolver: l
20
+ });
21
+ return /* @__PURE__ */ s(o, {
22
+ mod: [{ "data-with-border": p }, v],
23
+ ...x("root"),
24
+ variant: _,
25
+ ...b
26
+ });
27
+ });
28
+ u.classes = c, u.varsResolver = l, u.displayName = "@mantine/core/Paper";
29
+ //#endregion
30
+ export { u as t };
@@ -0,0 +1 @@
1
+ const e=require(`./Box-zW6Twge8.cjs`);let t=require(`react/jsx-runtime`);var n={root:`m_1b7284a3`},r=e.D((t,{radius:n,shadow:r})=>({root:{"--paper-radius":n===void 0?void 0:e.A(n),"--paper-shadow":e.j(r)}})),i=e.n(i=>{let a=e.l(`Paper`,null,i),{classNames:o,className:s,style:c,styles:l,unstyled:u,withBorder:d,vars:f,radius:p,shadow:m,variant:h,mod:g,attributes:_,...v}=a,y=e.c({name:`Paper`,props:a,classes:n,className:s,style:c,classNames:o,styles:l,unstyled:u,attributes:_,vars:f,varsResolver:r});return(0,t.jsx)(e.t,{mod:[{"data-with-border":d},g],...y(`root`),variant:h,...v})});i.classes=n,i.varsResolver=r,i.displayName=`@mantine/core/Paper`,Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
@@ -0,0 +1 @@
1
+ require(`./Box-zW6Twge8.cjs`);const e=require(`./useResolvedUrl-BkMPM1fM.cjs`),t=require(`./FilePickerApp-DjmuSFqa.cjs`),n=require(`./AppEmptyState-BWCUbf-B.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`),a=require(`react-i18next`);var o={container:`_container_1hj4w_1`,frame:`_frame_1hj4w_7`},s=({window:s,notifyReady:c})=>{let{t:l}=(0,a.useTranslation)(`apps`),u=s,d=u?.contentData?.src,[f,p]=(0,r.useState)(d??void 0),[m,h]=(0,r.useState)(!1),g=e.t(f);(0,r.useEffect)(()=>{c?.({...u?.contentData??{},setPickerOpen:()=>h(!0)})},[u,c]);let _=(0,r.useCallback)(e=>{p(e.url??e.name),h(!1)},[]);return(0,i.jsxs)(`div`,{className:o.container,"data-windowid":u?.id,children:[g||f?(0,i.jsx)(`iframe`,{src:g??f,className:o.frame,title:l(`pdf.viewer`),"aria-label":l(`pdf.viewer`)}):(0,i.jsx)(n.t,{label:l(`pdf.noFile`,{defaultValue:`No PDF loaded`})}),(0,i.jsx)(t.n,{opened:m,acceptedMimeTypes:[`application/pdf`],onConfirm:_,onCancel:()=>h(!1)})]})};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
@@ -0,0 +1 @@
1
+ const e=require(`./PdfApp-CNEbty5v.cjs`);exports.default=e.t;
@@ -0,0 +1,39 @@
1
+ import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
+ import { t } from "./useResolvedUrl-DQpLqOoL.js";
3
+ import { n } from "./FilePickerApp-DaMgEqKh.js";
4
+ import { t as r } from "./AppEmptyState-Bxpit0JV.js";
5
+ import { useCallback as i, useEffect as a, useState as o } from "react";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
+ import { useTranslation as l } from "react-i18next";
8
+ var u = {
9
+ container: "_container_1hj4w_1",
10
+ frame: "_frame_1hj4w_7"
11
+ }, d = /* @__PURE__ */ e({ default: () => f }), f = ({ window: e, notifyReady: d }) => {
12
+ let { t: f } = l("apps"), p = e, m = p?.contentData?.src, [h, g] = o(m ?? void 0), [_, v] = o(!1), y = t(h);
13
+ a(() => {
14
+ d?.({
15
+ ...p?.contentData ?? {},
16
+ setPickerOpen: () => v(!0)
17
+ });
18
+ }, [p, d]);
19
+ let b = i((e) => {
20
+ g(e.url ?? e.name), v(!1);
21
+ }, []);
22
+ return /* @__PURE__ */ c("div", {
23
+ className: u.container,
24
+ "data-windowid": p?.id,
25
+ children: [y || h ? /* @__PURE__ */ s("iframe", {
26
+ src: y ?? h,
27
+ className: u.frame,
28
+ title: f("pdf.viewer"),
29
+ "aria-label": f("pdf.viewer")
30
+ }) : /* @__PURE__ */ s(r, { label: f("pdf.noFile", { defaultValue: "No PDF loaded" }) }), /* @__PURE__ */ s(n, {
31
+ opened: _,
32
+ acceptedMimeTypes: ["application/pdf"],
33
+ onConfirm: b,
34
+ onCancel: () => v(!1)
35
+ })]
36
+ });
37
+ };
38
+ //#endregion
39
+ export { d as n, f as t };
@@ -0,0 +1 @@
1
+ const e=require(`./PdfMenuBar-Dj5cJUkg.cjs`);exports.PdfMenuBar=e.t;
@@ -0,0 +1,39 @@
1
+ import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
+ import { t } from "./AppMenuBar-CnIEVjr8.js";
3
+ import { memo as n, useMemo as r } from "react";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ import { useTranslation as a } from "react-i18next";
6
+ //#region src/components/Apps/PdfApp/usePdfMenuBar.ts
7
+ var o = (e) => {
8
+ let { contentData: t, onExit: n } = e, { t: i } = a("common"), o = t?.setPickerOpen;
9
+ return r(() => [{
10
+ type: "menu",
11
+ label: i("menu.file"),
12
+ items: [
13
+ {
14
+ type: "item",
15
+ label: i("actions.open"),
16
+ icon: "FcOpenedFolder",
17
+ onClick: () => o?.()
18
+ },
19
+ { type: "divider" },
20
+ {
21
+ type: "item",
22
+ label: i("actions.exit"),
23
+ icon: "FcLeft",
24
+ onClick: n
25
+ }
26
+ ]
27
+ }], [
28
+ i,
29
+ o,
30
+ n
31
+ ]);
32
+ }, s = /* @__PURE__ */ e({ PdfMenuBar: () => c }), c = n(({ windowId: e, contentData: n, onExit: r }) => /* @__PURE__ */ i(t, { elements: o({
33
+ windowId: e,
34
+ contentData: n,
35
+ onExit: r
36
+ }) }));
37
+ c.displayName = "PdfMenuBar";
38
+ //#endregion
39
+ export { s as n, c as t };
@@ -0,0 +1 @@
1
+ require(`./Box-zW6Twge8.cjs`);const e=require(`./AppMenuBar-B9U0n1Vv.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`),r=require(`react-i18next`);var i=e=>{let{contentData:n,onExit:i}=e,{t:a}=(0,r.useTranslation)(`common`),o=n?.setPickerOpen;return(0,t.useMemo)(()=>[{type:`menu`,label:a(`menu.file`),items:[{type:`item`,label:a(`actions.open`),icon:`FcOpenedFolder`,onClick:()=>o?.()},{type:`divider`},{type:`item`,label:a(`actions.exit`),icon:`FcLeft`,onClick:i}]}],[a,o,i])},a=(0,t.memo)(({windowId:t,contentData:r,onExit:a})=>(0,n.jsx)(e.t,{elements:i({windowId:t,contentData:r,onExit:a})}));a.displayName=`PdfMenuBar`,Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});