@bendyline/squisq-editor-react 2.4.5 → 2.4.6
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 +8 -1
- package/dist/{chunk-PEI5EBEN.js → chunk-4F7SN6WU.js} +1 -1
- package/dist/{chunk-7OKWPWEQ.js → chunk-55DQFHK5.js} +184 -48
- package/dist/{chunk-V6Z7GG55.js → chunk-IQFPX2CE.js} +1 -1
- package/dist/{chunk-WLJ623UZ.js → chunk-K2WJYVS4.js} +7 -6
- package/dist/{chunk-PDCKJCOS.js → chunk-OWOKKZAU.js} +43 -11
- package/dist/{chunk-WDX6UDL5.js → chunk-YPRX32GY.js} +1 -1
- package/dist/{chunk-PKGBWNUQ.js → chunk-ZSQN6IO7.js} +1061 -141
- package/dist/index.d.ts +7 -9
- package/dist/index.js +21 -7
- package/dist/json-editor/index.js +2 -2
- package/dist/recorder/index.d.ts +2 -2
- package/dist/recorder/index.js +17 -3
- package/dist/{recorder-C0Tkyu5W.d.ts → recorder-CnOKlYY3.d.ts} +96 -202
- package/dist/shell/index.js +5 -5
- package/dist/teleprompter/index.d.ts +2 -2
- package/dist/teleprompter/index.js +2 -2
- package/dist/useNarrationStage-Bk3mdW75.d.ts +560 -0
- package/package.json +4 -4
- package/dist/useNarrationStage-Bqo18PBw.d.ts +0 -313
package/dist/index.d.ts
CHANGED
|
@@ -22,9 +22,9 @@ import { PluginKey } from '@tiptap/pm/state';
|
|
|
22
22
|
import { Node } from '@tiptap/pm/model';
|
|
23
23
|
import { RenderResult } from 'mermaid';
|
|
24
24
|
export { JsonEditor, JsonEditorProps } from './json-editor/index.js';
|
|
25
|
-
export { C as CameraStreamOptions,
|
|
25
|
+
export { C as CameraStreamOptions, D as DEFAULT_RECORDER_DEVICE_SETTINGS, R as RecordedBookmark, a as RecorderAudioDeviceSettings, b as RecorderButton, c as RecorderButtonProps, d as RecorderCameraDeviceSettings, e as RecorderCameraSaveResult, f as RecorderColorScheme, g as RecorderConstraintMode, h as RecorderDeviceSettings, i as RecorderDeviceSettingsPanel, j as RecorderDeviceSettingsPanelProps, k as RecorderEncodingSettings, l as RecorderModal, m as RecorderModalProps, n as RecorderNarrationOptions, o as RecorderPanel, p as RecorderPanelProps, q as RecorderSaveResult, r as RecorderScreenAudioSettings, s as RecorderScreenDeviceSettings, S as ScreenStreamHandle, t as ScreenStreamOptions, T as TimingJson, u as buildRecorderAudioConstraints, v as buildRecorderCameraConstraints, w as buildRecorderScreenAudioConstraints, x as buildRecorderScreenConstraints, y as buildTimingJson, z as encodeTimingJson, A as recorderBitsPerSecond, B as requestCameraStream, E as requestMicStream, F as requestScreenStream, G as timingPathFor, H as useStreamPreview } from './recorder-CnOKlYY3.js';
|
|
26
|
+
export { C as CanvasSink, a as CaptureKind, D as DEFAULT_TELEPROMPTER_PREFS, F as FloatOpenOptions, b as FloatTier, c as FloatingWindowHandle, d as FloatingWindowManager, M as MicAnalysisHandle, e as MicAnalysisStatus, N as NarrationRecorderController, f as NarrationRecorderState, g as NarrationStageHandle, h as NarrationTake, P as PrompterTransport, R as RecorderAudioBitrateMode, i as RecorderCameraLane, j as RecorderExtendedMediaOptions, k as RecorderSource, l as RecorderState, m as ResolvedFormat, T as TeleprompterController, n as TeleprompterPrefs, o as TeleprompterRecordingDeps, U as UseMediaRecorderOptions, p as UseMediaRecorderResult, q as UseNarrationStageOptions, r as buildFilename, s as createFloatingWindowManager, t as detectFloatTiers, u as getCaptureKind, v as resolveFormat, w as supportsDisplayMedia, x as supportsMediaRecorder, y as supportsUserMedia, z as useFloatingWindow, A as useMediaRecorder, B as useMicAnalysis, E as useNarrationRecorder, G as useNarrationStage, H as useTeleprompter, I as vadConfigForSensitivity } from './useNarrationStage-Bk3mdW75.js';
|
|
26
27
|
export { EYE_LINE_FRACTION, NarrationSavePlan, NarrationSaveResult, NarrationStage, NarrationStageProps, PCM_WORKLET_NAME, PCM_WORKLET_SOURCE, TELEPROMPTER_CSS, TeleprompterControls, TeleprompterControlsProps, TeleprompterSurface, TeleprompterSurfaceProps, TeleprompterView, TeleprompterViewProps, TokenLineMap, buildNarrationSavePlan, cameraVideoLine, ensureTeleprompterStyles, executeNarrationSave, insertNarrationPreamble, measureTokenLines, narrationAnnotationLine, prompterVarsFromTheme, registerPcmWorklet, stepScroll, targetOffsetFor } from './teleprompter/index.js';
|
|
27
|
-
export { C as CanvasSink, D as DEFAULT_TELEPROMPTER_PREFS, F as FloatOpenOptions, a as FloatTier, b as FloatingWindowHandle, c as FloatingWindowManager, M as MicAnalysisHandle, d as MicAnalysisStatus, N as NarrationRecorderController, e as NarrationRecorderState, f as NarrationStageHandle, g as NarrationTake, P as PrompterTransport, T as TeleprompterController, h as TeleprompterPrefs, i as TeleprompterRecordingDeps, U as UseNarrationStageOptions, j as createFloatingWindowManager, k as detectFloatTiers, u as useFloatingWindow, l as useMicAnalysis, m as useNarrationRecorder, n as useNarrationStage, o as useTeleprompter, v as vadConfigForSensitivity } from './useNarrationStage-Bqo18PBw.js';
|
|
28
28
|
import '@bendyline/squisq/versions';
|
|
29
29
|
import '@bendyline/squisq/imageEdit';
|
|
30
30
|
import '@bendyline/squisq/jsonForm';
|
|
@@ -361,10 +361,8 @@ declare function setHeadingAttrsTransition(blockAttrsInner: string | null | unde
|
|
|
361
361
|
*
|
|
362
362
|
* Line-level markdown rewrites for the timeline editor: set a block's
|
|
363
363
|
* `duration` on its heading's Pandoc attribute block, and patch a media
|
|
364
|
-
* clip's
|
|
365
|
-
*
|
|
366
|
-
* (template annotations, ids, classes, other params) by reusing the shared
|
|
367
|
-
* tokenizers rather than regex-replacing values.
|
|
364
|
+
* clip's timing on either a `{[audio …]}` / `{[video …]}` annotation or the
|
|
365
|
+
* equivalent standalone HTML element. Rewrites preserve unrelated source.
|
|
368
366
|
*/
|
|
369
367
|
|
|
370
368
|
/** Format a seconds value compactly: integers bare, else up to 2 decimals. */
|
|
@@ -396,9 +394,9 @@ interface MediaClipPatch {
|
|
|
396
394
|
pipPosition?: VideoPipPosition | null;
|
|
397
395
|
}
|
|
398
396
|
/**
|
|
399
|
-
* Patch
|
|
400
|
-
*
|
|
401
|
-
* new full source, or null when the line
|
|
397
|
+
* Patch a `{[audio …]}` / `{[video …]}` annotation or standalone HTML media
|
|
398
|
+
* element at 1-based `line`. Preserves unrelated parameters and attributes.
|
|
399
|
+
* Returns the new full source, or null when the line is not recognized.
|
|
402
400
|
*/
|
|
403
401
|
declare function setMediaClipInSource(source: string, line: number, patch: MediaClipPatch): string | null;
|
|
404
402
|
|
package/dist/index.js
CHANGED
|
@@ -194,15 +194,15 @@ import {
|
|
|
194
194
|
usePreviewSettings,
|
|
195
195
|
useTimelineData,
|
|
196
196
|
useTreeViewData
|
|
197
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-55DQFHK5.js";
|
|
198
198
|
import "./chunk-V4NBQF5C.js";
|
|
199
199
|
import {
|
|
200
200
|
JsonEditor
|
|
201
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-YPRX32GY.js";
|
|
202
202
|
import {
|
|
203
203
|
markdownToTiptap,
|
|
204
204
|
tiptapToMarkdown
|
|
205
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-K2WJYVS4.js";
|
|
206
206
|
import {
|
|
207
207
|
ImageEditor,
|
|
208
208
|
ImageViewer,
|
|
@@ -212,18 +212,25 @@ import {
|
|
|
212
212
|
} from "./chunk-V44VP242.js";
|
|
213
213
|
import {
|
|
214
214
|
RecorderButton
|
|
215
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-4F7SN6WU.js";
|
|
216
216
|
import {
|
|
217
|
+
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
218
|
+
RecorderDeviceSettingsPanel,
|
|
217
219
|
RecorderModal,
|
|
218
220
|
RecorderPanel,
|
|
221
|
+
buildRecorderAudioConstraints,
|
|
222
|
+
buildRecorderCameraConstraints,
|
|
223
|
+
buildRecorderScreenAudioConstraints,
|
|
224
|
+
buildRecorderScreenConstraints,
|
|
219
225
|
getCaptureKind,
|
|
226
|
+
recorderBitsPerSecond,
|
|
220
227
|
requestScreenStream,
|
|
221
228
|
useMediaRecorder
|
|
222
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-ZSQN6IO7.js";
|
|
223
230
|
import "./chunk-GS7QWYFT.js";
|
|
224
231
|
import {
|
|
225
232
|
TeleprompterView
|
|
226
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-IQFPX2CE.js";
|
|
227
234
|
import {
|
|
228
235
|
DEFAULT_TELEPROMPTER_PREFS,
|
|
229
236
|
EYE_LINE_FRACTION,
|
|
@@ -263,7 +270,7 @@ import {
|
|
|
263
270
|
useStreamPreview,
|
|
264
271
|
useTeleprompter,
|
|
265
272
|
vadConfigForSensitivity
|
|
266
|
-
} from "./chunk-
|
|
273
|
+
} from "./chunk-OWOKKZAU.js";
|
|
267
274
|
|
|
268
275
|
// src/FolderView.tsx
|
|
269
276
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -700,6 +707,7 @@ export {
|
|
|
700
707
|
CustomTemplateProvider,
|
|
701
708
|
CustomThemeProvider,
|
|
702
709
|
DEFAULT_MERMAID_DIAGRAM_TYPE,
|
|
710
|
+
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
703
711
|
DEFAULT_TELEPROMPTER_PREFS,
|
|
704
712
|
DiagramCanvas,
|
|
705
713
|
DocumentSettingsDialog,
|
|
@@ -740,6 +748,7 @@ export {
|
|
|
740
748
|
REPAIRABLE_KEY,
|
|
741
749
|
RawEditor,
|
|
742
750
|
RecorderButton,
|
|
751
|
+
RecorderDeviceSettingsPanel,
|
|
743
752
|
RecorderModal,
|
|
744
753
|
RecorderPanel,
|
|
745
754
|
RepairableDiagramExtension,
|
|
@@ -782,6 +791,10 @@ export {
|
|
|
782
791
|
buildFilename,
|
|
783
792
|
buildNarrationSavePlan,
|
|
784
793
|
buildPreviewDoc,
|
|
794
|
+
buildRecorderAudioConstraints,
|
|
795
|
+
buildRecorderCameraConstraints,
|
|
796
|
+
buildRecorderScreenAudioConstraints,
|
|
797
|
+
buildRecorderScreenConstraints,
|
|
785
798
|
buildTimingJson,
|
|
786
799
|
cameraVideoLine,
|
|
787
800
|
classifyFile,
|
|
@@ -852,6 +865,7 @@ export {
|
|
|
852
865
|
readBlockAttrsTransition,
|
|
853
866
|
readBlockAttrsValue,
|
|
854
867
|
readHeadingLineTransition,
|
|
868
|
+
recorderBitsPerSecond,
|
|
855
869
|
registerPcmWorklet,
|
|
856
870
|
removeEdgeOp,
|
|
857
871
|
removeItemOp,
|
package/dist/recorder/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as CameraStreamOptions,
|
|
1
|
+
export { C as CameraStreamOptions, D as DEFAULT_RECORDER_DEVICE_SETTINGS, R as RecordedBookmark, a as RecorderAudioDeviceSettings, b as RecorderButton, c as RecorderButtonProps, d as RecorderCameraDeviceSettings, e as RecorderCameraSaveResult, f as RecorderColorScheme, g as RecorderConstraintMode, h as RecorderDeviceSettings, i as RecorderDeviceSettingsPanel, j as RecorderDeviceSettingsPanelProps, k as RecorderEncodingSettings, l as RecorderModal, m as RecorderModalProps, o as RecorderPanel, p as RecorderPanelProps, q as RecorderSaveResult, r as RecorderScreenAudioSettings, s as RecorderScreenDeviceSettings, S as ScreenStreamHandle, t as ScreenStreamOptions, T as TimingJson, u as buildRecorderAudioConstraints, v as buildRecorderCameraConstraints, w as buildRecorderScreenAudioConstraints, x as buildRecorderScreenConstraints, y as buildTimingJson, z as encodeTimingJson, A as recorderBitsPerSecond, B as requestCameraStream, E as requestMicStream, F as requestScreenStream, G as timingPathFor, H as useStreamPreview } from '../recorder-CnOKlYY3.js';
|
|
2
|
+
export { a as CaptureKind, R as RecorderAudioBitrateMode, i as RecorderCameraLane, j as RecorderExtendedMediaOptions, k as RecorderSource, l as RecorderState, m as ResolvedFormat, U as UseMediaRecorderOptions, p as UseMediaRecorderResult, r as buildFilename, u as getCaptureKind, v as resolveFormat, w as supportsDisplayMedia, x as supportsMediaRecorder, y as supportsUserMedia, A as useMediaRecorder } from '../useNarrationStage-Bk3mdW75.js';
|
|
2
3
|
import 'react/jsx-runtime';
|
|
3
4
|
import '@bendyline/squisq/schemas';
|
|
4
5
|
import '@bendyline/squisq/storage';
|
|
5
|
-
import '../useNarrationStage-Bqo18PBw.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '@bendyline/squisq/narration';
|
package/dist/recorder/index.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RecorderButton
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-4F7SN6WU.js";
|
|
4
4
|
import {
|
|
5
|
+
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
6
|
+
RecorderDeviceSettingsPanel,
|
|
5
7
|
RecorderModal,
|
|
6
8
|
RecorderPanel,
|
|
9
|
+
buildRecorderAudioConstraints,
|
|
10
|
+
buildRecorderCameraConstraints,
|
|
11
|
+
buildRecorderScreenAudioConstraints,
|
|
12
|
+
buildRecorderScreenConstraints,
|
|
7
13
|
getCaptureKind,
|
|
14
|
+
recorderBitsPerSecond,
|
|
8
15
|
requestScreenStream,
|
|
9
16
|
useMediaRecorder
|
|
10
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-ZSQN6IO7.js";
|
|
11
18
|
import "../chunk-GS7QWYFT.js";
|
|
12
19
|
import {
|
|
13
20
|
buildFilename,
|
|
@@ -21,15 +28,22 @@ import {
|
|
|
21
28
|
supportsUserMedia,
|
|
22
29
|
timingPathFor,
|
|
23
30
|
useStreamPreview
|
|
24
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-OWOKKZAU.js";
|
|
25
32
|
export {
|
|
33
|
+
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
26
34
|
RecorderButton,
|
|
35
|
+
RecorderDeviceSettingsPanel,
|
|
27
36
|
RecorderModal,
|
|
28
37
|
RecorderPanel,
|
|
29
38
|
buildFilename,
|
|
39
|
+
buildRecorderAudioConstraints,
|
|
40
|
+
buildRecorderCameraConstraints,
|
|
41
|
+
buildRecorderScreenAudioConstraints,
|
|
42
|
+
buildRecorderScreenConstraints,
|
|
30
43
|
buildTimingJson,
|
|
31
44
|
encodeTimingJson,
|
|
32
45
|
getCaptureKind,
|
|
46
|
+
recorderBitsPerSecond,
|
|
33
47
|
requestCameraStream,
|
|
34
48
|
requestMicStream,
|
|
35
49
|
requestScreenStream,
|
|
@@ -1,209 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Doc, Theme, MediaProvider } from '@bendyline/squisq/schemas';
|
|
3
3
|
import { ContentContainer } from '@bendyline/squisq/storage';
|
|
4
|
-
import {
|
|
4
|
+
import { k as RecorderSource, o as TeleprompterRecordingDeps } from './useNarrationStage-Bk3mdW75.js';
|
|
5
5
|
import { CSSProperties, RefObject } from 'react';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Format probing for MediaRecorder.
|
|
9
|
-
*
|
|
10
|
-
* Different browsers expose different container/codec combinations. Chrome
|
|
11
|
-
* and Firefox produce WebM (VP8/VP9 + Opus); Safari produces MP4 (H.264 +
|
|
12
|
-
* AAC). We probe at runtime via `MediaRecorder.isTypeSupported()` and pick
|
|
13
|
-
* the best supported option, falling back to whatever the browser hands
|
|
14
|
-
* back when no probe succeeds.
|
|
15
|
-
*/
|
|
16
|
-
/** What the recorded stream is intended to capture. */
|
|
17
|
-
type CaptureKind = 'audio' | 'video';
|
|
18
|
-
/** A probed format choice — what to pass to `MediaRecorder` and where to write it. */
|
|
19
|
-
interface ResolvedFormat {
|
|
20
|
-
/** MIME type to pass to `new MediaRecorder(stream, { mimeType })`. Empty string means "let the browser pick". */
|
|
21
|
-
mimeType: string;
|
|
22
|
-
/** File extension to use when writing to the container, including the leading dot. */
|
|
23
|
-
extension: string;
|
|
24
|
-
/** Container directory inside the `ContentContainer` (no trailing slash). */
|
|
25
|
-
directory: 'audio' | 'video';
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Resolve the format the recorder will use for a given capture kind. If a
|
|
29
|
-
* `preferred` MIME type is supported, it wins; otherwise we fall through
|
|
30
|
-
* the priority list. When nothing matches (extremely old browser), we
|
|
31
|
-
* return an empty `mimeType` — `MediaRecorder` will pick a default and we
|
|
32
|
-
* tag the file with `.webm` as a best guess.
|
|
33
|
-
*/
|
|
34
|
-
declare function resolveFormat(kind: CaptureKind, preferred?: string): ResolvedFormat;
|
|
35
|
-
/**
|
|
36
|
-
* `MediaRecorder` support probe. Returns false when running in a
|
|
37
|
-
* non-browser environment (e.g. SSR) or on a browser that doesn't
|
|
38
|
-
* implement the API at all.
|
|
39
|
-
*/
|
|
40
|
-
declare function supportsMediaRecorder(): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* `getUserMedia` support probe (for mic / camera capture).
|
|
43
|
-
*/
|
|
44
|
-
declare function supportsUserMedia(): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* `getDisplayMedia` support probe (for screen capture). Browsers may
|
|
47
|
-
* implement `mediaDevices` without `getDisplayMedia` (Firefox on Android
|
|
48
|
-
* being the long-standing example), so this is its own probe.
|
|
49
|
-
*/
|
|
50
|
-
declare function supportsDisplayMedia(): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Build a default filename for a recording. `basename` is a hint
|
|
53
|
-
* (e.g. user-typed name); when omitted, a sortable timestamp is used so
|
|
54
|
-
* concurrent recordings don't collide. General recorder callers can supply a
|
|
55
|
-
* source-aware `seed`; dedicated narration callers omit it and retain the
|
|
56
|
-
* historical `narration-*` default.
|
|
57
|
-
*/
|
|
58
|
-
type RecordingFilenameSeed = 'audio' | 'camera' | 'camera-audio' | 'screen' | 'screen-audio';
|
|
59
|
-
declare function buildFilename(kind: CaptureKind, extension: string, basename?: string, seed?: RecordingFilenameSeed): string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* useMediaRecorder
|
|
63
|
-
*
|
|
64
|
-
* React wrapper around `MediaRecorder` that handles stream acquisition,
|
|
65
|
-
* the recorder lifecycle, and produces a single `Blob` on stop. Selects
|
|
66
|
-
* a browser-supported MIME type via {@link resolveFormat}.
|
|
67
|
-
*
|
|
68
|
-
* Mirrors the shape of `useVideoExport` in `@bendyline/squisq-video-react`
|
|
69
|
-
* (request → start → stop → blob), inverted for capture rather than
|
|
70
|
-
* export.
|
|
71
|
-
*
|
|
72
|
-
* The `'screen+camera'` source is the one exception to "one stream, one
|
|
73
|
-
* blob": it drives TWO `MediaRecorder`s in lockstep (screen + system audio
|
|
74
|
-
* on the primary lane, camera + mic on a secondary lane), because a single
|
|
75
|
-
* recorder can only hold one video track. The secondary lane surfaces as
|
|
76
|
-
* {@link UseMediaRecorderResult.camera}; every other source leaves it null.
|
|
77
|
-
* The two lanes' start skew is measured (`cameraOffsetSec`) so the composed
|
|
78
|
-
* playback can line the presenter bubble up with the screen.
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Which capture source to use. `screen+mic` mixes the microphone into the
|
|
83
|
-
* screen stream (one file); `screen+camera` records screen and camera as two
|
|
84
|
-
* separate files in lockstep.
|
|
85
|
-
*/
|
|
86
|
-
type RecorderSource = 'mic' | 'camera' | 'screen' | 'screen+mic' | 'screen+camera';
|
|
87
|
-
/** Discriminated state describing what the recorder is currently doing. */
|
|
88
|
-
type RecorderState = 'idle' | 'requesting' | 'ready' | 'recording' | 'stopping' | 'stopped' | 'error';
|
|
89
|
-
/**
|
|
90
|
-
* The camera companion lane, present only for `source === 'screen+camera'`
|
|
91
|
-
* (null for every other source). Its `blob` is null until the take stops.
|
|
92
|
-
*/
|
|
93
|
-
interface RecorderCameraLane {
|
|
94
|
-
/** Camera stream (video + mic when requested); inactive after stop, null after teardown. */
|
|
95
|
-
stream: MediaStream | null;
|
|
96
|
-
/** Final camera `Blob` after `stop()` resolves, or null while recording. */
|
|
97
|
-
blob: Blob | null;
|
|
98
|
-
/** MIME type of the camera lane (shares the video format with the screen lane). */
|
|
99
|
-
mimeType: string | null;
|
|
100
|
-
/** File extension matching `mimeType` (e.g. `.webm`). */
|
|
101
|
-
extension: string | null;
|
|
102
|
-
}
|
|
103
|
-
interface UseMediaRecorderOptions {
|
|
104
|
-
/** Which capture pipeline to use (default: `'mic'`). */
|
|
105
|
-
source?: RecorderSource;
|
|
106
|
-
/**
|
|
107
|
-
* Preferred MIME type override. When the browser supports it, this
|
|
108
|
-
* wins over the default candidate list. When unset (or unsupported),
|
|
109
|
-
* the hook probes a built-in priority list.
|
|
110
|
-
*/
|
|
111
|
-
mimeType?: string;
|
|
112
|
-
/** Video track constraints for camera / screen sources. */
|
|
113
|
-
videoConstraints?: MediaTrackConstraints | boolean;
|
|
114
|
-
/** Audio track constraints for mic / camera / screen+mic sources. */
|
|
115
|
-
audioConstraints?: MediaTrackConstraints | boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Bits-per-second hint passed to `MediaRecorder`. Most browsers cap to
|
|
118
|
-
* reasonable defaults internally; leaving this undefined is usually
|
|
119
|
-
* fine.
|
|
120
|
-
*/
|
|
121
|
-
bitsPerSecond?: number;
|
|
122
|
-
/**
|
|
123
|
-
* Whether to capture system (tab/monitor) audio. Browser support is limited
|
|
124
|
-
* (desktop Chromium only); when unsupported the resulting stream simply omits
|
|
125
|
-
* it. How it is obtained depends on the source:
|
|
126
|
-
* - `'screen'` / `'screen+mic'` / `'screen+camera'` — folded into the screen
|
|
127
|
-
* lane's `getDisplayMedia` (rides the SCREEN file for the dual source).
|
|
128
|
-
* - `'mic'` / `'camera'` — captured via a SEPARATE `getDisplayMedia` whose
|
|
129
|
-
* video is discarded, then mixed into the mic/camera file. The browser still
|
|
130
|
-
* shows the screen/tab picker (audio-only display capture isn't allowed).
|
|
131
|
-
*/
|
|
132
|
-
systemAudio?: boolean;
|
|
133
|
-
/**
|
|
134
|
-
* For `source === 'camera'`, whether to include the microphone track.
|
|
135
|
-
* Defaults to `true` (camera + mic). Set `false` to capture silent
|
|
136
|
-
* video. Ignored for `'mic'`/`'screen'`/`'screen+mic'`, whose mic
|
|
137
|
-
* handling is encoded in the source itself. For `'screen+camera'` this
|
|
138
|
-
* gates the microphone on the CAMERA lane (the screen lane never carries
|
|
139
|
-
* the mic — system audio rides it instead).
|
|
140
|
-
*/
|
|
141
|
-
includeMicrophone?: boolean;
|
|
142
|
-
}
|
|
143
|
-
interface UseMediaRecorderResult {
|
|
144
|
-
/** Current recorder state. */
|
|
145
|
-
state: RecorderState;
|
|
146
|
-
/** `MediaStream` acquired by `request()`; live during preview/recording and
|
|
147
|
-
* inactive after stop. For `'screen+camera'` this is the SCREEN stream (see
|
|
148
|
-
* `camera` for the other). */
|
|
149
|
-
stream: MediaStream | null;
|
|
150
|
-
/** Final `Blob` after `stop()` resolves, or `null` while recording. For
|
|
151
|
-
* `'screen+camera'` this is the SCREEN file. */
|
|
152
|
-
blob: Blob | null;
|
|
153
|
-
/** MIME type the recorder actually used (after `request()`). */
|
|
154
|
-
mimeType: string | null;
|
|
155
|
-
/** File extension matching `mimeType` (e.g. `.webm`). */
|
|
156
|
-
extension: string | null;
|
|
157
|
-
/** Suggested container directory (`'audio'` for mic, `'video'` for camera/screen). */
|
|
158
|
-
directory: 'audio' | 'video' | null;
|
|
159
|
-
/** Milliseconds elapsed since `start()` was called. Updates ~10× per second while recording. */
|
|
160
|
-
durationMs: number;
|
|
161
|
-
/** Most recent error, if any. */
|
|
162
|
-
error: Error | null;
|
|
163
|
-
/**
|
|
164
|
-
* The camera companion lane for `source === 'screen+camera'`, else null.
|
|
165
|
-
* Its `blob` lands together with the primary `blob` when `stop()` resolves.
|
|
166
|
-
*/
|
|
167
|
-
camera: RecorderCameraLane | null;
|
|
168
|
-
/**
|
|
169
|
-
* Camera onstart minus screen onstart, in seconds (positive = camera
|
|
170
|
-
* started later). Null until both lanes have reported `onstart`, and for
|
|
171
|
-
* every non-dual source.
|
|
172
|
-
*/
|
|
173
|
-
cameraOffsetSec: number | null;
|
|
174
|
-
/**
|
|
175
|
-
* Acquire the stream and prepare a `MediaRecorder`. After this resolves
|
|
176
|
-
* the hook is in `'ready'` state and a `<video>`/`<audio>` element can
|
|
177
|
-
* preview `stream`. Call `start()` to begin recording.
|
|
178
|
-
*/
|
|
179
|
-
request: () => Promise<void>;
|
|
180
|
-
/** Start recording. Must be called from `'ready'`. */
|
|
181
|
-
start: () => void;
|
|
182
|
-
/**
|
|
183
|
-
* Stop recording and resolve with the resulting `Blob`. Safe to call
|
|
184
|
-
* from `'recording'`; a no-op from any other state (resolves with the
|
|
185
|
-
* existing `blob`, or `null`). Once the take has flushed, all capture
|
|
186
|
-
* tracks are stopped so browser sharing / camera / microphone indicators
|
|
187
|
-
* do not remain active during review.
|
|
188
|
-
*/
|
|
189
|
-
stop: () => Promise<Blob | null>;
|
|
190
|
-
/**
|
|
191
|
-
* Tear everything down — stops the recorder if running, releases all
|
|
192
|
-
* tracks, disposes the AudioContext mixer (if any), and returns to
|
|
193
|
-
* `'idle'`. Always safe to call.
|
|
194
|
-
*/
|
|
195
|
-
cancel: () => void;
|
|
196
|
-
/** Clear the current take. A new permission request may be needed before re-recording. */
|
|
197
|
-
reset: () => void;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Returns the kind of capture that the given source produces. Exposed
|
|
201
|
-
* separately from {@link useMediaRecorder} so non-React callers
|
|
202
|
-
* (e.g. headless tests) can resolve a format up front.
|
|
203
|
-
*/
|
|
204
|
-
declare function getCaptureKind(source: RecorderSource): CaptureKind;
|
|
205
|
-
declare function useMediaRecorder(options?: UseMediaRecorderOptions): UseMediaRecorderResult;
|
|
206
|
-
|
|
207
7
|
type RecorderColorScheme = 'light' | 'dark';
|
|
208
8
|
/**
|
|
209
9
|
* Everything narration mode needs beyond the base recorder props. Supplying
|
|
@@ -335,6 +135,98 @@ interface RecorderPanelProps {
|
|
|
335
135
|
}
|
|
336
136
|
declare function RecorderPanel({ mediaProvider, container, initialMode, colorScheme, onSave, narration, tooltip, className, open: controlledOpen, onOpenChange, showTrigger, }: RecorderPanelProps): react_jsx_runtime.JSX.Element;
|
|
337
137
|
|
|
138
|
+
/**
|
|
139
|
+
* User-configurable recorder device/encoding settings.
|
|
140
|
+
*
|
|
141
|
+
* Values stay serializable so the modal can include them in its capture key:
|
|
142
|
+
* changing a setting releases any prepared preview before a new stream is
|
|
143
|
+
* requested. Numeric and string track values are expressed as either `ideal`
|
|
144
|
+
* (best effort) or `exact` (fail when unavailable) constraints. Display
|
|
145
|
+
* capture is the exception: the screen-capture standard rejects exact
|
|
146
|
+
* constraints during its user picker, so those values always remain ideal.
|
|
147
|
+
*/
|
|
148
|
+
type RecorderConstraintMode = 'ideal' | 'exact';
|
|
149
|
+
interface RecorderAudioDeviceSettings {
|
|
150
|
+
deviceId: string;
|
|
151
|
+
groupId?: string;
|
|
152
|
+
autoGainControl?: boolean;
|
|
153
|
+
channelCount?: number;
|
|
154
|
+
echoCancellation?: boolean;
|
|
155
|
+
latency?: number;
|
|
156
|
+
noiseSuppression?: boolean;
|
|
157
|
+
sampleRate?: number;
|
|
158
|
+
sampleSize?: number;
|
|
159
|
+
}
|
|
160
|
+
interface RecorderCameraDeviceSettings {
|
|
161
|
+
deviceId: string;
|
|
162
|
+
groupId?: string;
|
|
163
|
+
aspectRatio?: number;
|
|
164
|
+
backgroundBlur?: boolean;
|
|
165
|
+
facingMode?: string;
|
|
166
|
+
frameRate?: number;
|
|
167
|
+
height?: number;
|
|
168
|
+
resizeMode?: string;
|
|
169
|
+
width?: number;
|
|
170
|
+
}
|
|
171
|
+
interface RecorderScreenDeviceSettings {
|
|
172
|
+
aspectRatio?: number;
|
|
173
|
+
cursor?: string;
|
|
174
|
+
displaySurface?: string;
|
|
175
|
+
frameRate?: number;
|
|
176
|
+
height?: number;
|
|
177
|
+
logicalSurface?: boolean;
|
|
178
|
+
resizeMode?: string;
|
|
179
|
+
width?: number;
|
|
180
|
+
}
|
|
181
|
+
interface RecorderScreenAudioSettings {
|
|
182
|
+
restrictOwnAudio?: boolean;
|
|
183
|
+
suppressLocalAudioPlayback?: boolean;
|
|
184
|
+
}
|
|
185
|
+
interface RecorderEncodingSettings {
|
|
186
|
+
audioMimeType: string;
|
|
187
|
+
videoMimeType: string;
|
|
188
|
+
bitsPerSecond?: number;
|
|
189
|
+
audioBitsPerSecond?: number;
|
|
190
|
+
videoBitsPerSecond?: number;
|
|
191
|
+
audioBitrateMode?: 'constant' | 'variable';
|
|
192
|
+
videoKeyFrameIntervalDuration?: number;
|
|
193
|
+
videoKeyFrameIntervalCount?: number;
|
|
194
|
+
}
|
|
195
|
+
interface RecorderDeviceSettings {
|
|
196
|
+
constraintMode: RecorderConstraintMode;
|
|
197
|
+
audio: RecorderAudioDeviceSettings;
|
|
198
|
+
camera: RecorderCameraDeviceSettings;
|
|
199
|
+
screen: RecorderScreenDeviceSettings;
|
|
200
|
+
screenAudio: RecorderScreenAudioSettings;
|
|
201
|
+
encoding: RecorderEncodingSettings;
|
|
202
|
+
}
|
|
203
|
+
declare const DEFAULT_RECORDER_DEVICE_SETTINGS: RecorderDeviceSettings;
|
|
204
|
+
/** Build microphone constraints from the advanced settings form. */
|
|
205
|
+
declare function buildRecorderAudioConstraints(settings: RecorderDeviceSettings): MediaTrackConstraints;
|
|
206
|
+
/** Build camera constraints from the advanced settings form. */
|
|
207
|
+
declare function buildRecorderCameraConstraints(settings: RecorderDeviceSettings): MediaTrackConstraints;
|
|
208
|
+
/** Build display-capture constraints independently from camera constraints. */
|
|
209
|
+
declare function buildRecorderScreenConstraints(settings: RecorderDeviceSettings): MediaTrackConstraints;
|
|
210
|
+
/** Build the audio-track constraints specific to getDisplayMedia. */
|
|
211
|
+
declare function buildRecorderScreenAudioConstraints(settings: RecorderDeviceSettings): MediaTrackConstraints;
|
|
212
|
+
/** Convert the form's kbps values to the bps values MediaRecorder expects. */
|
|
213
|
+
declare function recorderBitsPerSecond(value: number | undefined): number | undefined;
|
|
214
|
+
|
|
215
|
+
interface RecorderDeviceSettingsPanelProps {
|
|
216
|
+
value: RecorderDeviceSettings;
|
|
217
|
+
onChange: (next: RecorderDeviceSettings) => void;
|
|
218
|
+
disabled?: boolean;
|
|
219
|
+
microphoneEnabled: boolean;
|
|
220
|
+
cameraEnabled: boolean;
|
|
221
|
+
screenEnabled: boolean;
|
|
222
|
+
systemAudioEnabled?: boolean;
|
|
223
|
+
/** Narration records mic audio separately even when its camera is on. */
|
|
224
|
+
separateAudioRecorder?: boolean;
|
|
225
|
+
primaryStream?: MediaStream | null;
|
|
226
|
+
cameraStream?: MediaStream | null;
|
|
227
|
+
}
|
|
228
|
+
declare function RecorderDeviceSettingsPanel({ value, onChange, disabled, microphoneEnabled, cameraEnabled, screenEnabled, systemAudioEnabled, separateAudioRecorder, primaryStream, cameraStream, }: RecorderDeviceSettingsPanelProps): react_jsx_runtime.JSX.Element;
|
|
229
|
+
|
|
338
230
|
/**
|
|
339
231
|
* useStreamPreview — binds a `MediaStream` to a `<video>` element's
|
|
340
232
|
* `srcObject`. Decouples the preview surface from `useMediaRecorder`,
|
|
@@ -415,6 +307,8 @@ interface ScreenStreamOptions {
|
|
|
415
307
|
* the system audio track.
|
|
416
308
|
*/
|
|
417
309
|
systemAudio?: boolean;
|
|
310
|
+
/** Constraints for the display stream's system-audio track. */
|
|
311
|
+
systemAudioConstraints?: MediaTrackConstraints;
|
|
418
312
|
/**
|
|
419
313
|
* Whether to also pull the microphone via `getUserMedia` and mix it
|
|
420
314
|
* into the resulting stream's audio track. When both `systemAudio` and
|
|
@@ -505,4 +399,4 @@ declare function encodeTimingJson(timing: TimingJson): Uint8Array;
|
|
|
505
399
|
*/
|
|
506
400
|
declare function timingPathFor(audioRelativePath: string): string;
|
|
507
401
|
|
|
508
|
-
export {
|
|
402
|
+
export { recorderBitsPerSecond as A, requestCameraStream as B, type CameraStreamOptions as C, DEFAULT_RECORDER_DEVICE_SETTINGS as D, requestMicStream as E, requestScreenStream as F, timingPathFor as G, useStreamPreview as H, type RecordedBookmark as R, type ScreenStreamHandle as S, type TimingJson as T, type RecorderAudioDeviceSettings as a, RecorderButton as b, type RecorderButtonProps as c, type RecorderCameraDeviceSettings as d, type RecorderCameraSaveResult as e, type RecorderColorScheme as f, type RecorderConstraintMode as g, type RecorderDeviceSettings as h, RecorderDeviceSettingsPanel as i, type RecorderDeviceSettingsPanelProps as j, type RecorderEncodingSettings as k, RecorderModal as l, type RecorderModalProps as m, type RecorderNarrationOptions as n, RecorderPanel as o, type RecorderPanelProps as p, type RecorderSaveResult as q, type RecorderScreenAudioSettings as r, type RecorderScreenDeviceSettings as s, type ScreenStreamOptions as t, buildRecorderAudioConstraints as u, buildRecorderCameraConstraints as v, buildRecorderScreenAudioConstraints as w, buildRecorderScreenConstraints as x, buildTimingJson as y, encodeTimingJson as z };
|
package/dist/shell/index.js
CHANGED
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
RawEditor,
|
|
6
6
|
WysiwygEditor,
|
|
7
7
|
useEditorContext
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-55DQFHK5.js";
|
|
9
9
|
import "../chunk-V4NBQF5C.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-K2WJYVS4.js";
|
|
11
11
|
import "../chunk-V44VP242.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-ZSQN6IO7.js";
|
|
13
13
|
import "../chunk-GS7QWYFT.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-IQFPX2CE.js";
|
|
15
|
+
import "../chunk-OWOKKZAU.js";
|
|
16
16
|
export {
|
|
17
17
|
EditorProvider,
|
|
18
18
|
EditorShell,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Doc, Theme, MediaProvider } from '@bendyline/squisq/schemas';
|
|
3
3
|
import { ContentContainer } from '@bendyline/squisq/storage';
|
|
4
|
-
import {
|
|
5
|
-
export { C as CanvasSink, D as DEFAULT_TELEPROMPTER_PREFS, F as FloatOpenOptions,
|
|
4
|
+
import { o as TeleprompterRecordingDeps, g as NarrationStageHandle, T as TeleprompterController, c as FloatingWindowHandle } from '../useNarrationStage-Bk3mdW75.js';
|
|
5
|
+
export { C as CanvasSink, D as DEFAULT_TELEPROMPTER_PREFS, F as FloatOpenOptions, b as FloatTier, d as FloatingWindowManager, M as MicAnalysisHandle, e as MicAnalysisStatus, N as NarrationRecorderController, f as NarrationRecorderState, h as NarrationTake, P as PrompterTransport, J as TELEPROMPTER_PREF_LIMITS, n as TeleprompterPrefs, q as UseNarrationStageOptions, s as createFloatingWindowManager, t as detectFloatTiers, K as normalizeTeleprompterPrefs, z as useFloatingWindow, B as useMicAnalysis, E as useNarrationRecorder, G as useNarrationStage, H as useTeleprompter, I as vadConfigForSensitivity } from '../useNarrationStage-Bk3mdW75.js';
|
|
6
6
|
import { NarrationTimingJsonV3, NarrationScript, NarrationAlignment } from '@bendyline/squisq/narration';
|
|
7
7
|
import { ReactNode } from 'react';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TeleprompterView
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-IQFPX2CE.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_TELEPROMPTER_PREFS,
|
|
6
6
|
EYE_LINE_FRACTION,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
useNarrationStage,
|
|
32
32
|
useTeleprompter,
|
|
33
33
|
vadConfigForSensitivity
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-OWOKKZAU.js";
|
|
35
35
|
export {
|
|
36
36
|
DEFAULT_TELEPROMPTER_PREFS,
|
|
37
37
|
EYE_LINE_FRACTION,
|