@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.
- package/dist/AccordionChevron-DxpOyInK.js +26 -0
- package/dist/AccordionChevron-kn5kSrEc.cjs +1 -0
- package/dist/ActionIcon-Drh4p6Fv.js +145 -0
- package/dist/ActionIcon-alk2zZD6.cjs +1 -0
- package/dist/AppEmptyState-BWCUbf-B.cjs +1 -0
- package/dist/AppEmptyState-Bxpit0JV.js +49 -0
- package/dist/AppIcon-BU7a3ZNH.cjs +1 -0
- package/dist/AppIcon-XumS3bIG.js +80 -0
- package/dist/AppMenuBar-B9U0n1Vv.cjs +1 -0
- package/dist/AppMenuBar-CnIEVjr8.js +2049 -0
- package/dist/Box-DSKR_qaa.js +1579 -0
- package/dist/Box-zW6Twge8.cjs +1 -0
- package/dist/Button-DMlnrqyx.cjs +1 -0
- package/dist/Button-wTOTQKxF.js +178 -0
- package/dist/CalendarApp-B_e1B1Yn.cjs +1 -0
- package/dist/CalendarApp-C-l9D6nd.cjs +1 -0
- package/dist/CalendarApp-D0ftTCTG.js +1399 -0
- package/dist/Center-CmxXB9ql.js +25 -0
- package/dist/Center-DKUE2pER.cjs +1 -0
- package/dist/CheckIcon-CZhtJD1O.cjs +1 -0
- package/dist/CheckIcon-N5qBqXQJ.js +25 -0
- package/dist/CodeServerApp-BOoGwZ7r.cjs +1 -0
- package/dist/CodeServerApp-Be3I5EGg.cjs +1 -0
- package/dist/CodeServerApp-DW18EZxa.js +150 -0
- package/dist/ColorPicker-BCNqi02x.js +997 -0
- package/dist/ColorPicker-BrDE7tMO.cjs +1 -0
- package/dist/Colors-ClnDxnyA.js +15 -0
- package/dist/Colors-zP2AFgU3.cjs +1 -0
- package/dist/CreateItemApp-B12M1E_1.cjs +1 -0
- package/dist/CreateItemApp-TAAprby3.js +400 -0
- package/dist/CreateItemApp-ePB6ujNl.cjs +1 -0
- package/dist/DeviceInfoApp-BMF18BGo.cjs +1 -0
- package/dist/DeviceInfoApp-DRy0H3aT.cjs +1 -0
- package/dist/DeviceInfoApp-lgpwkeRR.js +223 -0
- package/dist/DownloadProgress-EoyCaD5O.js +174 -0
- package/dist/DownloadProgress-VNdj22U8.cjs +1 -0
- package/dist/FileIcon-7JaSR3Gn.js +89 -0
- package/dist/FileIcon-CIXopWLv.cjs +1 -0
- package/dist/FilePickerApp-DaMgEqKh.js +409 -0
- package/dist/FilePickerApp-DjmuSFqa.cjs +1 -0
- package/dist/FilesApp-Bp7wfrBZ.cjs +1 -0
- package/dist/FilesApp-BpJJRKhi.cjs +1 -0
- package/dist/FilesApp-Cj94QG5o.js +225 -0
- package/dist/Group-CtBJSfCo.js +48 -0
- package/dist/Group-Dsrf6lEK.cjs +1 -0
- package/dist/ImageViewerApp-BaLP3gkO.js +69 -0
- package/dist/ImageViewerApp-DlHGeB3S.cjs +1 -0
- package/dist/ImageViewerApp-DoXd_Swu.cjs +1 -0
- package/dist/ImageViewerMenuBar-CabGSi9r.js +87 -0
- package/dist/ImageViewerMenuBar-SAI7UNz7.cjs +1 -0
- package/dist/ImageViewerMenuBar-_Jr29gii.cjs +1 -0
- package/dist/MenuEditApp-BJjlPTOa.cjs +1 -0
- package/dist/MenuEditApp-BTRppYnD.js +497 -0
- package/dist/MenuEditApp-JPsGT-S3.cjs +1 -0
- package/dist/MenuEditMenuBar-BydGkqMw.cjs +1 -0
- package/dist/MenuEditMenuBar-DptlwVPQ.cjs +1 -0
- package/dist/MenuEditMenuBar-x1IQrHP2.js +60 -0
- package/dist/NotesApp-BOcRGO7w.cjs +1 -0
- package/dist/NotesApp-CQe7UfBC.js +364 -0
- package/dist/NotesApp-OL07JXRE.cjs +1 -0
- package/dist/NotesMenuBar-BSI_2Y7p.cjs +1 -0
- package/dist/NotesMenuBar-Df6aW85J.cjs +1 -0
- package/dist/NotesMenuBar-VhpIe68v.js +62 -0
- package/dist/Paper-BX_9odR6.js +30 -0
- package/dist/Paper-D8-BaBx2.cjs +1 -0
- package/dist/PdfApp-CNEbty5v.cjs +1 -0
- package/dist/PdfApp-CVv3ZCaM.cjs +1 -0
- package/dist/PdfApp-DL_R9-Nc.js +39 -0
- package/dist/PdfMenuBar--E6kDyrT.cjs +1 -0
- package/dist/PdfMenuBar-DZCLSOpR.js +39 -0
- package/dist/PdfMenuBar-Dj5cJUkg.cjs +1 -0
- package/dist/SettingsApp-BlmHuAjT.js +1831 -0
- package/dist/SettingsApp-CNvIgf5B.cjs +1 -0
- package/dist/SettingsApp-DWxanNE4.cjs +1 -0
- package/dist/SettingsMenuBar-CBoOBCfx.cjs +1 -0
- package/dist/SettingsMenuBar-DQooFkZN.cjs +1 -0
- package/dist/SettingsMenuBar-YWiJHaxq.js +42 -0
- package/dist/Slider-BUiHxjKO.cjs +1 -0
- package/dist/Slider-t-NcD60t.js +1176 -0
- package/dist/Stack-Bp1Ek2Gp.js +34 -0
- package/dist/Stack-D4jAiRfc.cjs +1 -0
- package/dist/StorybookApp-CDLV_kja.cjs +1 -0
- package/dist/StorybookApp-DKwlPCmo.js +10 -0
- package/dist/TerminalApp-BCB7i1lR.cjs +1 -0
- package/dist/TerminalApp-BYc_gHLe.js +326 -0
- package/dist/TerminalApp-Dviz6aP2.cjs +1 -0
- package/dist/TerminalMenuBar-D5tPmgR_.js +113 -0
- package/dist/TerminalMenuBar-DNshPmCa.cjs +1 -0
- package/dist/TerminalMenuBar-HzMSR7XP.cjs +1 -0
- package/dist/TextInput-C-JtGWn1.js +981 -0
- package/dist/TextInput-CrsmcOip.cjs +1 -0
- package/dist/Tooltip-D5Cd9wtz.cjs +1 -0
- package/dist/Tooltip-DOeIvhrO.js +1142 -0
- package/dist/UnstyledButton-DGaG-e_G.js +25 -0
- package/dist/UnstyledButton-DX2pTahr.cjs +1 -0
- package/dist/UploaderApp-C6xA5Rrf2.cjs +1 -0
- package/dist/UploaderApp-DnHIRxB_.cjs +1 -0
- package/dist/UploaderApp-qBfpukR_.js +488 -0
- package/dist/VscIcon-CcMdrFoJ.cjs +1 -0
- package/dist/VscIcon-DBfVnArE.js +8 -0
- package/dist/create-safe-context-Bboj0GWC.cjs +1 -0
- package/dist/create-safe-context-XT2cxc14.js +12 -0
- package/dist/desktopStore-CZoA9VHO.cjs +1 -0
- package/dist/desktopStore-F8bgLqFl.js +1768 -0
- package/dist/getRuntime-BFK0-8R1.cjs +1 -0
- package/dist/getRuntime-DAPqFH2W.js +63 -0
- package/dist/imageViewerStore-BB_tssZR.cjs +1 -0
- package/dist/imageViewerStore-C5kWz0o7.js +50 -0
- package/dist/index.cjs +1 -5642
- package/dist/index.css +2 -9192
- package/dist/index.d.ts +2258 -2019
- package/dist/index.js +4826 -4798
- package/dist/is-element-Bu_JY8Qy.js +7 -0
- package/dist/is-element-CdV0xajp.cjs +1 -0
- package/dist/menuEditStore-CTeM_dns.cjs +1 -0
- package/dist/menuEditStore-Cj1zAwxQ.js +38 -0
- package/dist/notesStore-BCEl1D_v.cjs +1 -0
- package/dist/notesStore-BPyRTHEc.js +36 -0
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/settingsAppStore-BDQ3ts1y.js +29 -0
- package/dist/settingsAppStore-CMBc13VU.cjs +1 -0
- package/dist/terminalStore-IWdf4Mm6.js +30 -0
- package/dist/terminalStore-iIuyodfK.cjs +1 -0
- package/dist/use-merged-ref-BT8_u6vW.js +25 -0
- package/dist/use-merged-ref-n9Gw9LNn.cjs +1 -0
- package/dist/use-resolved-styles-api-8OXE2oRq.cjs +1 -0
- package/dist/use-resolved-styles-api-DNUlJJZf.js +21 -0
- package/dist/use-uncontrolled-A4hm9ATM.js +23 -0
- package/dist/use-uncontrolled-DDJVQiM_.cjs +1 -0
- package/dist/useAdaptiveDimensions-AVDc_qPa.js +40 -0
- package/dist/useAdaptiveDimensions-CfITBJ_m.cjs +1 -0
- package/dist/useCloseInterceptor-BZd3VILp.js +51 -0
- package/dist/useCloseInterceptor-yntBEzNc.cjs +1 -0
- package/dist/useDynamicIcon-Bf0t2foA.js +22 -0
- package/dist/useDynamicIcon-DJ_il30E.cjs +1 -0
- package/dist/useMenuBarUtils-nJIPJGIQ.cjs +1 -0
- package/dist/useMenuBarUtils-nmu9yehT.js +6 -0
- package/dist/useOpenApp-CBIm7Gzl.js +279 -0
- package/dist/useOpenApp-DW4x79Zg.cjs +1 -0
- package/dist/useResolvedUrl-BkMPM1fM.cjs +1 -0
- package/dist/useResolvedUrl-DQpLqOoL.js +30 -0
- package/package.json +7 -3
- package/dist/CalendarApp-CHLUCAI7.css +0 -744
- package/dist/CalendarApp-K7ZOUZ6C.js +0 -2
- package/dist/CalendarApp-OTGEERSS.cjs +0 -8
- package/dist/CodeServerApp-5KZGO7HL.css +0 -75
- package/dist/CodeServerApp-LUZFCQBI.js +0 -3
- package/dist/CodeServerApp-P3TMJPLY.cjs +0 -9
- package/dist/CreateItemApp-ESQ42VHH.js +0 -8
- package/dist/CreateItemApp-PQB5GTFG.css +0 -107
- package/dist/CreateItemApp-RFE3REWZ.cjs +0 -14
- package/dist/DeviceInfoApp-XNIS6ZY6.js +0 -5
- package/dist/DeviceInfoApp-ZNLQNOKI.cjs +0 -11
- package/dist/DeviceInfoApp-ZSMRSITP.css +0 -7
- package/dist/FilesApp-4GEU64QN.js +0 -8
- package/dist/FilesApp-E6L5W3T2.css +0 -1817
- package/dist/FilesApp-QSLB5IWR.cjs +0 -14
- package/dist/ImageViewerApp-N2Q7E7WZ.css +0 -215
- package/dist/ImageViewerApp-NCVDKLB3.js +0 -11
- package/dist/ImageViewerApp-QB373H5Z.cjs +0 -17
- package/dist/ImageViewerMenuBar-I3TFKQPS.cjs +0 -14
- package/dist/ImageViewerMenuBar-TV5C6TM2.js +0 -5
- package/dist/ImageViewerMenuBar-XLK4LIHW.css +0 -56
- package/dist/MenuEditApp-5EFYAPFC.cjs +0 -15
- package/dist/MenuEditApp-V5XOPIHX.js +0 -9
- package/dist/MenuEditApp-YA6HSAMJ.css +0 -94
- package/dist/MenuEditMenuBar-7VHMZNRM.css +0 -56
- package/dist/MenuEditMenuBar-GF6L4PGZ.cjs +0 -15
- package/dist/MenuEditMenuBar-IUXFPZE5.js +0 -6
- package/dist/NotesApp-2YNT7Y3D.js +0 -10
- package/dist/NotesApp-IAEE7YHU.cjs +0 -16
- package/dist/NotesApp-TQ6IHDNX.css +0 -302
- package/dist/NotesMenuBar-25LKN3SE.cjs +0 -15
- package/dist/NotesMenuBar-MXLOX7OT.css +0 -56
- package/dist/NotesMenuBar-SRV3AIAL.js +0 -6
- package/dist/PdfApp-67XIX6AM.js +0 -10
- package/dist/PdfApp-BUIC5U5H.css +0 -206
- package/dist/PdfApp-GZ6RHTBR.cjs +0 -16
- package/dist/PdfMenuBar-NLZC6JHS.js +0 -4
- package/dist/PdfMenuBar-QUM72EE4.css +0 -56
- package/dist/PdfMenuBar-WBRTKMLN.cjs +0 -13
- package/dist/SettingsApp-BPLMGPNK.cjs +0 -20
- package/dist/SettingsApp-JVOSEFH3.css +0 -283
- package/dist/SettingsApp-LUDIXCYY.js +0 -14
- package/dist/SettingsMenuBar-5CBSSMVM.css +0 -56
- package/dist/SettingsMenuBar-VLT6TTCM.js +0 -6
- package/dist/SettingsMenuBar-Y5QEXDEO.cjs +0 -15
- package/dist/StorybookApp-NQ244BER.css +0 -7
- package/dist/StorybookApp-NZDV4X3Y.js +0 -1
- package/dist/StorybookApp-VF3KIMU3.cjs +0 -7
- package/dist/TerminalApp-CDGWRBFJ.cjs +0 -10
- package/dist/TerminalApp-EAATMIMX.css +0 -77
- package/dist/TerminalApp-GCKJCM55.js +0 -4
- package/dist/TerminalMenuBar-3J26O26Q.css +0 -56
- package/dist/TerminalMenuBar-7BH7MGNJ.cjs +0 -14
- package/dist/TerminalMenuBar-7JAEQUZ4.js +0 -5
- package/dist/UploaderApp-6KV3TGCT.css +0 -1817
- package/dist/UploaderApp-FJC2J4I5.js +0 -10
- package/dist/UploaderApp-HLXJYJZQ.cjs +0 -16
- package/dist/chunk-2PSTHGTD.cjs +0 -42
- package/dist/chunk-2RQX7QBP.cjs +0 -148
- package/dist/chunk-43W6UDUZ.cjs +0 -19
- package/dist/chunk-4E45FBAH.js +0 -223
- package/dist/chunk-4E4U2A25.cjs +0 -237
- package/dist/chunk-4QHX7CMN.cjs +0 -38
- package/dist/chunk-4XURSNM4.js +0 -43
- package/dist/chunk-4ZCRYHL6.js +0 -407
- package/dist/chunk-5C6IQE42.cjs +0 -35
- package/dist/chunk-5HUYQDQF.js +0 -36
- package/dist/chunk-5NOHYJNH.js +0 -84
- package/dist/chunk-5QFZW6HW.js +0 -2241
- package/dist/chunk-5YH6AKEO.js +0 -146
- package/dist/chunk-756GPSPM.js +0 -283
- package/dist/chunk-7WUYUTPN.js +0 -2293
- package/dist/chunk-7XCMBW64.js +0 -162
- package/dist/chunk-7Y7HB7FB.cjs +0 -53
- package/dist/chunk-ABIAPZ6S.cjs +0 -45
- package/dist/chunk-ACHGJKCI.cjs +0 -286
- package/dist/chunk-BQCD5RAF.cjs +0 -48
- package/dist/chunk-BQL3YXMV.js +0 -17429
- package/dist/chunk-C3XER4N3.js +0 -442
- package/dist/chunk-C6BEZNAM.cjs +0 -45
- package/dist/chunk-CILU6BWC.cjs +0 -548
- package/dist/chunk-CV5PUHAE.cjs +0 -86
- package/dist/chunk-D5MVFFID.js +0 -42
- package/dist/chunk-D7R55WWT.js +0 -1601
- package/dist/chunk-DFYDUXWP.cjs +0 -34
- package/dist/chunk-DWP2SYF7.js +0 -55
- package/dist/chunk-E55VXNLK.cjs +0 -17498
- package/dist/chunk-E5FW77FG.js +0 -77
- package/dist/chunk-EAELL43F.js +0 -42
- package/dist/chunk-EX5V2ZTU.js +0 -40
- package/dist/chunk-FD7QZCTN.cjs +0 -2329
- package/dist/chunk-FH4ILMKF.js +0 -38
- package/dist/chunk-FRHBM2U7.js +0 -33
- package/dist/chunk-FX2TPX3L.cjs +0 -45
- package/dist/chunk-GPXNLTPI.cjs +0 -451
- package/dist/chunk-GRYCUBJZ.js +0 -9
- package/dist/chunk-HPHHS7FJ.cjs +0 -49
- package/dist/chunk-HWHBSAUC.js +0 -40
- package/dist/chunk-IDHP3R4I.js +0 -31
- package/dist/chunk-IHWGT3DL.js +0 -86
- package/dist/chunk-JEBKLIMU.cjs +0 -123
- package/dist/chunk-KDZLBI6F.cjs +0 -324
- package/dist/chunk-KQHICFX3.js +0 -121
- package/dist/chunk-LMJE6V4N.cjs +0 -42
- package/dist/chunk-MCHPDWVH.js +0 -444
- package/dist/chunk-MVDGM5Y4.js +0 -68
- package/dist/chunk-N36HBL53.cjs +0 -165
- package/dist/chunk-NV5GNFA3.js +0 -541
- package/dist/chunk-NVEGEK3N.js +0 -31
- package/dist/chunk-OJIDKDKF.js +0 -68
- package/dist/chunk-PGGNSLM7.js +0 -215
- package/dist/chunk-PKPQA5NR.js +0 -15
- package/dist/chunk-PNDBLFJW.cjs +0 -50
- package/dist/chunk-Q3WA72BF.cjs +0 -70
- package/dist/chunk-RDIDAZ3S.cjs +0 -9
- package/dist/chunk-RGJPRXYY.js +0 -48
- package/dist/chunk-RPSYXORB.cjs +0 -219
- package/dist/chunk-RQ6OZRUW.cjs +0 -41
- package/dist/chunk-SBE4SZAN.cjs +0 -226
- package/dist/chunk-TAFNCDUI.js +0 -234
- package/dist/chunk-TFIDSENE.cjs +0 -88
- package/dist/chunk-TGWMOHAO.js +0 -17
- package/dist/chunk-UA6XSTW6.js +0 -48
- package/dist/chunk-UIQCTAVM.cjs +0 -59
- package/dist/chunk-UKYESVDS.cjs +0 -50
- package/dist/chunk-V4N255NL.cjs +0 -2309
- package/dist/chunk-VO6KXO2I.js +0 -32
- package/dist/chunk-WXSTSC3D.cjs +0 -83
- package/dist/chunk-XSK7BWYO.js +0 -47
- package/dist/chunk-XVAPJ4PP.cjs +0 -449
- package/dist/chunk-XVASHRCE.cjs +0 -70
- package/dist/chunk-XYSMVQQD.cjs +0 -1608
- package/dist/chunk-YAIWI4Z5.js +0 -7
- package/dist/chunk-YGYOLDKR.js +0 -280
- package/dist/chunk-YP2PLNOF.cjs +0 -34
- package/dist/chunk-YSOLW4FS.cjs +0 -11
- package/dist/chunk-YY6OUR2U.js +0 -44
- package/dist/chunk-YZWS7FDT.cjs +0 -409
- package/dist/chunk-Z5YGWL65.cjs +0 -39
- package/dist/chunk-ZHNDXNL4.js +0 -45
- package/dist/chunk-ZX3EDZ5C.cjs +0 -17
- package/dist/index.d.cts +0 -2019
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { c as e, l as t, n, t as r } from "./Box-DSKR_qaa.js";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/UnstyledButton/UnstyledButton.module.mjs
|
|
4
|
+
var a = { root: "m_87cf2631" }, o = { __staticSelector: "UnstyledButton" }, s = n((n) => {
|
|
5
|
+
let s = t("UnstyledButton", o, n), { className: c, component: l = "button", __staticSelector: u, unstyled: d, classNames: f, styles: p, style: m, attributes: h, ...g } = s;
|
|
6
|
+
return /* @__PURE__ */ i(r, {
|
|
7
|
+
...e({
|
|
8
|
+
name: u,
|
|
9
|
+
props: s,
|
|
10
|
+
classes: a,
|
|
11
|
+
className: c,
|
|
12
|
+
style: m,
|
|
13
|
+
classNames: f,
|
|
14
|
+
styles: p,
|
|
15
|
+
unstyled: d,
|
|
16
|
+
attributes: h
|
|
17
|
+
})("root", { focusable: !0 }),
|
|
18
|
+
component: l,
|
|
19
|
+
type: l === "button" ? "button" : void 0,
|
|
20
|
+
...g
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
s.classes = a, s.displayName = "@mantine/core/UnstyledButton";
|
|
24
|
+
//#endregion
|
|
25
|
+
export { s as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./Box-zW6Twge8.cjs`);let t=require(`react/jsx-runtime`);var n={root:`m_87cf2631`},r={__staticSelector:`UnstyledButton`},i=e.n(i=>{let a=e.l(`UnstyledButton`,r,i),{className:o,component:s=`button`,__staticSelector:c,unstyled:l,classNames:u,styles:d,style:f,attributes:p,...m}=a;return(0,t.jsx)(e.t,{...e.c({name:c,props:a,classes:n,className:o,style:f,classNames:u,styles:d,unstyled:l,attributes:p})(`root`,{focusable:!0}),component:s,type:s===`button`?`button`:void 0,...m})});i.classes=n,i.displayName=`@mantine/core/UnstyledButton`,Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./UploaderApp-DnHIRxB_.cjs`);exports.default=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./Box-zW6Twge8.cjs`),t=require(`./create-safe-context-Bboj0GWC.cjs`),n=require(`./TextInput-CrsmcOip.cjs`),r=require(`./use-merged-ref-n9Gw9LNn.cjs`),i=require(`./DownloadProgress-VNdj22U8.cjs`),a=require(`./UnstyledButton-DX2pTahr.cjs`),o=require(`./Paper-D8-BaBx2.cjs`),s=require(`./Group-Dsrf6lEK.cjs`),c=require(`./getRuntime-BFK0-8R1.cjs`),l=require(`./CheckIcon-CZhtJD1O.cjs`),u=require(`./Button-DMlnrqyx.cjs`),d=require(`./useOpenApp-DW4x79Zg.cjs`),f=require(`./desktopStore-CZoA9VHO.cjs`),p=require(`./useDynamicIcon-DJ_il30E.cjs`),m=require(`./FilePickerApp-DjmuSFqa.cjs`);let h=require(`react`),g=require(`react/jsx-runtime`),_=require(`react-i18next`);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),_=(0,h.useRef)(null),v=()=>{!u&&_.current?.click()};return r.t(l,()=>{_.current&&(_.current.value=``)}),(0,g.jsxs)(g.Fragment,{children:[(0,g.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,_),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,g.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:_,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,g.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,g.jsxs)(`span`,{...j.getStyles(`stepWrapper`,N),children:[(0,g.jsxs)(`span`,{...j.getStyles(`stepIcon`,N),...F,children:[(0,g.jsx)(n.c,{mounted:d===`stepCompleted`,transition:`pop`,duration:200,children:e=>(0,g.jsx)(`span`,{...j.getStyles(`stepCompletedIcon`,{style:e,...N}),children:S?(0,g.jsx)(n.s,{color:`var(--mantine-color-white)`,size:`calc(var(--stepper-icon-size) / 2)`,...j.getStyles(`stepLoader`,N)}):C(m,u)||(0,g.jsx)(l.t,{size:`60%`})})}),d===`stepCompleted`?null:(0,g.jsx)(`span`,{...j.getStyles(`stepIconContent`,N),children:S?(0,g.jsx)(n.s,{...j.getStyles(`stepLoader`,N),size:`calc(var(--stepper-icon-size) / 2)`,color:f}):C(P||p,u)})]}),O===`vertical`&&(0,g.jsx)(`span`,{...j.getStyles(`verticalSeparator`,N),"data-active":d===`stepCompleted`||void 0})]}),(_||v)&&(0,g.jsxs)(`span`,{...j.getStyles(`stepBody`,N),"data-orientation":j.orientation,"data-icon-position":D||j.iconPosition,children:[_&&(0,g.jsx)(`span`,{...j.getStyles(`stepLabel`,N),children:C(_,u)}),v&&(0,g.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.D((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.M(a,`stepper-icon-size`):e.I(r),"--stepper-content-padding":e.N(o),"--stepper-radius":s===void 0?void 0:e.A(s),"--stepper-fz":e.O(a),"--stepper-spacing":e.N(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:_,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=h.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,h.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||_,iconSize:v,iconPosition:t.props.iconPosition||w,orientation:C})),C===`horizontal`&&n!==L.length-1&&e.push((0,h.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,g.jsxs)(g.Fragment,{children:[L.map((e,t)=>(0,g.jsx)(h.Activity,{mode:d===t?`visible`:`hidden`,children:(0,g.jsx)(`div`,{...F(`content`),children:e.props.children})},t)),R&&(0,g.jsx)(h.Activity,{mode:d>L.length-1?`visible`:`hidden`,children:(0,g.jsx)(`div`,{...F(`content`),children:R.props.children})})]}):H&&(0,g.jsx)(`div`,{...F(`content`),children:H});return(0,g.jsx)(y,{value:{getStyles:F,orientation:C,iconPosition:w},children:(0,g.jsxs)(e.t,{...F(`root`),size:T,...P,children:[(0,g.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}=(0,_.useTranslation)(`apps`),r=f.o(e=>e.createFile),a=d.t(),[l,y]=(0,h.useState)(0),[b,x]=(0,h.useState)(null),[S,C]=(0,h.useState)(null),[w,T]=(0,h.useState)(!1),[E,D]=(0,h.useState)(!1),[j,M]=(0,h.useState)(!1),[N,P]=(0,h.useState)({status:`idle`,progress:{status:`idle`,loaded:0,total:null,percent:null,error:null}}),[F,I]=(0,h.useState)(null),L=p.i(`FcUpload`,{size:120}),R=p.i(`FcCheckmark`,{size:64}),z=p.i(`FcCheckmark`,{size:14}),B=p.i(`FcInfo`,{size:64}),V=(0,h.useCallback)(e=>{e&&(x(e),y(1))},[]),H=(0,h.useCallback)(e=>{C(e),T(!0),D(!1),y(2)},[]),U=(0,h.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 f.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,h.useCallback)(()=>{S?a(`files`,{contentData:{initialFolderId:S}}):a(`files`)},[S,a]),G=(0,h.useCallback)(()=>{if(!F)return;let e=f.o.getState().fsNodes.find(e=>e.id===F);if(!e||e.type!==`file`)return;let t=f.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,g.jsx)(`div`,{className:A.container,children:(0,g.jsxs)(o.t,{shadow:`sm`,className:A.resultPaper,children:[(0,g.jsx)(e.t,{className:A.resultIcon,children:K?R:B}),(0,g.jsx)(c.o,{size:`lg`,fw:500,ta:`center`,children:K?n(`uploader.uploadComplete`):`${n(`uploader.uploadFailed`)}: ${q}`}),K&&(0,g.jsxs)(s.t,{mt:`md`,justify:`center`,children:[(0,g.jsx)(u.t,{variant:`default`,size:`sm`,onClick:W,"data-testid":`uploader-show-file`,children:n(`uploader.showFile`)}),(0,g.jsx)(u.t,{size:`sm`,onClick:G,"data-testid":`uploader-open-file`,children:n(`uploader.openFile`)})]})]})}):(0,g.jsxs)(`div`,{className:A.container,children:[L&&(0,g.jsx)(`div`,{className:A.backgroundIcon,children:L}),(0,g.jsxs)(O,{active:l,orientation:`horizontal`,size:`sm`,className:A.stepper,children:[(0,g.jsx)(O.Step,{label:n(`uploader.stepSelect`),description:n(`uploader.clickToUpload`),children:(0,g.jsx)(v,{accept:`*`,onChange:V,children:e=>(0,g.jsx)(u.t,{...e,size:`sm`,"data-testid":`uploader-select-file`,children:n(`uploader.clickToUpload`)})})}),(0,g.jsxs)(O.Step,{label:n(`uploader.stepDestination`),description:w?(0,g.jsxs)(s.t,{gap:4,align:`center`,style:{display:`inline-flex`},children:[z,(0,g.jsx)(`span`,{children:n(`uploader.folderSelected`)})]}):n(`uploader.selectDestination`),children:[b&&(0,g.jsxs)(e.t,{className:A.fileInfo,children:[(0,g.jsx)(c.o,{size:`sm`,fw:500,children:b.name}),(0,g.jsx)(c.o,{size:`xs`,c:`dimmed`,children:k(b.size)})]}),(0,g.jsxs)(s.t,{mt:`md`,children:[(0,g.jsx)(u.t,{variant:`default`,size:`xs`,onClick:()=>D(!0),"data-testid":`uploader-select-folder`,children:n(`uploader.selectDestination`)}),(0,g.jsx)(u.t,{size:`xs`,onClick:()=>y(2),"data-testid":`uploader-skip-folder`,children:n(`uploader.next`,{defaultValue:`Next`})})]}),(0,g.jsx)(c.o,{size:`xs`,c:`dimmed`,mt:`xs`,children:S?`${n(`uploader.uploadTo`)}: ${f.o.getState().fsNodes.find(e=>e.id===S)?.name||``}`:n(`uploader.uploadToRoot`)})]}),(0,g.jsx)(O.Step,{label:n(`uploader.stepUpload`),description:n(`uploader.uploading`),children:j?(0,g.jsx)(i.t,{state:N.progress,ariaLabel:n(`uploader.uploadProgress`)}):(0,g.jsxs)(e.t,{className:A.readyContainer,children:[(0,g.jsx)(c.o,{size:`sm`,ta:`center`,children:n(`uploader.readyToUpload`)}),(0,g.jsx)(s.t,{justify:`center`,children:(0,g.jsx)(u.t,{size:`sm`,onClick:U,"data-testid":`uploader-upload`,children:n(`uploader.upload`)})})]})})]}),(0,g.jsx)(m.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}});
|
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
|
|
2
|
+
import { A as t, D as n, I as r, M as i, N as a, O as o, c as s, d as c, i as l, l as u, r as d, t as f, x as p } from "./Box-DSKR_qaa.js";
|
|
3
|
+
import { t as m } from "./create-safe-context-XT2cxc14.js";
|
|
4
|
+
import { c as h, s as g } from "./TextInput-C-JtGWn1.js";
|
|
5
|
+
import { r as _, t as v } from "./use-merged-ref-BT8_u6vW.js";
|
|
6
|
+
import { i as y, r as b, t as x } from "./DownloadProgress-EoyCaD5O.js";
|
|
7
|
+
import { t as S } from "./UnstyledButton-DGaG-e_G.js";
|
|
8
|
+
import { t as C } from "./Paper-BX_9odR6.js";
|
|
9
|
+
import { t as w } from "./Group-CtBJSfCo.js";
|
|
10
|
+
import { o as T } from "./getRuntime-DAPqFH2W.js";
|
|
11
|
+
import { t as E } from "./CheckIcon-N5qBqXQJ.js";
|
|
12
|
+
import { t as D } from "./Button-wTOTQKxF.js";
|
|
13
|
+
import { t as O } from "./useOpenApp-CBIm7Gzl.js";
|
|
14
|
+
import { n as k, o as A, x as j } from "./desktopStore-F8bgLqFl.js";
|
|
15
|
+
import { i as M } from "./useDynamicIcon-Bf0t2foA.js";
|
|
16
|
+
import { i as N } from "./FilePickerApp-DaMgEqKh.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
|
+
import { useTranslation as W } from "react-i18next";
|
|
20
|
+
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/FileButton/FileButton.mjs
|
|
21
|
+
var G = l((e) => {
|
|
22
|
+
let { onChange: t, children: n, multiple: r, accept: i, name: a, form: o, resetRef: s, disabled: c, capture: l, inputProps: d, ref: f, ...p } = u("FileButton", null, e), m = z(null), h = () => {
|
|
23
|
+
!c && m.current?.click();
|
|
24
|
+
};
|
|
25
|
+
return v(s, () => {
|
|
26
|
+
m.current && (m.current.value = "");
|
|
27
|
+
}), /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("input", {
|
|
28
|
+
style: { display: "none" },
|
|
29
|
+
type: "file",
|
|
30
|
+
accept: i,
|
|
31
|
+
multiple: r,
|
|
32
|
+
onChange: (e) => {
|
|
33
|
+
if (e.currentTarget.files === null) return t(r ? [] : null);
|
|
34
|
+
t(r ? Array.from(e.currentTarget.files) : e.currentTarget.files[0] || null);
|
|
35
|
+
},
|
|
36
|
+
ref: _(f, m),
|
|
37
|
+
name: a,
|
|
38
|
+
form: o,
|
|
39
|
+
capture: l,
|
|
40
|
+
...d
|
|
41
|
+
}), n({
|
|
42
|
+
onClick: h,
|
|
43
|
+
...p
|
|
44
|
+
})] });
|
|
45
|
+
});
|
|
46
|
+
G.displayName = "@mantine/core/FileButton";
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Stepper/Stepper.context.mjs
|
|
49
|
+
var [K, q] = m("Stepper component was not found in tree"), J = () => null;
|
|
50
|
+
J.displayName = "@mantine/core/StepperCompleted";
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Stepper/Stepper.module.mjs
|
|
53
|
+
var Y = {
|
|
54
|
+
root: "m_cbb4ea7e",
|
|
55
|
+
steps: "m_aaf89d0b",
|
|
56
|
+
separator: "m_2a371ac9",
|
|
57
|
+
content: "m_78da155d",
|
|
58
|
+
step: "m_cbb57068",
|
|
59
|
+
"step--horizontal": "m_f56b1e2c",
|
|
60
|
+
"step--vertical": "m_833edb7e",
|
|
61
|
+
verticalSeparator: "m_6496b3f3",
|
|
62
|
+
stepWrapper: "m_818e70b",
|
|
63
|
+
stepIcon: "m_1959ad01",
|
|
64
|
+
stepIconContent: "m_8faaac38",
|
|
65
|
+
stepCompletedIcon: "m_a79331dc",
|
|
66
|
+
stepBody: "m_1956aa2a",
|
|
67
|
+
stepLabel: "m_12051f6c",
|
|
68
|
+
stepDescription: "m_164eea74"
|
|
69
|
+
}, X = (e, t) => typeof e == "function" ? /* @__PURE__ */ H(e, { step: t || 0 }) : e, ee = {
|
|
70
|
+
withIcon: !0,
|
|
71
|
+
allowStepClick: !0,
|
|
72
|
+
iconPosition: "left"
|
|
73
|
+
}, Z = d((e) => {
|
|
74
|
+
let { classNames: t, className: n, style: r, styles: i, vars: a, step: o, state: s, color: l, icon: d, completedIcon: f, progressIcon: m, label: _, description: v, withIcon: y, iconSize: b, loading: x, allowStepClick: C, allowStepSelect: w, iconPosition: T, orientation: D, mod: O, ...k } = u("StepperStep", ee, e), A = q(), j = c(), M = {
|
|
75
|
+
classNames: t,
|
|
76
|
+
styles: i
|
|
77
|
+
}, N = s === "stepCompleted" ? null : s === "stepProgress" ? m : d, P = {
|
|
78
|
+
"data-progress": s === "stepProgress" || void 0,
|
|
79
|
+
"data-completed": s === "stepCompleted" || void 0
|
|
80
|
+
};
|
|
81
|
+
return /* @__PURE__ */ U(S, {
|
|
82
|
+
...A.getStyles("step", {
|
|
83
|
+
className: n,
|
|
84
|
+
style: r,
|
|
85
|
+
variant: A.orientation,
|
|
86
|
+
...M
|
|
87
|
+
}),
|
|
88
|
+
mod: [{
|
|
89
|
+
"icon-position": T || A.iconPosition,
|
|
90
|
+
"allow-click": C
|
|
91
|
+
}, O],
|
|
92
|
+
...P,
|
|
93
|
+
...k,
|
|
94
|
+
__vars: { "--step-color": l ? p(l, j) : void 0 },
|
|
95
|
+
tabIndex: C ? 0 : -1,
|
|
96
|
+
children: [y && /* @__PURE__ */ U("span", {
|
|
97
|
+
...A.getStyles("stepWrapper", M),
|
|
98
|
+
children: [/* @__PURE__ */ U("span", {
|
|
99
|
+
...A.getStyles("stepIcon", M),
|
|
100
|
+
...P,
|
|
101
|
+
children: [/* @__PURE__ */ H(h, {
|
|
102
|
+
mounted: s === "stepCompleted",
|
|
103
|
+
transition: "pop",
|
|
104
|
+
duration: 200,
|
|
105
|
+
children: (e) => /* @__PURE__ */ H("span", {
|
|
106
|
+
...A.getStyles("stepCompletedIcon", {
|
|
107
|
+
style: e,
|
|
108
|
+
...M
|
|
109
|
+
}),
|
|
110
|
+
children: x ? /* @__PURE__ */ H(g, {
|
|
111
|
+
color: "var(--mantine-color-white)",
|
|
112
|
+
size: "calc(var(--stepper-icon-size) / 2)",
|
|
113
|
+
...A.getStyles("stepLoader", M)
|
|
114
|
+
}) : X(f, o) || /* @__PURE__ */ H(E, { size: "60%" })
|
|
115
|
+
})
|
|
116
|
+
}), s === "stepCompleted" ? null : /* @__PURE__ */ H("span", {
|
|
117
|
+
...A.getStyles("stepIconContent", M),
|
|
118
|
+
children: x ? /* @__PURE__ */ H(g, {
|
|
119
|
+
...A.getStyles("stepLoader", M),
|
|
120
|
+
size: "calc(var(--stepper-icon-size) / 2)",
|
|
121
|
+
color: l
|
|
122
|
+
}) : X(N || d, o)
|
|
123
|
+
})]
|
|
124
|
+
}), D === "vertical" && /* @__PURE__ */ H("span", {
|
|
125
|
+
...A.getStyles("verticalSeparator", M),
|
|
126
|
+
"data-active": s === "stepCompleted" || void 0
|
|
127
|
+
})]
|
|
128
|
+
}), (_ || v) && /* @__PURE__ */ U("span", {
|
|
129
|
+
...A.getStyles("stepBody", M),
|
|
130
|
+
"data-orientation": A.orientation,
|
|
131
|
+
"data-icon-position": T || A.iconPosition,
|
|
132
|
+
children: [_ && /* @__PURE__ */ H("span", {
|
|
133
|
+
...A.getStyles("stepLabel", M),
|
|
134
|
+
children: X(_, o)
|
|
135
|
+
}), v && /* @__PURE__ */ H("span", {
|
|
136
|
+
...A.getStyles("stepDescription", M),
|
|
137
|
+
children: X(v, o)
|
|
138
|
+
})]
|
|
139
|
+
})]
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
Z.classes = Y, Z.displayName = "@mantine/core/StepperStep";
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Stepper/Stepper.mjs
|
|
145
|
+
var te = {
|
|
146
|
+
orientation: "horizontal",
|
|
147
|
+
iconPosition: "left",
|
|
148
|
+
allowNextStepsSelect: !0,
|
|
149
|
+
wrap: !0
|
|
150
|
+
}, ne = n((e, { color: n, iconSize: s, size: c, contentPadding: l, radius: u, autoContrast: d }) => ({ root: {
|
|
151
|
+
"--stepper-color": n ? p(n, e) : void 0,
|
|
152
|
+
"--stepper-icon-color": b(d, e) ? y({
|
|
153
|
+
color: n,
|
|
154
|
+
theme: e,
|
|
155
|
+
autoContrast: d
|
|
156
|
+
}) : void 0,
|
|
157
|
+
"--stepper-icon-size": s === void 0 ? i(c, "stepper-icon-size") : r(s),
|
|
158
|
+
"--stepper-content-padding": a(l),
|
|
159
|
+
"--stepper-radius": u === void 0 ? void 0 : t(u),
|
|
160
|
+
"--stepper-fz": o(c),
|
|
161
|
+
"--stepper-spacing": a(c)
|
|
162
|
+
} })), Q = d((e) => {
|
|
163
|
+
let t = u("Stepper", te, e), { classNames: n, className: r, style: i, styles: a, unstyled: o, vars: c, children: l, onStepClick: d, 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 = s({
|
|
164
|
+
name: "Stepper",
|
|
165
|
+
classes: Y,
|
|
166
|
+
props: t,
|
|
167
|
+
className: r,
|
|
168
|
+
style: i,
|
|
169
|
+
classNames: n,
|
|
170
|
+
styles: a,
|
|
171
|
+
unstyled: o,
|
|
172
|
+
attributes: O,
|
|
173
|
+
vars: c,
|
|
174
|
+
varsResolver: ne
|
|
175
|
+
}), j = F.toArray(l), M = j.filter((e) => e.type !== J), N = j.find((e) => e.type === J), R = M.reduce((e, t, n) => {
|
|
176
|
+
let r = p === n ? "stepProgress" : p > n ? "stepCompleted" : "stepInactive", i = typeof d == "function" ? typeof t.props.allowStepSelect == "boolean" ? t.props.allowStepSelect : r === "stepCompleted" || w : !1;
|
|
177
|
+
return e.push(I(t, {
|
|
178
|
+
icon: t.props.icon || m || n + 1,
|
|
179
|
+
key: n,
|
|
180
|
+
step: n,
|
|
181
|
+
state: r,
|
|
182
|
+
onClick: () => i && d?.(n),
|
|
183
|
+
allowStepClick: i,
|
|
184
|
+
completedIcon: t.props.completedIcon || h,
|
|
185
|
+
progressIcon: t.props.progressIcon || g,
|
|
186
|
+
color: t.props.color || _,
|
|
187
|
+
iconSize: v,
|
|
188
|
+
iconPosition: t.props.iconPosition || x,
|
|
189
|
+
orientation: b
|
|
190
|
+
})), b === "horizontal" && n !== M.length - 1 && e.push(/* @__PURE__ */ L("div", {
|
|
191
|
+
...A("separator"),
|
|
192
|
+
"data-active": n < p || void 0,
|
|
193
|
+
"data-orientation": b,
|
|
194
|
+
key: `separator-${n}`
|
|
195
|
+
})), e;
|
|
196
|
+
}, []), z = M[p]?.props?.children, B = N?.props?.children, W = p > M.length - 1 ? B : z, G = D ? /* @__PURE__ */ U(V, { children: [M.map((e, t) => /* @__PURE__ */ H(P, {
|
|
197
|
+
mode: p === t ? "visible" : "hidden",
|
|
198
|
+
children: /* @__PURE__ */ H("div", {
|
|
199
|
+
...A("content"),
|
|
200
|
+
children: e.props.children
|
|
201
|
+
})
|
|
202
|
+
}, t)), N && /* @__PURE__ */ H(P, {
|
|
203
|
+
mode: p > M.length - 1 ? "visible" : "hidden",
|
|
204
|
+
children: /* @__PURE__ */ H("div", {
|
|
205
|
+
...A("content"),
|
|
206
|
+
children: N.props.children
|
|
207
|
+
})
|
|
208
|
+
})] }) : W && /* @__PURE__ */ H("div", {
|
|
209
|
+
...A("content"),
|
|
210
|
+
children: W
|
|
211
|
+
});
|
|
212
|
+
return /* @__PURE__ */ H(K, {
|
|
213
|
+
value: {
|
|
214
|
+
getStyles: A,
|
|
215
|
+
orientation: b,
|
|
216
|
+
iconPosition: x
|
|
217
|
+
},
|
|
218
|
+
children: /* @__PURE__ */ U(f, {
|
|
219
|
+
...A("root"),
|
|
220
|
+
size: S,
|
|
221
|
+
...k,
|
|
222
|
+
children: [/* @__PURE__ */ H(f, {
|
|
223
|
+
...A("steps"),
|
|
224
|
+
mod: {
|
|
225
|
+
orientation: b,
|
|
226
|
+
"icon-position": x,
|
|
227
|
+
wrap: T && b !== "vertical"
|
|
228
|
+
},
|
|
229
|
+
children: R
|
|
230
|
+
}), G]
|
|
231
|
+
})
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
Q.classes = Y, Q.varsResolver = ne, Q.displayName = "@mantine/core/Stepper", Q.Completed = J, Q.Step = Z;
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region src/utils/formatBytes.ts
|
|
237
|
+
function re(e) {
|
|
238
|
+
if (e === 0) return "0 B";
|
|
239
|
+
let t = 1024, n = [
|
|
240
|
+
"B",
|
|
241
|
+
"KB",
|
|
242
|
+
"MB",
|
|
243
|
+
"GB",
|
|
244
|
+
"TB"
|
|
245
|
+
], r = Math.floor(Math.log(e) / Math.log(t)), i = Math.min(r, n.length - 1);
|
|
246
|
+
return `${parseFloat((e / t ** +i).toFixed(1))} ${n[i]}`;
|
|
247
|
+
}
|
|
248
|
+
var $ = {
|
|
249
|
+
container: "_container_1xc3a_1",
|
|
250
|
+
backgroundIcon: "_backgroundIcon_1xc3a_13",
|
|
251
|
+
stepper: "_stepper_1xc3a_23",
|
|
252
|
+
fileInfo: "_fileInfo_1xc3a_30",
|
|
253
|
+
resultPaper: "_resultPaper_1xc3a_37",
|
|
254
|
+
resultIcon: "_resultIcon_1xc3a_49",
|
|
255
|
+
readyContainer: "_readyContainer_1xc3a_53"
|
|
256
|
+
}, ie = /* @__PURE__ */ e({ default: () => ae }), ae = ({ window: e }) => {
|
|
257
|
+
let { t } = W("apps"), n = A((e) => e.createFile), r = O(), [i, a] = B(0), [o, s] = B(null), [c, l] = B(null), [u, d] = B(!1), [p, m] = B(!1), [h, g] = B(!1), [_, v] = B({
|
|
258
|
+
status: "idle",
|
|
259
|
+
progress: {
|
|
260
|
+
status: "idle",
|
|
261
|
+
loaded: 0,
|
|
262
|
+
total: null,
|
|
263
|
+
percent: null,
|
|
264
|
+
error: null
|
|
265
|
+
}
|
|
266
|
+
}), [y, b] = B(null), S = M("FcUpload", { size: 120 }), E = M("FcCheckmark", { size: 64 }), P = M("FcCheckmark", { size: 14 }), F = M("FcInfo", { size: 64 }), I = R((e) => {
|
|
267
|
+
e && (s(e), a(1));
|
|
268
|
+
}, []), L = R((e) => {
|
|
269
|
+
l(e), d(!0), m(!1), a(2);
|
|
270
|
+
}, []), z = R(async () => {
|
|
271
|
+
if (o) {
|
|
272
|
+
console.log("[UploaderApp] Starting upload for file:", o.name, "size:", o.size), g(!0), v({
|
|
273
|
+
status: "reading",
|
|
274
|
+
progress: {
|
|
275
|
+
status: "downloading",
|
|
276
|
+
loaded: 0,
|
|
277
|
+
total: o.size,
|
|
278
|
+
percent: 0,
|
|
279
|
+
error: null
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
try {
|
|
283
|
+
v((e) => ({
|
|
284
|
+
...e,
|
|
285
|
+
progress: {
|
|
286
|
+
status: "downloading",
|
|
287
|
+
loaded: 0,
|
|
288
|
+
total: o.size,
|
|
289
|
+
percent: 0,
|
|
290
|
+
error: null
|
|
291
|
+
}
|
|
292
|
+
}));
|
|
293
|
+
for (let e = 0; e <= 50; e += 10) await new Promise((e) => setTimeout(e, 50)), v((t) => ({
|
|
294
|
+
...t,
|
|
295
|
+
progress: {
|
|
296
|
+
status: "downloading",
|
|
297
|
+
loaded: Math.floor(o.size * e / 100),
|
|
298
|
+
total: o.size,
|
|
299
|
+
percent: e,
|
|
300
|
+
error: null
|
|
301
|
+
}
|
|
302
|
+
}));
|
|
303
|
+
console.log("[UploaderApp] Calling saveBlob...");
|
|
304
|
+
let e = Date.now(), t = await k.saveBlob(o);
|
|
305
|
+
console.log("[UploaderApp] saveBlob completed in", Date.now() - e, "ms, url:", t), v((e) => ({
|
|
306
|
+
...e,
|
|
307
|
+
progress: {
|
|
308
|
+
status: "downloading",
|
|
309
|
+
loaded: Math.floor(o.size * 80 / 100),
|
|
310
|
+
total: o.size,
|
|
311
|
+
percent: 80,
|
|
312
|
+
error: null
|
|
313
|
+
}
|
|
314
|
+
})), console.log("[UploaderApp] Calling createFile with folderId:", c);
|
|
315
|
+
let r = Date.now(), i = await n(o.name, "", c, t);
|
|
316
|
+
console.log("[UploaderApp] createFile completed in", Date.now() - r, "ms, id:", i.id), b(i.id), v({
|
|
317
|
+
status: "done",
|
|
318
|
+
progress: {
|
|
319
|
+
status: "done",
|
|
320
|
+
loaded: o.size,
|
|
321
|
+
total: o.size,
|
|
322
|
+
percent: 100,
|
|
323
|
+
error: null
|
|
324
|
+
}
|
|
325
|
+
}), await new Promise((e) => setTimeout(e, 1e3)), a(3);
|
|
326
|
+
} catch (e) {
|
|
327
|
+
console.error("[UploaderApp] Upload FAILED:", e), v((t) => ({
|
|
328
|
+
...t,
|
|
329
|
+
status: "error",
|
|
330
|
+
error: e instanceof Error ? e.message : "Upload failed"
|
|
331
|
+
})), await new Promise((e) => setTimeout(e, 1e3)), a(3);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}, [
|
|
335
|
+
o,
|
|
336
|
+
c,
|
|
337
|
+
n
|
|
338
|
+
]), V = R(() => {
|
|
339
|
+
c ? r("files", { contentData: { initialFolderId: c } }) : r("files");
|
|
340
|
+
}, [c, r]), K = R(() => {
|
|
341
|
+
if (!y) return;
|
|
342
|
+
let e = A.getState().fsNodes.find((e) => e.id === y);
|
|
343
|
+
if (!e || e.type !== "file") return;
|
|
344
|
+
let t = j(e);
|
|
345
|
+
t && r(t.appId, { contentData: t.contentData });
|
|
346
|
+
}, [y, r]);
|
|
347
|
+
if (!e) return null;
|
|
348
|
+
let q = _.status === "done", J = _.error;
|
|
349
|
+
return i === 3 ? /* @__PURE__ */ H("div", {
|
|
350
|
+
className: $.container,
|
|
351
|
+
children: /* @__PURE__ */ U(C, {
|
|
352
|
+
shadow: "sm",
|
|
353
|
+
className: $.resultPaper,
|
|
354
|
+
children: [
|
|
355
|
+
/* @__PURE__ */ H(f, {
|
|
356
|
+
className: $.resultIcon,
|
|
357
|
+
children: q ? E : F
|
|
358
|
+
}),
|
|
359
|
+
/* @__PURE__ */ H(T, {
|
|
360
|
+
size: "lg",
|
|
361
|
+
fw: 500,
|
|
362
|
+
ta: "center",
|
|
363
|
+
children: q ? t("uploader.uploadComplete") : `${t("uploader.uploadFailed")}: ${J}`
|
|
364
|
+
}),
|
|
365
|
+
q && /* @__PURE__ */ U(w, {
|
|
366
|
+
mt: "md",
|
|
367
|
+
justify: "center",
|
|
368
|
+
children: [/* @__PURE__ */ H(D, {
|
|
369
|
+
variant: "default",
|
|
370
|
+
size: "sm",
|
|
371
|
+
onClick: V,
|
|
372
|
+
"data-testid": "uploader-show-file",
|
|
373
|
+
children: t("uploader.showFile")
|
|
374
|
+
}), /* @__PURE__ */ H(D, {
|
|
375
|
+
size: "sm",
|
|
376
|
+
onClick: K,
|
|
377
|
+
"data-testid": "uploader-open-file",
|
|
378
|
+
children: t("uploader.openFile")
|
|
379
|
+
})]
|
|
380
|
+
})
|
|
381
|
+
]
|
|
382
|
+
})
|
|
383
|
+
}) : /* @__PURE__ */ U("div", {
|
|
384
|
+
className: $.container,
|
|
385
|
+
children: [
|
|
386
|
+
S && /* @__PURE__ */ H("div", {
|
|
387
|
+
className: $.backgroundIcon,
|
|
388
|
+
children: S
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ U(Q, {
|
|
391
|
+
active: i,
|
|
392
|
+
orientation: "horizontal",
|
|
393
|
+
size: "sm",
|
|
394
|
+
className: $.stepper,
|
|
395
|
+
children: [
|
|
396
|
+
/* @__PURE__ */ H(Q.Step, {
|
|
397
|
+
label: t("uploader.stepSelect"),
|
|
398
|
+
description: t("uploader.clickToUpload"),
|
|
399
|
+
children: /* @__PURE__ */ H(G, {
|
|
400
|
+
accept: "*",
|
|
401
|
+
onChange: I,
|
|
402
|
+
children: (e) => /* @__PURE__ */ H(D, {
|
|
403
|
+
...e,
|
|
404
|
+
size: "sm",
|
|
405
|
+
"data-testid": "uploader-select-file",
|
|
406
|
+
children: t("uploader.clickToUpload")
|
|
407
|
+
})
|
|
408
|
+
})
|
|
409
|
+
}),
|
|
410
|
+
/* @__PURE__ */ U(Q.Step, {
|
|
411
|
+
label: t("uploader.stepDestination"),
|
|
412
|
+
description: u ? /* @__PURE__ */ U(w, {
|
|
413
|
+
gap: 4,
|
|
414
|
+
align: "center",
|
|
415
|
+
style: { display: "inline-flex" },
|
|
416
|
+
children: [P, /* @__PURE__ */ H("span", { children: t("uploader.folderSelected") })]
|
|
417
|
+
}) : t("uploader.selectDestination"),
|
|
418
|
+
children: [
|
|
419
|
+
o && /* @__PURE__ */ U(f, {
|
|
420
|
+
className: $.fileInfo,
|
|
421
|
+
children: [/* @__PURE__ */ H(T, {
|
|
422
|
+
size: "sm",
|
|
423
|
+
fw: 500,
|
|
424
|
+
children: o.name
|
|
425
|
+
}), /* @__PURE__ */ H(T, {
|
|
426
|
+
size: "xs",
|
|
427
|
+
c: "dimmed",
|
|
428
|
+
children: re(o.size)
|
|
429
|
+
})]
|
|
430
|
+
}),
|
|
431
|
+
/* @__PURE__ */ U(w, {
|
|
432
|
+
mt: "md",
|
|
433
|
+
children: [/* @__PURE__ */ H(D, {
|
|
434
|
+
variant: "default",
|
|
435
|
+
size: "xs",
|
|
436
|
+
onClick: () => m(!0),
|
|
437
|
+
"data-testid": "uploader-select-folder",
|
|
438
|
+
children: t("uploader.selectDestination")
|
|
439
|
+
}), /* @__PURE__ */ H(D, {
|
|
440
|
+
size: "xs",
|
|
441
|
+
onClick: () => a(2),
|
|
442
|
+
"data-testid": "uploader-skip-folder",
|
|
443
|
+
children: t("uploader.next", { defaultValue: "Next" })
|
|
444
|
+
})]
|
|
445
|
+
}),
|
|
446
|
+
/* @__PURE__ */ H(T, {
|
|
447
|
+
size: "xs",
|
|
448
|
+
c: "dimmed",
|
|
449
|
+
mt: "xs",
|
|
450
|
+
children: c ? `${t("uploader.uploadTo")}: ${A.getState().fsNodes.find((e) => e.id === c)?.name || ""}` : t("uploader.uploadToRoot")
|
|
451
|
+
})
|
|
452
|
+
]
|
|
453
|
+
}),
|
|
454
|
+
/* @__PURE__ */ H(Q.Step, {
|
|
455
|
+
label: t("uploader.stepUpload"),
|
|
456
|
+
description: t("uploader.uploading"),
|
|
457
|
+
children: h ? /* @__PURE__ */ H(x, {
|
|
458
|
+
state: _.progress,
|
|
459
|
+
ariaLabel: t("uploader.uploadProgress")
|
|
460
|
+
}) : /* @__PURE__ */ U(f, {
|
|
461
|
+
className: $.readyContainer,
|
|
462
|
+
children: [/* @__PURE__ */ H(T, {
|
|
463
|
+
size: "sm",
|
|
464
|
+
ta: "center",
|
|
465
|
+
children: t("uploader.readyToUpload")
|
|
466
|
+
}), /* @__PURE__ */ H(w, {
|
|
467
|
+
justify: "center",
|
|
468
|
+
children: /* @__PURE__ */ H(D, {
|
|
469
|
+
size: "sm",
|
|
470
|
+
onClick: z,
|
|
471
|
+
"data-testid": "uploader-upload",
|
|
472
|
+
children: t("uploader.upload")
|
|
473
|
+
})
|
|
474
|
+
})]
|
|
475
|
+
})
|
|
476
|
+
})
|
|
477
|
+
]
|
|
478
|
+
}),
|
|
479
|
+
/* @__PURE__ */ H(N, {
|
|
480
|
+
opened: p,
|
|
481
|
+
onConfirm: L,
|
|
482
|
+
onCancel: () => m(!1)
|
|
483
|
+
})
|
|
484
|
+
]
|
|
485
|
+
});
|
|
486
|
+
};
|
|
487
|
+
//#endregion
|
|
488
|
+
export { ie as n, re as r, ae as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicIcon-DJ_il30E.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}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./Box-zW6Twge8.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}});
|
|
@@ -0,0 +1,12 @@
|
|
|
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 };
|