strata-react 1.3.25 → 1.3.26

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 (255) hide show
  1. package/UPGRADING.md +4 -0
  2. package/dist/{api-types/cli.d.ts → api-types-cli.d.ts} +1 -0
  3. package/dist/api-types-cli.js +4 -3
  4. package/dist/api-types-cli.js.map +1 -1
  5. package/dist/{api-types/generate.d.ts → api-types.d.ts} +3 -3
  6. package/dist/api-types.js +3 -1
  7. package/dist/{button-KGJI6jQr.js → button-CYXjU-fs.js} +8 -5
  8. package/dist/button-CYXjU-fs.js.map +1 -0
  9. package/dist/{cursor-DDGBPiTJ.js → cursor-Cwyvgwsw.js} +9 -7
  10. package/dist/cursor-Cwyvgwsw.js.map +1 -0
  11. package/dist/{errors-BUvY1Z4d.js → errors-CmuwcWlb.js} +6 -6
  12. package/dist/{errors-BUvY1Z4d.js.map → errors-CmuwcWlb.js.map} +1 -1
  13. package/dist/{field-BjeE_FeB.js → field-DBCsFIng.js} +27 -23
  14. package/dist/field-DBCsFIng.js.map +1 -0
  15. package/dist/{follow-BTPs49FP.js → follow-CXQsL86O.js} +2 -2
  16. package/dist/follow-CXQsL86O.js.map +1 -0
  17. package/dist/{generate-CjTHKJ39.js → generate-BkWhh4k4.js} +8 -6
  18. package/dist/generate-BkWhh4k4.js.map +1 -0
  19. package/dist/{lib/geo.d.ts → geo-DfKa9JtK.d.ts} +35 -33
  20. package/dist/{hls/index.d.ts → hls.d.ts} +13 -12
  21. package/dist/hls.js +5 -4
  22. package/dist/hls.js.map +1 -1
  23. package/dist/index.d.ts +5300 -142
  24. package/dist/index.js +363 -226
  25. package/dist/index.js.map +1 -1
  26. package/dist/map.d.ts +184 -0
  27. package/dist/map.js +21 -17
  28. package/dist/map.js.map +1 -1
  29. package/dist/media-player-BETa3P7K.d.ts +758 -0
  30. package/dist/{microphone-Bo3WaXgD.js → microphone-76skMt6i.js} +41 -30
  31. package/dist/microphone-76skMt6i.js.map +1 -0
  32. package/dist/microphone-DDOnQHxf.d.ts +237 -0
  33. package/dist/{migrate/cli.d.ts → migrate-cli.d.ts} +1 -0
  34. package/dist/migrate-cli.js +8 -6
  35. package/dist/migrate-cli.js.map +1 -1
  36. package/dist/panorama.d.ts +102 -0
  37. package/dist/panorama.js +18 -15
  38. package/dist/panorama.js.map +1 -1
  39. package/dist/{run-BT2WKzMz.js → run-D_Ic1jE7.js} +23 -16
  40. package/dist/run-D_Ic1jE7.js.map +1 -0
  41. package/dist/scene.d.ts +147 -0
  42. package/dist/scene.js +15 -13
  43. package/dist/scene.js.map +1 -1
  44. package/dist/testing.d.ts +468 -0
  45. package/dist/testing.js +11 -3
  46. package/dist/testing.js.map +1 -1
  47. package/dist/{theme-CxYZkUNk.js → theme-1oOSMj_D.js} +19 -17
  48. package/dist/theme-1oOSMj_D.js.map +1 -0
  49. package/dist/{tooltip-DhqrDtyu.js → tooltip-BosfsWYh.js} +9 -6
  50. package/dist/tooltip-BosfsWYh.js.map +1 -0
  51. package/dist/types-B3TsF0Ey.d.ts +241 -0
  52. package/dist/{value-controls-Dm_EYfZW.js → value-controls-5u7sD_wG.js} +22 -17
  53. package/dist/value-controls-5u7sD_wG.js.map +1 -0
  54. package/dist/{viewer-input-CHU0Hx4A.js → viewer-input-3Qa-o35k.js} +3 -2
  55. package/dist/{viewer-input-CHU0Hx4A.js.map → viewer-input-3Qa-o35k.js.map} +1 -1
  56. package/dist/{visual/cli.d.ts → visual-cli.d.ts} +2 -1
  57. package/dist/visual-cli.js +5 -4
  58. package/dist/visual-cli.js.map +1 -1
  59. package/dist/visual.d.ts +105 -0
  60. package/dist/visual.js +4 -3
  61. package/dist/visual.js.map +1 -1
  62. package/package.json +24 -19
  63. package/dist/api-types/index.d.ts +0 -1
  64. package/dist/button-KGJI6jQr.js.map +0 -1
  65. package/dist/components/active-list.d.ts +0 -46
  66. package/dist/components/alert.d.ts +0 -17
  67. package/dist/components/app-shell.d.ts +0 -32
  68. package/dist/components/async-button.d.ts +0 -48
  69. package/dist/components/auto-recorder.d.ts +0 -67
  70. package/dist/components/book-viewer.d.ts +0 -50
  71. package/dist/components/box-overlay.d.ts +0 -44
  72. package/dist/components/boxed-picture.d.ts +0 -34
  73. package/dist/components/button.d.ts +0 -45
  74. package/dist/components/byte-view.d.ts +0 -32
  75. package/dist/components/checkbox.d.ts +0 -39
  76. package/dist/components/choice-grid.d.ts +0 -42
  77. package/dist/components/commands.d.ts +0 -104
  78. package/dist/components/compare-audio.d.ts +0 -30
  79. package/dist/components/compare-grid.d.ts +0 -24
  80. package/dist/components/compare-parts.d.ts +0 -90
  81. package/dist/components/compare-regions.d.ts +0 -37
  82. package/dist/components/compare-text.d.ts +0 -32
  83. package/dist/components/compare-video-grid.d.ts +0 -52
  84. package/dist/components/compare-video.d.ts +0 -61
  85. package/dist/components/compare.d.ts +0 -90
  86. package/dist/components/composition.d.ts +0 -44
  87. package/dist/components/console.d.ts +0 -34
  88. package/dist/components/conversation.d.ts +0 -83
  89. package/dist/components/cursor.d.ts +0 -44
  90. package/dist/components/data-table.d.ts +0 -89
  91. package/dist/components/data-view.d.ts +0 -66
  92. package/dist/components/density.d.ts +0 -16
  93. package/dist/components/dialog.d.ts +0 -45
  94. package/dist/components/difference.d.ts +0 -19
  95. package/dist/components/disclosure.d.ts +0 -49
  96. package/dist/components/done.d.ts +0 -14
  97. package/dist/components/drag-source.d.ts +0 -29
  98. package/dist/components/field.d.ts +0 -79
  99. package/dist/components/file-intake.d.ts +0 -60
  100. package/dist/components/film-strip.d.ts +0 -35
  101. package/dist/components/folder-picker.d.ts +0 -59
  102. package/dist/components/fullscreen-frame.d.ts +0 -18
  103. package/dist/components/history.d.ts +0 -61
  104. package/dist/components/hotkeys.d.ts +0 -44
  105. package/dist/components/infinite-list.d.ts +0 -77
  106. package/dist/components/inspector.d.ts +0 -66
  107. package/dist/components/job-action.d.ts +0 -30
  108. package/dist/components/job-status.d.ts +0 -55
  109. package/dist/components/jobs-table.d.ts +0 -35
  110. package/dist/components/key-glyphs.d.ts +0 -5
  111. package/dist/components/key-owner.d.ts +0 -11
  112. package/dist/components/lightbox.d.ts +0 -61
  113. package/dist/components/line-chart.d.ts +0 -169
  114. package/dist/components/link-card.d.ts +0 -32
  115. package/dist/components/link.d.ts +0 -54
  116. package/dist/components/markable-text.d.ts +0 -60
  117. package/dist/components/media-contents.d.ts +0 -28
  118. package/dist/components/media-group.d.ts +0 -32
  119. package/dist/components/media-player.d.ts +0 -251
  120. package/dist/components/media-progress.d.ts +0 -17
  121. package/dist/components/media-skip.d.ts +0 -31
  122. package/dist/components/media-spans.d.ts +0 -93
  123. package/dist/components/media.d.ts +0 -133
  124. package/dist/components/meter.d.ts +0 -32
  125. package/dist/components/metric.d.ts +0 -17
  126. package/dist/components/outbox-status.d.ts +0 -10
  127. package/dist/components/page-header.d.ts +0 -14
  128. package/dist/components/pair-vote.d.ts +0 -70
  129. package/dist/components/pause-button.d.ts +0 -7
  130. package/dist/components/pixel-image.d.ts +0 -29
  131. package/dist/components/place-board.d.ts +0 -39
  132. package/dist/components/player-warning.d.ts +0 -24
  133. package/dist/components/popover.d.ts +0 -20
  134. package/dist/components/recorder.d.ts +0 -73
  135. package/dist/components/region-editor.d.ts +0 -67
  136. package/dist/components/save.d.ts +0 -46
  137. package/dist/components/say-again.d.ts +0 -13
  138. package/dist/components/schedule-table.d.ts +0 -24
  139. package/dist/components/secret-field.d.ts +0 -34
  140. package/dist/components/selectable-grid.d.ts +0 -57
  141. package/dist/components/selection.d.ts +0 -104
  142. package/dist/components/sequence-timeline.d.ts +0 -50
  143. package/dist/components/shortcut-editor.d.ts +0 -44
  144. package/dist/components/sortable-list.d.ts +0 -39
  145. package/dist/components/status.d.ts +0 -9
  146. package/dist/components/switch.d.ts +0 -15
  147. package/dist/components/system-panel.d.ts +0 -58
  148. package/dist/components/tabs.d.ts +0 -16
  149. package/dist/components/theme.d.ts +0 -106
  150. package/dist/components/thumbnail.d.ts +0 -50
  151. package/dist/components/tile-grid.d.ts +0 -67
  152. package/dist/components/timeline-player.d.ts +0 -18
  153. package/dist/components/timeline.d.ts +0 -115
  154. package/dist/components/toast.d.ts +0 -36
  155. package/dist/components/toggle.d.ts +0 -51
  156. package/dist/components/toolbar.d.ts +0 -15
  157. package/dist/components/tooltip.d.ts +0 -19
  158. package/dist/components/transcript-view.d.ts +0 -63
  159. package/dist/components/tree.d.ts +0 -74
  160. package/dist/components/undo.d.ts +0 -63
  161. package/dist/components/use-timeline.d.ts +0 -44
  162. package/dist/components/value-controls.d.ts +0 -91
  163. package/dist/components/video-clock.d.ts +0 -68
  164. package/dist/components/view-options.d.ts +0 -105
  165. package/dist/components/viewport.d.ts +0 -85
  166. package/dist/components/virtual-list.d.ts +0 -19
  167. package/dist/components/waveform.d.ts +0 -71
  168. package/dist/components/workflow-steps.d.ts +0 -71
  169. package/dist/components/workspace.d.ts +0 -83
  170. package/dist/cursor-DDGBPiTJ.js.map +0 -1
  171. package/dist/field-BjeE_FeB.js.map +0 -1
  172. package/dist/follow-BTPs49FP.js.map +0 -1
  173. package/dist/generate-CjTHKJ39.js.map +0 -1
  174. package/dist/lib/base.d.ts +0 -10
  175. package/dist/lib/book.d.ts +0 -25
  176. package/dist/lib/boxes.d.ts +0 -55
  177. package/dist/lib/breakpoint.d.ts +0 -4
  178. package/dist/lib/choice.d.ts +0 -29
  179. package/dist/lib/chords.d.ts +0 -20
  180. package/dist/lib/client-work.d.ts +0 -24
  181. package/dist/lib/control.d.ts +0 -4
  182. package/dist/lib/dev.d.ts +0 -2
  183. package/dist/lib/errors.d.ts +0 -43
  184. package/dist/lib/file-intake.d.ts +0 -60
  185. package/dist/lib/follow.d.ts +0 -18
  186. package/dist/lib/format.d.ts +0 -243
  187. package/dist/lib/grouped-grid-layout.d.ts +0 -44
  188. package/dist/lib/icon.d.ts +0 -6
  189. package/dist/lib/image-diff.d.ts +0 -30
  190. package/dist/lib/in-view.d.ts +0 -21
  191. package/dist/lib/loudness.d.ts +0 -18
  192. package/dist/lib/marks.d.ts +0 -6
  193. package/dist/lib/microphone.d.ts +0 -24
  194. package/dist/lib/number-input.d.ts +0 -4
  195. package/dist/lib/object-url.d.ts +0 -2
  196. package/dist/lib/overlay.d.ts +0 -1
  197. package/dist/lib/recording.d.ts +0 -16
  198. package/dist/lib/region.d.ts +0 -64
  199. package/dist/lib/rich-text.d.ts +0 -44
  200. package/dist/lib/search-param.d.ts +0 -16
  201. package/dist/lib/segmenter.d.ts +0 -40
  202. package/dist/lib/sequence.d.ts +0 -34
  203. package/dist/lib/speech.d.ts +0 -53
  204. package/dist/lib/text-diff.d.ts +0 -16
  205. package/dist/lib/timeline.d.ts +0 -14
  206. package/dist/lib/transcript.d.ts +0 -53
  207. package/dist/lib/utils.d.ts +0 -4
  208. package/dist/lib/viewer-input.d.ts +0 -29
  209. package/dist/lib/viewport.d.ts +0 -55
  210. package/dist/lib/waveform.d.ts +0 -46
  211. package/dist/map/fan.d.ts +0 -15
  212. package/dist/map/index.d.ts +0 -3
  213. package/dist/map/map-styles.d.ts +0 -2
  214. package/dist/map/markers.d.ts +0 -60
  215. package/dist/map/route-map.d.ts +0 -146
  216. package/dist/microphone-Bo3WaXgD.js.map +0 -1
  217. package/dist/migrate/stock-classes.d.ts +0 -11
  218. package/dist/panorama/gl.d.ts +0 -16
  219. package/dist/panorama/index.d.ts +0 -2
  220. package/dist/panorama/panorama-viewer.d.ts +0 -56
  221. package/dist/panorama/projection.d.ts +0 -45
  222. package/dist/query/api.d.ts +0 -23
  223. package/dist/query/clips.d.ts +0 -48
  224. package/dist/query/index.d.ts +0 -55
  225. package/dist/query/infinite.d.ts +0 -60
  226. package/dist/query/job.d.ts +0 -26
  227. package/dist/query/outbox.d.ts +0 -85
  228. package/dist/query/poll.d.ts +0 -24
  229. package/dist/query/reserve.d.ts +0 -33
  230. package/dist/query/typed-api.d.ts +0 -84
  231. package/dist/query/workflow.d.ts +0 -17
  232. package/dist/run-BT2WKzMz.js.map +0 -1
  233. package/dist/scene/camera.d.ts +0 -99
  234. package/dist/scene/index.d.ts +0 -2
  235. package/dist/scene/scene-viewport.d.ts +0 -48
  236. package/dist/testing/buttons.d.ts +0 -7
  237. package/dist/testing/index.d.ts +0 -161
  238. package/dist/testing/intersection-observer.d.ts +0 -34
  239. package/dist/testing/layout.d.ts +0 -13
  240. package/dist/testing/microphone.d.ts +0 -35
  241. package/dist/testing/setup.d.ts +0 -14
  242. package/dist/testing/speech.d.ts +0 -38
  243. package/dist/testing/storage.d.ts +0 -7
  244. package/dist/theme-CxYZkUNk.js.map +0 -1
  245. package/dist/tooltip-DhqrDtyu.js.map +0 -1
  246. package/dist/value-controls-Dm_EYfZW.js.map +0 -1
  247. package/dist/visual/capture.d.ts +0 -37
  248. package/dist/visual/compare.d.ts +0 -46
  249. package/dist/visual/drop.d.ts +0 -19
  250. package/dist/visual/fonts.d.ts +0 -18
  251. package/dist/visual/index.d.ts +0 -19
  252. package/dist/visual/run.d.ts +0 -22
  253. package/dist/visual/serve.d.ts +0 -13
  254. package/dist/visual/targets.d.ts +0 -17
  255. package/dist/visual/types.d.ts +0 -188
@@ -1,51 +0,0 @@
1
- import { IconComponent } from '../lib/icon';
2
- import * as React from "react";
3
- declare const sizes: {
4
- readonly default: "h-(--control-h)";
5
- readonly sm: "h-(--control-h-sm)";
6
- };
7
- type Size = keyof typeof sizes;
8
- /** Props for `Toggle`. */
9
- export type ToggleProps = {
10
- /** The name, always. Shown as the text unless `icon` is given with `iconOnly`, then it is the accessible name and the tooltip. */
11
- label: string;
12
- icon?: IconComponent;
13
- /** Show only the icon; `label` stays the name and tooltip. */
14
- iconOnly?: boolean;
15
- pressed?: boolean;
16
- defaultPressed?: boolean;
17
- onChange?: (pressed: boolean) => void;
18
- disabled?: boolean;
19
- size?: Size;
20
- className?: string;
21
- };
22
- /** A button that is pressed or not (`aria-pressed`). Chosen reads as an ink border on a tint, never as the filled primary. */
23
- export declare function Toggle({ label, icon, iconOnly, pressed, defaultPressed, onChange, disabled, size, className }: ToggleProps): React.JSX.Element;
24
- /** One option of a `ToggleGroup`. */
25
- export type ToggleOption = {
26
- value: string;
27
- label: string;
28
- icon?: IconComponent;
29
- iconOnly?: boolean;
30
- };
31
- /** Props for `ToggleGroup`. */
32
- export type ToggleGroupProps = {
33
- /** Names the group for screen readers: "Preview quality". Required. */
34
- label: string;
35
- options: readonly ToggleOption[];
36
- size?: Size;
37
- className?: string;
38
- } & ({
39
- value: string;
40
- onChange: (value: string) => void;
41
- param?: undefined;
42
- } | {
43
- /** The search parameter that holds the choice, so it can be linked and survives a reload. The first option is the default and is not written. */
44
- param: string;
45
- value?: undefined;
46
- /** Called after the URL changes. */
47
- onChange?: (value: string) => void;
48
- });
49
- /** A single-choice set of toggle buttons for 2 to 7 short options that switch a view. One is always chosen; arrow keys move between them. */
50
- export declare function ToggleGroup(props: ToggleGroupProps): React.JSX.Element;
51
- export {};
@@ -1,15 +0,0 @@
1
- import * as React from "react";
2
- /** Props for `Toolbar`. */
3
- export type ToolbarProps = {
4
- /** Names the toolbar for screen readers: "Preview options". Required. */
5
- label: string;
6
- orientation?: "horizontal" | "vertical";
7
- children: React.ReactNode;
8
- className?: string;
9
- };
10
- /** A group of controls with one tab stop and arrow-key movement (the WAI-ARIA toolbar pattern). Needs a `label`. */
11
- export declare function Toolbar({ label, orientation, children, className }: ToolbarProps): React.JSX.Element;
12
- /** A hairline between groups of controls inside a `Toolbar`. */
13
- export declare function ToolbarSeparator({ className }: {
14
- className?: string;
15
- }): React.JSX.Element;
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
- /** Props for `Tooltip`. */
3
- export type TooltipProps = {
4
- /** The words: a control's name or one sentence about it. Not interactive. */
5
- label: React.ReactNode;
6
- /** A shortcut or other aside shown after the label, muted ("Ctrl+Z"). */
7
- hint?: React.ReactNode;
8
- /** The element that gets the tip. It must be a React Aria pressable or focusable (a Strata `Button` is). */
9
- children: React.ReactElement;
10
- /** Which side of the trigger it prefers; it flips when there is no room. Default `top`. */
11
- side?: "top" | "right" | "bottom" | "left";
12
- /** Milliseconds before it opens on hover. Focus opens it at once. Default 500. */
13
- delay?: number;
14
- /** A controlled open state, for a story or test that needs it shown. */
15
- open?: boolean;
16
- className?: string;
17
- };
18
- /** A hover-and-focus tooltip for a control, portalled above everything. Words only; not the only home of information. */
19
- export declare function Tooltip({ label, hint, children, side, delay, open, className }: TooltipProps): React.JSX.Element;
@@ -1,63 +0,0 @@
1
- import { TranscriptGroup, TranscriptPhrase, TranscriptPhraseState } from '../lib/transcript';
2
- import { MarkKind } from './markable-text';
3
- import * as React from "react";
4
- /** What a seek from the transcript says about where it came from. */
5
- export type TranscriptSeek = {
6
- phraseId: string; /** The word pressed, when a word was. */
7
- wordIndex?: number;
8
- };
9
- export type TranscriptViewProps = {
10
- /** Names the transcript. */
11
- label: string;
12
- /** Phrases by clip, in time order. */
13
- groups: readonly TranscriptGroup[];
14
- /** The player's time, seconds. Leave out for a transcript with no player: nothing is heard or followed. */
15
- time?: number;
16
- /** A word or phrase was pressed: seconds to play from, and which. Leave out and the words and times are text. */
17
- onSeek?: (time: number, from: TranscriptSeek) => void;
18
- /** Mark words (`MarkableText`): the kinds, the mark on each word id (`wordId(phraseId, index)`), and `onMark(ids, kind | null)`. Words become marks to select, not seek buttons. */
19
- marking?: {
20
- kinds: readonly MarkKind[];
21
- marks: Readonly<Record<string, string | undefined>>;
22
- onMark: (ids: readonly string[], kind: string | null) => void;
23
- clearKeys?: string[];
24
- summary?: boolean;
25
- };
26
- /** A corrected word was pressed (a click, with no drag): open it for editing. Takes the click on that word from seeking. */
27
- onCorrectionPress?: (phraseId: string, wordIndex: number) => void;
28
- /** The mode shown: "original" (the words) or a key of the phrases' `alt`. Leave out to let the component hold it. */
29
- mode?: string;
30
- onModeChange?: (mode: string) => void;
31
- /** Names for the modes: `{ translated: "English" }`. Default: the key, capitalised. */
32
- modeLabels?: Readonly<Record<string, string>>;
33
- /** Show one speaker's phrases: "all" or a speaker. Leave out to let the component hold it. */
34
- speaker?: string;
35
- onSpeakerChange?: (speaker: string) => void;
36
- /** Scroll the heard phrase into view while the person has not scrolled away. Default true. */
37
- follow?: boolean;
38
- /** Say each phrase politely as it starts. Default false. */
39
- announce?: boolean;
40
- /** A control at the start of each phrase (a `PlayWindowButton`). */
41
- renderPlay?: (phrase: TranscriptPhrase) => React.ReactNode;
42
- /** Words under this confidence are doubtful (when they carry `confidence`). Default 0.6. */
43
- doubtfulBelow?: number;
44
- /** What a phrase can be marked, offered in each row's menu: `[{ id: "not-sung", label: "Not sung", tone: "neutral" }]`. */
45
- states?: readonly TranscriptPhraseState[];
46
- /** A phrase was marked with a state, or `null` when the mark was cleared. */
47
- onPhraseState?: (phraseId: string, stateId: string | null) => void;
48
- /** More controls at the end of each phrase (its own menu, a button). */
49
- renderActions?: (phrase: TranscriptPhrase) => React.ReactNode;
50
- /** The text of a phrase was corrected (Enter or F2 on its row). Say which mode it was in; word timings are the app's to keep. Leave out for a read-only transcript. */
51
- onEdit?: (phraseId: string, text: string, from: {
52
- mode: string;
53
- }) => void;
54
- /** Details shown on hover and focus: a clip's picture, real time, who spoke. Called only for the phrase it is open on. */
55
- renderCard?: (phrase: TranscriptPhrase) => React.ReactNode;
56
- /** How long hover or focus rests on a phrase before its card opens, ms. Default 500. */
57
- cardDelay?: number;
58
- /** Height of the scroll box once it is long enough to virtualise. Default 480. */
59
- height?: number;
60
- className?: string;
61
- };
62
- /** Timed text that follows playback: the heard word marked, any word or phrase pressed to play from, modes, speakers, follow and Jump to now. */
63
- export declare function TranscriptView({ label, groups, time, onSeek, marking, onCorrectionPress, mode: controlledMode, onModeChange, modeLabels, speaker: controlledSpeaker, onSpeakerChange, follow, announce, renderPlay, doubtfulBelow, states, onPhraseState, renderActions, onEdit, renderCard, cardDelay, height, className }: TranscriptViewProps): React.JSX.Element;
@@ -1,74 +0,0 @@
1
- import { Tone } from './status';
2
- import { Choices } from './selection';
3
- import { Load } from './data-view';
4
- import { Expanded } from './disclosure';
5
- import * as React from "react";
6
- /** A node's place in the tree, passed to `renderNode`. */
7
- export type TreeNodeState = {
8
- expanded: boolean;
9
- selected: boolean;
10
- level: number;
11
- branch: boolean;
12
- };
13
- export type TreeProps<N> = TreeCommon<N> & ({
14
- /** The chosen node's key, or `null`. */
15
- selected: string | null;
16
- /** A node was chosen. */
17
- onSelect: (key: string, node: N) => void;
18
- choices?: undefined;
19
- } | {
20
- /** Choose several, from `useChoices`: a checkbox per row, mixed parents, Shift ranges, "Select all shown", and keys the choice implies marked in words. Give this instead of `selected` and `onSelect`. */
21
- choices: Choices;
22
- selected?: undefined;
23
- onSelect?: undefined;
24
- });
25
- type TreeCommon<N> = {
26
- /** Names the tree for assistive technology: "Folders". Required. */
27
- label: string;
28
- /** The top level, as one read: the skeleton, the failure and Try again come from `DataView`'s `Load`. */
29
- roots: Load<readonly N[]>;
30
- /** The children of an open node, as a hook (`useLoad` inside). Called only while the node is open. */
31
- useChildren: (node: N) => Load<readonly N[]>;
32
- /** A node's key, unique in the whole tree: a path, an id. */
33
- nodeKey: (node: N) => string;
34
- /** A node's name: shown, and what type-ahead matches. */
35
- nodeLabel: (node: N) => string;
36
- /** Whether a node can open. Default: every node can. */
37
- isBranch?: (node: N) => boolean;
38
- /** What a row shows after the icon. Default: the name, cut with an ellipsis. */
39
- renderNode?: (node: N, state: TreeNodeState) => React.ReactNode;
40
- /** Which nodes are open; from `useExpanded`, optionally in the URL. */
41
- expanded: Expanded;
42
- /** What pressing a branch's row (not its chevron) does. `"select"` (default) chooses it like a leaf; `"toggle"` opens or closes it and leaves the chosen row where it was, as a file tree does (Finder, VS Code), so only files are chosen. Not used with `choices`, where a press ticks. `beforeOpen` is still asked. */
43
- branchPress?: "select" | "toggle";
44
- /** Asked when the person opens a branch (chevron or Right arrow): return `false` to keep it closed, having done something else with it (a folder that is a project is chosen, not entered). Not asked for opens the app makes itself. */
45
- beforeOpen?: (node: N) => boolean;
46
- /** The skeleton row while a node's children load. Default: a muted bar. */
47
- loadingRow?: React.ReactNode;
48
- /** What an open node with nothing in it says: "No folders". Required, so an empty branch is never blank. */
49
- emptyRow: string;
50
- /** The row in view (not the same as ticked): highlighted, `aria-current`, moved by a press on a row's name or Enter. Works with `selected` or `choices`. */
51
- current?: string | null;
52
- onCurrentChange?: (key: string, node: N) => void;
53
- /** How many items a node holds ("81 pictures"), drawn right aligned in tabular figures and part of the row's name. `null` draws nothing. */
54
- count?: (node: N) => string | number | null | undefined;
55
- /** A word on a tint after the name ("in project"), part of the row's name. */
56
- badge?: (node: N) => {
57
- label: string;
58
- tone?: Tone;
59
- } | null | undefined;
60
- /** Orders the children of every node, and the top level. */
61
- sortChildren?: (a: N, b: N) => number;
62
- /** The keys from the top down to a node to bring into view: its ancestors open and the tree scrolls to it. Give the same array to reveal again. The ancestors are opened through `expanded`, so with `useExpanded({ param })` they are written into the URL (`?open=textures&open=textures/e1u1`): a link to a file carries its folders, and a test checks `open` by key, not by the exact search string. */
63
- reveal?: readonly string[];
64
- /** What is under a branch, as keys (not the branch itself), for a branch ticked before it was read. When given, ticking it does not open it: the keys are chosen and the live region says "2019 and its 91 folders". */
65
- resolveBranch?: (node: N) => Promise<readonly string[]>;
66
- /** What `resolveBranch`'s keys are, for the live region: `["folder", "folders"]`. Default item, items. */
67
- coverNoun?: readonly [string, string];
68
- /** The tallest the tree may be before it scrolls, as a CSS length. Default 24rem. */
69
- height?: string;
70
- className?: string;
71
- };
72
- /** A hierarchy whose children load as each node opens (a `useChildren` hook per open node): a skeleton row, a Try again row and an "empty" row per node, type-ahead and arrow keys, single selection, open state optionally in the URL, always virtualised. */
73
- export declare function Tree<N>({ label, roots, useChildren, nodeKey, nodeLabel, isBranch, renderNode, selected, onSelect, choices, current, onCurrentChange, count, badge, sortChildren, reveal, resolveBranch, coverNoun, branchPress, expanded, beforeOpen, loadingRow, emptyRow, height, className }: TreeProps<N>): React.JSX.Element;
74
- export {};
@@ -1,63 +0,0 @@
1
- import * as React from "react";
2
- /** A removal waiting out its undo window: what to say, what to do when the window closes, and what to say if that fails. */
3
- export type PendingRemoval = {
4
- /** Identifies the removed item: `isRemoved(id)` is true from `schedule` until Undo or a failed commit. */
5
- id: string;
6
- /** A bulk removal's items, all removed, undone, committed and restored together (one `commit` for the batch). `isRemoved` is true for each. Default `[id]`. */
7
- ids?: readonly string[];
8
- /** What happened, in the product's words: "Withdrew Tom Ellery's 3 pieces from kiln 2." */
9
- message: string;
10
- /** What the person reads if the commit fails, saying the item is back: "Tom Ellery's 3 pieces are back in kiln 2: the withdrawal did not go through." */
11
- failure: string;
12
- /** Makes the removal real (usually a request, then invalidating the query the item came from). Runs once per attempt: when the window closes, on `flush()`, when a second removal is scheduled, or when the owner unmounts. */
13
- commit: () => void | Promise<unknown>;
14
- /** Called after a failed commit, for anything beyond restoring the item and showing the failure (which the hook does). The only failure path once the owner has unmounted. */
15
- onError?: (error: unknown) => void;
16
- };
17
- /** A removal whose commit failed: the removal, and the error described for a person. */
18
- export type FailedRemoval = {
19
- removal: PendingRemoval;
20
- message?: string;
21
- };
22
- /** Options for `useUndoable`. */
23
- export type UndoableOptions = {
24
- /** How long Undo stays in reach, in milliseconds. Default 8000. */
25
- windowMs?: number;
26
- /** Describes a failed commit for a person, or returns undefined to show the removal's `failure` alone. Default `describeActionError`, as for `useAsyncAction`. */
27
- describeError?: (error: unknown) => string | undefined;
28
- };
29
- /** What `useUndoable` returns. Pass it whole to `UndoBar`. */
30
- export type Undoable = {
31
- /** The removal inside its window, or null. */
32
- pending: PendingRemoval | null;
33
- /** The last removal whose commit failed, until it is retried, dismissed or another removal is scheduled. */
34
- failed: FailedRemoval | null;
35
- /** Whether an item is out of view: scheduled, committing or committed, and not undone or failed. Filter rows with it. */
36
- isRemoved: (id: string) => boolean;
37
- /** Removes an item and starts its window. Commits any removal already pending first: only one is pending at a time. */
38
- schedule: (next: PendingRemoval) => void;
39
- /** Cancels the pending removal and brings the item back; its `commit` never runs. */
40
- undo: () => void;
41
- /** Commits the pending removal now and resolves when it and every earlier commit still in flight have settled; rejects if any failed, so a dependent action does not run. Resolves at once when nothing is pending or running. */
42
- flush: () => Promise<void>;
43
- /** Removes the failed item again and commits it now (the person already waited out the window); settles like `flush`. */
44
- retry: () => Promise<void>;
45
- /** Clears the failure from the bar; the item stays back. */
46
- dismiss: () => void;
47
- };
48
- /**
49
- * Schedules a reversible removal to commit after a window unless undone, and owns which items
50
- * are out of view meanwhile.
51
- *
52
- * Only one removal is pending at a time: scheduling a second commits the first immediately.
53
- * Unmounting inside the window commits the pending removal (leaving is not Undo), so a navigation
54
- * or a test that unmounts still sends the commit's request: await `flush()` before a dependent
55
- * action, and in tests let MSW answer the request or flush before unmounting.
56
- */
57
- export declare function useUndoable(options?: number | UndoableOptions): Undoable;
58
- /** The polite live region that shows a pending removal with Undo, or a failed one with Try again. Pass it the whole `useUndoable()` result. */
59
- export declare function UndoBar({ undoable, inline, }: {
60
- undoable: Pick<Undoable, "pending" | "failed" | "undo" | "retry" | "dismiss">;
61
- /** Render in the flow instead of fixed to the viewport; for the state-matrix page. */
62
- inline?: boolean;
63
- }): React.JSX.Element;
@@ -1,44 +0,0 @@
1
- export type TimelineClockOptions = {
2
- /** Seconds. */
3
- duration: number;
4
- /** Playback speed; a multiple of real time. Default 1. The app owns it (`RateChoice` sets it). */
5
- rate?: number;
6
- /** What one step moves, in seconds. Default 1/30. */
7
- frame?: number;
8
- /** Start again at the end instead of stopping. */
9
- loop?: boolean;
10
- /** Where the playhead rests before anyone has used it: `"end"` shows a recorded run whole before play is pressed. Default `"start"`. */
11
- startAt?: "start" | "end";
12
- /** Join a group, as `useMediaElement`'s: starting this clock pauses the others in it. Defaults to the nearest `MediaGroup`. */
13
- group?: string;
14
- /** Join the page's key ownership (default true): pass `ownsKeys` to `useHotkeys`' `enabled`. Off for a clock whose keys the screen binds itself. */
15
- keys?: boolean;
16
- };
17
- /** What `useTimeline` returns: the media element's names for a clock the app owns. */
18
- export type TimelineClock = {
19
- /** Seconds. */
20
- time: number;
21
- duration: number;
22
- playing: boolean;
23
- /** Stopped at the end of a clock that does not loop. */
24
- ended: boolean;
25
- rate: number;
26
- /** One step, in seconds, as given. */
27
- frame: number;
28
- play: () => void;
29
- pause: () => void;
30
- toggle: () => void;
31
- /** Moves the playhead (clamped to the run) and pauses. */
32
- seek: (time: number) => void;
33
- /** Moves `count` frames (negative goes back) and pauses. */
34
- step: (count: number) => void;
35
- /** Whether this clock's keys are live: it is the only player on the page, or the one last used. Pass it to `useHotkeys`' `enabled`. */
36
- ownsKeys: boolean;
37
- /** Spread on the region that holds the transport (and the stage, if the keys are to follow it): focus or a press there takes the keys. */
38
- regionProps: {
39
- onFocusCapture: () => void;
40
- onPointerDownCapture: () => void;
41
- };
42
- };
43
- /** A playhead the app owns, in the shape `Transport`, `SeekBar` and `transportShortcuts` take. */
44
- export declare function useTimeline({ duration, rate, frame, loop, startAt, group, keys }: TimelineClockOptions): TimelineClock;
@@ -1,91 +0,0 @@
1
- import { ControlSize } from '../lib/control';
2
- import * as React from "react";
3
- /** Props shared by the number field and the slider. */
4
- export type RangeProps = {
5
- min?: number;
6
- max?: number;
7
- /** The size of one arrow-key step. Default 1. */
8
- step?: number;
9
- /** The unit shown with the value: "%", "°", "Mbps", "px". Spoken too when `Intl` has it (%, °, ms, s, kB, MB, GB, kbps, Mbps). */
10
- unit?: string;
11
- /** The locale for digits and the decimal mark. Default the app's `format` locale. */
12
- locale?: string;
13
- };
14
- /** Props for `NumberField`. */
15
- export type NumberFieldProps = RangeProps & {
16
- /** The current value; `null` when it is not known (shown as an en dash, not 0). */
17
- value: number | null;
18
- /** Receives a number inside the limits, or `null` when the field is cleared. Never NaN, never out of range. With `preview`, only Apply calls it, and it may return a promise. */
19
- onChange: (value: number | null) => void | Promise<unknown>;
20
- /** Decimal places to show and keep. Default the places in `step` (and `min`). */
21
- places?: number;
22
- /** An empty field is an error ("Enter a value.") rather than `null`. */
23
- required?: boolean;
24
- disabled?: boolean;
25
- /** Names the control when it is used without a `Field`. */
26
- "aria-label"?: string;
27
- id?: string;
28
- name?: string;
29
- /** `sm` is --control-h-sm, the height of a small `Toggle` or `IconButton` beside it. Default --control-h. */
30
- size?: ControlSize;
31
- /** Step buttons beside the field, each a size in the field's unit: `[0.1, 1, 10]` draws "−10 −1 −0.1 +0.1 +1 +10". Held, they repeat. They honour `min` and `max`. */
32
- nudge?: readonly number[];
33
- /** What the app suggests, drawn as a row under the field with "Use this value". `label` is the value as the person reads it ("+2.4 s"); `reason` says why, in words. Choosing it sets the field's value, which `preview` still holds back until Apply. */
34
- suggestion?: {
35
- value: number;
36
- label?: string;
37
- reason: string;
38
- };
39
- /** Hold changes back until the person applies them: shown while the value differs from `value` (the saved one), as a node or a function of the pending value. `onChange` is then called by Apply only. */
40
- preview?: React.ReactNode | ((pending: number | null) => React.ReactNode);
41
- /** Apply's words in preview mode, the same verb through its states. Default "Apply" → "Applying…" → "Applied". */
42
- applyLabels?: {
43
- idle: string;
44
- pending: string;
45
- done: string;
46
- };
47
- className?: string;
48
- };
49
- /** A number with a unit on React Aria's number field: typed input is validated, not clamped, so an out-of-range value is explained in the surrounding `Field` and never passed on; empty stays `null`. `nudge` adds step buttons that repeat when held, `suggestion` a value the app proposes with its reason, and `preview` holds changes back behind Apply and Revert. */
50
- export declare function NumberField({ value, onChange, min, max, step, places, unit, locale, required, disabled, id: idProp, name, size, nudge, suggestion, preview, applyLabels, className, "aria-label": ariaLabel, }: NumberFieldProps): React.JSX.Element;
51
- /** Props for `Slider`. */
52
- export type SliderProps = RangeProps & {
53
- value: number;
54
- onChange: (value: number) => void;
55
- /** Both limits are required: a slider with no ends is not a slider. */
56
- min: number;
57
- max: number;
58
- /** Replace the printed value with a `NumberField` beside the track, so an exact value can be typed. */
59
- editable?: boolean;
60
- /** Hide the printed value (when something else beside it already shows it). */
61
- hideValue?: boolean;
62
- /** Decimal places in the printed and spoken value. Default the places in `step`. */
63
- places?: number;
64
- disabled?: boolean;
65
- /** Names the slider when it is used without a `Field`. */
66
- "aria-label"?: string;
67
- className?: string;
68
- };
69
- /** A slider on React Aria with its current value always printed beside the track (and spoken with the unit when `Intl` knows it); `editable` adds a number field to type an exact value. */
70
- export declare function Slider({ value, onChange, min, max, step, unit, locale, editable, hideValue, places, disabled, className, "aria-label": ariaLabel, }: SliderProps): React.JSX.Element;
71
- /** Props for `ColorField`. */
72
- export type ColorFieldProps = {
73
- /** `#rrggbb`, or `null` when no colour is set. */
74
- value: string | null;
75
- /** Receives a valid `#rrggbb` (lower case) or `null` when cleared; never a half-typed value. */
76
- onChange: (value: string | null) => void;
77
- /** A short list the app suggests, as `#rrggbb`. Pressing one chooses it. */
78
- suggestions?: readonly string[];
79
- /** The colour this will be drawn on, `#rrggbb`: a note appears when the contrast would be low. */
80
- against?: string;
81
- /** What it is drawn on, in words: "the map". Completes the note. */
82
- againstLabel?: string;
83
- /** The lowest contrast ratio accepted before the note shows. Default 3, the WCAG minimum for graphics. */
84
- minContrast?: number;
85
- disabled?: boolean;
86
- "aria-label"?: string;
87
- id?: string;
88
- className?: string;
89
- };
90
- /** Choose a colour with the platform picker, see and type its hex value, pick from the app's suggestions, and get a note when it would be hard to see on `against`. A half-typed value is never passed on. */
91
- export declare function ColorField({ value, onChange, suggestions, against, againstLabel, minContrast, disabled, id: idProp, className, "aria-label": ariaLabel }: ColorFieldProps): React.JSX.Element;
@@ -1,68 +0,0 @@
1
- import { Shortcut } from './hotkeys';
2
- import * as React from "react";
3
- /** A range to loop, in seconds of the clip; the same seconds in every video. */
4
- export type VideoLoop = {
5
- start: number | null;
6
- end: number | null;
7
- };
8
- /** Speeds offered by default: slow motion for sitting on a moment. */
9
- export declare const SLOW_RATES: readonly [0.1, 0.25, 0.5, 1, 1.25, 1.5, 2];
10
- /** Options for `useVideoClock`. */
11
- export type VideoClockOptions = {
12
- /** Frames per second of the leader: the unit of the sync tolerance and of a step. */
13
- fps: number;
14
- loop?: VideoLoop;
15
- onLoopChange?: (loop: VideoLoop) => void;
16
- /** The index of the video whose sound is heard; none when `null`. */
17
- audio: number | null;
18
- /** Start playing once every video has its metadata (and muted, unless the person chose a sound level), and again for each new `pairKey`. `"always"` also with reduced motion. Default off. */
19
- autoPlay?: boolean | "always";
20
- /** Loop from 0 to the natural end when no range is set. A range with both ends set wins. Default off. */
21
- loopWhole?: boolean;
22
- /** Names the pair on the clock: when it changes the clock starts again at 0, paused (or playing, with `autoPlay`). */
23
- pairKey?: string;
24
- };
25
- /** The clock and everything a transport needs. */
26
- export type VideoClock = ReturnType<typeof useVideoClock>;
27
- /** Plays, pauses, seeks, steps and loops any number of videos together. */
28
- export declare function useVideoClock({ fps, loop: loopProp, onLoopChange, audio, autoPlay, loopWhole, pairKey }: VideoClockOptions): {
29
- attach: (index: number) => (el: HTMLVideoElement | null) => void;
30
- restore: (e: React.SyntheticEvent<HTMLVideoElement>) => void;
31
- wanted: boolean;
32
- started: boolean;
33
- play: () => void;
34
- pause: () => void;
35
- toggle: () => void;
36
- seek: (time: number) => void;
37
- step: (direction: 1 | -1) => void;
38
- setRate: (rate: number) => void;
39
- time: number;
40
- rate: number;
41
- buffered: number;
42
- duration: number | null;
43
- loaded: boolean;
44
- failed: boolean;
45
- loop: VideoLoop;
46
- looping: boolean;
47
- /** The whole clip loops: asked for, and no range set to override it. */
48
- loopsWhole: boolean;
49
- setPoint: (point: "start" | "end") => void;
50
- clearLoop: () => void;
51
- volume: number;
52
- muted: boolean;
53
- setVolume: (v: number) => void;
54
- behind: ReadonlySet<number>;
55
- setVisible: (index: number, visible: boolean) => void;
56
- shortcuts: () => Shortcut[];
57
- hasAudio: boolean;
58
- fps: number;
59
- };
60
- /** The transport row (play, step, time, seek bar with moments and the loop's ends, speed, volume) and the loop row, for a clock. */
61
- export declare function VideoControls({ clock, rates, moments }: {
62
- clock: VideoClock;
63
- rates?: readonly number[];
64
- moments?: readonly {
65
- time: number;
66
- label: string;
67
- }[];
68
- }): React.JSX.Element;
@@ -1,105 +0,0 @@
1
- import { TileAspect } from './tile-grid';
2
- import * as React from "react";
3
- /** A way to order rows. */
4
- export type ViewSort<T> = {
5
- key: string;
6
- /** What the menu calls it: "Date taken". */
7
- label: string;
8
- /** The value to order by. `null` or `undefined` sorts last either way. */
9
- value: (row: T) => string | number | Date | null | undefined;
10
- /** Words for the direction buttons, from the key's own sense: `["Oldest first", "Newest first"]`. Default "Ascending", "Descending". */
11
- directions?: readonly [ascending: string, descending: string];
12
- /** The direction a person gets on first choosing this key. Default ascending. */
13
- defaultDescending?: boolean;
14
- };
15
- /** A way to put rows into groups. */
16
- export type ViewGroup<T> = {
17
- key: string;
18
- /** What the menu calls it: "Hour". */
19
- label: string;
20
- /** The group a row belongs to; the groups come out in the order the sorted rows first show them. */
21
- of: (row: T) => string;
22
- /** The heading drawn for a group; default the group's own text. */
23
- heading?: (group: string) => string;
24
- };
25
- /** What `useViewOptions` takes. */
26
- export type ViewOptionsConfig<T> = {
27
- /** Names this view in `localStorage` (`strata-view:{id}`): "browser-grid". Required, so two screens do not share a size. */
28
- id: string;
29
- sorts?: readonly ViewSort<T>[];
30
- /** Key of the sort a first visit starts with, and whether it starts descending. Default the first. */
31
- defaultSort?: {
32
- key: string;
33
- descending?: boolean;
34
- };
35
- groups?: readonly ViewGroup<T>[];
36
- /** Key of the group a first visit starts with; default none. */
37
- defaultGroup?: string | null;
38
- /** The tile width range in px; give it to get the size slider. */
39
- size?: {
40
- min: number;
41
- max: number;
42
- step?: number;
43
- default: number;
44
- };
45
- aspects?: readonly TileAspect[];
46
- defaultAspect?: TileAspect;
47
- /** Offer grid or list. */
48
- layouts?: boolean;
49
- /** The text the filter matches in a row (everything a person would search for); give it to get the filter box. */
50
- filterText?: (row: T) => string;
51
- /** Keep sort, group and size in the address too (`?sort=taken-desc&group=hour&size=180`). Needs a router. Fixed for the life of the component. */
52
- url?: boolean | {
53
- sort?: string;
54
- group?: string;
55
- size?: string;
56
- };
57
- };
58
- /** One group of rows. */
59
- export type ViewGroupRows<T> = {
60
- key: string;
61
- heading: string;
62
- rows: T[];
63
- };
64
- /** The state `useViewOptions` returns, with the rows it applies to. */
65
- export type ViewOptionsState<T> = {
66
- config: ViewOptionsConfig<T>;
67
- sort: string | null;
68
- descending: boolean;
69
- group: string | null;
70
- size: number;
71
- aspect: TileAspect;
72
- layout: "grid" | "list";
73
- query: string;
74
- setSort: (key: string) => void;
75
- setDescending: (descending: boolean) => void;
76
- setGroup: (key: string | null) => void;
77
- setSize: (size: number) => void;
78
- setAspect: (aspect: TileAspect) => void;
79
- setLayout: (layout: "grid" | "list") => void;
80
- setQuery: (query: string) => void;
81
- /** Filter by the text, then sort: the rows to draw. */
82
- apply: (rows: readonly T[]) => T[];
83
- /** The same rows in groups when a group key is chosen; one group, no heading, when none. */
84
- grouped: (rows: readonly T[]) => ViewGroupRows<T>[];
85
- /** The line beside the filter: "82 of 140" while filtering, "140" otherwise (pass the full and filtered counts). */
86
- countText: (shown: number, total: number) => string;
87
- /** Back to the defaults (not the filter). */
88
- reset: () => void;
89
- };
90
- /** Rows ordered by a key: natural string order, `null` last whichever way, ties kept in their order. Exported for a screen that orders without the toolbar. */
91
- export declare function sortRows<T>(rows: readonly T[], value: (row: T) => string | number | Date | null | undefined, descending?: boolean): T[];
92
- /** The view's state: sort and direction, group, tile size, aspect, layout and a text filter, kept in `localStorage` and (with `url`) the address, and applied to rows with `apply` and `grouped`. Draw it with `ViewOptions`; feed the result to `SelectableGrid`. */
93
- export declare function useViewOptions<T>(config: ViewOptionsConfig<T>): ViewOptionsState<T>;
94
- /** Props for `ViewOptions`. */
95
- export type ViewOptionsProps<T> = {
96
- view: ViewOptionsState<T>;
97
- /** How many rows pass the filter, and how many there are; for "82 of 140". Omit with no filter. */
98
- shown?: number;
99
- total?: number;
100
- /** Names the toolbar. Default "View options". */
101
- label?: string;
102
- className?: string;
103
- };
104
- /** The one toolbar for a `useViewOptions` state: sort menu and direction, group menu, size slider (`-`/`+` keys), aspect, grid or list, and a filter with its count. One tab stop; on a phone all but the filter fold into a "View" popover. */
105
- export declare function ViewOptions<T>({ view, shown, total, label, className }: ViewOptionsProps<T>): React.JSX.Element;