@brftech/filex-core 0.26.1 → 0.27.1
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.
- package/dist/filex-core.js +6475 -6370
- package/dist/filex-core.js.map +1 -1
- package/dist/filex-core.umd.cjs +39 -39
- package/dist/filex-core.umd.cjs.map +1 -1
- package/dist/index.d.ts +51 -0
- package/package.json +1 -1
- package/src/FileExplorer.vue +203 -51
- package/src/components/Breadcrumb.vue +3 -2
- package/src/components/GalleryView.vue +3 -2
- package/src/components/GridView.vue +3 -2
- package/src/components/ListView.vue +3 -2
- package/src/components/SecondaryPane.vue +5 -10
- package/src/lib/dragOut.ts +0 -0
- package/src/lib/transfer.ts +51 -0
- package/src/locales/en.ts +6 -1
- package/src/locales/tr.ts +6 -1
- package/src/types/ExplorerConfig.ts +47 -0
|
@@ -309,6 +309,53 @@ export interface ExplorerConfig {
|
|
|
309
309
|
readOnly?: boolean;
|
|
310
310
|
}>;
|
|
311
311
|
|
|
312
|
+
/**
|
|
313
|
+
* Desktop-shell hook — dragging rows OUT of the window onto the OS.
|
|
314
|
+
*
|
|
315
|
+
* Present only in the filex desktop app. A web page cannot hand the OS a
|
|
316
|
+
* list of files: Chromium carries one `DownloadURL` per drag, so the browser
|
|
317
|
+
* gets a single-file drag-out for free (the explorer sets it itself) and
|
|
318
|
+
* folders/multi-selections need real local paths — which is what the shell
|
|
319
|
+
* provides here.
|
|
320
|
+
*
|
|
321
|
+
* The bytes have to exist BEFORE the drag starts — the OS copies from a path
|
|
322
|
+
* at drop time — and the shell has two ways to satisfy that, which is why
|
|
323
|
+
* this is more than one call:
|
|
324
|
+
*
|
|
325
|
+
* `prepare` — fetch local copies up front. The explorer calls it for small
|
|
326
|
+
* selections as soon as they are selected, so the common drag hands over
|
|
327
|
+
* real, complete files (correct even when the drop target is an
|
|
328
|
+
* application that reads the file immediately).
|
|
329
|
+
* `start` — begin the OS drag, whatever the size. The shell may hand the
|
|
330
|
+
* OS empty placeholders and download into wherever they land afterwards,
|
|
331
|
+
* so this is never gated on `prepare` having finished.
|
|
332
|
+
* `cancel` — the drag ended INSIDE the explorer (an internal move). The
|
|
333
|
+
* shell stops waiting for a drop it will never see.
|
|
334
|
+
*
|
|
335
|
+
* `onProgress` drives the explorer's toast; `error: 'drop_not_found'` means
|
|
336
|
+
* the drop went somewhere the shell cannot write to (an application rather
|
|
337
|
+
* than a folder) and nothing was transferred.
|
|
338
|
+
*/
|
|
339
|
+
dragOut?: {
|
|
340
|
+
prepare: (
|
|
341
|
+
items: Array<{ path: string; basename: string; type: 'file' | 'dir' }>,
|
|
342
|
+
) => Promise<{ ready: boolean; error?: string }>;
|
|
343
|
+
start: (
|
|
344
|
+
items: Array<{ path: string; basename: string; type: 'file' | 'dir' }>,
|
|
345
|
+
) => void | Promise<void>;
|
|
346
|
+
cancel?: () => void | Promise<void>;
|
|
347
|
+
onProgress?: (
|
|
348
|
+
cb: (p: {
|
|
349
|
+
done: number;
|
|
350
|
+
total: number;
|
|
351
|
+
name?: string;
|
|
352
|
+
dropped?: string;
|
|
353
|
+
finished?: boolean;
|
|
354
|
+
error?: string;
|
|
355
|
+
}) => void,
|
|
356
|
+
) => void;
|
|
357
|
+
};
|
|
358
|
+
|
|
312
359
|
/**
|
|
313
360
|
* Desktop-shell hook — selective sync ("keep on this computer").
|
|
314
361
|
*
|