strata-react 1.0.31 → 1.0.32
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.
- package/README.md +2 -2
- package/dist/components/compare-parts.d.ts +2 -0
- package/dist/components/compare-video-grid.d.ts +48 -0
- package/dist/components/compare-video.d.ts +2 -5
- package/dist/components/video-clock.d.ts +60 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +552 -249
- package/dist/index.js.map +1 -1
- package/dist/map/index.d.ts +1 -1
- package/dist/map/route-map.d.ts +22 -3
- package/dist/map.js +110 -36
- package/dist/map.js.map +1 -1
- package/dist/{run-CKlcLpdN.js → run-BqZGKhW9.js} +10 -1
- package/dist/run-BqZGKhW9.js.map +1 -0
- package/dist/visual-cli.js +1 -1
- package/dist/visual.js +1 -1
- package/package.json +1 -1
- package/dist/run-CKlcLpdN.js.map +0 -1
package/README.md
CHANGED
|
@@ -127,7 +127,7 @@ strata-react is ESM-only (`exports` has only `import`), as is its peer `react-ro
|
|
|
127
127
|
| Form | `Field`, `Input`, `Textarea`, `NativeSelect`, `ChoiceGroup`, `Checkbox` | `Field` wires label, hint, error, `aria-describedby`, `aria-invalid`, and `action` puts a one-field form's button on the control's row with the hint and error under both; `Checkbox` requires `label` and is one target with it, and has a mixed state |
|
|
128
128
|
| Status and figures | `Status`, `Metric`, `MetricStrip`, `Meter`, `crossedThreshold`, `CompositionBar` | A status is always a word; figures have no icons or sparklines; `Meter` is a `meter` named for what it measures, with its reading in words ("72% used"), threshold notches, and a `Status` word once a threshold is crossed (each threshold must name its state); `CompositionBar` is a stacked bar over a table naming every part, its amount and share, and names the remainder (`total` needs `restLabel`); a part that is there reads "<1%" and keeps a sliver, never "0%"; `JobStatus` is a long-running server job: a required word per state beside the app's sentence, a progress bar when the total is known, each failure named with its reason, announced only when the item changes or the job ends |
|
|
129
129
|
| Data | `DataView`, `Load<T>`, `Stale`, `StaleNotice`, `LoadError`, `EmptyState`, `Skeleton`, `Thumbnail`, `ThumbnailSkeleton`, `DataTable`, `TableSkeleton`, `VirtualList`, `InfiniteList`, `LoadMore`, `useInView`, `LineChart` | `DataView` requires skeleton and empty, keeps data on screen under a `StaleNotice` (why, how old, Try again) when a refresh fails, and takes an `error` renderer for an app's own look of a failed read (default `LoadError`, always inside an alert); `Thumbnail` is a remote image in a box of fixed `aspect`, with a skeleton while it loads, the required `missing` words (or a `fallback` drawing, such as an avatar's initial) when it fails or `src` is null, required `alt`, `children` overlaid in its corners, and a request only once it nears the screen (`eager` for the first few); tables, lists and tile grids virtualise from 100 rows, on React Aria's Virtualizer; a `DataTable` is a React Aria table (a `grid`) over TanStack Table's data model; a `DataTable` column with `value` sorts by type with missing values last both ways and draws a placeholder (`missing`, default an en dash); `InfiniteList` loads the next page on approach, with a skeleton for it, a Try again row when it fails and a Show more button for the keyboard, and `scroll="page"` draws a grid that scrolls with the page; `LoadMore` is that next-page row for any list or grid; charts label values directly; `LineChart` can also follow an app's position (`current`), read a value at the pointer or by arrow keys (`readout`, one slider whose value text is the reading), report a picked x (`onPick`) and fill one flat area (`area`); `xLabel` names the x column of its table |
|
|
130
|
-
| Compare | `Compare`, `PairVote`, `PairJudge`, `CompareAudio`, `CompareText`, `CompareGrid`, `ViewportFrame`, `useViewport`, `FullscreenFrame`, `useDifference`, `differences` | Two pictures judged together: side by side, swipe (a divider that moves from the keyboard), fade, blink (`x` flips) and difference (a live difference blend with amplify, or pixelmatch's changed pixels with a tolerance and the share that differ; pixels are read only when that view is open, at most 2048 px on the long side, and a picture the browser will not let the page read says so in words); `CompareGrid` is every candidate at once with the same zoom and full screen, and `actions` for what a tile offers; one zoom and pan for both sides (buttons, `+` `-` `0`, Ctrl-wheel or trackpad pinch, drag, arrow keys, double click, `1:1`), and full screen (the browser's Fullscreen API, a modal where there is none). `blind` is required: a blind comparison names pictures by `label` only and never writes the variant `id`, `note` or `alt`. A picture that fails shows the required `missing` words in its place; the keys come from one `Shortcut[]` shared with `KeysLegend`, and `keys={false}` leaves them to a surrounding screen. `PairVote` wraps `Compare` for a blind pairwise judgment: answer keys `a` `b` `t` `s` in Compare's one legend, a vote bar with no filled button, `pending`, a flag menu, a progress line, preload and Undo. `CompareAudio` is one transport for two clips with an A/B switch that keeps the playhead (same time, or the same share when the lengths differ), a loop range and loudness matching (the louder clip turned down to the quieter, by RMS); `CompareText` is two texts scrolled together with a word diff and an optional reference; `PairJudge` is the answering around any of them; `CompareVideo` is two videos on one clock (play, pause, seek and speed drive both, the follower kept within a frame, both held while either waits for data) in side by side, swipe, fade and blink, with zoom and pan locked and nearest-neighbour pixels past 1:1, candidates of different sizes drawn in one box, one soundtrack (`audio`), and the same slots as the rest. Frame by frame (`,` `.`), a loop range the app can hold (`i` `o` `c`), speeds down to 0.1 and named `moments` are in it; the
|
|
130
|
+
| Compare | `Compare`, `PairVote`, `PairJudge`, `CompareAudio`, `CompareText`, `CompareGrid`, `CompareVideoGrid`, `ViewportFrame`, `useViewport`, `FullscreenFrame`, `useDifference`, `differences` | Two pictures judged together: side by side, swipe (a divider that moves from the keyboard), fade, blink (`x` flips) and difference (a live difference blend with amplify, or pixelmatch's changed pixels with a tolerance and the share that differ; pixels are read only when that view is open, at most 2048 px on the long side, and a picture the browser will not let the page read says so in words); `CompareGrid` is every candidate at once with the same zoom and full screen, and `actions` for what a tile offers; one zoom and pan for both sides (buttons, `+` `-` `0`, Ctrl-wheel or trackpad pinch, drag, arrow keys, double click, `1:1`), and full screen (the browser's Fullscreen API, a modal where there is none). `blind` is required: a blind comparison names pictures by `label` only and never writes the variant `id`, `note` or `alt`. A picture that fails shows the required `missing` words in its place; the keys come from one `Shortcut[]` shared with `KeysLegend`, and `keys={false}` leaves them to a surrounding screen. `PairVote` wraps `Compare` for a blind pairwise judgment: answer keys `a` `b` `t` `s` in Compare's one legend, a vote bar with no filled button, `pending`, a flag menu, a progress line, preload and Undo. `CompareAudio` is one transport for two clips with an A/B switch that keeps the playhead (same time, or the same share when the lengths differ), a loop range and loudness matching (the louder clip turned down to the quieter, by RMS); `CompareText` is two texts scrolled together with a word diff and an optional reference; `PairJudge` is the answering around any of them; `CompareVideo` is two videos on one clock (play, pause, seek and speed drive both, the follower kept within a frame, both held while either waits for data) in side by side, swipe, fade and blink, with zoom and pan locked and nearest-neighbour pixels past 1:1, candidates of different sizes drawn in one box, one soundtrack (`audio`), and the same slots as the rest. Frame by frame (`,` `.`), a loop range the app can hold (`i` `o` `c`), speeds down to 0.1 and named `moments` are in it; `CompareVideoGrid` is every candidate's video at once on that one clock (one transport, one zoom, regions, a loop, stepping), light on the browser (metadata only until the first play, cells out of sight paused and left out of the sync, sound off unless `audio` names a cell, a cell that falls behind marked "Catching up"), with an optional `reference` drawn first, never blind and nearest-neighbour. `regions` (on `Compare`, `CompareVideo` and `CompareGrid`) names boxes in the source's coordinates to look at enlarged: chips, keys `q` `w` `e` `r` `y` `u`, nearest-neighbour drawing, the box outlined while its chip is pointed at, and Shift-drag to make another |
|
|
131
131
|
| Selection | `useSelection`, `BulkBar`, `SelectableGrid`, `DataTable`'s `selection` (`RowSelection<T>`) | Opt-in checkbox column with "Select all shown" that respects `isSelectable`; Shift-click or Shift+Space chooses or clears the run from the last row clicked, in the order shown; `initial` (keys or a test on the row) chooses a row the first time it appears, so it applies to data that loads later; the selection drops rows that are gone; `BulkBar` announces the count politely, and while it is up its one filled action is the view's only one (the screen's primary goes to `outline`); `SelectableGrid` is the same selection as a grid of pictures (`renderImage`), each tile one labelled target, virtualised from 100 tiles |
|
|
132
132
|
| Expansion | `Disclosure`, `useExpanded`, `DataTable`'s `expansion` (`RowExpansion<T>`) | Show more of one row in place. The toggle is a button with `aria-expanded`; the body is mounted only while open, so a request inside it runs on first open (unlike `<details>`, which mounts every closed body); `useExpanded({ param })` shares the open keys across a list or table and keeps them in the URL; a table's detail row spans the data columns and is measured when virtualised |
|
|
133
133
|
| Data loading | `StrataQueryProvider`, `createQueryClient`, `useLoad`, `useInfiniteLoad`, `useJob`, `toLoad`, `staleOf`, `fetchJson`, `HttpError`, `readErrorBody`, `fieldErrorsOf` | TanStack Query in, `Load<T>` out; a refetch that fails after a good read stays `ready` with `stale` set, never an error panel; `useInfiniteLoad` works out the cursor itself (after the last item held), merges pages by key and can `dismiss` an item at once; `useJob` polls a job's status only while it runs and invalidates the queries it changes once, when it ends; `fetchJson` reads an error response's body onto the `HttpError` (`body`, `reason`, `fieldErrors`, read by `readErrorBody` or the API's own `readError`) |
|
|
@@ -144,7 +144,7 @@ strata-react is ESM-only (`exports` has only `import`), as is its peer `react-ro
|
|
|
144
144
|
| Notices and progress | `Alert`, `toast`, `StrataToastRegion`, `useClientWork`, `JobStatus` | Three weights. A `toast` confirms finished work and goes by itself (5 s plus 40 ms a character, 8 s minimum with an action, paused under the pointer or focus, always dismissable); it has no danger tone, because an error a person must act on is an inline `Alert` with its recovery as `action` (`announce` makes it `role="alert"` only when it answers something the person just did). `StrataToastRegion` goes once at the app root. `useClientWork` runs browser work with progress, cancel (aborts its `signal`, ends `cancelled`, never `failed`) and a double-start guard; `JobStatus` shows it exactly as it shows a server job, with `onCancel`, `cancelled` and `onDismiss` |
|
|
145
145
|
| Media player | `MediaPlayer`, `useMediaElement`, `SPEECH_RATES` | Play a file or a sequence of chapters without the event glue: the element, its state, Strata's controls (or the browser's own on a touch device, `controls="auto"`), a load error with Try again, `navigator.mediaSession` metadata, the seek bar spanning the whole sequence. `useMediaElement(ref)` alone follows an element drawn with the browser's controls |
|
|
146
146
|
| Media playback | `Transport`, `SeekBar`, `TimeReadout`, `VolumeControl`, `RateChoice`, `MediaStage`, `StageGuides`, `transportShortcuts`, `format.timecode` | The controls around anything that plays, wired to a player the app owns (HTML media, Web Audio, a canvas, a data replay). Every control is a named icon button in one toolbar; the play button's name is "Play" or "Pause". `SeekBar` has the formatted time as its accessible value, arrows step 5 s and Page keys 30 s by default, and optional marks. `VolumeControl` shows its percent, and muting remembers the level. `transportShortcuts` is the one list for `useHotkeys` and `KeysLegend` (Space and K, J and L, the arrows by a frame, Home and End). `format.timecode` prints m:ss, m:ss.mmm or m:ss:ff. `MediaStage` fits a picture of any aspect ratio into the pane with a letterbox on the sunken surface role, and takes overlays such as `StageGuides` |
|
|
147
|
-
| Maps | `strata-react/map`: `RouteMap`; `geo`, `LatLng` (main entry) | Routes and a position that moves along them, on Leaflet (no react-leaflet), behind its own entry. Tiles are the app's (`tiles.light`, `tiles.dark`, each with its attribution); the dark scheme uses the dark set or a filter over the light one. Route colours are roles resolved at draw time; `values` with `colourScale` colour a route by value in runs of one step, with a key that names the steps; a single route gets direction chevrons and start/finish marks (a loop is one mark). The position is one marker moved with `setLatLng`: no route is redrawn for it (keep `routes` stable). Leaflet's keyboard pan and zoom stay; the map is named by `label` and described by a generated text alternative (routes, lengths, position along). Overlay slots `topEnd` and `bottomStart` avoid Leaflet's own controls and attribution. Leaflet's stylesheet is injected once, so an app imports nothing. `geo` (distance, bearing, bounds, `pointAlong`, `arrows`, `ends`) and `format.distance` need no map library |
|
|
147
|
+
| Maps | `strata-react/map`: `RouteMap`; `geo`, `LatLng` (main entry) | Routes and a position that moves along them, on Leaflet (no react-leaflet), behind its own entry. Tiles are the app's (`tiles.light`, `tiles.dark`, each with its attribution); the dark scheme uses the dark set or a filter over the light one. Route colours are roles resolved at draw time; `values` with `colourScale` colour a route by value in runs of one step, with a key that names the steps; a single route gets direction chevrons and start/finish marks (a loop is one mark). The position is one marker moved with `setLatLng`: no route is redrawn for it (keep `routes` stable). As picture content (a route inset over footage): `zoom` sets any zoom (animate it per frame), `follow="centre"` holds the view exactly on a position with no animation (a frame is deterministic), and `positions` draws several, each tied to a route, in its colour and named in the text alternative; routes are not redrawn for any of it. Leaflet's keyboard pan and zoom stay; the map is named by `label` and described by a generated text alternative (routes, lengths, position along). Overlay slots `topEnd` and `bottomStart` avoid Leaflet's own controls and attribution. Leaflet's stylesheet is injected once, so an app imports nothing. `geo` (distance, bearing, bounds, `pointAlong`, `arrows`, `ends`) and `format.distance` need no map library |
|
|
148
148
|
| Timeline | `Timeline`, `useTimelineZoom`, `TimelineZoomControls`, `noOverlap` | Items with a start and a length in lanes on a zoomable time axis, for media edits, bookings, rotas and plans. The timeline draws and the app decides: every move, trim, lane change, selection and current-time change is reported (`onItemChange`, `onSelect`, `onPositionChange`) and the app applies it; `validate` refuses a change with a reason shown in words while it is made. One tab stop for the items; arrows move between them, Ctrl+arrows nudge and change lane, Alt+arrows trim, the current time is its own slider, `+` `-` `0` zoom, and each change is announced ("run-02.mp4 moved to 0:13"). The ruler picks steps people write on a scale so labels never collide. Lanes take drops from outside (`dropTypes`, `onDrop` with the lane and snapped time, `validateDrop`, and React Aria's keyboard drag landing at the current time), `laneRows` makes them taller, `kindColours` fixes each kind's stripe, and the header column fits its content. Only items near the view are rendered |
|
|
149
149
|
| Sortable list | `SortableList` | Reorder a list and move items between lists, by pointer and by keyboard. React Aria's `GridList` with `useDragAndDrop` (no `@dnd-kit`): a grip per row is the drag handle, so clicking a row selects it and its own actions still work; Enter on the grip picks up, arrows and Tab choose a position or list, Enter drops, Escape cancels, with React Aria's screen-reader announcements. Items carry a kind (`getKind`); a list takes the kinds in `accepts` and says why it refuses another (`refuses`, shown with an icon while that kind is dragged over it). The list never changes the data: `onReorder` and `onInsert` report the move and the app applies it, undoably |
|
|
150
150
|
| File intake | `FileButton`, `FileDropZone`, `FileOutcomes`, `MissingFile`, `useFileIntake` | Pick or drop local files, then one outcome per file. `FileButton` is React Aria's `FileTrigger` behind a real named button (the keyboard and phone route); `FileDropZone` is its `DropZone` and says what it takes while a drag is over it. `useFileIntake({ accept, acceptLabel, process })` judges each file after the drop, so a wrong one is named with its reason (type, `maxBytes`, your `check`), runs your own `process` per file (a throw becomes `Failed` with its message and a retry), and never blocks the rest. `FileOutcomes` draws the rows and announces one summary per batch. `MissingFile` is a status word and a "Relink" that opens the picker for that item; the name wraps in a narrow pane and a `thumbnail` can lead it. Nothing assumes a server |
|
|
@@ -44,4 +44,6 @@ export declare function FullscreenButton({ full, setFull }: {
|
|
|
44
44
|
full: boolean;
|
|
45
45
|
setFull: (f: boolean) => void;
|
|
46
46
|
}): React.JSX.Element;
|
|
47
|
+
/** The width of an element, kept current: for "is this shown larger than its own pixels". */
|
|
48
|
+
export declare function useWidth(ref: React.RefObject<HTMLElement | null>): number;
|
|
47
49
|
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Region } from '../lib/viewport';
|
|
2
|
+
import { Candidate, VideoMedia } from './compare';
|
|
3
|
+
import { Shortcut } from './hotkeys';
|
|
4
|
+
import { VideoLoop } from './video-clock';
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
/** Props for `CompareVideoGrid`. */
|
|
7
|
+
export type CompareVideoGridProps = {
|
|
8
|
+
/** Names the grid for screen readers: "Five upscales of this clip". Required. */
|
|
9
|
+
label: string;
|
|
10
|
+
items: readonly Candidate<VideoMedia>[];
|
|
11
|
+
/** The source clip, drawn first and never blind, scaled up nearest-neighbour. Give its `label` ("Source"); its `note` shows. */
|
|
12
|
+
reference?: Candidate<VideoMedia>;
|
|
13
|
+
/** Whether the person must not learn which variant is which: cells are named by label only. Required, no default. */
|
|
14
|
+
blind: boolean;
|
|
15
|
+
/** The words shown where a video could not be loaded. Required. */
|
|
16
|
+
missing: string;
|
|
17
|
+
/** The words under a cell that has fallen behind the clock. Default "Catching up". */
|
|
18
|
+
catchingUp?: string;
|
|
19
|
+
/** What goes under a cell's caption: a button to compare it, a choice, a flag. */
|
|
20
|
+
actions?: (item: Candidate<VideoMedia>) => React.ReactNode;
|
|
21
|
+
/** Cells per row at full width. Default 3. A narrow screen uses fewer. */
|
|
22
|
+
columns?: 2 | 3 | 4;
|
|
23
|
+
/** Named boxes to look at enlarged in every cell at once, as in `Compare`. */
|
|
24
|
+
regions?: readonly Region[];
|
|
25
|
+
/** Speeds offered. Default 0.1 to 2. */
|
|
26
|
+
rates?: readonly number[];
|
|
27
|
+
/** Moments the app names, drawn on the seek bar; pressing one goes there and pauses. */
|
|
28
|
+
moments?: readonly {
|
|
29
|
+
time: number;
|
|
30
|
+
label: string;
|
|
31
|
+
}[];
|
|
32
|
+
/** The looped range in seconds; give it with `onLoopChange` to keep it when the item changes. */
|
|
33
|
+
loop?: VideoLoop;
|
|
34
|
+
onLoopChange?: (loop: VideoLoop) => void;
|
|
35
|
+
/** The `id` of the cell whose sound is heard. Default none: eight soundtracks at once are noise. */
|
|
36
|
+
audio?: string | null;
|
|
37
|
+
/** Draw nearest-neighbour when a video is shown larger than its own pixels (`zoomed`, default), always, or never. */
|
|
38
|
+
pixelated?: "zoomed" | "always" | "never";
|
|
39
|
+
/** Bind the keys on the window. Default true. */
|
|
40
|
+
keys?: boolean;
|
|
41
|
+
/** Shortcuts of the surrounding screen, bound with these and listed first in the same legend. */
|
|
42
|
+
extraShortcuts?: Shortcut[];
|
|
43
|
+
/** Drawn under the transport, above the legend. */
|
|
44
|
+
footer?: React.ReactNode;
|
|
45
|
+
className?: string;
|
|
46
|
+
};
|
|
47
|
+
/** Many videos in a grid on one clock, zoomed and panned together, with regions, a loop, stepping and full screen. */
|
|
48
|
+
export declare function CompareVideoGrid({ label, items, reference, blind, missing, catchingUp, actions, columns, regions, rates, moments, loop, onLoopChange, audio, pixelated, keys, extraShortcuts, footer, className }: CompareVideoGridProps): React.JSX.Element;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { Shortcut } from './hotkeys';
|
|
2
2
|
import { Candidate, CompareMode, VideoMedia } from './compare';
|
|
3
|
+
import { VideoLoop } from './video-clock';
|
|
3
4
|
import { Region } from '../lib/viewport';
|
|
4
5
|
import * as React from "react";
|
|
5
6
|
/** The views a pair of videos has: pictures' views without the difference, which needs pixels. */
|
|
6
7
|
export type VideoMode = Exclude<CompareMode, "difference">;
|
|
7
|
-
|
|
8
|
-
export type VideoLoop = {
|
|
9
|
-
start: number | null;
|
|
10
|
-
end: number | null;
|
|
11
|
-
};
|
|
8
|
+
export type { VideoLoop };
|
|
12
9
|
/** Props for `CompareVideo`. */
|
|
13
10
|
export type CompareVideoProps = {
|
|
14
11
|
/** Names the comparison for screen readers. Required. */
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
};
|
|
19
|
+
/** The clock and everything a transport needs. */
|
|
20
|
+
export type VideoClock = ReturnType<typeof useVideoClock>;
|
|
21
|
+
/** Plays, pauses, seeks, steps and loops any number of videos together. */
|
|
22
|
+
export declare function useVideoClock({ fps, loop: loopProp, onLoopChange, audio }: VideoClockOptions): {
|
|
23
|
+
attach: (index: number) => (el: HTMLVideoElement | null) => void;
|
|
24
|
+
restore: (e: React.SyntheticEvent<HTMLVideoElement>) => void;
|
|
25
|
+
wanted: boolean;
|
|
26
|
+
started: boolean;
|
|
27
|
+
play: () => void;
|
|
28
|
+
pause: () => void;
|
|
29
|
+
toggle: () => void;
|
|
30
|
+
seek: (time: number) => void;
|
|
31
|
+
step: (direction: 1 | -1) => void;
|
|
32
|
+
setRate: (rate: number) => void;
|
|
33
|
+
time: number;
|
|
34
|
+
rate: number;
|
|
35
|
+
buffered: number;
|
|
36
|
+
duration: number | null;
|
|
37
|
+
loaded: boolean;
|
|
38
|
+
failed: boolean;
|
|
39
|
+
loop: VideoLoop;
|
|
40
|
+
looping: boolean;
|
|
41
|
+
setPoint: (point: "start" | "end") => void;
|
|
42
|
+
clearLoop: () => void;
|
|
43
|
+
volume: number;
|
|
44
|
+
muted: boolean;
|
|
45
|
+
setVolume: (v: number) => void;
|
|
46
|
+
behind: ReadonlySet<number>;
|
|
47
|
+
setVisible: (index: number, visible: boolean) => void;
|
|
48
|
+
shortcuts: () => Shortcut[];
|
|
49
|
+
hasAudio: boolean;
|
|
50
|
+
fps: number;
|
|
51
|
+
};
|
|
52
|
+
/** The transport row (play, step, time, seek bar with moments and the loop's ends, speed, volume) and the loop row, for a clock. */
|
|
53
|
+
export declare function VideoControls({ clock, rates, moments }: {
|
|
54
|
+
clock: VideoClock;
|
|
55
|
+
rates?: readonly number[];
|
|
56
|
+
moments?: readonly {
|
|
57
|
+
time: number;
|
|
58
|
+
label: string;
|
|
59
|
+
}[];
|
|
60
|
+
}): React.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ export { FullscreenFrame, canFullscreen, type FullscreenFrameProps } from './com
|
|
|
67
67
|
export { FIT, MIN_SCALE, MAX_SCALE, clampViewport, zoomAt, actualPixelsScale, regionShares, boxViewport, type Viewport, type Region, type ShareBox } from './lib/viewport';
|
|
68
68
|
export { PairVote, PairJudge, type PairVoteProps, type PairJudgeProps, type PairVoteSlot, type PairVoteWords, type PairAnswer, type Pair } from './components/pair-vote';
|
|
69
69
|
export { CompareAudio, type CompareAudioProps } from './components/compare-audio';
|
|
70
|
+
export { CompareVideoGrid, type CompareVideoGridProps } from './components/compare-video-grid';
|
|
70
71
|
export { CompareVideo, type CompareVideoProps, type VideoMode, type VideoLoop } from './components/compare-video';
|
|
71
72
|
export { CompareText, type CompareTextProps } from './components/compare-text';
|
|
72
73
|
export { diffWords, type TextDifference, type TextSegment } from './lib/text-diff';
|