@burdenoff/microfe-files 2026.1111.1 → 2026.1111.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 (37) hide show
  1. package/dist/files/components/FileBrowser.js +259 -256
  2. package/dist/files/components/FileBrowser.js.map +1 -1
  3. package/dist/files/components/FileListItem.js +3 -3
  4. package/dist/files/components/FileListItem.js.map +1 -1
  5. package/dist/files/hooks/useBrowsePage.d.ts +10 -0
  6. package/dist/files/hooks/useCopyFile.d.ts +3 -0
  7. package/dist/files/hooks/useCreateFolder.d.ts +2 -0
  8. package/dist/files/hooks/useFoldersQuery.d.ts +1 -1
  9. package/dist/files/hooks/useKeyboardNavigation.js +57 -56
  10. package/dist/files/hooks/useKeyboardNavigation.js.map +1 -1
  11. package/dist/files/hooks/useMoveFile.d.ts +3 -0
  12. package/dist/files/hooks/useMoveFolder.d.ts +2 -0
  13. package/dist/files/hooks/useRenameFile.d.ts +3 -0
  14. package/dist/files/hooks/useRenameFolder.d.ts +2 -0
  15. package/dist/files/hooks/useRestoreFile.d.ts +3 -0
  16. package/dist/files/hooks/useRestoreFolder.d.ts +2 -0
  17. package/dist/files/hooks/useSharePermissions.d.ts +9 -5
  18. package/dist/files/hooks/useSharePermissions.js.map +1 -1
  19. package/dist/files/hooks/useToggleStar.d.ts +5 -0
  20. package/dist/files/hooks/useUploadFile.d.ts +3 -0
  21. package/dist/files/pages/BrowserPage.js +353 -352
  22. package/dist/files/pages/BrowserPage.js.map +1 -1
  23. package/dist/files/types.d.ts +10 -2
  24. package/dist/files/utils/fileViewModel.js +7 -2
  25. package/dist/files/utils/fileViewModel.js.map +1 -1
  26. package/dist/files/utils/itemCapabilities.d.ts +84 -0
  27. package/dist/files/utils/itemCapabilities.js +54 -0
  28. package/dist/files/utils/itemCapabilities.js.map +1 -0
  29. package/dist/files/utils/sharePermission.d.ts +10 -6
  30. package/dist/files/utils/sharePermission.js.map +1 -1
  31. package/dist/generated/global-types.d.ts +6615 -870
  32. package/dist/generated/wspace-operations.d.ts +84 -0
  33. package/dist/generated/wspace-operations.js +1259 -20
  34. package/dist/generated/wspace-operations.js.map +1 -1
  35. package/dist/generated/wspace-types.d.ts +94395 -11225
  36. package/dist/generated/wspace-types.js.map +1 -1
  37. package/package.json +2 -1
@@ -22,55 +22,56 @@ import { useCreateShare as he } from "../hooks/useCreateShare.js";
22
22
  import { useCreateFolderShare as ge } from "../hooks/useCreateFolderShare.js";
23
23
  import { useCopyFile as _e } from "../hooks/useCopyFile.js";
24
24
  import { useItemSharePermission as ve } from "../hooks/useSharePermissions.js";
25
- import { fileShareTarget as ye, shareEntryDeniedReason as be, sharePermissionMessages as xe } from "../utils/sharePermission.js";
26
- import { useMoveFile as Se } from "../hooks/useMoveFile.js";
27
- import { useMoveFolder as Ce } from "../hooks/useMoveFolder.js";
28
- import { useBulkDelete as we } from "../hooks/useBatchOperations.js";
29
- import { useSearch as Te } from "../hooks/useSearch.js";
30
- import { useToast as Ee } from "../hooks/useToast.js";
31
- import { FileBrowser as De } from "../components/FileBrowser.js";
32
- import { TabBar as Oe } from "../components/TabBar.js";
33
- import { generateThumbnail as ke } from "../utils/thumbnail.js";
34
- import { ShareDialog as Ae } from "../components/ShareDialog.js";
35
- import { FilePreviewModal as je } from "../components/FilePreviewModal.js";
36
- import { FileInfoPanel as Me } from "../components/FileInfoPanel.js";
37
- import { EmptyState as Ne } from "../components/EmptyState.js";
38
- import { ToastContainer as Pe } from "../components/Toast.js";
39
- import { SearchBar as Fe } from "../components/SearchBar.js";
40
- import { MoveDialog as Ie } from "../components/MoveDialog.js";
41
- import { CopyDialog as Le } from "../components/CopyDialog.js";
42
- import { ConfirmDialog as Re } from "../components/ConfirmDialog.js";
43
- import { UploadQueue as ze } from "../components/UploadQueue.js";
44
- import { StorageBanner as Be } from "../components/StorageBanner.js";
45
- import { useStorageQuota as Ve } from "../hooks/useStorageQuota.js";
46
- import { isQuotaExhaustedError as He } from "../utils/quotaUtils.js";
47
- import { nativeImpact as Ue, nativeNotify as We, nativeOpenUrl as Ge } from "../../utils/nativeBridge.js";
48
- import { emitFilesEvent as Ke } from "../utils/events.js";
25
+ import { fileCapabilities as ye, isShareOffered as be, shareLookupTarget as xe } from "../utils/itemCapabilities.js";
26
+ import { shareEntryDeniedReason as Se, sharePermissionMessages as Ce } from "../utils/sharePermission.js";
27
+ import { useMoveFile as we } from "../hooks/useMoveFile.js";
28
+ import { useMoveFolder as Te } from "../hooks/useMoveFolder.js";
29
+ import { useBulkDelete as Ee } from "../hooks/useBatchOperations.js";
30
+ import { useSearch as De } from "../hooks/useSearch.js";
31
+ import { useToast as Oe } from "../hooks/useToast.js";
32
+ import { FileBrowser as ke } from "../components/FileBrowser.js";
33
+ import { TabBar as Ae } from "../components/TabBar.js";
34
+ import { generateThumbnail as je } from "../utils/thumbnail.js";
35
+ import { ShareDialog as Me } from "../components/ShareDialog.js";
36
+ import { FilePreviewModal as Ne } from "../components/FilePreviewModal.js";
37
+ import { FileInfoPanel as Pe } from "../components/FileInfoPanel.js";
38
+ import { EmptyState as Fe } from "../components/EmptyState.js";
39
+ import { ToastContainer as Ie } from "../components/Toast.js";
40
+ import { SearchBar as Le } from "../components/SearchBar.js";
41
+ import { MoveDialog as Re } from "../components/MoveDialog.js";
42
+ import { CopyDialog as ze } from "../components/CopyDialog.js";
43
+ import { ConfirmDialog as Be } from "../components/ConfirmDialog.js";
44
+ import { UploadQueue as Ve } from "../components/UploadQueue.js";
45
+ import { StorageBanner as He } from "../components/StorageBanner.js";
46
+ import { useStorageQuota as Ue } from "../hooks/useStorageQuota.js";
47
+ import { isQuotaExhaustedError as We } from "../utils/quotaUtils.js";
48
+ import { nativeImpact as Ge, nativeNotify as Ke, nativeOpenUrl as qe } from "../../utils/nativeBridge.js";
49
+ import { emitFilesEvent as Je } from "../utils/events.js";
49
50
  import { tWithFallback as o } from "../utils/i18n.js";
50
51
  import "../utils/index.js";
51
- import { useEffect as qe, useMemo as Je, useState as s } from "react";
52
- import { FolderPlus as Ye, FolderUp as Xe, FolderX as Ze, Grid3x3 as Qe, Home as $e, List as et, Loader2 as c, Star as tt, Trash2 as nt, Upload as rt, X as it } from "lucide-react";
53
- import { Fragment as at, jsx as l, jsxs as u } from "react/jsx-runtime";
54
- import { useNavigate as ot, useParams as st } from "react-router";
55
- import { useI18n as ct } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
56
- import { AuroraBackground as lt, Button as d, CTAOverflowMenu as ut, EmphasisPanel as dt, GradientText as ft, IllustratedEmptyState as pt, Input as mt, NextSteps as ht, PagePurpose as gt, ResponsiveDialog as _t, ResponsiveDialogContent as vt, ResponsiveDialogFooter as yt, ResponsiveDialogHeader as bt, ResponsiveDialogTitle as xt } from "@burdenoff/fe-libs/ui";
52
+ import { useEffect as Ye, useMemo as Xe, useState as s } from "react";
53
+ import { FolderPlus as Ze, FolderUp as Qe, FolderX as $e, Grid3x3 as et, Home as tt, List as nt, Loader2 as c, Star as rt, Trash2 as it, Upload as at, X as ot } from "lucide-react";
54
+ import { Fragment as st, jsx as l, jsxs as u } from "react/jsx-runtime";
55
+ import { useNavigate as ct, useParams as lt } from "react-router";
56
+ import { useI18n as ut } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
57
+ import { AuroraBackground as dt, Button as d, CTAOverflowMenu as ft, EmphasisPanel as pt, GradientText as mt, IllustratedEmptyState as ht, Input as gt, NextSteps as _t, PagePurpose as vt, ResponsiveDialog as yt, ResponsiveDialogContent as bt, ResponsiveDialogFooter as xt, ResponsiveDialogHeader as St, ResponsiveDialogTitle as Ct } from "@burdenoff/fe-libs/ui";
57
58
  // src/files/pages/BrowserPage.tsx
58
59
  function f() {
59
- let { t: f } = ct(), { folderId: p } = st(), m = ot(), St = i(), { workspaceId: h } = St, Ct = Ve(h ?? ""), { viewMode: wt, setViewMode: Tt, breadcrumbs: Et, selectedFiles: g, selectedFolders: _, clearSelection: v } = a(), [y, Dt] = s("all"), Ot = Je(() => [
60
+ let { t: f } = ut(), { folderId: p } = lt(), m = ct(), wt = i(), { workspaceId: h } = wt, Tt = Ue(h ?? ""), { viewMode: Et, setViewMode: Dt, breadcrumbs: Ot, selectedFiles: kt, selectedFolders: g, clearSelection: _ } = a(), [v, At] = s("all"), jt = Xe(() => [
60
61
  "all",
61
62
  "recent",
62
63
  "starred",
63
64
  "bin"
64
65
  ], []);
65
- qe(() => {
66
- Ot.includes(y) || Dt("all");
67
- }, [Ot, y]);
68
- let [kt, At] = s(""), [jt, Mt] = s(), b = kt.trim().length >= 2, [Nt, Pt] = s(null), [x, Ft] = s(null), S = Ee(), C = ee({
66
+ Ye(() => {
67
+ jt.includes(v) || At("all");
68
+ }, [jt, v]);
69
+ let [y, Mt] = s(""), [Nt, Pt] = s(), b = y.trim().length >= 2, [Ft, It] = s(null), [x, Lt] = s(null), S = Oe(), C = ee({
69
70
  folderId: p || void 0,
70
71
  pageSize: 100,
71
- skip: y !== "all" || b
72
- }), w = te({ skip: y !== "recent" || b }), T = ne({ skip: y !== "starred" || b }), E = re({ skip: y !== "bin" || b }), D = Te(kt, b, jt);
73
- qe(() => {
72
+ skip: v !== "all" || b
73
+ }), w = te({ skip: v !== "recent" || b }), T = ne({ skip: v !== "starred" || b }), Rt = re({ skip: v !== "bin" || b }), E = De(y, b, Nt);
74
+ Ye(() => {
74
75
  if (p && C.data?.folderPath && C.data?.currentFolder) {
75
76
  let e = C.data.folderPath.folders || [], t = C.data.currentFolder, n = [...e.map((e) => ({
76
77
  id: e.id,
@@ -82,23 +83,23 @@ function f() {
82
83
  a.getState().setBreadcrumbs(n);
83
84
  } else a.getState().setBreadcrumbs([]);
84
85
  }, [p, C.data]);
85
- let O = [], k = [], A = !1, j = null, M = !1;
86
- if (b && D.data) O = D.data.files || [], k = D.data.folders || [], A = D.isLoading, j = D.error;
87
- else switch (y) {
86
+ let D = [], O = [], k = !1, A = null, j = !1;
87
+ if (b && E.data) D = E.data.files || [], O = E.data.folders || [], k = E.isLoading, A = E.error;
88
+ else switch (v) {
88
89
  case "all":
89
- O = C.data?.filesList?.files.map(t) || [], k = C.data?.foldersList?.folders.map(n) || [], A = C.loading, j = C.error || null, M = !1;
90
+ D = C.data?.filesList?.files.map(t) || [], O = C.data?.foldersList?.folders.map(n) || [], k = C.loading, A = C.error || null, j = !1;
90
91
  break;
91
92
  case "recent":
92
- O = w.files || [], k = w.folders || [], A = w.isLoading, j = w.error || null, M = !0;
93
+ D = w.files || [], O = w.folders || [], k = w.isLoading, A = w.error || null, j = !0;
93
94
  break;
94
95
  case "starred":
95
- O = T.files, k = T.folders, A = T.isLoading, j = T.error || null, M = !0;
96
+ D = T.files, O = T.folders, k = T.isLoading, A = T.error || null, j = !0;
96
97
  break;
97
- case "bin": O = E.files, k = E.folders, A = E.isLoading, j = E.error || null, M = !0;
98
+ case "bin": D = Rt.files, O = Rt.folders, k = Rt.isLoading, A = Rt.error || null, j = !0;
98
99
  }
99
- let It = y === "all" ? (C.data?.filesList?.total ?? O.length) + (C.data?.foldersList?.total ?? k.length) : null, N = g.size + _.size, [Lt, P] = s(!1), [Rt, zt] = s(!1), [Bt, Vt] = s(!1), [Ht, F] = s(!1), [Ut, Wt] = s(!1), [Gt, I] = s(!1), [Kt, qt] = s(!1), [Jt, Yt] = s(null), [Xt, Zt] = s(void 0), [L, R] = s(null), [z, Qt] = s(null), [B, V] = s(null), [H, U] = s(""), [W, G] = s(""), { uploading: $t, uploadQueue: en, isUploadPanelOpen: tn, setUploading: nn, setUploadQueue: K, setIsUploadPanelOpen: rn, cancelUpload: an } = e(), [q, J] = s(null), Y = (e, t) => {
100
- Ke(St, e, t);
101
- }, on = async () => {
100
+ let zt = v === "all" ? (C.data?.filesList?.total ?? D.length) + (C.data?.foldersList?.total ?? O.length) : null, M = kt.size + g.size, [Bt, N] = s(!1), [Vt, Ht] = s(!1), [Ut, Wt] = s(!1), [Gt, P] = s(!1), [Kt, qt] = s(!1), [Jt, F] = s(!1), [Yt, Xt] = s(!1), [Zt, Qt] = s(null), [$t, en] = s(void 0), [I, L] = s(null), [R, tn] = s(null), [z, B] = s(null), [V, H] = s(""), [U, W] = s(""), { uploading: G, uploadQueue: nn, isUploadPanelOpen: rn, setUploading: an, setUploadQueue: K, setIsUploadPanelOpen: on, cancelUpload: sn } = e(), [q, J] = s(null), Y = (e, t) => {
101
+ Je(wt, e, t);
102
+ }, cn = async () => {
102
103
  if (!q || q.loading) return;
103
104
  let e = q.onConfirm;
104
105
  J({
@@ -116,13 +117,13 @@ function f() {
116
117
  loading: !1
117
118
  });
118
119
  }
119
- }, X = ie(), sn = ae(), cn = oe(), ln = se(), un = ce(), dn = le(), fn = ue(), pn = de(), mn = fe(), Z = pe(), Q = me(), hn = he(), gn = ge(), _n = ve(x && y !== "bin" ? ye(x) : null), vn = _e(), yn = Se(), bn = Ce(), xn = we(), Sn = () => {
120
+ }, X = ie(), ln = ae(), un = oe(), dn = se(), fn = ce(), pn = le(), mn = ue(), hn = de(), gn = fe(), Z = pe(), Q = me(), _n = he(), vn = ge(), $ = x ? ye(x) : null, yn = ve($ && v !== "bin" ? xe($.share) : null), bn = _e(), xn = we(), Sn = Te(), Cn = Ee(), wn = () => {
120
121
  let e = document.createElement("input");
121
122
  e.type = "file", e.multiple = !0, e.onchange = async (e) => {
122
123
  let t = e.target.files;
123
124
  if (t && t.length > 0) {
124
125
  let e = await Promise.all(Array.from(t).map(async (e, t) => {
125
- let n = await ke(e);
126
+ let n = await je(e);
126
127
  return {
127
128
  id: `${Date.now()}-${t}-${e.name}`,
128
129
  file: e,
@@ -132,12 +133,12 @@ function f() {
132
133
  thumbnailUrl: n ?? void 0
133
134
  };
134
135
  }));
135
- K((t) => [...t, ...e]), rn(!0), nn(!0);
136
- for (let t of e) await $(t);
137
- nn(!1);
136
+ K((t) => [...t, ...e]), on(!0), an(!0);
137
+ for (let t of e) await Tn(t);
138
+ an(!1);
138
139
  }
139
140
  }, e.click();
140
- }, $ = async (e) => {
141
+ }, Tn = async (e) => {
141
142
  let t = (t) => {
142
143
  K((n) => n.map((n) => n.id === e.id ? {
143
144
  ...n,
@@ -146,7 +147,7 @@ function f() {
146
147
  };
147
148
  t({ status: "uploading" });
148
149
  try {
149
- let n = await sn.mutateAsync({
150
+ let n = await ln.mutateAsync({
150
151
  file: e.file,
151
152
  folderId: e.folderId,
152
153
  onProgress: (e) => {
@@ -163,10 +164,10 @@ function f() {
163
164
  });
164
165
  } catch (n) {
165
166
  let r = n instanceof Error ? n.message : o(f, "files.upload.errors.failed", "Upload failed");
166
- r === "Upload paused" ? t({ status: "paused" }) : He(n) ? (t({
167
+ r === "Upload paused" ? t({ status: "paused" }) : We(n) ? (t({
167
168
  status: "failed",
168
169
  error: o(f, "files.upload.errors.quotaExceeded", "Storage quota exceeded")
169
- }), Vt(!0)) : (t({
170
+ }), Wt(!0)) : (t({
170
171
  status: "failed",
171
172
  error: r
172
173
  }), Y("files.api.failed", {
@@ -175,23 +176,23 @@ function f() {
175
176
  message: r
176
177
  }));
177
178
  }
178
- }, Cn = (e) => {
179
- sn.pause(), K((t) => t.map((t) => t.id === e ? {
179
+ }, En = (e) => {
180
+ ln.pause(), K((t) => t.map((t) => t.id === e ? {
180
181
  ...t,
181
182
  status: "paused"
182
183
  } : t));
183
- }, wn = (e) => {
184
- let t = en.find((t) => t.id === e);
185
- t && $(t);
186
- }, Tn = (e) => {
187
- let t = en.find((t) => t.id === e);
184
+ }, Dn = (e) => {
185
+ let t = nn.find((t) => t.id === e);
186
+ t && Tn(t);
187
+ }, On = (e) => {
188
+ let t = nn.find((t) => t.id === e);
188
189
  t && (K((t) => t.map((t) => t.id === e ? {
189
190
  ...t,
190
191
  status: "pending",
191
192
  progress: 0,
192
193
  error: void 0
193
- } : t)), $(t));
194
- }, En = an, Dn = () => {
194
+ } : t)), Tn(t));
195
+ }, kn = sn, An = () => {
195
196
  if (!h) {
196
197
  S.error(o(f, "files.workspace.errors.notSelected", "Workspace not selected"));
197
198
  return;
@@ -222,7 +223,7 @@ function f() {
222
223
  for (let [t, r] of e) {
223
224
  let e = t ? n.get(t) : p || void 0;
224
225
  for (let t of r) {
225
- let n = await ke(t);
226
+ let n = await je(t);
226
227
  i.push({
227
228
  id: `${Date.now()}-${a++}-${t.name}`,
228
229
  file: t,
@@ -233,43 +234,43 @@ function f() {
233
234
  });
234
235
  }
235
236
  }
236
- K((e) => [...e, ...i]), rn(!0), nn(!0);
237
- for (let e of i) await $(e);
238
- nn(!1), S.success(o(f, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
237
+ K((e) => [...e, ...i]), on(!0), an(!0);
238
+ for (let e of i) await Tn(e);
239
+ an(!1), S.success(o(f, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
239
240
  count: i.length,
240
241
  plural: i.length > 1 ? "s" : ""
241
242
  }));
242
243
  }
243
244
  }, e.click();
244
- }, On = () => {
245
- P(!0);
246
- }, kn = async () => {
247
- if (W.trim() && h) {
245
+ }, jn = () => {
246
+ N(!0);
247
+ }, Mn = async () => {
248
+ if (U.trim() && h) {
248
249
  let { data: e, error: t } = await X.mutateAsync({
249
- name: W,
250
+ name: U,
250
251
  parentFolderId: p
251
252
  });
252
253
  if (t) {
253
- He(t) ? (P(!1), G(""), zt(!0)) : (S.error(t instanceof Error ? t.message : o(f, "files.folder.errors.createFailed", "Folder creation failed")), Y("files.api.failed", {
254
+ We(t) ? (N(!1), W(""), Ht(!0)) : (S.error(t instanceof Error ? t.message : o(f, "files.folder.errors.createFailed", "Folder creation failed")), Y("files.api.failed", {
254
255
  action: "createFolder",
255
256
  message: t instanceof Error ? t.message : "Folder creation failed"
256
257
  }));
257
258
  return;
258
259
  }
259
- e && (G(""), P(!1), Y("files.folder.created", {
260
- folderName: W,
260
+ e && (W(""), N(!1), Y("files.folder.created", {
261
+ folderName: U,
261
262
  parentFolderId: p
262
263
  }));
263
264
  }
264
- }, An = (e) => {
265
- Ft(e);
266
- }, jn = (e, t) => {
267
- Yt(e), Zt(t), Wt(!0);
268
- }, Mn = (e, t) => {
269
- jn(e, t);
270
- }, Nn = (e, t) => {
271
- jn(e, t);
272
- }, Pn = async (e) => {
265
+ }, Nn = (e) => {
266
+ Lt(e);
267
+ }, Pn = (e, t) => {
268
+ Qt(e), en(t), qt(!0);
269
+ }, Fn = (e, t) => {
270
+ Pn(e, t);
271
+ }, In = (e, t) => {
272
+ Pn(e, t);
273
+ }, Ln = async (e) => {
273
274
  if (!e.fileId && !e.folderId) throw Error(o(f, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
274
275
  let t = e.invitedEmail ? "EMAIL_INVITE" : "PUBLIC_LINK", n = "";
275
276
  if (e.fileId) {
@@ -282,7 +283,7 @@ function f() {
282
283
  shareType: t,
283
284
  accessLevel: "DOWNLOAD"
284
285
  };
285
- n = (await hn.mutateAsync(r))?.token ?? "", Y("files.share.created", {
286
+ n = (await _n.mutateAsync(r))?.token ?? "", Y("files.share.created", {
286
287
  entityType: "file",
287
288
  fileId: e.fileId,
288
289
  shareType: t
@@ -297,7 +298,7 @@ function f() {
297
298
  shareType: t,
298
299
  accessLevel: "DOWNLOAD"
299
300
  };
300
- n = (await gn.mutateAsync(r))?.token ?? "", Y("files.share.created", {
301
+ n = (await vn.mutateAsync(r))?.token ?? "", Y("files.share.created", {
301
302
  entityType: "folder",
302
303
  folderId: e.folderId,
303
304
  shareType: t
@@ -307,21 +308,21 @@ function f() {
307
308
  publicUrl: n ? `${window.location.origin}/files/share/${n}` : "",
308
309
  token: n
309
310
  };
310
- }, Fn = async (e) => {
311
- Ue("medium"), J({
311
+ }, Rn = async (e) => {
312
+ Ge("medium"), J({
312
313
  title: o(f, "files.confirm.deleteFile.title", "Delete file"),
313
314
  description: o(f, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
314
315
  confirmLabel: o(f, "files.common.actions.delete", "Delete"),
315
316
  variant: "danger",
316
317
  onConfirm: async () => {
317
318
  try {
318
- await cn.mutateAsync({ id: e.id }), We("success"), S.success(o(f, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Y("files.file.deleted", {
319
+ await un.mutateAsync({ id: e.id }), Ke("success"), S.success(o(f, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Y("files.file.deleted", {
319
320
  fileId: e.id,
320
321
  fileName: e.name,
321
322
  permanent: !1
322
323
  });
323
324
  } catch (t) {
324
- S.error(t instanceof Error ? t.message : o(f, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), We("error"), Y("files.api.failed", {
325
+ S.error(t instanceof Error ? t.message : o(f, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Ke("error"), Y("files.api.failed", {
325
326
  action: "deleteFile",
326
327
  fileId: e.id,
327
328
  message: t instanceof Error ? t.message : "Failed to delete file"
@@ -329,24 +330,24 @@ function f() {
329
330
  }
330
331
  }
331
332
  });
332
- }, In = async (e) => {
333
+ }, zn = async (e) => {
333
334
  try {
334
- await un.mutateAsync({ id: e.id }), S.success(o(f, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), Y("files.file.restored", {
335
+ await fn.mutateAsync({ id: e.id }), S.success(o(f, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), Y("files.file.restored", {
335
336
  fileId: e.id,
336
337
  fileName: e.name
337
338
  });
338
339
  } catch (e) {
339
340
  S.error(e instanceof Error ? e.message : o(f, "files.file.errors.restoreFailed", "Failed to restore file"));
340
341
  }
341
- }, Ln = async (e) => {
342
- Ue("heavy"), J({
342
+ }, Bn = async (e) => {
343
+ Ge("heavy"), J({
343
344
  title: o(f, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
344
345
  description: o(f, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
345
346
  confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
346
347
  variant: "danger",
347
348
  onConfirm: async () => {
348
349
  try {
349
- await fn.mutateAsync({ id: e.id }), S.success(o(f, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Y("files.file.deleted", {
350
+ await mn.mutateAsync({ id: e.id }), S.success(o(f, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Y("files.file.deleted", {
350
351
  fileId: e.id,
351
352
  fileName: e.name,
352
353
  permanent: !0
@@ -356,9 +357,9 @@ function f() {
356
357
  }
357
358
  }
358
359
  });
359
- }, Rn = async (e) => {
360
+ }, Vn = async (e) => {
360
361
  try {
361
- await mn.mutateAsync({
362
+ await gn.mutateAsync({
362
363
  id: e.id,
363
364
  type: "file"
364
365
  }), Y("files.file.starred", {
@@ -372,13 +373,13 @@ function f() {
372
373
  fileId: e.id
373
374
  });
374
375
  }
375
- }, zn = (e) => {
376
- V({
376
+ }, Hn = (e) => {
377
+ B({
377
378
  id: e.id,
378
379
  name: e.name,
379
380
  type: "file"
380
- }), U(e.name), F(!0);
381
- }, Bn = async (e) => {
381
+ }), H(e.name), P(!0);
382
+ }, Un = async (e) => {
382
383
  try {
383
384
  let t = e.downloadUrl || e.url;
384
385
  if (!t) throw Error(o(f, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
@@ -390,32 +391,32 @@ function f() {
390
391
  } catch (e) {
391
392
  S.error(e instanceof Error ? e.message : o(f, "files.file.errors.downloadFailed", "Failed to download file"));
392
393
  }
393
- }, Vn = (e) => {
394
- Qt({
394
+ }, Wn = (e) => {
395
+ tn({
395
396
  item: e,
396
397
  type: "file"
397
- }), qt(!0);
398
- }, Hn = (e) => {
399
- R({
398
+ }), Xt(!0);
399
+ }, Gn = (e) => {
400
+ L({
400
401
  item: e,
401
402
  type: "file"
402
- }), I(!0);
403
- }, Un = (e) => {
404
- Pt({
403
+ }), F(!0);
404
+ }, Kn = (e) => {
405
+ It({
405
406
  item: e,
406
407
  type: "file"
407
408
  });
408
- }, Wn = (e) => {
409
+ }, qn = (e) => {
409
410
  m(`/files/browse/${e.id}`);
410
- }, Gn = async (e) => {
411
- Ue("medium"), J({
411
+ }, Jn = async (e) => {
412
+ Ge("medium"), J({
412
413
  title: o(f, "files.confirm.deleteFolder.title", "Delete folder"),
413
414
  description: o(f, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
414
415
  confirmLabel: o(f, "files.common.actions.delete", "Delete"),
415
416
  variant: "danger",
416
417
  onConfirm: async () => {
417
418
  try {
418
- await ln.mutateAsync({
419
+ await dn.mutateAsync({
419
420
  id: e.id,
420
421
  recursive: !0
421
422
  }), S.success(o(f, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Y("files.folder.deleted", {
@@ -428,16 +429,16 @@ function f() {
428
429
  }
429
430
  }
430
431
  });
431
- }, Kn = async (e) => {
432
+ }, Yn = async (e) => {
432
433
  try {
433
- await dn.mutateAsync({ id: e.id }), S.success(o(f, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), Y("files.folder.restored", {
434
+ await pn.mutateAsync({ id: e.id }), S.success(o(f, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), Y("files.folder.restored", {
434
435
  folderId: e.id,
435
436
  folderName: e.name
436
437
  });
437
438
  } catch (e) {
438
439
  S.error(e instanceof Error ? e.message : o(f, "files.folder.errors.restoreFailed", "Failed to restore folder"));
439
440
  }
440
- }, qn = async (e) => {
441
+ }, Xn = async (e) => {
441
442
  J({
442
443
  title: o(f, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
443
444
  description: o(f, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
@@ -445,7 +446,7 @@ function f() {
445
446
  variant: "danger",
446
447
  onConfirm: async () => {
447
448
  try {
448
- await pn.mutateAsync({ id: e.id }), S.success(o(f, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Y("files.folder.deleted", {
449
+ await hn.mutateAsync({ id: e.id }), S.success(o(f, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Y("files.folder.deleted", {
449
450
  folderId: e.id,
450
451
  folderName: e.name,
451
452
  permanent: !0
@@ -455,20 +456,20 @@ function f() {
455
456
  }
456
457
  }
457
458
  });
458
- }, Jn = (e) => {
459
- V({
459
+ }, Zn = (e) => {
460
+ B({
460
461
  id: e.id,
461
462
  name: e.name,
462
463
  type: "folder"
463
- }), U(e.name), F(!0);
464
- }, Yn = (e) => {
465
- R({
464
+ }), H(e.name), P(!0);
465
+ }, Qn = (e) => {
466
+ L({
466
467
  item: e,
467
468
  type: "folder"
468
- }), I(!0);
469
- }, Xn = async (e) => {
469
+ }), F(!0);
470
+ }, $n = async (e) => {
470
471
  try {
471
- await mn.mutateAsync({
472
+ await gn.mutateAsync({
472
473
  id: e.id,
473
474
  type: "folder"
474
475
  }), Y("files.folder.starred", {
@@ -482,90 +483,90 @@ function f() {
482
483
  folderId: e.id
483
484
  });
484
485
  }
485
- }, Zn = (e) => {
486
- Pt({
486
+ }, er = (e) => {
487
+ It({
487
488
  item: e,
488
489
  type: "folder"
489
490
  });
490
- }, Qn = async (e) => {
491
- if (L) try {
492
- L.type === "file" ? (await yn.mutateAsync({
493
- fileId: L.item.id,
491
+ }, tr = async (e) => {
492
+ if (I) try {
493
+ I.type === "file" ? (await xn.mutateAsync({
494
+ fileId: I.item.id,
494
495
  targetFolderId: e || null
495
- }), S.success(o(f, "files.file.move.success", "\"{{name}}\" moved", { name: L.item.name })), Y("files.file.moved", {
496
- fileId: L.item.id,
497
- fileName: L.item.name,
496
+ }), S.success(o(f, "files.file.move.success", "\"{{name}}\" moved", { name: I.item.name })), Y("files.file.moved", {
497
+ fileId: I.item.id,
498
+ fileName: I.item.name,
498
499
  destinationFolderId: e
499
- })) : (await bn.mutateAsync({
500
- folderId: L.item.id,
500
+ })) : (await Sn.mutateAsync({
501
+ folderId: I.item.id,
501
502
  targetParentFolderId: e
502
- }), S.success(o(f, "files.folder.move.success", "\"{{name}}\" moved", { name: L.item.name })), Y("files.folder.moved", {
503
- folderId: L.item.id,
504
- folderName: L.item.name,
503
+ }), S.success(o(f, "files.folder.move.success", "\"{{name}}\" moved", { name: I.item.name })), Y("files.folder.moved", {
504
+ folderId: I.item.id,
505
+ folderName: I.item.name,
505
506
  destinationFolderId: e
506
- })), I(!1), R(null);
507
+ })), F(!1), L(null);
507
508
  } catch (e) {
508
- S.error(e instanceof Error ? e.message : o(f, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: L.item.name })), Y("files.api.failed", {
509
- action: L.type === "file" ? "moveFile" : "moveFolder",
510
- itemId: L.item.id,
511
- itemType: L.type,
509
+ S.error(e instanceof Error ? e.message : o(f, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: I.item.name })), Y("files.api.failed", {
510
+ action: I.type === "file" ? "moveFile" : "moveFolder",
511
+ itemId: I.item.id,
512
+ itemType: I.type,
512
513
  message: e instanceof Error ? e.message : void 0
513
514
  });
514
515
  }
515
- }, $n = async (e, t) => {
516
- if (z) try {
517
- if (z.type !== "file") throw Error(o(f, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
518
- await vn.mutateAsync({
519
- id: z.item.id,
520
- newName: t || `Copy of ${z.item.name}`,
516
+ }, nr = async (e, t) => {
517
+ if (R) try {
518
+ if (R.type !== "file") throw Error(o(f, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
519
+ await bn.mutateAsync({
520
+ id: R.item.id,
521
+ newName: t || `Copy of ${R.item.name}`,
521
522
  targetFolderId: e || void 0
522
- }), S.success(o(f, "files.file.copy.success", "\"{{name}}\" copied", { name: z.item.name })), Y("files.file.copied", {
523
- fileId: z.item.id,
524
- fileName: z.item.name,
523
+ }), S.success(o(f, "files.file.copy.success", "\"{{name}}\" copied", { name: R.item.name })), Y("files.file.copied", {
524
+ fileId: R.item.id,
525
+ fileName: R.item.name,
525
526
  destinationFolderId: e
526
- }), qt(!1), Qt(null);
527
+ }), Xt(!1), tn(null);
527
528
  } catch (e) {
528
- S.error(e instanceof Error ? e.message : o(f, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: z.item.name })), Y("files.api.failed", {
529
+ S.error(e instanceof Error ? e.message : o(f, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: R.item.name })), Y("files.api.failed", {
529
530
  action: "copyFile",
530
- fileId: z.item.id,
531
+ fileId: R.item.id,
531
532
  message: e instanceof Error ? e.message : void 0
532
533
  });
533
534
  }
534
- }, er = async () => {
535
- if (B && H.trim()) try {
536
- let e = B.name, t = H.trim();
537
- B.type === "file" ? (await Z.mutateAsync({
538
- fileId: B.id,
535
+ }, rr = async () => {
536
+ if (z && V.trim()) try {
537
+ let e = z.name, t = V.trim();
538
+ z.type === "file" ? (await Z.mutateAsync({
539
+ fileId: z.id,
539
540
  newName: t
540
541
  }), S.success(o(f, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), Y("files.file.renamed", {
541
- fileId: B.id,
542
+ fileId: z.id,
542
543
  previousName: e,
543
544
  name: t
544
545
  })) : (await Q.mutateAsync({
545
- folderId: B.id,
546
+ folderId: z.id,
546
547
  newName: t
547
548
  }), S.success(o(f, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), Y("files.folder.renamed", {
548
- folderId: B.id,
549
+ folderId: z.id,
549
550
  previousName: e,
550
551
  name: t
551
- })), F(!1), V(null), U("");
552
+ })), P(!1), B(null), H("");
552
553
  } catch (e) {
553
- S.error(e instanceof Error ? e.message : o(f, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: B.type })), Y("files.api.failed", {
554
- action: B.type === "file" ? "renameFile" : "renameFolder",
555
- itemId: B.id,
556
- itemType: B.type,
554
+ S.error(e instanceof Error ? e.message : o(f, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: z.type })), Y("files.api.failed", {
555
+ action: z.type === "file" ? "renameFile" : "renameFolder",
556
+ itemId: z.id,
557
+ itemType: z.type,
557
558
  message: e instanceof Error ? e.message : void 0
558
559
  });
559
560
  }
560
561
  };
561
562
  return r({
562
- files: O,
563
- folders: k,
564
- onFilePreview: An,
565
- onFileDelete: Fn,
566
- onFolderOpen: Wn,
567
- onFolderDelete: Gn,
568
- activeTab: y
563
+ files: D,
564
+ folders: O,
565
+ onFilePreview: Nn,
566
+ onFileDelete: Rn,
567
+ onFolderOpen: qn,
568
+ onFolderDelete: Jn,
569
+ activeTab: v
569
570
  }), h === void 0 ? /* @__PURE__ */ u("div", {
570
571
  className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
571
572
  children: [/* @__PURE__ */ l(c, { className: "size-8 animate-spin text-text-tertiary" }), /* @__PURE__ */ l("p", {
@@ -574,7 +575,7 @@ function f() {
574
575
  })]
575
576
  }) : h === "" ? /* @__PURE__ */ u("div", {
576
577
  className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
577
- children: [/* @__PURE__ */ l(Ze, { className: "size-8 text-text-tertiary" }), /* @__PURE__ */ l("p", {
578
+ children: [/* @__PURE__ */ l($e, { className: "size-8 text-text-tertiary" }), /* @__PURE__ */ l("p", {
578
579
  className: "text-sm text-text-secondary max-w-md",
579
580
  children: o(f, "files.browser.workspace.notSelected", "No workspace selected. Please select a workspace to view files.")
580
581
  })]
@@ -585,10 +586,10 @@ function f() {
585
586
  className: "relative overflow-hidden bg-bg-surface border-b border-border-seam px-4 py-3 sm:px-6 sm:py-4",
586
587
  "data-tour": "files-breadcrumb-nav",
587
588
  children: [
588
- /* @__PURE__ */ l(lt, { intensity: "subtle" }),
589
+ /* @__PURE__ */ l(dt, { intensity: "subtle" }),
589
590
  /* @__PURE__ */ l("h1", {
590
591
  className: "mb-2 text-lg font-semibold tracking-tight sm:text-xl",
591
- children: /* @__PURE__ */ l(ft, { children: o(f, "files.browser.rootLabel", "My Drive") })
592
+ children: /* @__PURE__ */ l(mt, { children: o(f, "files.browser.rootLabel", "My Drive") })
592
593
  }),
593
594
  /* @__PURE__ */ l("div", {
594
595
  className: "flex items-center gap-2 sm:gap-4",
@@ -599,11 +600,11 @@ function f() {
599
600
  onClick: () => m("/files/browse"),
600
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",
601
602
  title: o(f, "files.browser.actions.goToRoot", "Go to root"),
602
- children: [/* @__PURE__ */ l($e, { className: "size-4" }), /* @__PURE__ */ l("span", {
603
+ children: [/* @__PURE__ */ l(tt, { className: "size-4" }), /* @__PURE__ */ l("span", {
603
604
  className: "hidden sm:inline",
604
605
  children: o(f, "files.browser.rootLabel", "My Drive")
605
606
  })]
606
- }), Et.map((e, t) => /* @__PURE__ */ u("div", {
607
+ }), Ot.map((e, t) => /* @__PURE__ */ u("div", {
607
608
  className: "flex items-center gap-1 sm:gap-2",
608
609
  children: [/* @__PURE__ */ l("span", {
609
610
  className: "text-text-tertiary",
@@ -611,14 +612,14 @@ function f() {
611
612
  }), /* @__PURE__ */ l("button", {
612
613
  type: "button",
613
614
  onClick: () => m(`/files/browse/${e.id}`),
614
- className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === Et.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
615
+ className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === Ot.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
615
616
  title: `Go to ${e.name}`,
616
617
  children: e.name
617
618
  })]
618
619
  }, e.id))]
619
620
  })
620
621
  }),
621
- /* @__PURE__ */ l(gt, {
622
+ /* @__PURE__ */ l(vt, {
622
623
  className: "relative mt-2 max-w-3xl",
623
624
  children: o(f, "files.browser.purpose", "Your workspace drive: upload, organise and share documents, images, videos and more with your team. Browse folders, star what you use often, search across everything, and recover deleted items from the Bin.")
624
625
  })
@@ -626,7 +627,7 @@ function f() {
626
627
  }),
627
628
  !b && /* @__PURE__ */ l("div", {
628
629
  className: "px-4 pt-3 sm:px-6",
629
- children: /* @__PURE__ */ l(ht, {
630
+ children: /* @__PURE__ */ l(_t, {
630
631
  storageKey: "files-browser",
631
632
  title: o(f, "files.browser.nextSteps.title", "Get started with Files"),
632
633
  steps: [
@@ -634,39 +635,39 @@ function f() {
634
635
  id: "upload",
635
636
  label: o(f, "files.browser.nextSteps.upload.label", "Upload your first files"),
636
637
  description: o(f, "files.browser.nextSteps.upload.description", "Add documents, images or videos to this drive."),
637
- icon: /* @__PURE__ */ l(rt, { className: "size-4" }),
638
- onClick: Sn
638
+ icon: /* @__PURE__ */ l(at, { className: "size-4" }),
639
+ onClick: wn
639
640
  },
640
641
  {
641
642
  id: "new-folder",
642
643
  label: o(f, "files.browser.nextSteps.newFolder.label", "Create a folder to organise"),
643
644
  description: o(f, "files.browser.nextSteps.newFolder.description", "Group related files so they are easy to find later."),
644
- icon: /* @__PURE__ */ l(Ye, { className: "size-4" }),
645
- onClick: On
645
+ icon: /* @__PURE__ */ l(Ze, { className: "size-4" }),
646
+ onClick: jn
646
647
  },
647
648
  {
648
649
  id: "starred",
649
650
  label: o(f, "files.browser.nextSteps.starred.label", "Star items you use often"),
650
651
  description: o(f, "files.browser.nextSteps.starred.description", "Starred files and folders show up under the Starred tab."),
651
- icon: /* @__PURE__ */ l(tt, { className: "size-4" }),
652
- onClick: () => Dt("starred")
652
+ icon: /* @__PURE__ */ l(rt, { className: "size-4" }),
653
+ onClick: () => At("starred")
653
654
  },
654
655
  {
655
656
  id: "bin",
656
657
  label: o(f, "files.browser.nextSteps.bin.label", "Recover deleted items from the Bin"),
657
658
  description: o(f, "files.browser.nextSteps.bin.description", "Deleted files stay in the Bin so you can restore them."),
658
- icon: /* @__PURE__ */ l(nt, { className: "size-4" }),
659
- onClick: () => Dt("bin")
659
+ icon: /* @__PURE__ */ l(it, { className: "size-4" }),
660
+ onClick: () => At("bin")
660
661
  }
661
662
  ]
662
663
  })
663
664
  }),
664
665
  /* @__PURE__ */ l("div", {
665
666
  "data-tour": "files-tab-bar",
666
- children: /* @__PURE__ */ l(Oe, {
667
- activeTab: y,
668
- onTabChange: Dt,
669
- tabs: Ot
667
+ children: /* @__PURE__ */ l(Ae, {
668
+ activeTab: v,
669
+ onTabChange: At,
670
+ tabs: jt
670
671
  })
671
672
  }),
672
673
  /* @__PURE__ */ u("div", {
@@ -679,12 +680,12 @@ function f() {
679
680
  "data-tour": "files-search-bar",
680
681
  children: /* @__PURE__ */ l("div", {
681
682
  className: "relative w-full max-w-2xl",
682
- children: /* @__PURE__ */ l(Fe, {
683
+ children: /* @__PURE__ */ l(Le, {
683
684
  onSearch: (e, t) => {
684
- At(e), Mt(t);
685
+ Mt(e), Pt(t);
685
686
  },
686
687
  placeholder: o(f, "files.search.input.placeholder", "Search files and folders..."),
687
- initialQuery: kt,
688
+ initialQuery: y,
688
689
  showFilters: !0
689
690
  })
690
691
  })
@@ -696,28 +697,28 @@ function f() {
696
697
  children: [/* @__PURE__ */ u(d, {
697
698
  type: "button",
698
699
  variant: "default",
699
- onClick: Sn,
700
- disabled: $t,
701
- children: [$t ? /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }) : /* @__PURE__ */ l(rt, { className: "size-4" }), $t ? o(f, "files.browser.upload.uploading", "Uploading...") : o(f, "files.browser.actions.uploadFiles", "Upload Files")]
700
+ onClick: wn,
701
+ disabled: G,
702
+ children: [G ? /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }) : /* @__PURE__ */ l(at, { className: "size-4" }), G ? o(f, "files.browser.upload.uploading", "Uploading...") : o(f, "files.browser.actions.uploadFiles", "Upload Files")]
702
703
  }), /* @__PURE__ */ l("div", {
703
704
  "data-tour": "files-more-actions-trigger",
704
- children: /* @__PURE__ */ l(ut, { actions: [
705
+ children: /* @__PURE__ */ l(ft, { actions: [
705
706
  {
706
707
  label: o(f, "files.browser.actions.newFolder", "New Folder"),
707
- icon: /* @__PURE__ */ l(Ye, { className: "size-4" }),
708
- onSelect: On,
708
+ icon: /* @__PURE__ */ l(Ze, { className: "size-4" }),
709
+ onSelect: jn,
709
710
  dataTour: "files-new-folder-button"
710
711
  },
711
712
  {
712
713
  label: o(f, "files.browser.actions.uploadFolder", "Upload Folder"),
713
- icon: /* @__PURE__ */ l(Xe, { className: "size-4" }),
714
- onSelect: Dn,
715
- disabled: $t
714
+ icon: /* @__PURE__ */ l(Qe, { className: "size-4" }),
715
+ onSelect: An,
716
+ disabled: G
716
717
  },
717
- ...O.length > 0 || k.length > 0 ? [{
718
+ ...D.length > 0 || O.length > 0 ? [{
718
719
  label: o(f, "files.browser.actions.selectAll", "Select All"),
719
720
  onSelect: () => {
720
- let e = O.map((e) => e.id), t = k.map((e) => e.id);
721
+ let e = D.map((e) => e.id), t = O.map((e) => e.id);
721
722
  a.getState().selectAllFiles(e), t.forEach((e) => a.getState().selectFolder(e));
722
723
  }
723
724
  }] : []
@@ -728,16 +729,16 @@ function f() {
728
729
  "data-tour": "files-view-mode-toggle",
729
730
  children: [/* @__PURE__ */ l("button", {
730
731
  type: "button",
731
- onClick: () => Tt("grid"),
732
- className: `p-2 transition-colors duration-200 ${wt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
732
+ onClick: () => Dt("grid"),
733
+ className: `p-2 transition-colors duration-200 ${Et === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
733
734
  "aria-label": o(f, "files.browser.view.grid", "Grid view"),
734
- children: /* @__PURE__ */ l(Qe, { className: "size-5" })
735
+ children: /* @__PURE__ */ l(et, { className: "size-5" })
735
736
  }), /* @__PURE__ */ l("button", {
736
737
  type: "button",
737
- onClick: () => Tt("list"),
738
- className: `p-2 transition-colors duration-200 ${wt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
738
+ onClick: () => Dt("list"),
739
+ className: `p-2 transition-colors duration-200 ${Et === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
739
740
  "aria-label": o(f, "files.browser.view.list", "List view"),
740
- children: /* @__PURE__ */ l(et, { className: "size-5" })
741
+ children: /* @__PURE__ */ l(nt, { className: "size-5" })
741
742
  })]
742
743
  })]
743
744
  })]
@@ -746,31 +747,31 @@ function f() {
746
747
  className: "mt-3 flex items-center justify-between p-3 bg-status-success-bg-subtle rounded-lg border border-status-success-border transition-all duration-200",
747
748
  children: [/* @__PURE__ */ u("span", {
748
749
  className: "text-sm font-medium text-status-success-text",
749
- children: [o(f, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: kt }), D.data && ` (${(D.data.files?.length || 0) + (D.data.folders?.length || 0)} items)`]
750
+ children: [o(f, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: y }), E.data && ` (${(E.data.files?.length || 0) + (E.data.folders?.length || 0)} items)`]
750
751
  }), /* @__PURE__ */ u("button", {
751
752
  type: "button",
752
- onClick: () => At(""),
753
+ onClick: () => Mt(""),
753
754
  className: "flex items-center gap-2 text-status-success-text hover:text-status-success-text/80 text-sm font-medium transition-colors duration-200",
754
- children: [/* @__PURE__ */ l(it, { className: "size-4" }), o(f, "files.browser.search.clear", "Clear search")]
755
+ children: [/* @__PURE__ */ l(ot, { className: "size-4" }), o(f, "files.browser.search.clear", "Clear search")]
755
756
  })]
756
757
  }),
757
- N > 0 && /* @__PURE__ */ u(dt, {
758
+ M > 0 && /* @__PURE__ */ u(pt, {
758
759
  className: "mt-3 flex items-center justify-between p-3",
759
760
  children: [/* @__PURE__ */ u("div", {
760
761
  className: "flex items-center gap-4",
761
762
  children: [/* @__PURE__ */ l("span", {
762
763
  className: "text-sm font-medium text-text-primary",
763
764
  children: o(f, "files.browser.selection.selectedCount", "{{count}} item{{suffix}} selected", {
764
- count: N,
765
- suffix: N > 1 ? "s" : ""
765
+ count: M,
766
+ suffix: M > 1 ? "s" : ""
766
767
  })
767
768
  }), /* @__PURE__ */ l("div", {
768
769
  className: "flex items-center gap-2",
769
- children: y === "bin" ? /* @__PURE__ */ u(at, { children: [/* @__PURE__ */ l("button", {
770
+ children: v === "bin" ? /* @__PURE__ */ u(st, { children: [/* @__PURE__ */ l("button", {
770
771
  type: "button",
771
772
  onClick: async () => {
772
773
  try {
773
- await Promise.all([...Array.from(g).map((e) => un.mutateAsync({ id: e })), ...Array.from(_).map((e) => dn.mutateAsync({ id: e }))]), v(), S.success(`${N} item${N > 1 ? "s" : ""} restored`);
774
+ await Promise.all([...Array.from(kt).map((e) => fn.mutateAsync({ id: e })), ...Array.from(g).map((e) => pn.mutateAsync({ id: e }))]), _(), S.success(`${M} item${M > 1 ? "s" : ""} restored`);
774
775
  } catch (e) {
775
776
  S.error(e instanceof Error ? e.message : "Failed to restore some items");
776
777
  }
@@ -783,16 +784,16 @@ function f() {
783
784
  J({
784
785
  title: o(f, "files.confirm.bulkPermanentDelete.title", "Permanently delete selected items"),
785
786
  description: o(f, "files.confirm.bulkPermanentDelete.description", "Permanently delete {{count}} selected item{{plural}}? This cannot be undone.", {
786
- count: N,
787
- plural: N > 1 ? "s" : ""
787
+ count: M,
788
+ plural: M > 1 ? "s" : ""
788
789
  }),
789
790
  confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
790
791
  variant: "danger",
791
792
  onConfirm: async () => {
792
793
  try {
793
- await Promise.all([...Array.from(g).map((e) => fn.mutateAsync({ id: e })), ...Array.from(_).map((e) => pn.mutateAsync({ id: e }))]), v(), S.success(o(f, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
794
- count: N,
795
- plural: N > 1 ? "s" : ""
794
+ await Promise.all([...Array.from(kt).map((e) => mn.mutateAsync({ id: e })), ...Array.from(g).map((e) => hn.mutateAsync({ id: e }))]), _(), S.success(o(f, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
795
+ count: M,
796
+ plural: M > 1 ? "s" : ""
796
797
  }));
797
798
  } catch (e) {
798
799
  S.error(e instanceof Error ? e.message : o(f, "files.bulk.errors.permanentDeleteFailed", "Failed to permanently delete some items"));
@@ -801,27 +802,27 @@ function f() {
801
802
  });
802
803
  },
803
804
  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",
804
- children: [/* @__PURE__ */ l(nt, { className: "size-4" }), o(f, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
805
+ children: [/* @__PURE__ */ l(it, { className: "size-4" }), o(f, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
805
806
  })] }) : /* @__PURE__ */ u("button", {
806
807
  type: "button",
807
808
  onClick: async () => {
808
809
  J({
809
810
  title: o(f, "files.confirm.bulkDelete.title", "Delete selected items"),
810
811
  description: o(f, "files.confirm.bulkDelete.description", "Move {{count}} selected item{{plural}} to the bin?", {
811
- count: N,
812
- plural: N > 1 ? "s" : ""
812
+ count: M,
813
+ plural: M > 1 ? "s" : ""
813
814
  }),
814
815
  confirmLabel: o(f, "files.common.actions.delete", "Delete"),
815
816
  variant: "danger",
816
817
  onConfirm: async () => {
817
818
  try {
818
- let e = Array.from(g), t = Array.from(_);
819
- e.length > 0 && await xn.mutateAsync(e), await Promise.all(t.map((e) => ln.mutateAsync({
819
+ let e = Array.from(kt), t = Array.from(g);
820
+ e.length > 0 && await Cn.mutateAsync(e), await Promise.all(t.map((e) => dn.mutateAsync({
820
821
  id: e,
821
822
  recursive: !0
822
- }))), v(), S.success(o(f, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
823
- count: N,
824
- plural: N > 1 ? "s" : ""
823
+ }))), _(), S.success(o(f, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
824
+ count: M,
825
+ plural: M > 1 ? "s" : ""
825
826
  }));
826
827
  } catch (e) {
827
828
  S.error(e instanceof Error ? e.message : o(f, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
@@ -830,245 +831,245 @@ function f() {
830
831
  });
831
832
  },
832
833
  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",
833
- children: [/* @__PURE__ */ l(nt, { className: "size-4" }), o(f, "files.browser.selection.actions.delete", "Delete")]
834
+ children: [/* @__PURE__ */ l(it, { className: "size-4" }), o(f, "files.browser.selection.actions.delete", "Delete")]
834
835
  })
835
836
  })]
836
837
  }), /* @__PURE__ */ u("button", {
837
838
  type: "button",
838
- onClick: v,
839
+ onClick: _,
839
840
  className: "flex items-center gap-2 text-text-link hover:text-action-primary-bg-hover text-sm font-medium transition-colors duration-200",
840
- children: [/* @__PURE__ */ l(it, { className: "size-4" }), o(f, "files.common.actions.clear", "Clear")]
841
+ children: [/* @__PURE__ */ l(ot, { className: "size-4" }), o(f, "files.common.actions.clear", "Clear")]
841
842
  })]
842
843
  })
843
844
  ]
844
845
  }),
845
- (Ct.isExhausted || Ct.isNearLimit) && /* @__PURE__ */ l("div", {
846
+ (Tt.isExhausted || Tt.isNearLimit) && /* @__PURE__ */ l("div", {
846
847
  className: "px-4 sm:px-6 pt-3",
847
- children: /* @__PURE__ */ l(Be, { quota: Ct })
848
+ children: /* @__PURE__ */ l(He, { quota: Tt })
848
849
  }),
849
850
  /* @__PURE__ */ u("div", {
850
851
  className: "px-2 sm:px-4 md:px-6 py-3 sm:py-4",
851
852
  "data-tour": "files-browser-grid",
852
- children: [/* @__PURE__ */ l(De, {
853
- files: O,
854
- folders: k,
855
- loading: A,
856
- error: j,
857
- preserveSortOrder: M,
858
- onFilePreview: An,
859
- onFileShare: y === "bin" ? void 0 : Mn,
860
- onFileDelete: y === "bin" ? Ln : Fn,
861
- onFileRestore: y === "bin" ? In : void 0,
862
- onFileFavorite: y === "bin" ? void 0 : Rn,
863
- onFileRename: y === "bin" ? void 0 : zn,
864
- onFileDownload: Bn,
865
- onFileCopy: y === "bin" ? void 0 : Vn,
866
- onFileMove: y === "bin" ? void 0 : Hn,
867
- onFileInfo: Un,
868
- onFolderOpen: Wn,
869
- onFolderShare: y === "bin" ? void 0 : Nn,
870
- onFolderDelete: y === "bin" ? qn : Gn,
871
- onFolderRestore: y === "bin" ? Kn : void 0,
872
- onFolderRename: y === "bin" ? void 0 : Jn,
873
- onFolderFavorite: y === "bin" ? void 0 : Xn,
874
- onFolderMove: y === "bin" ? void 0 : Yn,
875
- onFolderInfo: Zn
876
- }), !A && (O.length > 0 || k.length > 0) && /* @__PURE__ */ u("div", {
853
+ children: [/* @__PURE__ */ l(ke, {
854
+ files: D,
855
+ folders: O,
856
+ loading: k,
857
+ error: A,
858
+ preserveSortOrder: j,
859
+ onFilePreview: Nn,
860
+ onFileShare: v === "bin" ? void 0 : Fn,
861
+ onFileDelete: v === "bin" ? Bn : Rn,
862
+ onFileRestore: v === "bin" ? zn : void 0,
863
+ onFileFavorite: v === "bin" ? void 0 : Vn,
864
+ onFileRename: v === "bin" ? void 0 : Hn,
865
+ onFileDownload: Un,
866
+ onFileCopy: v === "bin" ? void 0 : Wn,
867
+ onFileMove: v === "bin" ? void 0 : Gn,
868
+ onFileInfo: Kn,
869
+ onFolderOpen: qn,
870
+ onFolderShare: v === "bin" ? void 0 : In,
871
+ onFolderDelete: v === "bin" ? Xn : Jn,
872
+ onFolderRestore: v === "bin" ? Yn : void 0,
873
+ onFolderRename: v === "bin" ? void 0 : Zn,
874
+ onFolderFavorite: v === "bin" ? void 0 : $n,
875
+ onFolderMove: v === "bin" ? void 0 : Qn,
876
+ onFolderInfo: er
877
+ }), !k && (D.length > 0 || O.length > 0) && /* @__PURE__ */ u("div", {
877
878
  className: "mt-4 px-2 text-sm text-text-secondary",
878
- children: [o(f, "files.browser.results.showingItems", "Showing {{count}} items", { count: O.length + k.length }), !b && y === "all" && It !== null && ` ${o(f, "files.browser.results.ofItems", "of {{count}} items", { count: It })}`]
879
+ children: [o(f, "files.browser.results.showingItems", "Showing {{count}} items", { count: D.length + O.length }), !b && v === "all" && zt !== null && ` ${o(f, "files.browser.results.ofItems", "of {{count}} items", { count: zt })}`]
879
880
  })]
880
881
  }),
881
- Lt && /* @__PURE__ */ l(_t, {
882
+ Bt && /* @__PURE__ */ l(yt, {
882
883
  open: !0,
883
884
  onOpenChange: (e) => {
884
- !e && !X.isPending && (P(!1), G(""));
885
+ !e && !X.isPending && (N(!1), W(""));
885
886
  },
886
- children: /* @__PURE__ */ u(vt, {
887
+ children: /* @__PURE__ */ u(bt, {
887
888
  className: "w-full max-w-xs",
888
889
  children: [
889
- /* @__PURE__ */ l(bt, {
890
+ /* @__PURE__ */ l(St, {
890
891
  className: "text-left",
891
- children: /* @__PURE__ */ l(xt, {
892
+ children: /* @__PURE__ */ l(Ct, {
892
893
  id: "files-new-folder-title",
893
894
  className: "text-base font-semibold text-text-primary",
894
895
  children: o(f, "files.browser.newFolderDialog.title", "New folder")
895
896
  })
896
897
  }),
897
- /* @__PURE__ */ l(mt, {
898
+ /* @__PURE__ */ l(gt, {
898
899
  type: "text",
899
- value: W,
900
- onChange: (e) => G(e.target.value),
900
+ value: U,
901
+ onChange: (e) => W(e.target.value),
901
902
  onKeyDown: (e) => {
902
- e.key === "Enter" && kn();
903
+ e.key === "Enter" && Mn();
903
904
  },
904
905
  "aria-label": o(f, "files.browser.newFolderDialog.title", "New folder"),
905
906
  placeholder: o(f, "files.browser.newFolderDialog.placeholder", "Folder name")
906
907
  }),
907
- /* @__PURE__ */ u(yt, { children: [/* @__PURE__ */ l(d, {
908
+ /* @__PURE__ */ u(xt, { children: [/* @__PURE__ */ l(d, {
908
909
  type: "button",
909
910
  variant: "outline",
910
911
  onClick: () => {
911
- P(!1), G("");
912
+ N(!1), W("");
912
913
  },
913
914
  children: o(f, "files.common.actions.cancel", "Cancel")
914
915
  }), /* @__PURE__ */ u(d, {
915
916
  type: "button",
916
- onClick: kn,
917
- disabled: !W.trim() || X.isPending,
917
+ onClick: Mn,
918
+ disabled: !U.trim() || X.isPending,
918
919
  children: [X.isPending && /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }), X.isPending ? o(f, "files.browser.newFolderDialog.actions.creating", "Creating...") : o(f, "files.common.actions.create", "Create")]
919
920
  })] })
920
921
  ]
921
922
  })
922
923
  }),
923
- Ht && B && /* @__PURE__ */ l(_t, {
924
+ Gt && z && /* @__PURE__ */ l(yt, {
924
925
  open: !0,
925
926
  onOpenChange: (e) => {
926
- e || Z.isPending || Q.isPending || (F(!1), V(null), U(""));
927
+ e || Z.isPending || Q.isPending || (P(!1), B(null), H(""));
927
928
  },
928
- children: /* @__PURE__ */ u(vt, {
929
+ children: /* @__PURE__ */ u(bt, {
929
930
  className: "w-full max-w-xs",
930
931
  children: [
931
- /* @__PURE__ */ l(bt, {
932
+ /* @__PURE__ */ l(St, {
932
933
  className: "text-left",
933
- children: /* @__PURE__ */ l(xt, {
934
+ children: /* @__PURE__ */ l(Ct, {
934
935
  id: "files-rename-title",
935
936
  className: "text-base font-semibold text-text-primary",
936
- children: o(f, "files.browser.renameDialog.title", "Rename {{type}}", { type: B.type })
937
+ children: o(f, "files.browser.renameDialog.title", "Rename {{type}}", { type: z.type })
937
938
  })
938
939
  }),
939
- /* @__PURE__ */ l(mt, {
940
+ /* @__PURE__ */ l(gt, {
940
941
  type: "text",
941
- value: H,
942
- onChange: (e) => U(e.target.value),
942
+ value: V,
943
+ onChange: (e) => H(e.target.value),
943
944
  onKeyDown: (e) => {
944
- e.key === "Enter" && er();
945
+ e.key === "Enter" && rr();
945
946
  },
946
947
  "aria-label": o(f, "files.browser.renameDialog.title", "Rename"),
947
948
  placeholder: o(f, "files.browser.renameDialog.placeholder", "New name")
948
949
  }),
949
- /* @__PURE__ */ u(yt, { children: [/* @__PURE__ */ l(d, {
950
+ /* @__PURE__ */ u(xt, { children: [/* @__PURE__ */ l(d, {
950
951
  type: "button",
951
952
  variant: "outline",
952
953
  onClick: () => {
953
- F(!1), V(null), U("");
954
+ P(!1), B(null), H("");
954
955
  },
955
956
  children: o(f, "files.common.actions.cancel", "Cancel")
956
957
  }), /* @__PURE__ */ u(d, {
957
958
  type: "button",
958
- onClick: er,
959
- disabled: !H.trim() || H.trim() === B.name || Z.isPending || Q.isPending,
959
+ onClick: rr,
960
+ disabled: !V.trim() || V.trim() === z.name || Z.isPending || Q.isPending,
960
961
  children: [(Z.isPending || Q.isPending) && /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }), Z.isPending || Q.isPending ? o(f, "files.browser.renameDialog.actions.renaming", "Renaming...") : o(f, "files.common.actions.rename", "Rename")]
961
962
  })] })
962
963
  ]
963
964
  })
964
965
  }),
965
- Ut && Jt && /* @__PURE__ */ l(Ae, {
966
- item: Jt,
967
- itemType: "mimeType" in Jt ? "file" : "folder",
966
+ Kt && Zt && /* @__PURE__ */ l(Me, {
967
+ item: Zt,
968
+ itemType: "mimeType" in Zt ? "file" : "folder",
968
969
  onClose: () => {
969
- Wt(!1), Yt(null);
970
+ qt(!1), Qt(null);
970
971
  },
971
- onCreateShare: Pn,
972
- knownPermission: Xt,
973
- isLoading: hn.isPending || gn.isPending
972
+ onCreateShare: Ln,
973
+ knownPermission: $t,
974
+ isLoading: _n.isPending || vn.isPending
974
975
  }),
975
- q && /* @__PURE__ */ l(Re, {
976
+ q && /* @__PURE__ */ l(Be, {
976
977
  title: q.title,
977
978
  description: q.description,
978
979
  confirmLabel: q.confirmLabel,
979
980
  cancelLabel: o(f, "files.common.actions.cancel", "Cancel"),
980
981
  variant: q.variant,
981
982
  loading: q.loading,
982
- onConfirm: on,
983
+ onConfirm: cn,
983
984
  onCancel: () => {
984
985
  q.loading || J(null);
985
986
  }
986
987
  }),
987
- Rt && /* @__PURE__ */ l(Re, {
988
+ Vt && /* @__PURE__ */ l(Be, {
988
989
  title: o(f, "files.folder.quota.title", "Folder Limit Reached"),
989
990
  description: o(f, "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."),
990
991
  confirmLabel: o(f, "files.folder.quota.upgrade", "View Billing"),
991
992
  cancelLabel: o(f, "files.common.actions.dismiss", "Dismiss"),
992
993
  onConfirm: () => {
993
- zt(!1), m("/billing");
994
+ Ht(!1), m("/billing");
994
995
  },
995
- onCancel: () => zt(!1)
996
+ onCancel: () => Ht(!1)
996
997
  }),
997
- Bt && /* @__PURE__ */ l(Re, {
998
+ Ut && /* @__PURE__ */ l(Be, {
998
999
  title: o(f, "files.storage.quota.title", "Storage Limit Reached"),
999
1000
  description: o(f, "files.storage.quota.description", "You've reached the storage limit for your plan. Upgrade your plan or delete files to continue uploading."),
1000
1001
  confirmLabel: o(f, "files.storage.quota.upgrade", "View Billing"),
1001
1002
  cancelLabel: o(f, "files.common.actions.dismiss", "Dismiss"),
1002
1003
  onConfirm: () => {
1003
- Vt(!1), m("/billing");
1004
+ Wt(!1), m("/billing");
1004
1005
  },
1005
- onCancel: () => Vt(!1)
1006
+ onCancel: () => Wt(!1)
1006
1007
  }),
1007
- Gt && L && /* @__PURE__ */ l(Ie, {
1008
- item: L.item,
1009
- type: L.type,
1008
+ Jt && I && /* @__PURE__ */ l(Re, {
1009
+ item: I.item,
1010
+ type: I.type,
1010
1011
  onClose: () => {
1011
- I(!1), R(null);
1012
+ F(!1), L(null);
1012
1013
  },
1013
- onMove: Qn,
1014
- isLoading: yn.isPending || bn.isPending
1014
+ onMove: tr,
1015
+ isLoading: xn.isPending || Sn.isPending
1015
1016
  }),
1016
- Kt && z && /* @__PURE__ */ l(Le, {
1017
- item: z.item,
1018
- type: z.type,
1017
+ Yt && R && /* @__PURE__ */ l(ze, {
1018
+ item: R.item,
1019
+ type: R.type,
1019
1020
  onClose: () => {
1020
- qt(!1), Qt(null);
1021
+ Xt(!1), tn(null);
1021
1022
  },
1022
- onCopy: $n,
1023
- isLoading: vn.isPending
1023
+ onCopy: nr,
1024
+ isLoading: bn.isPending
1024
1025
  }),
1025
- x && /* @__PURE__ */ l(je, {
1026
+ x && /* @__PURE__ */ l(Ne, {
1026
1027
  file: x,
1027
- onClose: () => Ft(null),
1028
+ onClose: () => Lt(null),
1028
1029
  onDownload: () => {
1029
1030
  let e = x.downloadUrl || x.url;
1030
- e && Ge(e);
1031
+ e && qe(e);
1031
1032
  },
1032
- onShare: y === "bin" ? void 0 : () => jn(x, _n === "denied" ? "denied" : void 0),
1033
- shareDeniedReason: y === "bin" ? void 0 : be(_n, xe(f)),
1034
- onStar: y === "bin" ? void 0 : () => Rn(x),
1035
- onDelete: () => y === "bin" ? Ln(x) : Fn(x)
1033
+ onShare: v === "bin" || !$ || !be($.share) ? void 0 : () => Pn(x, yn === "denied" ? "denied" : void 0),
1034
+ shareDeniedReason: v === "bin" ? void 0 : Se(yn, Ce(f)),
1035
+ onStar: v === "bin" || !$?.canUpdate ? void 0 : () => Vn(x),
1036
+ onDelete: v === "bin" ? () => Bn(x) : $?.canDelete ? () => Rn(x) : void 0
1036
1037
  }),
1037
- Nt && /* @__PURE__ */ l(Me, {
1038
- item: Nt.item,
1039
- type: Nt.type,
1040
- onClose: () => Pt(null)
1038
+ Ft && /* @__PURE__ */ l(Pe, {
1039
+ item: Ft.item,
1040
+ type: Ft.type,
1041
+ onClose: () => It(null)
1041
1042
  }),
1042
- /* @__PURE__ */ l(ze, {
1043
- items: en,
1044
- isOpen: tn,
1045
- onClose: () => rn(!1),
1046
- onPause: Cn,
1047
- onResume: wn,
1048
- onRetry: Tn,
1049
- onCancel: En
1043
+ /* @__PURE__ */ l(Ve, {
1044
+ items: nn,
1045
+ isOpen: rn,
1046
+ onClose: () => on(!1),
1047
+ onPause: En,
1048
+ onResume: Dn,
1049
+ onRetry: On,
1050
+ onCancel: kn
1050
1051
  }),
1051
- /* @__PURE__ */ l(Pe, {
1052
+ /* @__PURE__ */ l(Ie, {
1052
1053
  toasts: S.toasts,
1053
1054
  onClose: S.removeToast
1054
1055
  }),
1055
- !A && O.length === 0 && k.length === 0 && /* @__PURE__ */ l("div", {
1056
+ !k && D.length === 0 && O.length === 0 && /* @__PURE__ */ l("div", {
1056
1057
  className: "px-6 py-12",
1057
- children: b ? /* @__PURE__ */ l(pt, {
1058
+ children: b ? /* @__PURE__ */ l(ht, {
1058
1059
  illustration: "empty-search",
1059
1060
  title: o(f, "files.browser.empty.search.title", "No results found"),
1060
1061
  description: o(f, "files.browser.empty.search.description", "Try adjusting your search query or filters"),
1061
1062
  action: /* @__PURE__ */ l(d, {
1062
1063
  type: "button",
1063
1064
  onClick: () => {
1064
- At(""), Mt(void 0);
1065
+ Mt(""), Pt(void 0);
1065
1066
  },
1066
1067
  children: o(f, "files.browser.search.clear", "Clear search")
1067
1068
  })
1068
- }) : /* @__PURE__ */ l(Ne, {
1069
- type: y,
1070
- onUpload: y === "all" ? Sn : void 0,
1071
- onNewFolder: y === "all" ? On : void 0
1069
+ }) : /* @__PURE__ */ l(Fe, {
1070
+ type: v,
1071
+ onUpload: v === "all" ? wn : void 0,
1072
+ onNewFolder: v === "all" ? jn : void 0
1072
1073
  })
1073
1074
  })
1074
1075
  ]