@fde-desktop/fde-core 0.4.4 → 0.4.6
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/README.md +5 -5
- package/dist/{CreateItemApp-ZHCTSPQE.js → CreateItemApp-2EME6FYH.js} +2 -2
- package/dist/{CreateItemApp-NAZMXOPK.cjs → CreateItemApp-BSEISPUS.cjs} +3 -3
- package/dist/DeviceInfoApp-2MJFK32B.cjs +11 -0
- package/dist/DeviceInfoApp-KFYU3E43.js +5 -0
- package/dist/FilesApp-B7JR4PEP.cjs +14 -0
- package/dist/FilesApp-HYTIWN3O.js +8 -0
- package/dist/{ImageViewerApp-5UXNSW2O.js → ImageViewerApp-PLHNQFZ3.js} +4 -4
- package/dist/{ImageViewerApp-RRRRKSFN.cjs → ImageViewerApp-UIXSGW2X.cjs} +5 -5
- package/dist/{MenuEditApp-HUZRFEHE.js → MenuEditApp-4DB5UEWH.js} +4 -4
- package/dist/MenuEditApp-B2ZMG4ZY.cjs +15 -0
- package/dist/{NotesApp-4EVUQEFZ.cjs → NotesApp-BZYASRVJ.cjs} +5 -5
- package/dist/{NotesApp-37BV33C6.js → NotesApp-MW37NRSN.js} +4 -4
- package/dist/{PdfApp-5VBDNRMC.cjs → PdfApp-3ZINDODQ.cjs} +5 -5
- package/dist/{PdfApp-RH6MZZX5.js → PdfApp-ZSYAQP7L.js} +4 -4
- package/dist/{SettingsApp-5LDHEHYV.cjs → SettingsApp-2ZNO7AVY.cjs} +7 -7
- package/dist/{SettingsApp-X6764D7T.js → SettingsApp-ODZINK6T.js} +6 -6
- package/dist/UploaderApp-MTRIYWV4.cjs +16 -0
- package/dist/UploaderApp-V3WUDCG2.js +10 -0
- package/dist/{chunk-7SAFECOJ.js → chunk-25GVAXBU.js} +1 -1
- package/dist/{chunk-4MCFQPKY.js → chunk-2MYZWMDC.js} +1 -1
- package/dist/{chunk-AQL372JF.cjs → chunk-2NGIGLVP.cjs} +8 -8
- package/dist/{chunk-DMNF4CNN.cjs → chunk-2O3W6TLG.cjs} +4 -4
- package/dist/{chunk-6QOUYSEE.cjs → chunk-2UW42GAP.cjs} +16 -11
- package/dist/{chunk-AXDUVZVP.cjs → chunk-4KIMZJ3L.cjs} +6 -6
- package/dist/{chunk-SYGUWGWK.cjs → chunk-57ZTJB2W.cjs} +13 -13
- package/dist/{chunk-ZBGWYTCU.cjs → chunk-7FGL7HGS.cjs} +3 -3
- package/dist/{chunk-ICUE6T7J.cjs → chunk-7HQ6KUIO.cjs} +3 -3
- package/dist/{chunk-2FO445RM.cjs → chunk-AU4IENXY.cjs} +12 -12
- package/dist/{chunk-TDZ43MUX.cjs → chunk-BFMSPWLP.cjs} +9 -9
- package/dist/{chunk-4OH5RPSQ.cjs → chunk-DEVJOHGE.cjs} +3 -3
- package/dist/{chunk-EUQLZW6P.js → chunk-FNWS4ZKT.js} +1 -1
- package/dist/{chunk-IUOQPOEN.js → chunk-HIGKZ7UP.js} +5 -5
- package/dist/{chunk-3IICBLEA.js → chunk-HYJJVB7G.js} +3 -3
- package/dist/{chunk-J7L2S2GT.cjs → chunk-I5MJXFYW.cjs} +2 -2
- package/dist/{chunk-657BJOY5.cjs → chunk-JX65IKJZ.cjs} +17 -17
- package/dist/{chunk-PYTKNRGM.js → chunk-KGMXUBWQ.js} +11 -11
- package/dist/{chunk-BKXEA2BK.cjs → chunk-KI5FXBOM.cjs} +13 -13
- package/dist/{chunk-GCYD6T52.js → chunk-NULEEBCG.js} +1 -1
- package/dist/{chunk-AYFNYHMP.js → chunk-PDEZ7BIN.js} +3 -3
- package/dist/{chunk-ODXL6BR3.js → chunk-PVBI2WRF.js} +1 -1
- package/dist/{chunk-QB72BLCJ.cjs → chunk-QFGHYAD7.cjs} +10 -10
- package/dist/{chunk-CFWV2JMR.js → chunk-U5JKHQBS.js} +3 -3
- package/dist/{chunk-BLV47DX2.js → chunk-VFPEMNSX.js} +2 -2
- package/dist/{chunk-5PYK5ASL.js → chunk-VLWKVIYD.js} +2 -2
- package/dist/{chunk-NWMSWRUD.js → chunk-W2Y22XR6.js} +16 -12
- package/dist/{chunk-ZHB5Q2M6.js → chunk-WHZGUG7Q.js} +1 -1
- package/dist/{chunk-54PYEQLK.js → chunk-WSA5WSHN.js} +2 -2
- package/dist/{chunk-QHBBLML3.js → chunk-Y2WL2M7M.js} +3 -3
- package/dist/{chunk-BDO6B7MZ.cjs → chunk-YOHBUOZJ.cjs} +6 -6
- package/dist/{chunk-U4RYIS6Z.cjs → chunk-YSWU4OKP.cjs} +20 -20
- package/dist/index.cjs +381 -380
- package/dist/index.js +28 -27
- package/package.json +3 -2
- package/dist/DeviceInfoApp-R6YNVIGX.cjs +0 -11
- package/dist/DeviceInfoApp-YHCYAO6N.js +0 -5
- package/dist/FilesApp-AKCVRTXR.js +0 -8
- package/dist/FilesApp-RW3Y6ILO.cjs +0 -14
- package/dist/MenuEditApp-MCUHGTKQ.cjs +0 -15
- package/dist/UploaderApp-2WYRCUQV.js +0 -10
- package/dist/UploaderApp-EYFC36PM.cjs +0 -16
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkRQ6OZRUW_cjs = require('./chunk-RQ6OZRUW.cjs');
|
|
4
4
|
var chunkYSOLW4FS_cjs = require('./chunk-YSOLW4FS.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunk7FGL7HGS_cjs = require('./chunk-7FGL7HGS.cjs');
|
|
6
|
+
var chunkYOHBUOZJ_cjs = require('./chunk-YOHBUOZJ.cjs');
|
|
7
|
+
var chunk2UW42GAP_cjs = require('./chunk-2UW42GAP.cjs');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var react$1 = require('@tiptap/react');
|
|
10
10
|
var StarterKit = require('@tiptap/starter-kit');
|
|
@@ -43,7 +43,7 @@ var useAppTempMemoryStore = zustand.create()(
|
|
|
43
43
|
|
|
44
44
|
// src/components/Apps/NotesApp/NotesApp.module.css
|
|
45
45
|
var NotesApp_default = {};
|
|
46
|
-
var ACCEPTED_MD_TYPES = [...
|
|
46
|
+
var ACCEPTED_MD_TYPES = [...chunk2UW42GAP_cjs.TEXT_MIME_TYPES];
|
|
47
47
|
var ClearMarksOnEnter = core.Extension.create({
|
|
48
48
|
name: "clearMarksOnEnter",
|
|
49
49
|
addKeyboardShortcuts() {
|
|
@@ -83,9 +83,9 @@ var NotesApp = ({ window, notifyReady }) => {
|
|
|
83
83
|
if (!windowId) return;
|
|
84
84
|
chunkRQ6OZRUW_cjs.useNotesStore.getState().setIsDirty(windowId, isDirty);
|
|
85
85
|
}, [windowId, isDirty]);
|
|
86
|
-
const createFile =
|
|
87
|
-
const updateFile =
|
|
88
|
-
const fsNodes =
|
|
86
|
+
const createFile = chunk2UW42GAP_cjs.useDesktopStore((state) => state.createFile);
|
|
87
|
+
const updateFile = chunk2UW42GAP_cjs.useDesktopStore((state) => state.updateFile);
|
|
88
|
+
const fsNodes = chunk2UW42GAP_cjs.useDesktopStore((state) => state.fsNodes);
|
|
89
89
|
const editor = react$1.useEditor({
|
|
90
90
|
extensions: [StarterKit__default.default, markdown.Markdown, ClearMarksOnEnter],
|
|
91
91
|
content: contentData?.initialContent ?? "",
|
|
@@ -138,7 +138,7 @@ var NotesApp = ({ window, notifyReady }) => {
|
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
140
|
if (contentData?.url) {
|
|
141
|
-
const content = await
|
|
141
|
+
const content = await chunk2UW42GAP_cjs.resolveFileUrl(contentData.url, abortController.signal);
|
|
142
142
|
if (!cancelled && content) {
|
|
143
143
|
editor.commands.setContent(content, { emitUpdate: false, contentType: "markdown" });
|
|
144
144
|
setContentLoaded(windowId, true);
|
|
@@ -224,7 +224,7 @@ var NotesApp = ({ window, notifyReady }) => {
|
|
|
224
224
|
setPickerOpen(false);
|
|
225
225
|
const url = node.url;
|
|
226
226
|
if (url) {
|
|
227
|
-
|
|
227
|
+
chunk2UW42GAP_cjs.resolveFileUrl(url).then((md) => {
|
|
228
228
|
if (md) {
|
|
229
229
|
editor?.commands.setContent(md, { emitUpdate: false, contentType: "markdown" });
|
|
230
230
|
if (windowId) setContentLoaded(windowId, true);
|
|
@@ -251,7 +251,7 @@ var NotesApp = ({ window, notifyReady }) => {
|
|
|
251
251
|
const current = editor?.getMarkdown() ?? "";
|
|
252
252
|
return current !== (contentSnapshotRef.current ?? "");
|
|
253
253
|
}, [editor]);
|
|
254
|
-
|
|
254
|
+
chunk7FGL7HGS_cjs.useCloseInterceptor({
|
|
255
255
|
isDirtyGetter,
|
|
256
256
|
windowId,
|
|
257
257
|
onDiscard: () => {
|
|
@@ -424,7 +424,7 @@ var NotesApp = ({ window, notifyReady }) => {
|
|
|
424
424
|
] }),
|
|
425
425
|
/* @__PURE__ */ jsxRuntime.jsx(react$1.EditorContent, { editor, className: NotesApp_default.editorContent }),
|
|
426
426
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
427
|
-
|
|
427
|
+
chunkYOHBUOZJ_cjs.FilePickerModal,
|
|
428
428
|
{
|
|
429
429
|
opened: pickerOpen,
|
|
430
430
|
acceptedMimeTypes: ACCEPTED_MD_TYPES,
|
|
@@ -433,7 +433,7 @@ var NotesApp = ({ window, notifyReady }) => {
|
|
|
433
433
|
}
|
|
434
434
|
),
|
|
435
435
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
436
|
-
|
|
436
|
+
chunkYOHBUOZJ_cjs.FileSaveModal,
|
|
437
437
|
{
|
|
438
438
|
opened: saveModalOpen,
|
|
439
439
|
initialName: fileName,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkDEVJOHGE_cjs = require('./chunk-DEVJOHGE.cjs');
|
|
4
|
+
var chunk2UW42GAP_cjs = require('./chunk-2UW42GAP.cjs');
|
|
5
5
|
var chunkZ5YGWL65_cjs = require('./chunk-Z5YGWL65.cjs');
|
|
6
6
|
var chunkE55VXNLK_cjs = require('./chunk-E55VXNLK.cjs');
|
|
7
7
|
var react = require('react');
|
|
@@ -10,15 +10,15 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
10
10
|
var getIsMobile = () => {
|
|
11
11
|
const width = window.innerWidth;
|
|
12
12
|
const isCoarsePointer = window.matchMedia("(pointer: coarse)").matches;
|
|
13
|
-
return width <
|
|
13
|
+
return width < chunk2UW42GAP_cjs.BREAKPOINTS.MOBILE || isCoarsePointer;
|
|
14
14
|
};
|
|
15
15
|
var getIsTablet = () => {
|
|
16
16
|
const width = window.innerWidth;
|
|
17
|
-
return width >=
|
|
17
|
+
return width >= chunk2UW42GAP_cjs.BREAKPOINTS.MOBILE && width < chunk2UW42GAP_cjs.BREAKPOINTS.TABLET;
|
|
18
18
|
};
|
|
19
19
|
var getIsDesktop = () => {
|
|
20
20
|
const width = window.innerWidth;
|
|
21
|
-
return width >=
|
|
21
|
+
return width >= chunk2UW42GAP_cjs.BREAKPOINTS.TABLET;
|
|
22
22
|
};
|
|
23
23
|
var getIsPortrait = () => {
|
|
24
24
|
if (screen.orientation) {
|
|
@@ -64,10 +64,10 @@ function useDeviceDetection() {
|
|
|
64
64
|
var DeviceInfoApp_default = {};
|
|
65
65
|
var DeviceInfoApp = ({ window: win, notifyReady }) => {
|
|
66
66
|
const device = useDeviceDetection();
|
|
67
|
-
const dimensions =
|
|
68
|
-
const viewportWidth =
|
|
69
|
-
const viewportHeight =
|
|
70
|
-
const setViewportSize =
|
|
67
|
+
const dimensions = chunkDEVJOHGE_cjs.useAdaptiveDimensions();
|
|
68
|
+
const viewportWidth = chunk2UW42GAP_cjs.useDesktopStore((state) => state.viewportWidth);
|
|
69
|
+
const viewportHeight = chunk2UW42GAP_cjs.useDesktopStore((state) => state.viewportHeight);
|
|
70
|
+
const setViewportSize = chunk2UW42GAP_cjs.useDesktopStore((state) => state.setViewportSize);
|
|
71
71
|
react.useEffect(() => {
|
|
72
72
|
notifyReady?.({});
|
|
73
73
|
}, [notifyReady]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2UW42GAP_cjs = require('./chunk-2UW42GAP.cjs');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
|
|
6
6
|
var DIMENSIONS = {
|
|
@@ -12,10 +12,10 @@ var DIMENSIONS = {
|
|
|
12
12
|
var LARGE_DESKTOP = 1440;
|
|
13
13
|
var getAdaptiveDimensions = () => {
|
|
14
14
|
const width = window.innerWidth;
|
|
15
|
-
if (width <
|
|
15
|
+
if (width < chunk2UW42GAP_cjs.BREAKPOINTS.MOBILE) {
|
|
16
16
|
return DIMENSIONS.mobile;
|
|
17
17
|
}
|
|
18
|
-
if (width <
|
|
18
|
+
if (width < chunk2UW42GAP_cjs.BREAKPOINTS.TABLET) {
|
|
19
19
|
return DIMENSIONS.tablet;
|
|
20
20
|
}
|
|
21
21
|
if (width < LARGE_DESKTOP) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ColorPicker_default } from './chunk-EX5V2ZTU.js';
|
|
2
2
|
import { useSettingsAppStore } from './chunk-IDHP3R4I.js';
|
|
3
|
-
import { useResolvedUrl } from './chunk-
|
|
3
|
+
import { useResolvedUrl } from './chunk-FNWS4ZKT.js';
|
|
4
4
|
import { PRESET_COLORS } from './chunk-PKPQA5NR.js';
|
|
5
|
-
import { AppIcon_default } from './chunk-
|
|
6
|
-
import { useCloseInterceptor } from './chunk-
|
|
5
|
+
import { AppIcon_default } from './chunk-NULEEBCG.js';
|
|
6
|
+
import { useCloseInterceptor } from './chunk-PVBI2WRF.js';
|
|
7
7
|
import { DownloadProgress_default } from './chunk-HWHBSAUC.js';
|
|
8
|
-
import { FilePickerModal } from './chunk-
|
|
9
|
-
import { useDesktopStore } from './chunk-
|
|
8
|
+
import { FilePickerModal } from './chunk-2MYZWMDC.js';
|
|
9
|
+
import { useDesktopStore } from './chunk-W2Y22XR6.js';
|
|
10
10
|
import { isDocker } from './chunk-FRHBM2U7.js';
|
|
11
11
|
import { Stack, Text, SimpleGrid, Card, Button, Box, Group, UnstyledButton, Radio, Paper, Slider, TextInput, ScrollArea, Tooltip, SegmentedControl, Badge } from './chunk-BQL3YXMV.js';
|
|
12
12
|
import * as React5 from 'react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useNotesStore } from './chunk-FH4ILMKF.js';
|
|
2
2
|
import { VscIcon_default } from './chunk-GRYCUBJZ.js';
|
|
3
|
-
import { useCloseInterceptor } from './chunk-
|
|
4
|
-
import { FilePickerModal, FileSaveModal } from './chunk-
|
|
5
|
-
import { TEXT_MIME_TYPES, useDesktopStore, resolveFileUrl } from './chunk-
|
|
3
|
+
import { useCloseInterceptor } from './chunk-PVBI2WRF.js';
|
|
4
|
+
import { FilePickerModal, FileSaveModal } from './chunk-2MYZWMDC.js';
|
|
5
|
+
import { TEXT_MIME_TYPES, useDesktopStore, resolveFileUrl } from './chunk-W2Y22XR6.js';
|
|
6
6
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
7
7
|
import { useEditor, useEditorState, EditorContent } from '@tiptap/react';
|
|
8
8
|
import StarterKit from '@tiptap/starter-kit';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2UW42GAP_cjs = require('./chunk-2UW42GAP.cjs');
|
|
4
4
|
var chunk7Y7HB7FB_cjs = require('./chunk-7Y7HB7FB.cjs');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ var AppIcon = ({ fcIcon, fallback, iconUrl, size = 20, color }) => {
|
|
|
11
11
|
const fiElement = chunk7Y7HB7FB_cjs.useFiIconElement(isFiIcon ? fcIcon ?? "" : "", { size, color });
|
|
12
12
|
const vscElement = chunk7Y7HB7FB_cjs.useVscIconElement(isVscIcon ? fcIcon ?? "" : "", { size });
|
|
13
13
|
if (iconUrl) {
|
|
14
|
-
const resolvedIconUrl =
|
|
14
|
+
const resolvedIconUrl = chunk2UW42GAP_cjs.resolveUrl(iconUrl);
|
|
15
15
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
16
|
"img",
|
|
17
17
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkDEVJOHGE_cjs = require('./chunk-DEVJOHGE.cjs');
|
|
4
|
+
var chunk2UW42GAP_cjs = require('./chunk-2UW42GAP.cjs');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
|
|
7
7
|
// src/constants/Animations.ts
|
|
@@ -71,16 +71,16 @@ var centerWindowPosition = (viewportWidth, viewportHeight, windowWidth, windowHe
|
|
|
71
71
|
x: Math.round((viewportWidth - windowWidth) / 2),
|
|
72
72
|
y: Math.round((viewportHeight - windowHeight) / 2)
|
|
73
73
|
});
|
|
74
|
-
var FilesAppLazy = react.lazy(() => import('./FilesApp-
|
|
75
|
-
var NotesAppLazy = react.lazy(() => import('./NotesApp-
|
|
76
|
-
var ImageViewerAppLazy = react.lazy(() => import('./ImageViewerApp-
|
|
77
|
-
var PdfAppLazy = react.lazy(() => import('./PdfApp-
|
|
78
|
-
var MenuEditAppLazy = react.lazy(() => import('./MenuEditApp-
|
|
79
|
-
var UploaderAppLazy = react.lazy(() => import('./UploaderApp-
|
|
80
|
-
var SettingsAppLazy = react.lazy(() => import('./SettingsApp-
|
|
81
|
-
var DeviceInfoAppLazy = react.lazy(() => import('./DeviceInfoApp-
|
|
74
|
+
var FilesAppLazy = react.lazy(() => import('./FilesApp-B7JR4PEP.cjs'));
|
|
75
|
+
var NotesAppLazy = react.lazy(() => import('./NotesApp-BZYASRVJ.cjs'));
|
|
76
|
+
var ImageViewerAppLazy = react.lazy(() => import('./ImageViewerApp-UIXSGW2X.cjs'));
|
|
77
|
+
var PdfAppLazy = react.lazy(() => import('./PdfApp-3ZINDODQ.cjs'));
|
|
78
|
+
var MenuEditAppLazy = react.lazy(() => import('./MenuEditApp-B2ZMG4ZY.cjs'));
|
|
79
|
+
var UploaderAppLazy = react.lazy(() => import('./UploaderApp-MTRIYWV4.cjs'));
|
|
80
|
+
var SettingsAppLazy = react.lazy(() => import('./SettingsApp-2ZNO7AVY.cjs'));
|
|
81
|
+
var DeviceInfoAppLazy = react.lazy(() => import('./DeviceInfoApp-2MJFK32B.cjs'));
|
|
82
82
|
var CalendarAppLazy = react.lazy(() => import('./CalendarApp-OTGEERSS.cjs'));
|
|
83
|
-
var CreateItemAppLazy = react.lazy(() => import('./CreateItemApp-
|
|
83
|
+
var CreateItemAppLazy = react.lazy(() => import('./CreateItemApp-BSEISPUS.cjs'));
|
|
84
84
|
var NotesMenuBarLazy = react.lazy(
|
|
85
85
|
() => import('./NotesMenuBar-25LKN3SE.cjs').then((m) => ({ default: m.NotesMenuBar }))
|
|
86
86
|
);
|
|
@@ -235,14 +235,14 @@ function initCoreRegistry() {
|
|
|
235
235
|
|
|
236
236
|
// src/hooks/useOpenApp.ts
|
|
237
237
|
var useOpenApp = () => {
|
|
238
|
-
const openWindow =
|
|
239
|
-
const focusWindow =
|
|
240
|
-
const windows =
|
|
241
|
-
const customApps =
|
|
242
|
-
const adaptiveDimensions =
|
|
238
|
+
const openWindow = chunk2UW42GAP_cjs.useDesktopStore((state) => state.openWindow);
|
|
239
|
+
const focusWindow = chunk2UW42GAP_cjs.useDesktopStore((state) => state.focusWindow);
|
|
240
|
+
const windows = chunk2UW42GAP_cjs.useDesktopStore((state) => state.windows);
|
|
241
|
+
const customApps = chunk2UW42GAP_cjs.useDesktopStore((state) => state.customApps);
|
|
242
|
+
const adaptiveDimensions = chunkDEVJOHGE_cjs.useAdaptiveDimensions();
|
|
243
243
|
return react.useCallback(
|
|
244
244
|
(appId, { contentData, position } = {}) => {
|
|
245
|
-
const app =
|
|
245
|
+
const app = chunk2UW42GAP_cjs.APPS.find((a) => a.id === appId);
|
|
246
246
|
const customApp = customApps.find((a) => a.id === appId);
|
|
247
247
|
const registryEntry = getRegistryEntry(appId);
|
|
248
248
|
const isSingleWindow = app?.singleWindow === true || customApp?.window?.singleWindow === true || registryEntry?.singleWindow === true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAdaptiveDimensions } from './chunk-
|
|
2
|
-
import { useDesktopStore, APPS } from './chunk-
|
|
1
|
+
import { useAdaptiveDimensions } from './chunk-WHZGUG7Q.js';
|
|
2
|
+
import { useDesktopStore, APPS } from './chunk-W2Y22XR6.js';
|
|
3
3
|
import { lazy, useCallback } from 'react';
|
|
4
4
|
|
|
5
5
|
// src/constants/Animations.ts
|
|
@@ -69,16 +69,16 @@ var centerWindowPosition = (viewportWidth, viewportHeight, windowWidth, windowHe
|
|
|
69
69
|
x: Math.round((viewportWidth - windowWidth) / 2),
|
|
70
70
|
y: Math.round((viewportHeight - windowHeight) / 2)
|
|
71
71
|
});
|
|
72
|
-
var FilesAppLazy = lazy(() => import('./FilesApp-
|
|
73
|
-
var NotesAppLazy = lazy(() => import('./NotesApp-
|
|
74
|
-
var ImageViewerAppLazy = lazy(() => import('./ImageViewerApp-
|
|
75
|
-
var PdfAppLazy = lazy(() => import('./PdfApp-
|
|
76
|
-
var MenuEditAppLazy = lazy(() => import('./MenuEditApp-
|
|
77
|
-
var UploaderAppLazy = lazy(() => import('./UploaderApp-
|
|
78
|
-
var SettingsAppLazy = lazy(() => import('./SettingsApp-
|
|
79
|
-
var DeviceInfoAppLazy = lazy(() => import('./DeviceInfoApp-
|
|
72
|
+
var FilesAppLazy = lazy(() => import('./FilesApp-HYTIWN3O.js'));
|
|
73
|
+
var NotesAppLazy = lazy(() => import('./NotesApp-MW37NRSN.js'));
|
|
74
|
+
var ImageViewerAppLazy = lazy(() => import('./ImageViewerApp-PLHNQFZ3.js'));
|
|
75
|
+
var PdfAppLazy = lazy(() => import('./PdfApp-ZSYAQP7L.js'));
|
|
76
|
+
var MenuEditAppLazy = lazy(() => import('./MenuEditApp-4DB5UEWH.js'));
|
|
77
|
+
var UploaderAppLazy = lazy(() => import('./UploaderApp-V3WUDCG2.js'));
|
|
78
|
+
var SettingsAppLazy = lazy(() => import('./SettingsApp-ODZINK6T.js'));
|
|
79
|
+
var DeviceInfoAppLazy = lazy(() => import('./DeviceInfoApp-KFYU3E43.js'));
|
|
80
80
|
var CalendarAppLazy = lazy(() => import('./CalendarApp-K7ZOUZ6C.js'));
|
|
81
|
-
var CreateItemAppLazy = lazy(() => import('./CreateItemApp-
|
|
81
|
+
var CreateItemAppLazy = lazy(() => import('./CreateItemApp-2EME6FYH.js'));
|
|
82
82
|
var NotesMenuBarLazy = lazy(
|
|
83
83
|
() => import('./NotesMenuBar-SRV3AIAL.js').then((m) => ({ default: m.NotesMenuBar }))
|
|
84
84
|
);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJX65IKJZ_cjs = require('./chunk-JX65IKJZ.cjs');
|
|
4
4
|
var chunkABIAPZ6S_cjs = require('./chunk-ABIAPZ6S.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk2UW42GAP_cjs = require('./chunk-2UW42GAP.cjs');
|
|
6
6
|
var chunkE55VXNLK_cjs = require('./chunk-E55VXNLK.cjs');
|
|
7
7
|
var react = require('react');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
|
|
10
10
|
var useNotifications = () => {
|
|
11
|
-
const notifications =
|
|
12
|
-
const addNotification =
|
|
13
|
-
const removeNotification =
|
|
11
|
+
const notifications = chunk2UW42GAP_cjs.useDesktopStore((state) => state.notifications);
|
|
12
|
+
const addNotification = chunk2UW42GAP_cjs.useDesktopStore((state) => state.addNotification);
|
|
13
|
+
const removeNotification = chunk2UW42GAP_cjs.useDesktopStore((state) => state.removeNotification);
|
|
14
14
|
const notify = react.useCallback(
|
|
15
15
|
(title, message, options) => {
|
|
16
16
|
const item = {
|
|
17
|
-
id:
|
|
17
|
+
id: chunk2UW42GAP_cjs.generateUUID(),
|
|
18
18
|
title,
|
|
19
19
|
message,
|
|
20
20
|
fcIcon: options?.fcIcon,
|
|
@@ -151,11 +151,11 @@ var FileListItem = ({ node, onNavigate, onOpenFile, onContextMenu }) => {
|
|
|
151
151
|
);
|
|
152
152
|
};
|
|
153
153
|
var FileList = ({ nodes, onNavigate, onOpenFile, onNodeContextMenu }) => {
|
|
154
|
-
const filesSortMode =
|
|
154
|
+
const filesSortMode = chunk2UW42GAP_cjs.useDesktopStore((state) => state.filesSortMode);
|
|
155
155
|
if (nodes.length === 0) {
|
|
156
156
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: FileList_default.empty, children: /* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.Text, { size: "sm", c: "dimmed", children: "This folder is empty" }) });
|
|
157
157
|
}
|
|
158
|
-
const sorted =
|
|
158
|
+
const sorted = chunk2UW42GAP_cjs.sortNodesByMode(nodes, filesSortMode);
|
|
159
159
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: FileList_default.grid, role: "listbox", "aria-label": "Files", children: sorted.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
160
160
|
FileListItem,
|
|
161
161
|
{
|
|
@@ -174,10 +174,10 @@ var FilesApp_default = {};
|
|
|
174
174
|
var FilesApp = ({ window }) => {
|
|
175
175
|
const win = window;
|
|
176
176
|
const initialFolderId = win?.contentData?.initialFolderId;
|
|
177
|
-
const fsNodes =
|
|
178
|
-
const openContextMenu =
|
|
179
|
-
const setFilesCurrentFolderId =
|
|
180
|
-
const openApp =
|
|
177
|
+
const fsNodes = chunk2UW42GAP_cjs.useDesktopStore((state) => state.fsNodes);
|
|
178
|
+
const openContextMenu = chunk2UW42GAP_cjs.useDesktopStore((state) => state.openContextMenu);
|
|
179
|
+
const setFilesCurrentFolderId = chunk2UW42GAP_cjs.useDesktopStore((state) => state.setFilesCurrentFolderId);
|
|
180
|
+
const openApp = chunkJX65IKJZ_cjs.useOpenApp();
|
|
181
181
|
const { notify } = useNotifications();
|
|
182
182
|
const [currentFolderId, setCurrentFolderIdLocal] = react.useState(
|
|
183
183
|
initialFolderId ?? null
|
|
@@ -224,7 +224,7 @@ var FilesApp = ({ window }) => {
|
|
|
224
224
|
const handleOpenFile = react.useCallback(
|
|
225
225
|
(node) => {
|
|
226
226
|
try {
|
|
227
|
-
const result =
|
|
227
|
+
const result = chunk2UW42GAP_cjs.getAppIdForMime(node);
|
|
228
228
|
if (result) {
|
|
229
229
|
openApp(result.appId, { contentData: result.contentData });
|
|
230
230
|
} else {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMenuEditStore } from './chunk-D5MVFFID.js';
|
|
2
2
|
import { VscIcon_default } from './chunk-GRYCUBJZ.js';
|
|
3
|
-
import { AppIcon_default } from './chunk-
|
|
4
|
-
import { useCloseInterceptor } from './chunk-
|
|
5
|
-
import { useDesktopStore, APPS } from './chunk-
|
|
3
|
+
import { AppIcon_default } from './chunk-NULEEBCG.js';
|
|
4
|
+
import { useCloseInterceptor } from './chunk-PVBI2WRF.js';
|
|
5
|
+
import { useDesktopStore, APPS } from './chunk-W2Y22XR6.js';
|
|
6
6
|
import { isDocker } from './chunk-FRHBM2U7.js';
|
|
7
7
|
import { Box, Text, Group, ActionIcon, Card, TextInput, UnstyledButton } from './chunk-BQL3YXMV.js';
|
|
8
8
|
import { createContext, useState, useCallback, useMemo, useContext, useRef, useEffect } from 'react';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJX65IKJZ_cjs = require('./chunk-JX65IKJZ.cjs');
|
|
4
4
|
var chunk2PSTHGTD_cjs = require('./chunk-2PSTHGTD.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkYOHBUOZJ_cjs = require('./chunk-YOHBUOZJ.cjs');
|
|
6
|
+
var chunk2UW42GAP_cjs = require('./chunk-2UW42GAP.cjs');
|
|
7
7
|
var chunk7Y7HB7FB_cjs = require('./chunk-7Y7HB7FB.cjs');
|
|
8
8
|
var chunkE55VXNLK_cjs = require('./chunk-E55VXNLK.cjs');
|
|
9
9
|
var react = require('react');
|
|
@@ -24,8 +24,8 @@ function formatBytes(bytes) {
|
|
|
24
24
|
var UploaderApp_default = {};
|
|
25
25
|
var UploaderApp = ({ window: win }) => {
|
|
26
26
|
const { t } = reactI18next.useTranslation("apps");
|
|
27
|
-
const createFile =
|
|
28
|
-
const openApp =
|
|
27
|
+
const createFile = chunk2UW42GAP_cjs.useDesktopStore((state) => state.createFile);
|
|
28
|
+
const openApp = chunkJX65IKJZ_cjs.useOpenApp();
|
|
29
29
|
const [activeStep, setActiveStep] = react.useState(0);
|
|
30
30
|
const [file, setFile] = react.useState(null);
|
|
31
31
|
const [selectedFolderId, setSelectedFolderId] = react.useState(null);
|
|
@@ -87,7 +87,7 @@ var UploaderApp = ({ window: win }) => {
|
|
|
87
87
|
}
|
|
88
88
|
console.log("[UploaderApp] Calling saveBlob...");
|
|
89
89
|
const saveBlobStart = Date.now();
|
|
90
|
-
const idbUrl = await
|
|
90
|
+
const idbUrl = await chunk2UW42GAP_cjs.fileSystem.saveBlob(file);
|
|
91
91
|
console.log(
|
|
92
92
|
"[UploaderApp] saveBlob completed in",
|
|
93
93
|
Date.now() - saveBlobStart,
|
|
@@ -146,10 +146,10 @@ var UploaderApp = ({ window: win }) => {
|
|
|
146
146
|
}, [selectedFolderId, openApp]);
|
|
147
147
|
const handleOpenFile = react.useCallback(() => {
|
|
148
148
|
if (!createdFileId) return;
|
|
149
|
-
const createdNode =
|
|
149
|
+
const createdNode = chunk2UW42GAP_cjs.useDesktopStore.getState().fsNodes.find((n) => n.id === createdFileId);
|
|
150
150
|
if (!createdNode || createdNode.type !== "file") return;
|
|
151
151
|
const fileNode = createdNode;
|
|
152
|
-
const result =
|
|
152
|
+
const result = chunk2UW42GAP_cjs.getAppIdForMime(fileNode);
|
|
153
153
|
if (result) {
|
|
154
154
|
openApp(result.appId, { contentData: result.contentData });
|
|
155
155
|
}
|
|
@@ -206,7 +206,7 @@ var UploaderApp = ({ window: win }) => {
|
|
|
206
206
|
),
|
|
207
207
|
/* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.Button, { size: "xs", onClick: () => setActiveStep(2), "data-testid": "uploader-skip-folder", children: t("uploader.next", { defaultValue: "Next" }) })
|
|
208
208
|
] }),
|
|
209
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.Text, { size: "xs", c: "dimmed", mt: "xs", children: selectedFolderId ? `${t("uploader.uploadTo")}: ${
|
|
209
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.Text, { size: "xs", c: "dimmed", mt: "xs", children: selectedFolderId ? `${t("uploader.uploadTo")}: ${chunk2UW42GAP_cjs.useDesktopStore.getState().fsNodes.find((n) => n.id === selectedFolderId)?.name || ""}` : t("uploader.uploadToRoot") })
|
|
210
210
|
]
|
|
211
211
|
}
|
|
212
212
|
),
|
|
@@ -222,7 +222,7 @@ var UploaderApp = ({ window: win }) => {
|
|
|
222
222
|
) })
|
|
223
223
|
] }),
|
|
224
224
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
225
|
-
|
|
225
|
+
chunkYOHBUOZJ_cjs.FolderPickerModal,
|
|
226
226
|
{
|
|
227
227
|
opened: pickerOpen,
|
|
228
228
|
onConfirm: handleFolderSelect,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useOpenApp } from './chunk-
|
|
1
|
+
import { useOpenApp } from './chunk-KGMXUBWQ.js';
|
|
2
2
|
import { DownloadProgress_default } from './chunk-HWHBSAUC.js';
|
|
3
|
-
import { FolderPickerModal } from './chunk-
|
|
4
|
-
import { useDesktopStore, fileSystem, getAppIdForMime } from './chunk-
|
|
3
|
+
import { FolderPickerModal } from './chunk-2MYZWMDC.js';
|
|
4
|
+
import { useDesktopStore, fileSystem, getAppIdForMime } from './chunk-W2Y22XR6.js';
|
|
5
5
|
import { useFcIconElement } from './chunk-YY6OUR2U.js';
|
|
6
6
|
import { Paper, Box, Text, Group, Button, Stepper, FileButton } from './chunk-BQL3YXMV.js';
|
|
7
7
|
import { useState, useCallback } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AppEmptyState_default } from './chunk-ZHNDXNL4.js';
|
|
2
|
-
import { useResolvedUrl } from './chunk-
|
|
3
|
-
import { FilePickerModal } from './chunk-
|
|
2
|
+
import { useResolvedUrl } from './chunk-FNWS4ZKT.js';
|
|
3
|
+
import { FilePickerModal } from './chunk-2MYZWMDC.js';
|
|
4
4
|
import { useState, useEffect, useCallback } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAdaptiveDimensions } from './chunk-
|
|
2
|
-
import { useDesktopStore, BREAKPOINTS } from './chunk-
|
|
1
|
+
import { useAdaptiveDimensions } from './chunk-WHZGUG7Q.js';
|
|
2
|
+
import { useDesktopStore, BREAKPOINTS } from './chunk-W2Y22XR6.js';
|
|
3
3
|
import { isDocker, isDev } from './chunk-FRHBM2U7.js';
|
|
4
4
|
import { Paper, Stack, Text, Code } from './chunk-BQL3YXMV.js';
|
|
5
5
|
import { useState, useCallback, useEffect } from 'react';
|
|
@@ -1586,6 +1586,10 @@ var ICON_ROW_HEIGHT = 80;
|
|
|
1586
1586
|
var ICON_MARGIN = 20;
|
|
1587
1587
|
var DEFAULT_VIEWPORT_WIDTH = DEFAULT_VIEWPORT.WIDTH;
|
|
1588
1588
|
var DEFAULT_VIEWPORT_HEIGHT = DEFAULT_VIEWPORT.HEIGHT;
|
|
1589
|
+
var fetchFsManifest = async () => {
|
|
1590
|
+
const response = await fetch(resolveUrl("fs-manifest.json"));
|
|
1591
|
+
return response.ok ? await response.json() : null;
|
|
1592
|
+
};
|
|
1589
1593
|
var windowManager = new WindowManagerAdapter();
|
|
1590
1594
|
function createFileSystemAdapter() {
|
|
1591
1595
|
if (isDocker()) {
|
|
@@ -1743,19 +1747,19 @@ var useDesktopStore = create()(
|
|
|
1743
1747
|
} else if (!fileSystem.isReady()) {
|
|
1744
1748
|
await fileSystem.initialize();
|
|
1745
1749
|
}
|
|
1746
|
-
const manifest = await
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1750
|
+
const manifest = await fetchFsManifest();
|
|
1751
|
+
if (manifest) {
|
|
1752
|
+
const currentSha = manifest.sha ?? null;
|
|
1753
|
+
const savedSha = await fileSystem.getManifestSha();
|
|
1754
|
+
if (fileSystem.isEmpty()) {
|
|
1755
|
+
await fileSystem.seed(manifest);
|
|
1756
|
+
if (currentSha) {
|
|
1757
|
+
await fileSystem.saveManifestSha(currentSha);
|
|
1758
|
+
}
|
|
1759
|
+
} else if (savedSha !== currentSha && currentSha !== null) {
|
|
1760
|
+
await fileSystem.mergeSeed(manifest);
|
|
1754
1761
|
await fileSystem.saveManifestSha(currentSha);
|
|
1755
1762
|
}
|
|
1756
|
-
} else if (savedSha !== currentSha && currentSha !== null) {
|
|
1757
|
-
await fileSystem.mergeSeed(manifest);
|
|
1758
|
-
await fileSystem.saveManifestSha(currentSha);
|
|
1759
1763
|
}
|
|
1760
1764
|
set({
|
|
1761
1765
|
fsNodes: fileSystem.getAllNodes(),
|
|
@@ -2233,4 +2237,4 @@ if (typeof window !== "undefined") {
|
|
|
2233
2237
|
});
|
|
2234
2238
|
}
|
|
2235
2239
|
|
|
2236
|
-
export { APPS, BREAKPOINTS, CORE_APPS, CORE_APP_IDS, CUSTOM_APPS_FOLDER_ID, DEFAULT_LAUNCHER_FOLDERS, DEFAULT_VIEWPORT_HEIGHT, DEFAULT_VIEWPORT_WIDTH, DEFAULT_WINDOW_DIMENSIONS, DESKTOP_APPS_ORDER, DockerFileSystemAdapter, EXTRA_APPS, EXTRA_APP_IDS, ICON_COLUMN_WIDTH, ICON_MARGIN, ICON_ROW_HEIGHT, IMAGE_MIME_TYPES, IndexedDBFileSystem, PREDEFINED_LAUNCHER_FOLDERS, SortOptions, TASKBAR_HEIGHT, TEXT_MIME_TYPES, WindowManagerAdapter, clearManifestCache, convertToAppEntry, createDesktopIcon, createFile, createFolder, createLauncherFolder, createPredefinedLauncherFolder, createWindow, fetchAppManifest, fileSystem, generateUUID, getAppIdForMime, getBaseUrl, getCachedManifest, getCustomAppById, getCustomApps, getMimeTypeFromExtension, hashBlob, isCustomApp, mergeAppsWithCustomApps, registerAppFileHandler, registerCustomApps, registerDesktopApps, removeFromManifestCache, resetBaseUrlCache, resetFileSystem, resetWindowManager, resolveFileUrl, resolveUrl, setApiBaseUrl, setTestBaseUrl, sortDesktopIcons, sortDesktopIconsByMode, sortNodes, sortNodesByMode, syncWithServer, updateLauncherFolder, updateManifestCache, useCustomAppStore, useDesktopStore };
|
|
2240
|
+
export { APPS, BREAKPOINTS, CORE_APPS, CORE_APP_IDS, CUSTOM_APPS_FOLDER_ID, DEFAULT_LAUNCHER_FOLDERS, DEFAULT_VIEWPORT_HEIGHT, DEFAULT_VIEWPORT_WIDTH, DEFAULT_WINDOW_DIMENSIONS, DESKTOP_APPS_ORDER, DockerFileSystemAdapter, EXTRA_APPS, EXTRA_APP_IDS, ICON_COLUMN_WIDTH, ICON_MARGIN, ICON_ROW_HEIGHT, IMAGE_MIME_TYPES, IndexedDBFileSystem, PREDEFINED_LAUNCHER_FOLDERS, SortOptions, TASKBAR_HEIGHT, TEXT_MIME_TYPES, WindowManagerAdapter, clearManifestCache, convertToAppEntry, createDesktopIcon, createFile, createFolder, createLauncherFolder, createPredefinedLauncherFolder, createWindow, fetchAppManifest, fetchFsManifest, fileSystem, generateUUID, getAppIdForMime, getBaseUrl, getCachedManifest, getCustomAppById, getCustomApps, getMimeTypeFromExtension, hashBlob, isCustomApp, mergeAppsWithCustomApps, registerAppFileHandler, registerCustomApps, registerDesktopApps, removeFromManifestCache, resetBaseUrlCache, resetFileSystem, resetWindowManager, resolveFileUrl, resolveUrl, setApiBaseUrl, setTestBaseUrl, sortDesktopIcons, sortDesktopIconsByMode, sortNodes, sortNodesByMode, syncWithServer, updateLauncherFolder, updateManifestCache, useCustomAppStore, useDesktopStore };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useOpenApp } from './chunk-
|
|
1
|
+
import { useOpenApp } from './chunk-KGMXUBWQ.js';
|
|
2
2
|
import { FileIcon_default } from './chunk-EAELL43F.js';
|
|
3
|
-
import { useDesktopStore, generateUUID, getAppIdForMime, sortNodesByMode } from './chunk-
|
|
3
|
+
import { useDesktopStore, generateUUID, getAppIdForMime, sortNodesByMode } from './chunk-W2Y22XR6.js';
|
|
4
4
|
import { Breadcrumbs, Text, Anchor, UnstyledButton } from './chunk-BQL3YXMV.js';
|
|
5
5
|
import { useCallback, useState, useEffect } from 'react';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useImageViewerStore } from './chunk-DWP2SYF7.js';
|
|
2
2
|
import { AppEmptyState_default } from './chunk-ZHNDXNL4.js';
|
|
3
|
-
import { useResolvedUrl } from './chunk-
|
|
4
|
-
import { FilePickerModal } from './chunk-
|
|
5
|
-
import { IMAGE_MIME_TYPES } from './chunk-
|
|
3
|
+
import { useResolvedUrl } from './chunk-FNWS4ZKT.js';
|
|
4
|
+
import { FilePickerModal } from './chunk-2MYZWMDC.js';
|
|
5
|
+
import { IMAGE_MIME_TYPES } from './chunk-W2Y22XR6.js';
|
|
6
6
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkABIAPZ6S_cjs = require('./chunk-ABIAPZ6S.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk2UW42GAP_cjs = require('./chunk-2UW42GAP.cjs');
|
|
5
5
|
var chunkE55VXNLK_cjs = require('./chunk-E55VXNLK.cjs');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
@@ -145,7 +145,7 @@ var FolderGridComponent = ({
|
|
|
145
145
|
if (currentFolderNodes.length === 0) {
|
|
146
146
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: FilePickerApp_default.empty, children: /* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.Text, { size: "sm", c: "dimmed", children: t("common:messages.noSubfolders") }) });
|
|
147
147
|
}
|
|
148
|
-
const sortedNodes =
|
|
148
|
+
const sortedNodes = chunk2UW42GAP_cjs.sortNodes(currentFolderNodes);
|
|
149
149
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
150
150
|
"div",
|
|
151
151
|
{
|
|
@@ -175,7 +175,7 @@ var FolderGridComponent = ({
|
|
|
175
175
|
var FolderGrid = react.memo(FolderGridComponent);
|
|
176
176
|
var FilePickerApp = ({ acceptedMimeTypes, onConfirm, onCancel }) => {
|
|
177
177
|
const { t } = reactI18next.useTranslation("window");
|
|
178
|
-
const fsNodes =
|
|
178
|
+
const fsNodes = chunk2UW42GAP_cjs.useDesktopStore((state) => state.fsNodes);
|
|
179
179
|
const [currentFolderId, setCurrentFolderId] = react.useState(null);
|
|
180
180
|
const [selectedNode, setSelectedNode] = react.useState(null);
|
|
181
181
|
const currentNodes = currentFolderId === null ? fsNodes.filter((n) => n.parentId === null) : fsNodes.filter((n) => n.parentId === currentFolderId);
|
|
@@ -230,7 +230,7 @@ var FilePickerApp = ({ acceptedMimeTypes, onConfirm, onCancel }) => {
|
|
|
230
230
|
className: FilePickerApp_default.grid,
|
|
231
231
|
role: "listbox",
|
|
232
232
|
"aria-label": t("fileDialog.filesAria", { ns: "common" }),
|
|
233
|
-
children:
|
|
233
|
+
children: chunk2UW42GAP_cjs.sortNodes(visibleNodes).map((node) => {
|
|
234
234
|
const isSelected = selectedNode?.id === node.id;
|
|
235
235
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
236
236
|
chunkE55VXNLK_cjs.UnstyledButton,
|
|
@@ -299,7 +299,7 @@ var FileSaveApp = ({
|
|
|
299
299
|
onCancel
|
|
300
300
|
}) => {
|
|
301
301
|
const { t } = reactI18next.useTranslation("window");
|
|
302
|
-
const fsNodes =
|
|
302
|
+
const fsNodes = chunk2UW42GAP_cjs.useDesktopStore((state) => state.fsNodes);
|
|
303
303
|
const [currentFolderId, setCurrentFolderId] = react.useState(null);
|
|
304
304
|
const [fileName, setFileName] = react.useState(initialName);
|
|
305
305
|
const handleNavigate = react.useCallback((id) => {
|
|
@@ -384,7 +384,7 @@ var FileSaveModal = ({ opened, ...saveProps }) => {
|
|
|
384
384
|
};
|
|
385
385
|
var FolderPickerApp = ({ onConfirm, onCancel }) => {
|
|
386
386
|
const { t } = reactI18next.useTranslation("window");
|
|
387
|
-
const fsNodes =
|
|
387
|
+
const fsNodes = chunk2UW42GAP_cjs.useDesktopStore((state) => state.fsNodes);
|
|
388
388
|
const [currentFolderId, setCurrentFolderId] = react.useState(null);
|
|
389
389
|
const handleNavigate = react.useCallback((id) => {
|
|
390
390
|
setCurrentFolderId(id);
|