strata-react 1.3.12 → 1.3.14
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/auto-recorder.d.ts +67 -0
- package/dist/components/link.d.ts +3 -1
- package/dist/components/media-player.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +295 -9
- package/dist/index.js.map +1 -1
- package/dist/lib/segmenter.d.ts +40 -0
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/microphone.d.ts +16 -1
- package/dist/testing.js +22 -3
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -167,13 +167,13 @@ thousands of lines. Such an app imports the same stylesheet **without the reset*
|
|
|
167
167
|
| History and save state | `useHistory`, `useHistoryState`, `History`, `useAutoSave`, `SaveStatus`, `SaveState`, `useLeaveGuard` | Undo and redo for a document edited over a session: a step is a name and an `undo`/`redo` pair, `begin(label)` groups a drag into one step, a `key` merges a slider's pushes, a `limit` drops the oldest. `history.commands` are Undo and Redo as `Command`s ("Undo move clip", Mod+Z, Mod+Shift+Z or Mod+Y) for `useCommands` and `Menu`. `useAutoSave` debounces and never overlaps saves; `SaveStatus` is the fixed-width sign ("Saved 10:42", "Saving…", "Unsaved changes", "Not saved" with the reason and "Try again"), quiet except for a failure and its recovery. For one removal that commits after a few seconds, use `useUndoable` |
|
|
168
168
|
| Links and URL choices | `ButtonLink`, `TextLink`, `useSearchParam`, `NativeSelect param=`, `ChoiceGroup param=`, `ToggleGroup param=` | `ButtonLink` is a link (`to` for a route, `href` for a download) drawn as a `Button` with its variants; it sets `data-variant`, so `variant="default"` is the view's one filled button for `expectOneFilledButton()`. `TextLink` is the house in-app link. Both are React Aria links with React Router navigation. A filter or choice a person would link to is `useSearchParam("mode", { default, parse })` (the default is never written, an invalid value reads as the default, other params are kept, history is replaced), or `param=` on the three controls, as `Tabs` does |
|
|
169
169
|
| Speech | `speak`, `useSpeech`, `SayAgain`, `ClipsProvider`, `useClips`, `useSayOnShow`, `canSay`, `textOf`, `installFakeSpeech` (`strata-react/testing`) | The browser's `speechSynthesis` with the voice picked by language once voices have loaded, what is being said cancelled by the next prompt, a slightly slow default rate, and nothing where there is no speech or the person muted it. Recorded prompts (`speak(parts)`, `SayAgain parts=`): each part's clip plays in order, and the browser's voice says the words when a part has no clip or one fails (one voice per prompt). `SayAgain`'s name is the sentence it says. `installFakeSpeech()` records what was said and which clips played in a test (`clips()`, `finish()`, `failClip()`) . `ClipsProvider load=` reads the app's clip list once (a record of line text to URL, read again only when `clipsQueryKey` is invalidated); `useClips()` gives `ready`, `parts(text)`, `say(text)` and `words(text)` (`split` cuts a prompt into lines, `describe` words a line that has no clip), `useSayOnShow(text)` says a prompt once the list has arrived or failed, and `SayAgain` inside the provider needs no `parts` or `lang`; outside it, the browser's voice alone |
|
|
170
|
-
| Recording | `useRecorder`, `InputLevel`, `TakeLevel`, `MicrophoneContext`, `encodeWav`, `fakeMicrophone` (`strata-react/testing`) | One take of speech from the microphone as a lossless 16-bit PCM WAV (an AudioWorklet, not MediaRecorder, which only writes compressed audio), with the browser's echo cancellation, noise suppression and gain off. `start()` resolves with the take when it stops, by `stop()` or at `maxSeconds`. `InputLevel` is the live peak in dBFS with a "Too loud" notch at -3; `TakeLevel` judges the finished take for speech in words. The device comes from `MicrophoneContext`, so tests pass `renderWithStrata(ui, { microphone: fakeMicrophone() })`. The microphone needs a secure page (https or localhost); the refusals read as sentences |
|
|
170
|
+
| Recording | `useRecorder`, `useAutoRecorder`, `InputLevel`, `ListeningLevel`, `TakeLevel`, `MicrophoneContext`, `encodeWav`, `createSegmenter`, `fakeMicrophone`, `speechScript` (`strata-react/testing`) | One take of speech from the microphone as a lossless 16-bit PCM WAV (an AudioWorklet, not MediaRecorder, which only writes compressed audio), with the browser's echo cancellation, noise suppression and gain off. `start()` resolves with the take when it stops, by `stop()` or at `maxSeconds`. `InputLevel` is the live peak in dBFS with a "Too loud" notch at -3; `TakeLevel` judges the finished take for speech in words. The device comes from `MicrophoneContext`, so tests pass `renderWithStrata(ui, { microphone: fakeMicrophone() })`. The microphone needs a secure page (https or localhost); the refusals read as sentences. Hands-free: `useAutoRecorder({ maxSeconds, onTake, paused })` keeps the microphone open and hands over each stretch of speech as its own take (`AutoTake`, `cut` when it ran past `maxSeconds`), cut by `createSegmenter` (20 ms frames against the room's measured quiet: 12 dB to start, 1 s of quiet to end, 0.3 s kept either side, under 0.3 s of speech dropped); `ListeningLevel` says whether it is waiting, hearing a take or paused, with the room's level. `fakeMicrophone({ script: speechScript(n), loop })` reads with gaps |
|
|
171
171
|
| Toolbar and toggles | `Toolbar`, `ToolbarSeparator`, `Toggle`, `ToggleGroup`, `Switch` | A toolbar is one tab stop with arrows, Home and End inside; needs a `label`. `Toggle` (`aria-pressed`) and `ToggleGroup` (one of 2 to 7, always one chosen) show chosen as an ink border on a tint, never the filled primary, so they do not break the one-filled-button rule; an icon-only toggle still needs its `label` (shown as a tooltip). `Switch` is only for a setting that applies at once, label and control one target |
|
|
172
172
|
| Commands | `Command`, `useCommands`, `Menu`, `ContextMenu`, `CommandMenu`, `CommandLegend`, `formatChord`, `matchesChord` | A command is declared once (label or label function, chords, `disabled` with a reason, `destructive`, `checked`) and drives the key handler, dropdown and menu-bar menus, the context menu, the searchable command menu (Mod+K) and the legend, so they cannot disagree. Chords are written once ("Mod+Shift+Z") and shown per platform (⇧⌘Z, Ctrl+Shift+Z); they never fire while typing or during IME composition, and a chord the browser keeps (Ctrl+S) needs `claim: true`. `useHotkeys` is unchanged for single keys |
|
|
173
173
|
| Overlays | `Dialog`, `DialogProps`, `AlertDialog`, `Popover`, `Tooltip` | React Aria underneath. A dialog always has a title and, via `actions`'s close render prop, a way out; `closable={false}` while work cannot stop; `placement="end"` is a sheet. `AlertDialog` is the only confirm: required verb on the confirm button, Cancel focused first, no outside dismiss, stays open with the reason when an async confirm fails. `Popover` needs a `label`. `Tooltip` opens on hover and focus and `IconButton` uses it. All portal onto the `layer-*` stacking utilities |
|
|
174
174
|
| Value controls | `NumberField`, `Slider`, `ColorField`, `SecretField` | Set a number or colour precisely, inside `Field`. `NumberField` and `Slider` are React Aria's; the number field runs with `commitBehavior="validate"`, so a typed value outside `min`/`max` is kept on screen, explained in the `Field` ("Enter a value from 0% to 500%.") and never passed to `onChange`. A value that is not known is `null` and shows an en dash, never 0 or NaN. Digits and decimal mark follow `locale`. The unit sits inside the control, and in the slider's spoken value when `Intl` has it (%, °, ms, s, kB, MB, GB, kbps, Mbps). Arrows step, Home/End jump to the limits; `Slider editable` adds a number field. `ColorField`: platform picker, typed hex that is normalised, app suggestions, and a contrast note against `against`. No motion on value changes. `NumberField` options for a value set a little at a time or that costs work to change: `nudge={[0.1, 1, 10]}` (a toolbar of named step buttons that repeat when held and stop at the limits), `suggestion={{ value, label, reason }}` (a row with the reason in words and Use this value, never applied by itself) and `preview` (changes wait behind Apply and Revert; `onChange` is Apply's). `SecretField` is a credential the server keeps and never shows again: not set, set (no characters, no length, no input in the DOM), a masked entry with a Show toggle named for what it reveals, `onSave` through `AsyncButton`, Replace, a confirmed Remove that says what stops working, and a Test whose result is text beside it; a set, untouched field reports nothing |
|
|
175
175
|
| 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` |
|
|
176
|
-
| Media player | `MediaPlayer`, `useMediaElement`, `SPEECH_RATES`, `useMediaSpans`, `SpanActions`, `PlayerNotice`, `SpanStrip` | 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 `spans` and `spanKinds` mark stretches (an intro, a recap, a sponsor read) on the seek bar as named ranges in a status role's tone and act on them as playback reaches them: `auto` skips (or mutes, for `action: "mute"`) with "Skipped intro" and Undo, `ask` offers a Skip button over the picture and on the `s` key, `off` only draws; each is acted on once, `onSpan` reports `skipped`, `muted`, `undone` or `played`, and `SeekBar` takes `spans` too. `mediaRef` hands out the player's state and requests (an object ref holds the latest, no render of its own), `overlay` draws the app's own thing over the picture only, `heading` (title, subtitle, avatar, each a link) is drawn across the top of a video while paused or the pointer moves, and a video keeps a 16:9 (or `aspect`) box before its metadata loads. A video has a Full screen button and the `f` key by default (`fullscreen={false}` removes them); on the picture a click plays or pauses, a double click toggles full screen and the wheel sets the volume while the player has focus. A kind's `colour` names a custom property of the app's theme (`"--seg-sponsor"`) instead of a tone, each range carries `data-kind`, and under the browser's own controls a `SpanStrip` under the picture draws the ranges. `start` begins a first load at a time (an attacher's `startAt`, or a seek once the metadata is in) and says "Picked up at 2:05" with Start over (`resumeWords`); `onProgress` reports the position and the seconds actually played through, each once, a skipped span counted (`useMediaElement` takes it too, with `markWatched`). The HLS attacher starts a `growing` source at its beginning, honours `config.startPosition` and takes `words` for its failures. |
|
|
176
|
+
| Media player | `MediaPlayer`, `useMediaElement`, `SPEECH_RATES`, `useMediaSpans`, `SpanActions`, `PlayerNotice`, `SpanStrip` | 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 `spans` and `spanKinds` mark stretches (an intro, a recap, a sponsor read) on the seek bar as named ranges in a status role's tone and act on them as playback reaches them: `auto` skips (or mutes, for `action: "mute"`) with "Skipped intro" and Undo, `ask` offers a Skip button over the picture and on the `s` key, `off` only draws; each is acted on once, `onSpan` reports `skipped`, `muted`, `undone` or `played`, and `SeekBar` takes `spans` too. `mediaRef` hands out the player's state and requests (an object ref holds the latest, no render of its own), `overlay` draws the app's own thing over the picture only, `heading` (title, subtitle, avatar, each a link, with the app's router `state`) is drawn across the top of a video while paused or the pointer moves, and a video keeps a 16:9 (or `aspect`) box before its metadata loads. A video has a Full screen button and the `f` key by default (`fullscreen={false}` removes them); on the picture a click plays or pauses, a double click toggles full screen and the wheel sets the volume while the player has focus. A kind's `colour` names a custom property of the app's theme (`"--seg-sponsor"`) instead of a tone, each range carries `data-kind`, and under the browser's own controls a `SpanStrip` under the picture draws the ranges. `start` begins a first load at a time (an attacher's `startAt`, or a seek once the metadata is in) and says "Picked up at 2:05" with Start over (`resumeWords`); `onProgress` reports the position and the seconds actually played through, each once, a skipped span counted (`useMediaElement` takes it too, with `markWatched`). The HLS attacher starts a `growing` source at its beginning, honours `config.startPosition` and takes `words` for its failures. |
|
|
177
177
|
| 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` |
|
|
178
178
|
| Listening and reading | `Waveform`, `TranscriptView`, `PlayWindowButton`, `MediaGroup`, `FilmStrip`; `resamplePeaks`, `peaksFromAudio`, `peakGain`, `phraseAt`, `wordAt`, `pickEvenly`, `frameAt` | Timed media: a waveform from peaks or a decoded file (one slider, marks by line style, named spans, zoom, a keyboard-made range, a spectrogram underlay, `normalise` to draw quiet sound to fill the height and say by how much); `FilmStrip` is a row of frames from a stretch of video that fits its width (picked evenly), each with its time, pressing one seeks (`onSeek`, one tab stop with arrow keys), and the frame at `time` inside `span` is ringed; timed text that marks the heard word and plays from any word (modes, speakers, follow and Jump to now, virtualised), with doubtful words (dotted, named, counted, "Only doubtful"), a mark per phrase set from a row menu (`states`, `onPhraseState`), correction in place (Enter or F2, `onEdit`) and a hover and focus card (`renderCard`); `MediaPlayer window` plays one stretch of a file, `MediaGroup` lets one player play at a time, `PlayWindowButton` is a row's play control on a shared element; a review transcript needs no player (`time` and `onSeek` are optional), takes `marking` (words become `MarkableText` marks with ids `wordId(phraseId, index)`, selected across rows that are not mounted) and shows a corrected word (`word.correction`) dotted with the original on hover and `onCorrectionPress` to open it |
|
|
179
179
|
| Streams | `MediaPlayer attach`/`growing`, `useAttachedSource`, `attachHls` (`strata-react/hls`) | A source the element cannot play is attached by an engine; a source still being made says so, shows what exists as ready, and waits at its end without ending |
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Microphone } from '../lib/microphone';
|
|
2
|
+
import { SegmenterOptions } from '../lib/segmenter';
|
|
3
|
+
import { Recording } from './recorder';
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
/** Where an auto recorder is: idle, opening the device, listening (and hearing a take or not), or refused. */
|
|
6
|
+
export type AutoRecorderState = {
|
|
7
|
+
phase: "idle";
|
|
8
|
+
} | {
|
|
9
|
+
phase: "opening";
|
|
10
|
+
} | {
|
|
11
|
+
phase: "listening";
|
|
12
|
+
/** The live peak in dBFS. */
|
|
13
|
+
level: number;
|
|
14
|
+
/** The room's quiet in dBFS (RMS), or null before the first chunk. */
|
|
15
|
+
noise: number | null;
|
|
16
|
+
/** True while a take is being heard. */
|
|
17
|
+
speaking: boolean;
|
|
18
|
+
/** How long the take being heard has run, 0 when none. */
|
|
19
|
+
seconds: number;
|
|
20
|
+
/** True while `paused`: the microphone is open but nothing is taken. */
|
|
21
|
+
paused: boolean;
|
|
22
|
+
} | {
|
|
23
|
+
phase: "failed";
|
|
24
|
+
reason: string;
|
|
25
|
+
};
|
|
26
|
+
/** A take cut from a microphone that is always open. */
|
|
27
|
+
export type AutoTake = Recording & {
|
|
28
|
+
/** True when the speaker was still talking at `maxSeconds` and the take was cut there. */
|
|
29
|
+
cut: boolean;
|
|
30
|
+
};
|
|
31
|
+
/** `useAutoRecorder`'s options: the segmenter's (`SegmenterOptions`) plus these. */
|
|
32
|
+
export type UseAutoRecorderOptions = Omit<SegmenterOptions, "maxSeconds"> & {
|
|
33
|
+
/** The longest take, in seconds: a longer stretch of speech is cut there (`AutoTake.cut`). */
|
|
34
|
+
maxSeconds: number;
|
|
35
|
+
/** Called with each take as it ends. */
|
|
36
|
+
onTake: (take: AutoTake) => void;
|
|
37
|
+
/** Keep the microphone open but take nothing. */
|
|
38
|
+
paused?: boolean;
|
|
39
|
+
/** The microphone to listen to; `useMicrophone()` (the nearest `MicrophoneContext`) when left out. */
|
|
40
|
+
microphone?: Microphone;
|
|
41
|
+
};
|
|
42
|
+
/** What `useAutoRecorder` returns. */
|
|
43
|
+
export type AutoRecorder = {
|
|
44
|
+
state: AutoRecorderState;
|
|
45
|
+
/** Opens the microphone and listens until `stop`; resolves false when it would not open or is already open. */
|
|
46
|
+
start: () => Promise<boolean>;
|
|
47
|
+
/** Closes the microphone, handing over a take being heard if it has enough speech. */
|
|
48
|
+
stop: () => void;
|
|
49
|
+
/** True while opening or listening. */
|
|
50
|
+
listening: boolean;
|
|
51
|
+
};
|
|
52
|
+
/** Listens all the time and hands over each stretch of speech as its own lossless take. */
|
|
53
|
+
export declare function useAutoRecorder({ maxSeconds, onTake, paused, microphone, ...tuning }: UseAutoRecorderOptions): AutoRecorder;
|
|
54
|
+
/** `ListeningLevel`'s props. */
|
|
55
|
+
export type ListeningLevelProps = {
|
|
56
|
+
/** The recorder's state while listening. */
|
|
57
|
+
state: Extract<AutoRecorderState, {
|
|
58
|
+
phase: "listening";
|
|
59
|
+
}>;
|
|
60
|
+
/** The longest take, said beside a take's running time. */
|
|
61
|
+
maxSeconds: number;
|
|
62
|
+
/** The meter's name. Default "Input level". */
|
|
63
|
+
label?: string;
|
|
64
|
+
className?: string;
|
|
65
|
+
};
|
|
66
|
+
/** The live level of a microphone that is always open, with what it is doing in words: waiting, hearing a take, or paused. */
|
|
67
|
+
export declare function ListeningLevel({ state, maxSeconds, label, className }: ListeningLevelProps): React.JSX.Element;
|
|
@@ -21,6 +21,8 @@ type BaseProps = {
|
|
|
21
21
|
"aria-label"?: string;
|
|
22
22
|
id?: string;
|
|
23
23
|
onPress?: ButtonProps["onPress"];
|
|
24
|
+
/** React Router's location state for a `to` link (where the person came from, read on the next page with `useLocation().state`). */
|
|
25
|
+
state?: unknown;
|
|
24
26
|
};
|
|
25
27
|
/** Props of `ButtonLink`. */
|
|
26
28
|
export type ButtonLinkProps = BaseProps & Target & {
|
|
@@ -32,7 +34,7 @@ export type ButtonLinkProps = BaseProps & Target & {
|
|
|
32
34
|
export type TextLinkProps = BaseProps & Target & {
|
|
33
35
|
icon?: IconComponent;
|
|
34
36
|
};
|
|
35
|
-
export declare function useTarget(target: Target, newTab: boolean | undefined): {
|
|
37
|
+
export declare function useTarget(target: Target, newTab: boolean | undefined, state?: unknown): {
|
|
36
38
|
provide: (node: React.ReactNode) => React.JSX.Element;
|
|
37
39
|
props: {
|
|
38
40
|
href: string;
|
|
@@ -149,6 +149,8 @@ export type MediaHeading = {
|
|
|
149
149
|
subtitle?: string;
|
|
150
150
|
/** An app route the subtitle leads to, and the picture with it when there is a subtitle to name that link. */
|
|
151
151
|
subtitleTo?: string;
|
|
152
|
+
/** React Router's location state the heading's links carry (where the person came from, for the next page to read). */
|
|
153
|
+
state?: unknown;
|
|
152
154
|
/** A small round picture before the words (the maker's avatar). `null` draws the subtitle's first letter instead. */
|
|
153
155
|
avatar?: string | null;
|
|
154
156
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -91,6 +91,8 @@ export { SayAgain, type SayAgainProps } from './components/say-again';
|
|
|
91
91
|
export { browserMicrophone, explainMicrophoneError, MicrophoneContext, MicrophoneError, useMicrophone, type Microphone, type MicrophoneStream, } from './lib/microphone';
|
|
92
92
|
export { LEVEL_FLOOR_DB, joinSamples, encodeWav, peakDb, speechLevel, type SpeechLevel } from './lib/recording';
|
|
93
93
|
export { useRecorder, InputLevel, TakeLevel, inputLevelThresholds, type Recorder, type RecorderState, type Recording, type UseRecorderOptions, type InputLevelProps, type TakeLevelProps, } from './components/recorder';
|
|
94
|
+
export { createSegmenter, rmsDb, type Segment, type Segmenter, type SegmenterOptions } from './lib/segmenter';
|
|
95
|
+
export { useAutoRecorder, ListeningLevel, type AutoRecorder, type AutoRecorderState, type AutoTake, type UseAutoRecorderOptions, type ListeningLevelProps, } from './components/auto-recorder';
|
|
94
96
|
export { ButtonLink, TextLink, type ButtonLinkProps, type TextLinkProps } from './components/link';
|
|
95
97
|
export { Compare, type CompareProps, type CompareMode, type Candidate, type ImageMedia, type AudioMedia, type TextMedia, type VideoMedia } from './components/compare';
|
|
96
98
|
export { ViewportFrame, useViewport, type ViewportFrameProps, type ViewportState } from './components/viewport';
|
package/dist/index.js
CHANGED
|
@@ -3755,11 +3755,11 @@ function createWatchedRanges() {
|
|
|
3755
3755
|
};
|
|
3756
3756
|
}
|
|
3757
3757
|
// src/components/link.tsx
|
|
3758
|
-
function useTarget(target, newTab) {
|
|
3758
|
+
function useTarget(target, newTab, state) {
|
|
3759
3759
|
const navigate = useNavigate();
|
|
3760
3760
|
return {
|
|
3761
3761
|
provide: (node) => /* @__PURE__ */ jsx(RouterProvider, {
|
|
3762
|
-
navigate: (to) => void navigate(to),
|
|
3762
|
+
navigate: (to) => void navigate(to, state === void 0 ? void 0 : { state }),
|
|
3763
3763
|
useHref,
|
|
3764
3764
|
children: node
|
|
3765
3765
|
}),
|
|
@@ -3775,12 +3775,12 @@ function useTarget(target, newTab) {
|
|
|
3775
3775
|
* A link drawn as a `Button` (React Router `to`, or `href` for a download or another site): the same variants and heights, `variant="default"` is the filled one and counts for the one-filled-button rule (`data-variant` is set).
|
|
3776
3776
|
*/
|
|
3777
3777
|
function ButtonLink(all) {
|
|
3778
|
-
const { to, href, download, newTab, variant, size, icon: Icon, className, children, ...rest } = all;
|
|
3778
|
+
const { to, href, download, newTab, state, variant, size, icon: Icon, className, children, ...rest } = all;
|
|
3779
3779
|
const { provide, props } = useTarget({
|
|
3780
3780
|
to,
|
|
3781
3781
|
href,
|
|
3782
3782
|
download
|
|
3783
|
-
}, newTab);
|
|
3783
|
+
}, newTab, state);
|
|
3784
3784
|
return provide(/* @__PURE__ */ jsxs(Link, {
|
|
3785
3785
|
...rest,
|
|
3786
3786
|
...props,
|
|
@@ -3799,12 +3799,12 @@ function ButtonLink(all) {
|
|
|
3799
3799
|
* The house in-app link: accent ink, underlined, for a sentence, a table cell or an empty state's next step. `to` for a route, `href` for a file or another site.
|
|
3800
3800
|
*/
|
|
3801
3801
|
function TextLink(all) {
|
|
3802
|
-
const { to, href, download, newTab, icon: Icon, className, children, ...rest } = all;
|
|
3802
|
+
const { to, href, download, newTab, state, icon: Icon, className, children, ...rest } = all;
|
|
3803
3803
|
const { provide, props } = useTarget({
|
|
3804
3804
|
to,
|
|
3805
3805
|
href,
|
|
3806
3806
|
download
|
|
3807
|
-
}, newTab);
|
|
3807
|
+
}, newTab, state);
|
|
3808
3808
|
return provide(/* @__PURE__ */ jsxs(Link, {
|
|
3809
3809
|
...rest,
|
|
3810
3810
|
...props,
|
|
@@ -4910,6 +4910,7 @@ function PictureHeading({ heading, shown }) {
|
|
|
4910
4910
|
"data-shown": shown || void 0,
|
|
4911
4911
|
className: cn("picture-shade pointer-events-none absolute inset-x-0 top-0 flex items-center gap-3 px-4 pt-3 pb-10 transition-state", shown ? "opacity-100" : "opacity-0 has-[:focus-visible]:opacity-100 has-[:focus-visible]:[&_a]:pointer-events-auto"),
|
|
4912
4912
|
children: [avatar && (heading.subtitleTo && heading.subtitle ? /* @__PURE__ */ jsx(HeadingLink, {
|
|
4913
|
+
state: heading.state,
|
|
4913
4914
|
to: heading.subtitleTo,
|
|
4914
4915
|
className: cn("shrink-0 rounded-pill", shown && "pointer-events-auto"),
|
|
4915
4916
|
label: heading.subtitle,
|
|
@@ -4917,6 +4918,7 @@ function PictureHeading({ heading, shown }) {
|
|
|
4917
4918
|
}) : avatar), /* @__PURE__ */ jsxs("div", {
|
|
4918
4919
|
className: "grid min-w-0",
|
|
4919
4920
|
children: [heading.to ? /* @__PURE__ */ jsx(HeadingLink, {
|
|
4921
|
+
state: heading.state,
|
|
4920
4922
|
to: heading.to,
|
|
4921
4923
|
className: cn("type-heading", link),
|
|
4922
4924
|
children: heading.title
|
|
@@ -4924,6 +4926,7 @@ function PictureHeading({ heading, shown }) {
|
|
|
4924
4926
|
className: "type-heading truncate",
|
|
4925
4927
|
children: heading.title
|
|
4926
4928
|
}), heading.subtitle && (heading.subtitleTo ? /* @__PURE__ */ jsx(HeadingLink, {
|
|
4929
|
+
state: heading.state,
|
|
4927
4930
|
to: heading.subtitleTo,
|
|
4928
4931
|
className: cn("type-body-sm", link),
|
|
4929
4932
|
children: heading.subtitle
|
|
@@ -4934,8 +4937,8 @@ function PictureHeading({ heading, shown }) {
|
|
|
4934
4937
|
})]
|
|
4935
4938
|
});
|
|
4936
4939
|
}
|
|
4937
|
-
function HeadingLink({ to, className, label, children }) {
|
|
4938
|
-
const { provide, props } = useTarget({ to }, false);
|
|
4940
|
+
function HeadingLink({ to, state, className, label, children }) {
|
|
4941
|
+
const { provide, props } = useTarget({ to }, false, state);
|
|
4939
4942
|
return provide(/* @__PURE__ */ jsx(Link, {
|
|
4940
4943
|
...props,
|
|
4941
4944
|
"aria-label": label,
|
|
@@ -12594,6 +12597,289 @@ function TakeLevel({ peak, lead, className }) {
|
|
|
12594
12597
|
})]
|
|
12595
12598
|
});
|
|
12596
12599
|
}
|
|
12600
|
+
// src/lib/segmenter.ts
|
|
12601
|
+
var FRAME_SECONDS = .02;
|
|
12602
|
+
var ONSET_FRAMES = 3;
|
|
12603
|
+
var HYSTERESIS_DB = 6;
|
|
12604
|
+
var RISE_DB_PER_SECOND = 2.5;
|
|
12605
|
+
var FALL = .2;
|
|
12606
|
+
var SILENT_DB = -100;
|
|
12607
|
+
/** The RMS of `frame` in dBFS, `SILENT_DB` for zeros. */
|
|
12608
|
+
function rmsDb(frame) {
|
|
12609
|
+
let sum = 0;
|
|
12610
|
+
for (let i = 0; i < frame.length; i++) sum += frame[i] * frame[i];
|
|
12611
|
+
const rms = Math.sqrt(sum / Math.max(1, frame.length));
|
|
12612
|
+
return rms > 0 ? Math.max(SILENT_DB, 20 * Math.log10(rms)) : SILENT_DB;
|
|
12613
|
+
}
|
|
12614
|
+
/** A segmenter for a stream at `sampleRate`. */
|
|
12615
|
+
function createSegmenter(sampleRate, { onsetDb = 12, floorDb = -55, silenceSeconds = 1, padSeconds = .3, minSpeechSeconds = .3, maxSeconds } = {}) {
|
|
12616
|
+
const frameLength = Math.max(1, Math.round(sampleRate * FRAME_SECONDS));
|
|
12617
|
+
const frames = (seconds) => Math.max(0, Math.round(seconds / FRAME_SECONDS));
|
|
12618
|
+
const padFrames = frames(padSeconds);
|
|
12619
|
+
const silenceFrames = Math.max(1, frames(silenceSeconds));
|
|
12620
|
+
const minSpeechFrames = frames(minSpeechSeconds);
|
|
12621
|
+
const maxSamples = maxSeconds === void 0 ? Infinity : Math.floor(maxSeconds * sampleRate);
|
|
12622
|
+
const rise = RISE_DB_PER_SECOND * FRAME_SECONDS;
|
|
12623
|
+
let carry = new Float32Array(frameLength);
|
|
12624
|
+
let carried = 0;
|
|
12625
|
+
const recent = [];
|
|
12626
|
+
const recentSize = padFrames + ONSET_FRAMES;
|
|
12627
|
+
let noise = null;
|
|
12628
|
+
let loudRun = 0;
|
|
12629
|
+
let take = null;
|
|
12630
|
+
let lastSpeech = 0;
|
|
12631
|
+
let speechFrames = 0;
|
|
12632
|
+
let hush = 0;
|
|
12633
|
+
const join = (parts, length) => {
|
|
12634
|
+
const out = new Float32Array(length);
|
|
12635
|
+
let at = 0;
|
|
12636
|
+
for (const p of parts) {
|
|
12637
|
+
if (at >= length) break;
|
|
12638
|
+
const n = Math.min(p.length, length - at);
|
|
12639
|
+
out.set(n < p.length ? p.subarray(0, n) : p, at);
|
|
12640
|
+
at += n;
|
|
12641
|
+
}
|
|
12642
|
+
return out;
|
|
12643
|
+
};
|
|
12644
|
+
const length = (parts) => parts.length * frameLength;
|
|
12645
|
+
const end = () => {
|
|
12646
|
+
const t = take;
|
|
12647
|
+
const spoke = speechFrames;
|
|
12648
|
+
take = null;
|
|
12649
|
+
speechFrames = 0;
|
|
12650
|
+
if (!t || spoke < minSpeechFrames) return null;
|
|
12651
|
+
const keep = Math.min(t.length, lastSpeech + padFrames);
|
|
12652
|
+
return {
|
|
12653
|
+
samples: join(t, Math.min(keep * frameLength, maxSamples)),
|
|
12654
|
+
cut: false
|
|
12655
|
+
};
|
|
12656
|
+
};
|
|
12657
|
+
const frame = (f) => {
|
|
12658
|
+
const db = rmsDb(f);
|
|
12659
|
+
const quiet = noise ?? db;
|
|
12660
|
+
const on = Math.max(quiet + onsetDb, floorDb);
|
|
12661
|
+
const still = Math.max(quiet + onsetDb - HYSTERESIS_DB, floorDb - HYSTERESIS_DB);
|
|
12662
|
+
recent.push(f);
|
|
12663
|
+
if (recent.length > recentSize) recent.shift();
|
|
12664
|
+
if (take) {
|
|
12665
|
+
take.push(f);
|
|
12666
|
+
if (db >= still) {
|
|
12667
|
+
lastSpeech = take.length;
|
|
12668
|
+
speechFrames++;
|
|
12669
|
+
}
|
|
12670
|
+
if (lastSpeech * frameLength >= maxSamples) {
|
|
12671
|
+
const t = take;
|
|
12672
|
+
take = null;
|
|
12673
|
+
speechFrames = 0;
|
|
12674
|
+
hush = silenceFrames;
|
|
12675
|
+
loudRun = 0;
|
|
12676
|
+
return {
|
|
12677
|
+
samples: join(t, maxSamples),
|
|
12678
|
+
cut: true
|
|
12679
|
+
};
|
|
12680
|
+
}
|
|
12681
|
+
return take.length - lastSpeech >= silenceFrames ? end() : null;
|
|
12682
|
+
}
|
|
12683
|
+
if (db < on) {
|
|
12684
|
+
noise = db < quiet ? quiet + (db - quiet) * FALL : Math.min(db, quiet + rise);
|
|
12685
|
+
loudRun = 0;
|
|
12686
|
+
if (hush > 0) hush--;
|
|
12687
|
+
return null;
|
|
12688
|
+
}
|
|
12689
|
+
if (hush > 0) {
|
|
12690
|
+
hush = silenceFrames;
|
|
12691
|
+
return null;
|
|
12692
|
+
}
|
|
12693
|
+
loudRun++;
|
|
12694
|
+
if (loudRun < ONSET_FRAMES) return null;
|
|
12695
|
+
take = [...recent];
|
|
12696
|
+
lastSpeech = take.length;
|
|
12697
|
+
speechFrames = ONSET_FRAMES;
|
|
12698
|
+
loudRun = 0;
|
|
12699
|
+
return null;
|
|
12700
|
+
};
|
|
12701
|
+
return {
|
|
12702
|
+
push(chunk) {
|
|
12703
|
+
const out = [];
|
|
12704
|
+
let at = 0;
|
|
12705
|
+
while (at < chunk.length) {
|
|
12706
|
+
const n = Math.min(frameLength - carried, chunk.length - at);
|
|
12707
|
+
carry.set(chunk.subarray(at, at + n), carried);
|
|
12708
|
+
carried += n;
|
|
12709
|
+
at += n;
|
|
12710
|
+
if (carried === frameLength) {
|
|
12711
|
+
const f = carry;
|
|
12712
|
+
carry = new Float32Array(frameLength);
|
|
12713
|
+
carried = 0;
|
|
12714
|
+
const s = frame(f);
|
|
12715
|
+
if (s) out.push(s);
|
|
12716
|
+
}
|
|
12717
|
+
}
|
|
12718
|
+
return out;
|
|
12719
|
+
},
|
|
12720
|
+
flush() {
|
|
12721
|
+
hush = 0;
|
|
12722
|
+
return end();
|
|
12723
|
+
},
|
|
12724
|
+
reset() {
|
|
12725
|
+
take = null;
|
|
12726
|
+
speechFrames = 0;
|
|
12727
|
+
loudRun = 0;
|
|
12728
|
+
hush = 0;
|
|
12729
|
+
recent.length = 0;
|
|
12730
|
+
},
|
|
12731
|
+
get noise() {
|
|
12732
|
+
return noise === null ? null : Math.max(-60, noise);
|
|
12733
|
+
},
|
|
12734
|
+
get speaking() {
|
|
12735
|
+
return take !== null;
|
|
12736
|
+
},
|
|
12737
|
+
get seconds() {
|
|
12738
|
+
return take ? length(take) / sampleRate : 0;
|
|
12739
|
+
}
|
|
12740
|
+
};
|
|
12741
|
+
}
|
|
12742
|
+
// src/components/auto-recorder.tsx
|
|
12743
|
+
/** Listens all the time and hands over each stretch of speech as its own lossless take. */
|
|
12744
|
+
function useAutoRecorder({ maxSeconds, onTake, paused = false, microphone, ...tuning }) {
|
|
12745
|
+
const fromContext = useMicrophone();
|
|
12746
|
+
const device = microphone ?? fromContext;
|
|
12747
|
+
const [state, setState] = React.useState({ phase: "idle" });
|
|
12748
|
+
const stream = React.useRef(null);
|
|
12749
|
+
const segmenter = React.useRef(null);
|
|
12750
|
+
const latest = React.useRef({
|
|
12751
|
+
onTake,
|
|
12752
|
+
paused,
|
|
12753
|
+
maxSeconds,
|
|
12754
|
+
tuning
|
|
12755
|
+
});
|
|
12756
|
+
latest.current = {
|
|
12757
|
+
onTake,
|
|
12758
|
+
paused,
|
|
12759
|
+
maxSeconds,
|
|
12760
|
+
tuning
|
|
12761
|
+
};
|
|
12762
|
+
const mounted = React.useRef(true);
|
|
12763
|
+
const opening = React.useRef(false);
|
|
12764
|
+
const hand = React.useCallback((samples, cut, s) => {
|
|
12765
|
+
latest.current.onTake({
|
|
12766
|
+
samples,
|
|
12767
|
+
sampleRate: s.sampleRate,
|
|
12768
|
+
wav: encodeWav(samples, s.sampleRate),
|
|
12769
|
+
seconds: samples.length / s.sampleRate,
|
|
12770
|
+
peak: peakDb(samples),
|
|
12771
|
+
device: s.device,
|
|
12772
|
+
cut
|
|
12773
|
+
});
|
|
12774
|
+
}, []);
|
|
12775
|
+
const flush = React.useCallback(() => {
|
|
12776
|
+
const s = stream.current;
|
|
12777
|
+
const taken = segmenter.current?.flush();
|
|
12778
|
+
if (s && taken) hand(taken.samples, taken.cut, s);
|
|
12779
|
+
}, [hand]);
|
|
12780
|
+
const stop = React.useCallback(() => {
|
|
12781
|
+
const s = stream.current;
|
|
12782
|
+
if (!s) return;
|
|
12783
|
+
flush();
|
|
12784
|
+
stream.current = null;
|
|
12785
|
+
segmenter.current = null;
|
|
12786
|
+
s.close();
|
|
12787
|
+
setState({ phase: "idle" });
|
|
12788
|
+
}, [flush]);
|
|
12789
|
+
const start = React.useCallback(async () => {
|
|
12790
|
+
if (stream.current || opening.current) return false;
|
|
12791
|
+
opening.current = true;
|
|
12792
|
+
setState({ phase: "opening" });
|
|
12793
|
+
let recent = [];
|
|
12794
|
+
let opened;
|
|
12795
|
+
try {
|
|
12796
|
+
opened = await device.open((chunk) => {
|
|
12797
|
+
const s = stream.current;
|
|
12798
|
+
const seg = segmenter.current;
|
|
12799
|
+
if (!s || !seg) return;
|
|
12800
|
+
recent = [...recent.slice(-4), peakDb(chunk)];
|
|
12801
|
+
const quiet = latest.current.paused;
|
|
12802
|
+
if (!quiet) for (const taken of seg.push(chunk)) hand(taken.samples, taken.cut, s);
|
|
12803
|
+
setState({
|
|
12804
|
+
phase: "listening",
|
|
12805
|
+
level: Math.max(...recent),
|
|
12806
|
+
noise: seg.noise,
|
|
12807
|
+
speaking: !quiet && seg.speaking,
|
|
12808
|
+
seconds: quiet ? 0 : seg.seconds,
|
|
12809
|
+
paused: quiet
|
|
12810
|
+
});
|
|
12811
|
+
});
|
|
12812
|
+
} catch (e) {
|
|
12813
|
+
opening.current = false;
|
|
12814
|
+
setState({
|
|
12815
|
+
phase: "failed",
|
|
12816
|
+
reason: e instanceof MicrophoneError ? e.message : `The microphone could not be opened (${String(e)}).`
|
|
12817
|
+
});
|
|
12818
|
+
return false;
|
|
12819
|
+
}
|
|
12820
|
+
opening.current = false;
|
|
12821
|
+
if (!mounted.current) {
|
|
12822
|
+
opened.close();
|
|
12823
|
+
return false;
|
|
12824
|
+
}
|
|
12825
|
+
const { maxSeconds: max, tuning: t } = latest.current;
|
|
12826
|
+
segmenter.current = createSegmenter(opened.sampleRate, {
|
|
12827
|
+
...t,
|
|
12828
|
+
maxSeconds: max
|
|
12829
|
+
});
|
|
12830
|
+
stream.current = opened;
|
|
12831
|
+
const quiet = latest.current.paused;
|
|
12832
|
+
setState({
|
|
12833
|
+
phase: "listening",
|
|
12834
|
+
level: -60,
|
|
12835
|
+
noise: null,
|
|
12836
|
+
speaking: false,
|
|
12837
|
+
seconds: 0,
|
|
12838
|
+
paused: quiet
|
|
12839
|
+
});
|
|
12840
|
+
return true;
|
|
12841
|
+
}, [device, hand]);
|
|
12842
|
+
React.useEffect(() => {
|
|
12843
|
+
if (paused) flush();
|
|
12844
|
+
else segmenter.current?.reset();
|
|
12845
|
+
setState((now) => now.phase === "listening" ? {
|
|
12846
|
+
...now,
|
|
12847
|
+
paused,
|
|
12848
|
+
speaking: false,
|
|
12849
|
+
seconds: 0
|
|
12850
|
+
} : now);
|
|
12851
|
+
}, [paused, flush]);
|
|
12852
|
+
React.useEffect(() => {
|
|
12853
|
+
mounted.current = true;
|
|
12854
|
+
return () => {
|
|
12855
|
+
mounted.current = false;
|
|
12856
|
+
stream.current?.close();
|
|
12857
|
+
stream.current = null;
|
|
12858
|
+
segmenter.current = null;
|
|
12859
|
+
};
|
|
12860
|
+
}, []);
|
|
12861
|
+
return {
|
|
12862
|
+
state,
|
|
12863
|
+
start,
|
|
12864
|
+
stop,
|
|
12865
|
+
listening: state.phase === "listening" || state.phase === "opening"
|
|
12866
|
+
};
|
|
12867
|
+
}
|
|
12868
|
+
/** The live level of a microphone that is always open, with what it is doing in words: waiting, hearing a take, or paused. */
|
|
12869
|
+
function ListeningLevel({ state, maxSeconds, label = "Input level", className }) {
|
|
12870
|
+
const db = Math.min(0, Math.max(-60, state.level));
|
|
12871
|
+
const room = state.noise === null ? "" : `; the room is at ${format.integer(Math.round(state.noise) || 0)} dBFS`;
|
|
12872
|
+
const detail = state.paused ? `Paused: nothing is kept until you resume${room}` : state.speaking ? `Hearing you: ${format.runningTime(state.seconds)} of at most ${format.runningTime(maxSeconds)}` : `Listening: start speaking to record${room}`;
|
|
12873
|
+
return /* @__PURE__ */ jsx(Meter, {
|
|
12874
|
+
label,
|
|
12875
|
+
value: db - -60,
|
|
12876
|
+
max: 60,
|
|
12877
|
+
thresholds: inputLevelThresholds,
|
|
12878
|
+
valueText: `${format.integer(Math.round(db) || 0)} dBFS`,
|
|
12879
|
+
detail,
|
|
12880
|
+
className
|
|
12881
|
+
});
|
|
12882
|
+
}
|
|
12597
12883
|
// src/lib/image-diff.ts
|
|
12598
12884
|
/** The longest side, in pixels, a picture is compared at. */
|
|
12599
12885
|
var MAX_SIDE = 2048;
|
|
@@ -18213,6 +18499,6 @@ function FolderPicker({ label, useFolders: useListing, value, onChange, onChoose
|
|
|
18213
18499
|
]
|
|
18214
18500
|
});
|
|
18215
18501
|
}
|
|
18216
|
-
export { ActiveList, Alert, AlertDialog, AppShell, AsyncButton, BookViewer, BoxList, BoxOverlay, Breadcrumb, BulkBar, Button, ButtonLink, COLOR_SCHEME_STORAGE_KEY, Checkbox, ChoiceGrid, ChoiceGridSkeleton, ChoiceGroup, ClipsProvider, ColorField, ColorSchemeChoice, CommandLegend, CommandMenu, Compare, CompareAudio, CompareGrid, CompareText, CompareVideo, CompareVideoGrid, Composer, CompositionBar, ContextMenu, Conversation, CursorScope, DEFAULT_TOLERANCE, DataTable, DataView$1 as DataView, Density, Dialog, Disclosure, Done, DragSource, EmptyState, FIT, Field, FileButton, FileDropZone, FileOutcomes, FilmStrip, FolderPicker, FullscreenFrame, HttpError, IconButton, InfiniteList, Input, InputLevel, Inspector, InspectorSection, JobStatus, JobsTable, KeysLegend, LEVEL_FLOOR_DB, Lightbox, LineChart, LineChartGroup, LinkCard, LinkCardList, LoadError, LoadMore, MAX_SCALE, MAX_SIDE, MIN_SCALE, MISSING, Mark, MarkSummary, MarkableText, MediaGroup, MediaPlayer, MediaStage, Menu, Meter, Metric, MetricStrip, MicrophoneContext, MicrophoneError, MissingFile, NBSP, NativeSelect, NumberField, OutboxStatus, PageHeader, PairJudge, PairVote, Pane, PlaceBoard, PlayWindowButton, PlayerNotice, Popover, PropertyList, PropertyRow, RateChoice, RegionEditor, RichText, RowAction, SPEECH_RATES, STRATA_DRAG_TYPE, SaveStatus, SayAgain, SecretField, SeekBar, SelectableGrid, SelectableGridSkeleton, SequenceTimeline, SideNav, Skeleton, Slider, SortableList, SpanActions, SpanStrip, Split, StageGuides, StaleNotice, Status, StrataQueryProvider, StrataToastRegion, Switch, TableSkeleton, Tabs, TakeLevel, TextLink, Textarea, ThemeProvider, Thumbnail, ThumbnailSkeleton, TileGrid, TileGridSkeleton, TimeReadout, Timeline, TimelineZoomControls, Toggle, ToggleGroup, Toolbar, ToolbarSeparator, Tooltip, TranscriptView, Transport, Tree, UndoBar, ViewOptions, ViewportFrame, VirtualList, VolumeControl, Waveform, WorkflowSteps, Workspace, actualPixelsScale, ancestorsOf, apiPage, appBase, boxViewport, browserMicrophone, buttonVariants, canFullscreen, canPlayClips, canSay, canSpeak, clampToRoom, clampViewport, clipsQueryKey, cn, colorSchemeScript, commandShortcut, countMarks, createApi, createFormat, createOutbox, createQueryClient, createReserve, createTypedApi, crossedThreshold, describeActionError, describeHttpError, describeRegion, detectPlatform, diffWords, differences, drawRect, ease, encodeWav, errorPayload, explainMicrophoneError, fetchJson, fieldErrorsOf, findPage, fitRect, format, formatChord, frameAt, gainToVolume, geo, gridPoints, gutterOf, inputLevelThresholds, isDoubtful, isRefusal, isReservedChord, isTaskRunning, isTypingTarget, isWorkflowRunning, jobProgressText, joinMediaGroup, joinRects, joinSamples, labelOf, lerpRect, logScale, loudnessOf, matchEntities, matchGains, matchesAccept, matchesChord, measureLoudness, moveGutter, moveRect, noOverlap, normaliseAngle, pageName, parentOf, parseChord, parseInline, parseRichText, parseSort, peakDb, peakGain, peaksFromAudio, phraseAt, phraseDoubtful, phraseOfWordId, pickEvenly, pickVoice, plainText, rangeBetween, readErrorBody, readPixels, readingOrder, regionShares, resample, resamplePeaks, resizeRect, safeHref, sayPosition, serialiseSort, settleCut, snapToGrid, sortRows, speak, speechLevel, splitRect, staleOf, stepId, stepOnGrid, stopSpeaking, textOf, tickLabel, tickStep, ticksBetween, toDate, toLoad, toPeakPair, toast, toastTimeout, transportShortcuts, turnRect, turnedSize, typeSteps, useActiveItem, useAsyncAction, useAttachedSource, useAutoSave, useBookUrl, useBoxes, useChoices, useClientWork, useClips, useColorScheme, useCommands, useDifference, useExpanded, useFileIntake, useHistory, useHistoryState, useHotkeys, useInView, useInfiniteLoad, useJob, useJobAction, useLeaveGuard, useLightboxUrl, useLoad, useMediaElement, useMediaSpans, useMicrophone, useOutbox, useOutboxStarted, usePlayerWarnings, useRecorder, useReserve, useSayOnShow, useSearchParam, useSelection, useSharedCursor, useSpeech, useSystemColorScheme, useTimelineZoom, useUndoable, useViewOptions, useViewport, useWorkflowRun, useWorkspaceState, valueAt, viewOf, viewsOf, withBase, wordAt, wordId, zoomAt, zoomToBox };
|
|
18502
|
+
export { ActiveList, Alert, AlertDialog, AppShell, AsyncButton, BookViewer, BoxList, BoxOverlay, Breadcrumb, BulkBar, Button, ButtonLink, COLOR_SCHEME_STORAGE_KEY, Checkbox, ChoiceGrid, ChoiceGridSkeleton, ChoiceGroup, ClipsProvider, ColorField, ColorSchemeChoice, CommandLegend, CommandMenu, Compare, CompareAudio, CompareGrid, CompareText, CompareVideo, CompareVideoGrid, Composer, CompositionBar, ContextMenu, Conversation, CursorScope, DEFAULT_TOLERANCE, DataTable, DataView$1 as DataView, Density, Dialog, Disclosure, Done, DragSource, EmptyState, FIT, Field, FileButton, FileDropZone, FileOutcomes, FilmStrip, FolderPicker, FullscreenFrame, HttpError, IconButton, InfiniteList, Input, InputLevel, Inspector, InspectorSection, JobStatus, JobsTable, KeysLegend, LEVEL_FLOOR_DB, Lightbox, LineChart, LineChartGroup, LinkCard, LinkCardList, ListeningLevel, LoadError, LoadMore, MAX_SCALE, MAX_SIDE, MIN_SCALE, MISSING, Mark, MarkSummary, MarkableText, MediaGroup, MediaPlayer, MediaStage, Menu, Meter, Metric, MetricStrip, MicrophoneContext, MicrophoneError, MissingFile, NBSP, NativeSelect, NumberField, OutboxStatus, PageHeader, PairJudge, PairVote, Pane, PlaceBoard, PlayWindowButton, PlayerNotice, Popover, PropertyList, PropertyRow, RateChoice, RegionEditor, RichText, RowAction, SPEECH_RATES, STRATA_DRAG_TYPE, SaveStatus, SayAgain, SecretField, SeekBar, SelectableGrid, SelectableGridSkeleton, SequenceTimeline, SideNav, Skeleton, Slider, SortableList, SpanActions, SpanStrip, Split, StageGuides, StaleNotice, Status, StrataQueryProvider, StrataToastRegion, Switch, TableSkeleton, Tabs, TakeLevel, TextLink, Textarea, ThemeProvider, Thumbnail, ThumbnailSkeleton, TileGrid, TileGridSkeleton, TimeReadout, Timeline, TimelineZoomControls, Toggle, ToggleGroup, Toolbar, ToolbarSeparator, Tooltip, TranscriptView, Transport, Tree, UndoBar, ViewOptions, ViewportFrame, VirtualList, VolumeControl, Waveform, WorkflowSteps, Workspace, actualPixelsScale, ancestorsOf, apiPage, appBase, boxViewport, browserMicrophone, buttonVariants, canFullscreen, canPlayClips, canSay, canSpeak, clampToRoom, clampViewport, clipsQueryKey, cn, colorSchemeScript, commandShortcut, countMarks, createApi, createFormat, createOutbox, createQueryClient, createReserve, createSegmenter, createTypedApi, crossedThreshold, describeActionError, describeHttpError, describeRegion, detectPlatform, diffWords, differences, drawRect, ease, encodeWav, errorPayload, explainMicrophoneError, fetchJson, fieldErrorsOf, findPage, fitRect, format, formatChord, frameAt, gainToVolume, geo, gridPoints, gutterOf, inputLevelThresholds, isDoubtful, isRefusal, isReservedChord, isTaskRunning, isTypingTarget, isWorkflowRunning, jobProgressText, joinMediaGroup, joinRects, joinSamples, labelOf, lerpRect, logScale, loudnessOf, matchEntities, matchGains, matchesAccept, matchesChord, measureLoudness, moveGutter, moveRect, noOverlap, normaliseAngle, pageName, parentOf, parseChord, parseInline, parseRichText, parseSort, peakDb, peakGain, peaksFromAudio, phraseAt, phraseDoubtful, phraseOfWordId, pickEvenly, pickVoice, plainText, rangeBetween, readErrorBody, readPixels, readingOrder, regionShares, resample, resamplePeaks, resizeRect, rmsDb, safeHref, sayPosition, serialiseSort, settleCut, snapToGrid, sortRows, speak, speechLevel, splitRect, staleOf, stepId, stepOnGrid, stopSpeaking, textOf, tickLabel, tickStep, ticksBetween, toDate, toLoad, toPeakPair, toast, toastTimeout, transportShortcuts, turnRect, turnedSize, typeSteps, useActiveItem, useAsyncAction, useAttachedSource, useAutoRecorder, useAutoSave, useBookUrl, useBoxes, useChoices, useClientWork, useClips, useColorScheme, useCommands, useDifference, useExpanded, useFileIntake, useHistory, useHistoryState, useHotkeys, useInView, useInfiniteLoad, useJob, useJobAction, useLeaveGuard, useLightboxUrl, useLoad, useMediaElement, useMediaSpans, useMicrophone, useOutbox, useOutboxStarted, usePlayerWarnings, useRecorder, useReserve, useSayOnShow, useSearchParam, useSelection, useSharedCursor, useSpeech, useSystemColorScheme, useTimelineZoom, useUndoable, useViewOptions, useViewport, useWorkflowRun, useWorkspaceState, valueAt, viewOf, viewsOf, withBase, wordAt, wordId, zoomAt, zoomToBox };
|
|
18217
18503
|
|
|
18218
18504
|
//# sourceMappingURL=index.js.map
|