@burdenoff/microfe-files 2026.625.2 → 2026.625.3

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.
@@ -45,27 +45,27 @@ import { isQuotaExhaustedError as Ie } from "../utils/quotaUtils.js";
45
45
  import { nativeImpact as Le, nativeNotify as Re, nativeOpenUrl as ze } from "../../utils/nativeBridge.js";
46
46
  import { emitFilesEvent as Be } from "../utils/events.js";
47
47
  import { useEffect as Ve, useMemo as He, useState as o } from "react";
48
- import { FolderPlus as Ue, FolderUp as We, FolderX as Ge, Grid3x3 as Ke, Home as qe, List as Je, Loader2 as s, Search as Ye, Trash2 as Xe, Upload as Ze, X as Qe } from "lucide-react";
49
- import { Fragment as $e, jsx as c, jsxs as l } from "react/jsx-runtime";
50
- import { useNavigate as et, useParams as tt } from "react-router-dom";
51
- import { useI18n as nt } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
52
- import { Button as u, CTAOverflowMenu as rt, EmphasisPanel as it, Input as at, ResponsiveDialog as ot, ResponsiveDialogContent as st, ResponsiveDialogFooter as ct, ResponsiveDialogHeader as lt, ResponsiveDialogTitle as ut } from "@burdenoff/fe-libs/ui";
48
+ import { FolderPlus as Ue, FolderUp as We, FolderX as Ge, Grid3x3 as Ke, Home as qe, List as Je, Loader2 as s, Trash2 as Ye, Upload as Xe, X as Ze } from "lucide-react";
49
+ import { Fragment as Qe, jsx as c, jsxs as l } from "react/jsx-runtime";
50
+ import { useNavigate as $e, useParams as et } from "react-router-dom";
51
+ import { useI18n as tt } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
52
+ import { AuroraBackground as nt, Button as u, CTAOverflowMenu as rt, EmphasisPanel as it, GradientText as at, IllustratedEmptyState as ot, Input as st, ResponsiveDialog as ct, ResponsiveDialogContent as lt, ResponsiveDialogFooter as ut, ResponsiveDialogHeader as dt, ResponsiveDialogTitle as ft } from "@burdenoff/fe-libs/ui";
53
53
  //#region src/files/pages/BrowserPage.tsx
54
54
  function d() {
55
- let { t: d } = nt(), { folderId: f } = tt(), p = et(), dt = e(), { workspaceId: m } = dt, ft = Fe(m ?? ""), { viewMode: pt, setViewMode: mt, breadcrumbs: ht, selectedFiles: h, selectedFolders: g, clearSelection: _ } = t(), [v, gt] = o("all"), _t = He(() => [
55
+ let { t: d } = tt(), { folderId: f } = et(), p = $e(), pt = e(), { workspaceId: m } = pt, mt = Fe(m ?? ""), { viewMode: ht, setViewMode: gt, breadcrumbs: _t, selectedFiles: h, selectedFolders: g, clearSelection: _ } = t(), [v, vt] = o("all"), yt = He(() => [
56
56
  "all",
57
57
  "recent",
58
58
  "starred",
59
59
  "bin"
60
60
  ], []);
61
61
  Ve(() => {
62
- _t.includes(v) || gt("all");
63
- }, [_t, v]);
64
- let [y, vt] = o(""), [yt, bt] = o(), b = y.trim().length >= 2, [xt, St] = o(null), [x, Ct] = o(null), S = be(), C = r({
62
+ yt.includes(v) || vt("all");
63
+ }, [yt, v]);
64
+ let [y, bt] = o(""), [xt, St] = o(), b = y.trim().length >= 2, [Ct, wt] = o(null), [x, Tt] = o(null), S = be(), C = r({
65
65
  folderId: f || void 0,
66
66
  pageSize: 100,
67
67
  skip: v !== "all" || b
68
- }), wt = i({ skip: v !== "recent" || b }), Tt = ee({ skip: v !== "starred" || b }), Et = te({ skip: v !== "bin" || b }), w = ye(y, b, yt);
68
+ }), Et = i({ skip: v !== "recent" || b }), Dt = ee({ skip: v !== "starred" || b }), Ot = te({ skip: v !== "bin" || b }), w = ye(y, b, xt);
69
69
  Ve(() => {
70
70
  if (f && C.data?.folderPath && C.data?.currentFolder) {
71
71
  let e = C.data.folderPath.folders || [], n = C.data.currentFolder, r = [...e.map((e) => ({
@@ -85,18 +85,18 @@ function d() {
85
85
  T = C.data?.filesList?.files || [], E = C.data?.foldersList?.folders || [], D = C.loading, O = C.error || null, k = !1;
86
86
  break;
87
87
  case "recent":
88
- T = wt.files || [], E = wt.folders || [], D = wt.isLoading, O = wt.error || null, k = !0;
88
+ T = Et.files || [], E = Et.folders || [], D = Et.isLoading, O = Et.error || null, k = !0;
89
89
  break;
90
90
  case "starred":
91
- T = Tt.files, E = Tt.folders, D = Tt.isLoading, O = Tt.error || null, k = !0;
91
+ T = Dt.files, E = Dt.folders, D = Dt.isLoading, O = Dt.error || null, k = !0;
92
92
  break;
93
93
  case "bin":
94
- T = Et.files, E = Et.folders, D = Et.isLoading, O = Et.error || null, k = !0;
94
+ T = Ot.files, E = Ot.folders, D = Ot.isLoading, O = Ot.error || null, k = !0;
95
95
  break;
96
96
  }
97
- let Dt = v === "all" ? (C.data?.filesList?.total ?? T.length) + (C.data?.foldersList?.total ?? E.length) : null, A = h.size + g.size, [Ot, j] = o(!1), [kt, At] = o(!1), [jt, M] = o(!1), [Mt, N] = o(!1), [Nt, Pt] = o(!1), [Ft, It] = o(!1), [Lt, P] = o(null), [F, I] = o(null), [L, Rt] = o(null), [R, z] = o(null), [B, V] = o(""), [H, U] = o(""), [W, G] = o(!1), [zt, K] = o([]), [Bt, q] = o(!1), [J, Y] = o(null), X = (e, t) => {
98
- Be(dt, e, t);
99
- }, Vt = async () => {
97
+ let kt = v === "all" ? (C.data?.filesList?.total ?? T.length) + (C.data?.foldersList?.total ?? E.length) : null, A = h.size + g.size, [At, j] = o(!1), [jt, Mt] = o(!1), [Nt, M] = o(!1), [Pt, N] = o(!1), [Ft, It] = o(!1), [Lt, Rt] = o(!1), [zt, P] = o(null), [F, I] = o(null), [L, Bt] = o(null), [R, z] = o(null), [B, V] = o(""), [H, U] = o(""), [W, G] = o(!1), [Vt, K] = o([]), [Ht, q] = o(!1), [J, Y] = o(null), X = (e, t) => {
98
+ Be(pt, e, t);
99
+ }, Ut = async () => {
100
100
  if (!J || J.loading) return;
101
101
  let e = J.onConfirm;
102
102
  Y({
@@ -114,7 +114,7 @@ function d() {
114
114
  loading: !1
115
115
  });
116
116
  }
117
- }, Z = ne(), Ht = re(), Ut = ie(), Wt = ae(), Gt = oe(), Kt = se(), qt = ce(), Jt = le(), Yt = ue(), Q = de(), $ = fe(), Xt = pe(), Zt = me(), Qt = he(), $t = ge(), en = _e(), tn = ve(), nn = () => {
117
+ }, Z = ne(), Wt = re(), Gt = ie(), Kt = ae(), qt = oe(), Jt = se(), Yt = ce(), Xt = le(), Zt = ue(), Q = de(), $ = fe(), Qt = pe(), $t = me(), en = he(), tn = ge(), nn = _e(), rn = ve(), an = () => {
118
118
  let e = document.createElement("input");
119
119
  e.type = "file", e.multiple = !0, e.onchange = async (e) => {
120
120
  let t = e.target.files;
@@ -131,11 +131,11 @@ function d() {
131
131
  };
132
132
  }));
133
133
  K((t) => [...t, ...e]), q(!0), G(!0);
134
- for (let t of e) await rn(t);
134
+ for (let t of e) await on(t);
135
135
  G(!1);
136
136
  }
137
137
  }, e.click();
138
- }, rn = async (e) => {
138
+ }, on = async (e) => {
139
139
  let t = (t) => {
140
140
  K((n) => n.map((n) => n.id === e.id ? {
141
141
  ...n,
@@ -144,7 +144,7 @@ function d() {
144
144
  };
145
145
  t({ status: "uploading" });
146
146
  try {
147
- let n = await Ht.mutateAsync({
147
+ let n = await Wt.mutateAsync({
148
148
  file: e.file,
149
149
  folderId: e.folderId,
150
150
  onProgress: (e) => {
@@ -173,28 +173,28 @@ function d() {
173
173
  message: r
174
174
  }));
175
175
  }
176
- }, an = (e) => {
177
- Ht.pause(), K((t) => t.map((t) => t.id === e ? {
176
+ }, sn = (e) => {
177
+ Wt.pause(), K((t) => t.map((t) => t.id === e ? {
178
178
  ...t,
179
179
  status: "paused"
180
180
  } : t));
181
- }, on = (e) => {
182
- let t = zt.find((t) => t.id === e);
183
- t && rn(t);
184
- }, sn = (e) => {
185
- let t = zt.find((t) => t.id === e);
181
+ }, cn = (e) => {
182
+ let t = Vt.find((t) => t.id === e);
183
+ t && on(t);
184
+ }, ln = (e) => {
185
+ let t = Vt.find((t) => t.id === e);
186
186
  t && (K((t) => t.map((t) => t.id === e ? {
187
187
  ...t,
188
188
  status: "pending",
189
189
  progress: 0,
190
190
  error: void 0
191
- } : t)), rn(t));
192
- }, cn = (e) => {
191
+ } : t)), on(t));
192
+ }, un = (e) => {
193
193
  K((t) => {
194
194
  let n = t.filter((t) => t.id !== e);
195
195
  return n.length === 0 && (q(!1), G(!1)), n;
196
196
  });
197
- }, ln = () => {
197
+ }, dn = () => {
198
198
  if (!m) {
199
199
  S.error(a(d, "files.workspace.errors.notSelected", "Workspace not selected"));
200
200
  return;
@@ -237,23 +237,23 @@ function d() {
237
237
  }
238
238
  }
239
239
  K((e) => [...e, ...i]), q(!0), G(!0);
240
- for (let e of i) await rn(e);
240
+ for (let e of i) await on(e);
241
241
  G(!1), S.success(a(d, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
242
242
  count: i.length,
243
243
  plural: i.length > 1 ? "s" : ""
244
244
  }));
245
245
  }
246
246
  }, e.click();
247
- }, un = () => {
247
+ }, fn = () => {
248
248
  j(!0);
249
- }, dn = async () => {
249
+ }, pn = async () => {
250
250
  if (H.trim() && m) {
251
251
  let { data: e, error: t } = await Z.mutateAsync({
252
252
  name: H,
253
253
  parentFolderId: f
254
254
  });
255
255
  if (t) {
256
- Ie(t) ? (j(!1), U(""), At(!0)) : (S.error(t instanceof Error ? t.message : a(d, "files.folder.errors.createFailed", "Folder creation failed")), X("files.api.failed", {
256
+ Ie(t) ? (j(!1), U(""), Mt(!0)) : (S.error(t instanceof Error ? t.message : a(d, "files.folder.errors.createFailed", "Folder creation failed")), X("files.api.failed", {
257
257
  action: "createFolder",
258
258
  message: t instanceof Error ? t.message : "Folder creation failed"
259
259
  }));
@@ -264,13 +264,13 @@ function d() {
264
264
  parentFolderId: f
265
265
  }));
266
266
  }
267
- }, fn = (e) => {
268
- Ct(e);
269
- }, pn = (e) => {
270
- P(e), N(!0);
271
267
  }, mn = (e) => {
268
+ Tt(e);
269
+ }, hn = (e) => {
270
+ P(e), N(!0);
271
+ }, gn = (e) => {
272
272
  P(e), N(!0);
273
- }, hn = async (e) => {
273
+ }, _n = async (e) => {
274
274
  if (!e.fileId && !e.folderId) throw Error(a(d, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
275
275
  let t = e.invitedEmail ? "EMAIL_INVITE" : "PUBLIC_LINK", n = "";
276
276
  if (e.fileId) {
@@ -283,7 +283,7 @@ function d() {
283
283
  shareType: t,
284
284
  accessLevel: "DOWNLOAD"
285
285
  };
286
- n = (await Xt.mutateAsync(r))?.token ?? "", X("files.share.created", {
286
+ n = (await Qt.mutateAsync(r))?.token ?? "", X("files.share.created", {
287
287
  entityType: "file",
288
288
  fileId: e.fileId,
289
289
  shareType: t
@@ -298,7 +298,7 @@ function d() {
298
298
  shareType: t,
299
299
  accessLevel: "DOWNLOAD"
300
300
  };
301
- n = (await Zt.mutateAsync(r))?.createFolderShare?.token ?? "", X("files.share.created", {
301
+ n = (await $t.mutateAsync(r))?.createFolderShare?.token ?? "", X("files.share.created", {
302
302
  entityType: "folder",
303
303
  folderId: e.folderId,
304
304
  shareType: t
@@ -308,7 +308,7 @@ function d() {
308
308
  publicUrl: n ? `${window.location.origin}/files/share/${n}` : "",
309
309
  token: n
310
310
  };
311
- }, gn = async (e) => {
311
+ }, vn = async (e) => {
312
312
  Le("medium"), Y({
313
313
  title: a(d, "files.confirm.deleteFile.title", "Delete file"),
314
314
  description: a(d, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
@@ -316,7 +316,7 @@ function d() {
316
316
  variant: "danger",
317
317
  onConfirm: async () => {
318
318
  try {
319
- await Ut.mutateAsync({ id: e.id }), Re("success"), S.success(a(d, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.file.deleted", {
319
+ await Gt.mutateAsync({ id: e.id }), Re("success"), S.success(a(d, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.file.deleted", {
320
320
  fileId: e.id,
321
321
  fileName: e.name,
322
322
  permanent: !1
@@ -330,16 +330,16 @@ function d() {
330
330
  }
331
331
  }
332
332
  });
333
- }, _n = async (e) => {
333
+ }, yn = async (e) => {
334
334
  try {
335
- await Gt.mutateAsync({ id: e.id }), S.success(a(d, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.file.restored", {
335
+ await qt.mutateAsync({ id: e.id }), S.success(a(d, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.file.restored", {
336
336
  fileId: e.id,
337
337
  fileName: e.name
338
338
  });
339
339
  } catch (e) {
340
340
  S.error(e instanceof Error ? e.message : a(d, "files.file.errors.restoreFailed", "Failed to restore file"));
341
341
  }
342
- }, vn = async (e) => {
342
+ }, bn = async (e) => {
343
343
  Le("heavy"), Y({
344
344
  title: a(d, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
345
345
  description: a(d, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
@@ -347,7 +347,7 @@ function d() {
347
347
  variant: "danger",
348
348
  onConfirm: async () => {
349
349
  try {
350
- await qt.mutateAsync({ id: e.id }), S.success(a(d, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.file.deleted", {
350
+ await Yt.mutateAsync({ id: e.id }), S.success(a(d, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.file.deleted", {
351
351
  fileId: e.id,
352
352
  fileName: e.name,
353
353
  permanent: !0
@@ -357,9 +357,9 @@ function d() {
357
357
  }
358
358
  }
359
359
  });
360
- }, yn = async (e) => {
360
+ }, xn = async (e) => {
361
361
  try {
362
- await Yt.mutateAsync({
362
+ await Zt.mutateAsync({
363
363
  id: e.id,
364
364
  type: "file"
365
365
  }), X("files.file.starred", {
@@ -373,13 +373,13 @@ function d() {
373
373
  fileId: e.id
374
374
  });
375
375
  }
376
- }, bn = (e) => {
376
+ }, Sn = (e) => {
377
377
  z({
378
378
  id: e.id,
379
379
  name: e.name,
380
380
  type: "file"
381
381
  }), V(e.name), M(!0);
382
- }, xn = async (e) => {
382
+ }, Cn = async (e) => {
383
383
  try {
384
384
  let t = e.downloadUrl || e.url;
385
385
  if (!t) throw Error(a(d, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
@@ -391,24 +391,24 @@ function d() {
391
391
  } catch (e) {
392
392
  S.error(e instanceof Error ? e.message : a(d, "files.file.errors.downloadFailed", "Failed to download file"));
393
393
  }
394
- }, Sn = (e) => {
395
- Rt({
394
+ }, wn = (e) => {
395
+ Bt({
396
396
  item: e,
397
397
  type: "file"
398
- }), It(!0);
399
- }, Cn = (e) => {
398
+ }), Rt(!0);
399
+ }, Tn = (e) => {
400
400
  I({
401
401
  item: e,
402
402
  type: "file"
403
- }), Pt(!0);
404
- }, wn = (e) => {
405
- St({
403
+ }), It(!0);
404
+ }, En = (e) => {
405
+ wt({
406
406
  item: e,
407
407
  type: "file"
408
408
  });
409
- }, Tn = (e) => {
409
+ }, Dn = (e) => {
410
410
  p(`/files/browse/${e.id}`);
411
- }, En = async (e) => {
411
+ }, On = async (e) => {
412
412
  Le("medium"), Y({
413
413
  title: a(d, "files.confirm.deleteFolder.title", "Delete folder"),
414
414
  description: a(d, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
@@ -416,7 +416,7 @@ function d() {
416
416
  variant: "danger",
417
417
  onConfirm: async () => {
418
418
  try {
419
- await Wt.mutateAsync({
419
+ await Kt.mutateAsync({
420
420
  id: e.id,
421
421
  recursive: !0
422
422
  }), S.success(a(d, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.folder.deleted", {
@@ -429,16 +429,16 @@ function d() {
429
429
  }
430
430
  }
431
431
  });
432
- }, Dn = async (e) => {
432
+ }, kn = async (e) => {
433
433
  try {
434
- await Kt.mutateAsync({ id: e.id }), S.success(a(d, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.folder.restored", {
434
+ await Jt.mutateAsync({ id: e.id }), S.success(a(d, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.folder.restored", {
435
435
  folderId: e.id,
436
436
  folderName: e.name
437
437
  });
438
438
  } catch (e) {
439
439
  S.error(e instanceof Error ? e.message : a(d, "files.folder.errors.restoreFailed", "Failed to restore folder"));
440
440
  }
441
- }, On = async (e) => {
441
+ }, An = async (e) => {
442
442
  Y({
443
443
  title: a(d, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
444
444
  description: a(d, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
@@ -446,7 +446,7 @@ function d() {
446
446
  variant: "danger",
447
447
  onConfirm: async () => {
448
448
  try {
449
- await Jt.mutateAsync({ id: e.id }), S.success(a(d, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.folder.deleted", {
449
+ await Xt.mutateAsync({ id: e.id }), S.success(a(d, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.folder.deleted", {
450
450
  folderId: e.id,
451
451
  folderName: e.name,
452
452
  permanent: !0
@@ -456,20 +456,20 @@ function d() {
456
456
  }
457
457
  }
458
458
  });
459
- }, kn = (e) => {
459
+ }, jn = (e) => {
460
460
  z({
461
461
  id: e.id,
462
462
  name: e.name,
463
463
  type: "folder"
464
464
  }), V(e.name), M(!0);
465
- }, An = (e) => {
465
+ }, Mn = (e) => {
466
466
  I({
467
467
  item: e,
468
468
  type: "folder"
469
- }), Pt(!0);
470
- }, jn = async (e) => {
469
+ }), It(!0);
470
+ }, Nn = async (e) => {
471
471
  try {
472
- await Yt.mutateAsync({
472
+ await Zt.mutateAsync({
473
473
  id: e.id,
474
474
  type: "folder"
475
475
  }), X("files.folder.starred", {
@@ -483,28 +483,28 @@ function d() {
483
483
  folderId: e.id
484
484
  });
485
485
  }
486
- }, Mn = (e) => {
487
- St({
486
+ }, Pn = (e) => {
487
+ wt({
488
488
  item: e,
489
489
  type: "folder"
490
490
  });
491
- }, Nn = async (e) => {
491
+ }, Fn = async (e) => {
492
492
  if (F) try {
493
- F.type === "file" ? (await $t.mutateAsync({
493
+ F.type === "file" ? (await tn.mutateAsync({
494
494
  fileId: F.item.id,
495
495
  targetFolderId: e || null
496
496
  }), S.success(a(d, "files.file.move.success", "\"{{name}}\" moved", { name: F.item.name })), X("files.file.moved", {
497
497
  fileId: F.item.id,
498
498
  fileName: F.item.name,
499
499
  destinationFolderId: e
500
- })) : (await en.mutateAsync({
500
+ })) : (await nn.mutateAsync({
501
501
  folderId: F.item.id,
502
502
  targetParentFolderId: e
503
503
  }), S.success(a(d, "files.folder.move.success", "\"{{name}}\" moved", { name: F.item.name })), X("files.folder.moved", {
504
504
  folderId: F.item.id,
505
505
  folderName: F.item.name,
506
506
  destinationFolderId: e
507
- })), Pt(!1), I(null);
507
+ })), It(!1), I(null);
508
508
  } catch (e) {
509
509
  S.error(e instanceof Error ? e.message : a(d, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: F.item.name })), X("files.api.failed", {
510
510
  action: F.type === "file" ? "moveFile" : "moveFolder",
@@ -513,10 +513,10 @@ function d() {
513
513
  message: e instanceof Error ? e.message : void 0
514
514
  });
515
515
  }
516
- }, Pn = async (e, t) => {
516
+ }, In = async (e, t) => {
517
517
  if (L) try {
518
518
  if (L.type !== "file") throw Error(a(d, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
519
- await Qt.mutateAsync({
519
+ await en.mutateAsync({
520
520
  id: L.item.id,
521
521
  newName: t || `Copy of ${L.item.name}`,
522
522
  targetFolderId: e || void 0
@@ -524,7 +524,7 @@ function d() {
524
524
  fileId: L.item.id,
525
525
  fileName: L.item.name,
526
526
  destinationFolderId: e
527
- }), It(!1), Rt(null);
527
+ }), Rt(!1), Bt(null);
528
528
  } catch (e) {
529
529
  S.error(e instanceof Error ? e.message : a(d, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: L.item.name })), X("files.api.failed", {
530
530
  action: "copyFile",
@@ -532,7 +532,7 @@ function d() {
532
532
  message: e instanceof Error ? e.message : void 0
533
533
  });
534
534
  }
535
- }, Fn = async () => {
535
+ }, Ln = async () => {
536
536
  if (!(!R || !B.trim())) try {
537
537
  let e = R.name, t = B.trim();
538
538
  R.type === "file" ? (await Q.mutateAsync({
@@ -562,10 +562,10 @@ function d() {
562
562
  return n({
563
563
  files: T,
564
564
  folders: E,
565
- onFilePreview: fn,
566
- onFileDelete: gn,
567
- onFolderOpen: Tn,
568
- onFolderDelete: En,
565
+ onFilePreview: mn,
566
+ onFileDelete: vn,
567
+ onFolderOpen: Dn,
568
+ onFolderDelete: On,
569
569
  activeTab: v
570
570
  }), m === void 0 ? /* @__PURE__ */ l("div", {
571
571
  className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
@@ -582,44 +582,51 @@ function d() {
582
582
  }) : /* @__PURE__ */ l("div", {
583
583
  className: "min-h-screen bg-bg-surface",
584
584
  children: [
585
- /* @__PURE__ */ c("div", {
586
- className: "bg-bg-surface border-b border-border-seam px-4 py-3 sm:px-6 sm:py-4",
585
+ /* @__PURE__ */ l("div", {
586
+ className: "relative overflow-hidden bg-bg-surface border-b border-border-seam px-4 py-3 sm:px-6 sm:py-4",
587
587
  "data-tour": "files-breadcrumb-nav",
588
- children: /* @__PURE__ */ c("div", {
589
- className: "flex items-center gap-2 sm:gap-4",
590
- children: /* @__PURE__ */ l("div", {
591
- className: "flex items-center gap-1 sm:gap-2 text-sm overflow-x-auto",
592
- children: [/* @__PURE__ */ l("button", {
593
- type: "button",
594
- onClick: () => p("/files/browse"),
595
- className: "flex items-center gap-1 text-text-primary hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap",
596
- title: a(d, "files.browser.actions.goToRoot", "Go to root"),
597
- children: [/* @__PURE__ */ c(qe, { className: "size-4" }), /* @__PURE__ */ c("span", {
598
- className: "hidden sm:inline",
599
- children: a(d, "files.browser.rootLabel", "My Drive")
600
- })]
601
- }), ht.map((e, t) => /* @__PURE__ */ l("div", {
602
- className: "flex items-center gap-1 sm:gap-2",
603
- children: [/* @__PURE__ */ c("span", {
604
- className: "text-text-tertiary",
605
- children: "/"
606
- }), /* @__PURE__ */ c("button", {
588
+ children: [
589
+ /* @__PURE__ */ c(nt, { intensity: "subtle" }),
590
+ /* @__PURE__ */ c("h1", {
591
+ className: "mb-2 text-lg font-semibold tracking-tight sm:text-xl",
592
+ children: /* @__PURE__ */ c(at, { children: a(d, "files.browser.rootLabel", "My Drive") })
593
+ }),
594
+ /* @__PURE__ */ c("div", {
595
+ className: "flex items-center gap-2 sm:gap-4",
596
+ children: /* @__PURE__ */ l("div", {
597
+ className: "flex items-center gap-1 sm:gap-2 text-sm overflow-x-auto",
598
+ children: [/* @__PURE__ */ l("button", {
607
599
  type: "button",
608
- onClick: () => p(`/files/browse/${e.id}`),
609
- className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === ht.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
610
- title: `Go to ${e.name}`,
611
- children: e.name
612
- })]
613
- }, e.id))]
600
+ onClick: () => p("/files/browse"),
601
+ className: "flex items-center gap-1 text-text-primary hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap",
602
+ title: a(d, "files.browser.actions.goToRoot", "Go to root"),
603
+ children: [/* @__PURE__ */ c(qe, { className: "size-4" }), /* @__PURE__ */ c("span", {
604
+ className: "hidden sm:inline",
605
+ children: a(d, "files.browser.rootLabel", "My Drive")
606
+ })]
607
+ }), _t.map((e, t) => /* @__PURE__ */ l("div", {
608
+ className: "flex items-center gap-1 sm:gap-2",
609
+ children: [/* @__PURE__ */ c("span", {
610
+ className: "text-text-tertiary",
611
+ children: "/"
612
+ }), /* @__PURE__ */ c("button", {
613
+ type: "button",
614
+ onClick: () => p(`/files/browse/${e.id}`),
615
+ className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === _t.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
616
+ title: `Go to ${e.name}`,
617
+ children: e.name
618
+ })]
619
+ }, e.id))]
620
+ })
614
621
  })
615
- })
622
+ ]
616
623
  }),
617
624
  /* @__PURE__ */ c("div", {
618
625
  "data-tour": "files-tab-bar",
619
626
  children: /* @__PURE__ */ c(Ce, {
620
627
  activeTab: v,
621
- onTabChange: gt,
622
- tabs: _t
628
+ onTabChange: vt,
629
+ tabs: yt
623
630
  })
624
631
  }),
625
632
  /* @__PURE__ */ l("div", {
@@ -634,7 +641,7 @@ function d() {
634
641
  className: "relative w-full max-w-2xl",
635
642
  children: /* @__PURE__ */ c(ke, {
636
643
  onSearch: (e, t) => {
637
- vt(e), bt(t);
644
+ bt(e), St(t);
638
645
  },
639
646
  placeholder: a(d, "files.search.input.placeholder", "Search files and folders..."),
640
647
  initialQuery: y,
@@ -648,20 +655,20 @@ function d() {
648
655
  children: /* @__PURE__ */ c(rt, {
649
656
  primary: {
650
657
  label: W ? a(d, "files.browser.upload.uploading", "Uploading...") : a(d, "files.browser.actions.uploadFiles", "Upload Files"),
651
- onSelect: nn,
658
+ onSelect: an,
652
659
  disabled: W,
653
- icon: W ? /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }) : /* @__PURE__ */ c(Ze, { className: "size-4" })
660
+ icon: W ? /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }) : /* @__PURE__ */ c(Xe, { className: "size-4" })
654
661
  },
655
662
  actions: [
656
663
  {
657
664
  label: a(d, "files.browser.actions.newFolder", "New Folder"),
658
665
  icon: /* @__PURE__ */ c(Ue, { className: "size-4" }),
659
- onSelect: un
666
+ onSelect: fn
660
667
  },
661
668
  {
662
669
  label: a(d, "files.browser.actions.uploadFolder", "Upload Folder"),
663
670
  icon: /* @__PURE__ */ c(We, { className: "size-4" }),
664
- onSelect: ln,
671
+ onSelect: dn,
665
672
  disabled: W
666
673
  },
667
674
  ...T.length > 0 || E.length > 0 ? [{
@@ -678,14 +685,14 @@ function d() {
678
685
  "data-tour": "files-view-mode-toggle",
679
686
  children: [/* @__PURE__ */ c("button", {
680
687
  type: "button",
681
- onClick: () => mt("grid"),
682
- className: `p-2 transition-colors duration-200 ${pt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
688
+ onClick: () => gt("grid"),
689
+ className: `p-2 transition-colors duration-200 ${ht === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
683
690
  "aria-label": a(d, "files.browser.view.grid", "Grid view"),
684
691
  children: /* @__PURE__ */ c(Ke, { className: "size-5" })
685
692
  }), /* @__PURE__ */ c("button", {
686
693
  type: "button",
687
- onClick: () => mt("list"),
688
- className: `p-2 transition-colors duration-200 ${pt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
694
+ onClick: () => gt("list"),
695
+ className: `p-2 transition-colors duration-200 ${ht === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
689
696
  "aria-label": a(d, "files.browser.view.list", "List view"),
690
697
  children: /* @__PURE__ */ c(Je, { className: "size-5" })
691
698
  })]
@@ -699,9 +706,9 @@ function d() {
699
706
  children: [a(d, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: y }), w.data && ` (${(w.data.files?.length || 0) + (w.data.folders?.length || 0)} items)`]
700
707
  }), /* @__PURE__ */ l("button", {
701
708
  type: "button",
702
- onClick: () => vt(""),
709
+ onClick: () => bt(""),
703
710
  className: "flex items-center gap-2 text-status-success-text hover:text-status-success-text/80 text-sm font-medium transition-colors duration-200",
704
- children: [/* @__PURE__ */ c(Qe, { className: "size-4" }), a(d, "files.browser.search.clear", "Clear search")]
711
+ children: [/* @__PURE__ */ c(Ze, { className: "size-4" }), a(d, "files.browser.search.clear", "Clear search")]
705
712
  })]
706
713
  }),
707
714
  A > 0 && /* @__PURE__ */ l(it, {
@@ -716,11 +723,11 @@ function d() {
716
723
  })
717
724
  }), /* @__PURE__ */ c("div", {
718
725
  className: "flex items-center gap-2",
719
- children: v === "bin" ? /* @__PURE__ */ l($e, { children: [/* @__PURE__ */ c("button", {
726
+ children: v === "bin" ? /* @__PURE__ */ l(Qe, { children: [/* @__PURE__ */ c("button", {
720
727
  type: "button",
721
728
  onClick: async () => {
722
729
  try {
723
- await Promise.all([...Array.from(h).map((e) => Gt.mutateAsync({ id: e })), ...Array.from(g).map((e) => Kt.mutateAsync({ id: e }))]), _(), S.success(`${A} item${A > 1 ? "s" : ""} restored`);
730
+ await Promise.all([...Array.from(h).map((e) => qt.mutateAsync({ id: e })), ...Array.from(g).map((e) => Jt.mutateAsync({ id: e }))]), _(), S.success(`${A} item${A > 1 ? "s" : ""} restored`);
724
731
  } catch (e) {
725
732
  S.error(e instanceof Error ? e.message : "Failed to restore some items");
726
733
  }
@@ -740,7 +747,7 @@ function d() {
740
747
  variant: "danger",
741
748
  onConfirm: async () => {
742
749
  try {
743
- await Promise.all([...Array.from(h).map((e) => qt.mutateAsync({ id: e })), ...Array.from(g).map((e) => Jt.mutateAsync({ id: e }))]), _(), S.success(a(d, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
750
+ await Promise.all([...Array.from(h).map((e) => Yt.mutateAsync({ id: e })), ...Array.from(g).map((e) => Xt.mutateAsync({ id: e }))]), _(), S.success(a(d, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
744
751
  count: A,
745
752
  plural: A > 1 ? "s" : ""
746
753
  }));
@@ -751,7 +758,7 @@ function d() {
751
758
  });
752
759
  },
753
760
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-status-error-text bg-bg-surface border border-status-error-border rounded-lg hover:bg-status-error-bg-subtle transition-colors duration-200",
754
- children: [/* @__PURE__ */ c(Xe, { className: "size-4" }), a(d, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
761
+ children: [/* @__PURE__ */ c(Ye, { className: "size-4" }), a(d, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
755
762
  })] }) : /* @__PURE__ */ l("button", {
756
763
  type: "button",
757
764
  onClick: async () => {
@@ -766,7 +773,7 @@ function d() {
766
773
  onConfirm: async () => {
767
774
  try {
768
775
  let e = Array.from(h), t = Array.from(g);
769
- e.length > 0 && await tn.mutateAsync(e), await Promise.all(t.map((e) => Wt.mutateAsync({
776
+ e.length > 0 && await rn.mutateAsync(e), await Promise.all(t.map((e) => Kt.mutateAsync({
770
777
  id: e,
771
778
  recursive: !0
772
779
  }))), _(), S.success(a(d, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
@@ -780,21 +787,21 @@ function d() {
780
787
  });
781
788
  },
782
789
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-status-error-text bg-bg-surface border border-status-error-border rounded-lg hover:bg-status-error-bg-subtle transition-colors duration-200",
783
- children: [/* @__PURE__ */ c(Xe, { className: "size-4" }), a(d, "files.browser.selection.actions.delete", "Delete")]
790
+ children: [/* @__PURE__ */ c(Ye, { className: "size-4" }), a(d, "files.browser.selection.actions.delete", "Delete")]
784
791
  })
785
792
  })]
786
793
  }), /* @__PURE__ */ l("button", {
787
794
  type: "button",
788
795
  onClick: _,
789
796
  className: "flex items-center gap-2 text-text-link hover:text-action-primary-bg-hover text-sm font-medium transition-colors duration-200",
790
- children: [/* @__PURE__ */ c(Qe, { className: "size-4" }), a(d, "files.common.actions.clear", "Clear")]
797
+ children: [/* @__PURE__ */ c(Ze, { className: "size-4" }), a(d, "files.common.actions.clear", "Clear")]
791
798
  })]
792
799
  })
793
800
  ]
794
801
  }),
795
- (ft.isExhausted || ft.isNearLimit) && /* @__PURE__ */ c("div", {
802
+ (mt.isExhausted || mt.isNearLimit) && /* @__PURE__ */ c("div", {
796
803
  className: "px-4 sm:px-6 pt-3",
797
- children: /* @__PURE__ */ c(Pe, { quota: ft })
804
+ children: /* @__PURE__ */ c(Pe, { quota: mt })
798
805
  }),
799
806
  /* @__PURE__ */ l("div", {
800
807
  className: "px-2 sm:px-4 md:px-6 py-3 sm:py-4",
@@ -805,56 +812,56 @@ function d() {
805
812
  loading: D,
806
813
  error: O,
807
814
  preserveSortOrder: k,
808
- onFilePreview: fn,
809
- onFileShare: v === "bin" ? void 0 : pn,
810
- onFileDelete: v === "bin" ? vn : gn,
811
- onFileRestore: v === "bin" ? _n : void 0,
812
- onFileFavorite: v === "bin" ? void 0 : yn,
813
- onFileRename: v === "bin" ? void 0 : bn,
814
- onFileDownload: xn,
815
- onFileCopy: v === "bin" ? void 0 : Sn,
816
- onFileMove: v === "bin" ? void 0 : Cn,
817
- onFileInfo: wn,
818
- onFolderOpen: Tn,
819
- onFolderShare: v === "bin" ? void 0 : mn,
820
- onFolderDelete: v === "bin" ? On : En,
821
- onFolderRestore: v === "bin" ? Dn : void 0,
822
- onFolderRename: v === "bin" ? void 0 : kn,
823
- onFolderFavorite: v === "bin" ? void 0 : jn,
824
- onFolderMove: v === "bin" ? void 0 : An,
825
- onFolderInfo: Mn
815
+ onFilePreview: mn,
816
+ onFileShare: v === "bin" ? void 0 : hn,
817
+ onFileDelete: v === "bin" ? bn : vn,
818
+ onFileRestore: v === "bin" ? yn : void 0,
819
+ onFileFavorite: v === "bin" ? void 0 : xn,
820
+ onFileRename: v === "bin" ? void 0 : Sn,
821
+ onFileDownload: Cn,
822
+ onFileCopy: v === "bin" ? void 0 : wn,
823
+ onFileMove: v === "bin" ? void 0 : Tn,
824
+ onFileInfo: En,
825
+ onFolderOpen: Dn,
826
+ onFolderShare: v === "bin" ? void 0 : gn,
827
+ onFolderDelete: v === "bin" ? An : On,
828
+ onFolderRestore: v === "bin" ? kn : void 0,
829
+ onFolderRename: v === "bin" ? void 0 : jn,
830
+ onFolderFavorite: v === "bin" ? void 0 : Nn,
831
+ onFolderMove: v === "bin" ? void 0 : Mn,
832
+ onFolderInfo: Pn
826
833
  }), !D && (T.length > 0 || E.length > 0) && /* @__PURE__ */ l("div", {
827
834
  className: "mt-4 px-2 text-sm text-text-secondary",
828
- children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count: T.length + E.length }), !b && v === "all" && Dt !== null && ` ${a(d, "files.browser.results.ofItems", "of {{count}} items", { count: Dt })}`]
835
+ children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count: T.length + E.length }), !b && v === "all" && kt !== null && ` ${a(d, "files.browser.results.ofItems", "of {{count}} items", { count: kt })}`]
829
836
  })]
830
837
  }),
831
- Ot && /* @__PURE__ */ c(ot, {
838
+ At && /* @__PURE__ */ c(ct, {
832
839
  open: !0,
833
840
  onOpenChange: (e) => {
834
841
  !e && !Z.isPending && (j(!1), U(""));
835
842
  },
836
- children: /* @__PURE__ */ l(st, {
843
+ children: /* @__PURE__ */ l(lt, {
837
844
  className: "w-full max-w-xs",
838
845
  children: [
839
- /* @__PURE__ */ c(lt, {
846
+ /* @__PURE__ */ c(dt, {
840
847
  className: "text-left",
841
- children: /* @__PURE__ */ c(ut, {
848
+ children: /* @__PURE__ */ c(ft, {
842
849
  id: "files-new-folder-title",
843
850
  className: "text-base font-semibold text-text-primary",
844
851
  children: a(d, "files.browser.newFolderDialog.title", "New folder")
845
852
  })
846
853
  }),
847
- /* @__PURE__ */ c(at, {
854
+ /* @__PURE__ */ c(st, {
848
855
  type: "text",
849
856
  value: H,
850
857
  onChange: (e) => U(e.target.value),
851
858
  onKeyDown: (e) => {
852
- e.key === "Enter" && dn();
859
+ e.key === "Enter" && pn();
853
860
  },
854
861
  "aria-label": a(d, "files.browser.newFolderDialog.title", "New folder"),
855
862
  placeholder: a(d, "files.browser.newFolderDialog.placeholder", "Folder name")
856
863
  }),
857
- /* @__PURE__ */ l(ct, { children: [/* @__PURE__ */ c(u, {
864
+ /* @__PURE__ */ l(ut, { children: [/* @__PURE__ */ c(u, {
858
865
  type: "button",
859
866
  variant: "outline",
860
867
  onClick: () => {
@@ -863,40 +870,40 @@ function d() {
863
870
  children: a(d, "files.common.actions.cancel", "Cancel")
864
871
  }), /* @__PURE__ */ l(u, {
865
872
  type: "button",
866
- onClick: dn,
873
+ onClick: pn,
867
874
  disabled: !H.trim() || Z.isPending,
868
875
  children: [Z.isPending && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), Z.isPending ? a(d, "files.browser.newFolderDialog.actions.creating", "Creating...") : a(d, "files.common.actions.create", "Create")]
869
876
  })] })
870
877
  ]
871
878
  })
872
879
  }),
873
- jt && R && /* @__PURE__ */ c(ot, {
880
+ Nt && R && /* @__PURE__ */ c(ct, {
874
881
  open: !0,
875
882
  onOpenChange: (e) => {
876
883
  !e && !Q.isPending && !$.isPending && (M(!1), z(null), V(""));
877
884
  },
878
- children: /* @__PURE__ */ l(st, {
885
+ children: /* @__PURE__ */ l(lt, {
879
886
  className: "w-full max-w-xs",
880
887
  children: [
881
- /* @__PURE__ */ c(lt, {
888
+ /* @__PURE__ */ c(dt, {
882
889
  className: "text-left",
883
- children: /* @__PURE__ */ c(ut, {
890
+ children: /* @__PURE__ */ c(ft, {
884
891
  id: "files-rename-title",
885
892
  className: "text-base font-semibold text-text-primary",
886
893
  children: a(d, "files.browser.renameDialog.title", "Rename {{type}}", { type: R.type })
887
894
  })
888
895
  }),
889
- /* @__PURE__ */ c(at, {
896
+ /* @__PURE__ */ c(st, {
890
897
  type: "text",
891
898
  value: B,
892
899
  onChange: (e) => V(e.target.value),
893
900
  onKeyDown: (e) => {
894
- e.key === "Enter" && Fn();
901
+ e.key === "Enter" && Ln();
895
902
  },
896
903
  "aria-label": a(d, "files.browser.renameDialog.title", "Rename"),
897
904
  placeholder: a(d, "files.browser.renameDialog.placeholder", "New name")
898
905
  }),
899
- /* @__PURE__ */ l(ct, { children: [/* @__PURE__ */ c(u, {
906
+ /* @__PURE__ */ l(ut, { children: [/* @__PURE__ */ c(u, {
900
907
  type: "button",
901
908
  variant: "outline",
902
909
  onClick: () => {
@@ -905,21 +912,21 @@ function d() {
905
912
  children: a(d, "files.common.actions.cancel", "Cancel")
906
913
  }), /* @__PURE__ */ l(u, {
907
914
  type: "button",
908
- onClick: Fn,
915
+ onClick: Ln,
909
916
  disabled: !B.trim() || B.trim() === R.name || Q.isPending || $.isPending,
910
917
  children: [(Q.isPending || $.isPending) && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), Q.isPending || $.isPending ? a(d, "files.browser.renameDialog.actions.renaming", "Renaming...") : a(d, "files.common.actions.rename", "Rename")]
911
918
  })] })
912
919
  ]
913
920
  })
914
921
  }),
915
- Mt && Lt && /* @__PURE__ */ c(we, {
916
- item: Lt,
917
- itemType: "mimeType" in Lt ? "file" : "folder",
922
+ Pt && zt && /* @__PURE__ */ c(we, {
923
+ item: zt,
924
+ itemType: "mimeType" in zt ? "file" : "folder",
918
925
  onClose: () => {
919
926
  N(!1), P(null);
920
927
  },
921
- onCreateShare: hn,
922
- isLoading: Xt.isPending
928
+ onCreateShare: _n,
929
+ isLoading: Qt.isPending
923
930
  }),
924
931
  J && /* @__PURE__ */ c(Me, {
925
932
  title: J.title,
@@ -928,64 +935,64 @@ function d() {
928
935
  cancelLabel: a(d, "files.common.actions.cancel", "Cancel"),
929
936
  variant: J.variant,
930
937
  loading: J.loading,
931
- onConfirm: Vt,
938
+ onConfirm: Ut,
932
939
  onCancel: () => {
933
940
  J.loading || Y(null);
934
941
  }
935
942
  }),
936
- kt && /* @__PURE__ */ c(Me, {
943
+ jt && /* @__PURE__ */ c(Me, {
937
944
  title: a(d, "files.folder.quota.title", "Folder Limit Reached"),
938
945
  description: a(d, "files.folder.quota.description", "You've reached the folder limit for your plan. Upgrade your plan or purchase an add-on to create more folders."),
939
946
  confirmLabel: a(d, "files.folder.quota.upgrade", "View Billing"),
940
947
  cancelLabel: a(d, "files.common.actions.dismiss", "Dismiss"),
941
948
  onConfirm: () => {
942
- At(!1), p("/billing");
949
+ Mt(!1), p("/billing");
943
950
  },
944
- onCancel: () => At(!1)
951
+ onCancel: () => Mt(!1)
945
952
  }),
946
- Nt && F && /* @__PURE__ */ c(Ae, {
953
+ Ft && F && /* @__PURE__ */ c(Ae, {
947
954
  item: F.item,
948
955
  type: F.type,
949
956
  onClose: () => {
950
- Pt(!1), I(null);
957
+ It(!1), I(null);
951
958
  },
952
- onMove: Nn,
953
- isLoading: $t.isPending || en.isPending
959
+ onMove: Fn,
960
+ isLoading: tn.isPending || nn.isPending
954
961
  }),
955
- Ft && L && /* @__PURE__ */ c(je, {
962
+ Lt && L && /* @__PURE__ */ c(je, {
956
963
  item: L.item,
957
964
  type: L.type,
958
965
  onClose: () => {
959
- It(!1), Rt(null);
966
+ Rt(!1), Bt(null);
960
967
  },
961
- onCopy: Pn,
962
- isLoading: Qt.isPending
968
+ onCopy: In,
969
+ isLoading: en.isPending
963
970
  }),
964
971
  x && /* @__PURE__ */ c(Te, {
965
972
  file: x,
966
- onClose: () => Ct(null),
973
+ onClose: () => Tt(null),
967
974
  onDownload: () => {
968
975
  ze(x.downloadUrl || x.url);
969
976
  },
970
977
  onShare: v === "bin" ? void 0 : () => {
971
978
  P(x), N(!0);
972
979
  },
973
- onStar: v === "bin" ? void 0 : () => yn(x),
974
- onDelete: () => v === "bin" ? vn(x) : gn(x)
980
+ onStar: v === "bin" ? void 0 : () => xn(x),
981
+ onDelete: () => v === "bin" ? bn(x) : vn(x)
975
982
  }),
976
- xt && /* @__PURE__ */ c(Ee, {
977
- item: xt.item,
978
- type: xt.type,
979
- onClose: () => St(null)
983
+ Ct && /* @__PURE__ */ c(Ee, {
984
+ item: Ct.item,
985
+ type: Ct.type,
986
+ onClose: () => wt(null)
980
987
  }),
981
988
  /* @__PURE__ */ c(Ne, {
982
- items: zt,
983
- isOpen: Bt,
989
+ items: Vt,
990
+ isOpen: Ht,
984
991
  onClose: () => q(!1),
985
- onPause: an,
986
- onResume: on,
987
- onRetry: sn,
988
- onCancel: cn
992
+ onPause: sn,
993
+ onResume: cn,
994
+ onRetry: ln,
995
+ onCancel: un
989
996
  }),
990
997
  /* @__PURE__ */ c(Oe, {
991
998
  toasts: S.toasts,
@@ -993,34 +1000,21 @@ function d() {
993
1000
  }),
994
1001
  !D && T.length === 0 && E.length === 0 && /* @__PURE__ */ c("div", {
995
1002
  className: "px-6 py-12",
996
- children: b ? /* @__PURE__ */ l("div", {
997
- className: "text-center animate-in fade-in duration-200",
998
- children: [
999
- /* @__PURE__ */ c("div", {
1000
- className: "inline-flex items-center justify-center size-16 bg-bg-sunken rounded-full mb-4",
1001
- children: /* @__PURE__ */ c(Ye, { className: "size-8 text-text-tertiary" })
1002
- }),
1003
- /* @__PURE__ */ c("h3", {
1004
- className: "text-lg font-medium text-text-primary mb-2",
1005
- children: a(d, "files.browser.empty.search.title", "No results found")
1006
- }),
1007
- /* @__PURE__ */ c("p", {
1008
- className: "text-sm text-text-secondary mb-4",
1009
- children: a(d, "files.browser.empty.search.description", "Try adjusting your search query or filters")
1010
- }),
1011
- /* @__PURE__ */ c("button", {
1012
- type: "button",
1013
- onClick: () => {
1014
- vt(""), bt(void 0);
1015
- },
1016
- className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-inverse bg-action-primary-bg rounded-lg hover:bg-action-primary-bg-hover transition-colors duration-200",
1017
- children: a(d, "files.browser.search.clear", "Clear search")
1018
- })
1019
- ]
1003
+ children: b ? /* @__PURE__ */ c(ot, {
1004
+ illustration: "empty-search",
1005
+ title: a(d, "files.browser.empty.search.title", "No results found"),
1006
+ description: a(d, "files.browser.empty.search.description", "Try adjusting your search query or filters"),
1007
+ action: /* @__PURE__ */ c(u, {
1008
+ type: "button",
1009
+ onClick: () => {
1010
+ bt(""), St(void 0);
1011
+ },
1012
+ children: a(d, "files.browser.search.clear", "Clear search")
1013
+ })
1020
1014
  }) : /* @__PURE__ */ c(De, {
1021
1015
  type: v,
1022
- onUpload: v === "all" ? nn : void 0,
1023
- onNewFolder: v === "all" ? un : void 0
1016
+ onUpload: v === "all" ? an : void 0,
1017
+ onNewFolder: v === "all" ? fn : void 0
1024
1018
  })
1025
1019
  })
1026
1020
  ]