@fde-desktop/fde-core 0.4.10 → 0.4.11

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 (221) hide show
  1. package/dist/AppEmptyState-Boej96TB.js +49 -0
  2. package/dist/AppEmptyState-CLc00OOG.cjs +1 -0
  3. package/dist/AppIcon-C8vHUVcb.cjs +1 -0
  4. package/dist/AppIcon-mtEoyzOb.js +22 -0
  5. package/dist/AppMenuBar-CAlkNHjj.cjs +1 -0
  6. package/dist/AppMenuBar-DmSfQRXU.js +197 -0
  7. package/dist/CalendarApp-DOmjWbpl.js +10 -0
  8. package/dist/CalendarApp-Z0bCCYsK.cjs +1 -0
  9. package/dist/ColorPicker-CQRRwY-y.cjs +1 -0
  10. package/dist/ColorPicker-WCeD3Wjf.js +35 -0
  11. package/dist/CreateItemApp-BkFFFdX1.cjs +1 -0
  12. package/dist/CreateItemApp-DR8Y4bwo.js +202 -0
  13. package/dist/DeviceInfoApp-BXQ9uOwF.cjs +1 -0
  14. package/dist/DeviceInfoApp-I63mJRWy.js +195 -0
  15. package/dist/DownloadProgress-CkTGTf0z.cjs +1 -0
  16. package/dist/DownloadProgress-DnVASsv5.js +39 -0
  17. package/dist/FilePickerApp-By6-vbag.cjs +1 -0
  18. package/dist/FilePickerApp-ClHuhm6Z.js +390 -0
  19. package/dist/FilesApp-BC4UPNuw.cjs +1 -0
  20. package/dist/FilesApp-D8MqvC5X.js +210 -0
  21. package/dist/ImageViewerApp-B1niWF75.cjs +1 -0
  22. package/dist/{ImageViewerApp-CWiP6zx-.js → ImageViewerApp-iojtyFEf.js} +18 -17
  23. package/dist/{ImageViewerMenuBar-BULkh_Ku.js → ImageViewerMenuBar-BIsUokxV.js} +15 -14
  24. package/dist/ImageViewerMenuBar-BgzgSF3v.cjs +1 -0
  25. package/dist/MenuEditApp-BHptoJbz.cjs +1 -0
  26. package/dist/MenuEditApp-CJUbJaqh.js +492 -0
  27. package/dist/MenuEditMenuBar-CCOSPAUe.cjs +1 -0
  28. package/dist/{MenuEditMenuBar-B94z4Umw.js → MenuEditMenuBar-DnCL-kaZ.js} +13 -12
  29. package/dist/NotesApp-BmQIBtJ2.cjs +1 -0
  30. package/dist/NotesApp-DJ2dGt4-.js +364 -0
  31. package/dist/NotesMenuBar-BzojwMtH.cjs +1 -0
  32. package/dist/{NotesMenuBar-BB4NkKGf.js → NotesMenuBar-DILZTjnT.js} +10 -9
  33. package/dist/PdfApp-IjY_GtnW.js +39 -0
  34. package/dist/PdfApp-krW8UI97.cjs +1 -0
  35. package/dist/PdfMenuBar-Bd5MTZcZ.js +39 -0
  36. package/dist/PdfMenuBar-DWD0Qa3F.cjs +1 -0
  37. package/dist/SettingsApp-BE22l5UP.cjs +1 -0
  38. package/dist/SettingsApp-BTFtTFY_.js +1228 -0
  39. package/dist/SettingsMenuBar-CZE2evG2.cjs +1 -0
  40. package/dist/SettingsMenuBar-ktC0viTd.js +42 -0
  41. package/dist/UploaderApp-CbypD538.js +263 -0
  42. package/dist/UploaderApp-D_qD3O70.cjs +1 -0
  43. package/dist/{VscIcon-DueRJVTe.js → VscIcon-AEENjKOE.js} +1 -1
  44. package/dist/VscIcon-BYb_Soyy.cjs +1 -0
  45. package/dist/buildBreadcrumbs-Ccd8i11b.cjs +1 -0
  46. package/dist/buildBreadcrumbs-noWhu8os.js +45 -0
  47. package/dist/{desktopStore-B0R1-BeA.js → desktopStore-8cSZlj7s.js} +342 -549
  48. package/dist/desktopStore-C1jR6Fdb.cjs +1 -0
  49. package/dist/{imageViewerStore-CJMRXaQh.js → imageViewerStore-COrD02Zu.js} +1 -1
  50. package/dist/imageViewerStore-Dfylg59V.cjs +1 -0
  51. package/dist/index.cjs +1 -53
  52. package/dist/index.css +1 -1
  53. package/dist/index.d.ts +16 -6
  54. package/dist/index.js +3024 -7513
  55. package/dist/menuEditStore-CYwtfD6H.cjs +1 -0
  56. package/dist/{menuEditStore-C8S_EedM.js → menuEditStore-CxsgLiQu.js} +1 -1
  57. package/dist/notesStore-CrWTO6oB.cjs +1 -0
  58. package/dist/{notesStore-DKRgTTFn.js → notesStore-Dgah46U5.js} +1 -1
  59. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  60. package/dist/{settingsAppStore-KOeWRO6h.js → settingsAppStore-DHZhi6Rl.js} +1 -1
  61. package/dist/settingsAppStore-DuYZNeFf.cjs +1 -0
  62. package/dist/useAdaptiveDimensions-3Lz4X0Tc.cjs +1 -0
  63. package/dist/{useAdaptiveDimensions-CunsU0mn.js → useAdaptiveDimensions-DxNLJ7R5.js} +1 -1
  64. package/dist/{useCloseInterceptor-CuKAAFnj.js → useCloseInterceptor-CIxhOZx1.js} +12 -12
  65. package/dist/useCloseInterceptor-CdX-09Ib.cjs +1 -0
  66. package/dist/useDynamicIcon-CK6SjEv5.cjs +1 -0
  67. package/dist/{useDynamicIcon-GJg3vWsJ.js → useDynamicIcon-_wGeWu-b.js} +1 -1
  68. package/dist/useOpenApp-D-FOY88T.cjs +1 -0
  69. package/dist/{useOpenApp-BVpSfNrG.js → useOpenApp-DkZLFFCH.js} +51 -67
  70. package/dist/{useResolvedUrl-DFKXq598.js → useResolvedUrl-B6x4xy0x.js} +1 -2
  71. package/dist/useResolvedUrl-Bb39DpVy.cjs +1 -0
  72. package/package.json +3 -4
  73. package/dist/AccordionChevron-CJXAq5o5.js +0 -26
  74. package/dist/AccordionChevron-DBXp38Lm.cjs +0 -1
  75. package/dist/ActionIcon-C_SfdBfx.cjs +0 -1
  76. package/dist/ActionIcon-CtVbYlGY.js +0 -145
  77. package/dist/AppEmptyState-BTujnL_b.js +0 -4962
  78. package/dist/AppEmptyState-Dc4GaDfu.cjs +0 -1
  79. package/dist/AppIcon--qzR4sgf.cjs +0 -1
  80. package/dist/AppIcon-DCDuaU-t.js +0 -80
  81. package/dist/AppMenuBar-BiHbNg9V.cjs +0 -9
  82. package/dist/AppMenuBar-CHJy8OF0.js +0 -2639
  83. package/dist/Box-DRm8EabO.js +0 -1593
  84. package/dist/Box-D_64wv6n.cjs +0 -1
  85. package/dist/Button-D0FXpkur.cjs +0 -1
  86. package/dist/Button-k7SxX1Xl.js +0 -178
  87. package/dist/CalendarApp-C1HvuJoa.cjs +0 -1
  88. package/dist/CalendarApp-DBEQqsS_.js +0 -1721
  89. package/dist/Center-CyryG5zn.js +0 -25
  90. package/dist/Center-T4No_FAa.cjs +0 -1
  91. package/dist/CheckIcon-C3WjIR2i.js +0 -25
  92. package/dist/CheckIcon-CBMLR6Gc.cjs +0 -1
  93. package/dist/CodeServerApp-B3l5QPuG.cjs +0 -1
  94. package/dist/CodeServerApp-BpeALSaX.js +0 -2
  95. package/dist/CodeServerApp-CRjCngFv.cjs +0 -1
  96. package/dist/CodeServerApp-DY94cy1a.js +0 -149
  97. package/dist/ColorPicker-BL4UbKCV.cjs +0 -1
  98. package/dist/ColorPicker-DvRR-wlQ.js +0 -997
  99. package/dist/CreateItemApp-BU9wmjKM.cjs +0 -1
  100. package/dist/CreateItemApp-CtdH1K1g.js +0 -400
  101. package/dist/CreateItemApp-t9F-a6wD.cjs +0 -1
  102. package/dist/DeviceInfoApp-C306YvtZ.js +0 -223
  103. package/dist/DeviceInfoApp-Cdju_LIB.cjs +0 -1
  104. package/dist/DeviceInfoApp-CyB01v4D.cjs +0 -1
  105. package/dist/DownloadProgress-IRw1dzLX.cjs +0 -1
  106. package/dist/DownloadProgress-hdupSUBT.js +0 -174
  107. package/dist/FileIcon-BCpGMI5U.js +0 -88
  108. package/dist/FileIcon-BCrsxmtt.cjs +0 -1
  109. package/dist/FilePickerApp-DMGuvahM.js +0 -409
  110. package/dist/FilePickerApp-Eu0cr2Cm.cjs +0 -1
  111. package/dist/FilesApp-BQFVHkEn.js +0 -225
  112. package/dist/FilesApp-BZ_dzZnF.cjs +0 -1
  113. package/dist/FilesApp-SIWXFPXt.cjs +0 -1
  114. package/dist/Group-BzwlMeob.js +0 -48
  115. package/dist/Group-DhwePB84.cjs +0 -1
  116. package/dist/ImageViewerApp-BOz59TGc.cjs +0 -1
  117. package/dist/ImageViewerApp-BeqY6voE.cjs +0 -1
  118. package/dist/ImageViewerApp-DBAfJPSo.js +0 -2
  119. package/dist/ImageViewerMenuBar-Cb0Nr5-M.js +0 -2
  120. package/dist/ImageViewerMenuBar-CoEp0RxK.cjs +0 -1
  121. package/dist/ImageViewerMenuBar-zOkJtqKo.cjs +0 -1
  122. package/dist/MenuEditApp-BoKtj2GH.js +0 -2
  123. package/dist/MenuEditApp-D21sEp86.js +0 -2615
  124. package/dist/MenuEditApp-k3cPfTG9.cjs +0 -1
  125. package/dist/MenuEditApp-sz9GlLVH.cjs +0 -5
  126. package/dist/MenuEditMenuBar-6QxlIDpl.cjs +0 -1
  127. package/dist/MenuEditMenuBar-Bv6R42lf.js +0 -2
  128. package/dist/MenuEditMenuBar-CBsmH_-T.cjs +0 -1
  129. package/dist/NotesApp-BtR55Hva.cjs +0 -207
  130. package/dist/NotesApp-C59exz_9.js +0 -16154
  131. package/dist/NotesApp-D47I5LS_.js +0 -2
  132. package/dist/NotesApp-lOwsi2sg.cjs +0 -1
  133. package/dist/NotesMenuBar-BZITC74y.cjs +0 -1
  134. package/dist/NotesMenuBar-Bp0sPqyR.cjs +0 -1
  135. package/dist/NotesMenuBar-xlfODmMA.js +0 -2
  136. package/dist/Paper-DtUYKmYn.js +0 -30
  137. package/dist/Paper-DwCpwWwH.cjs +0 -1
  138. package/dist/PdfApp-1XbFGfoY.cjs +0 -1
  139. package/dist/PdfApp-BhIoJWeK.cjs +0 -1
  140. package/dist/PdfApp-C5Rt1Zaw.js +0 -2
  141. package/dist/PdfApp-C8Hwxxqh.js +0 -38
  142. package/dist/PdfMenuBar-BA9rKuMP.cjs +0 -1
  143. package/dist/PdfMenuBar-JXHqwxhZ.cjs +0 -1
  144. package/dist/PdfMenuBar-R0fu7oYF.js +0 -2
  145. package/dist/PdfMenuBar-sd-9Vk3h.js +0 -38
  146. package/dist/SettingsApp-7EhpjzUE.cjs +0 -1
  147. package/dist/SettingsApp-ByiPAj1I.cjs +0 -1
  148. package/dist/SettingsApp-d6fmBHxR.js +0 -1829
  149. package/dist/SettingsApp-qKJmC0lj.js +0 -2
  150. package/dist/SettingsMenuBar-BPwv8JQK.js +0 -41
  151. package/dist/SettingsMenuBar-D8R7hOik.js +0 -2
  152. package/dist/SettingsMenuBar-DDrjZLmg.cjs +0 -1
  153. package/dist/SettingsMenuBar-DQjUa8g1.cjs +0 -1
  154. package/dist/Slider-BNO-vDFn.js +0 -1175
  155. package/dist/Slider-Bg_EIBg6.cjs +0 -1
  156. package/dist/Stack-BOaJgV3N.cjs +0 -1
  157. package/dist/Stack-CuDEaP7e.js +0 -34
  158. package/dist/StorybookApp-Bkr-7mXp.cjs +0 -1
  159. package/dist/StorybookApp-WYninkJo.js +0 -10
  160. package/dist/TerminalApp-8XbsKAWa.js +0 -10041
  161. package/dist/TerminalApp-Bq2e7QQu.cjs +0 -1
  162. package/dist/TerminalApp-CVu3Axc9.js +0 -2
  163. package/dist/TerminalApp-b7_d0jRO.cjs +0 -36
  164. package/dist/TerminalMenuBar-Cb8x9laS.js +0 -2
  165. package/dist/TerminalMenuBar-De-FH5AE.cjs +0 -1
  166. package/dist/TerminalMenuBar-iKLydNda.js +0 -112
  167. package/dist/TerminalMenuBar-yOaWd-hn.cjs +0 -1
  168. package/dist/TextInput-C3qfxxWI.js +0 -980
  169. package/dist/TextInput-DcYns3hz.cjs +0 -1
  170. package/dist/Tooltip-CAOO-qdx.js +0 -3185
  171. package/dist/Tooltip-DDh_x-CB.cjs +0 -1
  172. package/dist/UnstyledButton-CI3kyRck.js +0 -25
  173. package/dist/UnstyledButton-Cl5RuIid.cjs +0 -1
  174. package/dist/UploaderApp-C76ydsd8.js +0 -487
  175. package/dist/UploaderApp-CHACW8Yr.js +0 -2
  176. package/dist/UploaderApp-Q_a3mBik.cjs +0 -1
  177. package/dist/UploaderApp-htj59ppo.cjs +0 -1
  178. package/dist/VscIcon-CxEmqD80.cjs +0 -1
  179. package/dist/chunk-BQCxAhux.js +0 -23
  180. package/dist/chunk-CiTBaPhY.cjs +0 -1
  181. package/dist/create-safe-context-95P-Bfg3.cjs +0 -1
  182. package/dist/create-safe-context-XT2cxc14.js +0 -12
  183. package/dist/desktopStore-Cox-Og1z.cjs +0 -1
  184. package/dist/fc-DejOsQyD.cjs +0 -1
  185. package/dist/fc-kd8WzIER.js +0 -20536
  186. package/dist/fc-xJ_v2ayq.cjs +0 -184
  187. package/dist/fi-BahYsbim.js +0 -9993
  188. package/dist/fi-BkhyTcZo.cjs +0 -1
  189. package/dist/getRuntime-BLXyQZBB.cjs +0 -1
  190. package/dist/getRuntime-CCRXVzJH.js +0 -63
  191. package/dist/iconBase-B4UCuSvv.cjs +0 -1
  192. package/dist/iconBase-D7iPes7B.js +0 -108
  193. package/dist/imageViewerStore-CH1qW6md.cjs +0 -1
  194. package/dist/is-element-BocgicRg.cjs +0 -1
  195. package/dist/is-element-Bu_JY8Qy.js +0 -7
  196. package/dist/menuEditStore-CU7IAg3L.cjs +0 -1
  197. package/dist/notesStore-zKmChTfF.cjs +0 -1
  198. package/dist/react-DYmzHD0X.js +0 -27
  199. package/dist/react-Dldg32sN.cjs +0 -1
  200. package/dist/settingsAppStore-BrlImdAH.cjs +0 -1
  201. package/dist/terminalStore-LWWjCvCe.js +0 -30
  202. package/dist/terminalStore-fZe5t7Ty.cjs +0 -1
  203. package/dist/use-merged-ref-BI9n1hUK.cjs +0 -1
  204. package/dist/use-merged-ref-BT8_u6vW.js +0 -25
  205. package/dist/use-resolved-styles-api-AVDygMKo.cjs +0 -1
  206. package/dist/use-resolved-styles-api-pEOi2wiK.js +0 -21
  207. package/dist/use-uncontrolled-A4hm9ATM.js +0 -23
  208. package/dist/use-uncontrolled-BPrfGv0W.cjs +0 -1
  209. package/dist/useAdaptiveDimensions-Btp0m5Pm.cjs +0 -1
  210. package/dist/useCloseInterceptor-a_6Lcuqj.cjs +0 -1
  211. package/dist/useDynamicIcon-SytdL1Tu.cjs +0 -1
  212. package/dist/useOpenApp-Br0jo4-y.cjs +0 -1
  213. package/dist/useResolvedUrl-Be5ZlCX7.cjs +0 -1
  214. package/dist/useTranslation-DMRGdqZi.js +0 -279
  215. package/dist/useTranslation-D_O7S4RJ.cjs +0 -1
  216. package/dist/vsc-Ciibqbxo.cjs +0 -1
  217. package/dist/vsc-DGKSpOAR.js +0 -9574
  218. /package/dist/{Colors-BxX4G8kX.cjs → Colors-CNJbU7oq.cjs} +0 -0
  219. /package/dist/{Colors-hca6raEG.js → Colors-CuABn2W4.js} +0 -0
  220. /package/dist/{useMenuBarUtils-ChmpZjwu.js → useMenuBarUtils-ChAfI7OA.js} +0 -0
  221. /package/dist/{useMenuBarUtils-Bp5PiztD.cjs → useMenuBarUtils-DAap0ukp.cjs} +0 -0
@@ -1,487 +0,0 @@
1
- import { L as e, N as t, O as n, P as r, c as i, d as a, i as o, j as s, k as c, l, r as u, t as d, x as f } from "./Box-DRm8EabO.js";
2
- import { t as p } from "./create-safe-context-XT2cxc14.js";
3
- import { c as m, s as h } from "./TextInput-C3qfxxWI.js";
4
- import { r as g, t as _ } from "./use-merged-ref-BT8_u6vW.js";
5
- import { i as v, r as y, t as b } from "./DownloadProgress-hdupSUBT.js";
6
- import { t as x } from "./UnstyledButton-CI3kyRck.js";
7
- import { t as S } from "./Paper-DtUYKmYn.js";
8
- import { t as C } from "./Group-BzwlMeob.js";
9
- import { o as w } from "./getRuntime-CCRXVzJH.js";
10
- import { t as T } from "./CheckIcon-C3WjIR2i.js";
11
- import { t as E } from "./Button-k7SxX1Xl.js";
12
- import { n as D, o as O, x as k } from "./desktopStore-B0R1-BeA.js";
13
- import { t as A } from "./useOpenApp-BVpSfNrG.js";
14
- import { t as j } from "./useTranslation-DMRGdqZi.js";
15
- import { i as M } from "./useDynamicIcon-GJg3vWsJ.js";
16
- import { i as N } from "./FilePickerApp-DMGuvahM.js";
17
- import { Activity as P, Children as F, cloneElement as I, createElement as L, useCallback as R, useRef as z, useState as B } from "react";
18
- import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
19
- //#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/FileButton/FileButton.mjs
20
- var W = o((e) => {
21
- let { onChange: t, children: n, multiple: r, accept: i, name: a, form: o, resetRef: s, disabled: c, capture: u, inputProps: d, ref: f, ...p } = l("FileButton", null, e), m = z(null), h = () => {
22
- !c && m.current?.click();
23
- };
24
- return _(s, () => {
25
- m.current && (m.current.value = "");
26
- }), /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("input", {
27
- style: { display: "none" },
28
- type: "file",
29
- accept: i,
30
- multiple: r,
31
- onChange: (e) => {
32
- if (e.currentTarget.files === null) return t(r ? [] : null);
33
- t(r ? Array.from(e.currentTarget.files) : e.currentTarget.files[0] || null);
34
- },
35
- ref: g(f, m),
36
- name: a,
37
- form: o,
38
- capture: u,
39
- ...d
40
- }), n({
41
- onClick: h,
42
- ...p
43
- })] });
44
- });
45
- W.displayName = "@mantine/core/FileButton";
46
- //#endregion
47
- //#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Stepper/Stepper.context.mjs
48
- var [G, K] = p("Stepper component was not found in tree"), q = () => null;
49
- q.displayName = "@mantine/core/StepperCompleted";
50
- //#endregion
51
- //#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Stepper/Stepper.module.mjs
52
- var J = {
53
- root: "m_cbb4ea7e",
54
- steps: "m_aaf89d0b",
55
- separator: "m_2a371ac9",
56
- content: "m_78da155d",
57
- step: "m_cbb57068",
58
- "step--horizontal": "m_f56b1e2c",
59
- "step--vertical": "m_833edb7e",
60
- verticalSeparator: "m_6496b3f3",
61
- stepWrapper: "m_818e70b",
62
- stepIcon: "m_1959ad01",
63
- stepIconContent: "m_8faaac38",
64
- stepCompletedIcon: "m_a79331dc",
65
- stepBody: "m_1956aa2a",
66
- stepLabel: "m_12051f6c",
67
- stepDescription: "m_164eea74"
68
- }, Y = (e, t) => typeof e == "function" ? /* @__PURE__ */ H(e, { step: t || 0 }) : e, ee = {
69
- withIcon: !0,
70
- allowStepClick: !0,
71
- iconPosition: "left"
72
- }, X = u((e) => {
73
- let { classNames: t, className: n, style: r, styles: i, vars: o, step: s, state: c, color: u, icon: d, completedIcon: p, progressIcon: g, label: _, description: v, withIcon: y, iconSize: b, loading: S, allowStepClick: C, allowStepSelect: w, iconPosition: E, orientation: D, mod: O, ...k } = l("StepperStep", ee, e), A = K(), j = a(), M = {
74
- classNames: t,
75
- styles: i
76
- }, N = c === "stepCompleted" ? null : c === "stepProgress" ? g : d, P = {
77
- "data-progress": c === "stepProgress" || void 0,
78
- "data-completed": c === "stepCompleted" || void 0
79
- };
80
- return /* @__PURE__ */ U(x, {
81
- ...A.getStyles("step", {
82
- className: n,
83
- style: r,
84
- variant: A.orientation,
85
- ...M
86
- }),
87
- mod: [{
88
- "icon-position": E || A.iconPosition,
89
- "allow-click": C
90
- }, O],
91
- ...P,
92
- ...k,
93
- __vars: { "--step-color": u ? f(u, j) : void 0 },
94
- tabIndex: C ? 0 : -1,
95
- children: [y && /* @__PURE__ */ U("span", {
96
- ...A.getStyles("stepWrapper", M),
97
- children: [/* @__PURE__ */ U("span", {
98
- ...A.getStyles("stepIcon", M),
99
- ...P,
100
- children: [/* @__PURE__ */ H(m, {
101
- mounted: c === "stepCompleted",
102
- transition: "pop",
103
- duration: 200,
104
- children: (e) => /* @__PURE__ */ H("span", {
105
- ...A.getStyles("stepCompletedIcon", {
106
- style: e,
107
- ...M
108
- }),
109
- children: S ? /* @__PURE__ */ H(h, {
110
- color: "var(--mantine-color-white)",
111
- size: "calc(var(--stepper-icon-size) / 2)",
112
- ...A.getStyles("stepLoader", M)
113
- }) : Y(p, s) || /* @__PURE__ */ H(T, { size: "60%" })
114
- })
115
- }), c === "stepCompleted" ? null : /* @__PURE__ */ H("span", {
116
- ...A.getStyles("stepIconContent", M),
117
- children: S ? /* @__PURE__ */ H(h, {
118
- ...A.getStyles("stepLoader", M),
119
- size: "calc(var(--stepper-icon-size) / 2)",
120
- color: u
121
- }) : Y(N || d, s)
122
- })]
123
- }), D === "vertical" && /* @__PURE__ */ H("span", {
124
- ...A.getStyles("verticalSeparator", M),
125
- "data-active": c === "stepCompleted" || void 0
126
- })]
127
- }), (_ || v) && /* @__PURE__ */ U("span", {
128
- ...A.getStyles("stepBody", M),
129
- "data-orientation": A.orientation,
130
- "data-icon-position": E || A.iconPosition,
131
- children: [_ && /* @__PURE__ */ H("span", {
132
- ...A.getStyles("stepLabel", M),
133
- children: Y(_, s)
134
- }), v && /* @__PURE__ */ H("span", {
135
- ...A.getStyles("stepDescription", M),
136
- children: Y(v, s)
137
- })]
138
- })]
139
- });
140
- });
141
- X.classes = J, X.displayName = "@mantine/core/StepperStep";
142
- //#endregion
143
- //#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Stepper/Stepper.mjs
144
- var te = {
145
- orientation: "horizontal",
146
- iconPosition: "left",
147
- allowNextStepsSelect: !0,
148
- wrap: !0
149
- }, Z = n((n, { color: i, iconSize: a, size: o, contentPadding: l, radius: u, autoContrast: d }) => ({ root: {
150
- "--stepper-color": i ? f(i, n) : void 0,
151
- "--stepper-icon-color": y(d, n) ? v({
152
- color: i,
153
- theme: n,
154
- autoContrast: d
155
- }) : void 0,
156
- "--stepper-icon-size": a === void 0 ? t(o, "stepper-icon-size") : e(a),
157
- "--stepper-content-padding": r(l),
158
- "--stepper-radius": u === void 0 ? void 0 : s(u),
159
- "--stepper-fz": c(o),
160
- "--stepper-spacing": r(o)
161
- } })), Q = u((e) => {
162
- let t = l("Stepper", te, e), { classNames: n, className: r, style: a, styles: o, unstyled: s, vars: c, children: u, onStepClick: f, active: p, icon: m, completedIcon: h, progressIcon: g, color: _, iconSize: v, contentPadding: y, orientation: b, iconPosition: x, size: S, radius: C, allowNextStepsSelect: w, wrap: T, autoContrast: E, keepMounted: D, attributes: O, ...k } = t, A = i({
163
- name: "Stepper",
164
- classes: J,
165
- props: t,
166
- className: r,
167
- style: a,
168
- classNames: n,
169
- styles: o,
170
- unstyled: s,
171
- attributes: O,
172
- vars: c,
173
- varsResolver: Z
174
- }), j = F.toArray(u), M = j.filter((e) => e.type !== q), N = j.find((e) => e.type === q), R = M.reduce((e, t, n) => {
175
- let r = p === n ? "stepProgress" : p > n ? "stepCompleted" : "stepInactive", i = typeof f == "function" ? typeof t.props.allowStepSelect == "boolean" ? t.props.allowStepSelect : r === "stepCompleted" || w : !1;
176
- return e.push(I(t, {
177
- icon: t.props.icon || m || n + 1,
178
- key: n,
179
- step: n,
180
- state: r,
181
- onClick: () => i && f?.(n),
182
- allowStepClick: i,
183
- completedIcon: t.props.completedIcon || h,
184
- progressIcon: t.props.progressIcon || g,
185
- color: t.props.color || _,
186
- iconSize: v,
187
- iconPosition: t.props.iconPosition || x,
188
- orientation: b
189
- })), b === "horizontal" && n !== M.length - 1 && e.push(/* @__PURE__ */ L("div", {
190
- ...A("separator"),
191
- "data-active": n < p || void 0,
192
- "data-orientation": b,
193
- key: `separator-${n}`
194
- })), e;
195
- }, []), z = M[p]?.props?.children, B = N?.props?.children, W = p > M.length - 1 ? B : z, K = D ? /* @__PURE__ */ U(V, { children: [M.map((e, t) => /* @__PURE__ */ H(P, {
196
- mode: p === t ? "visible" : "hidden",
197
- children: /* @__PURE__ */ H("div", {
198
- ...A("content"),
199
- children: e.props.children
200
- })
201
- }, t)), N && /* @__PURE__ */ H(P, {
202
- mode: p > M.length - 1 ? "visible" : "hidden",
203
- children: /* @__PURE__ */ H("div", {
204
- ...A("content"),
205
- children: N.props.children
206
- })
207
- })] }) : W && /* @__PURE__ */ H("div", {
208
- ...A("content"),
209
- children: W
210
- });
211
- return /* @__PURE__ */ H(G, {
212
- value: {
213
- getStyles: A,
214
- orientation: b,
215
- iconPosition: x
216
- },
217
- children: /* @__PURE__ */ U(d, {
218
- ...A("root"),
219
- size: S,
220
- ...k,
221
- children: [/* @__PURE__ */ H(d, {
222
- ...A("steps"),
223
- mod: {
224
- orientation: b,
225
- "icon-position": x,
226
- wrap: T && b !== "vertical"
227
- },
228
- children: R
229
- }), K]
230
- })
231
- });
232
- });
233
- Q.classes = J, Q.varsResolver = Z, Q.displayName = "@mantine/core/Stepper", Q.Completed = q, Q.Step = X;
234
- //#endregion
235
- //#region src/utils/formatBytes.ts
236
- function ne(e) {
237
- if (e === 0) return "0 B";
238
- let t = 1024, n = [
239
- "B",
240
- "KB",
241
- "MB",
242
- "GB",
243
- "TB"
244
- ], r = Math.floor(Math.log(e) / Math.log(t)), i = Math.min(r, n.length - 1);
245
- return `${parseFloat((e / t ** +i).toFixed(1))} ${n[i]}`;
246
- }
247
- var $ = {
248
- container: "_container_1xc3a_1",
249
- backgroundIcon: "_backgroundIcon_1xc3a_13",
250
- stepper: "_stepper_1xc3a_23",
251
- fileInfo: "_fileInfo_1xc3a_30",
252
- resultPaper: "_resultPaper_1xc3a_37",
253
- resultIcon: "_resultIcon_1xc3a_49",
254
- readyContainer: "_readyContainer_1xc3a_53"
255
- }, re = ({ window: e }) => {
256
- let { t } = j("apps"), n = O((e) => e.createFile), r = A(), [i, a] = B(0), [o, s] = B(null), [c, l] = B(null), [u, f] = B(!1), [p, m] = B(!1), [h, g] = B(!1), [_, v] = B({
257
- status: "idle",
258
- progress: {
259
- status: "idle",
260
- loaded: 0,
261
- total: null,
262
- percent: null,
263
- error: null
264
- }
265
- }), [y, x] = B(null), T = M("FcUpload", { size: 120 }), P = M("FcCheckmark", { size: 64 }), F = M("FcCheckmark", { size: 14 }), I = M("FcInfo", { size: 64 }), L = R((e) => {
266
- e && (s(e), a(1));
267
- }, []), z = R((e) => {
268
- l(e), f(!0), m(!1), a(2);
269
- }, []), V = R(async () => {
270
- if (o) {
271
- console.log("[UploaderApp] Starting upload for file:", o.name, "size:", o.size), g(!0), v({
272
- status: "reading",
273
- progress: {
274
- status: "downloading",
275
- loaded: 0,
276
- total: o.size,
277
- percent: 0,
278
- error: null
279
- }
280
- });
281
- try {
282
- v((e) => ({
283
- ...e,
284
- progress: {
285
- status: "downloading",
286
- loaded: 0,
287
- total: o.size,
288
- percent: 0,
289
- error: null
290
- }
291
- }));
292
- for (let e = 0; e <= 50; e += 10) await new Promise((e) => setTimeout(e, 50)), v((t) => ({
293
- ...t,
294
- progress: {
295
- status: "downloading",
296
- loaded: Math.floor(o.size * e / 100),
297
- total: o.size,
298
- percent: e,
299
- error: null
300
- }
301
- }));
302
- console.log("[UploaderApp] Calling saveBlob...");
303
- let e = Date.now(), t = await D.saveBlob(o);
304
- console.log("[UploaderApp] saveBlob completed in", Date.now() - e, "ms, url:", t), v((e) => ({
305
- ...e,
306
- progress: {
307
- status: "downloading",
308
- loaded: Math.floor(o.size * 80 / 100),
309
- total: o.size,
310
- percent: 80,
311
- error: null
312
- }
313
- })), console.log("[UploaderApp] Calling createFile with folderId:", c);
314
- let r = Date.now(), i = await n(o.name, "", c, t);
315
- console.log("[UploaderApp] createFile completed in", Date.now() - r, "ms, id:", i.id), x(i.id), v({
316
- status: "done",
317
- progress: {
318
- status: "done",
319
- loaded: o.size,
320
- total: o.size,
321
- percent: 100,
322
- error: null
323
- }
324
- }), await new Promise((e) => setTimeout(e, 1e3)), a(3);
325
- } catch (e) {
326
- console.error("[UploaderApp] Upload FAILED:", e), v((t) => ({
327
- ...t,
328
- status: "error",
329
- error: e instanceof Error ? e.message : "Upload failed"
330
- })), await new Promise((e) => setTimeout(e, 1e3)), a(3);
331
- }
332
- }
333
- }, [
334
- o,
335
- c,
336
- n
337
- ]), G = R(() => {
338
- c ? r("files", { contentData: { initialFolderId: c } }) : r("files");
339
- }, [c, r]), K = R(() => {
340
- if (!y) return;
341
- let e = O.getState().fsNodes.find((e) => e.id === y);
342
- if (!e || e.type !== "file") return;
343
- let t = k(e);
344
- t && r(t.appId, { contentData: t.contentData });
345
- }, [y, r]);
346
- if (!e) return null;
347
- let q = _.status === "done", J = _.error;
348
- return i === 3 ? /* @__PURE__ */ H("div", {
349
- className: $.container,
350
- children: /* @__PURE__ */ U(S, {
351
- shadow: "sm",
352
- className: $.resultPaper,
353
- children: [
354
- /* @__PURE__ */ H(d, {
355
- className: $.resultIcon,
356
- children: q ? P : I
357
- }),
358
- /* @__PURE__ */ H(w, {
359
- size: "lg",
360
- fw: 500,
361
- ta: "center",
362
- children: q ? t("uploader.uploadComplete") : `${t("uploader.uploadFailed")}: ${J}`
363
- }),
364
- q && /* @__PURE__ */ U(C, {
365
- mt: "md",
366
- justify: "center",
367
- children: [/* @__PURE__ */ H(E, {
368
- variant: "default",
369
- size: "sm",
370
- onClick: G,
371
- "data-testid": "uploader-show-file",
372
- children: t("uploader.showFile")
373
- }), /* @__PURE__ */ H(E, {
374
- size: "sm",
375
- onClick: K,
376
- "data-testid": "uploader-open-file",
377
- children: t("uploader.openFile")
378
- })]
379
- })
380
- ]
381
- })
382
- }) : /* @__PURE__ */ U("div", {
383
- className: $.container,
384
- children: [
385
- T && /* @__PURE__ */ H("div", {
386
- className: $.backgroundIcon,
387
- children: T
388
- }),
389
- /* @__PURE__ */ U(Q, {
390
- active: i,
391
- orientation: "horizontal",
392
- size: "sm",
393
- className: $.stepper,
394
- children: [
395
- /* @__PURE__ */ H(Q.Step, {
396
- label: t("uploader.stepSelect"),
397
- description: t("uploader.clickToUpload"),
398
- children: /* @__PURE__ */ H(W, {
399
- accept: "*",
400
- onChange: L,
401
- children: (e) => /* @__PURE__ */ H(E, {
402
- ...e,
403
- size: "sm",
404
- "data-testid": "uploader-select-file",
405
- children: t("uploader.clickToUpload")
406
- })
407
- })
408
- }),
409
- /* @__PURE__ */ U(Q.Step, {
410
- label: t("uploader.stepDestination"),
411
- description: u ? /* @__PURE__ */ U(C, {
412
- gap: 4,
413
- align: "center",
414
- style: { display: "inline-flex" },
415
- children: [F, /* @__PURE__ */ H("span", { children: t("uploader.folderSelected") })]
416
- }) : t("uploader.selectDestination"),
417
- children: [
418
- o && /* @__PURE__ */ U(d, {
419
- className: $.fileInfo,
420
- children: [/* @__PURE__ */ H(w, {
421
- size: "sm",
422
- fw: 500,
423
- children: o.name
424
- }), /* @__PURE__ */ H(w, {
425
- size: "xs",
426
- c: "dimmed",
427
- children: ne(o.size)
428
- })]
429
- }),
430
- /* @__PURE__ */ U(C, {
431
- mt: "md",
432
- children: [/* @__PURE__ */ H(E, {
433
- variant: "default",
434
- size: "xs",
435
- onClick: () => m(!0),
436
- "data-testid": "uploader-select-folder",
437
- children: t("uploader.selectDestination")
438
- }), /* @__PURE__ */ H(E, {
439
- size: "xs",
440
- onClick: () => a(2),
441
- "data-testid": "uploader-skip-folder",
442
- children: t("uploader.next", { defaultValue: "Next" })
443
- })]
444
- }),
445
- /* @__PURE__ */ H(w, {
446
- size: "xs",
447
- c: "dimmed",
448
- mt: "xs",
449
- children: c ? `${t("uploader.uploadTo")}: ${O.getState().fsNodes.find((e) => e.id === c)?.name || ""}` : t("uploader.uploadToRoot")
450
- })
451
- ]
452
- }),
453
- /* @__PURE__ */ H(Q.Step, {
454
- label: t("uploader.stepUpload"),
455
- description: t("uploader.uploading"),
456
- children: h ? /* @__PURE__ */ H(b, {
457
- state: _.progress,
458
- ariaLabel: t("uploader.uploadProgress")
459
- }) : /* @__PURE__ */ U(d, {
460
- className: $.readyContainer,
461
- children: [/* @__PURE__ */ H(w, {
462
- size: "sm",
463
- ta: "center",
464
- children: t("uploader.readyToUpload")
465
- }), /* @__PURE__ */ H(C, {
466
- justify: "center",
467
- children: /* @__PURE__ */ H(E, {
468
- size: "sm",
469
- onClick: V,
470
- "data-testid": "uploader-upload",
471
- children: t("uploader.upload")
472
- })
473
- })]
474
- })
475
- })
476
- ]
477
- }),
478
- /* @__PURE__ */ H(N, {
479
- opened: p,
480
- onConfirm: z,
481
- onCancel: () => m(!1)
482
- })
483
- ]
484
- });
485
- };
486
- //#endregion
487
- export { ne as n, re as t };
@@ -1,2 +0,0 @@
1
- import { t as e } from "./UploaderApp-C76ydsd8.js";
2
- export { e as default };
@@ -1 +0,0 @@
1
- require(`./chunk-CiTBaPhY.cjs`);const e=require(`./Box-D_64wv6n.cjs`),t=require(`./create-safe-context-95P-Bfg3.cjs`),n=require(`./TextInput-DcYns3hz.cjs`),r=require(`./use-merged-ref-BI9n1hUK.cjs`),i=require(`./DownloadProgress-IRw1dzLX.cjs`),a=require(`./UnstyledButton-Cl5RuIid.cjs`),o=require(`./Paper-DwCpwWwH.cjs`),s=require(`./Group-DhwePB84.cjs`),c=require(`./getRuntime-BLXyQZBB.cjs`),l=require(`./CheckIcon-CBMLR6Gc.cjs`),u=require(`./Button-D0FXpkur.cjs`),d=require(`./desktopStore-Cox-Og1z.cjs`),f=require(`./useOpenApp-Br0jo4-y.cjs`),p=require(`./useTranslation-D_O7S4RJ.cjs`),m=require(`./useDynamicIcon-SytdL1Tu.cjs`),h=require(`./FilePickerApp-Eu0cr2Cm.cjs`);let g=require(`react`),_=require(`react/jsx-runtime`);var v=e.i(t=>{let{onChange:n,children:i,multiple:a,accept:o,name:s,form:c,resetRef:l,disabled:u,capture:d,inputProps:f,ref:p,...m}=e.l(`FileButton`,null,t),h=(0,g.useRef)(null),v=()=>{!u&&h.current?.click()};return r.t(l,()=>{h.current&&(h.current.value=``)}),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`input`,{style:{display:`none`},type:`file`,accept:o,multiple:a,onChange:e=>{if(e.currentTarget.files===null)return n(a?[]:null);n(a?Array.from(e.currentTarget.files):e.currentTarget.files[0]||null)},ref:r.r(p,h),name:s,form:c,capture:d,...f}),i({onClick:v,...m})]})});v.displayName=`@mantine/core/FileButton`;var[y,b]=t.t(`Stepper component was not found in tree`),x=()=>null;x.displayName=`@mantine/core/StepperCompleted`;var S={root:`m_cbb4ea7e`,steps:`m_aaf89d0b`,separator:`m_2a371ac9`,content:`m_78da155d`,step:`m_cbb57068`,"step--horizontal":`m_f56b1e2c`,"step--vertical":`m_833edb7e`,verticalSeparator:`m_6496b3f3`,stepWrapper:`m_818e70b`,stepIcon:`m_1959ad01`,stepIconContent:`m_8faaac38`,stepCompletedIcon:`m_a79331dc`,stepBody:`m_1956aa2a`,stepLabel:`m_12051f6c`,stepDescription:`m_164eea74`},C=(e,t)=>typeof e==`function`?(0,_.jsx)(e,{step:t||0}):e,w={withIcon:!0,allowStepClick:!0,iconPosition:`left`},T=e.r(t=>{let{classNames:r,className:i,style:o,styles:s,vars:c,step:u,state:d,color:f,icon:p,completedIcon:m,progressIcon:h,label:g,description:v,withIcon:y,iconSize:x,loading:S,allowStepClick:T,allowStepSelect:E,iconPosition:D,orientation:O,mod:k,...A}=e.l(`StepperStep`,w,t),j=b(),M=e.d(),N={classNames:r,styles:s},P=d===`stepCompleted`?null:d===`stepProgress`?h:p,F={"data-progress":d===`stepProgress`||void 0,"data-completed":d===`stepCompleted`||void 0};return(0,_.jsxs)(a.t,{...j.getStyles(`step`,{className:i,style:o,variant:j.orientation,...N}),mod:[{"icon-position":D||j.iconPosition,"allow-click":T},k],...F,...A,__vars:{"--step-color":f?e.x(f,M):void 0},tabIndex:T?0:-1,children:[y&&(0,_.jsxs)(`span`,{...j.getStyles(`stepWrapper`,N),children:[(0,_.jsxs)(`span`,{...j.getStyles(`stepIcon`,N),...F,children:[(0,_.jsx)(n.c,{mounted:d===`stepCompleted`,transition:`pop`,duration:200,children:e=>(0,_.jsx)(`span`,{...j.getStyles(`stepCompletedIcon`,{style:e,...N}),children:S?(0,_.jsx)(n.s,{color:`var(--mantine-color-white)`,size:`calc(var(--stepper-icon-size) / 2)`,...j.getStyles(`stepLoader`,N)}):C(m,u)||(0,_.jsx)(l.t,{size:`60%`})})}),d===`stepCompleted`?null:(0,_.jsx)(`span`,{...j.getStyles(`stepIconContent`,N),children:S?(0,_.jsx)(n.s,{...j.getStyles(`stepLoader`,N),size:`calc(var(--stepper-icon-size) / 2)`,color:f}):C(P||p,u)})]}),O===`vertical`&&(0,_.jsx)(`span`,{...j.getStyles(`verticalSeparator`,N),"data-active":d===`stepCompleted`||void 0})]}),(g||v)&&(0,_.jsxs)(`span`,{...j.getStyles(`stepBody`,N),"data-orientation":j.orientation,"data-icon-position":D||j.iconPosition,children:[g&&(0,_.jsx)(`span`,{...j.getStyles(`stepLabel`,N),children:C(g,u)}),v&&(0,_.jsx)(`span`,{...j.getStyles(`stepDescription`,N),children:C(v,u)})]})]})});T.classes=S,T.displayName=`@mantine/core/StepperStep`;var E={orientation:`horizontal`,iconPosition:`left`,allowNextStepsSelect:!0,wrap:!0},D=e.O((t,{color:n,iconSize:r,size:a,contentPadding:o,radius:s,autoContrast:c})=>({root:{"--stepper-color":n?e.x(n,t):void 0,"--stepper-icon-color":i.r(c,t)?i.i({color:n,theme:t,autoContrast:c}):void 0,"--stepper-icon-size":r===void 0?e.N(a,`stepper-icon-size`):e.L(r),"--stepper-content-padding":e.P(o),"--stepper-radius":s===void 0?void 0:e.j(s),"--stepper-fz":e.k(a),"--stepper-spacing":e.P(a)}})),O=e.r(t=>{let n=e.l(`Stepper`,E,t),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,children:l,onStepClick:u,active:d,icon:f,completedIcon:p,progressIcon:m,color:h,iconSize:v,contentPadding:b,orientation:C,iconPosition:w,size:T,radius:O,allowNextStepsSelect:k,wrap:A,autoContrast:j,keepMounted:M,attributes:N,...P}=n,F=e.c({name:`Stepper`,classes:S,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:N,vars:c,varsResolver:D}),I=g.Children.toArray(l),L=I.filter(e=>e.type!==x),R=I.find(e=>e.type===x),z=L.reduce((e,t,n)=>{let r=d===n?`stepProgress`:d>n?`stepCompleted`:`stepInactive`,i=typeof u==`function`?typeof t.props.allowStepSelect==`boolean`?t.props.allowStepSelect:r===`stepCompleted`||k:!1;return e.push((0,g.cloneElement)(t,{icon:t.props.icon||f||n+1,key:n,step:n,state:r,onClick:()=>i&&u?.(n),allowStepClick:i,completedIcon:t.props.completedIcon||p,progressIcon:t.props.progressIcon||m,color:t.props.color||h,iconSize:v,iconPosition:t.props.iconPosition||w,orientation:C})),C===`horizontal`&&n!==L.length-1&&e.push((0,g.createElement)(`div`,{...F(`separator`),"data-active":n<d||void 0,"data-orientation":C,key:`separator-${n}`})),e},[]),B=L[d]?.props?.children,V=R?.props?.children,H=d>L.length-1?V:B,U=M?(0,_.jsxs)(_.Fragment,{children:[L.map((e,t)=>(0,_.jsx)(g.Activity,{mode:d===t?`visible`:`hidden`,children:(0,_.jsx)(`div`,{...F(`content`),children:e.props.children})},t)),R&&(0,_.jsx)(g.Activity,{mode:d>L.length-1?`visible`:`hidden`,children:(0,_.jsx)(`div`,{...F(`content`),children:R.props.children})})]}):H&&(0,_.jsx)(`div`,{...F(`content`),children:H});return(0,_.jsx)(y,{value:{getStyles:F,orientation:C,iconPosition:w},children:(0,_.jsxs)(e.t,{...F(`root`),size:T,...P,children:[(0,_.jsx)(e.t,{...F(`steps`),mod:{orientation:C,"icon-position":w,wrap:A&&C!==`vertical`},children:z}),U]})})});O.classes=S,O.varsResolver=D,O.displayName=`@mantine/core/Stepper`,O.Completed=x,O.Step=T;function k(e){if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`,`TB`],r=Math.floor(Math.log(e)/Math.log(t)),i=Math.min(r,n.length-1);return`${parseFloat((e/t**+i).toFixed(1))} ${n[i]}`}var A={container:`_container_1xc3a_1`,backgroundIcon:`_backgroundIcon_1xc3a_13`,stepper:`_stepper_1xc3a_23`,fileInfo:`_fileInfo_1xc3a_30`,resultPaper:`_resultPaper_1xc3a_37`,resultIcon:`_resultIcon_1xc3a_49`,readyContainer:`_readyContainer_1xc3a_53`},j=({window:t})=>{let{t:n}=p.t(`apps`),r=d.o(e=>e.createFile),a=f.t(),[l,y]=(0,g.useState)(0),[b,x]=(0,g.useState)(null),[S,C]=(0,g.useState)(null),[w,T]=(0,g.useState)(!1),[E,D]=(0,g.useState)(!1),[j,M]=(0,g.useState)(!1),[N,P]=(0,g.useState)({status:`idle`,progress:{status:`idle`,loaded:0,total:null,percent:null,error:null}}),[F,I]=(0,g.useState)(null),L=m.i(`FcUpload`,{size:120}),R=m.i(`FcCheckmark`,{size:64}),z=m.i(`FcCheckmark`,{size:14}),B=m.i(`FcInfo`,{size:64}),V=(0,g.useCallback)(e=>{e&&(x(e),y(1))},[]),H=(0,g.useCallback)(e=>{C(e),T(!0),D(!1),y(2)},[]),U=(0,g.useCallback)(async()=>{if(b){console.log(`[UploaderApp] Starting upload for file:`,b.name,`size:`,b.size),M(!0),P({status:`reading`,progress:{status:`downloading`,loaded:0,total:b.size,percent:0,error:null}});try{P(e=>({...e,progress:{status:`downloading`,loaded:0,total:b.size,percent:0,error:null}}));for(let e=0;e<=50;e+=10)await new Promise(e=>setTimeout(e,50)),P(t=>({...t,progress:{status:`downloading`,loaded:Math.floor(b.size*e/100),total:b.size,percent:e,error:null}}));console.log(`[UploaderApp] Calling saveBlob...`);let e=Date.now(),t=await d.n.saveBlob(b);console.log(`[UploaderApp] saveBlob completed in`,Date.now()-e,`ms, url:`,t),P(e=>({...e,progress:{status:`downloading`,loaded:Math.floor(b.size*80/100),total:b.size,percent:80,error:null}})),console.log(`[UploaderApp] Calling createFile with folderId:`,S);let n=Date.now(),i=await r(b.name,``,S,t);console.log(`[UploaderApp] createFile completed in`,Date.now()-n,`ms, id:`,i.id),I(i.id),P({status:`done`,progress:{status:`done`,loaded:b.size,total:b.size,percent:100,error:null}}),await new Promise(e=>setTimeout(e,1e3)),y(3)}catch(e){console.error(`[UploaderApp] Upload FAILED:`,e),P(t=>({...t,status:`error`,error:e instanceof Error?e.message:`Upload failed`})),await new Promise(e=>setTimeout(e,1e3)),y(3)}}},[b,S,r]),W=(0,g.useCallback)(()=>{S?a(`files`,{contentData:{initialFolderId:S}}):a(`files`)},[S,a]),G=(0,g.useCallback)(()=>{if(!F)return;let e=d.o.getState().fsNodes.find(e=>e.id===F);if(!e||e.type!==`file`)return;let t=d.x(e);t&&a(t.appId,{contentData:t.contentData})},[F,a]);if(!t)return null;let K=N.status===`done`,q=N.error;return l===3?(0,_.jsx)(`div`,{className:A.container,children:(0,_.jsxs)(o.t,{shadow:`sm`,className:A.resultPaper,children:[(0,_.jsx)(e.t,{className:A.resultIcon,children:K?R:B}),(0,_.jsx)(c.o,{size:`lg`,fw:500,ta:`center`,children:K?n(`uploader.uploadComplete`):`${n(`uploader.uploadFailed`)}: ${q}`}),K&&(0,_.jsxs)(s.t,{mt:`md`,justify:`center`,children:[(0,_.jsx)(u.t,{variant:`default`,size:`sm`,onClick:W,"data-testid":`uploader-show-file`,children:n(`uploader.showFile`)}),(0,_.jsx)(u.t,{size:`sm`,onClick:G,"data-testid":`uploader-open-file`,children:n(`uploader.openFile`)})]})]})}):(0,_.jsxs)(`div`,{className:A.container,children:[L&&(0,_.jsx)(`div`,{className:A.backgroundIcon,children:L}),(0,_.jsxs)(O,{active:l,orientation:`horizontal`,size:`sm`,className:A.stepper,children:[(0,_.jsx)(O.Step,{label:n(`uploader.stepSelect`),description:n(`uploader.clickToUpload`),children:(0,_.jsx)(v,{accept:`*`,onChange:V,children:e=>(0,_.jsx)(u.t,{...e,size:`sm`,"data-testid":`uploader-select-file`,children:n(`uploader.clickToUpload`)})})}),(0,_.jsxs)(O.Step,{label:n(`uploader.stepDestination`),description:w?(0,_.jsxs)(s.t,{gap:4,align:`center`,style:{display:`inline-flex`},children:[z,(0,_.jsx)(`span`,{children:n(`uploader.folderSelected`)})]}):n(`uploader.selectDestination`),children:[b&&(0,_.jsxs)(e.t,{className:A.fileInfo,children:[(0,_.jsx)(c.o,{size:`sm`,fw:500,children:b.name}),(0,_.jsx)(c.o,{size:`xs`,c:`dimmed`,children:k(b.size)})]}),(0,_.jsxs)(s.t,{mt:`md`,children:[(0,_.jsx)(u.t,{variant:`default`,size:`xs`,onClick:()=>D(!0),"data-testid":`uploader-select-folder`,children:n(`uploader.selectDestination`)}),(0,_.jsx)(u.t,{size:`xs`,onClick:()=>y(2),"data-testid":`uploader-skip-folder`,children:n(`uploader.next`,{defaultValue:`Next`})})]}),(0,_.jsx)(c.o,{size:`xs`,c:`dimmed`,mt:`xs`,children:S?`${n(`uploader.uploadTo`)}: ${d.o.getState().fsNodes.find(e=>e.id===S)?.name||``}`:n(`uploader.uploadToRoot`)})]}),(0,_.jsx)(O.Step,{label:n(`uploader.stepUpload`),description:n(`uploader.uploading`),children:j?(0,_.jsx)(i.t,{state:N.progress,ariaLabel:n(`uploader.uploadProgress`)}):(0,_.jsxs)(e.t,{className:A.readyContainer,children:[(0,_.jsx)(c.o,{size:`sm`,ta:`center`,children:n(`uploader.readyToUpload`)}),(0,_.jsx)(s.t,{justify:`center`,children:(0,_.jsx)(u.t,{size:`sm`,onClick:U,"data-testid":`uploader-upload`,children:n(`uploader.upload`)})})]})})]}),(0,_.jsx)(h.i,{opened:E,onConfirm:H,onCancel:()=>D(!1)})]})};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return j}});
@@ -1 +0,0 @@
1
- require(`./chunk-CiTBaPhY.cjs`);const e=require(`./UploaderApp-Q_a3mBik.cjs`);exports.default=e.t;
@@ -1 +0,0 @@
1
- const e=require(`./useDynamicIcon-SytdL1Tu.cjs`);var t=({name:t,size:n=20,color:r})=>e.c(t,{size:n,color:r})??null;Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -1,23 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (e && (t = e(e = 0)), t), s = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), c = (e, n) => {
3
- let r = {};
4
- for (var i in e) t(r, i, {
5
- get: e[i],
6
- enumerable: !0
7
- });
8
- return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
9
- }, l = (e, i, o, s) => {
10
- if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
11
- get: ((e) => i[e]).bind(null, d),
12
- enumerable: !(s = n(i, d)) || s.enumerable
13
- });
14
- return e;
15
- }, u = (n, r, a) => (a = n == null ? {} : e(i(n)), l(r || !n || !n.__esModule ? t(a, "default", {
16
- value: n,
17
- enumerable: !0
18
- }) : a, n)), d = (e) => a.call(e, "module.exports") ? e["module.exports"] : l(t({}, "__esModule", { value: !0 }), e), f = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
19
- if (typeof require < "u") return require.apply(this, arguments);
20
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
21
- });
22
- //#endregion
23
- export { d as a, f as i, o as n, u as o, c as r, s as t };
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
@@ -1 +0,0 @@
1
- require(`./chunk-CiTBaPhY.cjs`);let e=require(`react`);function t(t){let n=(0,e.createContext)(null);return[n,()=>{let r=(0,e.use)(n);if(r===null)throw Error(t);return r}]}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -1,12 +0,0 @@
1
- import { createContext as e, use as t } from "react";
2
- //#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/core/utils/create-safe-context/create-safe-context.mjs
3
- function n(n) {
4
- let r = e(null);
5
- return [r, () => {
6
- let e = t(r);
7
- if (e === null) throw Error(n);
8
- return e;
9
- }];
10
- }
11
- //#endregion
12
- export { n as t };