@brftech/filex-core 0.1.56

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 (88) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +108 -0
  3. package/dist/ArchiveViewer-CJdaw5x3.js +99 -0
  4. package/dist/ArchiveViewer-CJdaw5x3.js.map +1 -0
  5. package/dist/CsvViewer-QYx_tePQ.js +132 -0
  6. package/dist/CsvViewer-QYx_tePQ.js.map +1 -0
  7. package/dist/DrawioViewer-GWt0TyB7.js +141 -0
  8. package/dist/DrawioViewer-GWt0TyB7.js.map +1 -0
  9. package/dist/EpubViewer-Je0ywklQ.js +146 -0
  10. package/dist/EpubViewer-Je0ywklQ.js.map +1 -0
  11. package/dist/IpynbViewer-TsB4gqP-.js +175 -0
  12. package/dist/IpynbViewer-TsB4gqP-.js.map +1 -0
  13. package/dist/MermaidViewer-CXfeDS-7.js +128 -0
  14. package/dist/MermaidViewer-CXfeDS-7.js.map +1 -0
  15. package/dist/PsdViewer-VtPpxKVe.js +113 -0
  16. package/dist/PsdViewer-VtPpxKVe.js.map +1 -0
  17. package/dist/TiffViewer-OINn9bbb.js +133 -0
  18. package/dist/TiffViewer-OINn9bbb.js.map +1 -0
  19. package/dist/UTIF-Cjsrlm0l.js +3104 -0
  20. package/dist/UTIF-Cjsrlm0l.js.map +1 -0
  21. package/dist/Viewer3D-xvvyiWHd.js +61 -0
  22. package/dist/Viewer3D-xvvyiWHd.js.map +1 -0
  23. package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
  24. package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  25. package/dist/filex-core.js +26 -0
  26. package/dist/filex-core.js.map +1 -0
  27. package/dist/filex-core.umd.cjs +285 -0
  28. package/dist/filex-core.umd.cjs.map +1 -0
  29. package/dist/index-CmSYzt6L.js +5404 -0
  30. package/dist/index-CmSYzt6L.js.map +1 -0
  31. package/dist/index-UFULWo35.js +10736 -0
  32. package/dist/index-UFULWo35.js.map +1 -0
  33. package/dist/index.d.ts +1089 -0
  34. package/dist/katex-yuB6V-q6.js +11616 -0
  35. package/dist/katex-yuB6V-q6.js.map +1 -0
  36. package/dist/papaparse.min-VB1HBwYX.js +441 -0
  37. package/dist/papaparse.min-VB1HBwYX.js.map +1 -0
  38. package/dist/style.css +1 -0
  39. package/dist/useViewerFetch-czqbd2Lj.js +25 -0
  40. package/dist/useViewerFetch-czqbd2Lj.js.map +1 -0
  41. package/package.json +113 -0
  42. package/src/FileExplorer.vue +1872 -0
  43. package/src/components/Breadcrumb.vue +282 -0
  44. package/src/components/ContextMenu.vue +152 -0
  45. package/src/components/GridView.vue +166 -0
  46. package/src/components/ListView.vue +212 -0
  47. package/src/components/PendingOpsTray.vue +91 -0
  48. package/src/components/RecentlyOpened.vue +155 -0
  49. package/src/components/StarButton.vue +101 -0
  50. package/src/components/TagPicker.vue +184 -0
  51. package/src/components/Toolbar.vue +220 -0
  52. package/src/components/UploadProgress.vue +78 -0
  53. package/src/composables/useFileApi.ts +692 -0
  54. package/src/composables/useKeyboardShortcuts.ts +144 -0
  55. package/src/composables/useLocale.ts +60 -0
  56. package/src/composables/useMonacoLoader.ts +98 -0
  57. package/src/composables/usePendingOps.ts +200 -0
  58. package/src/composables/useSelection.ts +81 -0
  59. package/src/composables/useUploadChunked.ts +250 -0
  60. package/src/composables/useViewerFetch.ts +58 -0
  61. package/src/index.ts +80 -0
  62. package/src/locales/en.ts +122 -0
  63. package/src/locales/index.ts +12 -0
  64. package/src/locales/tr.ts +122 -0
  65. package/src/modals/ConvertModal.vue +254 -0
  66. package/src/modals/DeleteConfirmModal.vue +32 -0
  67. package/src/modals/Modal.vue +104 -0
  68. package/src/modals/NewFolderModal.vue +64 -0
  69. package/src/modals/PermissionsModal.vue +815 -0
  70. package/src/modals/PreviewModal.vue +1070 -0
  71. package/src/modals/RenameModal.vue +58 -0
  72. package/src/modals/ShareModal.vue +135 -0
  73. package/src/styles/base.css +1224 -0
  74. package/src/styles/variables.css +90 -0
  75. package/src/types/ExplorerConfig.ts +282 -0
  76. package/src/types/FileNode.ts +136 -0
  77. package/src/types/index.ts +27 -0
  78. package/src/types/peers.d.ts +45 -0
  79. package/src/viewers/ArchiveViewer.vue +186 -0
  80. package/src/viewers/CsvViewer.vue +319 -0
  81. package/src/viewers/DrawioViewer.vue +243 -0
  82. package/src/viewers/EpubViewer.vue +307 -0
  83. package/src/viewers/IpynbViewer.vue +365 -0
  84. package/src/viewers/MermaidViewer.vue +259 -0
  85. package/src/viewers/PdfViewer.vue +562 -0
  86. package/src/viewers/PsdViewer.vue +264 -0
  87. package/src/viewers/TiffViewer.vue +273 -0
  88. package/src/viewers/Viewer3D.vue +120 -0
@@ -0,0 +1,1089 @@
1
+ import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
3
+ import { ComputedRef } from 'vue';
4
+ import { CreateComponentPublicInstanceWithMixins } from 'vue';
5
+ import { DefineComponent } from 'vue';
6
+ import { GlobalComponents } from 'vue';
7
+ import { GlobalDirectives } from 'vue';
8
+ import { PublicProps } from 'vue';
9
+ import { Ref } from 'vue';
10
+
11
+ declare type __VLS_Props = {
12
+ config: ExplorerConfig;
13
+ };
14
+
15
+ declare type __VLS_Props_2 = {
16
+ open: boolean;
17
+ locale: LocaleCode;
18
+ file: FileNode | null;
19
+ previewUrl: (path: string) => string;
20
+ downloadUrl: (path: string) => string;
21
+ onlyOfficeBase?: string | null;
22
+ onlyOfficeConfigEndpoint?: string | null;
23
+ saveTextEndpoint?: string | null;
24
+ openMode?: 'edit' | 'view';
25
+ authHeaders?: () => Record<string, string>;
26
+ authCredentials?: RequestCredentials;
27
+ /** New rich-viewer config (forwarded by FileExplorer from ExplorerConfig). */
28
+ drawioUrl?: string | null;
29
+ pdfWorkerUrl?: string | null;
30
+ pdfSaveUrl?: string | null;
31
+ /** Standalone full-screen viewer route — `?path=…&storage=…&type=…`. */
32
+ viewerBaseUrl?: string | null;
33
+ /** Drop the dialog chrome (backdrop tint, header bar, footer actions)
34
+ * so the viewer fills the full viewport. Used by the standalone
35
+ * /files/edit route where the browser tab IS the container — a
36
+ * modal frame on top of the editor just steals real estate. */
37
+ chromeless?: boolean;
38
+ /** When the dynamic-viewer chunk fails to load, fall back to the
39
+ * legacy native renderer (e.g. native `<object>` for PDFs). */
40
+ /** Explicit theme. Forwarded to the underlying Modal (which tags
41
+ * its backdrop with `.fe--theme-{light,dark}` so the CSS variable
42
+ * override matches the host admin shell) and to Monaco (vs vs
43
+ * vs-dark). When unset Monaco falls back to `prefers-color-scheme`
44
+ * and the modal cascade follows whatever `.fe` parent it gets. */
45
+ theme?: 'light' | 'dark' | 'auto';
46
+ };
47
+
48
+ declare type __VLS_Props_3 = {
49
+ starred: boolean;
50
+ nodeId: number;
51
+ apiBase?: string;
52
+ /** Auth header builder injected by the parent file explorer. */
53
+ authHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
54
+ /** Compact mode for grid view (no label, just the icon). */
55
+ compact?: boolean;
56
+ };
57
+
58
+ declare type __VLS_Props_4 = {
59
+ nodeId: number;
60
+ apiBase?: string;
61
+ authHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
62
+ /** Optional list of palette swatches; one is picked per tag deterministically. */
63
+ palette?: string[];
64
+ };
65
+
66
+ declare type __VLS_Props_5 = {
67
+ apiBase?: string;
68
+ authHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
69
+ limit?: number;
70
+ /** Optional refresh trigger — incrementing this re-fetches. */
71
+ refreshKey?: number | string;
72
+ };
73
+
74
+ export declare interface ArchiveEntry {
75
+ name: string;
76
+ size: number;
77
+ isDir: boolean;
78
+ lastModified?: number;
79
+ }
80
+
81
+ /**
82
+ * ExplorerConfig — props passed to the FileExplorer component.
83
+ *
84
+ * Two equivalent ways to wire it up:
85
+ *
86
+ * 1. New clean API (preferred — RESTful, server-agnostic):
87
+ * { apiBase: 'https://files.example.com', auth: { kind: 'bearer', token } }
88
+ * → URLs like `${apiBase}/api/files/manager`, `${apiBase}/api/files/upload/init`.
89
+ *
90
+ * 2. Legacy API (Vuefinder-compat — for embedders that mounted the
91
+ * old `@brftech/file-explorer` package against their own routes):
92
+ * { endpoint: '/api/files/manager', uploadInit: '/api/files/upload/init', … }
93
+ * → caller fully controls every URL.
94
+ *
95
+ * If both `apiBase` AND any explicit `endpoint`/`uploadInit`/etc. are
96
+ * present, the explicit field wins (lets you override one route while
97
+ * keeping the auto-derived rest).
98
+ */
99
+ /**
100
+ * Auth strategy. Discriminated union so request building is type-safe.
101
+ *
102
+ * - `bearer` — `Authorization: Bearer <token>`. Token may be a string
103
+ * OR a sync/async function (auto-refresh).
104
+ * - `csrf` — `X-CSRF-TOKEN` + `credentials: include` (Laravel/Filament).
105
+ * - `basic` — `Authorization: Basic <base64(user:pass)>`.
106
+ * - `none` — no auth (development / public sandbox).
107
+ */
108
+ export declare type AuthConfig = {
109
+ kind: 'bearer';
110
+ token: string | (() => string | Promise<string>);
111
+ } | {
112
+ kind: 'csrf';
113
+ csrf: string;
114
+ } | {
115
+ kind: 'basic';
116
+ user: string;
117
+ pass: string;
118
+ } | {
119
+ kind: 'none';
120
+ }
121
+ /**
122
+ * Legacy `type` field (back-compat with @brftech/file-explorer 0.1.0).
123
+ * Internally normalized to the `kind`-tagged shape.
124
+ */
125
+ | {
126
+ type: 'bearer';
127
+ token: string;
128
+ } | {
129
+ type: 'csrf';
130
+ csrf: string;
131
+ };
132
+
133
+ export declare interface Capabilities {
134
+ ffmpeg?: boolean;
135
+ ghostscript?: boolean;
136
+ libreoffice?: boolean;
137
+ onlyoffice_url?: string | null;
138
+ drawio_url?: string | null;
139
+ convert_url?: string | null;
140
+ max_chunk_mb?: number;
141
+ upload_limit_mb?: number;
142
+ external?: {
143
+ onlyoffice?: ExternalServiceStatus;
144
+ drawio?: ExternalServiceStatus;
145
+ mermaid?: ExternalServiceStatus;
146
+ };
147
+ }
148
+
149
+ export declare interface ClipboardState {
150
+ mode: 'cut' | 'copy' | null;
151
+ items: FileNode[];
152
+ sourcePath: string | null;
153
+ }
154
+
155
+ declare interface ContextAction {
156
+ key: string;
157
+ label: string;
158
+ icon?: string;
159
+ danger?: boolean;
160
+ disabled?: boolean;
161
+ hidden?: boolean;
162
+ divider?: boolean;
163
+ }
164
+
165
+ /** English UI strings. */
166
+ export declare const en: Record<string, string>;
167
+
168
+ /**
169
+ * Resolved endpoint map. `useFileApi` derives this once on construction
170
+ * — components never need to think about config/apiBase precedence.
171
+ */
172
+ export declare interface EndpointMap {
173
+ manager: string;
174
+ uploadInit: string | null;
175
+ uploadFinalize: string | null;
176
+ uploadAbort: string | null;
177
+ shareCreate: string | null;
178
+ shareList: string | null;
179
+ shareDelete: string | null;
180
+ limits: string | null;
181
+ capabilities: string | null;
182
+ archiveList: string | null;
183
+ archiveExtract: string | null;
184
+ archiveAdd: string | null;
185
+ copy: string | null;
186
+ moveAsync: string | null;
187
+ deleteAsync: string | null;
188
+ opsList: string | null;
189
+ opsShow: string | null;
190
+ onlyOfficeConfig: string | null;
191
+ saveText: string | null;
192
+ restore: string | null;
193
+ trashList: string | null;
194
+ trashRestore: string | null;
195
+ }
196
+
197
+ export declare function ensureHighlight(): Promise<unknown | null>;
198
+
199
+ /**
200
+ * Resolve Monaco. If preload hasn't been kicked off yet, this triggers
201
+ * it (and pays the load cost on the spot). Returns `null` when the
202
+ * package isn't installed.
203
+ */
204
+ export declare function ensureMonaco(): Promise<unknown | null>;
205
+
206
+ export declare interface ExplorerConfig {
207
+ /**
208
+ * Modern shorthand: URL prefix for the standard /api/files/* layout.
209
+ * Example: `https://files.example.com` → `${apiBase}/api/files/manager`,
210
+ * `${apiBase}/api/files/upload/init`, etc. Any explicit endpoint*
211
+ * field below overrides the derived URL.
212
+ */
213
+ apiBase?: string;
214
+ /** Legacy main endpoint (Vuefinder-compat: GET/POST `?q=…`). */
215
+ endpoint?: string;
216
+ uploadInit?: string;
217
+ uploadFinalize?: string;
218
+ uploadAbort?: string;
219
+ shareCreate?: string;
220
+ shareList?: string;
221
+ /** DELETE template; `{uuid}` placeholder is replaced at call time. */
222
+ shareDelete?: string;
223
+ limits?: string;
224
+ capabilities?: string;
225
+ archiveList?: string;
226
+ archiveExtract?: string;
227
+ archiveAdd?: string;
228
+ /** Recursive S3-side copy with "-copy" collision suffix (async). */
229
+ copy?: string;
230
+ /** Async move endpoint — returns {op}, client polls /opsList. */
231
+ moveAsync?: string;
232
+ /** Async delete endpoint — returns {op}, client polls /opsList. */
233
+ deleteAsync?: string;
234
+ /** Pending ops list endpoint (poll target). */
235
+ opsList?: string;
236
+ /** Single op show endpoint — `{id}` placeholder. */
237
+ opsShow?: string;
238
+ /**
239
+ * OnlyOffice config endpoint. Backend POST returns
240
+ * `{ config, documentServerUrl }` where `config` is a JWT-signed
241
+ * DocEditor config. PreviewModal mounts the editor against this
242
+ * when the user opens an office file with mode=edit.
243
+ */
244
+ onlyOfficeConfig?: string;
245
+ /**
246
+ * Standalone editor page base — when set, "Aç" on an office file
247
+ * opens `${openPageBase}?path=...&mode=edit` in a new tab instead
248
+ * of the modal preview.
249
+ */
250
+ openPageBase?: string;
251
+ /**
252
+ * Plain-text save endpoint — POST `{path, content}`. When set, code
253
+ * preview gains an editable mode + save button. Falsy = read-only.
254
+ */
255
+ saveText?: string;
256
+ /**
257
+ * Trash restore endpoint — `POST {source: string[]}`. When set, a
258
+ * "Geri Getir" action shows up in `.trash/` listings.
259
+ */
260
+ restore?: string;
261
+ /** filex trash listing endpoint — `GET → { entries: TrashEntry[] }`. */
262
+ trashList?: string;
263
+ /** filex trash restore endpoint — `POST { node_id }`. */
264
+ trashRestore?: string;
265
+ /** Public share base URL — `${shareBase}/${uuid}` */
266
+ shareBase?: string;
267
+ /** Auth strategy (see AuthConfig). */
268
+ auth?: AuthConfig;
269
+ /** Show the virtual `.trash/` entry in the root listing. */
270
+ trashVisible?: boolean;
271
+ /** UI dil kodu */
272
+ locale?: LocaleCode;
273
+ /** OnlyOffice iframe base (e.g. `https://docs.example.com`). */
274
+ onlyOfficeBase?: string;
275
+ /** Drawio iframe base. */
276
+ drawioBase?: string;
277
+ /** Universal converter (p2r3/convert fork) iframe base, e.g. `https://fm.example.com/convert`. */
278
+ convertBase?: string;
279
+ /**
280
+ * Drawio embed URL (full URL to the embed endpoint). Defaults to
281
+ * `https://embed.diagrams.net`. The DrawioViewer iframes this with
282
+ * `?embed=1&proto=json` postMessage handshake to load + save XML.
283
+ */
284
+ drawioUrl?: string;
285
+ /**
286
+ * Optional URL where serialized PDF annotations / form data is
287
+ * persisted. POST `{ path, base64 }` — the rich PdfViewer uses
288
+ * `pdf.saveDocument()` and forwards the saved bytes here when the
289
+ * user clicks the save annotation button.
290
+ */
291
+ pdfSaveUrl?: string;
292
+ /**
293
+ * Override the pdf.js worker URL. Defaults to a CDN copy matching
294
+ * the version pdfjs-dist resolves to at runtime — hosts can pin
295
+ * their own self-hosted worker for CSP-strict environments.
296
+ */
297
+ pdfWorkerUrl?: string;
298
+ /**
299
+ * Standalone full-screen viewer route. The PreviewModal toolbar's
300
+ * "Open in new tab" button navigates to
301
+ * `${viewerBaseUrl}?path=…&storage=…&type=…`. The consumer wires
302
+ * that route to mount the same viewer fullscreen (admin UI / fishapp
303
+ * embed). Defaults to `/files/viewer`.
304
+ */
305
+ viewerBaseUrl?: string;
306
+ /** Upload chunk size (bytes). Default 5 MB. */
307
+ chunkSize?: number;
308
+ /** Parallel chunks. Default 4. */
309
+ parallelChunks?: number;
310
+ /** Theme. */
311
+ theme?: ThemeMode;
312
+ /** Initial path (storage-prefix included: `local://`). Default: root. */
313
+ initialPath?: string;
314
+ /**
315
+ * Confine the explorer to this folder (qualified: `main://projeler/acme`).
316
+ * The UI opens here, hides the multi-storage drives root, and blocks
317
+ * navigation above it. SECURITY IS NOT THIS — enforce it server-side with an
318
+ * X-Filex-Root header / root-scoped API token; this is the clean-embed UX.
319
+ */
320
+ rootPath?: string;
321
+ /** Whether the info panel toggle is visible. */
322
+ showInfoPanel?: boolean;
323
+ /** Default view. */
324
+ viewMode?: 'list' | 'grid';
325
+ /** Override max upload size (MB) — falls back to /limits otherwise. */
326
+ maxFileSizeMb?: number;
327
+ /** Accept patterns (MIME or extension). Empty = unrestricted. */
328
+ acceptTypes?: string[];
329
+ /** Storage adapter to default to (avoids the initial flash). */
330
+ defaultAdapter?: string;
331
+ /**
332
+ * Where to persist the current path so reload lands the user back
333
+ * in the same folder.
334
+ * 'hash' — URL hash. Default — works on plain web pages.
335
+ * 'localStorage' — `brf-file-explorer:path` key. Best for SPAs that
336
+ * already own the URL (Ionic / Vue Router / Next).
337
+ * 'none' — don't persist. Embedder controls path externally.
338
+ */
339
+ pathPersist?: 'hash' | 'localStorage' | 'none';
340
+ /**
341
+ * Multi-storage root mode. When true, the explorer's "/" virtual
342
+ * folder lists every entry in `storages` as a clickable directory.
343
+ * Clicking one drills into that storage's root; the breadcrumb
344
+ * walks `/ › <storage> › <sub> › …`.
345
+ *
346
+ * When false (default) the SFC still works against a single
347
+ * storage — `defaultAdapter` / `initialPath` decide which one.
348
+ *
349
+ * Pair with `storages` so the SFC has labels + driver hints to
350
+ * render even before the first API call.
351
+ */
352
+ multiStorageRoot?: boolean;
353
+ /**
354
+ * Storage list for `multiStorageRoot` mode. Provide name + driver
355
+ * + (optional) display label / read-only flag. The SFC mirrors
356
+ * each entry as a virtual `dir` row at "/".
357
+ */
358
+ storages?: Array<{
359
+ name: string;
360
+ label?: string;
361
+ driver?: string;
362
+ readOnly?: boolean;
363
+ }>;
364
+ }
365
+
366
+ /** Component emits — the parent listens for these events. */
367
+ export declare interface ExplorerEmits {
368
+ 'share-created': (payload: {
369
+ path: string;
370
+ url: string;
371
+ pin: string | null;
372
+ }) => void;
373
+ 'file-opened': (file: {
374
+ path: string;
375
+ basename: string;
376
+ }) => void;
377
+ error: (err: {
378
+ message: string;
379
+ context?: unknown;
380
+ }) => void;
381
+ 'upload-progress': (p: {
382
+ uploadId: string;
383
+ percent: number;
384
+ done: boolean;
385
+ }) => void;
386
+ 'selection-change': (items: Array<{
387
+ path: string;
388
+ basename: string;
389
+ type: 'file' | 'dir';
390
+ }>) => void;
391
+ }
392
+
393
+ export declare type ExternalServiceState = 'ok' | 'error' | 'disabled' | 'unknown';
394
+
395
+ export declare interface ExternalServiceStatus {
396
+ enabled: boolean;
397
+ state: ExternalServiceState;
398
+ url?: string;
399
+ last_check?: string;
400
+ detail?: string;
401
+ }
402
+
403
+ export declare type FileApi = ReturnType<typeof useFileApi>;
404
+
405
+ export declare const FileExplorer: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
406
+ error: (err: {
407
+ message: string;
408
+ context?: unknown;
409
+ }) => any;
410
+ "share-created": (payload: {
411
+ path: string;
412
+ url: string;
413
+ pin: string | null;
414
+ }) => any;
415
+ "file-opened": (file: {
416
+ path: string;
417
+ basename: string;
418
+ }) => any;
419
+ "upload-progress": (p: {
420
+ uploadId: string;
421
+ percent: number;
422
+ done: boolean;
423
+ }) => any;
424
+ "selection-change": (items: {
425
+ path: string;
426
+ basename: string;
427
+ type: "file" | "dir";
428
+ }[]) => any;
429
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
430
+ onError?: ((err: {
431
+ message: string;
432
+ context?: unknown;
433
+ }) => any) | undefined;
434
+ "onShare-created"?: ((payload: {
435
+ path: string;
436
+ url: string;
437
+ pin: string | null;
438
+ }) => any) | undefined;
439
+ "onFile-opened"?: ((file: {
440
+ path: string;
441
+ basename: string;
442
+ }) => any) | undefined;
443
+ "onUpload-progress"?: ((p: {
444
+ uploadId: string;
445
+ percent: number;
446
+ done: boolean;
447
+ }) => any) | undefined;
448
+ "onSelection-change"?: ((items: {
449
+ path: string;
450
+ basename: string;
451
+ type: "file" | "dir";
452
+ }[]) => any) | undefined;
453
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
454
+ rootEl: HTMLDivElement;
455
+ toolbarRef: CreateComponentPublicInstanceWithMixins<Readonly<{
456
+ viewMode: ViewMode;
457
+ searchQuery: string;
458
+ trashActive: boolean;
459
+ actions: ContextAction[];
460
+ selectionMode?: SelectionMode_2;
461
+ pasteEnabled?: boolean;
462
+ convertEnabled?: boolean;
463
+ canGoUp?: boolean;
464
+ atVirtualRoot?: boolean;
465
+ canWrite?: boolean;
466
+ locale: LocaleCode;
467
+ }> & Readonly<{
468
+ onAction?: ((key: string) => any) | undefined;
469
+ onUpload?: (() => any) | undefined;
470
+ "onUpdate:viewMode"?: ((v: ViewMode) => any) | undefined;
471
+ "onUpdate:searchQuery"?: ((v: string) => any) | undefined;
472
+ "onNew-folder"?: (() => any) | undefined;
473
+ onRefresh?: (() => any) | undefined;
474
+ "onGo-up"?: (() => any) | undefined;
475
+ "onOpen-recents"?: (() => any) | undefined;
476
+ }>, {
477
+ focusSearch: () => void;
478
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
479
+ action: (key: string) => any;
480
+ upload: () => any;
481
+ "update:viewMode": (v: ViewMode) => any;
482
+ "update:searchQuery": (v: string) => any;
483
+ "new-folder": () => any;
484
+ refresh: () => any;
485
+ "go-up": () => any;
486
+ "open-recents": () => any;
487
+ }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
488
+ searchEl: HTMLInputElement;
489
+ }, HTMLDivElement, ComponentProvideOptions, {
490
+ P: {};
491
+ B: {};
492
+ D: {};
493
+ C: {};
494
+ M: {};
495
+ Defaults: {};
496
+ }, Readonly<{
497
+ viewMode: ViewMode;
498
+ searchQuery: string;
499
+ trashActive: boolean;
500
+ actions: ContextAction[];
501
+ selectionMode?: SelectionMode_2;
502
+ pasteEnabled?: boolean;
503
+ convertEnabled?: boolean;
504
+ canGoUp?: boolean;
505
+ atVirtualRoot?: boolean;
506
+ canWrite?: boolean;
507
+ locale: LocaleCode;
508
+ }> & Readonly<{
509
+ onAction?: ((key: string) => any) | undefined;
510
+ onUpload?: (() => any) | undefined;
511
+ "onUpdate:viewMode"?: ((v: ViewMode) => any) | undefined;
512
+ "onUpdate:searchQuery"?: ((v: string) => any) | undefined;
513
+ "onNew-folder"?: (() => any) | undefined;
514
+ onRefresh?: (() => any) | undefined;
515
+ "onGo-up"?: (() => any) | undefined;
516
+ "onOpen-recents"?: (() => any) | undefined;
517
+ }>, {
518
+ focusSearch: () => void;
519
+ }, {}, {}, {}, {}> | null;
520
+ ctxRef: CreateComponentPublicInstanceWithMixins<Readonly<{
521
+ locale: LocaleCode;
522
+ actions: ContextAction[];
523
+ theme?: ThemeMode;
524
+ }> & Readonly<{
525
+ onSelect?: ((action: ContextAction, target: FileNode[]) => any) | undefined;
526
+ }>, {
527
+ show: (ev: {
528
+ clientX: number;
529
+ clientY: number;
530
+ }, nodes: FileNode[]) => Promise<void>;
531
+ hide: () => void;
532
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
533
+ select: (action: ContextAction, target: FileNode[]) => any;
534
+ }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
535
+ menuEl: HTMLDivElement;
536
+ }, any, ComponentProvideOptions, {
537
+ P: {};
538
+ B: {};
539
+ D: {};
540
+ C: {};
541
+ M: {};
542
+ Defaults: {};
543
+ }, Readonly<{
544
+ locale: LocaleCode;
545
+ actions: ContextAction[];
546
+ theme?: ThemeMode;
547
+ }> & Readonly<{
548
+ onSelect?: ((action: ContextAction, target: FileNode[]) => any) | undefined;
549
+ }>, {
550
+ show: (ev: {
551
+ clientX: number;
552
+ clientY: number;
553
+ }, nodes: FileNode[]) => Promise<void>;
554
+ hide: () => void;
555
+ }, {}, {}, {}, {}> | null;
556
+ fileInputEl: HTMLInputElement;
557
+ }, HTMLDivElement>;
558
+
559
+ /**
560
+ * FileNode — node shape returned by the manager endpoint.
561
+ *
562
+ * Backend `?q=index` (or `GET /api/files/manager?action=index`) returns:
563
+ * { adapter, storages, dirname, files: FileNode[] }
564
+ */
565
+ export declare interface FileNode {
566
+ /** DB node ID — needed by the per-user meta routes (starred, tags,
567
+ * recently-opened). Backend's projectFileNodes() emits it for every
568
+ * row; only client-synthesized rows (e.g. multi-storage virtual
569
+ * folders) lack one. */
570
+ id?: number;
571
+ /** Full adapter-qualified path: `local://receipts/2024/invoice.pdf` */
572
+ path: string;
573
+ /** Relative basename: `invoice.pdf` */
574
+ basename: string;
575
+ /** Adapter-stripped relative path: `receipts/2024/invoice.pdf` */
576
+ relativePath?: string;
577
+ /** `file` or `dir` */
578
+ type: 'file' | 'dir';
579
+ /** Extension (lowercased, no dot). Empty string = no extension. */
580
+ extension?: string;
581
+ /** Bytes. 0 = directory. */
582
+ size?: number;
583
+ /** Unix ms (backend "last_modified"). */
584
+ last_modified?: number;
585
+ /** MIME. */
586
+ mime_type?: string;
587
+ /** Optional thumbnail URL (backend may inline). */
588
+ thumb_url?: string | null;
589
+ /** Visibility: private | public. */
590
+ visibility?: 'private' | 'public';
591
+ /** File count for directories. */
592
+ count?: number;
593
+ /** Client-side tag (localStorage or backend). */
594
+ starred?: boolean;
595
+ /** Hex color tag. */
596
+ color?: string | null;
597
+ /** Server-side trash marker. */
598
+ trashed?: boolean;
599
+ /** RBAC effective level for the current user on this entry (backend
600
+ * projectFileNodes emits it when a storage has RBAC on). '' / undefined =
601
+ * ACL not enforced. Used to gate edit/manage affordances client-side. */
602
+ perm?: 'none' | 'viewer' | 'editor' | 'owner';
603
+ /** Generic — any additional fields the backend wants to inline. */
604
+ [k: string]: unknown;
605
+ }
606
+
607
+ export declare function getHighlight(): unknown | null;
608
+
609
+ /** Synchronous cached lookup — null if Monaco not yet ready or absent. */
610
+ export declare function getMonaco(): unknown | null;
611
+
612
+ /** A single ACL grant row (RBAC permissions panel). */
613
+ declare interface Grant {
614
+ id: number;
615
+ storage_id: number;
616
+ path_prefix: string;
617
+ user_id: number;
618
+ level: 'viewer' | 'editor' | 'owner';
619
+ user_email?: string;
620
+ user_display_name?: string;
621
+ inherited?: boolean;
622
+ }
623
+
624
+ declare interface InviteResponse {
625
+ mode: 'granted' | 'user_created' | 'shared';
626
+ user_id?: number;
627
+ url?: string;
628
+ temp_password?: string;
629
+ emailed: boolean;
630
+ }
631
+
632
+ /** Single source of truth for "is the IdP/editor/diagram service ready?".
633
+ * A capability is usable only when both flags say so — `enabled=true` but
634
+ * `state='error'` means an operator turned it on but a probe just failed,
635
+ * and we'd rather hide the entry than offer a button that 500s on click.
636
+ */
637
+ export declare function isExternalUsable(s: ExternalServiceStatus | undefined): boolean;
638
+
639
+ export declare type LocaleCode = 'tr' | 'en';
640
+
641
+ export declare interface ManagerResponse {
642
+ adapter: string;
643
+ storages: string[];
644
+ dirname: string;
645
+ read_only: boolean;
646
+ /** RBAC effective level for the current user on this directory ('' when ACL
647
+ * is not enforced on the storage). Gates the folder-level write actions. */
648
+ perm?: 'none' | 'viewer' | 'editor' | 'owner';
649
+ files: FileNode[];
650
+ }
651
+
652
+ export declare const messages: Record<LocaleCode, Record<string, string>>;
653
+
654
+ export declare interface PendingOp {
655
+ id: number;
656
+ op_type: 'copy' | 'move' | 'delete';
657
+ status: 'pending' | 'running' | 'done' | 'error';
658
+ progress_total: number;
659
+ progress_done: number;
660
+ target_path: string | null;
661
+ source_dir: string | null;
662
+ source_count: number;
663
+ error_message: string | null;
664
+ started_at: string | null;
665
+ finished_at: string | null;
666
+ created_at: string | null;
667
+ }
668
+
669
+ /** Server-side PendingOp DTO (mirror of Modules\FishApp\Models\PendingOp::toApiArray). */
670
+ export declare interface PendingOpDto {
671
+ id: number;
672
+ op_type: 'copy' | 'move' | 'delete';
673
+ status: 'pending' | 'running' | 'done' | 'error';
674
+ progress_total: number;
675
+ progress_done: number;
676
+ target_path: string | null;
677
+ source_dir: string | null;
678
+ source_count: number;
679
+ error_message: string | null;
680
+ started_at: string | null;
681
+ finished_at: string | null;
682
+ created_at: string | null;
683
+ }
684
+
685
+ declare interface PermissionsResponse {
686
+ path: string;
687
+ storage_rbac: boolean;
688
+ direct: Grant[];
689
+ inherited: Grant[];
690
+ effective: string;
691
+ }
692
+
693
+ /**
694
+ * useMonacoLoader — fire-and-forget Monaco preloader.
695
+ *
696
+ * The preview/edit flow wants Monaco when available (best-in-class
697
+ * editor) and highlight.js for read-only syntax colour as a graceful
698
+ * fallback. Monaco is heavy (~5 MB), so we kick off the dynamic import
699
+ * at module-init time — by the time the user clicks "edit" on a code
700
+ * file (typically several seconds in), the chunk is already cached.
701
+ *
702
+ * - `monacoPromise` resolves to the Monaco namespace, or `null`
703
+ * if the package is not installed (peer
704
+ * missing) / load fails.
705
+ * - `highlightPromise` resolves to the highlight.js export, or
706
+ * `null` similarly.
707
+ * - `getMonaco()` returns the cached module synchronously
708
+ * (after `await monacoPromise`) so a click
709
+ * handler doesn't re-trigger the import.
710
+ *
711
+ * Both modules are externalized in the bundler config — the consumer
712
+ * either declares them as direct deps (Monaco UX) or doesn't (the
713
+ * highlight.js read-only path takes over). No build-time hard dep here.
714
+ */
715
+ /**
716
+ * Kick off the Monaco import the first time someone calls
717
+ * `preloadEditor()` (typically the FileExplorer onMounted hook). Cheap
718
+ * to call repeatedly — only the first call actually triggers the
719
+ * dynamic import.
720
+ */
721
+ export declare function preloadEditor(): void;
722
+
723
+ export declare const PreviewModal: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
724
+ close: () => any;
725
+ }, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{
726
+ onClose?: (() => any) | undefined;
727
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
728
+ markdownEl: HTMLDivElement;
729
+ monacoEl: HTMLDivElement;
730
+ officeEl: HTMLDivElement;
731
+ }, any>;
732
+
733
+ export declare const RecentlyOpened: DefineComponent<__VLS_Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
734
+ error: (message: string) => any;
735
+ open: (node: RecentNode) => any;
736
+ }, string, PublicProps, Readonly<__VLS_Props_5> & Readonly<{
737
+ onError?: ((message: string) => any) | undefined;
738
+ onOpen?: ((node: RecentNode) => any) | undefined;
739
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
740
+
741
+ declare interface RecentNode {
742
+ id: number;
743
+ storage_id: number;
744
+ path: string;
745
+ name: string;
746
+ mime?: string;
747
+ last_opened?: string;
748
+ }
749
+
750
+ declare interface ResolveEmailResponse {
751
+ found: boolean;
752
+ user?: {
753
+ id: number;
754
+ email: string;
755
+ display_name: string;
756
+ role: string;
757
+ };
758
+ }
759
+
760
+ /**
761
+ * Resolve a Vuefinder-compatible endpoint map from the user's config.
762
+ * Either `apiBase` is set (auto-derive everything) or each route is
763
+ * supplied explicitly (legacy). Mixed mode works too — explicit fields
764
+ * trump the derived URL.
765
+ */
766
+ export declare function resolveEndpoints(config: ExplorerConfig): EndpointMap;
767
+
768
+ declare type SelectionMode_2 = 'none' | 'single-file' | 'single-dir' | 'multi';
769
+
770
+ export declare interface ShareInfo {
771
+ uuid: string;
772
+ url: string;
773
+ password_pin?: string | null;
774
+ expires_at?: string | null;
775
+ max_downloads?: number | null;
776
+ downloads?: number;
777
+ created_at?: string;
778
+ }
779
+
780
+ export declare interface ShortcutHandlers {
781
+ onDelete?: () => void;
782
+ onRename?: () => void;
783
+ onSelectAll?: () => void;
784
+ onCut?: () => void;
785
+ onCopy?: () => void;
786
+ onPaste?: () => void;
787
+ onOpen?: () => void;
788
+ onClose?: () => void;
789
+ onFocusSearch?: () => void;
790
+ onDuplicate?: () => void;
791
+ onPathJump?: () => void;
792
+ onGoUp?: () => void;
793
+ hasSelection?: () => boolean;
794
+ }
795
+
796
+ export declare const StarButton: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
797
+ error: (message: string) => any;
798
+ change: (value: boolean) => any;
799
+ }, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{
800
+ onError?: ((message: string) => any) | undefined;
801
+ onChange?: ((value: boolean) => any) | undefined;
802
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
803
+
804
+ export declare const TagPicker: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
805
+ error: (message: string) => any;
806
+ change: (tags: string[]) => any;
807
+ }, string, PublicProps, Readonly<__VLS_Props_4> & Readonly<{
808
+ onError?: ((message: string) => any) | undefined;
809
+ onChange?: ((tags: string[]) => any) | undefined;
810
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
811
+
812
+ export declare type ThemeMode = 'light' | 'dark' | 'auto';
813
+
814
+ /** Turkish UI strings. */
815
+ export declare const tr: Record<string, string>;
816
+
817
+ /** A soft-deleted node as returned by the filex trash listing endpoint. */
818
+ declare interface TrashEntry {
819
+ id: number;
820
+ storage_id: number;
821
+ storage_name?: string;
822
+ path: string;
823
+ name: string;
824
+ size: number;
825
+ mime?: string;
826
+ deleted_at: string;
827
+ ttl_days?: number | null;
828
+ }
829
+
830
+ export declare interface UploadFinalizeResponse {
831
+ s3Key: string;
832
+ url?: string;
833
+ }
834
+
835
+ export declare interface UploadInitResponse {
836
+ uploadId: string;
837
+ parts: Array<{
838
+ partNumber: number;
839
+ presignedUrl: string;
840
+ }>;
841
+ expiresAt: string;
842
+ s3Key?: string;
843
+ }
844
+
845
+ export declare interface UploadJob {
846
+ id: string;
847
+ file: File;
848
+ path: string;
849
+ uploadId?: string;
850
+ totalBytes: number;
851
+ uploadedBytes: number;
852
+ percent: number;
853
+ status: 'pending' | 'initializing' | 'uploading' | 'finalizing' | 'done' | 'error' | 'aborted';
854
+ error?: string;
855
+ cancel(): void;
856
+ }
857
+
858
+ export declare interface UploadLimits {
859
+ max_upload_mb: number;
860
+ }
861
+
862
+ export declare interface UploadOptions {
863
+ path: string;
864
+ file: File;
865
+ chunkSize?: number;
866
+ parallelChunks?: number;
867
+ onProgress?: (job: UploadJob) => void;
868
+ onDone?: (job: UploadJob, result: UploadFinalizeResponse) => void;
869
+ onError?: (job: UploadJob, err: Error) => void;
870
+ }
871
+
872
+ export declare function useFileApi(config: ExplorerConfig): {
873
+ index: (path: string) => Promise<ManagerResponse>;
874
+ search: (path: string, filter: string) => Promise<ManagerResponse>;
875
+ subfolders: (path: string) => Promise<{
876
+ folders: FileNode[];
877
+ }>;
878
+ newFolder: (path: string, name: string) => Promise<ManagerResponse>;
879
+ rename: (path: string, item: string, name: string) => Promise<ManagerResponse>;
880
+ move: (path: string, items: string[], target: string) => Promise<ManagerResponse>;
881
+ copy: (source: string[], target: string) => Promise<{
882
+ op: PendingOpDto;
883
+ }>;
884
+ moveAsync: (source: string[], target: string, sourceDir?: string) => Promise<{
885
+ op: PendingOpDto;
886
+ }>;
887
+ deleteAsync: (source: string[], sourceDir?: string) => Promise<{
888
+ op: PendingOpDto;
889
+ }>;
890
+ deleteItems: (path: string, items: string[]) => Promise<ManagerResponse>;
891
+ restore: (source: string[]) => Promise<{
892
+ ok: boolean;
893
+ restored: number;
894
+ }>;
895
+ listTrash: (storageName?: string) => Promise<{
896
+ entries: TrashEntry[];
897
+ total: number;
898
+ }>;
899
+ restoreIds: (ids: number[]) => Promise<{
900
+ restored: number;
901
+ }>;
902
+ uploadMultipart: (path: string, files: File[], onProgress?: (p: number) => void) => Promise<ManagerResponse>;
903
+ downloadUrl: (path: string) => string;
904
+ previewUrl: (path: string) => string;
905
+ fetchBlob: (path: string) => Promise<{
906
+ url: string;
907
+ blob: Blob;
908
+ mime: string;
909
+ }>;
910
+ fetchArrayBuffer: (path: string) => Promise<ArrayBuffer>;
911
+ limits: () => Promise<UploadLimits>;
912
+ capabilities: () => Promise<Capabilities>;
913
+ createShare: (payload: {
914
+ path: string;
915
+ password?: boolean;
916
+ expires_at?: string | null;
917
+ max_downloads?: number | null;
918
+ kind?: string;
919
+ max_uploads?: number | null;
920
+ drop_settings?: Record<string, unknown> | null;
921
+ }) => Promise<{
922
+ share: ShareInfo & {
923
+ url: string;
924
+ path: string;
925
+ filename: string;
926
+ kind?: string;
927
+ };
928
+ }>;
929
+ listShares: (path: string) => Promise<{
930
+ shares: ShareInfo[];
931
+ }>;
932
+ revokeShare: (uuid: string) => Promise<{
933
+ success: boolean;
934
+ }>;
935
+ archiveList: (path: string) => Promise<{
936
+ entries: ArchiveEntry[];
937
+ }>;
938
+ archiveExtract: (path: string, members?: string[]) => Promise<{
939
+ keys: string[];
940
+ count: number;
941
+ }>;
942
+ archiveAdd: (path: string, files: Array<{
943
+ name: string;
944
+ source: string;
945
+ }>) => Promise<{
946
+ path: string;
947
+ }>;
948
+ listPermissions: (path: string) => Promise<PermissionsResponse>;
949
+ resolveEmail: (email: string) => Promise<ResolveEmailResponse>;
950
+ searchUsers: (q: string) => Promise<UserSearchResponse>;
951
+ addPermission: (body: {
952
+ path: string;
953
+ user_id: number;
954
+ level: string;
955
+ is_dir?: boolean;
956
+ }) => Promise<unknown>;
957
+ updatePermission: (id: number, level: string) => Promise<unknown>;
958
+ deletePermission: (id: number) => Promise<unknown>;
959
+ invitePermission: (body: {
960
+ path: string;
961
+ email: string;
962
+ level: string;
963
+ create_user?: boolean;
964
+ role?: string;
965
+ is_dir?: boolean;
966
+ locale?: string;
967
+ }) => Promise<InviteResponse>;
968
+ shareMail: (body: {
969
+ path: string;
970
+ email?: string;
971
+ emails?: string[];
972
+ url: string;
973
+ pin?: string | null;
974
+ expires_days?: number;
975
+ locale?: string;
976
+ is_dir?: boolean;
977
+ size?: number;
978
+ mode?: string;
979
+ }) => Promise<{
980
+ emailed: boolean;
981
+ sent?: string[];
982
+ failed?: string[];
983
+ }>;
984
+ endpoints: EndpointMap;
985
+ authHeaders: (extra?: Record<string, string>) => Promise<Record<string, string>>;
986
+ authHeadersSync: (extra?: Record<string, string>) => Record<string, string>;
987
+ credentialsMode: () => RequestCredentials;
988
+ jsonFetch: <T>(url: string, init?: RequestInit) => Promise<T>;
989
+ };
990
+
991
+ export declare function useKeyboardShortcuts(rootEl: Ref<HTMLElement | null>, handlers: ShortcutHandlers): void;
992
+
993
+ export declare function useLocale(localeRef: Ref<LocaleCode> | (() => LocaleCode)): {
994
+ t: (key: string, vars?: Record<string, string | number>) => string;
995
+ formatSize: (bytes: number | undefined | null) => string;
996
+ nodeDisplayName: (node: {
997
+ basename: string;
998
+ }) => string;
999
+ };
1000
+
1001
+ /**
1002
+ * Composable wrapper — components that want reactive "is Monaco ready
1003
+ * yet?" semantics can read the resolved promise. The implementation is
1004
+ * intentionally tiny: components don't need anything fancier than
1005
+ * `await ensureMonaco()` inside the click handler.
1006
+ */
1007
+ export declare function useMonacoLoader(): {
1008
+ ensureMonaco: typeof ensureMonaco;
1009
+ ensureHighlight: typeof ensureHighlight;
1010
+ getMonaco: typeof getMonaco;
1011
+ getHighlight: typeof getHighlight;
1012
+ };
1013
+
1014
+ export declare function usePendingOps(config: ExplorerConfig, api: FileApi, opts?: UsePendingOpsOptions): {
1015
+ ops: Ref< {
1016
+ id: number;
1017
+ op_type: "copy" | "move" | "delete";
1018
+ status: "pending" | "running" | "done" | "error";
1019
+ progress_total: number;
1020
+ progress_done: number;
1021
+ target_path: string | null;
1022
+ source_dir: string | null;
1023
+ source_count: number;
1024
+ error_message: string | null;
1025
+ started_at: string | null;
1026
+ finished_at: string | null;
1027
+ created_at: string | null;
1028
+ }[], PendingOp[] | {
1029
+ id: number;
1030
+ op_type: "copy" | "move" | "delete";
1031
+ status: "pending" | "running" | "done" | "error";
1032
+ progress_total: number;
1033
+ progress_done: number;
1034
+ target_path: string | null;
1035
+ source_dir: string | null;
1036
+ source_count: number;
1037
+ error_message: string | null;
1038
+ started_at: string | null;
1039
+ finished_at: string | null;
1040
+ created_at: string | null;
1041
+ }[]>;
1042
+ hasActive: ComputedRef<boolean>;
1043
+ register: (raw: PendingOp | Record<string, unknown>) => void;
1044
+ dismiss: (id: number) => void;
1045
+ poll: () => Promise<void>;
1046
+ startPolling: () => void;
1047
+ stopPolling: () => void;
1048
+ };
1049
+
1050
+ export declare interface UsePendingOpsOptions {
1051
+ /** Called once an op flips into a terminal state (done|error). */
1052
+ onSettled?: (op: PendingOp) => void;
1053
+ }
1054
+
1055
+ declare interface UserSearchResponse {
1056
+ users: UserSuggestion[];
1057
+ }
1058
+
1059
+ declare interface UserSuggestion {
1060
+ id: number;
1061
+ email: string;
1062
+ display_name: string;
1063
+ role: string;
1064
+ }
1065
+
1066
+ export declare function useSelection(items: () => FileNode[]): {
1067
+ selected: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
1068
+ anchor: Ref<string | null, string | null>;
1069
+ click: (path: string, mod?: {
1070
+ ctrl?: boolean;
1071
+ shift?: boolean;
1072
+ }) => void;
1073
+ clear: () => void;
1074
+ selectAll: () => void;
1075
+ has: (path: string) => boolean;
1076
+ add: (path: string) => void;
1077
+ remove: (path: string) => void;
1078
+ size: ComputedRef<number>;
1079
+ isEmpty: ComputedRef<boolean>;
1080
+ nodes: ComputedRef<FileNode[]>;
1081
+ };
1082
+
1083
+ export declare function useUploadChunked(config: ExplorerConfig, api: FileApi): {
1084
+ uploadFile: (opts: UploadOptions) => Promise<UploadFinalizeResponse>;
1085
+ };
1086
+
1087
+ export declare type ViewMode = 'list' | 'grid';
1088
+
1089
+ export { }