@fde-desktop/fde-core 0.4.10 → 0.4.13
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/AppEmptyState-Boej96TB.js +49 -0
- package/dist/AppEmptyState-CLc00OOG.cjs +1 -0
- package/dist/AppIcon-C8vHUVcb.cjs +1 -0
- package/dist/AppIcon-mtEoyzOb.js +22 -0
- package/dist/AppMenuBar-CAlkNHjj.cjs +1 -0
- package/dist/AppMenuBar-DmSfQRXU.js +197 -0
- package/dist/CalendarApp-DOmjWbpl.js +10 -0
- package/dist/CalendarApp-Z0bCCYsK.cjs +1 -0
- package/dist/ColorPicker-CQRRwY-y.cjs +1 -0
- package/dist/ColorPicker-WCeD3Wjf.js +35 -0
- package/dist/CreateItemApp-BkFFFdX1.cjs +1 -0
- package/dist/CreateItemApp-DR8Y4bwo.js +202 -0
- package/dist/DeviceInfoApp-BXQ9uOwF.cjs +1 -0
- package/dist/DeviceInfoApp-I63mJRWy.js +195 -0
- package/dist/DownloadProgress-CkTGTf0z.cjs +1 -0
- package/dist/DownloadProgress-DnVASsv5.js +39 -0
- package/dist/FilePickerApp-By6-vbag.cjs +1 -0
- package/dist/FilePickerApp-ClHuhm6Z.js +390 -0
- package/dist/FilesApp-BRK2OqkQ.cjs +1 -0
- package/dist/FilesApp-BuoFP_KA.js +212 -0
- package/dist/ImageViewerApp-B1niWF75.cjs +1 -0
- package/dist/{ImageViewerApp-CWiP6zx-.js → ImageViewerApp-iojtyFEf.js} +18 -17
- package/dist/{ImageViewerMenuBar-BULkh_Ku.js → ImageViewerMenuBar-BIsUokxV.js} +15 -14
- package/dist/ImageViewerMenuBar-BgzgSF3v.cjs +1 -0
- package/dist/MenuEditApp-BHptoJbz.cjs +1 -0
- package/dist/MenuEditApp-CJUbJaqh.js +492 -0
- package/dist/MenuEditMenuBar-CCOSPAUe.cjs +1 -0
- package/dist/{MenuEditMenuBar-B94z4Umw.js → MenuEditMenuBar-DnCL-kaZ.js} +13 -12
- package/dist/NotesApp-BmQIBtJ2.cjs +1 -0
- package/dist/NotesApp-DJ2dGt4-.js +364 -0
- package/dist/NotesMenuBar-BzojwMtH.cjs +1 -0
- package/dist/{NotesMenuBar-BB4NkKGf.js → NotesMenuBar-DILZTjnT.js} +10 -9
- package/dist/PdfApp-IjY_GtnW.js +39 -0
- package/dist/PdfApp-krW8UI97.cjs +1 -0
- package/dist/PdfMenuBar-Bd5MTZcZ.js +39 -0
- package/dist/PdfMenuBar-DWD0Qa3F.cjs +1 -0
- package/dist/SettingsApp-BE22l5UP.cjs +1 -0
- package/dist/SettingsApp-BTFtTFY_.js +1228 -0
- package/dist/SettingsMenuBar-CZE2evG2.cjs +1 -0
- package/dist/SettingsMenuBar-ktC0viTd.js +42 -0
- package/dist/UploaderApp-Bboc4KZ1.js +263 -0
- package/dist/UploaderApp-Dr1mF7oj.cjs +1 -0
- package/dist/{VscIcon-DueRJVTe.js → VscIcon-AEENjKOE.js} +1 -1
- package/dist/VscIcon-BYb_Soyy.cjs +1 -0
- package/dist/buildBreadcrumbs-Ccd8i11b.cjs +1 -0
- package/dist/buildBreadcrumbs-noWhu8os.js +45 -0
- package/dist/{desktopStore-B0R1-BeA.js → desktopStore-8cSZlj7s.js} +342 -549
- package/dist/desktopStore-C1jR6Fdb.cjs +1 -0
- package/dist/{imageViewerStore-CJMRXaQh.js → imageViewerStore-COrD02Zu.js} +1 -1
- package/dist/imageViewerStore-Dfylg59V.cjs +1 -0
- package/dist/index.cjs +1 -53
- package/dist/index.css +1 -1
- package/dist/index.d.ts +16 -6
- package/dist/index.js +3033 -7513
- package/dist/menuEditStore-CYwtfD6H.cjs +1 -0
- package/dist/{menuEditStore-C8S_EedM.js → menuEditStore-CxsgLiQu.js} +1 -1
- package/dist/notesStore-CrWTO6oB.cjs +1 -0
- package/dist/{notesStore-DKRgTTFn.js → notesStore-Dgah46U5.js} +1 -1
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/{settingsAppStore-KOeWRO6h.js → settingsAppStore-DHZhi6Rl.js} +1 -1
- package/dist/settingsAppStore-DuYZNeFf.cjs +1 -0
- package/dist/useAdaptiveDimensions-3Lz4X0Tc.cjs +1 -0
- package/dist/{useAdaptiveDimensions-CunsU0mn.js → useAdaptiveDimensions-DxNLJ7R5.js} +1 -1
- package/dist/{useCloseInterceptor-CuKAAFnj.js → useCloseInterceptor-CIxhOZx1.js} +12 -12
- package/dist/useCloseInterceptor-CdX-09Ib.cjs +1 -0
- package/dist/useDynamicIcon-CK6SjEv5.cjs +1 -0
- package/dist/{useDynamicIcon-GJg3vWsJ.js → useDynamicIcon-_wGeWu-b.js} +1 -1
- package/dist/useOpenApp-ChDhsL9h.cjs +1 -0
- package/dist/{useOpenApp-BVpSfNrG.js → useOpenApp-uguTLkyl.js} +51 -67
- package/dist/{useResolvedUrl-DFKXq598.js → useResolvedUrl-B6x4xy0x.js} +1 -2
- package/dist/useResolvedUrl-Bb39DpVy.cjs +1 -0
- package/package.json +3 -4
- package/dist/AccordionChevron-CJXAq5o5.js +0 -26
- package/dist/AccordionChevron-DBXp38Lm.cjs +0 -1
- package/dist/ActionIcon-C_SfdBfx.cjs +0 -1
- package/dist/ActionIcon-CtVbYlGY.js +0 -145
- package/dist/AppEmptyState-BTujnL_b.js +0 -4962
- package/dist/AppEmptyState-Dc4GaDfu.cjs +0 -1
- package/dist/AppIcon--qzR4sgf.cjs +0 -1
- package/dist/AppIcon-DCDuaU-t.js +0 -80
- package/dist/AppMenuBar-BiHbNg9V.cjs +0 -9
- package/dist/AppMenuBar-CHJy8OF0.js +0 -2639
- package/dist/Box-DRm8EabO.js +0 -1593
- package/dist/Box-D_64wv6n.cjs +0 -1
- package/dist/Button-D0FXpkur.cjs +0 -1
- package/dist/Button-k7SxX1Xl.js +0 -178
- package/dist/CalendarApp-C1HvuJoa.cjs +0 -1
- package/dist/CalendarApp-DBEQqsS_.js +0 -1721
- package/dist/Center-CyryG5zn.js +0 -25
- package/dist/Center-T4No_FAa.cjs +0 -1
- package/dist/CheckIcon-C3WjIR2i.js +0 -25
- package/dist/CheckIcon-CBMLR6Gc.cjs +0 -1
- package/dist/CodeServerApp-B3l5QPuG.cjs +0 -1
- package/dist/CodeServerApp-BpeALSaX.js +0 -2
- package/dist/CodeServerApp-CRjCngFv.cjs +0 -1
- package/dist/CodeServerApp-DY94cy1a.js +0 -149
- package/dist/ColorPicker-BL4UbKCV.cjs +0 -1
- package/dist/ColorPicker-DvRR-wlQ.js +0 -997
- package/dist/CreateItemApp-BU9wmjKM.cjs +0 -1
- package/dist/CreateItemApp-CtdH1K1g.js +0 -400
- package/dist/CreateItemApp-t9F-a6wD.cjs +0 -1
- package/dist/DeviceInfoApp-C306YvtZ.js +0 -223
- package/dist/DeviceInfoApp-Cdju_LIB.cjs +0 -1
- package/dist/DeviceInfoApp-CyB01v4D.cjs +0 -1
- package/dist/DownloadProgress-IRw1dzLX.cjs +0 -1
- package/dist/DownloadProgress-hdupSUBT.js +0 -174
- package/dist/FileIcon-BCpGMI5U.js +0 -88
- package/dist/FileIcon-BCrsxmtt.cjs +0 -1
- package/dist/FilePickerApp-DMGuvahM.js +0 -409
- package/dist/FilePickerApp-Eu0cr2Cm.cjs +0 -1
- package/dist/FilesApp-BQFVHkEn.js +0 -225
- package/dist/FilesApp-BZ_dzZnF.cjs +0 -1
- package/dist/FilesApp-SIWXFPXt.cjs +0 -1
- package/dist/Group-BzwlMeob.js +0 -48
- package/dist/Group-DhwePB84.cjs +0 -1
- package/dist/ImageViewerApp-BOz59TGc.cjs +0 -1
- package/dist/ImageViewerApp-BeqY6voE.cjs +0 -1
- package/dist/ImageViewerApp-DBAfJPSo.js +0 -2
- package/dist/ImageViewerMenuBar-Cb0Nr5-M.js +0 -2
- package/dist/ImageViewerMenuBar-CoEp0RxK.cjs +0 -1
- package/dist/ImageViewerMenuBar-zOkJtqKo.cjs +0 -1
- package/dist/MenuEditApp-BoKtj2GH.js +0 -2
- package/dist/MenuEditApp-D21sEp86.js +0 -2615
- package/dist/MenuEditApp-k3cPfTG9.cjs +0 -1
- package/dist/MenuEditApp-sz9GlLVH.cjs +0 -5
- package/dist/MenuEditMenuBar-6QxlIDpl.cjs +0 -1
- package/dist/MenuEditMenuBar-Bv6R42lf.js +0 -2
- package/dist/MenuEditMenuBar-CBsmH_-T.cjs +0 -1
- package/dist/NotesApp-BtR55Hva.cjs +0 -207
- package/dist/NotesApp-C59exz_9.js +0 -16154
- package/dist/NotesApp-D47I5LS_.js +0 -2
- package/dist/NotesApp-lOwsi2sg.cjs +0 -1
- package/dist/NotesMenuBar-BZITC74y.cjs +0 -1
- package/dist/NotesMenuBar-Bp0sPqyR.cjs +0 -1
- package/dist/NotesMenuBar-xlfODmMA.js +0 -2
- package/dist/Paper-DtUYKmYn.js +0 -30
- package/dist/Paper-DwCpwWwH.cjs +0 -1
- package/dist/PdfApp-1XbFGfoY.cjs +0 -1
- package/dist/PdfApp-BhIoJWeK.cjs +0 -1
- package/dist/PdfApp-C5Rt1Zaw.js +0 -2
- package/dist/PdfApp-C8Hwxxqh.js +0 -38
- package/dist/PdfMenuBar-BA9rKuMP.cjs +0 -1
- package/dist/PdfMenuBar-JXHqwxhZ.cjs +0 -1
- package/dist/PdfMenuBar-R0fu7oYF.js +0 -2
- package/dist/PdfMenuBar-sd-9Vk3h.js +0 -38
- package/dist/SettingsApp-7EhpjzUE.cjs +0 -1
- package/dist/SettingsApp-ByiPAj1I.cjs +0 -1
- package/dist/SettingsApp-d6fmBHxR.js +0 -1829
- package/dist/SettingsApp-qKJmC0lj.js +0 -2
- package/dist/SettingsMenuBar-BPwv8JQK.js +0 -41
- package/dist/SettingsMenuBar-D8R7hOik.js +0 -2
- package/dist/SettingsMenuBar-DDrjZLmg.cjs +0 -1
- package/dist/SettingsMenuBar-DQjUa8g1.cjs +0 -1
- package/dist/Slider-BNO-vDFn.js +0 -1175
- package/dist/Slider-Bg_EIBg6.cjs +0 -1
- package/dist/Stack-BOaJgV3N.cjs +0 -1
- package/dist/Stack-CuDEaP7e.js +0 -34
- package/dist/StorybookApp-Bkr-7mXp.cjs +0 -1
- package/dist/StorybookApp-WYninkJo.js +0 -10
- package/dist/TerminalApp-8XbsKAWa.js +0 -10041
- package/dist/TerminalApp-Bq2e7QQu.cjs +0 -1
- package/dist/TerminalApp-CVu3Axc9.js +0 -2
- package/dist/TerminalApp-b7_d0jRO.cjs +0 -36
- package/dist/TerminalMenuBar-Cb8x9laS.js +0 -2
- package/dist/TerminalMenuBar-De-FH5AE.cjs +0 -1
- package/dist/TerminalMenuBar-iKLydNda.js +0 -112
- package/dist/TerminalMenuBar-yOaWd-hn.cjs +0 -1
- package/dist/TextInput-C3qfxxWI.js +0 -980
- package/dist/TextInput-DcYns3hz.cjs +0 -1
- package/dist/Tooltip-CAOO-qdx.js +0 -3185
- package/dist/Tooltip-DDh_x-CB.cjs +0 -1
- package/dist/UnstyledButton-CI3kyRck.js +0 -25
- package/dist/UnstyledButton-Cl5RuIid.cjs +0 -1
- package/dist/UploaderApp-C76ydsd8.js +0 -487
- package/dist/UploaderApp-CHACW8Yr.js +0 -2
- package/dist/UploaderApp-Q_a3mBik.cjs +0 -1
- package/dist/UploaderApp-htj59ppo.cjs +0 -1
- package/dist/VscIcon-CxEmqD80.cjs +0 -1
- package/dist/chunk-BQCxAhux.js +0 -23
- package/dist/chunk-CiTBaPhY.cjs +0 -1
- package/dist/create-safe-context-95P-Bfg3.cjs +0 -1
- package/dist/create-safe-context-XT2cxc14.js +0 -12
- package/dist/desktopStore-Cox-Og1z.cjs +0 -1
- package/dist/fc-DejOsQyD.cjs +0 -1
- package/dist/fc-kd8WzIER.js +0 -20536
- package/dist/fc-xJ_v2ayq.cjs +0 -184
- package/dist/fi-BahYsbim.js +0 -9993
- package/dist/fi-BkhyTcZo.cjs +0 -1
- package/dist/getRuntime-BLXyQZBB.cjs +0 -1
- package/dist/getRuntime-CCRXVzJH.js +0 -63
- package/dist/iconBase-B4UCuSvv.cjs +0 -1
- package/dist/iconBase-D7iPes7B.js +0 -108
- package/dist/imageViewerStore-CH1qW6md.cjs +0 -1
- package/dist/is-element-BocgicRg.cjs +0 -1
- package/dist/is-element-Bu_JY8Qy.js +0 -7
- package/dist/menuEditStore-CU7IAg3L.cjs +0 -1
- package/dist/notesStore-zKmChTfF.cjs +0 -1
- package/dist/react-DYmzHD0X.js +0 -27
- package/dist/react-Dldg32sN.cjs +0 -1
- package/dist/settingsAppStore-BrlImdAH.cjs +0 -1
- package/dist/terminalStore-LWWjCvCe.js +0 -30
- package/dist/terminalStore-fZe5t7Ty.cjs +0 -1
- package/dist/use-merged-ref-BI9n1hUK.cjs +0 -1
- package/dist/use-merged-ref-BT8_u6vW.js +0 -25
- package/dist/use-resolved-styles-api-AVDygMKo.cjs +0 -1
- package/dist/use-resolved-styles-api-pEOi2wiK.js +0 -21
- package/dist/use-uncontrolled-A4hm9ATM.js +0 -23
- package/dist/use-uncontrolled-BPrfGv0W.cjs +0 -1
- package/dist/useAdaptiveDimensions-Btp0m5Pm.cjs +0 -1
- package/dist/useCloseInterceptor-a_6Lcuqj.cjs +0 -1
- package/dist/useDynamicIcon-SytdL1Tu.cjs +0 -1
- package/dist/useOpenApp-Br0jo4-y.cjs +0 -1
- package/dist/useResolvedUrl-Be5ZlCX7.cjs +0 -1
- package/dist/useTranslation-DMRGdqZi.js +0 -279
- package/dist/useTranslation-D_O7S4RJ.cjs +0 -1
- package/dist/vsc-Ciibqbxo.cjs +0 -1
- package/dist/vsc-DGKSpOAR.js +0 -9574
- /package/dist/{Colors-BxX4G8kX.cjs → Colors-CNJbU7oq.cjs} +0 -0
- /package/dist/{Colors-hca6raEG.js → Colors-CuABn2W4.js} +0 -0
- /package/dist/{useMenuBarUtils-ChmpZjwu.js → useMenuBarUtils-ChAfI7OA.js} +0 -0
- /package/dist/{useMenuBarUtils-Bp5PiztD.cjs → useMenuBarUtils-DAap0ukp.cjs} +0 -0
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { N as e, O as t, S as n, c as r, d as i, j as a, l as o, r as s, t as c, w as l, x as u } from "./Box-DRm8EabO.js";
|
|
2
|
-
import { t as d } from "./create-safe-context-XT2cxc14.js";
|
|
3
|
-
import { t as f } from "./use-resolved-styles-api-pEOi2wiK.js";
|
|
4
|
-
import { t as p } from "./Group-BzwlMeob.js";
|
|
5
|
-
import { o as m } from "./getRuntime-CCRXVzJH.js";
|
|
6
|
-
import { i as h } from "./useDynamicIcon-GJg3vWsJ.js";
|
|
7
|
-
import { useEffect as g, useState as _ } from "react";
|
|
8
|
-
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
9
|
-
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.mjs
|
|
10
|
-
function b({ color: e, theme: t, autoContrast: r }) {
|
|
11
|
-
return (typeof r == "boolean" ? r : t.autoContrast) && n({
|
|
12
|
-
color: e || t.primaryColor,
|
|
13
|
-
theme: t
|
|
14
|
-
}).isLight ? "var(--mantine-color-black)" : "var(--mantine-color-white)";
|
|
15
|
-
}
|
|
16
|
-
function x(e, t) {
|
|
17
|
-
return b({
|
|
18
|
-
color: e.colors[e.primaryColor][l(e, t)],
|
|
19
|
-
theme: e,
|
|
20
|
-
autoContrast: null
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/core/MantineProvider/color-functions/get-auto-contrast-value/get-auto-contrast-value.mjs
|
|
25
|
-
function S(e, t) {
|
|
26
|
-
return typeof e == "boolean" ? e : t.autoContrast;
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Progress/Progress.context.mjs
|
|
30
|
-
var [C, w] = d("Progress.Root component was not found in tree"), T = {
|
|
31
|
-
root: "m_db6d6462",
|
|
32
|
-
section: "m_2242eb65",
|
|
33
|
-
"stripes-animation": "m_81a374bd",
|
|
34
|
-
"stripes-animation-vertical": "m_e0fb7a86",
|
|
35
|
-
label: "m_91e40b74"
|
|
36
|
-
}, E = s((e) => {
|
|
37
|
-
let { classNames: t, className: n, style: r, styles: i, vars: a, ...s } = o("ProgressLabel", null, e);
|
|
38
|
-
return /* @__PURE__ */ v(c, {
|
|
39
|
-
...w().getStyles("label", {
|
|
40
|
-
className: n,
|
|
41
|
-
style: r,
|
|
42
|
-
classNames: t,
|
|
43
|
-
styles: i
|
|
44
|
-
}),
|
|
45
|
-
...s
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
E.classes = T, E.displayName = "@mantine/core/ProgressLabel";
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Progress/ProgressRoot/ProgressRoot.mjs
|
|
51
|
-
var D = t((t, { size: n, radius: r, transitionDuration: i }) => ({ root: {
|
|
52
|
-
"--progress-size": e(n, "progress-size"),
|
|
53
|
-
"--progress-radius": r === void 0 ? void 0 : a(r),
|
|
54
|
-
"--progress-transition-duration": typeof i == "number" ? `${i}ms` : void 0
|
|
55
|
-
} })), O = s((e) => {
|
|
56
|
-
let t = o("ProgressRoot", null, e), { classNames: n, className: i, style: a, styles: s, unstyled: l, vars: u, autoContrast: d, transitionDuration: f, orientation: p, attributes: m, mod: h, ...g } = t, _ = r({
|
|
57
|
-
name: "Progress",
|
|
58
|
-
classes: T,
|
|
59
|
-
props: t,
|
|
60
|
-
className: i,
|
|
61
|
-
style: a,
|
|
62
|
-
classNames: n,
|
|
63
|
-
styles: s,
|
|
64
|
-
unstyled: l,
|
|
65
|
-
attributes: m,
|
|
66
|
-
vars: u,
|
|
67
|
-
varsResolver: D
|
|
68
|
-
});
|
|
69
|
-
return /* @__PURE__ */ v(C, {
|
|
70
|
-
value: {
|
|
71
|
-
getStyles: _,
|
|
72
|
-
autoContrast: d
|
|
73
|
-
},
|
|
74
|
-
children: /* @__PURE__ */ v(c, {
|
|
75
|
-
mod: [{ orientation: p }, h],
|
|
76
|
-
..._("root"),
|
|
77
|
-
...g
|
|
78
|
-
})
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
O.classes = T, O.varsResolver = D, O.displayName = "@mantine/core/ProgressRoot";
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Progress/ProgressSection/ProgressSection.mjs
|
|
84
|
-
var k = { withAria: !0 }, A = s((e) => {
|
|
85
|
-
let { classNames: t, className: n, style: r, styles: a, vars: s, value: l, withAria: d, color: f, striped: p, animated: m, mod: h, ...g } = o("ProgressSection", k, e), _ = w(), y = i(), x = d ? {
|
|
86
|
-
role: "progressbar",
|
|
87
|
-
"aria-valuemax": 100,
|
|
88
|
-
"aria-valuemin": 0,
|
|
89
|
-
"aria-valuenow": l,
|
|
90
|
-
"aria-valuetext": `${l}%`
|
|
91
|
-
} : {};
|
|
92
|
-
return /* @__PURE__ */ v(c, {
|
|
93
|
-
..._.getStyles("section", {
|
|
94
|
-
className: n,
|
|
95
|
-
classNames: t,
|
|
96
|
-
styles: a,
|
|
97
|
-
style: r
|
|
98
|
-
}),
|
|
99
|
-
...g,
|
|
100
|
-
...x,
|
|
101
|
-
mod: [{
|
|
102
|
-
striped: p || m,
|
|
103
|
-
animated: m
|
|
104
|
-
}, h],
|
|
105
|
-
__vars: {
|
|
106
|
-
"--progress-section-size": `${l}%`,
|
|
107
|
-
"--progress-section-color": u(f, y),
|
|
108
|
-
"--progress-label-color": S(_.autoContrast, y) ? b({
|
|
109
|
-
color: f,
|
|
110
|
-
theme: y,
|
|
111
|
-
autoContrast: _.autoContrast
|
|
112
|
-
}) : void 0
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
A.classes = T, A.displayName = "@mantine/core/ProgressSection";
|
|
117
|
-
//#endregion
|
|
118
|
-
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Progress/Progress.mjs
|
|
119
|
-
var j = s((e) => {
|
|
120
|
-
let t = o("Progress", null, e), { value: n, classNames: r, styles: i, vars: a, color: s, striped: c, animated: l, "aria-label": u, ...d } = t, { resolvedClassNames: p, resolvedStyles: m } = f({
|
|
121
|
-
classNames: r,
|
|
122
|
-
styles: i,
|
|
123
|
-
props: t
|
|
124
|
-
});
|
|
125
|
-
return /* @__PURE__ */ v(O, {
|
|
126
|
-
classNames: p,
|
|
127
|
-
styles: m,
|
|
128
|
-
vars: a,
|
|
129
|
-
...d,
|
|
130
|
-
children: /* @__PURE__ */ v(A, {
|
|
131
|
-
value: n,
|
|
132
|
-
color: s,
|
|
133
|
-
striped: c,
|
|
134
|
-
animated: l,
|
|
135
|
-
"aria-label": u
|
|
136
|
-
})
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
j.classes = T, j.displayName = "@mantine/core/Progress", j.Section = A, j.Root = O, j.Label = E;
|
|
140
|
-
var M = {
|
|
141
|
-
spinner: "_spinner_yguq4_1",
|
|
142
|
-
spin: "_spin_yguq4_1"
|
|
143
|
-
}, N = (e) => (e / 1024).toFixed(1), P = ({ state: e, ariaLabel: t = "Download progress", minDisplayTime: n = 1e3 }) => {
|
|
144
|
-
let { status: r, loaded: i, total: a } = e, o = h("FcProcess", { size: 24 }), [s, l] = _(null);
|
|
145
|
-
if (g(() => {
|
|
146
|
-
if (r !== "done" && r !== "error") return;
|
|
147
|
-
let e = Date.now(), t = setTimeout(() => {
|
|
148
|
-
l(e);
|
|
149
|
-
}, n);
|
|
150
|
-
return () => clearTimeout(t);
|
|
151
|
-
}, [r, n]), r === "idle") return null;
|
|
152
|
-
let u = a === null ? `${N(i)} KB` : `${N(i)} / ${N(a)} KB`;
|
|
153
|
-
return s ? /* @__PURE__ */ v(j, {
|
|
154
|
-
value: 100,
|
|
155
|
-
size: "sm",
|
|
156
|
-
"aria-label": t,
|
|
157
|
-
children: /* @__PURE__ */ y(j.Label, { children: [N(i), " KB"] })
|
|
158
|
-
}) : /* @__PURE__ */ y(p, {
|
|
159
|
-
gap: "sm",
|
|
160
|
-
align: "center",
|
|
161
|
-
justify: "center",
|
|
162
|
-
style: { minHeight: 40 },
|
|
163
|
-
children: [/* @__PURE__ */ v(c, {
|
|
164
|
-
className: M.spinner,
|
|
165
|
-
"data-testid": "process-icon",
|
|
166
|
-
children: o
|
|
167
|
-
}), /* @__PURE__ */ v(m, {
|
|
168
|
-
size: "sm",
|
|
169
|
-
children: u
|
|
170
|
-
})]
|
|
171
|
-
});
|
|
172
|
-
};
|
|
173
|
-
//#endregion
|
|
174
|
-
export { x as a, b as i, j as n, S as r, P as t };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { D as e, O as t, P as n, c as r, l as i, n as a, r as o, t as s } from "./Box-DRm8EabO.js";
|
|
2
|
-
import { t as c } from "./is-element-Bu_JY8Qy.js";
|
|
3
|
-
import { o as l } from "./getRuntime-CCRXVzJH.js";
|
|
4
|
-
import { s as u } from "./useDynamicIcon-GJg3vWsJ.js";
|
|
5
|
-
import { Children as d, cloneElement as f, createElement as p } from "react";
|
|
6
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
7
|
-
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Anchor/Anchor.module.mjs
|
|
8
|
-
var h = { root: "m_849cf0da" }, g = { underline: "hover" }, _ = a((t) => {
|
|
9
|
-
let { underline: n, className: r, unstyled: a, mod: o, ...s } = i("Anchor", g, t);
|
|
10
|
-
return /* @__PURE__ */ m(l, {
|
|
11
|
-
component: "a",
|
|
12
|
-
className: e({ [h.root]: !a }, r),
|
|
13
|
-
...s,
|
|
14
|
-
mod: [{ underline: n }, o],
|
|
15
|
-
__staticSelector: "Anchor",
|
|
16
|
-
unstyled: a
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
_.classes = h, _.displayName = "@mantine/core/Anchor";
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region ../../node_modules/.bun/@mantine+core@9.0.0+9dd69a0af178a974/node_modules/@mantine/core/esm/components/Breadcrumbs/Breadcrumbs.module.mjs
|
|
22
|
-
var v = {
|
|
23
|
-
root: "m_8b3717df",
|
|
24
|
-
breadcrumb: "m_f678d540",
|
|
25
|
-
separator: "m_3b8f2208"
|
|
26
|
-
}, y = { separator: "/" }, b = t((e, { separatorMargin: t }) => ({ root: { "--bc-separator-margin": n(t) } })), x = o((e) => {
|
|
27
|
-
let t = i("Breadcrumbs", y, e), { classNames: n, className: a, style: o, styles: l, unstyled: u, vars: h, children: g, separator: _, separatorMargin: x, attributes: S, ...C } = t, w = r({
|
|
28
|
-
name: "Breadcrumbs",
|
|
29
|
-
classes: v,
|
|
30
|
-
props: t,
|
|
31
|
-
className: a,
|
|
32
|
-
style: o,
|
|
33
|
-
classNames: n,
|
|
34
|
-
styles: l,
|
|
35
|
-
unstyled: u,
|
|
36
|
-
attributes: S,
|
|
37
|
-
vars: h,
|
|
38
|
-
varsResolver: b
|
|
39
|
-
}), T = d.toArray(g).reduce((e, t, n, r) => {
|
|
40
|
-
let i = c(t) ? f(t, {
|
|
41
|
-
...w("breadcrumb", { className: t.props?.className }),
|
|
42
|
-
key: n
|
|
43
|
-
}) : /* @__PURE__ */ p("div", {
|
|
44
|
-
...w("breadcrumb"),
|
|
45
|
-
key: n
|
|
46
|
-
}, t);
|
|
47
|
-
return e.push(i), n !== r.length - 1 && e.push(/* @__PURE__ */ p(s, {
|
|
48
|
-
...w("separator"),
|
|
49
|
-
key: `separator-${n}`
|
|
50
|
-
}, _)), e;
|
|
51
|
-
}, []);
|
|
52
|
-
return /* @__PURE__ */ m(s, {
|
|
53
|
-
...w("root"),
|
|
54
|
-
...C,
|
|
55
|
-
children: T
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
x.classes = v, x.varsResolver = b, x.displayName = "@mantine/core/Breadcrumbs";
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region src/utils/getFileExtension.ts
|
|
61
|
-
var S = (e) => e.split(".").pop()?.toLowerCase() ?? "", C = {
|
|
62
|
-
pdf: "VscFilePdf",
|
|
63
|
-
md: "VscMarkdown",
|
|
64
|
-
txt: "VscFile",
|
|
65
|
-
jpg: "VscFileMedia",
|
|
66
|
-
jpeg: "VscFileMedia",
|
|
67
|
-
png: "VscFileMedia",
|
|
68
|
-
gif: "VscFileMedia",
|
|
69
|
-
svg: "VscFileCode",
|
|
70
|
-
ts: "VscFileCode",
|
|
71
|
-
tsx: "VscFileCode",
|
|
72
|
-
js: "VscFileCode",
|
|
73
|
-
jsx: "VscFileCode",
|
|
74
|
-
json: "VscJson",
|
|
75
|
-
html: "VscFileCode",
|
|
76
|
-
css: "VscFileCode"
|
|
77
|
-
}, w = ({ type: e, name: t = "", folderNode: n, fileNode: r, size: i = 20 }) => {
|
|
78
|
-
let a, o;
|
|
79
|
-
e === "folder" ? (a = n?.iconName ?? "VscFolder", o = n?.iconColor ?? void 0) : e === "file" && r?.iconName ? (a = r.iconName, o = r.iconColor ?? void 0) : a = C[S(t)] ?? "VscFile";
|
|
80
|
-
let s = u(a);
|
|
81
|
-
return s ? p(s, {
|
|
82
|
-
size: i,
|
|
83
|
-
color: o,
|
|
84
|
-
"aria-hidden": "true"
|
|
85
|
-
}) : null;
|
|
86
|
-
};
|
|
87
|
-
//#endregion
|
|
88
|
-
export { _ as i, S as n, x as r, w as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./Box-D_64wv6n.cjs`),t=require(`./is-element-BocgicRg.cjs`),n=require(`./getRuntime-BLXyQZBB.cjs`),r=require(`./useDynamicIcon-SytdL1Tu.cjs`);let i=require(`react`),a=require(`react/jsx-runtime`);var o={root:`m_849cf0da`},s={underline:`hover`},c=e.n(t=>{let{underline:r,className:i,unstyled:c,mod:l,...u}=e.l(`Anchor`,s,t);return(0,a.jsx)(n.o,{component:`a`,className:e.D({[o.root]:!c},i),...u,mod:[{underline:r},l],__staticSelector:`Anchor`,unstyled:c})});c.classes=o,c.displayName=`@mantine/core/Anchor`;var l={root:`m_8b3717df`,breadcrumb:`m_f678d540`,separator:`m_3b8f2208`},u={separator:`/`},d=e.O((t,{separatorMargin:n})=>({root:{"--bc-separator-margin":e.P(n)}})),f=e.r(n=>{let r=e.l(`Breadcrumbs`,u,n),{classNames:o,className:s,style:c,styles:f,unstyled:p,vars:m,children:h,separator:g,separatorMargin:_,attributes:v,...y}=r,b=e.c({name:`Breadcrumbs`,classes:l,props:r,className:s,style:c,classNames:o,styles:f,unstyled:p,attributes:v,vars:m,varsResolver:d}),x=i.Children.toArray(h).reduce((n,r,a,o)=>{let s=t.t(r)?(0,i.cloneElement)(r,{...b(`breadcrumb`,{className:r.props?.className}),key:a}):(0,i.createElement)(`div`,{...b(`breadcrumb`),key:a},r);return n.push(s),a!==o.length-1&&n.push((0,i.createElement)(e.t,{...b(`separator`),key:`separator-${a}`},g)),n},[]);return(0,a.jsx)(e.t,{...b(`root`),...y,children:x})});f.classes=l,f.varsResolver=d,f.displayName=`@mantine/core/Breadcrumbs`;var p=e=>e.split(`.`).pop()?.toLowerCase()??``,m={pdf:`VscFilePdf`,md:`VscMarkdown`,txt:`VscFile`,jpg:`VscFileMedia`,jpeg:`VscFileMedia`,png:`VscFileMedia`,gif:`VscFileMedia`,svg:`VscFileCode`,ts:`VscFileCode`,tsx:`VscFileCode`,js:`VscFileCode`,jsx:`VscFileCode`,json:`VscJson`,html:`VscFileCode`,css:`VscFileCode`},h=({type:e,name:t=``,folderNode:n,fileNode:a,size:o=20})=>{let s,c;e===`folder`?(s=n?.iconName??`VscFolder`,c=n?.iconColor??void 0):e===`file`&&a?.iconName?(s=a.iconName,c=a.iconColor??void 0):s=m[p(t)]??`VscFile`;let l=r.s(s);return l?(0,i.createElement)(l,{size:o,color:c,"aria-hidden":`true`}):null};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
|
|
@@ -1,409 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./TextInput-C3qfxxWI.js";
|
|
2
|
-
import { t } from "./UnstyledButton-CI3kyRck.js";
|
|
3
|
-
import { t as n } from "./Group-BzwlMeob.js";
|
|
4
|
-
import { o as r } from "./getRuntime-CCRXVzJH.js";
|
|
5
|
-
import { i, r as a, t as o } from "./FileIcon-BCpGMI5U.js";
|
|
6
|
-
import { t as s } from "./Button-k7SxX1Xl.js";
|
|
7
|
-
import { F as c, o as l } from "./desktopStore-B0R1-BeA.js";
|
|
8
|
-
import { t as u } from "./useTranslation-DMRGdqZi.js";
|
|
9
|
-
import { memo as d, useCallback as f, useState as p } from "react";
|
|
10
|
-
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
11
|
-
//#region src/utils/buildBreadcrumbs.ts
|
|
12
|
-
var _ = (e, t) => {
|
|
13
|
-
let n = [{
|
|
14
|
-
id: null,
|
|
15
|
-
name: "Home"
|
|
16
|
-
}], r = e, i = [];
|
|
17
|
-
for (; r !== null;) {
|
|
18
|
-
let e = t.find((e) => e.id === r);
|
|
19
|
-
if (!e) break;
|
|
20
|
-
i.unshift({
|
|
21
|
-
id: e.id,
|
|
22
|
-
name: e.name
|
|
23
|
-
}), r = e.parentId;
|
|
24
|
-
}
|
|
25
|
-
return [...n, ...i];
|
|
26
|
-
}, v = {
|
|
27
|
-
root: "_root_b2ks8_1",
|
|
28
|
-
breadcrumbBar: "_breadcrumbBar_b2ks8_8",
|
|
29
|
-
breadcrumbSep: "_breadcrumbSep_b2ks8_15",
|
|
30
|
-
body: "_body_b2ks8_20",
|
|
31
|
-
sidebar: "_sidebar_b2ks8_27",
|
|
32
|
-
folderTree: "_folderTree_b2ks8_34",
|
|
33
|
-
treeItem: "_treeItem_b2ks8_41",
|
|
34
|
-
content: "_content_b2ks8_61",
|
|
35
|
-
grid: "_grid_b2ks8_67",
|
|
36
|
-
item: "_item_b2ks8_75",
|
|
37
|
-
icon: "_icon_b2ks8_97",
|
|
38
|
-
name: "_name_b2ks8_105",
|
|
39
|
-
empty: "_empty_b2ks8_117",
|
|
40
|
-
actionBar: "_actionBar_b2ks8_125",
|
|
41
|
-
selectedLabel: "_selectedLabel_b2ks8_136",
|
|
42
|
-
saveActionBar: "_saveActionBar_b2ks8_142",
|
|
43
|
-
fileNameInput: "_fileNameInput_b2ks8_152",
|
|
44
|
-
overlay: "_overlay_b2ks8_158",
|
|
45
|
-
panel: "_panel_b2ks8_168"
|
|
46
|
-
}, y = d(({ currentFolderId: e, fsNodes: t, onNavigate: n }) => {
|
|
47
|
-
let o = _(e, t);
|
|
48
|
-
return /* @__PURE__ */ h("div", {
|
|
49
|
-
className: v.breadcrumbBar,
|
|
50
|
-
children: /* @__PURE__ */ h(a, {
|
|
51
|
-
separator: "›",
|
|
52
|
-
classNames: { separator: v.breadcrumbSep },
|
|
53
|
-
children: o.map((e, t) => t === o.length - 1 ? /* @__PURE__ */ h(r, {
|
|
54
|
-
size: "xs",
|
|
55
|
-
fw: 500,
|
|
56
|
-
children: e.name
|
|
57
|
-
}, e.id ?? "root") : /* @__PURE__ */ h(i, {
|
|
58
|
-
size: "xs",
|
|
59
|
-
onClick: () => n(e.id),
|
|
60
|
-
children: e.name
|
|
61
|
-
}, e.id ?? "root"))
|
|
62
|
-
})
|
|
63
|
-
});
|
|
64
|
-
}), b = d(({ node: e, allNodes: n, currentFolderId: i, depth: a, onNavigate: s }) => {
|
|
65
|
-
let c = n.filter((t) => t.parentId === e.id && t.type === "folder");
|
|
66
|
-
return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g(t, {
|
|
67
|
-
className: v.treeItem,
|
|
68
|
-
"data-active": i === e.id || void 0,
|
|
69
|
-
style: { paddingLeft: 8 + a * 14 },
|
|
70
|
-
onClick: () => s(e.id),
|
|
71
|
-
"aria-label": e.name,
|
|
72
|
-
"aria-current": i === e.id ? "page" : void 0,
|
|
73
|
-
children: [/* @__PURE__ */ h(o, {
|
|
74
|
-
type: "folder",
|
|
75
|
-
folderNode: e,
|
|
76
|
-
size: 14
|
|
77
|
-
}), /* @__PURE__ */ h(r, {
|
|
78
|
-
size: "xs",
|
|
79
|
-
ml: 6,
|
|
80
|
-
truncate: !0,
|
|
81
|
-
children: e.name
|
|
82
|
-
})]
|
|
83
|
-
}), c.map((e) => /* @__PURE__ */ h(b, {
|
|
84
|
-
node: e,
|
|
85
|
-
allNodes: n,
|
|
86
|
-
currentFolderId: i,
|
|
87
|
-
depth: a + 1,
|
|
88
|
-
onNavigate: s
|
|
89
|
-
}, e.id))] });
|
|
90
|
-
}), x = d(({ currentFolderId: e, fsNodes: n, onNavigate: i }) => {
|
|
91
|
-
let { t: a } = u("window"), s = n.filter((e) => e.parentId === null && e.type === "folder");
|
|
92
|
-
return /* @__PURE__ */ h("aside", {
|
|
93
|
-
className: v.sidebar,
|
|
94
|
-
children: /* @__PURE__ */ g("nav", {
|
|
95
|
-
className: v.folderTree,
|
|
96
|
-
"aria-label": a("fileDialog.folderTreeAria", { ns: "common" }),
|
|
97
|
-
children: [/* @__PURE__ */ g(t, {
|
|
98
|
-
className: v.treeItem,
|
|
99
|
-
"data-active": e === null || void 0,
|
|
100
|
-
style: { paddingLeft: 8 },
|
|
101
|
-
onClick: () => i(null),
|
|
102
|
-
"aria-label": a("common:labels.home"),
|
|
103
|
-
"aria-current": e === null ? "page" : void 0,
|
|
104
|
-
children: [/* @__PURE__ */ h(o, {
|
|
105
|
-
type: "folder",
|
|
106
|
-
size: 14
|
|
107
|
-
}), /* @__PURE__ */ h(r, {
|
|
108
|
-
size: "xs",
|
|
109
|
-
ml: 6,
|
|
110
|
-
fw: 500,
|
|
111
|
-
children: a("common:labels.home")
|
|
112
|
-
})]
|
|
113
|
-
}), s.map((t) => /* @__PURE__ */ h(b, {
|
|
114
|
-
node: t,
|
|
115
|
-
allNodes: n,
|
|
116
|
-
currentFolderId: e,
|
|
117
|
-
depth: 1,
|
|
118
|
-
onNavigate: i
|
|
119
|
-
}, t.id))]
|
|
120
|
-
})
|
|
121
|
-
});
|
|
122
|
-
}), S = d(({ currentFolderId: e, fsNodes: n, onNavigate: i, onItemDoubleClick: a }) => {
|
|
123
|
-
let { t: s } = u("window"), l = n.filter((t) => t.parentId === e && t.type === "folder");
|
|
124
|
-
if (l.length === 0) return /* @__PURE__ */ h("div", {
|
|
125
|
-
className: v.empty,
|
|
126
|
-
children: /* @__PURE__ */ h(r, {
|
|
127
|
-
size: "sm",
|
|
128
|
-
c: "dimmed",
|
|
129
|
-
children: s("common:messages.noSubfolders")
|
|
130
|
-
})
|
|
131
|
-
});
|
|
132
|
-
let d = c(l);
|
|
133
|
-
return /* @__PURE__ */ h("div", {
|
|
134
|
-
className: v.grid,
|
|
135
|
-
role: "listbox",
|
|
136
|
-
"aria-label": s("fileDialog.foldersAria", { ns: "common" }),
|
|
137
|
-
children: d.map((e) => /* @__PURE__ */ g(t, {
|
|
138
|
-
className: v.item,
|
|
139
|
-
onDoubleClick: () => {
|
|
140
|
-
i(e.id), a?.(e);
|
|
141
|
-
},
|
|
142
|
-
"aria-label": s("fileDialog.openFolder", { name: e.name }),
|
|
143
|
-
role: "option",
|
|
144
|
-
children: [/* @__PURE__ */ h("div", {
|
|
145
|
-
className: v.icon,
|
|
146
|
-
children: /* @__PURE__ */ h(o, {
|
|
147
|
-
type: "folder",
|
|
148
|
-
name: e.name,
|
|
149
|
-
folderNode: e,
|
|
150
|
-
size: 32
|
|
151
|
-
})
|
|
152
|
-
}), /* @__PURE__ */ h(r, {
|
|
153
|
-
size: "xs",
|
|
154
|
-
className: v.name,
|
|
155
|
-
truncate: !0,
|
|
156
|
-
children: e.name
|
|
157
|
-
})]
|
|
158
|
-
}, e.id))
|
|
159
|
-
});
|
|
160
|
-
}), C = d(({ opened: e, children: t, ariaLabelKey: n, ariaLabelNs: r = "window" }) => {
|
|
161
|
-
let { t: i } = u(r);
|
|
162
|
-
return e ? /* @__PURE__ */ h("div", {
|
|
163
|
-
className: v.overlay,
|
|
164
|
-
role: "dialog",
|
|
165
|
-
"aria-label": i(n),
|
|
166
|
-
children: /* @__PURE__ */ h("div", {
|
|
167
|
-
className: v.panel,
|
|
168
|
-
children: t
|
|
169
|
-
})
|
|
170
|
-
}) : null;
|
|
171
|
-
}), w = ({ acceptedMimeTypes: e, onConfirm: i, onCancel: a }) => {
|
|
172
|
-
let { t: d } = u("window"), m = l((e) => e.fsNodes), [_, b] = p(null), [S, C] = p(null), w = _ === null ? m.filter((e) => e.parentId === null) : m.filter((e) => e.parentId === _), T = w.filter((t) => {
|
|
173
|
-
if (t.type === "folder") return !0;
|
|
174
|
-
let n = t;
|
|
175
|
-
return !e || e.length === 0 ? !0 : e.some((e) => n.mimeType === e || e.endsWith("/*") && n.mimeType?.startsWith(e.slice(0, -1)));
|
|
176
|
-
}), E = f((e) => {
|
|
177
|
-
b(e), C(null);
|
|
178
|
-
}, []), D = f((e) => {
|
|
179
|
-
e.type === "file" && C(e);
|
|
180
|
-
}, []), O = f((e) => {
|
|
181
|
-
e.type === "folder" ? E(e.id) : i(e);
|
|
182
|
-
}, [E, i]);
|
|
183
|
-
return /* @__PURE__ */ g("div", {
|
|
184
|
-
className: v.root,
|
|
185
|
-
children: [
|
|
186
|
-
/* @__PURE__ */ h(y, {
|
|
187
|
-
currentFolderId: _,
|
|
188
|
-
fsNodes: m,
|
|
189
|
-
onNavigate: E
|
|
190
|
-
}),
|
|
191
|
-
/* @__PURE__ */ g("div", {
|
|
192
|
-
className: v.body,
|
|
193
|
-
children: [/* @__PURE__ */ h(x, {
|
|
194
|
-
currentFolderId: _,
|
|
195
|
-
fsNodes: m,
|
|
196
|
-
onNavigate: E
|
|
197
|
-
}), /* @__PURE__ */ h("main", {
|
|
198
|
-
className: v.content,
|
|
199
|
-
children: T.length === 0 ? /* @__PURE__ */ h("div", {
|
|
200
|
-
className: v.empty,
|
|
201
|
-
children: /* @__PURE__ */ h(r, {
|
|
202
|
-
size: "sm",
|
|
203
|
-
c: "dimmed",
|
|
204
|
-
children: w.length === 0 ? d("common:messages.folderEmpty") : d("common:messages.noMatchingFiles")
|
|
205
|
-
})
|
|
206
|
-
}) : /* @__PURE__ */ h("div", {
|
|
207
|
-
className: v.grid,
|
|
208
|
-
role: "listbox",
|
|
209
|
-
"aria-label": d("fileDialog.filesAria", { ns: "common" }),
|
|
210
|
-
children: c(T).map((e) => {
|
|
211
|
-
let n = S?.id === e.id;
|
|
212
|
-
return /* @__PURE__ */ g(t, {
|
|
213
|
-
className: v.item,
|
|
214
|
-
"data-selected": n || void 0,
|
|
215
|
-
"data-type": e.type,
|
|
216
|
-
onClick: () => D(e),
|
|
217
|
-
onDoubleClick: () => O(e),
|
|
218
|
-
"aria-label": e.type === "folder" ? d("fileDialog.openFolder", {
|
|
219
|
-
name: e.name,
|
|
220
|
-
ns: "window"
|
|
221
|
-
}) : d("fileDialog.selectFile", {
|
|
222
|
-
name: e.name,
|
|
223
|
-
ns: "window"
|
|
224
|
-
}),
|
|
225
|
-
"aria-selected": e.type === "file" ? n : void 0,
|
|
226
|
-
role: "option",
|
|
227
|
-
children: [/* @__PURE__ */ h("div", {
|
|
228
|
-
className: v.icon,
|
|
229
|
-
children: /* @__PURE__ */ h(o, {
|
|
230
|
-
type: e.type,
|
|
231
|
-
name: e.name,
|
|
232
|
-
folderNode: e.type === "folder" ? e : void 0,
|
|
233
|
-
size: 32
|
|
234
|
-
})
|
|
235
|
-
}), /* @__PURE__ */ h(r, {
|
|
236
|
-
size: "xs",
|
|
237
|
-
className: v.name,
|
|
238
|
-
truncate: !0,
|
|
239
|
-
children: e.name
|
|
240
|
-
})]
|
|
241
|
-
}, e.id);
|
|
242
|
-
})
|
|
243
|
-
})
|
|
244
|
-
})]
|
|
245
|
-
}),
|
|
246
|
-
/* @__PURE__ */ g("div", {
|
|
247
|
-
className: v.actionBar,
|
|
248
|
-
children: [/* @__PURE__ */ h(r, {
|
|
249
|
-
size: "xs",
|
|
250
|
-
c: "dimmed",
|
|
251
|
-
truncate: !0,
|
|
252
|
-
className: v.selectedLabel,
|
|
253
|
-
children: S ? S.name : d("common:messages.noFileSelected")
|
|
254
|
-
}), /* @__PURE__ */ g(n, {
|
|
255
|
-
gap: "xs",
|
|
256
|
-
children: [/* @__PURE__ */ h(s, {
|
|
257
|
-
variant: "default",
|
|
258
|
-
size: "xs",
|
|
259
|
-
onClick: a,
|
|
260
|
-
"aria-label": d("filePicker.cancelAria", { ns: "common" }),
|
|
261
|
-
children: d("common:actions.cancel")
|
|
262
|
-
}), /* @__PURE__ */ h(s, {
|
|
263
|
-
size: "xs",
|
|
264
|
-
disabled: !S,
|
|
265
|
-
onClick: () => S && i(S),
|
|
266
|
-
"aria-label": d("filePicker.openSelectedAria", { ns: "common" }),
|
|
267
|
-
children: d("common:actions.open")
|
|
268
|
-
})]
|
|
269
|
-
})]
|
|
270
|
-
})
|
|
271
|
-
]
|
|
272
|
-
});
|
|
273
|
-
}, T = ({ opened: e, ...t }) => e ? /* @__PURE__ */ h(C, {
|
|
274
|
-
opened: e,
|
|
275
|
-
ariaLabelKey: "fileDialog.openFile",
|
|
276
|
-
children: /* @__PURE__ */ h(w, { ...t })
|
|
277
|
-
}) : null, E = ({ initialName: t = "untitled.md", onConfirm: r, onCancel: i }) => {
|
|
278
|
-
let { t: a } = u("window"), o = l((e) => e.fsNodes), [c, d] = p(null), [m, _] = p(t), b = f((e) => {
|
|
279
|
-
d(e);
|
|
280
|
-
}, []), C = f(() => {
|
|
281
|
-
let e = m.trim();
|
|
282
|
-
e && r({
|
|
283
|
-
parentId: c,
|
|
284
|
-
name: e.endsWith(".md") ? e : `${e}.md`
|
|
285
|
-
});
|
|
286
|
-
}, [
|
|
287
|
-
m,
|
|
288
|
-
c,
|
|
289
|
-
r
|
|
290
|
-
]);
|
|
291
|
-
return /* @__PURE__ */ g("div", {
|
|
292
|
-
className: v.root,
|
|
293
|
-
children: [
|
|
294
|
-
/* @__PURE__ */ h(y, {
|
|
295
|
-
currentFolderId: c,
|
|
296
|
-
fsNodes: o,
|
|
297
|
-
onNavigate: b
|
|
298
|
-
}),
|
|
299
|
-
/* @__PURE__ */ g("div", {
|
|
300
|
-
className: v.body,
|
|
301
|
-
children: [/* @__PURE__ */ h(x, {
|
|
302
|
-
currentFolderId: c,
|
|
303
|
-
fsNodes: o,
|
|
304
|
-
onNavigate: b
|
|
305
|
-
}), /* @__PURE__ */ h("main", {
|
|
306
|
-
className: v.content,
|
|
307
|
-
children: /* @__PURE__ */ h(S, {
|
|
308
|
-
currentFolderId: c,
|
|
309
|
-
fsNodes: o,
|
|
310
|
-
onNavigate: b
|
|
311
|
-
})
|
|
312
|
-
})]
|
|
313
|
-
}),
|
|
314
|
-
/* @__PURE__ */ g("div", {
|
|
315
|
-
className: v.saveActionBar,
|
|
316
|
-
children: [/* @__PURE__ */ h(e, {
|
|
317
|
-
size: "xs",
|
|
318
|
-
placeholder: a("fileDialog.filename"),
|
|
319
|
-
value: m,
|
|
320
|
-
onChange: (e) => _(e.currentTarget.value),
|
|
321
|
-
onKeyDown: (e) => e.key === "Enter" && C(),
|
|
322
|
-
"aria-label": a("filePicker.fileNameAria", { ns: "common" }),
|
|
323
|
-
className: v.fileNameInput
|
|
324
|
-
}), /* @__PURE__ */ g(n, {
|
|
325
|
-
gap: "xs",
|
|
326
|
-
style: { flexShrink: 0 },
|
|
327
|
-
children: [/* @__PURE__ */ h(s, {
|
|
328
|
-
variant: "default",
|
|
329
|
-
size: "xs",
|
|
330
|
-
onClick: i,
|
|
331
|
-
"aria-label": a("filePicker.cancelAria", { ns: "common" }),
|
|
332
|
-
children: a("common:actions.cancel")
|
|
333
|
-
}), /* @__PURE__ */ h(s, {
|
|
334
|
-
size: "xs",
|
|
335
|
-
disabled: !m.trim(),
|
|
336
|
-
onClick: C,
|
|
337
|
-
"aria-label": a("fileDialog.saveFile"),
|
|
338
|
-
children: a("common:actions.save")
|
|
339
|
-
})]
|
|
340
|
-
})]
|
|
341
|
-
})
|
|
342
|
-
]
|
|
343
|
-
});
|
|
344
|
-
}, D = ({ opened: e, ...t }) => e ? /* @__PURE__ */ h(C, {
|
|
345
|
-
opened: e,
|
|
346
|
-
ariaLabelKey: "fileDialog.saveFile",
|
|
347
|
-
children: /* @__PURE__ */ h(E, { ...t })
|
|
348
|
-
}) : null, O = ({ onConfirm: e, onCancel: t }) => {
|
|
349
|
-
let { t: i } = u("window"), a = l((e) => e.fsNodes), [o, c] = p(null), d = f((e) => {
|
|
350
|
-
c(e);
|
|
351
|
-
}, []), m = f(() => {
|
|
352
|
-
e(o);
|
|
353
|
-
}, [o, e]);
|
|
354
|
-
return /* @__PURE__ */ g("div", {
|
|
355
|
-
className: v.root,
|
|
356
|
-
children: [
|
|
357
|
-
/* @__PURE__ */ h(y, {
|
|
358
|
-
currentFolderId: o,
|
|
359
|
-
fsNodes: a,
|
|
360
|
-
onNavigate: d
|
|
361
|
-
}),
|
|
362
|
-
/* @__PURE__ */ g("div", {
|
|
363
|
-
className: v.body,
|
|
364
|
-
children: [/* @__PURE__ */ h(x, {
|
|
365
|
-
currentFolderId: o,
|
|
366
|
-
fsNodes: a,
|
|
367
|
-
onNavigate: d
|
|
368
|
-
}), /* @__PURE__ */ h("main", {
|
|
369
|
-
className: v.content,
|
|
370
|
-
children: /* @__PURE__ */ h(S, {
|
|
371
|
-
currentFolderId: o,
|
|
372
|
-
fsNodes: a,
|
|
373
|
-
onNavigate: d
|
|
374
|
-
})
|
|
375
|
-
})]
|
|
376
|
-
}),
|
|
377
|
-
/* @__PURE__ */ g("div", {
|
|
378
|
-
className: v.actionBar,
|
|
379
|
-
children: [/* @__PURE__ */ h(r, {
|
|
380
|
-
size: "xs",
|
|
381
|
-
c: "dimmed",
|
|
382
|
-
truncate: !0,
|
|
383
|
-
className: v.selectedLabel,
|
|
384
|
-
children: o === null ? i("common:labels.home") : a.find((e) => e.id === o)?.name ?? ""
|
|
385
|
-
}), /* @__PURE__ */ g(n, {
|
|
386
|
-
gap: "xs",
|
|
387
|
-
children: [/* @__PURE__ */ h(s, {
|
|
388
|
-
variant: "default",
|
|
389
|
-
size: "xs",
|
|
390
|
-
onClick: t,
|
|
391
|
-
"aria-label": i("filePicker.cancelAria", { ns: "common" }),
|
|
392
|
-
children: i("common:actions.cancel")
|
|
393
|
-
}), /* @__PURE__ */ h(s, {
|
|
394
|
-
size: "xs",
|
|
395
|
-
onClick: m,
|
|
396
|
-
"aria-label": i("fileDialog.selectFolder"),
|
|
397
|
-
children: i("common:actions.select")
|
|
398
|
-
})]
|
|
399
|
-
})]
|
|
400
|
-
})
|
|
401
|
-
]
|
|
402
|
-
});
|
|
403
|
-
}, k = ({ opened: e, ...t }) => e ? /* @__PURE__ */ h(C, {
|
|
404
|
-
opened: e,
|
|
405
|
-
ariaLabelKey: "fileDialog.selectFolder",
|
|
406
|
-
children: /* @__PURE__ */ h(O, { ...t })
|
|
407
|
-
}) : null;
|
|
408
|
-
//#endregion
|
|
409
|
-
export { C as a, k as i, T as n, _ as o, D as r, w as t };
|