@bendyline/squisq-editor-react 2.11.19 → 2.11.21
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/dist/chunk-2MP7QE7O.js +15 -0
- package/dist/{chunk-5EB3BGPE.js → chunk-5NXCXT55.js} +4232 -3469
- package/dist/chunk-K56KR27T.js +141 -0
- package/dist/{chunk-TZX7RKZV.js → chunk-UCYZBMCG.js} +196 -127
- package/dist/deviceSettings-BSkIQncC.d.ts +83 -0
- package/dist/{dictationSession-PN3OT5LJ.js → dictationSession-SLDNYIZ2.js} +3 -133
- package/dist/index.d.ts +214 -25
- package/dist/index.js +26 -3
- package/dist/recorder/index.d.ts +4 -2
- package/dist/{recorder-DKN3vZPi.d.ts → recorder-Civyq5SU.d.ts} +4 -82
- package/dist/review/index.js +1 -1
- package/dist/screenRegion-Ci_RsCzG.d.ts +8 -0
- package/dist/shell/index.d.ts +2 -2
- package/dist/shell/index.js +6 -4
- package/dist/{shell-Cje1A3zN.d.ts → shell-XyXxGPs4.d.ts} +36 -3
- package/dist/speech/index.d.ts +35 -118
- package/dist/speech/index.js +7 -1
- package/dist/speechAudioWav-WKIQWGIJ.js +13 -0
- package/dist/styles/index.css +102 -0
- package/dist/teleprompter/index.d.ts +3 -2
- package/dist/types-Bi4ZVKvN.d.ts +126 -0
- package/dist/{useNarrationStage-CB8dynUg.d.ts → useNarrationStage-DlighI1z.d.ts} +2 -8
- package/package.json +6 -6
package/dist/styles/index.css
CHANGED
|
@@ -9716,6 +9716,12 @@
|
|
|
9716
9716
|
min-width: 180px;
|
|
9717
9717
|
max-width: calc(100vw - 16px);
|
|
9718
9718
|
}
|
|
9719
|
+
.squisq-toolbar-button.squisq-preview-design-button {
|
|
9720
|
+
width: auto;
|
|
9721
|
+
height: 30px;
|
|
9722
|
+
padding: 3px 8px 1px;
|
|
9723
|
+
border: 1px solid var(--squisq-border);
|
|
9724
|
+
}
|
|
9719
9725
|
.squisq-preview-control--compact {
|
|
9720
9726
|
display: flex;
|
|
9721
9727
|
align-items: center;
|
|
@@ -17239,6 +17245,102 @@
|
|
|
17239
17245
|
min-height: 0;
|
|
17240
17246
|
}
|
|
17241
17247
|
|
|
17248
|
+
/* src/styles/video-embed.css */
|
|
17249
|
+
.squisq-video-embed-host {
|
|
17250
|
+
display: block;
|
|
17251
|
+
width: 100%;
|
|
17252
|
+
max-width: 720px;
|
|
17253
|
+
margin: 1em 0 0.25em;
|
|
17254
|
+
user-select: none;
|
|
17255
|
+
}
|
|
17256
|
+
.squisq-video-embed-host[data-orientation=portrait] {
|
|
17257
|
+
max-width: 340px;
|
|
17258
|
+
}
|
|
17259
|
+
.squisq-video-embed-host-frame {
|
|
17260
|
+
position: relative;
|
|
17261
|
+
overflow: hidden;
|
|
17262
|
+
border-radius: 6px;
|
|
17263
|
+
background: var(--squisq-media-well);
|
|
17264
|
+
}
|
|
17265
|
+
.squisq-video-embed-host-frame iframe {
|
|
17266
|
+
position: absolute;
|
|
17267
|
+
inset: 0;
|
|
17268
|
+
width: 100%;
|
|
17269
|
+
height: 100%;
|
|
17270
|
+
border: 0;
|
|
17271
|
+
}
|
|
17272
|
+
.squisq-video-embed-host-bar {
|
|
17273
|
+
display: flex;
|
|
17274
|
+
align-items: center;
|
|
17275
|
+
gap: 8px;
|
|
17276
|
+
margin-top: 6px;
|
|
17277
|
+
font-family: var(--squisq-ux-font, system-ui, sans-serif);
|
|
17278
|
+
font-size: 12px;
|
|
17279
|
+
color: var(--squisq-text-muted);
|
|
17280
|
+
}
|
|
17281
|
+
.squisq-video-embed-host-convert {
|
|
17282
|
+
padding: 2px 8px;
|
|
17283
|
+
font: inherit;
|
|
17284
|
+
color: var(--squisq-accent-strong);
|
|
17285
|
+
background: var(--squisq-accent-subtle);
|
|
17286
|
+
border: 1px solid var(--squisq-accent-border);
|
|
17287
|
+
border-radius: 4px;
|
|
17288
|
+
cursor: pointer;
|
|
17289
|
+
}
|
|
17290
|
+
.squisq-video-embed-host-convert:hover {
|
|
17291
|
+
background: var(--squisq-accent-soft);
|
|
17292
|
+
}
|
|
17293
|
+
.squisq-wysiwyg-editor p.squisq-video-embed-caption {
|
|
17294
|
+
margin-top: 0;
|
|
17295
|
+
font-size: 0.875em;
|
|
17296
|
+
opacity: 0.75;
|
|
17297
|
+
}
|
|
17298
|
+
.squisq-wysiwyg-editor p.squisq-video-embed-caption--html {
|
|
17299
|
+
font-family:
|
|
17300
|
+
ui-monospace,
|
|
17301
|
+
SFMono-Regular,
|
|
17302
|
+
Menlo,
|
|
17303
|
+
Consolas,
|
|
17304
|
+
monospace;
|
|
17305
|
+
font-size: 0.75em;
|
|
17306
|
+
white-space: nowrap;
|
|
17307
|
+
overflow: hidden;
|
|
17308
|
+
text-overflow: ellipsis;
|
|
17309
|
+
}
|
|
17310
|
+
.squisq-video-dialog {
|
|
17311
|
+
max-width: 520px;
|
|
17312
|
+
}
|
|
17313
|
+
.squisq-video-dialog-status {
|
|
17314
|
+
font-size: 12px;
|
|
17315
|
+
line-height: 1.4;
|
|
17316
|
+
color: var(--squisq-text-muted);
|
|
17317
|
+
}
|
|
17318
|
+
.squisq-video-dialog-status--ok {
|
|
17319
|
+
color: var(--squisq-success);
|
|
17320
|
+
}
|
|
17321
|
+
.squisq-video-dialog-preview {
|
|
17322
|
+
position: relative;
|
|
17323
|
+
max-width: 100%;
|
|
17324
|
+
}
|
|
17325
|
+
.squisq-video-dialog-preview .squisq-video-embed {
|
|
17326
|
+
margin: 0;
|
|
17327
|
+
max-width: 100%;
|
|
17328
|
+
}
|
|
17329
|
+
.squisq-video-dialog-preview .squisq-video-embed[data-orientation=portrait] {
|
|
17330
|
+
max-width: 180px;
|
|
17331
|
+
margin-inline: auto;
|
|
17332
|
+
}
|
|
17333
|
+
.squisq-video-dialog-preview .squisq-video-embed-frame {
|
|
17334
|
+
border-radius: 6px;
|
|
17335
|
+
overflow: hidden;
|
|
17336
|
+
background: var(--squisq-media-well);
|
|
17337
|
+
}
|
|
17338
|
+
.squisq-video-dialog-hint {
|
|
17339
|
+
font-size: 12px;
|
|
17340
|
+
line-height: 1.4;
|
|
17341
|
+
color: var(--squisq-text-faint);
|
|
17342
|
+
}
|
|
17343
|
+
|
|
17242
17344
|
/* ../grid-react/dist/styles/index.css */
|
|
17243
17345
|
.squisq-grid {
|
|
17244
17346
|
position: relative;
|
|
@@ -1,10 +1,11 @@
|
|
|
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 { o as TeleprompterRecordingDeps, g as NarrationStageHandle, T as TeleprompterController, c as FloatingWindowHandle } from '../useNarrationStage-
|
|
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-
|
|
4
|
+
import { o as TeleprompterRecordingDeps, g as NarrationStageHandle, T as TeleprompterController, c as FloatingWindowHandle } from '../useNarrationStage-DlighI1z.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-DlighI1z.js';
|
|
6
6
|
import { NarrationTimingJsonV3, NarrationScript, NarrationAlignment, NarrationTimingGenerator } from '@bendyline/squisq/narration';
|
|
7
7
|
import { ReactNode } from 'react';
|
|
8
|
+
import '../screenRegion-Ci_RsCzG.js';
|
|
8
9
|
|
|
9
10
|
interface TeleprompterViewProps {
|
|
10
11
|
doc: Doc | null;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The speech-input (dictation) capability contract between an editor host and
|
|
3
|
+
* the shell.
|
|
4
|
+
*
|
|
5
|
+
* A host that can turn speech into text passes a {@link SpeechInputProvider}
|
|
6
|
+
* (or a factory) to `EditorShell`'s `speechInput` prop — the same
|
|
7
|
+
* capability-injection semantics as `proofing`: absent means the feature is
|
|
8
|
+
* off, no dictation code loads, and no microphone button renders.
|
|
9
|
+
*
|
|
10
|
+
* The editor owns everything up to the recognizer: microphone capture, phrase
|
|
11
|
+
* segmentation, WAV encoding, the toolbar button, the caret indicator and the
|
|
12
|
+
* literal-text insertion. The provider owns only recognition. Audio crosses
|
|
13
|
+
* the boundary as one self-contained mono 16-bit PCM WAV at 16 kHz per take,
|
|
14
|
+
* which every whisper.cpp build accepts and which keeps IPC payloads small.
|
|
15
|
+
* The surface is plain data end to end, so a provider can be a local engine
|
|
16
|
+
* behind IPC, a call to a service, or a test fake.
|
|
17
|
+
*/
|
|
18
|
+
/** Sample rate (Hz) of every WAV take handed to {@link SpeechInputProvider.transcribe}. */
|
|
19
|
+
declare const SPEECH_INPUT_SAMPLE_RATE = 16000;
|
|
20
|
+
/** Coarse readiness of a provider, as the editor's button presents it. */
|
|
21
|
+
type SpeechInputReadinessState =
|
|
22
|
+
/** Dictation can start now. */
|
|
23
|
+
'ready'
|
|
24
|
+
/**
|
|
25
|
+
* The host needs a one-time setup (typically a model download) first.
|
|
26
|
+
* Clicking the microphone calls {@link SpeechInputProvider.requestSetup}
|
|
27
|
+
* instead of starting.
|
|
28
|
+
*/
|
|
29
|
+
| 'download-required'
|
|
30
|
+
/** Dictation can never work in this host/session. The button is hidden. */
|
|
31
|
+
| 'unavailable'
|
|
32
|
+
/**
|
|
33
|
+
* The host still needs a permission (e.g. the OS microphone grant).
|
|
34
|
+
* Starting proceeds — the microphone request is what prompts for it.
|
|
35
|
+
*/
|
|
36
|
+
| 'permission-required';
|
|
37
|
+
interface SpeechInputReadiness {
|
|
38
|
+
readonly state: SpeechInputReadinessState;
|
|
39
|
+
/** Optional human-readable detail, shown in the button's tooltip/errors. */
|
|
40
|
+
readonly reason?: string;
|
|
41
|
+
}
|
|
42
|
+
interface SpeechInputTranscribeOptions {
|
|
43
|
+
/**
|
|
44
|
+
* The recent dictated text of this session (a word-aligned tail of at most
|
|
45
|
+
* 1,000 characters), for engines that accept a priming prompt — Whisper's
|
|
46
|
+
* `prompt`. Absent on the first take.
|
|
47
|
+
*/
|
|
48
|
+
readonly prompt?: string;
|
|
49
|
+
/** BCP-47-ish language hint. The editor does not currently set it. */
|
|
50
|
+
readonly language?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Aborted when the user cancels dictation or the editor unmounts. A
|
|
53
|
+
* provider should stop promptly; a rejection after abort is ignored.
|
|
54
|
+
*/
|
|
55
|
+
readonly signal: AbortSignal;
|
|
56
|
+
}
|
|
57
|
+
interface SpeechInputTranscript {
|
|
58
|
+
/** Recognized text. Blank (or Whisper's `[BLANK_AUDIO]`) means silence. */
|
|
59
|
+
readonly text: string;
|
|
60
|
+
}
|
|
61
|
+
interface SpeechInputProvider {
|
|
62
|
+
/** Stable identifier, e.g. `whisper-local`. */
|
|
63
|
+
readonly id: string;
|
|
64
|
+
/** Human-readable name, e.g. `On-device speech recognition`. */
|
|
65
|
+
readonly label: string;
|
|
66
|
+
/**
|
|
67
|
+
* Current readiness. Called once when the editor mounts with the
|
|
68
|
+
* capability (to decide whether to render the microphone at all) and again
|
|
69
|
+
* each time the user starts dictation. Must be cheap.
|
|
70
|
+
*/
|
|
71
|
+
status(): Promise<SpeechInputReadiness>;
|
|
72
|
+
/** Optional readiness push (e.g. a model finished downloading). Returns unsubscribe. */
|
|
73
|
+
onStatus?(listener: (readiness: SpeechInputReadiness) => void): () => void;
|
|
74
|
+
/** Called when the user starts dictation so the host can warm its engine; may reject. */
|
|
75
|
+
prepare?(signal: AbortSignal): Promise<void>;
|
|
76
|
+
/** Called when the user clicks the mic while readiness is 'download-required'; the host shows its own setup UI. */
|
|
77
|
+
requestSetup?(): void;
|
|
78
|
+
/** Transcribe one self-contained take: mono 16-bit PCM WAV at 16 kHz. */
|
|
79
|
+
transcribe(wav: ArrayBuffer, options: SpeechInputTranscribeOptions): Promise<SpeechInputTranscript>;
|
|
80
|
+
/** Release resources. Called by the editor only for a provider it created from a factory. */
|
|
81
|
+
dispose?(): void;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Deferred construction. The shell creates the provider when it mounts with
|
|
85
|
+
* the capability (it needs `status()` to decide whether to render the
|
|
86
|
+
* microphone) and disposes it on unmount or when the capability changes. A
|
|
87
|
+
* host that passes an instance owns its lifetime — which is what lets one warm
|
|
88
|
+
* engine survive shell remounts.
|
|
89
|
+
*/
|
|
90
|
+
type SpeechInputProviderFactory = () => SpeechInputProvider;
|
|
91
|
+
/** What the `speechInput` shell prop accepts. */
|
|
92
|
+
type SpeechInputCapability = SpeechInputProvider | SpeechInputProviderFactory;
|
|
93
|
+
/**
|
|
94
|
+
* Resolve a capability to a provider instance. A factory is invoked (and the
|
|
95
|
+
* caller then owns — must dispose — what it returns); an instance is returned
|
|
96
|
+
* as-is and stays host-owned.
|
|
97
|
+
*/
|
|
98
|
+
declare function resolveSpeechInputProvider(capability: SpeechInputCapability): SpeechInputProvider;
|
|
99
|
+
/**
|
|
100
|
+
* Whether a capability is a factory, i.e. whether the provider resolved from
|
|
101
|
+
* it is owned (and must be disposed) by the resolver's caller.
|
|
102
|
+
*/
|
|
103
|
+
declare function isSpeechInputProviderFactory(capability: SpeechInputCapability): capability is SpeechInputProviderFactory;
|
|
104
|
+
/**
|
|
105
|
+
* Imperative dictation control on the editor context
|
|
106
|
+
* (`useEditorContext().dictation`), for a host component rendered inside the
|
|
107
|
+
* shell's slots — e.g. to drive dictation from a native menu command. `null`
|
|
108
|
+
* when the host injected no `speechInput` capability.
|
|
109
|
+
*/
|
|
110
|
+
interface DictationControl {
|
|
111
|
+
/** True from the moment dictation starts until its last take is inserted. */
|
|
112
|
+
readonly active: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* True when `toggle()` would do something: the provider is not
|
|
115
|
+
* `unavailable` and a text-editing view (Write or Source) is showing.
|
|
116
|
+
*/
|
|
117
|
+
readonly available: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Start dictation when idle (or ask the host to set up when readiness is
|
|
120
|
+
* `download-required`); finish and stop when listening; cancel while the
|
|
121
|
+
* microphone is still starting.
|
|
122
|
+
*/
|
|
123
|
+
toggle(): void;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export { type DictationControl as D, type SpeechInputProvider as S, SPEECH_INPUT_SAMPLE_RATE as a, type SpeechInputCapability as b, type SpeechInputProviderFactory as c, type SpeechInputReadiness as d, type SpeechInputReadinessState as e, type SpeechInputTranscribeOptions as f, type SpeechInputTranscript as g, isSpeechInputProviderFactory as i, resolveSpeechInputProvider as r };
|
|
@@ -2,6 +2,7 @@ import { SyntheticEvent } from 'react';
|
|
|
2
2
|
import { Doc, MediaProvider } from '@bendyline/squisq/schemas';
|
|
3
3
|
import { ContentContainer } from '@bendyline/squisq/storage';
|
|
4
4
|
import { NarrationScript, VadConfig, NarrationTrace, NarrationAlignment } from '@bendyline/squisq/narration';
|
|
5
|
+
import { S as ScreenCaptureRegion } from './screenRegion-Ci_RsCzG.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Format probing for MediaRecorder.
|
|
@@ -57,13 +58,6 @@ declare function supportsDisplayMedia(): boolean;
|
|
|
57
58
|
type RecordingFilenameSeed = 'audio' | 'camera' | 'camera-audio' | 'screen' | 'screen-audio';
|
|
58
59
|
declare function buildFilename(kind: CaptureKind, extension: string, basename?: string, seed?: RecordingFilenameSeed): string;
|
|
59
60
|
|
|
60
|
-
interface ScreenCaptureRegion {
|
|
61
|
-
x: number;
|
|
62
|
-
y: number;
|
|
63
|
-
width: number;
|
|
64
|
-
height: number;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
61
|
/**
|
|
68
62
|
* useMediaRecorder
|
|
69
63
|
*
|
|
@@ -615,4 +609,4 @@ interface NarrationStageHandle {
|
|
|
615
609
|
}
|
|
616
610
|
declare function useNarrationStage(opts: UseNarrationStageOptions): NarrationStageHandle;
|
|
617
611
|
|
|
618
|
-
export { useMediaRecorder as A, useMicAnalysis as B, type CanvasSink as C, DEFAULT_TELEPROMPTER_PREFS as D, useNarrationRecorder as E, type FloatOpenOptions as F, useNarrationStage as G, useTeleprompter as H, vadConfigForSensitivity as I, TELEPROMPTER_PREF_LIMITS as J, normalizeTeleprompterPrefs as K, type MicAnalysisHandle as M, type NarrationRecorderController as N, type PrompterTransport as P, type RecorderState as R, type
|
|
612
|
+
export { useMediaRecorder as A, useMicAnalysis as B, type CanvasSink as C, DEFAULT_TELEPROMPTER_PREFS as D, useNarrationRecorder as E, type FloatOpenOptions as F, useNarrationStage as G, useTeleprompter as H, vadConfigForSensitivity as I, TELEPROMPTER_PREF_LIMITS as J, normalizeTeleprompterPrefs as K, type MicAnalysisHandle as M, type NarrationRecorderController as N, type PrompterTransport as P, type RecorderState as R, type TeleprompterController as T, type UseMediaRecorderOptions as U, type CaptureKind as a, type FloatTier as b, type FloatingWindowHandle as c, type FloatingWindowManager as d, type MicAnalysisStatus as e, type NarrationRecorderState as f, type NarrationStageHandle as g, type NarrationTake as h, type RecorderAudioBitrateMode as i, type RecorderCameraLane as j, type RecorderExtendedMediaOptions as k, type RecorderSource as l, type ResolvedFormat as m, type TeleprompterPrefs as n, type TeleprompterRecordingDeps as o, type UseMediaRecorderResult as p, type UseNarrationStageOptions as q, buildFilename as r, createFloatingWindowManager as s, detectFloatTiers as t, getCaptureKind as u, resolveFormat as v, supportsDisplayMedia as w, supportsMediaRecorder as x, supportsUserMedia as y, useFloatingWindow as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq-editor-react",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.21",
|
|
4
4
|
"description": "React editor shell with raw/WYSIWYG/preview modes for Squisq documents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@bendyline/squisq": "2.11.
|
|
105
|
+
"@bendyline/squisq": "2.11.18",
|
|
106
106
|
"@bendyline/squisq-calc": "2.11.1",
|
|
107
|
-
"@bendyline/squisq-formats": "2.6.
|
|
108
|
-
"@bendyline/squisq-grid-react": "2.11.
|
|
109
|
-
"@bendyline/squisq-react": "2.11.
|
|
110
|
-
"@bendyline/squisq-video-react": "2.4.
|
|
107
|
+
"@bendyline/squisq-formats": "2.6.18",
|
|
108
|
+
"@bendyline/squisq-grid-react": "2.11.19",
|
|
109
|
+
"@bendyline/squisq-react": "2.11.20",
|
|
110
|
+
"@bendyline/squisq-video-react": "2.4.24",
|
|
111
111
|
"@fortawesome/fontawesome-free": "7.2.0",
|
|
112
112
|
"@tiptap/core": "2.27.3",
|
|
113
113
|
"@tiptap/extension-heading": "2.27.3",
|