@brftech/filex-core 0.26.1 → 0.27.0

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.
@@ -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
  *