filecove 0.1.0 → 0.2.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.
Files changed (203) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/components/buttons/toolbar-actions.d.ts +1 -1
  3. package/dist/components/buttons/tooltip-icon-button.d.ts +1 -1
  4. package/dist/components/downloads/download-panel.d.ts +1 -1
  5. package/dist/components/drag/drag-preview.d.ts +24 -0
  6. package/dist/components/file-manager/announcer.d.ts +1 -1
  7. package/dist/components/file-manager/content/file-grid.d.ts +1 -1
  8. package/dist/components/file-manager/content/file-list.d.ts +1 -1
  9. package/dist/components/file-manager/content/folder-view.d.ts +1 -1
  10. package/dist/components/file-manager/content/item-icon.d.ts +1 -1
  11. package/dist/components/file-manager/content/search-results.d.ts +1 -1
  12. package/dist/components/file-manager/content/search-tabs.d.ts +1 -1
  13. package/dist/components/file-manager/content/trash-bar.d.ts +1 -1
  14. package/dist/components/file-manager/context-menu/context-menu.d.ts +1 -1
  15. package/dist/components/file-manager/dialogs/conflict-step.d.ts +1 -1
  16. package/dist/components/file-manager/dialogs/delete-dialog.d.ts +3 -2
  17. package/dist/components/file-manager/dialogs/image-viewer.d.ts +1 -1
  18. package/dist/components/file-manager/dialogs/name-dialog.d.ts +1 -1
  19. package/dist/components/file-manager/dialogs/paste-dialog.d.ts +1 -1
  20. package/dist/components/file-manager/dialogs/preview-dialog.d.ts +2 -2
  21. package/dist/components/file-manager/dialogs/restore-dialog.d.ts +1 -1
  22. package/dist/components/file-manager/dialogs/shortcuts-dialog.d.ts +1 -1
  23. package/dist/components/file-manager/dialogs/transfer-dialog.d.ts +2 -2
  24. package/dist/components/file-manager/dialogs/upload-dialog.d.ts +1 -1
  25. package/dist/components/file-manager/file-manager.d.ts +1 -1
  26. package/dist/components/file-manager/header-bar/header-bar.d.ts +1 -1
  27. package/dist/components/file-manager/header-bar/history-menu.d.ts +1 -1
  28. package/dist/components/file-manager/header-bar/path-bar.d.ts +1 -1
  29. package/dist/components/file-manager/header-bar/search-field.d.ts +1 -1
  30. package/dist/components/file-manager/header-bar/search-sections-menu.d.ts +1 -1
  31. package/dist/components/file-manager/header-bar/view-menu.d.ts +1 -1
  32. package/dist/components/file-manager/notice-bar.d.ts +1 -1
  33. package/dist/components/file-manager/properties-pane.d.ts +2 -2
  34. package/dist/components/file-manager/sidebar/location-item.d.ts +1 -1
  35. package/dist/components/file-manager/sidebar/main-menu.d.ts +1 -1
  36. package/dist/components/file-manager/sidebar/sidebar.d.ts +2 -2
  37. package/dist/components/icons/create-icon.d.ts +1 -1
  38. package/dist/components/icons/icon-provider.d.ts +1 -1
  39. package/dist/components/icons/icon-slot.d.ts +1 -1
  40. package/dist/components/icons/icon.d.ts +1 -1
  41. package/dist/components/media-manager/asset-delete.d.ts +20 -8
  42. package/dist/components/media-manager/asset-hold.d.ts +1 -1
  43. package/dist/components/media-manager/asset-option.d.ts +13 -2
  44. package/dist/components/media-manager/asset-trail.d.ts +1 -1
  45. package/dist/components/media-manager/choice-list.d.ts +1 -1
  46. package/dist/components/media-manager/choices-pane.d.ts +1 -1
  47. package/dist/components/media-manager/group-create.d.ts +1 -1
  48. package/dist/components/media-manager/group-path.d.ts +8 -2
  49. package/dist/components/media-manager/library-list.d.ts +4 -2
  50. package/dist/components/media-manager/media-asset.d.ts +19 -7
  51. package/dist/components/media-manager/media-edit-many.d.ts +33 -0
  52. package/dist/components/media-manager/media-fields.d.ts +1 -1
  53. package/dist/components/media-manager/media-filter-chips.d.ts +17 -0
  54. package/dist/components/media-manager/media-filters-dialog.d.ts +39 -0
  55. package/dist/components/media-manager/media-filters.d.ts +37 -0
  56. package/dist/components/media-manager/media-form.d.ts +3 -1
  57. package/dist/components/media-manager/media-frame.d.ts +7 -3
  58. package/dist/components/media-manager/media-grid.d.ts +34 -5
  59. package/dist/components/media-manager/media-group.d.ts +1 -1
  60. package/dist/components/media-manager/media-header.d.ts +20 -3
  61. package/dist/components/media-manager/media-manager.d.ts +33 -10
  62. package/dist/components/media-manager/media-move.d.ts +19 -11
  63. package/dist/components/media-manager/media-picker.d.ts +25 -7
  64. package/dist/components/media-manager/media-picture.d.ts +1 -1
  65. package/dist/components/media-manager/media-process.d.ts +1 -1
  66. package/dist/components/media-manager/media-row.d.ts +1 -1
  67. package/dist/components/media-manager/media-tile.d.ts +1 -1
  68. package/dist/components/media-manager/media-upload.d.ts +28 -6
  69. package/dist/components/media-manager/picker-frame.d.ts +6 -2
  70. package/dist/components/media-manager/selection-bar.d.ts +25 -0
  71. package/dist/components/media-manager/upload-tile.d.ts +5 -3
  72. package/dist/components/properties/properties-panel.d.ts +9 -3
  73. package/dist/components/properties/property-display.d.ts +1 -1
  74. package/dist/components/properties/property-editor.d.ts +1 -1
  75. package/dist/components/properties/property-input.d.ts +1 -1
  76. package/dist/components/transfers/transfer-panel.d.ts +1 -1
  77. package/dist/components/ui/dialog.d.ts +1 -1
  78. package/dist/components/ui/root-providers.d.ts +1 -1
  79. package/dist/components/uploads/upload-panel.d.ts +8 -2
  80. package/dist/contexts/cut-context.d.ts +1 -1
  81. package/dist/contexts/data-context.d.ts +3 -3
  82. package/dist/contexts/direction-context.d.ts +1 -1
  83. package/dist/contexts/drag-context.d.ts +1 -1
  84. package/dist/contexts/icon-context.d.ts +1 -1
  85. package/dist/contexts/locale-context.d.ts +1 -1
  86. package/dist/contexts/moving-context.d.ts +1 -1
  87. package/dist/hooks/use-asset-states.d.ts +1 -1
  88. package/dist/hooks/use-clipboard-follow.d.ts +2 -2
  89. package/dist/hooks/use-cut-ids.d.ts +1 -1
  90. package/dist/hooks/use-dev-checks.d.ts +16 -0
  91. package/dist/hooks/use-download-queue.d.ts +3 -3
  92. package/dist/hooks/use-dragged-ids.d.ts +1 -1
  93. package/dist/hooks/use-drop-target.d.ts +1 -1
  94. package/dist/hooks/use-entry-drag.d.ts +2 -2
  95. package/dist/hooks/use-files-drop.d.ts +7 -1
  96. package/dist/hooks/use-folder.d.ts +3 -3
  97. package/dist/hooks/use-icon-config.d.ts +1 -1
  98. package/dist/hooks/use-level-filters.d.ts +112 -0
  99. package/dist/hooks/use-level-search.d.ts +8 -6
  100. package/dist/hooks/use-locale.d.ts +3 -3
  101. package/dist/hooks/use-location-history.d.ts +1 -1
  102. package/dist/hooks/use-long-press.d.ts +1 -1
  103. package/dist/hooks/use-marquee.d.ts +1 -1
  104. package/dist/hooks/use-match-count.d.ts +5 -4
  105. package/dist/hooks/use-media-search.d.ts +22 -8
  106. package/dist/hooks/use-moving-ids.d.ts +2 -2
  107. package/dist/hooks/use-preview-contents.d.ts +1 -1
  108. package/dist/hooks/use-properties.d.ts +2 -2
  109. package/dist/hooks/use-scroll-measure.d.ts +1 -1
  110. package/dist/hooks/use-search.d.ts +6 -5
  111. package/dist/hooks/use-selection.d.ts +1 -1
  112. package/dist/hooks/use-text-direction.d.ts +1 -1
  113. package/dist/hooks/use-thumbnail.d.ts +1 -1
  114. package/dist/hooks/use-transfer-queue.d.ts +5 -5
  115. package/dist/hooks/use-tree-rows.d.ts +1 -1
  116. package/dist/hooks/use-tree-selection.d.ts +1 -1
  117. package/dist/hooks/use-upload-queue.d.ts +7 -5
  118. package/dist/hooks/use-virtual-lines.d.ts +1 -1
  119. package/dist/hooks/use-wheel-zoom.d.ts +1 -1
  120. package/dist/icon-sets/filled.d.ts +1 -1
  121. package/dist/icon-sets/outlined.d.ts +1 -1
  122. package/dist/icon-sets/rounded.d.ts +1 -1
  123. package/dist/icon-sets/sharp.d.ts +1 -1
  124. package/dist/icon-sets/two-tone.d.ts +1 -1
  125. package/dist/index.d.ts +18 -18
  126. package/dist/index.js +4307 -1129
  127. package/dist/index.js.map +1 -1
  128. package/dist/locales/en-us.d.ts +1 -1
  129. package/dist/store/download-queue.d.ts +1 -1
  130. package/dist/store/folder-store.d.ts +1 -1
  131. package/dist/store/properties-cache.d.ts +9 -1
  132. package/dist/store/thumbnail-cache.d.ts +1 -1
  133. package/dist/store/transfer-across.d.ts +1 -1
  134. package/dist/store/transfer-queue.d.ts +2 -2
  135. package/dist/store/upload-queue.d.ts +28 -8
  136. package/dist/styles/classes.d.ts +30 -2
  137. package/dist/styles/layout.d.ts +2 -2
  138. package/dist/styles/media-layout.d.ts +1 -1
  139. package/dist/styles.css +1095 -367
  140. package/dist/styles.layer.css +1095 -367
  141. package/dist/types/action.d.ts +3 -3
  142. package/dist/types/adapter.d.ts +164 -11
  143. package/dist/types/api.d.ts +21 -9
  144. package/dist/types/clipboard.d.ts +2 -2
  145. package/dist/types/download.d.ts +1 -1
  146. package/dist/types/drag.d.ts +4 -4
  147. package/dist/types/folder.d.ts +1 -1
  148. package/dist/types/index.d.ts +27 -27
  149. package/dist/types/locale.d.ts +161 -4
  150. package/dist/types/main-menu.d.ts +1 -1
  151. package/dist/types/media.d.ts +127 -11
  152. package/dist/types/menu.d.ts +4 -4
  153. package/dist/types/navigation.d.ts +2 -2
  154. package/dist/types/preview.d.ts +1 -1
  155. package/dist/types/previewer.d.ts +1 -1
  156. package/dist/types/properties.d.ts +20 -2
  157. package/dist/types/property-definition.d.ts +58 -1
  158. package/dist/types/search.d.ts +2 -2
  159. package/dist/types/section.d.ts +2 -2
  160. package/dist/types/selection.d.ts +3 -3
  161. package/dist/types/slots.d.ts +12 -7
  162. package/dist/types/transfer.d.ts +2 -2
  163. package/dist/types/tree.d.ts +2 -2
  164. package/dist/types/undo.d.ts +3 -3
  165. package/dist/types/upload.d.ts +79 -3
  166. package/dist/types/view.d.ts +5 -5
  167. package/dist/utils/action-groups.d.ts +1 -1
  168. package/dist/utils/clipboard.d.ts +2 -2
  169. package/dist/utils/dom.d.ts +13 -0
  170. package/dist/utils/download.d.ts +1 -1
  171. package/dist/utils/field-errors.d.ts +1 -1
  172. package/dist/utils/files.d.ts +9 -5
  173. package/dist/utils/format.d.ts +1 -1
  174. package/dist/utils/groups.d.ts +1 -1
  175. package/dist/utils/hidden.d.ts +1 -1
  176. package/dist/utils/keyboard.d.ts +1 -1
  177. package/dist/utils/media.d.ts +82 -5
  178. package/dist/utils/menu-position.d.ts +1 -1
  179. package/dist/utils/names.d.ts +1 -1
  180. package/dist/utils/navigation.d.ts +1 -1
  181. package/dist/utils/path.d.ts +2 -2
  182. package/dist/utils/permissions.d.ts +2 -2
  183. package/dist/utils/preview.d.ts +1 -1
  184. package/dist/utils/property-value.d.ts +3 -1
  185. package/dist/utils/search.d.ts +1 -1
  186. package/dist/utils/sections.d.ts +1 -1
  187. package/dist/utils/selection.d.ts +1 -1
  188. package/dist/utils/shortcut.d.ts +1 -1
  189. package/dist/utils/slots.d.ts +2 -2
  190. package/dist/utils/sort.d.ts +1 -1
  191. package/dist/utils/transfer.d.ts +1 -1
  192. package/dist/utils/trash.d.ts +1 -1
  193. package/dist/utils/undo.d.ts +1 -1
  194. package/dist/utils/zoom.d.ts +2 -2
  195. package/docs/README.md +1 -1
  196. package/docs/adapter.md +66 -6
  197. package/docs/customizing.md +31 -2
  198. package/docs/getting-started.md +3 -1
  199. package/docs/media-manager.md +194 -7
  200. package/docs/search.md +2 -0
  201. package/docs/uploads-and-downloads.md +2 -1
  202. package/package.json +1 -1
  203. package/dist/components/file-manager/drag-preview.d.ts +0 -22
@@ -1,4 +1,4 @@
1
- import type { IconSource } from "./icon";
1
+ import type { IconSource } from "./icon.js";
2
2
  /** An item of the sidebar's main menu, for what belongs to the app rather than to entries. */
3
3
  export interface MainMenuItem {
4
4
  id: string;
@@ -1,9 +1,9 @@
1
1
  import type { Dispatch, ReactNode, SetStateAction } from "react";
2
- import type { AssetState, FileAdapter, FileEntry } from "./adapter";
3
- import type { IconSource } from "./icon";
4
- import type { FilePreviewer } from "./previewer";
5
- import type { FieldErrors, PropertyDefinitionGroup } from "./property-definition";
6
- import type { FolderRef, Section } from "./section";
2
+ import type { AssetState, FileAdapter, FileEntry } from "./adapter.js";
3
+ import type { IconSource } from "./icon.js";
4
+ import type { FilePreviewer } from "./previewer.js";
5
+ import type { FieldErrors, PropertyDefinitionGroup } from "./property-definition.js";
6
+ import type { FolderRef, Section } from "./section.js";
7
7
  /**
8
8
  * The one kind of asset a media manager's library holds, which decides the shape of its tiles
9
9
  * (pictures square, videos wide with their length, audio square, documents as pages) and how it's
@@ -46,11 +46,17 @@ export interface MediaViewed {
46
46
  trail?: readonly FileEntry[];
47
47
  }
48
48
  /**
49
- * A media manager's search, while it's open: what's typed, as typed. Closed, it's null, so a closed
50
- * search has no query. It's an object so it can grow, by addition, without changing what's there.
49
+ * A media manager's search, while it's open: what's typed, as typed, and what the library's filters
50
+ * hold. Closed, it's null, so a closed search has no query and no filters. It's an object so it can
51
+ * grow, by addition, without changing what's there.
51
52
  */
52
53
  export interface MediaSearch {
53
54
  query: string;
55
+ /**
56
+ * What the library's filter form holds as the user set it (`MediaSection.filterForm`), by the
57
+ * app's own keys; left out, the form's defaults, which is nothing set.
58
+ */
59
+ filters?: Readonly<Record<string, unknown>>;
54
60
  }
55
61
  /**
56
62
  * What the app's form is handed each time it's drawn. The media manager keeps what it holds, and the
@@ -84,6 +90,18 @@ export interface MediaFormParams<V = Record<string, unknown>> {
84
90
  export interface MediaUploadFormParams<V = Record<string, unknown>> extends MediaFormParams<V> {
85
91
  /** The files about to be uploaded. */
86
92
  files: readonly File[];
93
+ /**
94
+ * The asset whose file the one in `files` is about to take the place of, from its view's Replace
95
+ * file (`FileAdapter.replace`); undefined for an upload.
96
+ */
97
+ replacing?: FileEntry;
98
+ /**
99
+ * The asset the files go into as a part of it, from a property's Upload in its view
100
+ * (`PropertyDefinition.upload`, `FileAdapter.uploadPart`), with `part`, the part's name; both
101
+ * undefined for an upload into the library.
102
+ */
103
+ partOf?: FileEntry;
104
+ part?: string;
87
105
  /** Whether its `validate` is being answered, while nothing in it should change. */
88
106
  sending: boolean;
89
107
  }
@@ -111,6 +129,14 @@ export interface MediaGroupFormParams<V = Record<string, unknown>> extends Media
111
129
  /** Whether it's being sent to the adapter, while nothing in it should change. */
112
130
  sending: boolean;
113
131
  }
132
+ /**
133
+ * What a library's filter form is handed (`MediaSection.filterForm`). Its `errors` are always empty,
134
+ * as nothing refuses a filter, and its `index` 0.
135
+ */
136
+ export interface MediaFilterFormParams<V = Record<string, unknown>> extends MediaFormParams<V> {
137
+ /** The group open, which the search goes down from, or `null` at the library's root. */
138
+ group: FileEntry | null;
139
+ }
114
140
  /** What a pick's form is handed (`MediaManager`'s `pickForm`). */
115
141
  export interface MediaPickFormParams<V = Record<string, unknown>> extends MediaFormParams<V> {
116
142
  asset: FileEntry;
@@ -172,6 +198,62 @@ export type MediaUploadForm<V = Record<string, unknown>> = MediaForm<MediaUpload
172
198
  };
173
199
  /** A library's process form (`MediaSection.processForm`). */
174
200
  export type MediaProcessForm<V = Record<string, unknown>> = MediaForm<MediaProcessFormParams<V>>;
201
+ /**
202
+ * A filter that's set, as a chip under the library's header (`MediaFilterForm.chips`), which removes
203
+ * it when pressed.
204
+ */
205
+ export interface MediaFilterChip<V = Record<string, unknown>> {
206
+ /** Tells it from the others, as a React key, the same for as long as it's set. */
207
+ key: string;
208
+ /** What it says, in the app's language: "Certificate", "German", "Taken in 2024". */
209
+ label: string;
210
+ /** What the form holds without it, from what it holds now: `({ type, ...rest }) => rest`. */
211
+ remove(values: V): V;
212
+ }
213
+ /**
214
+ * How a library's filter form is shown, from the header's Filters button (`MediaManager`'s and
215
+ * `MediaPicker`'s `filtersVariant`, or the form's own `variant`):
216
+ *
217
+ * - `"card"`, a card dropping from the button over the results, as a menu does, the results changing
218
+ * behind it as the filters do: what's changed applies a moment after, as typing does, and a press
219
+ * outside folds it away. For a few fields.
220
+ * - `"dialog"`, a dialog over the whole component, the rest of it out of reach meanwhile, wider than the
221
+ * card: what's changed applies only with its Apply, and Cancel, Escape or a press around it leaves the
222
+ * filters as they were. For a form too big for the card, such as rules of a field, an operator and a
223
+ * value, or one whose half-finished changes shouldn't search.
224
+ *
225
+ * Both are drawn inside the component rather than portaled out, so a picker in an app's own modal
226
+ * dialog keeps the focus.
227
+ */
228
+ export type MediaFiltersVariant = "card" | "dialog";
229
+ /**
230
+ * A library's filter form (`MediaSection.filterForm`). Its `defaults` are nothing set, so they're
231
+ * required to mean that: a checkbox left unticked as `false`, a list as `[]`. Its `ready` keeps what
232
+ * it holds from being applied until it says so, such as a range with only one end: in the card, the
233
+ * filters applied before staying meanwhile, with why under them; in the dialog, its Apply held back,
234
+ * with why beside it.
235
+ */
236
+ export type MediaFilterForm<V = Record<string, unknown>> = MediaForm<MediaFilterFormParams<V>> & {
237
+ /**
238
+ * How it's shown, in place of the component's `filtersVariant`, for a form that needs one way
239
+ * wherever it's used, as rules of a field, an operator and a value need the dialog's width.
240
+ */
241
+ variant?: MediaFiltersVariant;
242
+ /**
243
+ * The filters set, each as a chip under the header, in a row that shows while any is, each
244
+ * removing itself when pressed, beside Clear all: one a field, or one a value of a list, as a
245
+ * language among several. Without it, only the badge on the header's Filters button says how many
246
+ * are set, as the component can't read what the form holds.
247
+ */
248
+ chips?(params: MediaFormState<MediaFilterFormParams<V>>): readonly MediaFilterChip<V>[];
249
+ /**
250
+ * How many filters are set, for the badge on the header's Filters button and whether anything is
251
+ * being filtered at all, as a range from two fields is one filter. Without it, how many `chips`
252
+ * there are, or else the fields whose values differ from `defaults`, an empty text or list
253
+ * counting as no value.
254
+ */
255
+ count?(params: MediaFormState<MediaFilterFormParams<V>>): number;
256
+ };
175
257
  /** A library's group form (`MediaSection.groupForm`). */
176
258
  export type MediaGroupForm<V = Record<string, unknown>> = MediaForm<MediaGroupFormParams<V>> & {
177
259
  /**
@@ -193,6 +275,18 @@ export type MediaGroupForm<V = Record<string, unknown>> = MediaForm<MediaGroupFo
193
275
  }, options: {
194
276
  signal: AbortSignal;
195
277
  }): Promise<V>;
278
+ /**
279
+ * What a group made of a folder uploaded holds, as a folder brings nothing but its name, handed to
280
+ * the adapter's `createGroup` with nothing asked: `{ name: folder.name }` in the form's own shape,
281
+ * say, and anything else such a group needs, such as a type chosen by where it's made (the form
282
+ * being asked for that place, `parent` the group it goes in, or one just made of the folder around
283
+ * it). `null` refuses a group of that folder there: one given at the level open is left out, saying
284
+ * so, and one inside it fails, with everything in it. Without it, folders aren't taken where this
285
+ * form makes the groups, as the component can't fill it in.
286
+ */
287
+ fromFolder?(folder: {
288
+ name: string;
289
+ }): V | null;
196
290
  };
197
291
  /**
198
292
  * What the adapter's `process` or `createGroup` or `updateGroup`, or an upload form's `validate`, rejects with: its `message` shows over
@@ -330,7 +424,10 @@ export interface MediaSection extends Pick<Section, "id" | "label" | "icon" | "r
330
424
  * adapter's `createFolder`, the group's details opening next where it has any, for the rest of what
331
425
  * the app defines. Off by default, as an adapter's `createFolder` doesn't say this library holds
332
426
  * groups, and a `readOnly` library never makes them. Moving a group goes by it too, so it can't go
333
- * where this says no; left out, moving asks nothing of it, and the backend has the say.
427
+ * where this says no; left out, moving asks nothing of it, and the backend has the say. So do
428
+ * folders uploaded, dropped, pasted or picked, where the library takes files: each is made a group
429
+ * with its files in it, and its folders groups inside it, asked of this with the group each goes
430
+ * in, a folder where it says no failing with what's in it.
334
431
  */
335
432
  createGroups?: boolean | ((parent: FileEntry | null) => boolean);
336
433
  /**
@@ -339,7 +436,8 @@ export interface MediaSection extends Pick<Section, "id" | "label" | "icon" | "r
339
436
  * app's: told which group and where, it returns the form, or `null` for none. Where there's one,
340
437
  * New group shows it (where `createGroups` says one can be made) and hands what it holds to the
341
438
  * adapter's `createGroup`, and a group's details have Edit, handing it to `updateGroup`. Without
342
- * one, New group asks only a name, through `createFolder`, and there's no Edit.
439
+ * one, New group asks only a name, through `createFolder`, and there's no Edit, and so are groups
440
+ * made of folders uploaded; with one, those take what its `fromFolder` makes of each folder's name.
343
441
  */
344
442
  groupForm?: (target: MediaGroupTarget) => MediaGroupForm | null;
345
443
  /**
@@ -348,9 +446,11 @@ export interface MediaSection extends Pick<Section, "id" | "label" | "icon" | "r
348
446
  * into WebP or AVIF. Handed the files, it returns the form for them, or `null` when there's
349
447
  * nothing to ask, as of pictures already in WebP, and they're sent at once. Shown once a batch,
350
448
  * picked, dropped or pasted, in the library's place. What it holds goes to the adapter's `upload`
351
- * with every file sent together (`UploadOptions.values`), which decides what it means.
449
+ * with every file sent together (`UploadOptions.values`), which decides what it means. Asked too of
450
+ * a new file put in an asset's place from its view (`FileAdapter.replace`), handed that asset as
451
+ * `replacing`, so it can ask otherwise of it, or `null` to send it at once.
352
452
  */
353
- uploadForm?(files: readonly File[]): MediaUploadForm<any> | null;
453
+ uploadForm?(files: readonly File[], replacing?: FileEntry): MediaUploadForm<any> | null;
354
454
  /**
355
455
  * What can be asked of an asset already uploaded, from its view: anything its backend can make
356
456
  * of it or make again, such as a video's HLS, a picture's responsive sizes or a piece of audio's
@@ -361,6 +461,22 @@ export interface MediaSection extends Pick<Section, "id" | "label" | "icon" | "r
361
461
  * `null` by then holds Process back rather than closing what's being filled in.
362
462
  */
363
463
  processForm?(asset: FileEntry): MediaProcessForm<any> | null;
464
+ /**
465
+ * Filters beside the search, by what this library's assets are, such as a document's language or a
466
+ * picture's usage: a form as `uploadForm` is, drawing anything and holding what it likes under the
467
+ * app's own keys, `MediaFields` drawing fields from their definitions, or `null` for none at that
468
+ * level. Handed the group open, `null` at the root, so a group of datasheets can filter by what only
469
+ * they have. It shows in a card dropping from the header's Filters button, over the results, or in
470
+ * a dialog over the component (`filtersVariant`, `MediaFilterForm.variant`), and the filters set
471
+ * show as chips under the header while it's closed, when the form names them (`chips`). What it
472
+ * holds goes to the adapter's `search` as `filters`, a moment after it last changed, or with the
473
+ * dialog's Apply, the results being what's found from the open level down, as the search's are,
474
+ * with something typed or not. It's part of the search, but not of its field, which it doesn't
475
+ * open: closing the field clears only what's typed, and going to another level or library clears
476
+ * it. Needs the adapter's `search`, as the backend applies them. Return the same form object each
477
+ * time, not one made in the function.
478
+ */
479
+ filterForm?(group: FileEntry | null): MediaFilterForm<any> | null;
364
480
  /**
365
481
  * Whether an asset of this library may be chosen, by the app's own rules, such as a stock photo
366
482
  * whose licence has run out: `true`, or `false`, or why not, in the app's language, which its
@@ -1,8 +1,8 @@
1
1
  import type { ClipboardEvent, KeyboardEvent } from "react";
2
- import type { ActionTarget } from "./action";
3
- import type { FileEntry } from "./adapter";
4
- import type { IconSource } from "./icon";
5
- import type { FolderRef, Section } from "./section";
2
+ import type { ActionTarget } from "./action.js";
3
+ import type { FileEntry } from "./adapter.js";
4
+ import type { IconSource } from "./icon.js";
5
+ import type { FolderRef, Section } from "./section.js";
6
6
  /** A point of the viewport the menu opens at. */
7
7
  export interface MenuPosition {
8
8
  top: number;
@@ -1,5 +1,5 @@
1
- import type { IconSource } from "./icon";
2
- import type { FolderRef } from "./section";
1
+ import type { IconSource } from "./icon.js";
2
+ import type { FolderRef } from "./section.js";
3
3
  /**
4
4
  * Where the file manager is: a section, and the folders opened below its root, as `location`,
5
5
  * `defaultLocation` and `onLocationChange` take it. The trail is the consumer's to build when they
@@ -1,4 +1,4 @@
1
- import type { FilePreviewer } from "./previewer";
1
+ import type { FilePreviewer } from "./previewer.js";
2
2
  /**
3
3
  * How the preview shows a file: as the browser shows images, videos, audio and PDFs, the start of
4
4
  * a text file, a font's specimen, through a previewer of the app's own ("custom"), or "none" for a
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { FileAdapter, FileEntry } from "./adapter";
2
+ import type { FileAdapter, FileEntry } from "./adapter.js";
3
3
  /**
4
4
  * What the preview hands a file to a previewer of the app's own as: nothing ("none"), the adapter's
5
5
  * `content` as it comes ("content"), or the start of the file read as text ("text").
@@ -1,5 +1,7 @@
1
- import type { FileAdapter, FileEntry, PropertyField } from "./adapter";
2
- import type { FolderRef, Section } from "./section";
1
+ import type { FileAdapter, FileEntry, PropertyField } from "./adapter.js";
2
+ import type { PropertyDefinition } from "./property-definition.js";
3
+ import type { FolderRef, Section } from "./section.js";
4
+ import type { FileUploadItem } from "./upload.js";
3
5
  /**
4
6
  * An entry the properties panel shows, with what it knows of it from outside. The panel is meant
5
7
  * for the media manager too, so it knows nothing of sections or the file manager.
@@ -37,6 +39,22 @@ export interface PropertiesItem {
37
39
  /** Told once its properties are saved, so what lists it can be listed again. */
38
40
  onUpdated?: () => void;
39
41
  }
42
+ /**
43
+ * Uploading into the parts of the one entry the panel shows (`PropertyDefinition.upload`), as the
44
+ * media manager's asset view offers it: what the panel's Upload buttons ask for, and the files being
45
+ * sent, which each property lists under it.
46
+ */
47
+ export interface PartUploads {
48
+ /**
49
+ * Asks for files for a property's part: the host opens the browser's file picker and goes on from
50
+ * there. `opener`, the button pressed, takes the focus back once what follows is over.
51
+ */
52
+ pick: (definition: PropertyDefinition, opener: HTMLElement) => void;
53
+ /** The files being sent into the entry's parts, waiting, under way or failed, by the part's name. */
54
+ items: ReadonlyMap<string, readonly FileUploadItem[]>;
55
+ cancel: (id: number) => void;
56
+ retry: (id: number) => void;
57
+ }
40
58
  /** A field of the backend's own the user can change in the properties: text, or a list of tags. */
41
59
  export type EditableField = Extract<PropertyField, {
42
60
  type: "text" | "tags";
@@ -1,5 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
- import type { FileAdapter, FileEntry } from "./adapter";
2
+ import type { FileAdapter, FileEntry } from "./adapter.js";
3
+ import type { MediaUploadForm } from "./media.js";
3
4
  /** What a property's value is: text, a number, yes or no, or a date. */
4
5
  export type PropertyType = "string" | "number" | "boolean" | "date";
5
6
  /**
@@ -23,6 +24,40 @@ export interface PropertyErrorKeyParams {
23
24
  /** The asset picked or processed; in an upload form, a stand-in for the files. */
24
25
  entry: FileEntry;
25
26
  }
27
+ /**
28
+ * Files uploaded into a part of an asset, which a property shows (`PropertyDefinition.upload`): a
29
+ * video's subtitles, audio tracks or poster. What a part is, and what's made of the file, is the
30
+ * backend's; the media manager only carries the file there, with what's asked of it.
31
+ */
32
+ export interface PropertyUpload {
33
+ /**
34
+ * The part's name, handed to the adapter's `uploadPart` as the backend knows it, such as
35
+ * "subtitles"; the property's `field` when left out.
36
+ */
37
+ part?: string;
38
+ /**
39
+ * The types of files it takes, in the file input's `accept` syntax (".vtt,.srt,text/vtt",
40
+ * "audio/*"); the picker offers only those, and a file of another type is left out, saying so.
41
+ * Any file when left out.
42
+ */
43
+ accept?: string;
44
+ /** Several files at once, each an upload of its own, asked the part's form once; one when left out. */
45
+ multiple?: boolean;
46
+ /**
47
+ * The Upload button's name and tooltip, in the app's language, such as "Add subtitles"; "Upload
48
+ * to Subtitles" (`propertiesUploadTo`) when left out.
49
+ */
50
+ label?: string;
51
+ /**
52
+ * What's asked of the files before they're sent, as a library's `uploadForm` is: a subtitle's
53
+ * language and whether it's forced, an audio track's language. Handed the files and the asset they
54
+ * go into, it returns the form, or `null` when there's nothing to ask, and they're sent at once.
55
+ * Shown over the asset's view, once a batch. What it holds goes to `uploadPart` with every file
56
+ * (`UploadPartOptions.values`), which decides what it means. Its params say the asset and the part
57
+ * (`MediaUploadFormParams.partOf`, `part`).
58
+ */
59
+ form?(files: readonly File[], asset: FileEntry): MediaUploadForm<any> | null;
60
+ }
26
61
  /** A choice of a property chosen from a list, with its label in the app's language. */
27
62
  export interface PropertyOption<T> {
28
63
  value: T;
@@ -48,6 +83,13 @@ interface PropertyBase<V> {
48
83
  * fields are there to be filled in unless they say otherwise.
49
84
  */
50
85
  editable?: boolean;
86
+ /**
87
+ * Whether the media manager's Edit fields… offers it for several assets at once, while it's
88
+ * `editable`. One with an editor (`renderEdit`, or the built-in one of its type) is offered unless
89
+ * this is false, as a name usually is one asset's alone; one drawn only by `render` is offered only
90
+ * when it's true, as what it draws, such as a poster picked from a video's own frames, usually is.
91
+ */
92
+ editMany?: boolean;
51
93
  /** Marked as to be filled in. */
52
94
  required?: boolean;
53
95
  /**
@@ -68,6 +110,16 @@ interface PropertyBase<V> {
68
110
  errorKey?(params: PropertyErrorKeyParams): string | readonly string[];
69
111
  /** Gives it a button copying its text (`formattedValue`), e.g. for an address or a checksum. */
70
112
  copyable?: boolean;
113
+ /**
114
+ * Files can be uploaded into what it shows of an asset, a part of the asset's, such as its
115
+ * subtitles or its audio tracks: in the media manager's asset view, an Upload button after its
116
+ * value, shown even while it has none, opens the browser's file picker, the part's `form` is asked
117
+ * of the files, and each goes to the adapter's `uploadPart` through the upload panel, the files
118
+ * being sent listed under it. Once one is in, the asset's properties are asked for again, so it
119
+ * shows here. Needs the adapter's `uploadPart`, a library that takes files and can be changed
120
+ * there, and an asset allowing `write`. Only read in the asset view, of an asset, not a group.
121
+ */
122
+ upload?: PropertyUpload;
71
123
  /**
72
124
  * Its value from the raw one under `field`, or from anything of the entry's: cast, reached into,
73
125
  * or put together, such as a picture's size from `entry.media`; undefined where there's none.
@@ -196,6 +248,11 @@ export interface PropertyParams<V = unknown> {
196
248
  * id), as nothing is uploaded yet; undefined elsewhere.
197
249
  */
198
250
  files?: readonly File[];
251
+ /**
252
+ * In the media manager's Edit fields…, the assets or groups being changed together, which `entry`
253
+ * only stands in for (the first one's name and kind, and no id); undefined elsewhere.
254
+ */
255
+ entries?: readonly FileEntry[];
199
256
  }
200
257
  export interface PropertyRenderParams<V = unknown> extends PropertyParams<V> {
201
258
  /**
@@ -1,5 +1,5 @@
1
- import type { FileAdapter, FileEntry } from "./adapter";
2
- import type { FolderRef, Section } from "./section";
1
+ import type { FileAdapter, FileEntry } from "./adapter.js";
2
+ import type { FolderRef, Section } from "./section.js";
3
3
  /**
4
4
  * What a search covers: the open folder ("folder", Ctrl+F and the button by the path bar) or every
5
5
  * section checked in the field's sections menu ("everywhere", Ctrl+Shift+F and the magnifier at the
@@ -1,5 +1,5 @@
1
- import type { FileAdapter } from "./adapter";
2
- import type { IconSource } from "./icon";
1
+ import type { FileAdapter } from "./adapter.js";
2
+ import type { IconSource } from "./icon.js";
3
3
  /**
4
4
  * Which other sections a section takes entries from (`Section.importFrom`): every one (`true`),
5
5
  * none (`false`), only the sections with the ids in `allow`, or all but those in `deny`.
@@ -1,6 +1,6 @@
1
- import type { FileEntry } from "./adapter";
2
- import type { FileManagerLocation } from "./navigation";
3
- import type { FolderRef } from "./section";
1
+ import type { FileEntry } from "./adapter.js";
2
+ import type { FileManagerLocation } from "./navigation.js";
3
+ import type { FolderRef } from "./section.js";
4
4
  /** What `onSelectionChange` is told along with the selected ids. */
5
5
  export interface SelectionDetails {
6
6
  /**
@@ -1,11 +1,11 @@
1
1
  import type { ComponentType, HTMLAttributes } from "react";
2
- import type { ActionContext } from "./action";
3
- import type { FileEntry } from "./adapter";
4
- import type { MediaSection } from "./media";
5
- import type { FileManagerLocation } from "./navigation";
6
- import type { SearchScope } from "./search";
7
- import type { FolderRef, Section } from "./section";
8
- import type { ViewMode } from "./view";
2
+ import type { ActionContext } from "./action.js";
3
+ import type { FileEntry } from "./adapter.js";
4
+ import type { MediaSection } from "./media.js";
5
+ import type { FileManagerLocation } from "./navigation.js";
6
+ import type { SearchScope } from "./search.js";
7
+ import type { FolderRef, Section } from "./section.js";
8
+ import type { ViewMode } from "./view.js";
9
9
  /**
10
10
  * Attributes an app adds to one of a component's parts through `slotProps`, as the element takes
11
11
  * them: a `className` (utility classes included), a `style`, `data-*` and `aria-*` attributes, an
@@ -153,6 +153,11 @@ export interface MediaEmptyProps extends MediaSlotPlace {
153
153
  export interface MediaNoResultsProps extends MediaSlotPlace {
154
154
  /** What's typed in the search field, as typed. */
155
155
  query: string;
156
+ /**
157
+ * What the library's filters held as they were applied, while any is set (`MediaSection.filterForm`),
158
+ * so the state can say they found nothing, or offer to clear them; undefined otherwise.
159
+ */
160
+ filters?: Readonly<Record<string, unknown>>;
156
161
  }
157
162
  /** What `MediaManagerSlots.error` and `MediaPickerSlots.error` are handed. */
158
163
  export interface MediaErrorProps extends MediaSlotPlace {
@@ -1,5 +1,5 @@
1
- import type { ConflictPolicy, FileAdapter, FileEntry } from "./adapter";
2
- import type { FolderRef } from "./section";
1
+ import type { ConflictPolicy, FileAdapter, FileEntry } from "./adapter.js";
2
+ import type { FolderRef } from "./section.js";
3
3
  export type TransferKind = "copy" | "move";
4
4
  /**
5
5
  * Where a copy or move has got to: waiting for a free slot, being carried out by the adapter, or
@@ -1,5 +1,5 @@
1
- import type { FileEntry } from "./adapter";
2
- import type { FolderRef, Section } from "./section";
1
+ import type { FileEntry } from "./adapter.js";
2
+ import type { FolderRef, Section } from "./section.js";
3
3
  /** Where a row of the sidebar tree sits. The tree is flattened, so it renders only the rows in or near view. */
4
4
  interface PlacedRow {
5
5
  /** Unique among the rows: a folder's or a section root's `folderKey`, or what else the row is for. */
@@ -1,6 +1,6 @@
1
- import type { FileAdapter, FileEntry } from "./adapter";
2
- import type { EntryGroup } from "./menu";
3
- import type { FolderRef, Section } from "./section";
1
+ import type { FileAdapter, FileEntry } from "./adapter.js";
2
+ import type { EntryGroup } from "./menu.js";
3
+ import type { FolderRef, Section } from "./section.js";
4
4
  /** A change made through the file manager that can be undone, as the text names it: "Undo rename". */
5
5
  export type UndoChange = "rename" | "newFolder" | "copy" | "move" | "trash" | "restore";
6
6
  /** A folder of a section, by the trail to it. */
@@ -1,5 +1,5 @@
1
- import type { ConflictPolicy, FileAdapter } from "./adapter";
2
- import type { FolderRef } from "./section";
1
+ import type { ConflictPolicy, FileAdapter, FileEntry, OperationOptions } from "./adapter.js";
2
+ import type { FolderRef } from "./section.js";
3
3
  /**
4
4
  * Where an upload has got to: waiting for a free slot, being sent, or ended. Only failed and
5
5
  * cancelled uploads can be tried again.
@@ -31,6 +31,36 @@ interface UploadBase {
31
31
  export interface FileUploadItem extends UploadBase {
32
32
  kind: "file";
33
33
  file: File;
34
+ /** Its entry once sent, when the adapter's `upload` resolved with it. */
35
+ entry?: FileEntry;
36
+ /** The backend already had the file, and handed that back (`UploadResult.existing`). */
37
+ existing?: boolean;
38
+ /**
39
+ * The folders holding `entry`, outermost first, when the adapter said it isn't in `folder`
40
+ * (`UploadResult.trail`), as it gave them: from a root or from above it.
41
+ */
42
+ trail?: readonly FolderRef[];
43
+ /**
44
+ * The asset whose file it's put in place of, through the adapter's `replace` rather than `upload`,
45
+ * as it was when that was asked for; `folder` is the one it's in. `entry` is what `replace`
46
+ * resolved with, when it said.
47
+ */
48
+ replaces?: FileEntry;
49
+ /**
50
+ * The asset it's sent into as a part of it, through the adapter's `uploadPart` rather than
51
+ * `upload`; `folder` is the one the asset is in. `entry` is what `uploadPart` resolved with, when
52
+ * it said.
53
+ */
54
+ partOf?: UploadPartTarget;
55
+ }
56
+ /** An asset a file is sent into as a part of it (`FileAdapter.uploadPart`). */
57
+ export interface UploadPartTarget {
58
+ /** The asset, as it was when that was asked for. */
59
+ entry: FileEntry;
60
+ /** The part's name, handed to `uploadPart` (`PropertyUpload.part`). */
61
+ part: string;
62
+ /** What the property showing the part is called, in the app's language, for the upload panel's row. */
63
+ label: string;
34
64
  }
35
65
  /** Something in a folder uploaded that failed: a file, or a folder with everything in it. */
36
66
  export interface UploadFailure {
@@ -64,6 +94,11 @@ export interface FolderUploadItem extends UploadBase {
64
94
  /** The first things in it that failed, in the order they did, and how many more did. */
65
95
  failures: UploadFailure[];
66
96
  moreFailures: number;
97
+ /**
98
+ * The folder it made in `folder`, or merged into there, once known, as `createFolder` (or the
99
+ * host's `makeFolder`) resolved with it, or as the host or a listing gave it.
100
+ */
101
+ entry?: FileEntry;
67
102
  }
68
103
  export type UploadItem = FileUploadItem | FolderUploadItem;
69
104
  /** A folder to upload, with everything in it. */
@@ -92,6 +127,26 @@ export interface FolderUpload {
92
127
  name: string;
93
128
  /** The id of a folder of that name already there, to upload into instead, merging the two. */
94
129
  mergeInto?: string;
130
+ /** That folder's entry, when the host has it, handed to `makeFolder` for the folders made in it. */
131
+ merged?: FileEntry;
132
+ }
133
+ /**
134
+ * Makes a folder of a folder upload in place of the adapter's `createFolder`, as a media library
135
+ * makes its groups by its own rules: in `parentId`, named `name`, `parent` being that folder's entry,
136
+ * when it's known, and resolving with the folder made. Rejecting fails that folder, with everything in
137
+ * it, its error's message listed under the upload's row.
138
+ */
139
+ export type FolderMaker = (parentId: string, name: string, parent: FileEntry | undefined, options: OperationOptions) => Promise<FileEntry>;
140
+ /** How folders are uploaded, besides where to and how names clash (`UploadQueue.addFolders`). */
141
+ export interface FolderUploadOptions {
142
+ /** Files left out as the folders are read, such as those of types the section doesn't take. */
143
+ accepts?: (file: File) => boolean;
144
+ /** What a media library's upload form held, handed to the adapter's `upload` with every file. */
145
+ values?: Readonly<Record<string, unknown>>;
146
+ /** Makes each folder in place of the adapter's `createFolder`. */
147
+ makeFolder?: FolderMaker;
148
+ /** The entry of the folder they go into, when the host has it, `makeFolder`'s `parent` for the folders made there. */
149
+ folderEntry?: FileEntry;
95
150
  }
96
151
  /** A name the backend's own rules refuse (the adapter's `checkName`), with its message. */
97
152
  export interface RefusedName {
@@ -106,8 +161,29 @@ export interface MediaUploadCheck {
106
161
  files: File[];
107
162
  /** Files of types the library doesn't take (`acceptUploads`). */
108
163
  refused: File[];
109
- /** Folders, which a library, listed flat, doesn't take. */
164
+ /**
165
+ * Folders left out, as no group can be made of them at the level they were given to: the library
166
+ * makes no groups there, or its group form refuses them (`MediaGroupForm.fromFolder`).
167
+ */
110
168
  folders: FolderSource[];
169
+ /**
170
+ * Folders to make groups of, each with everything in it, under the name it's made by, or merged
171
+ * into the group of its name there.
172
+ */
173
+ groups: FolderUpload[];
111
174
  misnamed: RefusedName[];
112
175
  }
176
+ /**
177
+ * Where a file uploaded into a media library's level is, when its adapter said more than its entry
178
+ * (`UploadResult`): that the backend had it already, or put it in another group than that level.
179
+ */
180
+ export interface UploadPlace {
181
+ entry: FileEntry;
182
+ /** The groups holding it, from its library's root, outermost first. */
183
+ among: readonly FileEntry[];
184
+ /** The backend had it already (`UploadResult.existing`). */
185
+ existing: boolean;
186
+ /** It isn't in the level it was uploaded into. */
187
+ elsewhere: boolean;
188
+ }
113
189
  export {};
@@ -1,8 +1,8 @@
1
- import type { FileAdapter, FileEntry } from "./adapter";
2
- import type { MenuPosition } from "./menu";
3
- import type { SelectModifiers } from "./selection";
4
- import type { FileManagerEntrySlotParams, SlotAttributesOf } from "./slots";
5
- import type { MovingKinds } from "./transfer";
1
+ import type { FileAdapter, FileEntry } from "./adapter.js";
2
+ import type { MenuPosition } from "./menu.js";
3
+ import type { SelectModifiers } from "./selection.js";
4
+ import type { FileManagerEntrySlotParams, SlotAttributesOf } from "./slots.js";
5
+ import type { MovingKinds } from "./transfer.js";
6
6
  export type ViewMode = "list" | "grid";
7
7
  /**
8
8
  * How far each view is zoomed, in steps from the size it starts at: 1 is a step larger, with
@@ -1,5 +1,5 @@
1
1
  import type { KeyboardEvent } from "react";
2
- import type { ActionContext, ActionGroup, ToolbarGroup } from "../types";
2
+ import type { ActionContext, ActionGroup, ToolbarGroup } from "../types/index.js";
3
3
  /**
4
4
  * The actions that apply to a context, still grouped, with groups left empty dropped. Entries from
5
5
  * several folders only get those offered `acrossFolders`.
@@ -1,5 +1,5 @@
1
- import type { FolderStore } from "../store/folder-store";
2
- import type { Clipboard, FileAdapter, FileEntry, FolderRef, MovingIds, Section } from "../types";
1
+ import type { FolderStore } from "../store/folder-store.js";
2
+ import type { Clipboard, FileAdapter, FileEntry, FolderRef, MovingIds, Section } from "../types/index.js";
3
3
  /**
4
4
  * Whether the clipboard can be pasted into the folder at `trail`, which `adapter` serves: into a
5
5
  * section that takes entries from each of theirs and a folder that can change (`folderWritable`),
@@ -1,3 +1,16 @@
1
+ /**
2
+ * The first control inside an element that takes the focus from the keyboard, as a form of the app's
3
+ * draws it, or else the element itself.
4
+ */
5
+ export declare const firstFocusable: (root: HTMLElement) => HTMLElement;
6
+ /** What Tab reaches inside an element, in order: in the Tab order, shown and not inert. */
7
+ export declare const tabbables: (root: HTMLElement) => HTMLElement[];
8
+ /**
9
+ * Keeps Tab and Shift+Tab inside an element, as a modal dialog does, going round from its last to
10
+ * its first and back. Only for a press inside it, as what an app's form portals out still bubbles
11
+ * through it.
12
+ */
13
+ export declare const keepTabIn: (root: HTMLElement, event: Pick<KeyboardEvent, "key" | "shiftKey" | "target" | "defaultPrevented" | "preventDefault">) => void;
1
14
  /** The nearest ancestor of an element that scrolls vertically, or null when none does. */
2
15
  export declare const scrollParent: (element: HTMLElement) => HTMLElement | null;
3
16
  /** How many tracks a grid container lays out in each row. */
@@ -1,4 +1,4 @@
1
- import type { DownloadItem, FileAdapter, FileEntry, FolderRef, PreparedDownload } from "../types";
1
+ import type { DownloadItem, FileAdapter, FileEntry, FolderRef, PreparedDownload } from "../types/index.js";
2
2
  /**
3
3
  * What's downloaded for `entries` in `folder`: the entries, or with none, the folder itself, as an
4
4
  * entry with only what's known of it, as from its own menu.