@burdenoff/microfe-files 2026.525.3 → 2026.527.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/files/components/ActionMenu.js +3 -1
  2. package/dist/files/components/ActionMenu.js.map +1 -1
  3. package/dist/files/components/ContextMenu.js +16 -112
  4. package/dist/files/components/ContextMenu.js.map +1 -1
  5. package/dist/files/components/CopyDialog.js +8 -0
  6. package/dist/files/components/CopyDialog.js.map +1 -1
  7. package/dist/files/components/EmptyState.js +2 -0
  8. package/dist/files/components/EmptyState.js.map +1 -1
  9. package/dist/files/components/FileBrowser.js +192 -171
  10. package/dist/files/components/FileBrowser.js.map +1 -1
  11. package/dist/files/components/FileCard.js +4 -0
  12. package/dist/files/components/FileCard.js.map +1 -1
  13. package/dist/files/components/FileInfoPanel.js +2 -0
  14. package/dist/files/components/FileInfoPanel.js.map +1 -1
  15. package/dist/files/components/FileListItem.js +6 -0
  16. package/dist/files/components/FileListItem.js.map +1 -1
  17. package/dist/files/components/FilePreviewModal.js +9 -3
  18. package/dist/files/components/FilePreviewModal.js.map +1 -1
  19. package/dist/files/components/FileVersionPanel.js +5 -0
  20. package/dist/files/components/FileVersionPanel.js.map +1 -1
  21. package/dist/files/components/FolderCard.js +147 -158
  22. package/dist/files/components/FolderCard.js.map +1 -1
  23. package/dist/files/components/MoveDialog.js +17 -12
  24. package/dist/files/components/MoveDialog.js.map +1 -1
  25. package/dist/files/components/SearchBar.js +4 -0
  26. package/dist/files/components/SearchBar.js.map +1 -1
  27. package/dist/files/components/ShareDialog.js +109 -104
  28. package/dist/files/components/ShareDialog.js.map +1 -1
  29. package/dist/files/components/TabBar.js +1 -0
  30. package/dist/files/components/TabBar.js.map +1 -1
  31. package/dist/files/components/Toast.js +1 -0
  32. package/dist/files/components/Toast.js.map +1 -1
  33. package/dist/files/components/UploadQueue.js +5 -0
  34. package/dist/files/components/UploadQueue.js.map +1 -1
  35. package/dist/files/components/contextMenuItems.js +103 -0
  36. package/dist/files/components/contextMenuItems.js.map +1 -0
  37. package/dist/files/components/viewers/AudioPlayer.js +4 -1
  38. package/dist/files/components/viewers/AudioPlayer.js.map +1 -1
  39. package/dist/files/components/viewers/CodeViewer.js +2 -0
  40. package/dist/files/components/viewers/CodeViewer.js.map +1 -1
  41. package/dist/files/components/viewers/ImageViewer.js +4 -0
  42. package/dist/files/components/viewers/ImageViewer.js.map +1 -1
  43. package/dist/files/components/viewers/PDFViewer.js +2 -0
  44. package/dist/files/components/viewers/PDFViewer.js.map +1 -1
  45. package/dist/files/components/viewers/TextViewer.js +4 -2
  46. package/dist/files/components/viewers/TextViewer.js.map +1 -1
  47. package/dist/files/components/viewers/VideoPlayer.js +5 -1
  48. package/dist/files/components/viewers/VideoPlayer.js.map +1 -1
  49. package/dist/files/hooks/useBatchOperations.js.map +1 -1
  50. package/dist/files/hooks/useCreateFolder.js +15 -7
  51. package/dist/files/hooks/useCreateFolder.js.map +1 -1
  52. package/dist/files/hooks/useFileVersions.js.map +1 -1
  53. package/dist/files/hooks/useMoveFile.js +1 -2
  54. package/dist/files/hooks/useMoveFile.js.map +1 -1
  55. package/dist/files/hooks/useMoveFolder.js +0 -2
  56. package/dist/files/hooks/useMoveFolder.js.map +1 -1
  57. package/dist/files/hooks/useStarredItems.js +4 -3
  58. package/dist/files/hooks/useStarredItems.js.map +1 -1
  59. package/dist/files/hooks/useToggleStar.js +10 -10
  60. package/dist/files/hooks/useToggleStar.js.map +1 -1
  61. package/dist/files/pages/BrowserPage.js +332 -302
  62. package/dist/files/pages/BrowserPage.js.map +1 -1
  63. package/dist/files/pages/ShareAccessPage.js +6 -5
  64. package/dist/files/pages/ShareAccessPage.js.map +1 -1
  65. package/dist/files/utils/index.js +1 -1
  66. package/dist/files/utils/index.js.map +1 -1
  67. package/dist/files/utils/quotaUtils.js +14 -0
  68. package/dist/files/utils/quotaUtils.js.map +1 -0
  69. package/dist/files/utils/thumbnail.js.map +1 -1
  70. package/dist/files.js +2 -1
  71. package/dist/translations/en.js +259 -0
  72. package/dist/translations/en.js.map +1 -0
  73. package/package.json +2 -5
  74. package/dist/files/components/viewers/index.js +0 -6
@@ -6,27 +6,28 @@ import { useDragDrop as te } from "../hooks/useDragDrop.js";
6
6
  import { FileCard as ne } from "./FileCard.js";
7
7
  import { FileListItem as re } from "./FileListItem.js";
8
8
  import { FolderCard as ie } from "./FolderCard.js";
9
- import { ContextMenu as r, createFileMenuItems as ae, createFolderMenuItems as i } from "./ContextMenu.js";
9
+ import { ContextMenu as r } from "./ContextMenu.js";
10
+ import { createFileMenuItems as ae, createFolderMenuItems as i } from "./contextMenuItems.js";
10
11
  import { useState as a } from "react";
11
- import { Grid3x3 as oe, Loader2 as se, Star as ce } from "lucide-react";
12
+ import { Folder as oe, Loader2 as se, Star as ce } from "lucide-react";
12
13
  import { Fragment as le, jsx as o, jsxs as s } from "react/jsx-runtime";
13
14
  import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
15
  //#region src/files/components/FileBrowser.tsx
15
- var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSortOrder: fe = !1, onFilePreview: d, onFileShare: f, onFileDelete: p, onFileRestore: m, onFileFavorite: h, onFileRename: g, onFileDownload: _, onFileCopy: v, onFileMove: y, onFileInfo: b, onFileActivity: x, onFolderOpen: S, onFolderShare: C, onFolderDelete: w, onFolderRestore: T, onFolderRename: E, onFolderFavorite: D, onFolderCopy: pe, onFolderMove: O, onFolderInfo: k, onFolderActivity: me, onMoveFile: he, onCopyFile: ge, onMoveFolder: _e, onCopyFolder: ve }) => {
16
- let { t: A } = ue(), { viewMode: j, sortBy: M, sortDirection: ye, selectedFiles: N, selectedFolders: P } = e(), [be, xe] = a(null), [F, I] = a({
16
+ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSortOrder: fe = !1, onFilePreview: pe, onFileShare: d, onFileDelete: f, onFileRestore: p, onFileFavorite: m, onFileRename: h, onFileDownload: g, onFileCopy: _, onFileMove: v, onFileInfo: y, onFileActivity: b, onFolderOpen: x, onFolderShare: S, onFolderDelete: C, onFolderRestore: w, onFolderRename: T, onFolderFavorite: E, onFolderCopy: me, onFolderMove: D, onFolderInfo: O, onFolderActivity: he, onMoveFile: ge, onCopyFile: _e, onMoveFolder: ve, onCopyFolder: ye }) => {
17
+ let { t: k } = ue(), { viewMode: A, sortBy: j, sortDirection: be, selectedFiles: M, selectedFolders: N } = e(), [xe, Se] = a(null), [P, F] = a({
17
18
  draggedItem: null,
18
19
  dropTargetFolderId: null
19
- }), [L, R] = a(null), { draggedItem: z, startDrag: Se, endDrag: Ce, handleDrop: we } = te({
20
- onMoveFile: he,
21
- onCopyFile: ge,
22
- onMoveFolder: _e,
23
- onCopyFolder: ve
24
- }), Te = (e, t) => {
25
- Se({
20
+ }), [I, L] = a(null), { draggedItem: R, startDrag: Ce, endDrag: we, handleDrop: Te } = te({
21
+ onMoveFile: ge,
22
+ onCopyFile: _e,
23
+ onMoveFolder: ve,
24
+ onCopyFolder: ye
25
+ }), Ee = (e, t) => {
26
+ Ce({
26
27
  type: "file",
27
28
  item: e,
28
29
  operation: t
29
- }), I({
30
+ }), F({
30
31
  draggedItem: {
31
32
  type: "file",
32
33
  item: e,
@@ -34,12 +35,12 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
34
35
  },
35
36
  dropTargetFolderId: null
36
37
  });
37
- }, Ee = (e, t) => {
38
- Se({
38
+ }, De = (e, t) => {
39
+ Ce({
39
40
  type: "folder",
40
41
  item: e,
41
42
  operation: t
42
- }), I({
43
+ }), F({
43
44
  draggedItem: {
44
45
  type: "folder",
45
46
  item: e,
@@ -47,80 +48,80 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
47
48
  },
48
49
  dropTargetFolderId: null
49
50
  });
50
- }, B = () => {
51
- Ce(), I({
51
+ }, z = () => {
52
+ we(), F({
52
53
  draggedItem: null,
53
54
  dropTargetFolderId: null
54
55
  });
55
- }, V = async (e) => {
56
- z && (await we(e.id), I({
56
+ }, Oe = async (e) => {
57
+ R && (await Te(e.id), F({
57
58
  draggedItem: null,
58
59
  dropTargetFolderId: null
59
60
  }));
60
- }, De = (e) => {
61
- I((t) => ({
61
+ }, ke = (e) => {
62
+ F((t) => ({
62
63
  ...t,
63
64
  dropTargetFolderId: e
64
65
  }));
65
- }, Oe = () => {
66
- I((e) => ({
66
+ }, Ae = () => {
67
+ F((e) => ({
67
68
  ...e,
68
69
  dropTargetFolderId: null
69
70
  }));
70
- }, H = (e, t, n) => {
71
- R({
71
+ }, B = (e, t, n) => {
72
+ L({
72
73
  item: e,
73
74
  type: "file",
74
75
  x: t,
75
76
  y: n
76
77
  });
77
- }, U = (e, t, n) => {
78
- R({
78
+ }, V = (e, t, n) => {
79
+ L({
79
80
  item: e,
80
81
  type: "folder",
81
82
  x: t,
82
83
  y: n
83
84
  });
84
- }, W = () => {
85
- R(null);
86
- }, G = (e) => e.canRead === !0 || e.canUpdate === !0 || e.canWrite === !0, K = (e) => e.canUpdate === !0 || e.canWrite === !0, q = (e) => e.canShare === !0 || K(e), J = (e) => e.canDelete === !0, Y = (e) => e.canRead === !0 || e.permissions?.canRead === !0, X = (e) => e.canUpdate === !0 || e.permissions?.canWrite === !0, Z = (e) => e.permissions?.canShare === !0 || X(e), Q = (e) => e.canDelete === !0 || e.permissions?.canDelete === !0, $ = () => {
87
- if (!L) return [];
88
- if (L.type === "file") {
89
- let e = L.item;
85
+ }, H = () => {
86
+ L(null);
87
+ }, U = (e) => e.canRead === !0 || e.canUpdate === !0 || e.canWrite === !0, W = (e) => e.canUpdate === !0 || e.canWrite === !0, G = (e) => e.canShare === !0 || W(e), K = (e) => e.canDelete === !0, q = (e) => e.canRead === !0 || e.permissions?.canRead === !0, J = (e) => e.canUpdate === !0 || e.permissions?.canWrite === !0, Y = (e) => e.permissions?.canShare === !0 || J(e), X = (e) => e.canDelete === !0 || e.permissions?.canDelete === !0, Z = () => {
88
+ if (!I) return [];
89
+ if (I.type === "file") {
90
+ let e = I.item;
90
91
  return ae({
91
- onShare: f && q(e) ? () => f(e) : void 0,
92
- onDownload: _ && G(e) ? () => _(e) : void 0,
93
- onCopy: v && G(e) ? () => v(e) : void 0,
94
- onRename: g && K(e) ? () => g(e) : void 0,
95
- onStar: h && K(e) ? () => h(e) : void 0,
96
- onMove: y && K(e) ? () => y(e) : void 0,
97
- onInfo: b ? () => b(e) : void 0,
98
- onActivity: x ? () => x(e) : void 0,
99
- onDelete: p && J(e) ? () => p(e) : void 0,
100
- onRestore: m && K(e) ? () => m(e) : void 0,
92
+ onShare: d && G(e) ? () => d(e) : void 0,
93
+ onDownload: g && U(e) ? () => g(e) : void 0,
94
+ onCopy: _ && U(e) ? () => _(e) : void 0,
95
+ onRename: h && W(e) ? () => h(e) : void 0,
96
+ onStar: m && W(e) ? () => m(e) : void 0,
97
+ onMove: v && W(e) ? () => v(e) : void 0,
98
+ onInfo: y ? () => y(e) : void 0,
99
+ onActivity: b ? () => b(e) : void 0,
100
+ onDelete: f && K(e) ? () => f(e) : void 0,
101
+ onRestore: p && W(e) ? () => p(e) : void 0,
101
102
  isStarred: e.starred
102
- }, A);
103
+ }, k);
103
104
  } else {
104
- let e = L.item;
105
+ let e = I.item;
105
106
  return i({
106
- onShare: C && Z(e) ? () => C(e) : void 0,
107
- onRename: E && X(e) ? () => E(e) : void 0,
108
- onStar: D && X(e) ? () => D(e) : void 0,
109
- onMove: O && X(e) ? () => O(e) : void 0,
110
- onInfo: k ? () => k(e) : void 0,
111
- onDelete: w && Q(e) ? () => w(e) : void 0,
112
- onRestore: T && X(e) ? () => T(e) : void 0,
107
+ onShare: S && Y(e) ? () => S(e) : void 0,
108
+ onRename: T && J(e) ? () => T(e) : void 0,
109
+ onStar: E && J(e) ? () => E(e) : void 0,
110
+ onMove: D && J(e) ? () => D(e) : void 0,
111
+ onInfo: O ? () => O(e) : void 0,
112
+ onDelete: C && X(e) ? () => C(e) : void 0,
113
+ onRestore: w && J(e) ? () => w(e) : void 0,
113
114
  isStarred: e.starred
114
- }, A);
115
+ }, k);
115
116
  }
116
- }, ke = fe ? c : t(c, M, ye), Ae = fe ? l : t(l, M, ye);
117
+ }, Q = fe ? c : t(c, j, be), $ = fe ? l : t(l, j, be);
117
118
  return de ? /* @__PURE__ */ o("div", {
118
119
  className: "flex items-center justify-center min-h-[500px]",
119
120
  children: /* @__PURE__ */ s("div", {
120
121
  className: "flex flex-col items-center gap-4",
121
122
  children: [/* @__PURE__ */ o(se, { className: "size-10 animate-spin text-action-primary-bg" }), /* @__PURE__ */ o("span", {
122
123
  className: "text-sm text-text-secondary",
123
- children: n(A, "files.browser.loading", "Loading files…")
124
+ children: n(k, "files.browser.loading", "Loading files…")
124
125
  })]
125
126
  })
126
127
  }) : u ? /* @__PURE__ */ o("div", {
@@ -130,25 +131,26 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
130
131
  children: [
131
132
  /* @__PURE__ */ o("div", {
132
133
  className: "mb-3 text-xl font-semibold text-status-error-text",
133
- children: n(A, "files.browser.loadError", "Failed to load files")
134
+ children: n(k, "files.browser.loadError", "Failed to load files")
134
135
  }),
135
136
  /* @__PURE__ */ o("p", {
136
137
  className: "mb-6 text-sm text-text-secondary",
137
- children: u.message || n(A, "files.browser.unexpectedError", "An unexpected error occurred")
138
+ children: u.message || n(k, "files.browser.unexpectedError", "An unexpected error occurred")
138
139
  }),
139
140
  /* @__PURE__ */ o("button", {
141
+ type: "button",
140
142
  onClick: () => window.location.reload(),
141
143
  className: "rounded-lg bg-action-primary-bg px-6 py-2.5 text-sm font-medium text-text-inverse transition-colors hover:bg-action-primary-bg-hover",
142
- children: n(A, "files.browser.retry", "Retry")
144
+ children: n(k, "files.browser.retry", "Retry")
143
145
  })
144
146
  ]
145
147
  })
146
- }) : c.length === 0 && l.length === 0 ? /* @__PURE__ */ o(le, { children: L && /* @__PURE__ */ o(r, {
147
- x: L.x,
148
- y: L.y,
149
- onClose: W,
150
- items: $()
151
- }) }) : j === "list" ? j === "list" ? /* @__PURE__ */ s("div", {
148
+ }) : c.length === 0 && l.length === 0 ? /* @__PURE__ */ o(le, { children: I && /* @__PURE__ */ o(r, {
149
+ x: I.x,
150
+ y: I.y,
151
+ onClose: H,
152
+ items: Z()
153
+ }) }) : A === "list" ? A === "list" ? /* @__PURE__ */ s("div", {
152
154
  className: "@container bg-bg-canvas",
153
155
  children: [
154
156
  /* @__PURE__ */ s("div", {
@@ -158,52 +160,52 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
158
160
  /* @__PURE__ */ o("div", { className: "flex-shrink-0 w-6" }),
159
161
  /* @__PURE__ */ o("div", {
160
162
  className: "flex-1",
161
- children: n(A, "files.browser.name", "Name")
163
+ children: n(k, "files.browser.name", "Name")
162
164
  }),
163
165
  /* @__PURE__ */ o("div", {
164
166
  className: "hidden @lg:block flex-shrink-0 w-40",
165
- children: n(A, "files.browser.owner", "Owner")
167
+ children: n(k, "files.browser.owner", "Owner")
166
168
  }),
167
169
  /* @__PURE__ */ o("div", {
168
170
  className: "hidden @md:block flex-shrink-0 w-24 text-right",
169
- children: n(A, "files.browser.size", "Size")
171
+ children: n(k, "files.browser.size", "Size")
170
172
  }),
171
173
  /* @__PURE__ */ o("div", {
172
174
  className: "hidden @lg:block flex-shrink-0 w-32 text-right",
173
- children: n(A, "files.browser.modified", "Modified")
175
+ children: n(k, "files.browser.modified", "Modified")
174
176
  }),
175
177
  /* @__PURE__ */ o("div", { className: "flex-shrink-0 w-32" })
176
178
  ]
177
179
  }),
178
180
  /* @__PURE__ */ s("div", {
179
181
  className: "divide-y divide-border-subtle",
180
- children: [Ae.map((t) => /* @__PURE__ */ s("div", {
181
- className: `group flex items-center gap-3 border-b border-border-subtle bg-bg-surface p-3 transition-colors hover:bg-bg-sunken focus-within:bg-bg-sunken ${F.dropTargetFolderId === t.id && z?.item.id !== t.id ? "bg-action-primary-bg/10" : ""} ${z?.item.id === t.id ? "opacity-50" : ""}`,
182
+ children: [$.map((t) => /* @__PURE__ */ s("div", {
183
+ className: `group flex items-center gap-3 border-b border-border-subtle bg-bg-surface p-3 transition-colors hover:bg-bg-sunken focus-within:bg-bg-sunken ${P.dropTargetFolderId === t.id && R?.item.id !== t.id ? "bg-action-primary-bg/10" : ""} ${R?.item.id === t.id ? "opacity-50" : ""}`,
182
184
  onClick: () => {
183
- Y(t) && S?.(t);
185
+ q(t) && x?.(t);
184
186
  },
185
187
  onKeyDown: (e) => {
186
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Y(t) && S?.(t));
188
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), q(t) && x?.(t));
187
189
  },
188
190
  onDragOver: (e) => {
189
- z && z.item.id !== t.id && X(t) && (e.preventDefault(), De(t.id));
191
+ R && R.item.id !== t.id && J(t) && (e.preventDefault(), ke(t.id));
190
192
  },
191
- onDragLeave: Oe,
193
+ onDragLeave: Ae,
192
194
  onDrop: async (e) => {
193
- e.preventDefault(), z && z.item.id !== t.id && X(t) && await V(t);
195
+ e.preventDefault(), R && R.item.id !== t.id && J(t) && await Oe(t);
194
196
  },
195
197
  onContextMenu: (e) => {
196
- e.preventDefault(), U(t, e.clientX, e.clientY);
198
+ e.preventDefault(), V(t, e.clientX, e.clientY);
197
199
  },
198
200
  role: "button",
199
201
  tabIndex: 0,
200
- "aria-label": n(A, "files.browser.openFolder", "Open folder"),
202
+ "aria-label": n(k, "files.browser.openFolder", "Open folder"),
201
203
  children: [
202
204
  /* @__PURE__ */ o("div", {
203
205
  className: "flex-shrink-0",
204
206
  children: /* @__PURE__ */ o("input", {
205
207
  type: "checkbox",
206
- checked: P.has(t.id),
208
+ checked: N.has(t.id),
207
209
  onChange: (n) => {
208
210
  n.stopPropagation(), e.getState().toggleFolderSelection(t.id);
209
211
  },
@@ -241,9 +243,9 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
241
243
  children: /* @__PURE__ */ s("span", {
242
244
  className: "font-text-sm text-text-secondary",
243
245
  children: [
244
- t.filesCount ?? 0,
246
+ (t.filesCount ?? 0) + (t.subfoldersCount ?? 0),
245
247
  " ",
246
- n(A, "files.browser.items", "items")
248
+ n(k, "files.browser.items", "items")
247
249
  ]
248
250
  })
249
251
  }),
@@ -257,13 +259,14 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
257
259
  /* @__PURE__ */ s("div", {
258
260
  className: "flex w-32 flex-shrink-0 items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",
259
261
  children: [
260
- Z(t) && C && /* @__PURE__ */ o("button", {
262
+ Y(t) && S && /* @__PURE__ */ o("button", {
263
+ type: "button",
261
264
  onClick: (e) => {
262
- e.stopPropagation(), C(t);
265
+ e.stopPropagation(), S(t);
263
266
  },
264
267
  className: "p-1.5 hover:bg-action-ghost-bg-hover rounded transition-colors",
265
- "aria-label": n(A, "files.browser.share", "Share"),
266
- title: n(A, "files.browser.shareFolder", "Share folder"),
268
+ "aria-label": n(k, "files.browser.share", "Share"),
269
+ title: n(k, "files.browser.shareFolder", "Share folder"),
267
270
  children: /* @__PURE__ */ o("svg", {
268
271
  className: "size-4 text-text-primary",
269
272
  fill: "none",
@@ -277,13 +280,14 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
277
280
  })
278
281
  })
279
282
  }),
280
- X(t) && E && /* @__PURE__ */ o("button", {
283
+ J(t) && T && /* @__PURE__ */ o("button", {
284
+ type: "button",
281
285
  onClick: (e) => {
282
- e.stopPropagation(), E(t);
286
+ e.stopPropagation(), T(t);
283
287
  },
284
288
  className: "hidden @md:block p-1.5 hover:bg-action-ghost-bg-hover rounded transition-colors",
285
- "aria-label": n(A, "files.browser.rename", "Rename"),
286
- title: n(A, "files.browser.rename", "Rename"),
289
+ "aria-label": n(k, "files.browser.rename", "Rename"),
290
+ title: n(k, "files.browser.rename", "Rename"),
287
291
  children: /* @__PURE__ */ o("svg", {
288
292
  className: "size-4 text-text-primary",
289
293
  fill: "none",
@@ -297,13 +301,14 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
297
301
  })
298
302
  })
299
303
  }),
300
- Q(t) && w && /* @__PURE__ */ o("button", {
304
+ X(t) && C && /* @__PURE__ */ o("button", {
305
+ type: "button",
301
306
  onClick: (e) => {
302
- e.stopPropagation(), w(t);
307
+ e.stopPropagation(), C(t);
303
308
  },
304
309
  className: "p-1.5 hover:bg-action-danger-bg-hover rounded transition-colors",
305
- "aria-label": n(A, "files.browser.delete", "Delete"),
306
- title: n(A, "files.browser.delete", "Delete"),
310
+ "aria-label": n(k, "files.browser.delete", "Delete"),
311
+ title: n(k, "files.browser.delete", "Delete"),
307
312
  children: /* @__PURE__ */ o("svg", {
308
313
  className: "size-4 text-status-error-text",
309
314
  fill: "none",
@@ -321,98 +326,114 @@ var c = ({ files: c, folders: l, loading: de = !1, error: u = null, preserveSort
321
326
  onClick: (e) => e.stopPropagation(),
322
327
  children: /* @__PURE__ */ o(ee, {
323
328
  items: i({
324
- onShare: Z(t) && C ? () => C(t) : void 0,
325
- onRename: X(t) && E ? () => E(t) : void 0,
326
- onStar: X(t) && D ? () => D(t) : void 0,
327
- onMove: X(t) && O ? () => O(t) : void 0,
328
- onInfo: () => k?.(t),
329
- onRestore: X(t) && T ? () => T(t) : void 0,
330
- onDelete: Q(t) && w ? () => w(t) : void 0,
329
+ onShare: Y(t) && S ? () => S(t) : void 0,
330
+ onRename: J(t) && T ? () => T(t) : void 0,
331
+ onStar: J(t) && E ? () => E(t) : void 0,
332
+ onMove: J(t) && D ? () => D(t) : void 0,
333
+ onInfo: () => O?.(t),
334
+ onRestore: J(t) && w ? () => w(t) : void 0,
335
+ onDelete: X(t) && C ? () => C(t) : void 0,
331
336
  isStarred: t.starred
332
- }, A),
333
- isOpen: be === t.id,
334
- onToggle: (e) => xe(e ? t.id : null)
337
+ }, k),
338
+ isOpen: xe === t.id,
339
+ onToggle: (e) => Se(e ? t.id : null)
335
340
  })
336
341
  })
337
342
  ]
338
343
  })
339
344
  ]
340
- }, t.id)), ke.map((e) => /* @__PURE__ */ o(re, {
345
+ }, t.id)), Q.map((e) => /* @__PURE__ */ o(re, {
341
346
  file: e,
342
- isSelected: N.has(e.id),
343
- isDragging: z?.item.id === e.id,
344
- onPreview: G(e) ? d : void 0,
345
- onShare: q(e) ? f : void 0,
346
- onDelete: J(e) ? p : void 0,
347
- onRestore: K(e) ? m : void 0,
348
- onFavorite: K(e) ? h : void 0,
349
- onRename: K(e) ? g : void 0,
350
- onDownload: G(e) ? _ : void 0,
351
- onCopy: G(e) ? v : void 0,
352
- onMove: K(e) ? y : void 0,
353
- onInfo: b,
354
- onActivity: x,
355
- onDragStart: K(e) ? Te : void 0,
356
- onDragEnd: B,
357
- onContextMenu: H
347
+ isSelected: M.has(e.id),
348
+ isDragging: R?.item.id === e.id,
349
+ onPreview: U(e) ? pe : void 0,
350
+ onShare: G(e) ? d : void 0,
351
+ onDelete: K(e) ? f : void 0,
352
+ onRestore: W(e) ? p : void 0,
353
+ onFavorite: W(e) ? m : void 0,
354
+ onRename: W(e) ? h : void 0,
355
+ onDownload: U(e) ? g : void 0,
356
+ onCopy: U(e) ? _ : void 0,
357
+ onMove: W(e) ? v : void 0,
358
+ onInfo: y,
359
+ onActivity: b,
360
+ onDragStart: W(e) ? Ee : void 0,
361
+ onDragEnd: z,
362
+ onContextMenu: B
358
363
  }, e.id))]
359
364
  }),
360
- L && /* @__PURE__ */ o(r, {
361
- x: L.x,
362
- y: L.y,
363
- onClose: W,
364
- items: $()
365
+ I && /* @__PURE__ */ o(r, {
366
+ x: I.x,
367
+ y: I.y,
368
+ onClose: H,
369
+ items: Z()
365
370
  })
366
371
  ]
367
372
  }) : null : /* @__PURE__ */ s("div", {
368
373
  className: "@container bg-bg-canvas p-page-padding",
369
- children: [/* @__PURE__ */ s("div", {
370
- className: "grid grid-cols-2 @md:grid-cols-3 @lg:grid-cols-4 @xl:grid-cols-5 gap-4",
371
- children: [Ae.map((e) => /* @__PURE__ */ o(ie, {
372
- folder: e,
373
- isSelected: P.has(e.id),
374
- isDragging: z?.item.id === e.id,
375
- isDropTarget: F.dropTargetFolderId === e.id,
376
- draggedItem: z,
377
- onOpen: Y(e) ? S : void 0,
378
- onShare: Z(e) ? C : void 0,
379
- onDelete: Q(e) ? w : void 0,
380
- onRestore: X(e) ? T : void 0,
381
- onRename: X(e) ? E : void 0,
382
- onFavorite: X(e) ? D : void 0,
383
- onCopy: pe,
384
- onMove: X(e) ? O : void 0,
385
- onInfo: k,
386
- onActivity: me,
387
- onDragStart: X(e) ? Ee : void 0,
388
- onDragEnd: B,
389
- onDrop: X(e) ? V : void 0,
390
- onContextMenu: U
391
- }, e.id)), ke.map((e) => /* @__PURE__ */ o(ne, {
392
- file: e,
393
- isSelected: N.has(e.id),
394
- isDragging: z?.item.id === e.id,
395
- onPreview: G(e) ? d : void 0,
396
- onShare: q(e) ? f : void 0,
397
- onDelete: J(e) ? p : void 0,
398
- onRestore: K(e) ? m : void 0,
399
- onFavorite: K(e) ? h : void 0,
400
- onRename: K(e) ? g : void 0,
401
- onDownload: G(e) ? _ : void 0,
402
- onCopy: G(e) ? v : void 0,
403
- onMove: K(e) ? y : void 0,
404
- onInfo: b,
405
- onActivity: x,
406
- onDragStart: K(e) ? Te : void 0,
407
- onDragEnd: B,
408
- onContextMenu: H
409
- }, e.id))]
410
- }), L && /* @__PURE__ */ o(r, {
411
- x: L.x,
412
- y: L.y,
413
- onClose: W,
414
- items: $()
415
- })]
374
+ children: [
375
+ $.length > 0 && /* @__PURE__ */ s("div", {
376
+ className: Q.length > 0 ? "mb-6" : "",
377
+ children: [Q.length > 0 && /* @__PURE__ */ o("h2", {
378
+ className: "text-xs font-semibold text-text-tertiary uppercase tracking-wider mb-3 px-1",
379
+ children: n(k, "files.browser.section.folders", "Folders")
380
+ }), /* @__PURE__ */ o("div", {
381
+ className: "grid grid-cols-1 @sm:grid-cols-2 @lg:grid-cols-3 @xl:grid-cols-4 gap-2",
382
+ children: $.map((e) => /* @__PURE__ */ o(ie, {
383
+ folder: e,
384
+ isSelected: N.has(e.id),
385
+ isDragging: R?.item.id === e.id,
386
+ isDropTarget: P.dropTargetFolderId === e.id,
387
+ draggedItem: R,
388
+ onOpen: q(e) ? x : void 0,
389
+ onShare: Y(e) ? S : void 0,
390
+ onDelete: X(e) ? C : void 0,
391
+ onRestore: J(e) ? w : void 0,
392
+ onRename: J(e) ? T : void 0,
393
+ onFavorite: J(e) ? E : void 0,
394
+ onCopy: me,
395
+ onMove: J(e) ? D : void 0,
396
+ onInfo: O,
397
+ onActivity: he,
398
+ onDragStart: J(e) ? De : void 0,
399
+ onDragEnd: z,
400
+ onDrop: J(e) ? Oe : void 0,
401
+ onContextMenu: V
402
+ }, e.id))
403
+ })]
404
+ }),
405
+ Q.length > 0 && /* @__PURE__ */ s("div", { children: [$.length > 0 && /* @__PURE__ */ o("h2", {
406
+ className: "text-xs font-semibold text-text-tertiary uppercase tracking-wider mb-3 px-1",
407
+ children: n(k, "files.browser.section.files", "Files")
408
+ }), /* @__PURE__ */ o("div", {
409
+ className: "grid grid-cols-2 @md:grid-cols-3 @lg:grid-cols-4 @xl:grid-cols-5 gap-4",
410
+ children: Q.map((e) => /* @__PURE__ */ o(ne, {
411
+ file: e,
412
+ isSelected: M.has(e.id),
413
+ isDragging: R?.item.id === e.id,
414
+ onPreview: U(e) ? pe : void 0,
415
+ onShare: G(e) ? d : void 0,
416
+ onDelete: K(e) ? f : void 0,
417
+ onRestore: W(e) ? p : void 0,
418
+ onFavorite: W(e) ? m : void 0,
419
+ onRename: W(e) ? h : void 0,
420
+ onDownload: U(e) ? g : void 0,
421
+ onCopy: U(e) ? _ : void 0,
422
+ onMove: W(e) ? v : void 0,
423
+ onInfo: y,
424
+ onActivity: b,
425
+ onDragStart: W(e) ? Ee : void 0,
426
+ onDragEnd: z,
427
+ onContextMenu: B
428
+ }, e.id))
429
+ })] }),
430
+ I && /* @__PURE__ */ o(r, {
431
+ x: I.x,
432
+ y: I.y,
433
+ onClose: H,
434
+ items: Z()
435
+ })
436
+ ]
416
437
  });
417
438
  };
418
439
  //#endregion