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
package/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  filecove follows [semantic versioning](https://semver.org). Below 1.0, a minor version (0.2.0) may change the API; a patch (0.1.1) never does.
4
4
 
5
+ ## 0.2.0 (2026-11-28)
6
+
7
+ - `MediaManager`, while browsed: several selected as in a file manager (click, Ctrl or ⌘, Shift, Ctrl+A, a long-press on touch), a selection bar with Move to… and Delete for all of them, and dragging what's selected onto a group or a step of the path to move it there, by mouse or touch; `disableDrag` turns dragging off.
8
+ - The adapter's `delete` is handed `onEntryDone` (`DeleteOptions`), to report each entry as it's deleted, so one refused partway says what went: the media manager names what's left, and both components try only that again. Code calling an adapter's `delete` itself passes it too.
9
+ - `MediaManagerLocaleText` has the keys the media manager already showed from the file manager's text (`delete`, `deleteTitle`, `moveTitle`, `searchFailed`, the transfer panel's…), so a translation reaches them, and new ones (`mediaMoveTo`, `mediaMoveAllHere`, `mediaDeleteWarning`, `mediaNotDeleted`).
10
+ - `fmClasses.mediaSelectionBar`; the media manager's options carry `data-dragged` and `data-drop-target`.
11
+ - The adapter's `upload` may resolve with an `UploadResult` (`{ entry, existing?, trail? }`) in place of the entry, for a backend that hands back a file it already had, as one matching uploads by checksum does, or that put it in another group. The media manager and `MediaPicker` say "“front.jpg” is already in the library, in Schneider / Contactors", select it while picking, and offer to show it, where it used to vanish after its tile had waited 10 seconds for it. The upload panel's row says "Already there" and where it is. Code calling an adapter's `upload` itself reads either shape.
12
+ - `MediaPicker` takes `allowCreateGroups`, for New group in its header where the library's `createGroups` allows one, through its `groupForm` or a name; the picker goes into the group once it's made, so the next upload lands there.
13
+ - `--fm-panel-gap` and `--fm-panel-radius` set the space between the window's panels and their corners (6px, and three of `--fm-radius`), for all three components; at 0 the panels sit edge to edge, square, for a look with lines between the parts (see "Lines instead of tone" in `docs/customizing.md`).
14
+ - Filters beside the media manager's search: a library's `filterForm(group)` (a `MediaFilterForm`, with `defaults` as nothing set, `ready`, `count` and `chips`), shown in a card dropping from the header's Filters button over the results, in `MediaPicker` too, and the filters set as chips under the header (`MediaFilterChip`, each removing its filter), while the form names them. What it holds goes to the adapter's `search` as `SearchOptions.filters`, from the open level down, with an empty `query` while only filters are set. They're part of the search, not of its field, which shows only when it's opened or something's typed: `MediaSearch` takes `filters`, `apiRef.search(query, filters)` sets them, closing the field clears only what's typed, going to another level or library and `apiRef.closeSearch()` clear them, and `slots.noResults` is handed them.
15
+ - `filtersVariant="dialog"` on `MediaManager` and `MediaPicker` shows a library's filters in a dialog over the whole component in place of the card, for a form too big for it, such as rules of a field, an operator and a value: what's changed applies with its Apply, and Cancel leaves the filters as they were. A form's own `variant` (`MediaFiltersVariant`) comes first.
16
+ - The media manager's search field opens out of its button, and the name fades back as it closes; none of it, nor the filters' card and chips, moves for someone whose system asks for reduced motion.
17
+ - Replace file in the media manager's asset view, through the adapter's new optional `replace(entry, file, { signal, onProgress, values })` (`ReplaceOptions`): a new file in an asset's place, its id, properties and picks staying, checked against the library's `acceptUploads`, with its `uploadForm` asked first, now handed the asset it replaces (`uploadForm(files, replacing)`, `MediaUploadFormParams.replacing`). It runs in the upload panel as an upload does, the asset's tile and view saying "Replacing the file" meanwhile, and its processing is followed afresh once it's in.
18
+ - Edit fields… in `MediaManager`'s selection bar, while browsed: the same fields changed for everything selected, from the library's property definitions, each ticked to change it and saying beside it what they hold now (the value they share, "Not set" or "Mixed"); a list (`multiple`, such as tags) is changed by Add, Remove or Replace all. It saves through the adapter's new optional `updateManyProperties(entries, changes, { signal, onEntryDone })` (`PropertyChanges`, `UpdateManyOptions`), or else each entry through `updateProperties`, a few at a time; those the backend refuses are named, and Save tries only them again. `PropertyDefinition.editMany` leaves a field out (`false`, as a name), or offers one drawn by `render` alone (`true`), and `PropertyParams.entries` hands a field's functions the entries changed together.
19
+ - Folders dropped, pasted or picked in a media library become its groups, with their files in them and their folders groups inside them, wherever the library's `createGroups` allows a group: made through the adapter's `createFolder` by name, or, where a `groupForm` makes groups, through `createGroup` with what its new `fromFolder({ name })` makes of the name. A form without `fromFolder` takes no folders, and a folder refused at its depth fails with what's in it, listed under the upload's row.
20
+ - Uploading into a part of an asset in the media manager's asset view, such as a subtitle, an audio track or a poster, through the adapter's new optional `uploadPart(entry, part, file, options)` (`UploadPartOptions`): a `PropertyDefinition`'s `upload` (`PropertyUpload`: the part's name, the types it takes, one file or several, the button's label, and a form asked of the files) shows the property even while empty, with an Upload button after its value. The files go through the upload panel, listed under the property while they're sent, with their progress, Cancel and Try again.
21
+ - In development, the three roots warn in the console when their stylesheet isn't in the page, when nothing gives them a height (so they're as tall as their content), and when `adapter`, a section's `adapter` or a slot's component is made again on every render. An app's production build carries none of it.
22
+ - The declarations import each other with their extensions (`./types/index.js`), so an app whose TypeScript resolves with `moduleResolution` `node16` or `nodenext` finds the package's types, as well as one with `bundler`.
23
+ - `fmClasses.mediaFiltersButton`, `fmClasses.mediaFilters`, `fmClasses.mediaFiltersDialog`, `fmClasses.mediaFilterChips`, `fmClasses.mediaEditFields`, `fmClasses.mediaEditField`, `fmClasses.propertyUpload` and `fmClasses.propertyPartUploads`.
24
+ - New text: `uploadAlreadyThere`, `mediaUploadExisting`, `mediaUploadElsewhere`, `mediaInNewGroup`, `mediaFilters`, `mediaFiltersSet`, `mediaFiltersApplied`, `mediaRemoveFilter`, `mediaClearFilters`, `mediaFiltersHeld`, `mediaApplyFilters`, `uploadReplacingWith`, `uploadReplacedWith`, `mediaReplaceFile`, `mediaReplaceTitle`, `mediaReplaceRefusedTitle`, `mediaReplaceNewFile`, `mediaReplace`, `mediaReplacing`, `mediaReplaceDone`, `mediaEditFields`, `mediaEditFieldsTitle`, `mediaEditFieldsHint`, `mediaChangeField`, `mediaFieldMixed`, `mediaListChange`, `mediaListAdd`, `mediaListRemove`, `mediaListReplace`, `mediaEditFieldsNone`, `mediaEditFieldsRequired`, `mediaFieldsSaved`, `mediaSaveFieldsFailed`, `mediaNotSaved`, `mediaUploadFolder`, `mediaUploadFolders`, `mediaUploadFoldersNote`, `mediaUploadFolderHolds`, `mediaUploadFolderMerged`, `mediaUploadFolderNothing`, `mediaUploadFolderUnread`, `mediaGroupRefusedIn`, `uploadPartOf`, `propertiesUploadTo`, `propertiesPartUploads`, `mediaPartTitle`, `mediaPartRefusedTitle`, `mediaUploadingPart`, `mediaPartUploaded`.
25
+
5
26
  ## 0.1.0 (2026-11-12)
6
27
 
7
28
  The first release.
@@ -1,4 +1,4 @@
1
- import type { ToolbarGroup } from "../../types";
1
+ import type { ToolbarGroup } from "../../types/index.js";
2
2
  interface ToolbarActionsProps {
3
3
  groups: readonly ToolbarGroup[];
4
4
  /** Names the button holding the actions that don't show as buttons. */
@@ -1,4 +1,4 @@
1
- import type { IconButtonProps } from "../ui/icon-button";
1
+ import type { IconButtonProps } from "../ui/icon-button.js";
2
2
  interface TooltipIconButtonProps extends Omit<IconButtonProps, "aria-label" | "title"> {
3
3
  /** Names the button for screen readers and shows as its tooltip. */
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import type { DownloadItem } from "../../types";
1
+ import type { DownloadItem } from "../../types/index.js";
2
2
  interface DownloadPanelProps {
3
3
  /** The downloads to show, in the order asked for. */
4
4
  items: DownloadItem[];
@@ -0,0 +1,24 @@
1
+ import type { ReactNode, Ref } from "react";
2
+ import type { DropEffect, FileEntry } from "../../types/index.js";
3
+ interface DragPreviewProps {
4
+ ref: Ref<HTMLDivElement>;
5
+ /** The entry the drag started from. */
6
+ entry: FileEntry;
7
+ /** Its icon or picture, 1.25rem square, as the component it's dragged in draws one. */
8
+ icon: ReactNode;
9
+ /** How many entries are dragged, that one included. */
10
+ count: number;
11
+ /**
12
+ * A touch drag's, which follows the finger (`useEntryDrag` places it) and shows what letting
13
+ * go would do, where a mouse drag has the cursor say it.
14
+ */
15
+ touch?: boolean;
16
+ effect?: DropEffect;
17
+ }
18
+ /**
19
+ * The drag image, the file manager's and the media manager's: the grabbed entry's icon and name on a
20
+ * card, stacked on a card for each other entry up to `MAX_LAYERS`, with a count of them all when others
21
+ * go along, and for a touch drag a "+" where letting go would copy.
22
+ */
23
+ declare const DragPreview: ({ ref, entry, icon, count, touch, effect }: DragPreviewProps) => import("react").JSX.Element;
24
+ export default DragPreview;
@@ -1,4 +1,4 @@
1
- import type { Announcement } from "../../hooks/use-announcer";
1
+ import type { Announcement } from "../../hooks/use-announcer.js";
2
2
  interface AnnouncerProps {
3
3
  announcement: Announcement | null;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { FileViewProps } from "../../../types";
1
+ import type { FileViewProps } from "../../../types/index.js";
2
2
  /**
3
3
  * The entries as tiles, a listbox with one option per entry, of which only those in or near view
4
4
  * are rendered (`lines`), as many to a line as fit. The arrow keys move through them in two
@@ -1,4 +1,4 @@
1
- import type { FileViewProps } from "../../../types";
1
+ import type { FileViewProps } from "../../../types/index.js";
2
2
  /**
3
3
  * The entries as rows, a listbox with one option per entry, of which only those in or near view
4
4
  * are rendered (`lines`), one to a line. Only the focused row is in the tab order; the folder view
@@ -1,4 +1,4 @@
1
- import type { ActionContext, Arrival, FileEntry, FileManagerLocation, FileManagerSlotProps, FileManagerSlots, FolderRef, MenuRequest, OpenMenu, PasteFiles, RunShortcut, Section, SortOrder, TrashInfo, ViewMode } from "../../../types";
1
+ import type { ActionContext, Arrival, FileEntry, FileManagerLocation, FileManagerSlotProps, FileManagerSlots, FolderRef, MenuRequest, OpenMenu, PasteFiles, RunShortcut, Section, SortOrder, TrashInfo, ViewMode } from "../../../types/index.js";
2
2
  interface FolderViewProps {
3
3
  section: Section;
4
4
  trail: FolderRef[];
@@ -1,4 +1,4 @@
1
- import type { FileAdapter, FileEntry, ViewMode } from "../../../types";
1
+ import type { FileAdapter, FileEntry, ViewMode } from "../../../types/index.js";
2
2
  interface ItemIconProps {
3
3
  entry: FileEntry;
4
4
  /** The icon's width and height, in rem. */
@@ -1,4 +1,4 @@
1
- import type { FileManagerLocation, FileManagerSlotProps, FileManagerSlots, MenuRequest, OpenMenu, RunShortcut, SearchHit, SearchTarget, SortOrder, ViewMode } from "../../../types";
1
+ import type { FileManagerLocation, FileManagerSlotProps, FileManagerSlots, MenuRequest, OpenMenu, RunShortcut, SearchHit, SearchTarget, SortOrder, ViewMode } from "../../../types/index.js";
2
2
  interface SearchResultsProps {
3
3
  /** The sections searched, with their adapters, in the sidebar's order. */
4
4
  targets: readonly SearchTarget[];
@@ -1,4 +1,4 @@
1
- import type { SectionSearch } from "../../../types";
1
+ import type { SectionSearch } from "../../../types/index.js";
2
2
  /** One tab: every section's results (`id` null) or one section's. */
3
3
  export interface ResultTab {
4
4
  id: string | null;
@@ -1,4 +1,4 @@
1
- import type { Section } from "../../../types";
1
+ import type { Section } from "../../../types/index.js";
2
2
  interface TrashBarProps {
3
3
  /** The trash, whose root is open. */
4
4
  section: Section;
@@ -1,4 +1,4 @@
1
- import type { ActionContext, ActionGroup, MenuPosition } from "../../../types";
1
+ import type { ActionContext, ActionGroup, MenuPosition } from "../../../types/index.js";
2
2
  export interface MenuState {
3
3
  /** False while the menu plays its closing transition; the rest is kept so it doesn't empty mid-fade. */
4
4
  open: boolean;
@@ -1,4 +1,4 @@
1
- import type { Clash, ConflictPolicy } from "../../../types";
1
+ import type { Clash, ConflictPolicy } from "../../../types/index.js";
2
2
  interface ConflictMessageProps {
3
3
  clashes: Clash[];
4
4
  /**
@@ -1,4 +1,4 @@
1
- import type { EntryGroup, FileAdapter } from "../../../types";
1
+ import type { EntryGroup, FileAdapter } from "../../../types/index.js";
2
2
  /** Entries of one folder to delete, with the adapter serving its section. */
3
3
  export interface DeleteGroup extends EntryGroup {
4
4
  /** The section's adapter, already known to support deleting. */
@@ -42,7 +42,8 @@ interface DeleteDialogProps {
42
42
  * takes entries sharing a folder, each through its own section's adapter. Deleting can't be undone,
43
43
  * so nothing is deleted without asking, not even the copies undoing a copy deletes, nor what's in
44
44
  * the trash as it's emptied. Anything the adapter rejects with is shown in the dialog, which stays
45
- * open to try again, with only the folders' entries not yet deleted.
45
+ * open to try again, with only the entries not yet deleted: the folders' not reached, and of the one it
46
+ * stopped at, those the adapter didn't report gone (`DeleteOptions.onEntryDone`).
46
47
  */
47
48
  declare const DeleteDialog: ({ open, request, onClose, onChanged, onDone }: DeleteDialogProps) => import("react").JSX.Element;
48
49
  export default DeleteDialog;
@@ -1,5 +1,5 @@
1
1
  import type { KeyboardEvent, Ref } from "react";
2
- import type { Room } from "../../../hooks/use-swipe";
2
+ import type { Room } from "../../../hooks/use-swipe.js";
3
3
  /** What the preview hands the image it shows. */
4
4
  export interface ImageViewerHandle {
5
5
  /** Takes a key pressed anywhere in the preview, and says whether it did anything with it. */
@@ -1,4 +1,4 @@
1
- import type { FileAdapter, FileEntry, FolderRef, Section } from "../../../types";
1
+ import type { FileAdapter, FileEntry, FolderRef, Section } from "../../../types/index.js";
2
2
  interface RequestBase {
3
3
  section: Section;
4
4
  /** The section's adapter, already known to support the request. */
@@ -1,4 +1,4 @@
1
- import type { Clipboard, ConflictPolicy, FileEntry, FolderRef, Section } from "../../../types";
1
+ import type { Clipboard, ConflictPolicy, FileEntry, FolderRef, Section } from "../../../types/index.js";
2
2
  export interface PasteRequest {
3
3
  /** What is pasted, as it was when the paste began: the clipboard, or entries dropped onto a folder. */
4
4
  clipboard: Clipboard;
@@ -1,5 +1,5 @@
1
- import type { Announcement } from "../../../hooks/use-announcer";
2
- import type { FileAdapter, FileEntry, FilePreviewer, FolderRef, Section, ToolbarGroup } from "../../../types";
1
+ import type { Announcement } from "../../../hooks/use-announcer.js";
2
+ import type { FileAdapter, FileEntry, FilePreviewer, FolderRef, Section, ToolbarGroup } from "../../../types/index.js";
3
3
  /** A file the preview steps through, with where it is. */
4
4
  export interface PreviewFile {
5
5
  entry: FileEntry;
@@ -1,4 +1,4 @@
1
- import type { ConflictPolicy, FileAdapter, FileEntry, Section, UndoFolder } from "../../../types";
1
+ import type { ConflictPolicy, FileAdapter, FileEntry, Section, UndoFolder } from "../../../types/index.js";
2
2
  export interface RestoreRequest {
3
3
  /** The trash the entries are in, right in its root. */
4
4
  section: Section;
@@ -1,4 +1,4 @@
1
- import type { ActionGroup, MainMenuGroup } from "../../../types";
1
+ import type { ActionGroup, MainMenuGroup } from "../../../types/index.js";
2
2
  interface ShortcutsDialogProps {
3
3
  open: boolean;
4
4
  actions: ActionGroup[];
@@ -1,5 +1,5 @@
1
- import type { ClipboardPart, ConflictPolicy, FileAdapter, FileEntry, FileManagerLocation, FolderRef, Section } from "../../../types";
2
- import type { NameRequest } from "./name-dialog";
1
+ import type { ClipboardPart, ConflictPolicy, FileAdapter, FileEntry, FileManagerLocation, FolderRef, Section } from "../../../types/index.js";
2
+ import type { NameRequest } from "./name-dialog.js";
3
3
  export interface TransferRequest {
4
4
  kind: "copy" | "move";
5
5
  /** The section the picker starts in. */
@@ -1,4 +1,4 @@
1
- import type { ConflictPolicy, DroppedFiles, FileAdapter, FolderRef, FolderUpload, Section } from "../../../types";
1
+ import type { ConflictPolicy, DroppedFiles, FileAdapter, FolderRef, FolderUpload, Section } from "../../../types/index.js";
2
2
  export interface UploadRequest {
3
3
  /** The section of the folder uploaded into. */
4
4
  section: Section;
@@ -1,5 +1,5 @@
1
1
  import type { ComponentPropsWithoutRef, Ref } from "react";
2
- import type { ActionContext, ActionGroup, FileAdapter, FileEntry, FileManagerApi, FileManagerLimits, FileManagerLocaleText, FileManagerLocation, FileManagerSearch, FileManagerSlotProps, FileManagerSlots, FilePreviewer, LocationChangeReason, MainMenuGroup, Section, SectionFolder, SectionGroup, SelectionDetails, SortOrder, ViewMode, ViewZoom } from "../../types";
2
+ import type { ActionContext, ActionGroup, FileAdapter, FileEntry, FileManagerApi, FileManagerLimits, FileManagerLocaleText, FileManagerLocation, FileManagerSearch, FileManagerSlotProps, FileManagerSlots, FilePreviewer, LocationChangeReason, MainMenuGroup, Section, SectionFolder, SectionGroup, SelectionDetails, SortOrder, ViewMode, ViewZoom } from "../../types/index.js";
3
3
  type RootAttributes = Omit<ComponentPropsWithoutRef<"div">, "title" | "children">;
4
4
  interface BaseProps extends RootAttributes {
5
5
  /** Backend for every section that doesn't bring its own. */
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode, Ref } from "react";
2
- import type { HistoryStop, SearchScope, SlotAttributes, SortOrder, ToolbarGroup, ViewMode, ViewZoom, ZoomStep } from "../../../types";
2
+ import type { HistoryStop, SearchScope, SlotAttributes, SortOrder, ToolbarGroup, ViewMode, ViewZoom, ZoomStep } from "../../../types/index.js";
3
3
  type HistoryDirection = "back" | "forward";
4
4
  interface HeaderBarProps {
5
5
  /** Centre slot, the path bar, or the search field while searching. */
@@ -1,4 +1,4 @@
1
- import type { HistoryStop } from "../../../types";
1
+ import type { HistoryStop } from "../../../types/index.js";
2
2
  interface HistoryMenuProps {
3
3
  open: boolean;
4
4
  /** The back or forward button the list hangs from, kept while the menu fades out. */
@@ -1,4 +1,4 @@
1
- import type { FileManagerLocation, FolderRef, OpenMenu, Section } from "../../../types";
1
+ import type { FileManagerLocation, FolderRef, OpenMenu, Section } from "../../../types/index.js";
2
2
  interface PathBarProps {
3
3
  section: Section;
4
4
  trail: FolderRef[];
@@ -1,5 +1,5 @@
1
1
  import type { RefObject } from "react";
2
- import type { SearchScope, SectionGroup } from "../../../types";
2
+ import type { SearchScope, SectionGroup } from "../../../types/index.js";
3
3
  interface SearchFieldProps {
4
4
  scope: SearchScope;
5
5
  query: string;
@@ -1,5 +1,5 @@
1
1
  import type { RefObject } from "react";
2
- import type { SectionGroup } from "../../../types";
2
+ import type { SectionGroup } from "../../../types/index.js";
3
3
  interface SearchSectionsMenuProps {
4
4
  groups: SectionGroup[];
5
5
  /** Ids of the sections left out of the search; never all of them. */
@@ -1,4 +1,4 @@
1
- import type { SortOrder, ViewMode, ViewZoom, ZoomStep } from "../../../types";
1
+ import type { SortOrder, ViewMode, ViewZoom, ZoomStep } from "../../../types/index.js";
2
2
  interface ViewMenuProps {
3
3
  /** The view shown, which the zoom items zoom. */
4
4
  view: ViewMode;
@@ -1,4 +1,4 @@
1
- import type { PlaceName } from "../../types";
1
+ import type { PlaceName } from "../../types/index.js";
2
2
  /** What the notice under the content says. */
3
3
  export interface Notice {
4
4
  /** Counts notices, so each one shows for its whole time, even with the same text. */
@@ -1,6 +1,6 @@
1
1
  import type { Ref } from "react";
2
- import type { PropertiesCache } from "../../store/properties-cache";
3
- import type { ActionContext, ActionGroup, FileAdapter, MenuRequest, PropertiesSubject, Section, SlotAttributes, TrashInfo } from "../../types";
2
+ import type { PropertiesCache } from "../../store/properties-cache.js";
3
+ import type { ActionContext, ActionGroup, FileAdapter, MenuRequest, PropertiesSubject, Section, SlotAttributes, TrashInfo } from "../../types/index.js";
4
4
  interface PropertiesPaneProps {
5
5
  ref?: Ref<HTMLDivElement>;
6
6
  subject: PropertiesSubject;
@@ -1,4 +1,4 @@
1
- import type { FileManagerLocation, OpenMenu, PasteFiles, RunShortcut, SelectModifiers, StatusRow, TreeGuide, TreeItemRow, TreeSelection, TreeTarget } from "../../../types";
1
+ import type { FileManagerLocation, OpenMenu, PasteFiles, RunShortcut, SelectModifiers, StatusRow, TreeGuide, TreeItemRow, TreeSelection, TreeTarget } from "../../../types/index.js";
2
2
  /**
3
3
  * Props every row of the tree gets unchanged. The tree's selection is its own: selecting here
4
4
  * never touches what is selected in the content, and a menu opened here acts on the tree's
@@ -1,4 +1,4 @@
1
- import type { MainMenuGroup, UndoChange } from "../../../types";
1
+ import type { MainMenuGroup, UndoChange } from "../../../types/index.js";
2
2
  /** The menu's Undo and Redo, named by the change each undoes or redoes, or null with none to. */
3
3
  export interface UndoItems {
4
4
  undo: UndoChange | null;
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode, Ref } from "react";
2
- import type { FileManagerLocation, MainMenuGroup, OpenMenu, PasteFiles, RunShortcut, SearchScope, Section, SectionGroup, SlotAttributes, TreeReveal } from "../../../types";
3
- import type { UndoItems } from "./main-menu";
2
+ import type { FileManagerLocation, MainMenuGroup, OpenMenu, PasteFiles, RunShortcut, SearchScope, Section, SectionGroup, SlotAttributes, TreeReveal } from "../../../types/index.js";
3
+ import type { UndoItems } from "./main-menu.js";
4
4
  interface SidebarProps {
5
5
  ref?: Ref<HTMLDivElement>;
6
6
  title: string;
@@ -1,4 +1,4 @@
1
- import type { IconComponent } from "../../types";
1
+ import type { IconComponent } from "../../types/index.js";
2
2
  /**
3
3
  * One shape of an icon on its 24 by 24 grid: a path's `d` alone, or a path or a circle (its centre
4
4
  * and radius) with what else it's drawn with, the fainter tone of a two-tone icon or holes cut by
@@ -1,5 +1,5 @@
1
1
  import type { PropsWithChildren } from "react";
2
- import type { IconOverrides, IconSet } from "../../types";
2
+ import type { IconOverrides, IconSet } from "../../types/index.js";
3
3
  interface IconProviderProps extends PropsWithChildren {
4
4
  /**
5
5
  * The icons for everything below: a Material style imported from the package's `icons/<style>`
@@ -1,4 +1,4 @@
1
- import type { IconSource } from "../../types";
1
+ import type { IconSource } from "../../types/index.js";
2
2
  interface IconSlotProps {
3
3
  icon: IconSource;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import type { SVGProps } from "react";
2
- import type { IconName } from "../../types";
2
+ import type { IconName } from "../../types/index.js";
3
3
  export interface IconProps extends Omit<SVGProps<SVGSVGElement>, "name" | "fontSize"> {
4
4
  name: IconName;
5
5
  /** `medium` is 1.5rem, `small` 1.25rem, and `inherit` the size of the text around it. */
@@ -1,17 +1,29 @@
1
- import type { FileAdapter, FileEntry } from "../../types";
1
+ import type { FileAdapter, FileEntry } from "../../types/index.js";
2
2
  interface AssetDeleteProps {
3
- entry: FileEntry;
3
+ /**
4
+ * What's deleted, one folder's entries after another, as the adapter takes entries sharing one: the
5
+ * asset or group shown, or what's selected, which a search may have found in several groups.
6
+ */
7
+ groups: readonly (readonly FileEntry[])[];
4
8
  adapter: FileAdapter;
9
+ /** Where it is: under the asset view's header, or at the library's foot, in the selection bar's place. */
10
+ placement?: "top" | "bottom";
5
11
  /** Closes it, asking nothing of the backend, or stopping what was asked. */
6
12
  onCancel: () => void;
7
- onDeleted: () => void;
8
- /** Left while the backend was being asked, which may have deleted it by then. */
13
+ /**
14
+ * Told what went each time some did: everything asked, `done`, or what the adapter reported gone
15
+ * before it refused the rest (`DeleteOptions.onEntryDone`), which stays to try again.
16
+ */
17
+ onDeleted: (entries: FileEntry[], done: boolean) => void;
18
+ /** Left while the backend was being asked, which may have deleted some of it by then. */
9
19
  onLeft: () => void;
10
20
  }
11
21
  /**
12
- * Asks before deleting the asset or group shown, in the view rather than in a dialog of its own, as a picker is
13
- * often in the app's own dialog already. Cancel takes the focus as it opens, as deleting can't be
14
- * undone, and Escape cancels. It stays until the adapter's `delete` answers, to say why when it's refused.
22
+ * Asks before deleting the asset or group shown, or what's selected, in the view or the library rather
23
+ * than in a dialog of its own, as a picker is often in the app's own dialog already. Cancel takes the
24
+ * focus as it opens, as deleting can't be undone, and Escape cancels. It stays until the adapter's
25
+ * `delete` answers, to say why when it's refused, naming those left when some went first, and then asks
26
+ * about only those.
15
27
  */
16
- declare const AssetDelete: ({ entry, adapter, onCancel, onDeleted, onLeft }: AssetDeleteProps) => import("react").JSX.Element;
28
+ declare const AssetDelete: ({ groups, adapter, placement, onCancel, onDeleted, onLeft }: AssetDeleteProps) => import("react").JSX.Element;
17
29
  export default AssetDelete;
@@ -1,4 +1,4 @@
1
- import type { AssetHold } from "../../types";
1
+ import type { AssetHold } from "../../types/index.js";
2
2
  /**
3
3
  * Where a bar is drawn: along a tile's picture's foot, under a row's name, or along the foot of the
4
4
  * asset view's notice; the frame and the notice are positioned.
@@ -1,5 +1,5 @@
1
1
  import type { KeyboardEvent, MouseEvent } from "react";
2
- import type { AssetHold, FileAdapter, FileEntry, FolderRef, MediaAssetDraw, MediaKind, MediaLayout, MediaPickerSlotProps, MediaSection } from "../../types";
2
+ import type { AssetHold, FileAdapter, FileEntry, FolderRef, MediaAssetDraw, MediaKind, MediaLayout, MediaPickerSlotProps, MediaSection } from "../../types/index.js";
3
3
  interface AssetOptionProps {
4
4
  entry: FileEntry;
5
5
  kind: MediaKind;
@@ -25,6 +25,17 @@ interface AssetOptionProps {
25
25
  limited: boolean;
26
26
  /** Whether it's a group that can be selected, which has a check of its own to do it by. */
27
27
  checkable: boolean;
28
+ /**
29
+ * Whether what's selected is for acting on in place, while the media manager is browsing, where one
30
+ * that can't be chosen now can still be selected, moved and deleted, so it's never disabled.
31
+ */
32
+ browsing: boolean;
33
+ /** Whether it can be dragged, to be dropped on a group or a step of the path. */
34
+ draggable: boolean;
35
+ /** Whether it's among what's being dragged, which fades. */
36
+ dragged: boolean;
37
+ /** Whether letting go of what's dragged now would drop it into this group. */
38
+ dropTarget: boolean;
28
39
  /** Whether it has the grid's Tab stop. */
29
40
  focused: boolean;
30
41
  /** What the app draws it with, the library's `renderAsset` or the media manager's. */
@@ -59,5 +70,5 @@ interface AssetOptionProps {
59
70
  * under every asset drawn so while any in the grid needs it, so all are as tall. Absolutely placed at
60
71
  * its line and column, as only the assets in or near view are rendered (see `MediaGrid`).
61
72
  */
62
- declare const AssetOption: import("react").MemoExoticComponent<({ entry, kind, layout, adapter, index, count, top, column, selected, hold, work, trail, limited, checkable, focused, draw, drawGroup, opensGroups, opensAssets, onPress, onCheck, onActivate, onOpen, onFocus, onKeyDown, section, assetSlot, }: AssetOptionProps) => import("react").JSX.Element>;
73
+ declare const AssetOption: import("react").MemoExoticComponent<({ entry, kind, layout, adapter, index, count, top, column, selected, hold, work, trail, limited, checkable, browsing, draggable, dragged, dropTarget, focused, draw, drawGroup, opensGroups, opensAssets, onPress, onCheck, onActivate, onOpen, onFocus, onKeyDown, section, assetSlot, }: AssetOptionProps) => import("react").JSX.Element>;
63
74
  export default AssetOption;
@@ -1,4 +1,4 @@
1
- import type { FolderRef } from "../../types";
1
+ import type { FolderRef } from "../../types/index.js";
2
2
  interface AssetTrailProps {
3
3
  /** The groups between the level searched and what's found, outermost first. */
4
4
  trail: readonly FolderRef[];
@@ -1,4 +1,4 @@
1
- import type { AssetHold, FileAdapter, MediaChoice } from "../../types";
1
+ import type { AssetHold, FileAdapter, MediaChoice } from "../../types/index.js";
2
2
  interface ChoiceListProps {
3
3
  /** What's selected, in every library, in the order it's handed over in. */
4
4
  choices: readonly MediaChoice[];
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { AssetHold, FileAdapter, MediaChoice, SlotAttributes } from "../../types";
2
+ import type { AssetHold, FileAdapter, MediaChoice, SlotAttributes } from "../../types/index.js";
3
3
  interface ChoicesPaneProps {
4
4
  /** What's selected, in every library, in the order it's handed over in. */
5
5
  choices: readonly MediaChoice[];
@@ -1,4 +1,4 @@
1
- import type { FileAdapter, FileEntry } from "../../types";
1
+ import type { FileAdapter, FileEntry } from "../../types/index.js";
2
2
  interface GroupCreateProps {
3
3
  adapter: FileAdapter;
4
4
  /** The root or group it's made in. */
@@ -1,4 +1,4 @@
1
- import type { FileEntry } from "../../types";
1
+ import type { DropTarget, FileEntry } from "../../types/index.js";
2
2
  interface GroupPathProps {
3
3
  /** The library's name, where the path starts. */
4
4
  label: string;
@@ -8,11 +8,17 @@ interface GroupPathProps {
8
8
  onGoToLevel: (depth: number) => void;
9
9
  /** Whether the level it ends at names what's shown as a heading, as it does in the header. */
10
10
  heading?: boolean;
11
+ /**
12
+ * The level a step of the way leads to as somewhere what's dragged in the library can be dropped,
13
+ * by how many groups of the trail it has open; without it, the steps take no drops, as in the move
14
+ * step. A drag resting on a step goes back there, as a drag resting on a group goes into it.
15
+ */
16
+ dropTargetAt?: (depth: number) => DropTarget;
11
17
  }
12
18
  /**
13
19
  * Where the group open is, as it was walked to, as it's only ever listed a level at a time: the
14
20
  * library's name and the groups on the way, each going back there, and the one open, which names
15
21
  * what's shown: the library itself, with no group open.
16
22
  */
17
- declare const GroupPath: ({ label, trail, onGoToLevel, heading }: GroupPathProps) => import("react").JSX.Element;
23
+ declare const GroupPath: ({ label, trail, onGoToLevel, heading, dropTargetAt }: GroupPathProps) => import("react").JSX.Element;
18
24
  export default GroupPath;
@@ -1,5 +1,5 @@
1
1
  import type { Ref } from "react";
2
- import type { MediaSectionGroup, SlotAttributes } from "../../types";
2
+ import type { MediaSectionGroup, SlotAttributes } from "../../types/index.js";
3
3
  interface LibraryListProps {
4
4
  ref: Ref<HTMLElement>;
5
5
  groups: readonly MediaSectionGroup[];
@@ -12,10 +12,12 @@ interface LibraryListProps {
12
12
  onClose: () => void;
13
13
  /** The app's attributes for the list (`slotProps.libraries`). */
14
14
  attributes?: SlotAttributes;
15
+ /** Out of reach, while the filters' dialog is over the frame. */
16
+ inert?: boolean;
15
17
  }
16
18
  /**
17
19
  * The libraries, the sections in their groups, as a list of places the library shows one of:
18
20
  * docked beside it where there's room, or a drawer over it.
19
21
  */
20
- declare const LibraryList: ({ ref, groups, openId, open, onOpen, onClose, attributes }: LibraryListProps) => import("react").JSX.Element;
22
+ declare const LibraryList: ({ ref, groups, openId, open, onOpen, onClose, attributes, inert }: LibraryListProps) => import("react").JSX.Element;
21
23
  export default LibraryList;
@@ -1,5 +1,5 @@
1
- import type { PropertiesCache } from "../../store/properties-cache";
2
- import type { AssetHold, FileAdapter, FileEntry, FilePreviewer, MediaLayout, MediaSection, PropertyDefinitionGroup } from "../../types";
1
+ import type { PropertiesCache } from "../../store/properties-cache.js";
2
+ import type { AssetHold, FileAdapter, FileEntry, FilePreviewer, FileUploadItem, MediaLayout, MediaSection, PropertyDefinition, PropertyDefinitionGroup } from "../../types/index.js";
3
3
  interface MediaAssetProps {
4
4
  entry: FileEntry;
5
5
  section: MediaSection;
@@ -31,6 +31,17 @@ interface MediaAssetProps {
31
31
  onEdit: (() => void) | undefined;
32
32
  /** Opens where it can be moved to, while it can be. */
33
33
  onMove: (() => void) | undefined;
34
+ /** Opens the file picker for a file to take its place, while its file can be replaced. */
35
+ onReplace: (() => void) | undefined;
36
+ /**
37
+ * Opens the file picker for files to go into the part a property of its shows
38
+ * (`PropertyDefinition.upload`), while it can take them.
39
+ */
40
+ onUploadPart: ((definition: PropertyDefinition) => void) | undefined;
41
+ /** The files being sent into its parts, waiting, under way or failed, which its properties list. */
42
+ partUploads: readonly FileUploadItem[];
43
+ onCancelUpload: (id: number) => void;
44
+ onRetryUpload: (id: number) => void;
34
45
  /** Whether any of those is shown over it: it's hidden, but stays as it was, and takes the focus back. */
35
46
  covered: boolean;
36
47
  /** Whether it can be deleted, which shows the Delete button. */
@@ -44,10 +55,11 @@ interface MediaAssetProps {
44
55
  }
45
56
  /**
46
57
  * One asset in the library's place: shown by the app's previewers, or its picture, with the
47
- * properties its adapter hands over, editable where the library is, a way back to the library, to
48
- * the assets before and after it, and, while the app takes a choice, a toggle selecting it. A group
49
- * opens here for its fields, to be edited, moved or deleted, with what the app's previewers show of it and nothing
50
- * else of an asset's.
58
+ * properties its adapter hands over, editable where the library is, files uploaded into the parts they
59
+ * show where its adapter takes them, a way back to the library, to the assets before and after it, a
60
+ * new file put in its place where its adapter can, and, while the app takes a choice, a toggle
61
+ * selecting it. A group opens here for its fields, to be edited, moved or deleted, with what the app's
62
+ * previewers show of it and nothing else of an asset's.
51
63
  */
52
- declare const MediaAsset: ({ entry, section, layout, adapter, backTo, choosing, selected, hold, work, previewers, definitions, onBack, onPrevious, onNext, onToggleSelected, onProcess, onEdit, onMove, covered, deletable, onDeleted, onDeleteLeft, onUpdated, propertiesCache, }: MediaAssetProps) => import("react").JSX.Element;
64
+ declare const MediaAsset: ({ entry, section, layout, adapter, backTo, choosing, selected, hold, work, previewers, definitions, onBack, onPrevious, onNext, onToggleSelected, onProcess, onEdit, onMove, onReplace, onUploadPart, partUploads, onCancelUpload, onRetryUpload, covered, deletable, onDeleted, onDeleteLeft, onUpdated, propertiesCache, }: MediaAssetProps) => import("react").JSX.Element;
53
65
  export default MediaAsset;