@burdenoff/microfe-files 2026.510.101

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 (289) hide show
  1. package/README.md +12 -0
  2. package/dist/config/index.d.ts +33 -0
  3. package/dist/config/index.d.ts.map +1 -0
  4. package/dist/config/index.js +28 -0
  5. package/dist/config/index.js.map +1 -0
  6. package/dist/dev/main.d.ts +1 -0
  7. package/dist/dev/main.d.ts.map +1 -0
  8. package/dist/files/FilesRoot.d.ts +31 -0
  9. package/dist/files/FilesRoot.d.ts.map +1 -0
  10. package/dist/files/FilesRoot.js +63 -0
  11. package/dist/files/FilesRoot.js.map +1 -0
  12. package/dist/files/FilesRoutes.d.ts +12 -0
  13. package/dist/files/FilesRoutes.d.ts.map +1 -0
  14. package/dist/files/FilesRoutes.js +45 -0
  15. package/dist/files/FilesRoutes.js.map +1 -0
  16. package/dist/files/components/ActionMenu.d.ts +19 -0
  17. package/dist/files/components/ActionMenu.d.ts.map +1 -0
  18. package/dist/files/components/ActionMenu.js +73 -0
  19. package/dist/files/components/ActionMenu.js.map +1 -0
  20. package/dist/files/components/ConfirmDialog.d.ts +14 -0
  21. package/dist/files/components/ConfirmDialog.d.ts.map +1 -0
  22. package/dist/files/components/ConfirmDialog.js +85 -0
  23. package/dist/files/components/ConfirmDialog.js.map +1 -0
  24. package/dist/files/components/ContextMenu.d.ts +59 -0
  25. package/dist/files/components/ContextMenu.d.ts.map +1 -0
  26. package/dist/files/components/ContextMenu.js +136 -0
  27. package/dist/files/components/ContextMenu.js.map +1 -0
  28. package/dist/files/components/CopyDialog.d.ts +12 -0
  29. package/dist/files/components/CopyDialog.d.ts.map +1 -0
  30. package/dist/files/components/CopyDialog.js +139 -0
  31. package/dist/files/components/CopyDialog.js.map +1 -0
  32. package/dist/files/components/EmptyState.d.ts +8 -0
  33. package/dist/files/components/EmptyState.d.ts.map +1 -0
  34. package/dist/files/components/EmptyState.js +66 -0
  35. package/dist/files/components/EmptyState.js.map +1 -0
  36. package/dist/files/components/FileBrowser.d.ts +37 -0
  37. package/dist/files/components/FileBrowser.d.ts.map +1 -0
  38. package/dist/files/components/FileBrowser.js +421 -0
  39. package/dist/files/components/FileBrowser.js.map +1 -0
  40. package/dist/files/components/FileCard.d.ts +30 -0
  41. package/dist/files/components/FileCard.d.ts.map +1 -0
  42. package/dist/files/components/FileCard.js +233 -0
  43. package/dist/files/components/FileCard.js.map +1 -0
  44. package/dist/files/components/FileInfoPanel.d.ts +9 -0
  45. package/dist/files/components/FileInfoPanel.d.ts.map +1 -0
  46. package/dist/files/components/FileInfoPanel.js +224 -0
  47. package/dist/files/components/FileInfoPanel.js.map +1 -0
  48. package/dist/files/components/FileListItem.d.ts +46 -0
  49. package/dist/files/components/FileListItem.d.ts.map +1 -0
  50. package/dist/files/components/FileListItem.js +235 -0
  51. package/dist/files/components/FileListItem.js.map +1 -0
  52. package/dist/files/components/FilePreviewModal.d.ts +17 -0
  53. package/dist/files/components/FilePreviewModal.d.ts.map +1 -0
  54. package/dist/files/components/FilePreviewModal.js +175 -0
  55. package/dist/files/components/FilePreviewModal.js.map +1 -0
  56. package/dist/files/components/FileVersionPanel.d.ts +9 -0
  57. package/dist/files/components/FileVersionPanel.d.ts.map +1 -0
  58. package/dist/files/components/FileVersionPanel.js +227 -0
  59. package/dist/files/components/FileVersionPanel.js.map +1 -0
  60. package/dist/files/components/FolderCard.d.ts +34 -0
  61. package/dist/files/components/FolderCard.d.ts.map +1 -0
  62. package/dist/files/components/FolderCard.js +225 -0
  63. package/dist/files/components/FolderCard.js.map +1 -0
  64. package/dist/files/components/MoveDialog.d.ts +12 -0
  65. package/dist/files/components/MoveDialog.d.ts.map +1 -0
  66. package/dist/files/components/MoveDialog.js +123 -0
  67. package/dist/files/components/MoveDialog.js.map +1 -0
  68. package/dist/files/components/SearchBar.d.ts +13 -0
  69. package/dist/files/components/SearchBar.d.ts.map +1 -0
  70. package/dist/files/components/SearchBar.js +257 -0
  71. package/dist/files/components/SearchBar.js.map +1 -0
  72. package/dist/files/components/ShareDialog.d.ts +24 -0
  73. package/dist/files/components/ShareDialog.d.ts.map +1 -0
  74. package/dist/files/components/ShareDialog.js +201 -0
  75. package/dist/files/components/ShareDialog.js.map +1 -0
  76. package/dist/files/components/TabBar.d.ts +14 -0
  77. package/dist/files/components/TabBar.d.ts.map +1 -0
  78. package/dist/files/components/TabBar.js +65 -0
  79. package/dist/files/components/TabBar.js.map +1 -0
  80. package/dist/files/components/Toast.d.ts +14 -0
  81. package/dist/files/components/Toast.d.ts.map +1 -0
  82. package/dist/files/components/Toast.js +51 -0
  83. package/dist/files/components/Toast.js.map +1 -0
  84. package/dist/files/components/UploadQueue.d.ts +21 -0
  85. package/dist/files/components/UploadQueue.d.ts.map +1 -0
  86. package/dist/files/components/UploadQueue.js +171 -0
  87. package/dist/files/components/UploadQueue.js.map +1 -0
  88. package/dist/files/components/index.d.ts +43 -0
  89. package/dist/files/components/index.d.ts.map +1 -0
  90. package/dist/files/components/viewers/AudioPlayer.d.ts +8 -0
  91. package/dist/files/components/viewers/AudioPlayer.d.ts.map +1 -0
  92. package/dist/files/components/viewers/AudioPlayer.js +102 -0
  93. package/dist/files/components/viewers/AudioPlayer.js.map +1 -0
  94. package/dist/files/components/viewers/CodeViewer.d.ts +16 -0
  95. package/dist/files/components/viewers/CodeViewer.d.ts.map +1 -0
  96. package/dist/files/components/viewers/CodeViewer.js +113 -0
  97. package/dist/files/components/viewers/CodeViewer.js.map +1 -0
  98. package/dist/files/components/viewers/ImageViewer.d.ts +8 -0
  99. package/dist/files/components/viewers/ImageViewer.d.ts.map +1 -0
  100. package/dist/files/components/viewers/ImageViewer.js +138 -0
  101. package/dist/files/components/viewers/ImageViewer.js.map +1 -0
  102. package/dist/files/components/viewers/PDFViewer.d.ts +15 -0
  103. package/dist/files/components/viewers/PDFViewer.d.ts.map +1 -0
  104. package/dist/files/components/viewers/PDFViewer.js +80 -0
  105. package/dist/files/components/viewers/PDFViewer.js.map +1 -0
  106. package/dist/files/components/viewers/TextViewer.d.ts +8 -0
  107. package/dist/files/components/viewers/TextViewer.d.ts.map +1 -0
  108. package/dist/files/components/viewers/TextViewer.js +121 -0
  109. package/dist/files/components/viewers/TextViewer.js.map +1 -0
  110. package/dist/files/components/viewers/VideoPlayer.d.ts +8 -0
  111. package/dist/files/components/viewers/VideoPlayer.d.ts.map +1 -0
  112. package/dist/files/components/viewers/VideoPlayer.js +138 -0
  113. package/dist/files/components/viewers/VideoPlayer.js.map +1 -0
  114. package/dist/files/components/viewers/index.d.ts +7 -0
  115. package/dist/files/components/viewers/index.d.ts.map +1 -0
  116. package/dist/files/components/viewers/index.js +6 -0
  117. package/dist/files/graphql-types.d.ts +317 -0
  118. package/dist/files/graphql-types.d.ts.map +1 -0
  119. package/dist/files/hooks/useBatchOperations.d.ts +32 -0
  120. package/dist/files/hooks/useBatchOperations.d.ts.map +1 -0
  121. package/dist/files/hooks/useBatchOperations.js +18 -0
  122. package/dist/files/hooks/useBatchOperations.js.map +1 -0
  123. package/dist/files/hooks/useBinItems.d.ts +11 -0
  124. package/dist/files/hooks/useBinItems.d.ts.map +1 -0
  125. package/dist/files/hooks/useBinItems.js +27 -0
  126. package/dist/files/hooks/useBinItems.js.map +1 -0
  127. package/dist/files/hooks/useBrowsePage.d.ts +18 -0
  128. package/dist/files/hooks/useBrowsePage.d.ts.map +1 -0
  129. package/dist/files/hooks/useBrowsePage.js +34 -0
  130. package/dist/files/hooks/useBrowsePage.js.map +1 -0
  131. package/dist/files/hooks/useCopyFile.d.ts +14 -0
  132. package/dist/files/hooks/useCopyFile.d.ts.map +1 -0
  133. package/dist/files/hooks/useCopyFile.js +22 -0
  134. package/dist/files/hooks/useCopyFile.js.map +1 -0
  135. package/dist/files/hooks/useCreateFolder.d.ts +14 -0
  136. package/dist/files/hooks/useCreateFolder.d.ts.map +1 -0
  137. package/dist/files/hooks/useCreateFolder.js +14 -0
  138. package/dist/files/hooks/useCreateFolder.js.map +1 -0
  139. package/dist/files/hooks/useCreateFolderShare.d.ts +16 -0
  140. package/dist/files/hooks/useCreateFolderShare.d.ts.map +1 -0
  141. package/dist/files/hooks/useCreateFolderShare.js +14 -0
  142. package/dist/files/hooks/useCreateFolderShare.js.map +1 -0
  143. package/dist/files/hooks/useCreateShare.d.ts +16 -0
  144. package/dist/files/hooks/useCreateShare.d.ts.map +1 -0
  145. package/dist/files/hooks/useCreateShare.js +14 -0
  146. package/dist/files/hooks/useCreateShare.js.map +1 -0
  147. package/dist/files/hooks/useDeleteFile.d.ts +9 -0
  148. package/dist/files/hooks/useDeleteFile.d.ts.map +1 -0
  149. package/dist/files/hooks/useDeleteFile.js +20 -0
  150. package/dist/files/hooks/useDeleteFile.js.map +1 -0
  151. package/dist/files/hooks/useDeleteFolder.d.ts +10 -0
  152. package/dist/files/hooks/useDeleteFolder.d.ts.map +1 -0
  153. package/dist/files/hooks/useDeleteFolder.js +24 -0
  154. package/dist/files/hooks/useDeleteFolder.js.map +1 -0
  155. package/dist/files/hooks/useDragDrop.d.ts +31 -0
  156. package/dist/files/hooks/useDragDrop.d.ts.map +1 -0
  157. package/dist/files/hooks/useDragDrop.js +45 -0
  158. package/dist/files/hooks/useDragDrop.js.map +1 -0
  159. package/dist/files/hooks/useFileVersions.d.ts +52 -0
  160. package/dist/files/hooks/useFileVersions.d.ts.map +1 -0
  161. package/dist/files/hooks/useFileVersions.js +52 -0
  162. package/dist/files/hooks/useFileVersions.js.map +1 -0
  163. package/dist/files/hooks/useFiles.d.ts +18 -0
  164. package/dist/files/hooks/useFiles.d.ts.map +1 -0
  165. package/dist/files/hooks/useFolder.d.ts +7 -0
  166. package/dist/files/hooks/useFolder.d.ts.map +1 -0
  167. package/dist/files/hooks/useFolderPath.d.ts +2 -0
  168. package/dist/files/hooks/useFolderPath.d.ts.map +1 -0
  169. package/dist/files/hooks/useFoldersQuery.d.ts +7 -0
  170. package/dist/files/hooks/useFoldersQuery.d.ts.map +1 -0
  171. package/dist/files/hooks/useFoldersQuery.js +13 -0
  172. package/dist/files/hooks/useFoldersQuery.js.map +1 -0
  173. package/dist/files/hooks/useKeyboardNavigation.d.ts +17 -0
  174. package/dist/files/hooks/useKeyboardNavigation.d.ts.map +1 -0
  175. package/dist/files/hooks/useKeyboardNavigation.js +105 -0
  176. package/dist/files/hooks/useKeyboardNavigation.js.map +1 -0
  177. package/dist/files/hooks/useMoveFile.d.ts +10 -0
  178. package/dist/files/hooks/useMoveFile.d.ts.map +1 -0
  179. package/dist/files/hooks/useMoveFile.js +21 -0
  180. package/dist/files/hooks/useMoveFile.js.map +1 -0
  181. package/dist/files/hooks/useMoveFolder.d.ts +10 -0
  182. package/dist/files/hooks/useMoveFolder.d.ts.map +1 -0
  183. package/dist/files/hooks/useMoveFolder.js +21 -0
  184. package/dist/files/hooks/useMoveFolder.js.map +1 -0
  185. package/dist/files/hooks/usePermanentlyDeleteFile.d.ts +9 -0
  186. package/dist/files/hooks/usePermanentlyDeleteFile.d.ts.map +1 -0
  187. package/dist/files/hooks/usePermanentlyDeleteFile.js +18 -0
  188. package/dist/files/hooks/usePermanentlyDeleteFile.js.map +1 -0
  189. package/dist/files/hooks/usePermanentlyDeleteFolder.d.ts +9 -0
  190. package/dist/files/hooks/usePermanentlyDeleteFolder.d.ts.map +1 -0
  191. package/dist/files/hooks/usePermanentlyDeleteFolder.js +18 -0
  192. package/dist/files/hooks/usePermanentlyDeleteFolder.js.map +1 -0
  193. package/dist/files/hooks/useRecentFiles.d.ts +10 -0
  194. package/dist/files/hooks/useRecentFiles.d.ts.map +1 -0
  195. package/dist/files/hooks/useRecentFiles.js +24 -0
  196. package/dist/files/hooks/useRecentFiles.js.map +1 -0
  197. package/dist/files/hooks/useRenameFile.d.ts +10 -0
  198. package/dist/files/hooks/useRenameFile.d.ts.map +1 -0
  199. package/dist/files/hooks/useRenameFile.js +21 -0
  200. package/dist/files/hooks/useRenameFile.js.map +1 -0
  201. package/dist/files/hooks/useRenameFolder.d.ts +10 -0
  202. package/dist/files/hooks/useRenameFolder.d.ts.map +1 -0
  203. package/dist/files/hooks/useRenameFolder.js +21 -0
  204. package/dist/files/hooks/useRenameFolder.js.map +1 -0
  205. package/dist/files/hooks/useRestoreFile.d.ts +9 -0
  206. package/dist/files/hooks/useRestoreFile.d.ts.map +1 -0
  207. package/dist/files/hooks/useRestoreFile.js +21 -0
  208. package/dist/files/hooks/useRestoreFile.js.map +1 -0
  209. package/dist/files/hooks/useRestoreFolder.d.ts +9 -0
  210. package/dist/files/hooks/useRestoreFolder.d.ts.map +1 -0
  211. package/dist/files/hooks/useRestoreFolder.js +21 -0
  212. package/dist/files/hooks/useRestoreFolder.js.map +1 -0
  213. package/dist/files/hooks/useSearch.d.ts +15 -0
  214. package/dist/files/hooks/useSearch.d.ts.map +1 -0
  215. package/dist/files/hooks/useSearch.js +27 -0
  216. package/dist/files/hooks/useSearch.js.map +1 -0
  217. package/dist/files/hooks/useStarredItems.d.ts +10 -0
  218. package/dist/files/hooks/useStarredItems.d.ts.map +1 -0
  219. package/dist/files/hooks/useStarredItems.js +18 -0
  220. package/dist/files/hooks/useStarredItems.js.map +1 -0
  221. package/dist/files/hooks/useToast.d.ts +11 -0
  222. package/dist/files/hooks/useToast.d.ts.map +1 -0
  223. package/dist/files/hooks/useToast.js +28 -0
  224. package/dist/files/hooks/useToast.js.map +1 -0
  225. package/dist/files/hooks/useToggleStar.d.ts +10 -0
  226. package/dist/files/hooks/useToggleStar.d.ts.map +1 -0
  227. package/dist/files/hooks/useToggleStar.js +26 -0
  228. package/dist/files/hooks/useToggleStar.js.map +1 -0
  229. package/dist/files/hooks/useUploadFile.d.ts +25 -0
  230. package/dist/files/hooks/useUploadFile.d.ts.map +1 -0
  231. package/dist/files/hooks/useUploadFile.js +74 -0
  232. package/dist/files/hooks/useUploadFile.js.map +1 -0
  233. package/dist/files/index.d.ts +29 -0
  234. package/dist/files/index.d.ts.map +1 -0
  235. package/dist/files/index.js +3 -0
  236. package/dist/files/pages/BrowserPage.d.ts +5 -0
  237. package/dist/files/pages/BrowserPage.d.ts.map +1 -0
  238. package/dist/files/pages/BrowserPage.js +1014 -0
  239. package/dist/files/pages/BrowserPage.js.map +1 -0
  240. package/dist/files/pages/ShareAccessPage.d.ts +2 -0
  241. package/dist/files/pages/ShareAccessPage.d.ts.map +1 -0
  242. package/dist/files/pages/ShareAccessPage.js +162 -0
  243. package/dist/files/pages/ShareAccessPage.js.map +1 -0
  244. package/dist/files/providers/FilesProvider.d.ts +25 -0
  245. package/dist/files/providers/FilesProvider.d.ts.map +1 -0
  246. package/dist/files/providers/FilesProvider.js +18 -0
  247. package/dist/files/providers/FilesProvider.js.map +1 -0
  248. package/dist/files/store/filesStore.d.ts +99 -0
  249. package/dist/files/store/filesStore.d.ts.map +1 -0
  250. package/dist/files/store/filesStore.js +129 -0
  251. package/dist/files/store/filesStore.js.map +1 -0
  252. package/dist/files/types.d.ts +266 -0
  253. package/dist/files/types.d.ts.map +1 -0
  254. package/dist/files/utils/events.d.ts +6 -0
  255. package/dist/files/utils/events.d.ts.map +1 -0
  256. package/dist/files/utils/events.js +16 -0
  257. package/dist/files/utils/events.js.map +1 -0
  258. package/dist/files/utils/i18n.d.ts +5 -0
  259. package/dist/files/utils/i18n.d.ts.map +1 -0
  260. package/dist/files/utils/i18n.js +15 -0
  261. package/dist/files/utils/i18n.js.map +1 -0
  262. package/dist/files/utils/index.d.ts +74 -0
  263. package/dist/files/utils/index.d.ts.map +1 -0
  264. package/dist/files/utils/index.js +50 -0
  265. package/dist/files/utils/index.js.map +1 -0
  266. package/dist/files/utils/thumbnail.d.ts +5 -0
  267. package/dist/files/utils/thumbnail.d.ts.map +1 -0
  268. package/dist/files/utils/thumbnail.js +39 -0
  269. package/dist/files/utils/thumbnail.js.map +1 -0
  270. package/dist/files.d.ts +2 -0
  271. package/dist/files.js +6 -0
  272. package/dist/generated/global-operations.d.ts +2 -0
  273. package/dist/generated/global-operations.d.ts.map +1 -0
  274. package/dist/generated/global-types.d.ts +21253 -0
  275. package/dist/generated/global-types.d.ts.map +1 -0
  276. package/dist/generated/wspace-operations.d.ts +2706 -0
  277. package/dist/generated/wspace-operations.d.ts.map +1 -0
  278. package/dist/generated/wspace-operations.js +1085 -0
  279. package/dist/generated/wspace-operations.js.map +1 -0
  280. package/dist/generated/wspace-types.d.ts +55214 -0
  281. package/dist/generated/wspace-types.d.ts.map +1 -0
  282. package/dist/index.d.ts +30 -0
  283. package/dist/index.d.ts.map +1 -0
  284. package/dist/shared/types/index.d.ts +101 -0
  285. package/dist/shared/types/index.d.ts.map +1 -0
  286. package/dist/utils/nativeBridge.d.ts +3 -0
  287. package/dist/utils/nativeBridge.d.ts.map +1 -0
  288. package/dist/utils/nativeBridge.js +2 -0
  289. package/package.json +126 -0
@@ -0,0 +1,1014 @@
1
+ import { useFilesContext as e } from "../providers/FilesProvider.js";
2
+ import { useFilesStore as t } from "../store/filesStore.js";
3
+ import { useKeyboardNavigation as n } from "../hooks/useKeyboardNavigation.js";
4
+ import { useBrowsePage as r } from "../hooks/useBrowsePage.js";
5
+ import { useRecentFiles as i } from "../hooks/useRecentFiles.js";
6
+ import { useStarredItems as ee } from "../hooks/useStarredItems.js";
7
+ import { useBinItems as te } from "../hooks/useBinItems.js";
8
+ import { useCreateFolder as ne } from "../hooks/useCreateFolder.js";
9
+ import { useUploadFile as re } from "../hooks/useUploadFile.js";
10
+ import { useDeleteFile as ie } from "../hooks/useDeleteFile.js";
11
+ import { useDeleteFolder as ae } from "../hooks/useDeleteFolder.js";
12
+ import { useRestoreFile as oe } from "../hooks/useRestoreFile.js";
13
+ import { useRestoreFolder as se } from "../hooks/useRestoreFolder.js";
14
+ import { usePermanentlyDeleteFile as ce } from "../hooks/usePermanentlyDeleteFile.js";
15
+ import { usePermanentlyDeleteFolder as le } from "../hooks/usePermanentlyDeleteFolder.js";
16
+ import { useToggleStar as ue } from "../hooks/useToggleStar.js";
17
+ import { useRenameFile as de } from "../hooks/useRenameFile.js";
18
+ import { useRenameFolder as fe } from "../hooks/useRenameFolder.js";
19
+ import { useCreateShare as pe } from "../hooks/useCreateShare.js";
20
+ import { useCreateFolderShare as me } from "../hooks/useCreateFolderShare.js";
21
+ import { useCopyFile as he } from "../hooks/useCopyFile.js";
22
+ import { useMoveFile as ge } from "../hooks/useMoveFile.js";
23
+ import { useMoveFolder as _e } from "../hooks/useMoveFolder.js";
24
+ import { useBulkDelete as ve } from "../hooks/useBatchOperations.js";
25
+ import { useSearch as ye } from "../hooks/useSearch.js";
26
+ import { useToast as be } from "../hooks/useToast.js";
27
+ import { generateThumbnail as xe } from "../utils/thumbnail.js";
28
+ import "../utils/index.js";
29
+ import { tWithFallback as a } from "../utils/i18n.js";
30
+ import { FileBrowser as Se } from "../components/FileBrowser.js";
31
+ import { TabBar as Ce } from "../components/TabBar.js";
32
+ import { ShareDialog as we } from "../components/ShareDialog.js";
33
+ import { FilePreviewModal as Te } from "../components/FilePreviewModal.js";
34
+ import { FileInfoPanel as Ee } from "../components/FileInfoPanel.js";
35
+ import { EmptyState as De } from "../components/EmptyState.js";
36
+ import { ToastContainer as Oe } from "../components/Toast.js";
37
+ import { SearchBar as ke } from "../components/SearchBar.js";
38
+ import { MoveDialog as Ae } from "../components/MoveDialog.js";
39
+ import { CopyDialog as je } from "../components/CopyDialog.js";
40
+ import { ConfirmDialog as Me } from "../components/ConfirmDialog.js";
41
+ import { UploadQueue as Ne } from "../components/UploadQueue.js";
42
+ import { nativeImpact as Pe, nativeNotify as Fe, nativeOpenUrl as Ie } from "../../utils/nativeBridge.js";
43
+ import { emitFilesEvent as Le } from "../utils/events.js";
44
+ import { useEffect as Re, useMemo as ze, useState as o } from "react";
45
+ import { FileDown as Be, FolderPlus as Ve, FolderUp as He, FolderX as Ue, Grid3x3 as We, Home as Ge, List as Ke, Loader2 as s, Search as qe, Trash2 as Je, Upload as Ye, X as Xe } from "lucide-react";
46
+ import { useFeatureFlagDetails as Ze } from "@burdenoff/fe-libs/shared/feature-flags";
47
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
48
+ import { useNavigate as Qe, useParams as $e } from "react-router-dom";
49
+ import { useI18n as et } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
50
+ //#region src/files/pages/BrowserPage.tsx
51
+ function d() {
52
+ let { t: d } = et(), { folderId: f } = $e(), p = Qe(), tt = e(), { workspaceId: m } = tt, { viewMode: nt, setViewMode: rt, breadcrumbs: it, selectedFiles: at, selectedFolders: h, clearSelection: g } = t(), [_, ot] = o("all"), st = Ze("files.starred"), ct = Ze("files.bin"), lt = st ? !!st.value : !1, ut = ct ? !!ct.value : !1, dt = ze(() => {
53
+ let e = ["all", "recent"];
54
+ return lt && e.push("starred"), ut && e.push("bin"), e;
55
+ }, [lt, ut]);
56
+ Re(() => {
57
+ dt.includes(_) || ot("all");
58
+ }, [dt, _]);
59
+ let [v, ft] = o(""), [pt, mt] = o(), y = v.trim().length >= 2, [ht, gt] = o(null), [b, _t] = o(null), x = be(), S = r({
60
+ folderId: f || void 0,
61
+ pageSize: 100,
62
+ skip: _ !== "all" || y
63
+ }), C = i({ skip: _ !== "recent" || y }), w = ee({ skip: _ !== "starred" || y || !lt }), T = te({ skip: _ !== "bin" || y || !ut }), E = ye(v, y, pt);
64
+ Re(() => {
65
+ if (f && S.data?.folderPath && S.data?.currentFolder) {
66
+ let e = S.data.folderPath.folders || [], n = S.data.currentFolder, r = [...e.map((e) => ({
67
+ id: e.id,
68
+ name: e.name
69
+ })), {
70
+ id: n.id,
71
+ name: n.name
72
+ }];
73
+ t.getState().setBreadcrumbs(r);
74
+ } else t.getState().setBreadcrumbs([]);
75
+ }, [f, S.data]);
76
+ let D = [], O = [], k = !1, A = null, j = !1;
77
+ if (y && E.data) D = E.data.files || [], O = E.data.folders || [], k = E.isLoading, A = E.error;
78
+ else switch (_) {
79
+ case "all":
80
+ D = S.data?.filesList?.files || [], O = S.data?.foldersList?.folders || [], k = S.loading, A = S.error || null, j = !1;
81
+ break;
82
+ case "recent":
83
+ D = C.files || [], O = C.folders || [], k = C.isLoading, A = C.error || null, j = !0;
84
+ break;
85
+ case "starred":
86
+ D = w.files, O = w.folders, k = w.isLoading, A = w.error || null, j = !0;
87
+ break;
88
+ case "bin":
89
+ D = T.files, O = T.folders, k = T.isLoading, A = T.error || null, j = !0;
90
+ break;
91
+ }
92
+ let vt = _ === "all" ? (S.data?.filesList?.total ?? D.length) + (S.data?.foldersList?.total ?? O.length) : null, M = at.size + h.size, [yt, N] = o(!1), [bt, P] = o(!1), [xt, F] = o(!1), [St, I] = o(!1), [Ct, wt] = o(!1), [Tt, L] = o(null), [R, z] = o(null), [B, Et] = o(null), [V, H] = o(null), [U, W] = o(""), [G, K] = o(""), [Dt, q] = o(!1), [Ot, J] = o([]), [kt, Y] = o(!1), [X, Z] = o(null), Q = (e, t) => {
93
+ Le(tt, e, t);
94
+ }, At = async () => {
95
+ if (!X || X.loading) return;
96
+ let e = X.onConfirm;
97
+ Z({
98
+ ...X,
99
+ loading: !0
100
+ });
101
+ try {
102
+ await e(), Z(null);
103
+ } catch (e) {
104
+ Q("files.api.failed", {
105
+ action: "confirmDialog",
106
+ message: e instanceof Error ? e.message : "Confirmed action failed"
107
+ }), Z((e) => e && {
108
+ ...e,
109
+ loading: !1
110
+ });
111
+ }
112
+ }, $ = ne(), jt = re(), Mt = ie(), Nt = ae(), Pt = oe(), Ft = se(), It = ce(), Lt = le(), Rt = ue(), zt = de(), Bt = fe(), Vt = pe(), Ht = me(), Ut = he(), Wt = ge(), Gt = _e(), Kt = ve(), qt = () => {
113
+ let e = document.createElement("input");
114
+ e.type = "file", e.multiple = !0, e.onchange = async (e) => {
115
+ let t = e.target.files;
116
+ if (t && t.length > 0) {
117
+ let e = await Promise.all(Array.from(t).map(async (e, t) => {
118
+ let n = await xe(e);
119
+ return {
120
+ id: `${Date.now()}-${t}-${e.name}`,
121
+ file: e,
122
+ status: "pending",
123
+ progress: 0,
124
+ folderId: f || void 0,
125
+ thumbnailUrl: n ?? void 0
126
+ };
127
+ }));
128
+ J((t) => [...t, ...e]), Y(!0), q(!0);
129
+ for (let t of e) await Jt(t);
130
+ q(!1);
131
+ }
132
+ }, e.click();
133
+ }, Jt = async (e) => {
134
+ let t = (t) => {
135
+ J((n) => n.map((n) => n.id === e.id ? {
136
+ ...n,
137
+ ...t
138
+ } : n));
139
+ };
140
+ t({ status: "uploading" });
141
+ try {
142
+ let n = await jt.mutateAsync({
143
+ file: e.file,
144
+ folderId: e.folderId,
145
+ onProgress: (e) => {
146
+ t({ progress: e });
147
+ }
148
+ });
149
+ t({
150
+ status: "completed",
151
+ progress: 100
152
+ }), Q("files.file.uploaded", {
153
+ fileId: n.id,
154
+ fileName: n.name,
155
+ folderId: e.folderId
156
+ });
157
+ } catch (n) {
158
+ let r = n instanceof Error ? n.message : a(d, "files.upload.errors.failed", "Upload failed");
159
+ r === "Upload paused" ? t({ status: "paused" }) : (t({
160
+ status: "failed",
161
+ error: r
162
+ }), Q("files.api.failed", {
163
+ action: "uploadFile",
164
+ fileName: e.file.name,
165
+ message: r
166
+ }));
167
+ }
168
+ }, Yt = (e) => {
169
+ jt.pause(), J((t) => t.map((t) => t.id === e ? {
170
+ ...t,
171
+ status: "paused"
172
+ } : t));
173
+ }, Xt = (e) => {
174
+ let t = Ot.find((t) => t.id === e);
175
+ t && Jt(t);
176
+ }, Zt = (e) => {
177
+ let t = Ot.find((t) => t.id === e);
178
+ t && (J((t) => t.map((t) => t.id === e ? {
179
+ ...t,
180
+ status: "pending",
181
+ progress: 0,
182
+ error: void 0
183
+ } : t)), Jt(t));
184
+ }, Qt = (e) => {
185
+ J((t) => {
186
+ let n = t.filter((t) => t.id !== e);
187
+ return n.length === 0 && (Y(!1), q(!1)), n;
188
+ });
189
+ }, $t = () => {
190
+ if (!m) {
191
+ x.error(a(d, "files.workspace.errors.notSelected", "Workspace not selected"));
192
+ return;
193
+ }
194
+ let e = document.createElement("input");
195
+ e.type = "file", e.webkitdirectory = !0, e.onchange = async (e) => {
196
+ let t = e.target.files;
197
+ if (t && t.length > 0) {
198
+ let e = /* @__PURE__ */ new Map();
199
+ for (let n of Array.from(t)) {
200
+ let t = (n.webkitRelativePath || n.name).split("/").slice(0, -1).join("/");
201
+ e.has(t) || e.set(t, []), e.get(t).push(n);
202
+ }
203
+ let n = /* @__PURE__ */ new Map(), r = Array.from(e.keys()).sort();
204
+ for (let e of r) {
205
+ if (!e) continue;
206
+ let t = e.split("/"), r = "", i = f || void 0;
207
+ for (let e of t) if (r = r ? `${r}/${e}` : e, n.has(r)) i = n.get(r);
208
+ else try {
209
+ let t = await $.mutateAsync({
210
+ name: e,
211
+ parentFolderId: i
212
+ });
213
+ n.set(r, t.id), i = t.id;
214
+ } catch {}
215
+ }
216
+ let i = [], ee = 0;
217
+ for (let [t, r] of e) {
218
+ let e = t ? n.get(t) : f || void 0;
219
+ for (let t of r) {
220
+ let n = await xe(t);
221
+ i.push({
222
+ id: `${Date.now()}-${ee++}-${t.name}`,
223
+ file: t,
224
+ status: "pending",
225
+ progress: 0,
226
+ folderId: e,
227
+ thumbnailUrl: n ?? void 0
228
+ });
229
+ }
230
+ }
231
+ J((e) => [...e, ...i]), Y(!0), q(!0);
232
+ for (let e of i) await Jt(e);
233
+ q(!1), x.success(a(d, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
234
+ count: i.length,
235
+ plural: i.length > 1 ? "s" : ""
236
+ }));
237
+ }
238
+ }, e.click();
239
+ }, en = () => {
240
+ N(!0);
241
+ }, tn = async () => {
242
+ if (G.trim() && m) try {
243
+ await $.mutateAsync({
244
+ name: G,
245
+ parentFolderId: f
246
+ }), K(""), N(!1), Q("files.folder.created", {
247
+ folderName: G,
248
+ parentFolderId: f
249
+ });
250
+ } catch (e) {
251
+ x.error(e instanceof Error ? e.message : a(d, "files.folder.errors.createFailed", "Folder creation failed")), Q("files.api.failed", {
252
+ action: "createFolder",
253
+ message: e instanceof Error ? e.message : "Folder creation failed"
254
+ });
255
+ }
256
+ }, nn = (e) => {
257
+ _t(e);
258
+ }, rn = (e) => {
259
+ L(e), F(!0);
260
+ }, an = (e) => {
261
+ L(e), F(!0);
262
+ }, on = async (e) => {
263
+ if (!e.fileId && !e.folderId) throw Error(a(d, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
264
+ let t = e.invitedEmail ? "EMAIL_INVITE" : "PUBLIC_LINK", n = "";
265
+ if (e.fileId) {
266
+ let r = {
267
+ fileId: e.fileId,
268
+ expiresAt: e.expiresAt,
269
+ maxDownloads: e.maxDownloads,
270
+ password: e.password,
271
+ invitedEmail: e.invitedEmail,
272
+ shareType: t,
273
+ accessLevel: "DOWNLOAD"
274
+ };
275
+ n = (await Vt.mutateAsync(r))?.token ?? "", Q("files.share.created", {
276
+ entityType: "file",
277
+ fileId: e.fileId,
278
+ shareType: t
279
+ });
280
+ } else if (e.folderId) {
281
+ let r = {
282
+ folderId: e.folderId,
283
+ expiresAt: e.expiresAt,
284
+ maxDownloads: e.maxDownloads,
285
+ password: e.password,
286
+ invitedEmail: e.invitedEmail,
287
+ shareType: t,
288
+ accessLevel: "DOWNLOAD"
289
+ };
290
+ n = (await Ht.mutateAsync(r))?.createFolderShare?.token ?? "", Q("files.share.created", {
291
+ entityType: "folder",
292
+ folderId: e.folderId,
293
+ shareType: t
294
+ });
295
+ }
296
+ return {
297
+ publicUrl: n ? `${window.location.origin}/files/share/${n}` : "",
298
+ token: n
299
+ };
300
+ }, sn = async (e) => {
301
+ Pe("medium"), Z({
302
+ title: a(d, "files.confirm.deleteFile.title", "Delete file"),
303
+ description: a(d, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
304
+ confirmLabel: a(d, "files.common.actions.delete", "Delete"),
305
+ variant: "danger",
306
+ onConfirm: async () => {
307
+ try {
308
+ await Mt.mutateAsync({ id: e.id }), Fe("success"), x.success(a(d, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Q("files.file.deleted", {
309
+ fileId: e.id,
310
+ fileName: e.name,
311
+ permanent: !1
312
+ });
313
+ } catch (t) {
314
+ x.error(t instanceof Error ? t.message : a(d, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Fe("error"), Q("files.api.failed", {
315
+ action: "deleteFile",
316
+ fileId: e.id,
317
+ message: t instanceof Error ? t.message : "Failed to delete file"
318
+ });
319
+ }
320
+ }
321
+ });
322
+ }, cn = async (e) => {
323
+ try {
324
+ await Pt.mutateAsync({ id: e.id }), x.success(a(d, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), Q("files.file.restored", {
325
+ fileId: e.id,
326
+ fileName: e.name
327
+ });
328
+ } catch (e) {
329
+ x.error(e instanceof Error ? e.message : a(d, "files.file.errors.restoreFailed", "Failed to restore file"));
330
+ }
331
+ }, ln = async (e) => {
332
+ Pe("heavy"), Z({
333
+ title: a(d, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
334
+ description: a(d, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
335
+ confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
336
+ variant: "danger",
337
+ onConfirm: async () => {
338
+ try {
339
+ await It.mutateAsync({ id: e.id }), x.success(a(d, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Q("files.file.deleted", {
340
+ fileId: e.id,
341
+ fileName: e.name,
342
+ permanent: !0
343
+ });
344
+ } catch (e) {
345
+ x.error(e instanceof Error ? e.message : a(d, "files.file.errors.permanentDeleteFailed", "Failed to permanently delete file"));
346
+ }
347
+ }
348
+ });
349
+ }, un = async (e) => {
350
+ try {
351
+ await Rt.mutateAsync({
352
+ id: e.id,
353
+ type: "file"
354
+ }), Q("files.file.starred", {
355
+ fileId: e.id,
356
+ fileName: e.name,
357
+ starred: !e.starred
358
+ });
359
+ } catch {
360
+ x.error(a(d, "files.file.errors.starFailed", "Failed to update starred state")), Q("files.api.failed", {
361
+ action: "toggleFileStar",
362
+ fileId: e.id
363
+ });
364
+ }
365
+ }, dn = (e) => {
366
+ H({
367
+ id: e.id,
368
+ name: e.name,
369
+ type: "file"
370
+ }), W(e.name), P(!0);
371
+ }, fn = async (e) => {
372
+ try {
373
+ let t = e.downloadUrl || e.url;
374
+ if (!t) throw Error(a(d, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
375
+ let n = document.createElement("a");
376
+ n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n), x.success(a(d, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), Q("files.file.downloaded", {
377
+ fileId: e.id,
378
+ fileName: e.name
379
+ });
380
+ } catch (e) {
381
+ x.error(e instanceof Error ? e.message : a(d, "files.file.errors.downloadFailed", "Failed to download file"));
382
+ }
383
+ }, pn = (e) => {
384
+ Et({
385
+ item: e,
386
+ type: "file"
387
+ }), wt(!0);
388
+ }, mn = (e) => {
389
+ z({
390
+ item: e,
391
+ type: "file"
392
+ }), I(!0);
393
+ }, hn = (e) => {
394
+ gt({
395
+ item: e,
396
+ type: "file"
397
+ });
398
+ }, gn = (e) => {
399
+ p(`/files/browse/${e.id}`);
400
+ }, _n = async (e) => {
401
+ Pe("medium"), Z({
402
+ title: a(d, "files.confirm.deleteFolder.title", "Delete folder"),
403
+ description: a(d, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
404
+ confirmLabel: a(d, "files.common.actions.delete", "Delete"),
405
+ variant: "danger",
406
+ onConfirm: async () => {
407
+ try {
408
+ await Nt.mutateAsync({
409
+ id: e.id,
410
+ recursive: !0
411
+ }), x.success(a(d, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Q("files.folder.deleted", {
412
+ folderId: e.id,
413
+ folderName: e.name,
414
+ permanent: !1
415
+ });
416
+ } catch (e) {
417
+ x.error(e instanceof Error ? e.message : a(d, "files.folder.errors.deleteFailed", "Failed to delete folder"));
418
+ }
419
+ }
420
+ });
421
+ }, vn = async (e) => {
422
+ try {
423
+ await Ft.mutateAsync({ id: e.id }), x.success(a(d, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), Q("files.folder.restored", {
424
+ folderId: e.id,
425
+ folderName: e.name
426
+ });
427
+ } catch (e) {
428
+ x.error(e instanceof Error ? e.message : a(d, "files.folder.errors.restoreFailed", "Failed to restore folder"));
429
+ }
430
+ }, yn = async (e) => {
431
+ Z({
432
+ title: a(d, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
433
+ description: a(d, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
434
+ confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
435
+ variant: "danger",
436
+ onConfirm: async () => {
437
+ try {
438
+ await Lt.mutateAsync({ id: e.id }), x.success(a(d, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Q("files.folder.deleted", {
439
+ folderId: e.id,
440
+ folderName: e.name,
441
+ permanent: !0
442
+ });
443
+ } catch (e) {
444
+ x.error(e instanceof Error ? e.message : a(d, "files.folder.errors.permanentDeleteFailed", "Failed to permanently delete folder"));
445
+ }
446
+ }
447
+ });
448
+ }, bn = (e) => {
449
+ H({
450
+ id: e.id,
451
+ name: e.name,
452
+ type: "folder"
453
+ }), W(e.name), P(!0);
454
+ }, xn = (e) => {
455
+ z({
456
+ item: e,
457
+ type: "folder"
458
+ }), I(!0);
459
+ }, Sn = async (e) => {
460
+ try {
461
+ await Rt.mutateAsync({
462
+ id: e.id,
463
+ type: "folder"
464
+ }), Q("files.folder.starred", {
465
+ folderId: e.id,
466
+ folderName: e.name,
467
+ starred: !e.starred
468
+ });
469
+ } catch {
470
+ x.error(a(d, "files.folder.errors.starFailed", "Failed to update starred state")), Q("files.api.failed", {
471
+ action: "toggleFolderStar",
472
+ folderId: e.id
473
+ });
474
+ }
475
+ }, Cn = (e) => {
476
+ gt({
477
+ item: e,
478
+ type: "folder"
479
+ });
480
+ }, wn = async (e) => {
481
+ if (R) try {
482
+ R.type === "file" ? (await Wt.mutateAsync({
483
+ fileId: R.item.id,
484
+ targetFolderId: e || null
485
+ }), x.success(a(d, "files.file.move.success", "\"{{name}}\" moved", { name: R.item.name })), Q("files.file.moved", {
486
+ fileId: R.item.id,
487
+ fileName: R.item.name,
488
+ destinationFolderId: e
489
+ })) : (await Gt.mutateAsync({
490
+ folderId: R.item.id,
491
+ targetParentFolderId: e
492
+ }), x.success(a(d, "files.folder.move.success", "\"{{name}}\" moved", { name: R.item.name })), Q("files.folder.moved", {
493
+ folderId: R.item.id,
494
+ folderName: R.item.name,
495
+ destinationFolderId: e
496
+ })), I(!1), z(null);
497
+ } catch (e) {
498
+ x.error(e instanceof Error ? e.message : a(d, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: R.item.name })), Q("files.api.failed", {
499
+ action: R.type === "file" ? "moveFile" : "moveFolder",
500
+ itemId: R.item.id,
501
+ itemType: R.type,
502
+ message: e instanceof Error ? e.message : void 0
503
+ });
504
+ }
505
+ }, Tn = async (e, t) => {
506
+ if (B) try {
507
+ if (B.type !== "file") throw Error(a(d, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
508
+ await Ut.mutateAsync({
509
+ id: B.item.id,
510
+ newName: t || `Copy of ${B.item.name}`,
511
+ targetFolderId: e || void 0
512
+ }), x.success(a(d, "files.file.copy.success", "\"{{name}}\" copied", { name: B.item.name })), Q("files.file.copied", {
513
+ fileId: B.item.id,
514
+ fileName: B.item.name,
515
+ destinationFolderId: e
516
+ }), wt(!1), Et(null);
517
+ } catch (e) {
518
+ x.error(e instanceof Error ? e.message : a(d, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: B.item.name })), Q("files.api.failed", {
519
+ action: "copyFile",
520
+ fileId: B.item.id,
521
+ message: e instanceof Error ? e.message : void 0
522
+ });
523
+ }
524
+ }, En = async () => {
525
+ if (!(!V || !U.trim())) try {
526
+ let e = V.name, t = U.trim();
527
+ V.type === "file" ? (await zt.mutateAsync({
528
+ fileId: V.id,
529
+ newName: t
530
+ }), x.success(a(d, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), Q("files.file.renamed", {
531
+ fileId: V.id,
532
+ previousName: e,
533
+ name: t
534
+ })) : (await Bt.mutateAsync({
535
+ folderId: V.id,
536
+ newName: t
537
+ }), x.success(a(d, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), Q("files.folder.renamed", {
538
+ folderId: V.id,
539
+ previousName: e,
540
+ name: t
541
+ })), P(!1), H(null), W("");
542
+ } catch (e) {
543
+ x.error(e instanceof Error ? e.message : a(d, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: V.type })), Q("files.api.failed", {
544
+ action: V.type === "file" ? "renameFile" : "renameFolder",
545
+ itemId: V.id,
546
+ itemType: V.type,
547
+ message: e instanceof Error ? e.message : void 0
548
+ });
549
+ }
550
+ };
551
+ return n({
552
+ files: D,
553
+ folders: O,
554
+ onFilePreview: nn,
555
+ onFileDelete: sn,
556
+ onFolderOpen: gn,
557
+ onFolderDelete: _n,
558
+ activeTab: _
559
+ }), m === void 0 ? /* @__PURE__ */ u("div", {
560
+ className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
561
+ children: [/* @__PURE__ */ l(s, { className: "h-8 w-8 animate-spin text-text-tertiary" }), /* @__PURE__ */ l("p", {
562
+ className: "text-sm text-text-secondary max-w-md",
563
+ children: a(d, "files.browser.workspace.waiting", "Waiting for workspace context. If this persists, the app shell may not have provided a workspaceId to the Files module. Try reloading the page or switching workspaces.")
564
+ })]
565
+ }) : m === "" ? /* @__PURE__ */ u("div", {
566
+ className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
567
+ children: [/* @__PURE__ */ l(Ue, { className: "h-8 w-8 text-text-tertiary" }), /* @__PURE__ */ l("p", {
568
+ className: "text-sm text-text-secondary max-w-md",
569
+ children: a(d, "files.browser.workspace.notSelected", "No workspace selected. Please select a workspace to view files.")
570
+ })]
571
+ }) : /* @__PURE__ */ u("div", {
572
+ className: "min-h-screen bg-bg-surface",
573
+ children: [
574
+ /* @__PURE__ */ l("div", {
575
+ className: "bg-bg-surface border-b border-border-default px-4 py-3 sm:px-6 sm:py-4",
576
+ children: /* @__PURE__ */ l("div", {
577
+ className: "flex items-center gap-2 sm:gap-4",
578
+ children: /* @__PURE__ */ u("div", {
579
+ className: "flex items-center gap-1 sm:gap-2 text-sm overflow-x-auto",
580
+ children: [/* @__PURE__ */ u("button", {
581
+ onClick: () => p("/files/browse"),
582
+ 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",
583
+ title: a(d, "files.browser.actions.goToRoot", "Go to root"),
584
+ children: [/* @__PURE__ */ l(Ge, { className: "size-4" }), /* @__PURE__ */ l("span", {
585
+ className: "hidden sm:inline",
586
+ children: a(d, "files.browser.rootLabel", "My Drive")
587
+ })]
588
+ }), it.map((e, t) => /* @__PURE__ */ u("div", {
589
+ className: "flex items-center gap-1 sm:gap-2",
590
+ children: [/* @__PURE__ */ l("span", {
591
+ className: "text-text-tertiary",
592
+ children: "/"
593
+ }), /* @__PURE__ */ l("button", {
594
+ onClick: () => p(`/files/browse/${e.id}`),
595
+ className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === it.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
596
+ title: `Go to ${e.name}`,
597
+ children: e.name
598
+ })]
599
+ }, e.id))]
600
+ })
601
+ })
602
+ }),
603
+ /* @__PURE__ */ l(Ce, {
604
+ activeTab: _,
605
+ onTabChange: ot,
606
+ tabs: dt
607
+ }),
608
+ /* @__PURE__ */ u("div", {
609
+ className: "bg-bg-surface border-b border-border-default px-4 py-2 sm:px-6 sm:py-3",
610
+ children: [
611
+ /* @__PURE__ */ u("div", {
612
+ className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 sm:gap-inline-gap",
613
+ children: [/* @__PURE__ */ l("div", {
614
+ className: "w-full sm:flex-1 min-w-0 order-2 sm:order-1",
615
+ children: /* @__PURE__ */ l("div", {
616
+ className: "relative w-full max-w-2xl",
617
+ children: /* @__PURE__ */ l(ke, {
618
+ onSearch: (e, t) => {
619
+ ft(e), mt(t);
620
+ },
621
+ placeholder: a(d, "files.search.input.placeholder", "Search files and folders..."),
622
+ initialQuery: v,
623
+ showFilters: !0
624
+ })
625
+ })
626
+ }), /* @__PURE__ */ u("div", {
627
+ className: "flex items-center gap-2 order-1 sm:order-2 w-full sm:w-auto justify-between sm:justify-end",
628
+ children: [
629
+ !y && (D.length > 0 || O.length > 0) && /* @__PURE__ */ l("button", {
630
+ onClick: () => {
631
+ let e = D.map((e) => e.id), n = O.map((e) => e.id);
632
+ t.getState().selectAllFiles(e), n.forEach((e) => t.getState().selectFolder(e));
633
+ },
634
+ className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200",
635
+ children: a(d, "files.browser.actions.selectAll", "Select All")
636
+ }),
637
+ !y && /* @__PURE__ */ u(c, { children: [
638
+ /* @__PURE__ */ u("button", {
639
+ onClick: en,
640
+ className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 text-xs sm:text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm",
641
+ children: [/* @__PURE__ */ l(Ve, { className: "size-4" }), /* @__PURE__ */ l("span", {
642
+ className: "hidden sm:inline",
643
+ children: a(d, "files.browser.actions.newFolder", "New Folder")
644
+ })]
645
+ }),
646
+ /* @__PURE__ */ l("button", {
647
+ onClick: qt,
648
+ disabled: Dt,
649
+ className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 text-xs sm:text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
650
+ children: Dt ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), /* @__PURE__ */ l("span", {
651
+ className: "hidden sm:inline",
652
+ children: a(d, "files.browser.upload.uploading", "Uploading...")
653
+ })] }) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Ye, { className: "size-4" }), /* @__PURE__ */ l("span", {
654
+ className: "hidden sm:inline",
655
+ children: a(d, "files.browser.actions.uploadFiles", "Upload Files")
656
+ })] })
657
+ }),
658
+ /* @__PURE__ */ u("button", {
659
+ onClick: $t,
660
+ disabled: Dt,
661
+ className: "hidden sm:flex items-center gap-2 px-4 py-2.5 text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
662
+ title: a(d, "files.browser.actions.uploadFolderTitle", "Upload entire folder with structure"),
663
+ children: [/* @__PURE__ */ l(He, { className: "size-4" }), a(d, "files.browser.actions.uploadFolder", "Upload Folder")]
664
+ }),
665
+ /* @__PURE__ */ u("button", {
666
+ onClick: () => p("/export"),
667
+ className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 text-xs sm:text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm",
668
+ title: a(d, "files.browser.actions.exportTitle", "Export workspace files"),
669
+ children: [/* @__PURE__ */ l(Be, { className: "size-4" }), /* @__PURE__ */ l("span", {
670
+ className: "hidden sm:inline",
671
+ children: a(d, "files.browser.actions.export", "Export")
672
+ })]
673
+ })
674
+ ] }),
675
+ /* @__PURE__ */ u("div", {
676
+ className: "flex items-center border border-border-default rounded-lg overflow-hidden",
677
+ children: [/* @__PURE__ */ l("button", {
678
+ onClick: () => rt("grid"),
679
+ className: `p-2 transition-colors duration-200 ${nt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
680
+ "aria-label": a(d, "files.browser.view.grid", "Grid view"),
681
+ children: /* @__PURE__ */ l(We, { className: "size-5" })
682
+ }), /* @__PURE__ */ l("button", {
683
+ onClick: () => rt("list"),
684
+ className: `p-2 transition-colors duration-200 ${nt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
685
+ "aria-label": a(d, "files.browser.view.list", "List view"),
686
+ children: /* @__PURE__ */ l(Ke, { className: "size-5" })
687
+ })]
688
+ })
689
+ ]
690
+ })]
691
+ }),
692
+ y && /* @__PURE__ */ u("div", {
693
+ 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",
694
+ children: [/* @__PURE__ */ u("span", {
695
+ className: "text-sm font-medium text-status-success-text",
696
+ children: [a(d, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: v }), E.data && ` (${(E.data.files?.length || 0) + (E.data.folders?.length || 0)} items)`]
697
+ }), /* @__PURE__ */ u("button", {
698
+ onClick: () => ft(""),
699
+ className: "flex items-center gap-2 text-status-success-text hover:text-status-success-text/80 text-sm font-medium transition-colors duration-200",
700
+ children: [/* @__PURE__ */ l(Xe, { className: "size-4" }), a(d, "files.browser.search.clear", "Clear search")]
701
+ })]
702
+ }),
703
+ M > 0 && /* @__PURE__ */ u("div", {
704
+ className: "mt-3 flex items-center justify-between p-3 bg-bg-accent rounded-lg border border-action-primary-border transition-all duration-200",
705
+ children: [/* @__PURE__ */ u("div", {
706
+ className: "flex items-center gap-4",
707
+ children: [/* @__PURE__ */ l("span", {
708
+ className: "text-sm font-medium text-text-primary",
709
+ children: a(d, "files.browser.selection.selectedCount", "{{count}} item{{suffix}} selected", {
710
+ count: M,
711
+ suffix: M > 1 ? "s" : ""
712
+ })
713
+ }), /* @__PURE__ */ l("div", {
714
+ className: "flex items-center gap-2",
715
+ children: _ === "bin" ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("button", {
716
+ onClick: async () => {
717
+ try {
718
+ for (let e of Array.from(at)) await Pt.mutateAsync({ id: e });
719
+ for (let e of Array.from(h)) await Ft.mutateAsync({ id: e });
720
+ g(), x.success(`${M} item${M > 1 ? "s" : ""} restored`);
721
+ } catch (e) {
722
+ x.error(e instanceof Error ? e.message : "Failed to restore some items");
723
+ }
724
+ },
725
+ className: "flex items-center gap-1.5 rounded-lg border border-status-success-border bg-bg-surface px-3 py-1.5 text-sm font-medium text-status-success-text transition-colors duration-200 hover:bg-status-success-bg-subtle",
726
+ children: a(d, "files.browser.selection.actions.restore", "Restore")
727
+ }), /* @__PURE__ */ u("button", {
728
+ onClick: async () => {
729
+ Z({
730
+ title: a(d, "files.confirm.bulkPermanentDelete.title", "Permanently delete selected items"),
731
+ description: a(d, "files.confirm.bulkPermanentDelete.description", "Permanently delete {{count}} selected item{{plural}}? This cannot be undone.", {
732
+ count: M,
733
+ plural: M > 1 ? "s" : ""
734
+ }),
735
+ confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
736
+ variant: "danger",
737
+ onConfirm: async () => {
738
+ try {
739
+ for (let e of Array.from(at)) await It.mutateAsync({ id: e });
740
+ for (let e of Array.from(h)) await Lt.mutateAsync({ id: e });
741
+ g(), x.success(a(d, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
742
+ count: M,
743
+ plural: M > 1 ? "s" : ""
744
+ }));
745
+ } catch (e) {
746
+ x.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.permanentDeleteFailed", "Failed to permanently delete some items"));
747
+ }
748
+ }
749
+ });
750
+ },
751
+ 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",
752
+ children: [/* @__PURE__ */ l(Je, { className: "size-4" }), a(d, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
753
+ })] }) : /* @__PURE__ */ u("button", {
754
+ onClick: async () => {
755
+ Z({
756
+ title: a(d, "files.confirm.bulkDelete.title", "Delete selected items"),
757
+ description: a(d, "files.confirm.bulkDelete.description", "Move {{count}} selected item{{plural}} to the bin?", {
758
+ count: M,
759
+ plural: M > 1 ? "s" : ""
760
+ }),
761
+ confirmLabel: a(d, "files.common.actions.delete", "Delete"),
762
+ variant: "danger",
763
+ onConfirm: async () => {
764
+ try {
765
+ let e = Array.from(at), t = Array.from(h);
766
+ e.length > 0 && await Kt.mutateAsync(e);
767
+ for (let e of t) await Nt.mutateAsync({
768
+ id: e,
769
+ recursive: !0
770
+ });
771
+ g(), x.success(a(d, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
772
+ count: M,
773
+ plural: M > 1 ? "s" : ""
774
+ }));
775
+ } catch (e) {
776
+ x.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
777
+ }
778
+ }
779
+ });
780
+ },
781
+ 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",
782
+ children: [/* @__PURE__ */ l(Je, { className: "size-4" }), a(d, "files.browser.selection.actions.delete", "Delete")]
783
+ })
784
+ })]
785
+ }), /* @__PURE__ */ u("button", {
786
+ onClick: g,
787
+ className: "flex items-center gap-2 text-text-link hover:text-action-primary-bg-hover text-sm font-medium transition-colors duration-200",
788
+ children: [/* @__PURE__ */ l(Xe, { className: "size-4" }), a(d, "files.common.actions.clear", "Clear")]
789
+ })]
790
+ })
791
+ ]
792
+ }),
793
+ /* @__PURE__ */ u("div", {
794
+ className: "px-2 sm:px-4 md:px-6 py-3 sm:py-4",
795
+ children: [/* @__PURE__ */ l(Se, {
796
+ files: D,
797
+ folders: O,
798
+ loading: k,
799
+ error: A,
800
+ preserveSortOrder: j,
801
+ onFilePreview: nn,
802
+ onFileShare: _ === "bin" ? void 0 : rn,
803
+ onFileDelete: _ === "bin" ? ln : sn,
804
+ onFileRestore: _ === "bin" ? cn : void 0,
805
+ onFileFavorite: _ === "bin" ? void 0 : un,
806
+ onFileRename: _ === "bin" ? void 0 : dn,
807
+ onFileDownload: fn,
808
+ onFileCopy: _ === "bin" ? void 0 : pn,
809
+ onFileMove: _ === "bin" ? void 0 : mn,
810
+ onFileInfo: hn,
811
+ onFolderOpen: gn,
812
+ onFolderShare: _ === "bin" ? void 0 : an,
813
+ onFolderDelete: _ === "bin" ? yn : _n,
814
+ onFolderRestore: _ === "bin" ? vn : void 0,
815
+ onFolderRename: _ === "bin" ? void 0 : bn,
816
+ onFolderFavorite: _ === "bin" ? void 0 : Sn,
817
+ onFolderMove: _ === "bin" ? void 0 : xn,
818
+ onFolderInfo: Cn
819
+ }), !k && (D.length > 0 || O.length > 0) && /* @__PURE__ */ u("div", {
820
+ className: "mt-4 px-2 text-sm text-text-secondary",
821
+ children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count: D.length + O.length }), !y && _ === "all" && vt !== null && ` ${a(d, "files.browser.results.ofItems", "of {{count}} items", { count: vt })}`]
822
+ })]
823
+ }),
824
+ yt && /* @__PURE__ */ l("div", {
825
+ className: "fixed inset-0 backdrop-blur-sm flex items-center justify-center z-[100] animate-in fade-in duration-200",
826
+ role: "dialog",
827
+ "aria-modal": "true",
828
+ "aria-labelledby": "files-new-folder-title",
829
+ children: /* @__PURE__ */ u("div", {
830
+ className: "bg-bg-surface rounded-lg shadow-xl p-6 w-full max-w-xs mx-4 animate-in zoom-in-95 duration-200",
831
+ children: [
832
+ /* @__PURE__ */ l("h2", {
833
+ id: "files-new-folder-title",
834
+ className: "text-base font-semibold text-text-primary mb-4",
835
+ children: a(d, "files.browser.newFolderDialog.title", "New folder")
836
+ }),
837
+ /* @__PURE__ */ l("input", {
838
+ type: "text",
839
+ value: G,
840
+ onChange: (e) => K(e.target.value),
841
+ onKeyDown: (e) => {
842
+ e.key === "Enter" && tn(), e.key === "Escape" && (N(!1), K(""));
843
+ },
844
+ placeholder: a(d, "files.browser.newFolderDialog.placeholder", "Folder name"),
845
+ autoFocus: !0,
846
+ className: "w-full px-4 py-3 border-2 border-border-default rounded-lg focus:outline-none focus:border-action-primary-border text-sm transition-colors duration-200"
847
+ }),
848
+ /* @__PURE__ */ u("div", {
849
+ className: "flex justify-end gap-2 mt-6",
850
+ children: [/* @__PURE__ */ l("button", {
851
+ onClick: () => {
852
+ N(!1), K("");
853
+ },
854
+ className: "px-6 py-2.5 text-sm font-medium text-text-primary hover:bg-action-ghost-bg-hover rounded-lg transition-colors duration-200",
855
+ children: a(d, "files.common.actions.cancel", "Cancel")
856
+ }), /* @__PURE__ */ u("button", {
857
+ onClick: tn,
858
+ disabled: !G.trim() || $.isPending,
859
+ className: "px-6 py-2.5 text-sm font-medium text-text-inverse bg-action-primary-bg rounded-lg hover:bg-action-primary-bg-hover disabled:bg-bg-muted disabled:text-text-tertiary disabled:cursor-not-allowed transition-colors duration-200 flex items-center gap-2",
860
+ children: [$.isPending && /* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), $.isPending ? a(d, "files.browser.newFolderDialog.actions.creating", "Creating...") : a(d, "files.common.actions.create", "Create")]
861
+ })]
862
+ })
863
+ ]
864
+ })
865
+ }),
866
+ bt && V && /* @__PURE__ */ l("div", {
867
+ className: "fixed inset-0 backdrop-blur-sm flex items-center justify-center z-[100] animate-in fade-in duration-200",
868
+ role: "dialog",
869
+ "aria-modal": "true",
870
+ "aria-labelledby": "files-rename-title",
871
+ children: /* @__PURE__ */ u("div", {
872
+ className: "bg-bg-surface rounded-lg shadow-xl p-6 w-full max-w-xs mx-4 animate-in zoom-in-95 duration-200",
873
+ children: [
874
+ /* @__PURE__ */ l("h2", {
875
+ id: "files-rename-title",
876
+ className: "text-base font-semibold text-text-primary mb-4",
877
+ children: a(d, "files.browser.renameDialog.title", "Rename {{type}}", { type: V.type })
878
+ }),
879
+ /* @__PURE__ */ l("input", {
880
+ type: "text",
881
+ value: U,
882
+ onChange: (e) => W(e.target.value),
883
+ onKeyDown: (e) => {
884
+ e.key === "Enter" && En(), e.key === "Escape" && (P(!1), H(null), W(""));
885
+ },
886
+ placeholder: a(d, "files.browser.renameDialog.placeholder", "New name"),
887
+ autoFocus: !0,
888
+ className: "w-full px-4 py-3 border-2 border-border-default rounded-lg focus:outline-none focus:border-action-primary-border text-sm transition-colors duration-200"
889
+ }),
890
+ /* @__PURE__ */ u("div", {
891
+ className: "flex justify-end gap-2 mt-6",
892
+ children: [/* @__PURE__ */ l("button", {
893
+ onClick: () => {
894
+ P(!1), H(null), W("");
895
+ },
896
+ className: "px-6 py-2.5 text-sm font-medium text-text-primary hover:bg-action-ghost-bg-hover rounded-lg transition-colors duration-200",
897
+ children: a(d, "files.common.actions.cancel", "Cancel")
898
+ }), /* @__PURE__ */ u("button", {
899
+ onClick: En,
900
+ disabled: !U.trim() || U.trim() === V.name || zt.isPending || Bt.isPending,
901
+ className: "px-6 py-2.5 text-sm font-medium text-text-inverse bg-action-primary-bg rounded-lg hover:bg-action-primary-bg-hover disabled:bg-bg-muted disabled:text-text-tertiary disabled:cursor-not-allowed transition-colors duration-200 flex items-center gap-2",
902
+ children: [(zt.isPending || Bt.isPending) && /* @__PURE__ */ l(s, { className: "size-4 animate-spin" }), zt.isPending || Bt.isPending ? a(d, "files.browser.renameDialog.actions.renaming", "Renaming...") : a(d, "files.common.actions.rename", "Rename")]
903
+ })]
904
+ })
905
+ ]
906
+ })
907
+ }),
908
+ xt && Tt && /* @__PURE__ */ l(we, {
909
+ item: Tt,
910
+ itemType: "mimeType" in Tt ? "file" : "folder",
911
+ onClose: () => {
912
+ F(!1), L(null);
913
+ },
914
+ onCreateShare: on,
915
+ isLoading: Vt.isPending
916
+ }),
917
+ X && /* @__PURE__ */ l(Me, {
918
+ title: X.title,
919
+ description: X.description,
920
+ confirmLabel: X.confirmLabel,
921
+ cancelLabel: a(d, "files.common.actions.cancel", "Cancel"),
922
+ variant: X.variant,
923
+ loading: X.loading,
924
+ onConfirm: At,
925
+ onCancel: () => {
926
+ X.loading || Z(null);
927
+ }
928
+ }),
929
+ St && R && /* @__PURE__ */ l(Ae, {
930
+ item: R.item,
931
+ type: R.type,
932
+ onClose: () => {
933
+ I(!1), z(null);
934
+ },
935
+ onMove: wn,
936
+ isLoading: Wt.isPending || Gt.isPending
937
+ }),
938
+ Ct && B && /* @__PURE__ */ l(je, {
939
+ item: B.item,
940
+ type: B.type,
941
+ onClose: () => {
942
+ wt(!1), Et(null);
943
+ },
944
+ onCopy: Tn,
945
+ isLoading: Ut.isPending
946
+ }),
947
+ b && /* @__PURE__ */ l(Te, {
948
+ file: b,
949
+ onClose: () => _t(null),
950
+ onDownload: () => {
951
+ Ie(b.downloadUrl || b.url);
952
+ },
953
+ onShare: _ === "bin" ? void 0 : () => {
954
+ L(b), F(!0);
955
+ },
956
+ onStar: _ === "bin" ? void 0 : () => un(b),
957
+ onDelete: () => _ === "bin" ? ln(b) : sn(b)
958
+ }),
959
+ ht && /* @__PURE__ */ l(Ee, {
960
+ item: ht.item,
961
+ type: ht.type,
962
+ onClose: () => gt(null)
963
+ }),
964
+ /* @__PURE__ */ l(Ne, {
965
+ items: Ot,
966
+ isOpen: kt,
967
+ onClose: () => Y(!1),
968
+ onPause: Yt,
969
+ onResume: Xt,
970
+ onRetry: Zt,
971
+ onCancel: Qt
972
+ }),
973
+ /* @__PURE__ */ l(Oe, {
974
+ toasts: x.toasts,
975
+ onClose: x.removeToast
976
+ }),
977
+ !k && D.length === 0 && O.length === 0 && /* @__PURE__ */ l("div", {
978
+ className: "px-6 py-12",
979
+ children: y ? /* @__PURE__ */ u("div", {
980
+ className: "text-center animate-in fade-in duration-300",
981
+ children: [
982
+ /* @__PURE__ */ l("div", {
983
+ className: "inline-flex items-center justify-center size-16 bg-bg-muted rounded-full mb-4",
984
+ children: /* @__PURE__ */ l(qe, { className: "size-8 text-text-tertiary" })
985
+ }),
986
+ /* @__PURE__ */ l("h3", {
987
+ className: "text-lg font-medium text-text-primary mb-2",
988
+ children: a(d, "files.browser.empty.search.title", "No results found")
989
+ }),
990
+ /* @__PURE__ */ l("p", {
991
+ className: "text-sm text-text-secondary mb-4",
992
+ children: a(d, "files.browser.empty.search.description", "Try adjusting your search query or filters")
993
+ }),
994
+ /* @__PURE__ */ l("button", {
995
+ onClick: () => {
996
+ ft(""), mt(void 0);
997
+ },
998
+ 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",
999
+ children: a(d, "files.browser.search.clear", "Clear search")
1000
+ })
1001
+ ]
1002
+ }) : /* @__PURE__ */ l(De, {
1003
+ type: _,
1004
+ onUpload: _ === "all" ? qt : void 0,
1005
+ onNewFolder: _ === "all" ? en : void 0
1006
+ })
1007
+ })
1008
+ ]
1009
+ });
1010
+ }
1011
+ //#endregion
1012
+ export { d as BrowserPage };
1013
+
1014
+ //# sourceMappingURL=BrowserPage.js.map