filecove 0.0.0-stage → 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 (280) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/LICENSE +21 -0
  3. package/README.md +65 -2
  4. package/THIRD_PARTY_NOTICES.md +63 -0
  5. package/dist/components/buttons/toolbar-actions.d.ts +28 -0
  6. package/dist/components/buttons/tooltip-icon-button.d.ts +14 -0
  7. package/dist/components/downloads/download-panel.d.ts +23 -0
  8. package/dist/components/drag/drag-preview.d.ts +24 -0
  9. package/dist/components/file-manager/announcer.d.ts +14 -0
  10. package/dist/components/file-manager/content/file-grid.d.ts +8 -0
  11. package/dist/components/file-manager/content/file-list.d.ts +9 -0
  12. package/dist/components/file-manager/content/folder-view.d.ts +83 -0
  13. package/dist/components/file-manager/content/item-icon.d.ts +16 -0
  14. package/dist/components/file-manager/content/no-sections.d.ts +11 -0
  15. package/dist/components/file-manager/content/search-results.d.ts +40 -0
  16. package/dist/components/file-manager/content/search-tabs.d.ts +29 -0
  17. package/dist/components/file-manager/content/trash-bar.d.ts +13 -0
  18. package/dist/components/file-manager/context-menu/context-menu.d.ts +20 -0
  19. package/dist/components/file-manager/dialogs/conflict-step.d.ts +28 -0
  20. package/dist/components/file-manager/dialogs/delete-dialog.d.ts +49 -0
  21. package/dist/components/file-manager/dialogs/image-viewer.d.ts +42 -0
  22. package/dist/components/file-manager/dialogs/name-dialog.d.ts +41 -0
  23. package/dist/components/file-manager/dialogs/paste-dialog.d.ts +39 -0
  24. package/dist/components/file-manager/dialogs/preview-dialog.d.ts +75 -0
  25. package/dist/components/file-manager/dialogs/restore-dialog.d.ts +41 -0
  26. package/dist/components/file-manager/dialogs/shortcuts-dialog.d.ts +36 -0
  27. package/dist/components/file-manager/dialogs/transfer-dialog.d.ts +71 -0
  28. package/dist/components/file-manager/dialogs/upload-dialog.d.ts +34 -0
  29. package/dist/components/file-manager/file-manager.d.ts +320 -0
  30. package/dist/components/file-manager/find-layer.d.ts +29 -0
  31. package/dist/components/file-manager/header-bar/header-bar.d.ts +65 -0
  32. package/dist/components/file-manager/header-bar/history-menu.d.ts +18 -0
  33. package/dist/components/file-manager/header-bar/path-bar.d.ts +19 -0
  34. package/dist/components/file-manager/header-bar/path-field.d.ts +23 -0
  35. package/dist/components/file-manager/header-bar/search-field.d.ts +27 -0
  36. package/dist/components/file-manager/header-bar/search-sections-menu.d.ts +25 -0
  37. package/dist/components/file-manager/header-bar/view-menu.d.ts +39 -0
  38. package/dist/components/file-manager/notice-bar.d.ts +36 -0
  39. package/dist/components/file-manager/properties-pane.d.ts +53 -0
  40. package/dist/components/file-manager/resize-edge.d.ts +39 -0
  41. package/dist/components/file-manager/selection-bar.d.ts +15 -0
  42. package/dist/components/file-manager/sidebar/location-item.d.ts +36 -0
  43. package/dist/components/file-manager/sidebar/main-menu.d.ts +23 -0
  44. package/dist/components/file-manager/sidebar/sidebar.d.ts +80 -0
  45. package/dist/components/icons/check-badge.d.ts +3 -0
  46. package/dist/components/icons/create-icon.d.ts +20 -0
  47. package/dist/components/icons/file-icon.d.ts +19 -0
  48. package/dist/components/icons/icon-provider.d.ts +21 -0
  49. package/dist/components/icons/icon-slot.d.ts +6 -0
  50. package/dist/components/icons/icon.d.ts +19 -0
  51. package/dist/components/icons/locked-icon.d.ts +9 -0
  52. package/dist/components/media-manager/asset-delete.d.ts +29 -0
  53. package/dist/components/media-manager/asset-hold.d.ts +32 -0
  54. package/dist/components/media-manager/asset-option.d.ts +74 -0
  55. package/dist/components/media-manager/asset-trail.d.ts +13 -0
  56. package/dist/components/media-manager/choice-list.d.ts +29 -0
  57. package/dist/components/media-manager/choices-pane.d.ts +50 -0
  58. package/dist/components/media-manager/choose-bar.d.ts +26 -0
  59. package/dist/components/media-manager/drop-zone.d.ts +7 -0
  60. package/dist/components/media-manager/group-check.d.ts +13 -0
  61. package/dist/components/media-manager/group-create.d.ts +20 -0
  62. package/dist/components/media-manager/group-path.d.ts +24 -0
  63. package/dist/components/media-manager/library-list.d.ts +23 -0
  64. package/dist/components/media-manager/media-asset.d.ts +65 -0
  65. package/dist/components/media-manager/media-edit-many.d.ts +33 -0
  66. package/dist/components/media-manager/media-fields.d.ts +31 -0
  67. package/dist/components/media-manager/media-filter-chips.d.ts +17 -0
  68. package/dist/components/media-manager/media-filters-dialog.d.ts +39 -0
  69. package/dist/components/media-manager/media-filters.d.ts +37 -0
  70. package/dist/components/media-manager/media-form.d.ts +29 -0
  71. package/dist/components/media-manager/media-frame.d.ts +77 -0
  72. package/dist/components/media-manager/media-grid.d.ts +114 -0
  73. package/dist/components/media-manager/media-group.d.ts +29 -0
  74. package/dist/components/media-manager/media-header.d.ts +80 -0
  75. package/dist/components/media-manager/media-manager.d.ts +309 -0
  76. package/dist/components/media-manager/media-move.d.ts +30 -0
  77. package/dist/components/media-manager/media-picker.d.ts +140 -0
  78. package/dist/components/media-manager/media-picture.d.ts +26 -0
  79. package/dist/components/media-manager/media-process.d.ts +26 -0
  80. package/dist/components/media-manager/media-row.d.ts +13 -0
  81. package/dist/components/media-manager/media-step.d.ts +33 -0
  82. package/dist/components/media-manager/media-tile.d.ts +15 -0
  83. package/dist/components/media-manager/media-upload.d.ts +46 -0
  84. package/dist/components/media-manager/open-button.d.ts +15 -0
  85. package/dist/components/media-manager/picker-frame.d.ts +33 -0
  86. package/dist/components/media-manager/selection-bar.d.ts +25 -0
  87. package/dist/components/media-manager/upload-tile.d.ts +17 -0
  88. package/dist/components/properties/properties-panel.d.ts +53 -0
  89. package/dist/components/properties/property-display.d.ts +15 -0
  90. package/dist/components/properties/property-editor.d.ts +26 -0
  91. package/dist/components/properties/property-input.d.ts +36 -0
  92. package/dist/components/transfers/transfer-panel.d.ts +25 -0
  93. package/dist/components/ui/backdrop.d.ts +7 -0
  94. package/dist/components/ui/button-base.d.ts +7 -0
  95. package/dist/components/ui/button.d.ts +18 -0
  96. package/dist/components/ui/checkbox.d.ts +24 -0
  97. package/dist/components/ui/chip.d.ts +18 -0
  98. package/dist/components/ui/circular-progress.d.ts +14 -0
  99. package/dist/components/ui/collapse.d.ts +9 -0
  100. package/dist/components/ui/dialog.d.ts +40 -0
  101. package/dist/components/ui/divider.d.ts +4 -0
  102. package/dist/components/ui/icon-button.d.ts +12 -0
  103. package/dist/components/ui/linear-progress.d.ts +13 -0
  104. package/dist/components/ui/link.d.ts +4 -0
  105. package/dist/components/ui/menu.d.ts +77 -0
  106. package/dist/components/ui/root-providers.d.ts +16 -0
  107. package/dist/components/ui/text-field.d.ts +38 -0
  108. package/dist/components/ui/text.d.ts +21 -0
  109. package/dist/components/ui/tooltip.d.ts +24 -0
  110. package/dist/components/uploads/upload-panel.d.ts +31 -0
  111. package/dist/contexts/asset-look-context.d.ts +1 -0
  112. package/dist/contexts/cut-context.d.ts +6 -0
  113. package/dist/contexts/data-context.d.ts +12 -0
  114. package/dist/contexts/direction-context.d.ts +2 -0
  115. package/dist/contexts/drag-context.d.ts +36 -0
  116. package/dist/contexts/icon-context.d.ts +10 -0
  117. package/dist/contexts/locale-context.d.ts +2 -0
  118. package/dist/contexts/moving-context.d.ts +7 -0
  119. package/dist/create-icon-D2vnnBQX.js +40 -0
  120. package/dist/create-icon-D2vnnBQX.js.map +1 -0
  121. package/dist/hooks/use-announcer.d.ts +20 -0
  122. package/dist/hooks/use-asset-look.d.ts +6 -0
  123. package/dist/hooks/use-asset-states.d.ts +12 -0
  124. package/dist/hooks/use-chosen-column.d.ts +16 -0
  125. package/dist/hooks/use-clipboard-follow.d.ts +12 -0
  126. package/dist/hooks/use-controlled.d.ts +18 -0
  127. package/dist/hooks/use-cut-ids.d.ts +3 -0
  128. package/dist/hooks/use-dev-checks.d.ts +16 -0
  129. package/dist/hooks/use-download-queue.d.ts +19 -0
  130. package/dist/hooks/use-dragged-ids.d.ts +3 -0
  131. package/dist/hooks/use-drop-target.d.ts +48 -0
  132. package/dist/hooks/use-entry-drag.d.ts +46 -0
  133. package/dist/hooks/use-files-drop.d.ts +20 -0
  134. package/dist/hooks/use-folder.d.ts +14 -0
  135. package/dist/hooks/use-fork-ref.d.ts +6 -0
  136. package/dist/hooks/use-form-send.d.ts +12 -0
  137. package/dist/hooks/use-found.d.ts +10 -0
  138. package/dist/hooks/use-icon-config.d.ts +2 -0
  139. package/dist/hooks/use-level-filters.d.ts +112 -0
  140. package/dist/hooks/use-level-search.d.ts +21 -0
  141. package/dist/hooks/use-locale.d.ts +10 -0
  142. package/dist/hooks/use-location-history.d.ts +42 -0
  143. package/dist/hooks/use-long-press.d.ts +25 -0
  144. package/dist/hooks/use-marquee.d.ts +35 -0
  145. package/dist/hooks/use-match-count.d.ts +8 -0
  146. package/dist/hooks/use-media-search.d.ts +44 -0
  147. package/dist/hooks/use-moving-ids.d.ts +3 -0
  148. package/dist/hooks/use-picks.d.ts +39 -0
  149. package/dist/hooks/use-preview-contents.d.ts +33 -0
  150. package/dist/hooks/use-properties.d.ts +25 -0
  151. package/dist/hooks/use-scroll-measure.d.ts +34 -0
  152. package/dist/hooks/use-search.d.ts +12 -0
  153. package/dist/hooks/use-selection.d.ts +29 -0
  154. package/dist/hooks/use-setting.d.ts +21 -0
  155. package/dist/hooks/use-stable-set.d.ts +6 -0
  156. package/dist/hooks/use-swipe.d.ts +41 -0
  157. package/dist/hooks/use-text-direction.d.ts +8 -0
  158. package/dist/hooks/use-thumbnail.d.ts +8 -0
  159. package/dist/hooks/use-transfer-queue.d.ts +22 -0
  160. package/dist/hooks/use-tree-rows.d.ts +9 -0
  161. package/dist/hooks/use-tree-selection.d.ts +19 -0
  162. package/dist/hooks/use-type-ahead.d.ts +9 -0
  163. package/dist/hooks/use-type-icons.d.ts +10 -0
  164. package/dist/hooks/use-upload-queue.d.ts +24 -0
  165. package/dist/hooks/use-virtual-lines.d.ts +27 -0
  166. package/dist/hooks/use-virtual-rows.d.ts +31 -0
  167. package/dist/hooks/use-wheel-zoom.d.ts +10 -0
  168. package/dist/icon-sets/filled.d.ts +6 -0
  169. package/dist/icon-sets/filled.js +76 -0
  170. package/dist/icon-sets/filled.js.map +1 -0
  171. package/dist/icon-sets/outlined.d.ts +6 -0
  172. package/dist/icon-sets/outlined.js +73 -0
  173. package/dist/icon-sets/outlined.js.map +1 -0
  174. package/dist/icon-sets/rounded.d.ts +6 -0
  175. package/dist/icon-sets/rounded.js +73 -0
  176. package/dist/icon-sets/rounded.js.map +1 -0
  177. package/dist/icon-sets/sharp.d.ts +6 -0
  178. package/dist/icon-sets/sharp.js +73 -0
  179. package/dist/icon-sets/sharp.js.map +1 -0
  180. package/dist/icon-sets/two-tone.d.ts +6 -0
  181. package/dist/icon-sets/two-tone.js +188 -0
  182. package/dist/icon-sets/two-tone.js.map +1 -0
  183. package/dist/index.d.ts +18 -0
  184. package/dist/index.js +32651 -0
  185. package/dist/index.js.map +1 -0
  186. package/dist/locales/en-us.d.ts +7 -0
  187. package/dist/store/download-queue.d.ts +37 -0
  188. package/dist/store/folder-store.d.ts +79 -0
  189. package/dist/store/keyboard-layout.d.ts +11 -0
  190. package/dist/store/properties-cache.d.ts +73 -0
  191. package/dist/store/thumbnail-cache.d.ts +30 -0
  192. package/dist/store/transfer-across.d.ts +24 -0
  193. package/dist/store/transfer-queue.d.ts +59 -0
  194. package/dist/store/upload-queue.d.ts +83 -0
  195. package/dist/styles/arrived.d.ts +6 -0
  196. package/dist/styles/classes.d.ts +212 -0
  197. package/dist/styles/layout.d.ts +55 -0
  198. package/dist/styles/media-layout.d.ts +36 -0
  199. package/dist/styles/order.d.ts +1 -0
  200. package/dist/styles.css +7632 -0
  201. package/dist/styles.layer.css +7634 -0
  202. package/dist/types/action.d.ts +296 -0
  203. package/dist/types/adapter.d.ts +922 -0
  204. package/dist/types/api.d.ts +192 -0
  205. package/dist/types/clipboard.d.ts +45 -0
  206. package/dist/types/download.d.ts +41 -0
  207. package/dist/types/drag.d.ts +57 -0
  208. package/dist/types/folder.d.ts +47 -0
  209. package/dist/types/icon.d.ts +20 -0
  210. package/dist/types/index.d.ts +27 -0
  211. package/dist/types/limits.d.ts +49 -0
  212. package/dist/types/locale.d.ts +1132 -0
  213. package/dist/types/main-menu.d.ts +20 -0
  214. package/dist/types/media.d.ts +631 -0
  215. package/dist/types/menu.d.ts +82 -0
  216. package/dist/types/navigation.d.ts +88 -0
  217. package/dist/types/preview.d.ts +54 -0
  218. package/dist/types/previewer.d.ts +67 -0
  219. package/dist/types/properties.d.ts +111 -0
  220. package/dist/types/property-definition.d.ts +286 -0
  221. package/dist/types/search.d.ts +46 -0
  222. package/dist/types/section.d.ts +98 -0
  223. package/dist/types/selection.d.ts +52 -0
  224. package/dist/types/slots.d.ts +218 -0
  225. package/dist/types/transfer.d.ts +68 -0
  226. package/dist/types/tree.d.ts +97 -0
  227. package/dist/types/undo.d.ts +133 -0
  228. package/dist/types/upload.d.ts +189 -0
  229. package/dist/types/view.d.ts +192 -0
  230. package/dist/utils/action-groups.d.ts +17 -0
  231. package/dist/utils/bidi.d.ts +15 -0
  232. package/dist/utils/clipboard.d.ts +30 -0
  233. package/dist/utils/cx.d.ts +2 -0
  234. package/dist/utils/dom.d.ts +36 -0
  235. package/dist/utils/download.d.ts +30 -0
  236. package/dist/utils/field-errors.d.ts +26 -0
  237. package/dist/utils/files.d.ts +48 -0
  238. package/dist/utils/format.d.ts +10 -0
  239. package/dist/utils/groups.d.ts +29 -0
  240. package/dist/utils/hidden.d.ts +3 -0
  241. package/dist/utils/keyboard.d.ts +21 -0
  242. package/dist/utils/limits.d.ts +7 -0
  243. package/dist/utils/media.d.ts +146 -0
  244. package/dist/utils/menu-position.d.ts +13 -0
  245. package/dist/utils/names.d.ts +21 -0
  246. package/dist/utils/navigation.d.ts +28 -0
  247. package/dist/utils/path.d.ts +33 -0
  248. package/dist/utils/permissions.d.ts +56 -0
  249. package/dist/utils/preview.d.ts +27 -0
  250. package/dist/utils/property-value.d.ts +41 -0
  251. package/dist/utils/resize.d.ts +2 -0
  252. package/dist/utils/search.d.ts +24 -0
  253. package/dist/utils/sections.d.ts +11 -0
  254. package/dist/utils/selection.d.ts +30 -0
  255. package/dist/utils/sets.d.ts +2 -0
  256. package/dist/utils/shortcut.d.ts +74 -0
  257. package/dist/utils/slots.d.ts +15 -0
  258. package/dist/utils/sort.d.ts +47 -0
  259. package/dist/utils/transfer.d.ts +48 -0
  260. package/dist/utils/trash.d.ts +25 -0
  261. package/dist/utils/undo.d.ts +63 -0
  262. package/dist/utils/zoom.d.ts +14 -0
  263. package/docs/README.md +55 -0
  264. package/docs/actions.md +301 -0
  265. package/docs/adapter.md +229 -0
  266. package/docs/copy-move-trash-undo.md +97 -0
  267. package/docs/customizing.md +247 -0
  268. package/docs/getting-started.md +168 -0
  269. package/docs/locale-and-rtl.md +58 -0
  270. package/docs/media-manager.md +498 -0
  271. package/docs/previewing.md +124 -0
  272. package/docs/properties.md +125 -0
  273. package/docs/recipes/in-memory-adapter.md +149 -0
  274. package/docs/recipes/rest-adapter.md +225 -0
  275. package/docs/recipes/s3-adapter.md +137 -0
  276. package/docs/search.md +73 -0
  277. package/docs/sections.md +119 -0
  278. package/docs/state-and-api.md +190 -0
  279. package/docs/uploads-and-downloads.md +144 -0
  280. package/package.json +90 -4
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from "react";
2
+ import type { TextDirection } from "../../types/index.js";
3
+ interface RootProvidersProps {
4
+ /** The root's direction, read from the page, or undefined before it's known. */
5
+ direction: TextDirection | undefined;
6
+ children: ReactNode;
7
+ }
8
+ /**
9
+ * What every root gives the parts under it: its direction, for the menus, dialogs, tooltips and
10
+ * drag image it portals to `<body>`, which take it as their `dir` (`DirectionContext`), and for
11
+ * Base UI's own parts, whose keys and sides follow it (`DirectionProvider`); and one group for its
12
+ * tooltips, so the next shows at once while the pointer moves along a row of buttons. It also starts
13
+ * loading the coloured file and folder icons as the root mounts, while its first listing comes.
14
+ */
15
+ declare const RootProviders: ({ direction, children }: RootProvidersProps) => import("react").JSX.Element;
16
+ export default RootProviders;
@@ -0,0 +1,38 @@
1
+ import type { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, ReactNode, Ref } from "react";
2
+ type Control = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
3
+ interface TextFieldProps {
4
+ id?: string;
5
+ /** The field's name, shown on its top edge. Without one, the field is named by `inputProps`. */
6
+ label?: ReactNode;
7
+ value: string;
8
+ type?: string;
9
+ placeholder?: string;
10
+ size?: "small" | "medium";
11
+ fullWidth?: boolean;
12
+ disabled?: boolean;
13
+ /** Draws the field, and `helperText`, as a failure. */
14
+ error?: boolean;
15
+ /** A line under the field: what's wrong with what's typed, or a hint. */
16
+ helperText?: ReactNode;
17
+ /** Several lines, as tall as what's typed, between `minRows` and `maxRows`. */
18
+ multiline?: boolean;
19
+ minRows?: number;
20
+ maxRows?: number;
21
+ /** The browser's own select, its `option`s as `children`. */
22
+ select?: boolean;
23
+ children?: ReactNode;
24
+ className?: string;
25
+ inputRef?: Ref<HTMLInputElement>;
26
+ /** Attributes of the `input`, `textarea` or `select` itself. */
27
+ inputProps?: Record<string, unknown>;
28
+ onChange?: ChangeEventHandler<Control>;
29
+ onKeyDown?: KeyboardEventHandler<Control>;
30
+ onBlur?: FocusEventHandler<Control>;
31
+ }
32
+ /**
33
+ * A field typed in, outlined, with its name on its top edge and a line under it. It's an `input`,
34
+ * a `textarea` that grows with what's typed (`multiline`), or the browser's own `select`. Every
35
+ * side is logical, so it follows the page's direction with nothing asked of it.
36
+ */
37
+ declare const TextField: ({ id, label, value, type, placeholder, size, fullWidth, disabled, error, helperText, multiline, minRows, maxRows, select, children, className, inputRef, inputProps, onChange, onKeyDown, onBlur, }: TextFieldProps) => import("react").JSX.Element;
38
+ export default TextField;
@@ -0,0 +1,21 @@
1
+ import type { ComponentProps, ElementType } from "react";
2
+ type TextVariant = "body1" | "body2" | "caption";
3
+ type TextProps<C extends ElementType> = {
4
+ /** The text's size: `body1` is 1rem, `body2` 0.875rem and `caption` 0.75rem. */
5
+ variant?: TextVariant;
6
+ /** The element drawn: a `p` unless it's a caption, which is a `span`. */
7
+ component?: C;
8
+ /**
9
+ * `secondary` for text that matters less, `error` for a failure, `disabled` for what's off for
10
+ * now; else the colour around it.
11
+ */
12
+ color?: "secondary" | "error" | "disabled";
13
+ /** Keeps the text on one line, cut short with an ellipsis. */
14
+ noWrap?: boolean;
15
+ } & Omit<ComponentProps<C>, "color">;
16
+ /**
17
+ * A piece of text in one of the component's sizes. Its own `className` goes after the size's, so
18
+ * a part's stylesheet can change what it sets.
19
+ */
20
+ declare const Text: <C extends ElementType = "p">({ variant, component, color, noWrap, className, ...props }: TextProps<C>) => import("react").JSX.Element;
21
+ export default Text;
@@ -0,0 +1,24 @@
1
+ import type { ReactElement, ReactNode } from "react";
2
+ interface TooltipProps {
3
+ /** What the tooltip says. */
4
+ title: ReactNode;
5
+ /** Shows no tooltip, as for a button that takes no press. */
6
+ disabled?: boolean;
7
+ /** The element it's about, which takes the tooltip's handlers. */
8
+ children: ReactElement<Record<string, unknown>>;
9
+ }
10
+ /**
11
+ * Groups the tooltips below it, so that after one has shown, the next shows at once while the
12
+ * pointer moves along a row of buttons. Each root has one.
13
+ */
14
+ export declare const TooltipProvider: ({ children }: {
15
+ children: ReactNode;
16
+ }) => import("react").JSX.Element;
17
+ /**
18
+ * A tooltip with an arrow under its element, shown on hover or keyboard focus after a desktop-like
19
+ * half second, at least 8px from the viewport's edges, so a button at the edge of the screen
20
+ * doesn't get one touching it. It portals to `<body>`, so it takes the file manager's direction
21
+ * (`DirectionContext`) and the theme's class.
22
+ */
23
+ declare const Tooltip: ({ title, disabled, children }: TooltipProps) => import("react").JSX.Element;
24
+ export default Tooltip;
@@ -0,0 +1,31 @@
1
+ import type { FileUploadItem, UploadItem } from "../../types/index.js";
2
+ interface UploadPanelProps {
3
+ items: UploadItem[];
4
+ onCancel: (id: number) => void;
5
+ onRetry: (id: number) => void;
6
+ /**
7
+ * Shows a finished upload in the folder it went into. Offered on the rows of finished uploads
8
+ * that `canShow` takes, every one of them without it, and on none without `onShow`.
9
+ */
10
+ onShow?: (item: UploadItem) => void;
11
+ canShow?: (item: UploadItem) => boolean;
12
+ /**
13
+ * Where a finished file is, as the host words it, when its adapter said it isn't in the folder it
14
+ * went into (`FileUploadItem.trail`), such as a media library's groups from its root; the last
15
+ * of the trail's folders, or nothing for an empty trail, without it.
16
+ */
17
+ placeOf?: (item: FileUploadItem) => string | undefined;
18
+ /** Cancels every upload waiting or under way. */
19
+ onCancelAll: () => void;
20
+ /** Forgets every upload that has ended. */
21
+ onClear: () => void;
22
+ }
23
+ /**
24
+ * The upload queue at a glance: a summary that can fold the list away, and a row per file or folder
25
+ * with its progress or how it ended, to cancel it or try it again, or once done, to show it where it
26
+ * went. It knows nothing of where it's shown, so it can sit under any view of files. The close
27
+ * button cancels whatever is still uploading, which stays listed to try again, and once nothing
28
+ * is, forgets the list.
29
+ */
30
+ declare const UploadPanel: ({ items, onCancel, onRetry, onShow, canShow, placeOf, onCancelAll, onClear, }: UploadPanelProps) => import("react").JSX.Element;
31
+ export default UploadPanel;
@@ -0,0 +1 @@
1
+ export declare const AssetLookContext: import("react").Context<(() => () => void) | null>;
@@ -0,0 +1,6 @@
1
+ import type { AdapterIds } from "../types/index.js";
2
+ /**
3
+ * The entries cut to the clipboard, by the adapter they came from, as their ids mean nothing to
4
+ * another, so every view showing them can mark them as cut. Null when none are.
5
+ */
6
+ export declare const CutContext: import("react").Context<AdapterIds | null>;
@@ -0,0 +1,12 @@
1
+ import type { FolderStore } from "../store/folder-store.js";
2
+ import type { ThumbnailCache } from "../store/thumbnail-cache.js";
3
+ import type { FileAdapter } from "../types/index.js";
4
+ export interface DataContextValue {
5
+ store: FolderStore;
6
+ /** Used by sections that don't bring their own adapter. */
7
+ adapter: FileAdapter;
8
+ thumbnails: ThumbnailCache;
9
+ /** How old, in ms, a listing may be before opening its folder lists it again in the background. */
10
+ relistAfter: number;
11
+ }
12
+ export declare const DataContext: import("react").Context<DataContextValue | null>;
@@ -0,0 +1,2 @@
1
+ import type { TextDirection } from "../types/index.js";
2
+ export declare const DirectionContext: import("react").Context<TextDirection | undefined>;
@@ -0,0 +1,36 @@
1
+ import type { DragEvent } from "react";
2
+ import type { AdapterIds, DragSource, Drop, DroppedFiles, DropKeys, DropTarget, HeldPress } from "../types/index.js";
3
+ export interface DragContextValue {
4
+ /**
5
+ * The dragged entries' ids, by the adapter serving them, so every view listing them can fade
6
+ * them. Null while no entries are dragged, as when the drag came from outside, such as files
7
+ * from the desktop.
8
+ */
9
+ dragged: AdapterIds | null;
10
+ /**
11
+ * Starts a drag from a mouse press with what `pick` picks up, once it has selected whatever
12
+ * it needs, or cancels the drag when it picks up nothing. `pick` isn't asked for a touch or
13
+ * pen press, which drags through `touch`.
14
+ */
15
+ start: (event: DragEvent, pick: () => DragSource | null) => void;
16
+ /**
17
+ * Goes on from a touch or pen press held long enough on an item (`useLongPress`): the finger
18
+ * moving on drags what `pick` picks up, once it has selected whatever it needs, and lifting it
19
+ * without moving calls `onRelease`, e.g. to open the item's menu. Without `pick`, the finger
20
+ * moving on scrolls, as ever.
21
+ */
22
+ touch: (press: HeldPress, pick: (() => DragSource | null) | null, onRelease?: () => void) => void;
23
+ /**
24
+ * What dropping the dragged entries into `target` with `keys` held does, copying or moving
25
+ * them, to be run on drop, or undefined when they can't go there.
26
+ */
27
+ dropInto: (target: DropTarget, keys: DropKeys) => Drop | undefined;
28
+ /**
29
+ * What dropping files from outside, such as from the desktop, into `target` does, to be called
30
+ * on drop with what was dropped, or undefined when it doesn't take uploads, or can't take any of
31
+ * the files dragged (`items`, whose types a drag tells before the drop).
32
+ */
33
+ uploadInto: (target: DropTarget, items: DataTransferItemList) => ((dropped: DroppedFiles) => void) | undefined;
34
+ }
35
+ /** The drag of entries under way, shared by the content and the sidebar tree. */
36
+ export declare const DragContext: import("react").Context<DragContextValue | null>;
@@ -0,0 +1,10 @@
1
+ import type { IconOverrides, IconSet } from "../types/index.js";
2
+ export interface IconConfig {
3
+ /** The set the icons are drawn from: Outlined unless `IconProvider` gives another. */
4
+ icons: IconSet;
5
+ overrides: IconOverrides;
6
+ /** Whether files and folders get `@react-symbols/icons`' coloured icons, chosen by name. */
7
+ typeIcons: boolean;
8
+ }
9
+ export declare const EMPTY_ICON_OVERRIDES: IconOverrides;
10
+ export declare const IconContext: import("react").Context<IconConfig>;
@@ -0,0 +1,2 @@
1
+ import type { Locale } from "../types/index.js";
2
+ export declare const LocaleContext: import("react").Context<Locale>;
@@ -0,0 +1,7 @@
1
+ import type { MovingIds } from "../types/index.js";
2
+ /**
3
+ * The entries the moves under way are moving, waiting or running, and those going to the trash or
4
+ * coming back from it, by adapter, each with what holds it, so every view showing them can mark
5
+ * them and say why. Empty outside a `FileManager`.
6
+ */
7
+ export declare const MovingContext: import("react").Context<MovingIds>;
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/components/icons/create-icon.tsx
4
+ var draw = (shape, index) => {
5
+ if (typeof shape === "string") return /* @__PURE__ */ jsx("path", { d: shape }, index);
6
+ const fillRule = shape.evenOdd ? "evenodd" : void 0;
7
+ if ("circle" in shape) {
8
+ const [x, y, radius] = shape.circle;
9
+ return /* @__PURE__ */ jsx("circle", {
10
+ cx: x,
11
+ cy: y,
12
+ r: radius,
13
+ opacity: shape.opacity,
14
+ fillRule
15
+ }, index);
16
+ }
17
+ return /* @__PURE__ */ jsx("path", {
18
+ d: shape.d,
19
+ opacity: shape.opacity,
20
+ fillRule
21
+ }, index);
22
+ };
23
+ /**
24
+ * An icon of the built-in sets, from its shapes. It draws only: `Icon` sizes and mirrors it through
25
+ * the class it passes, as it does a consumer's own.
26
+ */
27
+ var createIcon = (...shapes) => {
28
+ const drawn = shapes.map(draw);
29
+ return ({ children, ...props }) => /* @__PURE__ */ jsxs("svg", {
30
+ viewBox: "0 0 24 24",
31
+ focusable: "false",
32
+ "aria-hidden": true,
33
+ ...props,
34
+ children: [children, drawn]
35
+ });
36
+ };
37
+ //#endregion
38
+ export { createIcon as t };
39
+
40
+ //# sourceMappingURL=create-icon-D2vnnBQX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-icon-D2vnnBQX.js","names":[],"sources":["../src/components/icons/create-icon.tsx"],"sourcesContent":["import type { IconComponent } from \"../../types\";\n\n/**\n * One shape of an icon on its 24 by 24 grid: a path's `d` alone, or a path or a circle (its centre\n * and radius) with what else it's drawn with, the fainter tone of a two-tone icon or holes cut by\n * the even-odd rule.\n */\nexport type IconShape =\n | string\n | { d: string; opacity?: number; evenOdd?: boolean }\n | { circle: readonly [x: number, y: number, radius: number]; opacity?: number; evenOdd?: boolean };\n\nconst draw = (shape: IconShape, index: number) => {\n if (typeof shape === \"string\") {\n return <path key={index} d={shape} />;\n }\n\n const fillRule = shape.evenOdd ? \"evenodd\" : undefined;\n\n if (\"circle\" in shape) {\n const [x, y, radius] = shape.circle;\n\n return <circle key={index} cx={x} cy={y} r={radius} opacity={shape.opacity} fillRule={fillRule} />;\n }\n\n return <path key={index} d={shape.d} opacity={shape.opacity} fillRule={fillRule} />;\n};\n\n/**\n * An icon of the built-in sets, from its shapes. It draws only: `Icon` sizes and mirrors it through\n * the class it passes, as it does a consumer's own.\n */\nexport const createIcon = (...shapes: IconShape[]): IconComponent => {\n const drawn = shapes.map(draw);\n\n return ({ children, ...props }) => (\n <svg viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden {...props}>\n {children}\n {drawn}\n </svg>\n );\n};\n"],"mappings":";;;AAYA,IAAM,QAAQ,OAAkB,UAAkB;CAC9C,IAAI,OAAO,UAAU,UACjB,OAAO,oBAAC,QAAD,EAAkB,GAAG,MAAQ,GAAlB,KAAkB;CAGxC,MAAM,WAAW,MAAM,UAAU,YAAY,KAAA;CAE7C,IAAI,YAAY,OAAO;EACnB,MAAM,CAAC,GAAG,GAAG,UAAU,MAAM;EAE7B,OAAO,oBAAC,UAAD;GAAoB,IAAI;GAAG,IAAI;GAAG,GAAG;GAAQ,SAAS,MAAM;GAAmB;EAAW,GAA7E,KAA6E;CACrG;CAEA,OAAO,oBAAC,QAAD;EAAkB,GAAG,MAAM;EAAG,SAAS,MAAM;EAAmB;CAAW,GAAhE,KAAgE;AACtF;;;;;AAMA,IAAa,cAAc,GAAG,WAAuC;CACjE,MAAM,QAAQ,OAAO,IAAI,IAAI;CAE7B,QAAQ,EAAE,UAAU,GAAG,YACnB,qBAAC,OAAD;EAAK,SAAQ;EAAY,WAAU;EAAQ,eAAA;EAAY,GAAI;EAA3D,UAAA,CACK,UACA,KACA;;AAEb"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Where a message is said from: the file manager's own region, or one inside the preview, since
3
+ * a modal hides the rest of the page from screen readers while it's open.
4
+ */
5
+ export type AnnouncerRegion = "root" | "preview";
6
+ /** A message for screen readers. `id` counts them, so the same message said twice is heard twice. */
7
+ export interface Announcement {
8
+ message: string;
9
+ id: number;
10
+ region: AnnouncerRegion;
11
+ }
12
+ /**
13
+ * What the file manager has to tell screen readers as an action finishes with nothing else spoken
14
+ * about it, for `Announcer` to read out, from the region `regionOf` names as it's announced. A
15
+ * message announced before the last one is heard replaces it.
16
+ */
17
+ export declare const useAnnouncer: (regionOf?: () => AnnouncerRegion) => {
18
+ announcement: Announcement | null;
19
+ announce: (message: string) => void;
20
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Says that the media manager's own look is drawn here, however deep in what an app's `renderAsset`
3
+ * returns, before anything is painted, so the asset around it leaves showing why it can't be chosen
4
+ * to it.
5
+ */
6
+ export declare const useAssetLook: () => void;
@@ -0,0 +1,12 @@
1
+ import type { AssetStates, FileAdapter, FollowedAssets } from "../types/index.js";
2
+ /**
3
+ * How assets being processed stand, as their backends last said, for those listed as being
4
+ * processed (`candidates`, through the adapter serving each): followed until each is ready or
5
+ * failed, and no longer while it isn't a candidate. `onReady` is told of an adapter once one of its
6
+ * assets is ready, so what lists it is listed again. `forget` drops what's known of assets, once
7
+ * their listing has caught up with it, so one processed again later is followed afresh.
8
+ */
9
+ export declare const useAssetStates: (candidates: readonly FollowedAssets[], onReady: (adapter: FileAdapter) => void) => {
10
+ states: AssetStates;
11
+ forget: (adapter: FileAdapter, ids: readonly string[]) => void;
12
+ };
@@ -0,0 +1,16 @@
1
+ /** Whether a column is an overlay, as the container queries lay it out, read from its style. */
2
+ export declare const overlays: (pane: HTMLElement) => boolean;
3
+ /**
4
+ * The selected column of a media manager or a picker: docked where there's room, or an overlay while
5
+ * opened. `present` says whether it's there at all. `frameRef` goes on what its width follows,
6
+ * `chosenRef` on the column's box and `openerRef` on the button opening it.
7
+ */
8
+ export declare const useChosenColumn: (present: boolean) => {
9
+ chosenOverlay: boolean;
10
+ setChosenOverlay: import("react").Dispatch<import("react").SetStateAction<boolean>>;
11
+ docked: boolean;
12
+ frameRef: import("react").RefObject<HTMLDivElement | null>;
13
+ chosenRef: import("react").RefObject<HTMLDivElement | null>;
14
+ openerRef: import("react").RefObject<HTMLButtonElement | null>;
15
+ closeChosen: () => void;
16
+ };
@@ -0,0 +1,12 @@
1
+ import type { Dispatch, SetStateAction } from "react";
2
+ import type { FolderStore } from "../store/folder-store.js";
3
+ import type { Clipboard } from "../types/index.js";
4
+ /**
5
+ * Looks for the clipboard's entries again while a part of it has a `lookup`, after a change that
6
+ * may have left their ids naming nothing, or others: by the names a rename leaves as they were,
7
+ * after a folder above them was renamed to a new id, or by id in their folder listed again, after
8
+ * a change where names can't be trusted. Each such part takes the entries as they are now, or goes
9
+ * when none is found or its folder can't be listed, and the clipboard empties once no part is
10
+ * left. A clipboard changed meanwhile, by another cut, copy or change, stops it.
11
+ */
12
+ export declare const useClipboardFollow: (clipboard: Clipboard | null, setClipboard: Dispatch<SetStateAction<Clipboard | null>>, store: FolderStore) => void;
@@ -0,0 +1,18 @@
1
+ interface ControlledOptions<T> {
2
+ /** The app's value, when it keeps it. */
3
+ controlled: T | undefined;
4
+ /** What it starts at otherwise. */
5
+ default: T | undefined;
6
+ /** Names the component in the warnings. */
7
+ name: string;
8
+ /** Names the prop in the warnings; `value` when omitted. */
9
+ state?: string;
10
+ }
11
+ /**
12
+ * A value the app may keep itself: `controlled` while it's passed, or else one kept here, starting
13
+ * at `default`. Whether the app keeps it is decided as the component mounts, and setting it only
14
+ * changes the one kept here. In development it warns about switching between the two, and about
15
+ * a default changing after mounting, either of which would be silently ignored.
16
+ */
17
+ export declare const useControlled: <T>({ controlled, default: defaultValue, name, state }: ControlledOptions<T>) => readonly [T | undefined, (next: T) => void];
18
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { Section } from "../types/index.js";
2
+ /** Ids of the cut entries a section could be showing: those that came from its adapter. */
3
+ export declare const useCutIds: (section: Section) => ReadonlySet<string>;
@@ -0,0 +1,16 @@
1
+ import type { RefObject } from "react";
2
+ /**
3
+ * In development, warns about props an app makes again each render that the component treats as
4
+ * new, keyed by the name the warning gives them: an `adapter` (whose listings are dropped and listed
5
+ * again) and a slot's component (which React mounts afresh). `watched` is only called in development.
6
+ * A prop made again twice warns, once, so an app switching on purpose, to another backend made by the
7
+ * same function, isn't warned on its first switch.
8
+ */
9
+ export declare const useRecreatedWarning: (name: string, watched: () => Record<string, unknown>) => void;
10
+ /**
11
+ * In development, once the page has loaded and the root is shown, warns when the component's
12
+ * stylesheet isn't in the page (no `filecove/styles.css` or `styles.layer.css` imported), or when
13
+ * nothing gives the root a height, so it's as tall as its content: its parent has no height of its
14
+ * own for the root's `height: 100%`, and lists that should scroll inside it grow with their entries.
15
+ */
16
+ export declare const useRootChecks: (rootRef: RefObject<HTMLElement | null>, name: string) => void;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * A download queue for as long as the component using it is mounted; unmounting cancels whatever
3
+ * is still being prepared.
4
+ */
5
+ export declare const useDownloadQueue: () => {
6
+ queue: {
7
+ getItems: () => import("../types/index.js").DownloadItem[];
8
+ subscribe: (listener: () => void) => () => void;
9
+ add(adapter: import("../index.js").FileAdapter, entries: import("../index.js").FileEntry[], folderName: string, showHidden: boolean, groups?: import("../index.js").EntriesInFolder[]): void;
10
+ cancel(id: number): void;
11
+ cancelAll(): void;
12
+ retry(id: number): void;
13
+ save(id: number): void;
14
+ setMaxActive(count?: number): void;
15
+ clear(): void;
16
+ abortAll(): void;
17
+ };
18
+ items: import("../types/index.js").DownloadItem[];
19
+ };
@@ -0,0 +1,3 @@
1
+ import type { Section } from "../types/index.js";
2
+ /** Ids of the dragged entries a section could be showing: those that came from its adapter. */
3
+ export declare const useDraggedIds: (section: Section) => ReadonlySet<string>;
@@ -0,0 +1,48 @@
1
+ import type { DragEvent } from "react";
2
+ import type { DropTarget } from "../types/index.js";
3
+ interface DropTargetOptions {
4
+ /**
5
+ * The folders a drop where `event` happened could go into, the likeliest first; the first
6
+ * that takes what is dragged gets it.
7
+ */
8
+ targetsAt: (event: DragEvent) => DropTarget[];
9
+ /**
10
+ * Called with the key of the first of them once a drag has rested on it for `HOLD_DELAY`,
11
+ * whether it takes what is dragged or not, e.g. to expand it.
12
+ */
13
+ onHold?: (key: string) => void;
14
+ }
15
+ /** How long a drag rests on a target before `onHold`, in ms. */
16
+ export declare const HOLD_DELAY = 700;
17
+ /**
18
+ * Takes drops on a whole view whose `targetsAt` finds the folder under the pointer, or on a single
19
+ * row: of the entries dragged in the file manager, and of files dragged in from outside, which are
20
+ * uploaded. `dropKey` is the key of the target that letting go now would drop into, and `handlers`
21
+ * go on the element. Other drags from elsewhere, such as text, are left to the browser.
22
+ */
23
+ export declare const useDropTarget: ({ targetsAt, onHold }: DropTargetOptions) => {
24
+ dropKey: string | null;
25
+ handlers: {
26
+ onDragEnter: (event: DragEvent) => void;
27
+ onDragOver: (event: DragEvent) => void;
28
+ onDragLeave: (event: DragEvent) => void;
29
+ onDrop: (event: DragEvent) => void;
30
+ };
31
+ };
32
+ /**
33
+ * A control that a drag resting on it for `HOLD_DELAY` acts on, without taking the drop, such as
34
+ * the button that shows the sidebar: a drag of entries or of files from outside. It cancels the
35
+ * drag events, saying "none", so the browser keeps sending them to it, which it wouldn't after a
36
+ * `dragenter` left alone, and shows its no-drop cursor. `over` is set while one is over it, and
37
+ * `handlers` go on the element.
38
+ */
39
+ export declare const useDragHold: (onHold: () => void) => {
40
+ over: boolean;
41
+ handlers: {
42
+ onDragEnter: (event: DragEvent) => void;
43
+ onDragOver: (event: DragEvent) => void;
44
+ onDragLeave: (event: DragEvent) => void;
45
+ onDrop: () => void;
46
+ };
47
+ };
48
+ export {};
@@ -0,0 +1,46 @@
1
+ import type { PointerEvent, RefObject } from "react";
2
+ import type { DragContextValue } from "../contexts/drag-context.js";
3
+ import type { DraggedEntries, DropEffect, DropInto, FileAdapter, FileEntry } from "../types/index.js";
4
+ /**
5
+ * What the drag image shows: the entry the drag started from, and how many entries go along. A
6
+ * touch drag's follows the finger, showing what letting go would do.
7
+ */
8
+ interface Preview {
9
+ entry: FileEntry;
10
+ count: number;
11
+ touch: boolean;
12
+ }
13
+ /**
14
+ * Drag and drop of entries, out of the content or the sidebar tree and into a folder in either.
15
+ * The drag under way is kept here rather than in its `dataTransfer`, which can't be read until the
16
+ * drop, so every view can tell where the entries may go and fade them wherever it lists them.
17
+ * `context` goes to `DragContext`; `onPointerDownCapture` and `end` go on `rootRef`'s element,
18
+ * around every view, `end` for both `drop` and `dragend`. `uploadInto` is handed on to the views as
19
+ * it is, for files dragged in from outside.
20
+ *
21
+ * `carries` says what can be done with what a drag picks up: "move", for entries that can be moved
22
+ * somewhere (and maybe copied), "copy", for entries that can't be moved out of their folder, which
23
+ * are copied with no key held, or null for entries that can be neither moved nor copied, or are tied
24
+ * up meanwhile, as entries a move under way is moving are, which aren't dragged at all. Where a
25
+ * drop goes, the file manager's `dropInto` decides by the keys held.
26
+ *
27
+ * A mouse drag is the browser's own. Its image is taken from `previewRef`'s element, which the
28
+ * caller renders while `preview` is set, for a single frame.
29
+ *
30
+ * A touch drag is the file manager's own, since a touch press scrolls, and browsers drag by touch
31
+ * differently or not at all: a long-press arms it (`touch`), and the finger moving on starts it.
32
+ * It sends the views the drag events a mouse drag would, to whatever is under the finger inside
33
+ * the root, so they take it as they take one, holding to open folders included. The drag image
34
+ * follows the finger while `preview` is set, `touch`, and areas scroll near their edges. It does
35
+ * what a mouse drag with the keys held on a keyboard would (`effect`), or a copy where only that
36
+ * can be done.
37
+ */
38
+ export declare const useEntryDrag: (adapter: FileAdapter, dropInto: DropInto, uploadInto: DragContextValue["uploadInto"], carries: (dragged: DraggedEntries) => "move" | "copy" | null, rootRef: RefObject<HTMLElement | null>) => {
39
+ context: DragContextValue;
40
+ previewRef: RefObject<HTMLDivElement | null>;
41
+ preview: Preview | null;
42
+ effect: DropEffect;
43
+ onPointerDownCapture: (event: PointerEvent<HTMLElement>) => void;
44
+ end: () => void;
45
+ };
46
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { ClipboardEvent, DragEvent } from "react";
2
+ import type { DroppedFiles } from "../types/index.js";
3
+ /**
4
+ * Files dragged over a media library, dropped on it or pasted in it: the handlers for its panel, and
5
+ * whether any are over it now. `takes` says whether it can have them at the moment, `patterns` of
6
+ * which types as far as a drag tells.
7
+ */
8
+ export declare const useFilesDrop: (takes: boolean, patterns: readonly string[] | null, onFiles: (files: DroppedFiles) => void) => {
9
+ dropping: boolean;
10
+ offerDrop: (event: DragEvent<HTMLElement>) => void;
11
+ leaveDrop: (event: DragEvent<HTMLElement>) => void;
12
+ takeDrop: (event: DragEvent<HTMLElement>) => void;
13
+ pasteFiles: (event: ClipboardEvent<HTMLElement>) => void;
14
+ };
15
+ /**
16
+ * Whether the browser's file picker can pick a folder, for the header's "Upload a folder": false while
17
+ * rendered on a server, and in the render hydrating it, so the button comes in after it, as the page
18
+ * can't be asked before.
19
+ */
20
+ export declare const usePicksFolders: () => boolean;
@@ -0,0 +1,14 @@
1
+ import type { Section } from "../types/index.js";
2
+ /** The folder store and the adapter of the file manager or the media manager, from `DataContext`. */
3
+ export declare const useData: () => import("../contexts/data-context.js").DataContextValue;
4
+ /**
5
+ * A folder's listing. It is requested the first time `enabled` is true, then served from the store,
6
+ * which keeps it while it's shown. Opened (`open`), as the content and the picker open folders, a
7
+ * listing saved from before shows at once and is listed again in the background once it's
8
+ * `relistAfter` old. One dropped while it's shown, as after a change that may have made its id
9
+ * another folder's, is listed afresh.
10
+ */
11
+ export declare const useFolder: (section: Section, folderId: string, enabled: boolean, open?: boolean) => {
12
+ state: import("../types/index.js").FolderState | undefined;
13
+ reload: () => void;
14
+ };
@@ -0,0 +1,6 @@
1
+ import type { Ref, RefCallback } from "react";
2
+ /**
3
+ * One ref for an element that two parts want: the component's own and the one the app passed. The
4
+ * same function while both stay the same, so React doesn't detach and attach it at each render.
5
+ */
6
+ export declare const useForkRef: <T>(first: Ref<T> | undefined, second: Ref<T> | undefined) => RefCallback<T> | null;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Sending an upload's or a process form, which stays open until it's answered, to say why when it's
3
+ * refused: whether it's being sent, the refusal's message for over the form and its errors for under the
4
+ * fields, until it's sent again. Leaving stops it, as going away does.
5
+ */
6
+ export declare const useFormSend: (fallback: string) => {
7
+ sending: boolean;
8
+ failure: string | undefined;
9
+ errors: Readonly<Record<string, string | readonly string[]>>;
10
+ send: (work: (signal: AbortSignal) => unknown, done: () => void) => void;
11
+ abort: () => void | undefined;
12
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The row the browser's find in page last came to in a view, by id, highlighted for
3
+ * `ARRIVED_FOR` (`data-found`), since the browser's own highlight is in the view's find layer,
4
+ * where it doesn't show (see `FindLayer`). `markFound` highlights a row, starting over when it's
5
+ * the one highlighted already.
6
+ */
7
+ export declare const useFound: () => {
8
+ foundId: string | null;
9
+ markFound: (id: string) => void;
10
+ };
@@ -0,0 +1,2 @@
1
+ import type { IconConfig } from "../contexts/icon-context.js";
2
+ export declare const useIconConfig: () => IconConfig;