@bendyline/squisq-editor-react 2.11.17 → 2.11.18

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.
@@ -0,0 +1,521 @@
1
+ import {
2
+ SPEECH_INPUT_SAMPLE_RATE
3
+ } from "./chunk-DNEVUOBZ.js";
4
+ import {
5
+ DEFAULT_RECORDER_DEVICE_SETTINGS,
6
+ buildRecorderAudioConstraints
7
+ } from "./chunk-LRZJD5YD.js";
8
+ import {
9
+ requestMicStream,
10
+ resolveFormat,
11
+ supportsMediaRecorder
12
+ } from "./chunk-DNJ6HOES.js";
13
+
14
+ // src/speech/microphoneSpeechActivity.ts
15
+ var SAMPLE_INTERVAL_MS = 50;
16
+ function createMicrophoneSpeechActivityMonitor(stream) {
17
+ if (typeof AudioContext === "undefined") return null;
18
+ return new WebAudioSpeechActivityMonitor(stream);
19
+ }
20
+ var WebAudioSpeechActivityMonitor = class {
21
+ constructor(stream) {
22
+ this.context = null;
23
+ this.source = null;
24
+ this.analyser = null;
25
+ this.timer = null;
26
+ this.samples = null;
27
+ this.gate = createSpeechGate();
28
+ this.stream = stream;
29
+ }
30
+ start(onActivity) {
31
+ if (this.timer !== null) return;
32
+ const context = new AudioContext();
33
+ this.context = context;
34
+ try {
35
+ const source = context.createMediaStreamSource(this.stream);
36
+ const analyser = context.createAnalyser();
37
+ analyser.fftSize = 1024;
38
+ analyser.smoothingTimeConstant = 0.15;
39
+ source.connect(analyser);
40
+ this.source = source;
41
+ this.analyser = analyser;
42
+ this.samples = new Float32Array(analyser.fftSize);
43
+ void context.resume().catch(() => void 0);
44
+ } catch (caught) {
45
+ this.stop();
46
+ throw caught;
47
+ }
48
+ this.timer = setInterval(() => {
49
+ if (!this.analyser || !this.samples) return;
50
+ this.analyser.getFloatTimeDomainData(this.samples);
51
+ const level = rootMeanSquare(this.samples);
52
+ onActivity(this.gate.step(level), level);
53
+ }, SAMPLE_INTERVAL_MS);
54
+ }
55
+ stop() {
56
+ if (this.timer !== null) {
57
+ clearInterval(this.timer);
58
+ this.timer = null;
59
+ }
60
+ this.source?.disconnect();
61
+ this.analyser?.disconnect();
62
+ this.source = null;
63
+ this.analyser = null;
64
+ this.samples = null;
65
+ const context = this.context;
66
+ this.context = null;
67
+ if (context) void context.close().catch(() => void 0);
68
+ }
69
+ };
70
+ function createSpeechGate() {
71
+ let noiseFloor = 4e-3;
72
+ let speaking = false;
73
+ return {
74
+ step(level) {
75
+ const openThreshold = Math.max(0.012, noiseFloor * 2.8);
76
+ const closeThreshold = Math.max(8e-3, noiseFloor * 1.8);
77
+ speaking = level >= (speaking ? closeThreshold : openThreshold);
78
+ if (!speaking) {
79
+ noiseFloor = Math.min(0.03, noiseFloor * 0.95 + level * 0.05);
80
+ }
81
+ return speaking;
82
+ }
83
+ };
84
+ }
85
+ function rootMeanSquare(samples) {
86
+ if (samples.length === 0) return 0;
87
+ let sum = 0;
88
+ for (const sample of samples) sum += sample * sample;
89
+ return Math.sqrt(sum / samples.length);
90
+ }
91
+
92
+ // src/speech/progressiveSpeechToText.ts
93
+ var DEFAULT_SEGMENT_MS = 2500;
94
+ var DEFAULT_SPEECH_PAUSE_MS = 350;
95
+ var DEFAULT_MIN_SEGMENT_MS = 650;
96
+ var DEFAULT_LONG_PAUSE_MS = 1e4;
97
+ var MAX_RECOGNITION_PROMPT_CHARS = 1e3;
98
+ var ProgressiveSpeechToText = class {
99
+ constructor(options) {
100
+ this.abortController = new AbortController();
101
+ this.activityMonitorStarted = false;
102
+ this.recorder = null;
103
+ this.chunks = [];
104
+ this.segmentTimer = null;
105
+ this.transcriptionQueue = Promise.resolve();
106
+ this.pending = 0;
107
+ this.stopPromise = null;
108
+ this.resolveStop = null;
109
+ this.finalSegmentRequested = false;
110
+ this.segmentStartedAt = 0;
111
+ this.segmentHasSpeech = false;
112
+ this.currentlySpeaking = false;
113
+ this.lastSpeechAt = null;
114
+ this.confirmedSilenceMs = 0;
115
+ this.recognitionPrompt = "";
116
+ this.hasTranscript = false;
117
+ this.longPauseNotified = false;
118
+ this.disposed = false;
119
+ this.stream = options.stream;
120
+ this.mimeType = options.mimeType ?? "";
121
+ this.segmentMs = options.segmentMs ?? DEFAULT_SEGMENT_MS;
122
+ this.speechPauseMs = options.speechPauseMs ?? DEFAULT_SPEECH_PAUSE_MS;
123
+ this.minSegmentMs = options.minSegmentMs ?? DEFAULT_MIN_SEGMENT_MS;
124
+ this.longPauseMs = options.longPauseMs ?? DEFAULT_LONG_PAUSE_MS;
125
+ this.activityMonitor = options.activityMonitor === void 0 ? createMicrophoneSpeechActivityMonitor(options.stream) : options.activityMonitor;
126
+ this.transcribe = options.transcribe;
127
+ this.onTranscript = options.onTranscript;
128
+ this.onError = options.onError;
129
+ this.onLongPause = options.onLongPause;
130
+ this.onAudioLevel = options.onAudioLevel;
131
+ this.onPendingChange = options.onPendingChange;
132
+ }
133
+ start() {
134
+ if (this.disposed || this.recorder) return;
135
+ this.startSegment();
136
+ this.startActivityMonitor();
137
+ }
138
+ /** Stop capture, release the microphone, and wait for queued STT work. */
139
+ stop() {
140
+ if (this.stopPromise) return this.stopPromise;
141
+ this.finalSegmentRequested = true;
142
+ this.stopActivityMonitor();
143
+ this.clearSegmentTimer();
144
+ this.stopPromise = new Promise((resolve) => {
145
+ this.resolveStop = resolve;
146
+ });
147
+ const recorder = this.recorder;
148
+ if (recorder?.state === "recording") {
149
+ recorder.stop();
150
+ } else if (!recorder) {
151
+ void this.finish();
152
+ }
153
+ return this.stopPromise;
154
+ }
155
+ /** Tear down without delivering any more transcription callbacks. */
156
+ cancel() {
157
+ if (this.disposed) return;
158
+ this.disposed = true;
159
+ this.abortController.abort();
160
+ this.stopActivityMonitor();
161
+ this.clearSegmentTimer();
162
+ const recorder = this.recorder;
163
+ this.recorder = null;
164
+ if (recorder) {
165
+ recorder.ondataavailable = null;
166
+ recorder.onstop = null;
167
+ recorder.onerror = null;
168
+ if (recorder.state !== "inactive") {
169
+ try {
170
+ recorder.stop();
171
+ } catch {
172
+ }
173
+ }
174
+ }
175
+ this.releaseStream();
176
+ this.resolveStop?.();
177
+ this.resolveStop = null;
178
+ }
179
+ startSegment() {
180
+ if (this.disposed || this.finalSegmentRequested) return;
181
+ const recorderOptions = this.mimeType ? { mimeType: this.mimeType } : void 0;
182
+ const recorder = new MediaRecorder(this.stream, recorderOptions);
183
+ this.recorder = recorder;
184
+ this.chunks = [];
185
+ this.segmentStartedAt = Date.now();
186
+ this.segmentHasSpeech = this.currentlySpeaking;
187
+ recorder.ondataavailable = (event) => {
188
+ if (!this.disposed && event.data.size > 0) this.chunks.push(event.data);
189
+ };
190
+ recorder.onerror = (event) => {
191
+ const error = event.error;
192
+ this.onError(error ?? new Error("Microphone recording failed."));
193
+ this.finalSegmentRequested = true;
194
+ this.clearSegmentTimer();
195
+ };
196
+ recorder.onstop = () => {
197
+ if (this.disposed || this.recorder !== recorder) return;
198
+ this.recorder = null;
199
+ const type = recorder.mimeType || this.mimeType || "audio/webm";
200
+ const blob = new Blob(this.chunks, { type });
201
+ const capturedMs = Math.max(0, Date.now() - this.segmentStartedAt);
202
+ this.chunks = [];
203
+ if (!this.finalSegmentRequested) this.startSegment();
204
+ if (blob.size > 0) this.enqueueTranscription(blob, type, capturedMs);
205
+ if (this.finalSegmentRequested) void this.finish();
206
+ };
207
+ recorder.start();
208
+ this.segmentTimer = setTimeout(() => {
209
+ this.segmentTimer = null;
210
+ if (!this.disposed && !this.finalSegmentRequested && recorder.state === "recording") {
211
+ recorder.stop();
212
+ }
213
+ }, this.segmentMs);
214
+ }
215
+ startActivityMonitor() {
216
+ if (!this.activityMonitor || this.activityMonitorStarted) return;
217
+ try {
218
+ this.activityMonitor.start((speaking, level) => {
219
+ this.onAudioLevel?.(level);
220
+ this.onSpeechActivity(speaking);
221
+ });
222
+ this.activityMonitorStarted = true;
223
+ } catch {
224
+ this.activityMonitor.stop();
225
+ this.activityMonitor = null;
226
+ }
227
+ }
228
+ stopActivityMonitor() {
229
+ this.activityMonitor?.stop();
230
+ }
231
+ onSpeechActivity(speaking) {
232
+ if (this.disposed || this.finalSegmentRequested) return;
233
+ const now = Date.now();
234
+ this.currentlySpeaking = speaking;
235
+ if (speaking) {
236
+ this.segmentHasSpeech = true;
237
+ this.lastSpeechAt = now;
238
+ this.longPauseNotified = false;
239
+ return;
240
+ }
241
+ if (this.lastSpeechAt === null) return;
242
+ const silenceMs = now - this.lastSpeechAt;
243
+ if (this.segmentHasSpeech && now - this.segmentStartedAt >= this.minSegmentMs && silenceMs >= this.speechPauseMs) {
244
+ this.flushCurrentSegment();
245
+ }
246
+ }
247
+ flushCurrentSegment() {
248
+ const recorder = this.recorder;
249
+ if (!recorder || recorder.state !== "recording") return;
250
+ this.clearSegmentTimer();
251
+ recorder.stop();
252
+ }
253
+ setPending(next) {
254
+ this.pending = next;
255
+ if (!this.disposed) this.onPendingChange?.(next);
256
+ }
257
+ enqueueTranscription(blob, mimeType, capturedMs) {
258
+ this.setPending(this.pending + 1);
259
+ this.transcriptionQueue = this.transcriptionQueue.then(async () => {
260
+ if (this.disposed) return;
261
+ try {
262
+ const text = normalizeSpeechTranscript(
263
+ await this.transcribe(
264
+ blob,
265
+ mimeType,
266
+ this.abortController.signal,
267
+ this.recognitionPrompt
268
+ )
269
+ );
270
+ if (this.disposed) return;
271
+ if (text) {
272
+ this.confirmedSilenceMs = 0;
273
+ this.hasTranscript = true;
274
+ this.longPauseNotified = false;
275
+ this.recognitionPrompt = extendRecognitionPrompt(this.recognitionPrompt, text);
276
+ this.onTranscript(text);
277
+ return;
278
+ }
279
+ this.confirmedSilenceMs += capturedMs;
280
+ if (!this.longPauseNotified && this.onLongPause && this.confirmedSilenceMs >= this.longPauseMs) {
281
+ this.longPauseNotified = true;
282
+ this.onLongPause(this.hasTranscript);
283
+ }
284
+ } catch (caught) {
285
+ if (this.disposed || this.abortController.signal.aborted) return;
286
+ this.onError(caught instanceof Error ? caught : new Error(String(caught)));
287
+ } finally {
288
+ this.setPending(Math.max(0, this.pending - 1));
289
+ }
290
+ });
291
+ }
292
+ async finish() {
293
+ this.clearSegmentTimer();
294
+ this.stopActivityMonitor();
295
+ this.releaseStream();
296
+ await this.transcriptionQueue;
297
+ if (this.disposed) return;
298
+ this.disposed = true;
299
+ this.resolveStop?.();
300
+ this.resolveStop = null;
301
+ }
302
+ clearSegmentTimer() {
303
+ if (this.segmentTimer === null) return;
304
+ clearTimeout(this.segmentTimer);
305
+ this.segmentTimer = null;
306
+ }
307
+ releaseStream() {
308
+ for (const track of this.stream.getTracks()) track.stop();
309
+ }
310
+ };
311
+ function normalizeSpeechTranscript(value) {
312
+ const text = value.trim();
313
+ return /^\[\s*BLANK_AUDIO\s*\]$/i.test(text) ? "" : text;
314
+ }
315
+ function extendRecognitionPrompt(previous, transcript) {
316
+ const combined = `${previous.trim()} ${transcript.trim()}`.trim();
317
+ if (combined.length <= MAX_RECOGNITION_PROMPT_CHARS) return combined;
318
+ const tail = combined.slice(-MAX_RECOGNITION_PROMPT_CHARS);
319
+ const firstWhitespace = tail.search(/\s/);
320
+ return (firstWhitespace >= 0 ? tail.slice(firstWhitespace + 1) : tail).trim();
321
+ }
322
+
323
+ // src/speech/speechAudioWav.ts
324
+ async function microphoneTakeAsWav(blob) {
325
+ const encoded = await blobBytes(blob);
326
+ let audio;
327
+ try {
328
+ audio = await decodeAt16k(encoded);
329
+ } catch (caught) {
330
+ const detail = caught instanceof Error && caught.message ? ` (${caught.message})` : "";
331
+ throw new Error(`This recording could not be prepared for speech recognition${detail}`);
332
+ }
333
+ const channels = Array.from(
334
+ { length: audio.numberOfChannels },
335
+ (_, index) => audio.getChannelData(index)
336
+ );
337
+ const mono = downmixToMono(channels);
338
+ const samples = audio.sampleRate === SPEECH_INPUT_SAMPLE_RATE ? mono : resampleLinear(mono, audio.sampleRate, SPEECH_INPUT_SAMPLE_RATE);
339
+ return encodeMonoPcm16Wav([samples], SPEECH_INPUT_SAMPLE_RATE).buffer;
340
+ }
341
+ function blobBytes(blob) {
342
+ if (typeof blob.arrayBuffer === "function") return blob.arrayBuffer();
343
+ return new Promise((resolve, reject) => {
344
+ const reader = new FileReader();
345
+ reader.onload = () => {
346
+ const result = reader.result;
347
+ if (result instanceof ArrayBuffer) resolve(result);
348
+ else reject(new Error("The recording could not be read."));
349
+ };
350
+ reader.onerror = () => reject(reader.error ?? new Error("The recording could not be read."));
351
+ reader.readAsArrayBuffer(blob);
352
+ });
353
+ }
354
+ async function decodeAt16k(encoded) {
355
+ if (typeof OfflineAudioContext !== "undefined") {
356
+ let offline = null;
357
+ try {
358
+ offline = new OfflineAudioContext(1, 1, SPEECH_INPUT_SAMPLE_RATE);
359
+ } catch {
360
+ offline = null;
361
+ }
362
+ if (offline) return offline.decodeAudioData(encoded);
363
+ }
364
+ if (typeof AudioContext === "undefined") {
365
+ throw new Error("Web Audio is unavailable");
366
+ }
367
+ const context = new AudioContext();
368
+ try {
369
+ return await context.decodeAudioData(encoded);
370
+ } finally {
371
+ await context.close().catch(() => void 0);
372
+ }
373
+ }
374
+ function downmixToMono(channels) {
375
+ const sampleCount = channels[0]?.length ?? 0;
376
+ if (channels.length === 0 || sampleCount === 0) {
377
+ throw new Error("The microphone recording was empty.");
378
+ }
379
+ if (channels.length === 1) return channels[0];
380
+ if (channels.some((channel) => channel.length !== sampleCount)) {
381
+ throw new Error("The microphone recording channels have different lengths.");
382
+ }
383
+ const mono = new Float32Array(sampleCount);
384
+ for (let index = 0; index < sampleCount; index += 1) {
385
+ let sum = 0;
386
+ for (const channel of channels) sum += channel[index] ?? 0;
387
+ mono[index] = sum / channels.length;
388
+ }
389
+ return mono;
390
+ }
391
+ function resampleLinear(samples, fromRate, toRate) {
392
+ if (!Number.isFinite(fromRate) || fromRate <= 0 || !Number.isFinite(toRate) || toRate <= 0) {
393
+ throw new Error("The microphone recording has an invalid sample rate.");
394
+ }
395
+ if (fromRate === toRate) return samples;
396
+ const outputLength = Math.max(1, Math.round(samples.length * toRate / fromRate));
397
+ const output = new Float32Array(outputLength);
398
+ const step = fromRate / toRate;
399
+ for (let index = 0; index < outputLength; index += 1) {
400
+ const position = index * step;
401
+ const left = Math.floor(position);
402
+ const right = Math.min(left + 1, samples.length - 1);
403
+ const fraction = position - left;
404
+ const a = samples[Math.min(left, samples.length - 1)] ?? 0;
405
+ const b = samples[right] ?? 0;
406
+ output[index] = a + (b - a) * fraction;
407
+ }
408
+ return output;
409
+ }
410
+ function encodeMonoPcm16Wav(channels, sampleRate) {
411
+ const sampleCount = channels[0]?.length ?? 0;
412
+ if (channels.length === 0 || sampleCount === 0) {
413
+ throw new Error("The microphone recording was empty.");
414
+ }
415
+ if (!Number.isFinite(sampleRate) || sampleRate <= 0) {
416
+ throw new Error("The microphone recording has an invalid sample rate.");
417
+ }
418
+ if (channels.some((channel) => channel.length !== sampleCount)) {
419
+ throw new Error("The microphone recording channels have different lengths.");
420
+ }
421
+ const rate = Math.round(sampleRate);
422
+ const bytesPerSample = 2;
423
+ const dataBytes = sampleCount * bytesPerSample;
424
+ const buffer = new ArrayBuffer(44 + dataBytes);
425
+ const view = new DataView(buffer);
426
+ writeAscii(view, 0, "RIFF");
427
+ view.setUint32(4, 36 + dataBytes, true);
428
+ writeAscii(view, 8, "WAVE");
429
+ writeAscii(view, 12, "fmt ");
430
+ view.setUint32(16, 16, true);
431
+ view.setUint16(20, 1, true);
432
+ view.setUint16(22, 1, true);
433
+ view.setUint32(24, rate, true);
434
+ view.setUint32(28, rate * bytesPerSample, true);
435
+ view.setUint16(32, bytesPerSample, true);
436
+ view.setUint16(34, 16, true);
437
+ writeAscii(view, 36, "data");
438
+ view.setUint32(40, dataBytes, true);
439
+ for (let index = 0; index < sampleCount; index += 1) {
440
+ let mono = 0;
441
+ for (const channel of channels) mono += channel[index] ?? 0;
442
+ mono = Math.max(-1, Math.min(1, mono / channels.length));
443
+ const pcm = mono < 0 ? Math.round(mono * 32768) : Math.round(mono * 32767);
444
+ view.setInt16(44 + index * bytesPerSample, pcm, true);
445
+ }
446
+ return new Uint8Array(buffer);
447
+ }
448
+ function writeAscii(view, offset, value) {
449
+ for (let index = 0; index < value.length; index += 1) {
450
+ view.setUint8(offset + index, value.charCodeAt(index));
451
+ }
452
+ }
453
+
454
+ // src/speech/dictationSession.ts
455
+ function dictationAudioConstraints(settings = DEFAULT_RECORDER_DEVICE_SETTINGS) {
456
+ return {
457
+ ...buildRecorderAudioConstraints(settings),
458
+ echoCancellation: true,
459
+ noiseSuppression: true,
460
+ autoGainControl: true
461
+ };
462
+ }
463
+ function abortError() {
464
+ const error = new Error("Dictation was cancelled.");
465
+ error.name = "AbortError";
466
+ return error;
467
+ }
468
+ async function startDictationSession(options) {
469
+ const { provider, signal } = options;
470
+ if (!supportsMediaRecorder()) {
471
+ throw new Error("MediaRecorder is not defined in this environment.");
472
+ }
473
+ const ready = provider.prepare ? Promise.resolve().then(() => provider.prepare?.(signal)) : Promise.resolve();
474
+ ready.catch(() => void 0);
475
+ const stream = await requestMicStream(dictationAudioConstraints(options.deviceSettings));
476
+ if (signal.aborted) {
477
+ for (const track of stream.getTracks()) track.stop();
478
+ throw abortError();
479
+ }
480
+ const format = resolveFormat("audio");
481
+ const engine = new ProgressiveSpeechToText({
482
+ stream,
483
+ ...format.mimeType ? { mimeType: format.mimeType } : {},
484
+ transcribe: async (blob, _mimeType, takeSignal, prompt) => {
485
+ await ready;
486
+ const wav = await microphoneTakeAsWav(blob);
487
+ const result = await provider.transcribe(wav, {
488
+ signal: takeSignal,
489
+ ...prompt ? { prompt } : {}
490
+ });
491
+ return typeof result?.text === "string" ? result.text : "";
492
+ },
493
+ onTranscript: options.onTranscript,
494
+ onAudioLevel: options.onAudioLevel,
495
+ onPendingChange: options.onPendingChange,
496
+ onLongPause: options.onLongPause,
497
+ onError: (error) => {
498
+ engine.cancel();
499
+ options.onError(error);
500
+ }
501
+ });
502
+ ready.catch((caught) => {
503
+ if (signal.aborted) return;
504
+ engine.cancel();
505
+ options.onError(caught instanceof Error ? caught : new Error(String(caught)));
506
+ });
507
+ const onAbort = () => engine.cancel();
508
+ signal.addEventListener("abort", onAbort, { once: true });
509
+ engine.start();
510
+ return {
511
+ stop: () => engine.stop(),
512
+ cancel: () => {
513
+ signal.removeEventListener("abort", onAbort);
514
+ engine.cancel();
515
+ }
516
+ };
517
+ }
518
+ export {
519
+ dictationAudioConstraints,
520
+ startDictationSession
521
+ };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CodeContext, E as EditorHostMode, S as SceneTextChannel, a as CalcEngineFactory, b as CsvSourceMeta, X as XlsxSourceMeta, F as FormulaEditRecord } from './shell-X0EoQbbN.js';
2
- export { B as BlockRange, c as BlockSlice, d as BlockTagVisibility, e as CodeContextSection, f as CoverImageSaveOutput, D as DashboardImageSaveOutput, g as DocumentLinkCandidate, h as DocumentLinkProvider, i as EditorActions, j as EditorColorScheme, k as EditorContextMenuContext, l as EditorContextMenuItem, m as EditorContextMenuItemVisibility, n as EditorContextMenuProvider, o as EditorContextMenuProviderProps, p as EditorContextValue, q as EditorMode, r as EditorProvider, s as EditorProviderProps, t as EditorSelectionInfo, u as EditorShell, v as EditorShellProps, w as EditorState, x as EditorView, y as FormulaSessionOptions, I as ImageDisplayMode, z as IngestedSidecar, L as LayoutMode, M as MentionCandidate, A as MentionProvider, P as PreviewPanel, G as PreviewPanelProps, R as RawEditor, H as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, W as WriteCanvasSettings, J as WysiwygEditor, K as WysiwygEditorProps, N as XLSX_LOCKED_REASON, O as XlsxFormulaSession, Q as createXlsxFormulaSession, U as getBlockSlices, Y as ingestSidecarBytes, Z as lineToOffset, _ as offsetToLine, $ as sliceIndexAtOffset, a0 as spliceBlock, a1 as useEditorContext, a2 as useEditorContextMenuItems } from './shell-X0EoQbbN.js';
1
+ import { C as CodeContext, E as EditorHostMode, S as SceneTextChannel, a as CalcEngineFactory, b as CsvSourceMeta, X as XlsxSourceMeta, F as FormulaEditRecord } from './shell-Cb0P_ln8.js';
2
+ export { A as ApplySourceEditsOptions, B as BlockInsertionBuilder, c as BlockInsertionContext, d as BlockPlacement, e as BlockRange, f as BlockSlice, g as BlockTagVisibility, h as CodeContextSection, i as CoverImageSaveOutput, D as DashboardImageSaveOutput, j as DocumentLinkCandidate, k as DocumentLinkProvider, l as EditorActions, m as EditorColorScheme, n as EditorContextMenuContext, o as EditorContextMenuItem, p as EditorContextMenuItemVisibility, q as EditorContextMenuProvider, r as EditorContextMenuProviderProps, s as EditorContextValue, t as EditorMode, u as EditorProvider, v as EditorProviderProps, w as EditorSelectionInfo, x as EditorShell, y as EditorShellProps, z as EditorState, G as EditorView, H as FormulaSessionOptions, I as ImageDisplayMode, J as IngestedSidecar, K as InsertBlockOptions, L as LayoutMode, M as MentionCandidate, N as MentionProvider, O as OutlineBlock, P as OutlineInsertion, Q as PreviewPanel, R as PreviewPanelProps, T as RawEditor, U as RawEditorProps, V as ThemeInheritance, W as ViewPreferences, Y as WriteCanvasSettings, Z as WysiwygEditor, _ as WysiwygEditorProps, $ as XLSX_LOCKED_REASON, a0 as XlsxFormulaSession, a1 as applySourceEditsToText, a2 as blockInsertionPoint, a3 as createXlsxFormulaSession, a4 as getBlockSlices, a5 as headingDepthForInsertion, a6 as ingestSidecarBytes, a7 as joinBlockAt, a8 as lineToOffset, a9 as minimalReplaceEdit, aa as normalizeSourceEdits, ab as offsetToLine, ac as resolveOutlineInsertion, ad as sliceIndexAtOffset, ae as sourceOutline, af as spliceBlock, ag as useEditorContext, ah as useEditorContextMenuItems } from './shell-Cb0P_ln8.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, CSSProperties, ReactElement } from 'react';
@@ -11,6 +11,7 @@ import { IconFamily } from '@bendyline/squisq/icons';
11
11
  import { CoverSlideTemplate, CoverSlidePlayback, DashboardStyleId, DashboardLayoutSummary, ConnectorRouting, AsciiDiagram, Tree, AsciiTimeline, AsciiTimelineSide, AsciiTimelineMarker } from '@bendyline/squisq/doc';
12
12
  export { BuildPreviewDocOptions, buildPreviewDoc, documentTitleFromFileName } from '@bendyline/squisq/doc';
13
13
  import { MarkdownWrapState } from '@bendyline/squisq/markdown';
14
+ export { MarkdownSourceEdit } from '@bendyline/squisq/markdown';
14
15
  import * as monaco_editor from 'monaco-editor';
15
16
  import { M as MonacoLanguageRequest, a as MonacoLanguageLoadOptions } from './monacoLanguageDetection-DEyUW-BS.js';
16
17
  export { MonacoWorkerConstructor, MonacoWorkerConstructors, configureMonacoWorkers } from './monaco-workers/index.js';
@@ -29,10 +30,11 @@ export { JsonEditor, JsonEditorProps } from './json-editor/index.js';
29
30
  export { C as CameraStreamOptions, D as DEFAULT_RECORDER_DEVICE_SETTINGS, M as MediaDeviceInventory, R as RecordedBookmark, a as RecordedMediaKind, b as RecorderAudioDeviceSettings, c as RecorderButton, d as RecorderButtonProps, e as RecorderCameraDeviceSettings, f as RecorderCameraSaveResult, g as RecorderColorScheme, h as RecorderConstraintMode, i as RecorderDeviceOption, j as RecorderDeviceQuickPicks, k as RecorderDeviceQuickPicksProps, l as RecorderDeviceSettings, m as RecorderDeviceSettingsPanel, n as RecorderDeviceSettingsPanelProps, o as RecorderEncodingSettings, p as RecorderModal, q as RecorderModalProps, r as RecorderNarrationOptions, s as RecorderPanel, t as RecorderPanelProps, u as RecorderSaveResult, v as RecorderScreenAudioSettings, w as RecorderScreenDeviceSettings, x as RecorderSlidesOptions, S as ScreenStreamHandle, y as ScreenStreamOptions, z as SlideTimingSaveResult, T as TimingJson, A as buildRecorderAudioConstraints, B as buildRecorderCameraConstraints, E as buildRecorderScreenAudioConstraints, F as buildRecorderScreenConstraints, G as buildTimingJson, H as encodeTimingJson, I as hasRecorderDeviceChoice, J as recordedMediaKind, K as recorderBitsPerSecond, L as recorderDeviceGroups, N as recorderDeviceOptions, O as requestCameraStream, P as requestMicStream, Q as requestScreenStream, U as timingPathFor, V as useMediaDevices, W as useStreamPreview } from './recorder-CRsw0eC7.js';
30
31
  import { R as RecorderState } from './useNarrationStage-vKtk6H-V.js';
31
32
  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, i as RecorderAudioBitrateMode, j as RecorderCameraLane, k as RecorderExtendedMediaOptions, l as RecorderSource, 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-vKtk6H-V.js';
32
- 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';
33
+ export { EYE_LINE_FRACTION, ExecuteNarrationSaveDeps, NarrationSavePlan, NarrationSavePlanArgs, NarrationSaveProgress, 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';
33
34
  export { H as HarperProofingConfig, a as ProofingCapability, b as ProofingDocumentRef, c as ProofingIgnoreStore, d as ProofingLanguage, e as ProofingLintOptions, P as ProofingProvider, f as ProofingProviderFactory } from './types-De4z-gGb.js';
34
35
  export { createHarperProofingProvider } from './proofing/index.js';
35
36
  export { PROOF_DIALECTS, PROOF_FRONTMATTER_KEYS, ProofCategory, ProofDialect, ProofFinding, ProofRange, ProofSuggestion, ProofSuggestionKind } from '@bendyline/squisq/proof';
37
+ export { DictationControl, SPEECH_INPUT_SAMPLE_RATE, SpeechInputCapability, SpeechInputProvider, SpeechInputProviderFactory, SpeechInputReadiness, SpeechInputReadinessState, SpeechInputTranscribeOptions, SpeechInputTranscript, isSpeechInputProviderFactory, resolveSpeechInputProvider } from './speech/index.js';
36
38
  import '@bendyline/squisq-calc';
37
39
  import '@bendyline/squisq-formats/xlsx';
38
40
  import '@bendyline/squisq/versions';
@@ -851,6 +853,13 @@ interface ThemeDesignerConfig {
851
853
  onClose: () => void;
852
854
  }
853
855
  declare function usePreviewSettings(): PreviewSettings;
856
+ /**
857
+ * Like {@link usePreviewSettings} but returns `null` when no provider is
858
+ * mounted. For consumers (e.g. WysiwygEditor) that want to react to the
859
+ * active theme when available without forcing every test harness to
860
+ * wrap them in a PreviewSettingsProvider.
861
+ */
862
+ declare function usePreviewSettingsOptional(): PreviewSettings | null;
854
863
  interface PreviewSettingsProviderProps {
855
864
  doc: Doc | null;
856
865
  children: ReactNode;
@@ -2490,6 +2499,20 @@ interface MermaidRenderResult extends Pick<RenderResult, 'svg' | 'diagramType'>
2490
2499
  * the editor, preventing authored links/callbacks from hijacking editing.
2491
2500
  */
2492
2501
  declare function renderMermaidDiagram(id: string, source: string, container?: Element, theme?: Theme): Promise<MermaidRenderResult>;
2502
+ /** Outcome of {@link validateMermaidSource}. */
2503
+ type MermaidValidationResult = {
2504
+ ok: true;
2505
+ diagramType: string;
2506
+ } | {
2507
+ ok: false;
2508
+ message: string;
2509
+ };
2510
+ /**
2511
+ * Check that Mermaid can parse `source`, without rendering or measuring
2512
+ * anything. Runs on the shared work queue like rendering, since parsing uses
2513
+ * the same diagram databases. `message` is Mermaid's own error, trimmed.
2514
+ */
2515
+ declare function validateMermaidSource(source: string): Promise<MermaidValidationResult>;
2493
2516
  /** Inspect the subset Mermaid exposes as structured flowchart nodes/edges. */
2494
2517
  declare function inspectMermaidSource(source: string): Promise<MermaidEditableModel | null>;
2495
2518
  declare function mermaidErrorMessage(error: unknown): string;
@@ -3343,4 +3366,4 @@ declare function unshownSlidesWarning(total: number, unshown: number): string |
3343
3366
  /** The exact label of the review-state block-timings checkbox. */
3344
3367
  declare const SLIDE_TIMING_CHECKBOX_LABEL = "Update block timings when I save this narration";
3345
3368
 
3346
- export { ALL_PICKER_ENTRIES, type AddTimelineEventOptions, type AddTimelineEventResult, type ApplyAsciiDiagramCommandOptions, type AsciiDiagramBlockEntry, AsciiDiagramExtension, type AsciiDiagramExtensionOptions, type AsciiDiagramPluginState, type AsciiDiagramView, AsciiDiagramWidget, BlockCardView, type BlockCardViewProps, type BlockNavigator, BlockPropertiesPopover, type BlockPropertiesPopoverProps, CODE_SNIPPET_KEY, CODE_SNIPPET_LANGUAGES, CalcEngineFactory, CodeContext, CodeContextZones, type CodeSnippetBlockEntry, type CodeSnippetData, CodeSnippetExtension, type CodeSnippetExtensionOptions, type CodeSnippetLanguage, type CodeSnippetPluginState, CodeSnippetWidget, type CodeSnippetWidgetProps, CsvSourceMeta, type CustomTemplateContextValue, CustomTemplateProvider, type CustomTemplateProviderProps, type CustomThemeContextValue, CustomThemeProvider, type CustomThemeProviderProps, DATA_CARD_KEY, DEFAULT_MERMAID_DIAGRAM_TYPE, type DataCardBlockEntry, DataCardExtension, type DataCardExtensionOptions, type DataCardPluginState, DataCardWidget, type DataPreview, DiagramCanvas, type DiagramCommand, type DiagramData, type DiagramEdge, type DiagramNode, type DirectionModel, type DocCustomTemplates, type DocCustomThemes, DocumentSettingsDialog, type DocumentSettingsDialogProps, type DragContentType, type DropTarget, DropZoneOverlay, type DropZoneOverlayProps, EMPTY_TRANSITION, EditorHostMode, EmojiPicker, type EmojiPickerProps, FENCE_WIDGET_CONTAINED_EVENTS, type FenceBlockEntry, type FileCategory, type FileKind, type FolderEntry, FolderView, type FolderViewProps, FormulaEditRecord, type GridSaveResult, HOST_FENCE_KEY, type HeadingTransitionAttrs, type HeadingViewBinding, HeadingWithTemplate, type HostFenceBlockEntry, HostFenceExtension, type HostFenceExtensionOptions, type HostFencePluginState, ImportThemeSection, type ImportThemeSectionProps, type ImportedThemeResult, InlinePreviewGutter, type InlinePreviewGutterProps, MERMAID_DIAGRAM_KEY, MERMAID_DIAGRAM_TYPES, MERMAID_FLOWCHART_SHAPES, MarkdownEscape, MediaBin, type MediaBinProps, type MediaClipPatch, type MermaidDiagramBlockEntry, MermaidDiagramCanvas, type MermaidDiagramCanvasProps, type MermaidDiagramCategory, type MermaidDiagramData, MermaidDiagramExtension, type MermaidDiagramExtensionOptions, type MermaidDiagramPluginState, type MermaidDiagramPreview, type MermaidDiagramProperty, type MermaidDiagramType, MermaidDiagramTypeThumbnail, MermaidDiagramWidget, type MermaidDiagramWidgetProps, type MermaidEditCapabilities, type MermaidEditableDiagramKind, type MermaidEditableEdge, type MermaidEditableModel, type MermaidEditableNode, type MermaidEditableText, type MermaidEditableTextTarget, type MermaidFlowchartDirection, type MermaidFlowchartModel, type MermaidFlowchartShape, type MermaidFlowchartShapeId, type MermaidNodeCanvasAction, type MermaidRenderResult, type MermaidSelection, MermaidShapePalette, type MermaidShapePaletteProps, type MermaidSourceEditableModel, type MermaidSurfaceScheme, MonacoLanguageLoadOptions, MonacoLanguageRequest, OutlinePanel, type OutlinePanelProps, PICKER_CATEGORIES, type PickerCategory, type PickerEntry, PlainHtmlPreview, type PlainHtmlPreviewProps, PreviewFormatSwitch, PreviewModeMenu, PreviewModeSwitch, type PreviewSettings, PreviewSettingsProvider, PreviewToolbarControls, type PreviewToolbarControlsProps, REPAIRABLE_KEY, type RecorderPanelMode, type RecorderSlide, RecorderSlidesPanel, type RecorderSlidesPanelProps, RecorderState, type RepairableBlockEntry, RepairableDiagramExtension, type RepairableDiagramExtensionOptions, type RepairablePluginState, SLIDE_TIMING_CHECKBOX_LABEL, type SaveCsvEditsOptions, type SaveXlsxEditsOptions, StatusBar, type StatusBarProps, Subscript, Superscript, TIMELINE_VIEW_KEY, TRANSITION_ENTRIES, TRANSITION_GROUPS, TemplatePicker, ThemeCustomizerPanel, type ThemeCustomizerPanelProps, ThemePicker, type ThemePickerProps, type ThemeSaveExtras, type TimelineBlockEntry, type TimelineCommand, type TimelineCommandResult, TimelineCompositionPanel, type TimelineCompositionPanelProps, TimelineEditorWidget, type TimelineEditorWidgetProps, type TimelineEventPatch, TimelineToolbar, type TimelineToolbarProps, TimelineTrack, type TimelineTrackProps, TimelineVideoPanel, type TimelineVideoPanelProps, type TimelineViewData, TimelineViewExtension, type TimelineViewExtensionOptions, type TimelineViewPluginState, Toolbar, type ToolbarProps, TooltipLayer, TransformMenu, type TransitionCatalogEntry, type TransitionFields, type TransitionGroup, TransitionPicker, type TransitionPickerProps, type TreeBlockEntry, type TreeCommand, TreeOutlineWidget, type TreeViewData, TreeViewExtension, type TreeViewExtensionOptions, type TreeViewPluginState, type UseBlockNavigatorOptions, type UseFileDropOptions, type UseFileDropResult, type UseMonacoLoaderResult, VersionHistoryPanel, ViewMenuPanel, ViewSwitcher, type ViewSwitcherProps, type WrapPolicyIngest, XlsxSourceMeta, adaptThemeToSurface, addEdgeOp, addItemOp, addNodeOp, addTimelineEventOp, applyAsciiDiagramCommand, applyRepairCommand, applyTimelineCommand, applyTreeCommand, asciiDiagramToCanvas, buildRecorderSlideDeck, clampSlideIndex, classifyFile, codeSnippetFenceLanguageToken, codeSnippetLanguageLabel, codeSnippetMarkdown, containFenceWidgetEvents, dataExtensionOf, dataLinkHrefOf, detectLanguageFromFileName, draftPatchFromImportedTheme, findAsciiDiagramBlockPos, findCodeSnippetBlockPos, findDataCardBlockPos, findHostFenceBlockPos, findMermaidDiagramBlockPos, findOwningHeadingPosition, findRepairableBlockPos, findTimelineBlockPos, findTransitionEntry, findTreeBlockPos, formatSeconds, getTimelineForNode, indentItemOp, ingestForWrite, inspectMermaidSource, isAsciiSourceVisible, isCodeSnippetFenceLanguage, isCodeSnippetNode, isExpandedPanel, isMermaidDiagramNode, isMermaidFlowchartShapeId, isMermaidSourceVisible, isRepairableFence, isTimelineSourceSafeForSemanticEdit, loadDataPreview, mapFenceEntries, markdownToTiptap, mermaidDiagramMarkdown, mermaidDiagramProperties, mermaidEditCapabilities, mermaidEditableTexts, mermaidErrorMessage, mermaidSurfaceScheme, monacoLanguageForFence, moveItemDownOp, moveItemUpOp, moveNodeOp, nextTimelineEventId, normalizeMermaidFlowchartShape, outdentItemOp, panelModeAfterToggle, parseTimelineForNode, partitionFiles, persistFromWrite, preloadMonaco, preloadMonacoSuggestions, processDataFiles, processMediaFiles, processTextFile, processTextFiles, readBlockAttrsParams, readBlockAttrsTransition, readBlockAttrsValue, readHeadingLineTransition, readHeadingViewBinding, removeEdgeOp, removeItemOp, removeNodeOp, removeTimelineEventOp, renameItemOp, renameNodeOp, renderMermaidDiagram, replaceAsciiFenceText, replaceCodeSnippetText, replaceHostFenceText, replaceAsciiFenceText as replaceTreeFenceText, resizeNodeOp, resolveFileKind, resolveMermaidSurfaceTheme, sanitizeAsciiLabel, sanitizeTimelineText, sanitizeTreeLabel, saveCsvEdits, saveXlsxEdits, searchPickerEntries, setBlockAttrsValue, setBlockDurationInSource, setBlockStartTimeInSource, setBlockTransitionInSource, setHeadingAttrsTransition, setHeadingLineTransition, setMediaClipInSource, shouldPasteAsAsciiFence, shouldPasteAsTimelineFence, shouldPasteAsTreeFence, showSlideTimingCheckbox, slideStepForKey, summarizeBlockProps, templateLabel, tiptapToMarkdown, toggleAsciiSource, toggleDirOp, toggleMermaidSource, transitionLabel, translateDiagramOp, unshownSlidesWarning, updateTimelineEventOp, useAsciiDiagramData, useBlockNavigator, useCodeSnippetData, useCustomTemplates, useCustomThemes, useDocCustomTemplates, useDocCustomThemes, useFileDrop, useMermaidDiagramData, useMermaidSurfaceTheme, useMonacoLoader, usePreviewSettings, useTimelineData, useTreeViewData, viewStateFromBinding, writeHeadingViewState };
3369
+ export { ALL_PICKER_ENTRIES, type AddTimelineEventOptions, type AddTimelineEventResult, type ApplyAsciiDiagramCommandOptions, type AsciiDiagramBlockEntry, AsciiDiagramExtension, type AsciiDiagramExtensionOptions, type AsciiDiagramPluginState, type AsciiDiagramView, AsciiDiagramWidget, BlockCardView, type BlockCardViewProps, type BlockNavigator, BlockPropertiesPopover, type BlockPropertiesPopoverProps, CODE_SNIPPET_KEY, CODE_SNIPPET_LANGUAGES, CalcEngineFactory, CodeContext, CodeContextZones, type CodeSnippetBlockEntry, type CodeSnippetData, CodeSnippetExtension, type CodeSnippetExtensionOptions, type CodeSnippetLanguage, type CodeSnippetPluginState, CodeSnippetWidget, type CodeSnippetWidgetProps, CsvSourceMeta, type CustomTemplateContextValue, CustomTemplateProvider, type CustomTemplateProviderProps, type CustomThemeContextValue, CustomThemeProvider, type CustomThemeProviderProps, DATA_CARD_KEY, DEFAULT_MERMAID_DIAGRAM_TYPE, type DataCardBlockEntry, DataCardExtension, type DataCardExtensionOptions, type DataCardPluginState, DataCardWidget, type DataPreview, DiagramCanvas, type DiagramCommand, type DiagramData, type DiagramEdge, type DiagramNode, type DirectionModel, type DocCustomTemplates, type DocCustomThemes, DocumentSettingsDialog, type DocumentSettingsDialogProps, type DragContentType, type DropTarget, DropZoneOverlay, type DropZoneOverlayProps, EMPTY_TRANSITION, EditorHostMode, EmojiPicker, type EmojiPickerProps, FENCE_WIDGET_CONTAINED_EVENTS, type FenceBlockEntry, type FileCategory, type FileKind, type FolderEntry, FolderView, type FolderViewProps, FormulaEditRecord, type GridSaveResult, HOST_FENCE_KEY, type HeadingTransitionAttrs, type HeadingViewBinding, HeadingWithTemplate, type HostFenceBlockEntry, HostFenceExtension, type HostFenceExtensionOptions, type HostFencePluginState, ImportThemeSection, type ImportThemeSectionProps, type ImportedThemeResult, InlinePreviewGutter, type InlinePreviewGutterProps, MERMAID_DIAGRAM_KEY, MERMAID_DIAGRAM_TYPES, MERMAID_FLOWCHART_SHAPES, MarkdownEscape, MediaBin, type MediaBinProps, type MediaClipPatch, type MermaidDiagramBlockEntry, MermaidDiagramCanvas, type MermaidDiagramCanvasProps, type MermaidDiagramCategory, type MermaidDiagramData, MermaidDiagramExtension, type MermaidDiagramExtensionOptions, type MermaidDiagramPluginState, type MermaidDiagramPreview, type MermaidDiagramProperty, type MermaidDiagramType, MermaidDiagramTypeThumbnail, MermaidDiagramWidget, type MermaidDiagramWidgetProps, type MermaidEditCapabilities, type MermaidEditableDiagramKind, type MermaidEditableEdge, type MermaidEditableModel, type MermaidEditableNode, type MermaidEditableText, type MermaidEditableTextTarget, type MermaidFlowchartDirection, type MermaidFlowchartModel, type MermaidFlowchartShape, type MermaidFlowchartShapeId, type MermaidNodeCanvasAction, type MermaidRenderResult, type MermaidSelection, MermaidShapePalette, type MermaidShapePaletteProps, type MermaidSourceEditableModel, type MermaidSurfaceScheme, type MermaidValidationResult, MonacoLanguageLoadOptions, MonacoLanguageRequest, OutlinePanel, type OutlinePanelProps, PICKER_CATEGORIES, type PickerCategory, type PickerEntry, PlainHtmlPreview, type PlainHtmlPreviewProps, PreviewFormatSwitch, PreviewModeMenu, PreviewModeSwitch, type PreviewSettings, PreviewSettingsProvider, PreviewToolbarControls, type PreviewToolbarControlsProps, REPAIRABLE_KEY, type RecorderPanelMode, type RecorderSlide, RecorderSlidesPanel, type RecorderSlidesPanelProps, RecorderState, type RepairableBlockEntry, RepairableDiagramExtension, type RepairableDiagramExtensionOptions, type RepairablePluginState, SLIDE_TIMING_CHECKBOX_LABEL, type SaveCsvEditsOptions, type SaveXlsxEditsOptions, StatusBar, type StatusBarProps, Subscript, Superscript, TIMELINE_VIEW_KEY, TRANSITION_ENTRIES, TRANSITION_GROUPS, TemplatePicker, ThemeCustomizerPanel, type ThemeCustomizerPanelProps, ThemePicker, type ThemePickerProps, type ThemeSaveExtras, type TimelineBlockEntry, type TimelineCommand, type TimelineCommandResult, TimelineCompositionPanel, type TimelineCompositionPanelProps, TimelineEditorWidget, type TimelineEditorWidgetProps, type TimelineEventPatch, TimelineToolbar, type TimelineToolbarProps, TimelineTrack, type TimelineTrackProps, TimelineVideoPanel, type TimelineVideoPanelProps, type TimelineViewData, TimelineViewExtension, type TimelineViewExtensionOptions, type TimelineViewPluginState, Toolbar, type ToolbarProps, TooltipLayer, TransformMenu, type TransitionCatalogEntry, type TransitionFields, type TransitionGroup, TransitionPicker, type TransitionPickerProps, type TreeBlockEntry, type TreeCommand, TreeOutlineWidget, type TreeViewData, TreeViewExtension, type TreeViewExtensionOptions, type TreeViewPluginState, type UseBlockNavigatorOptions, type UseFileDropOptions, type UseFileDropResult, type UseMonacoLoaderResult, VersionHistoryPanel, ViewMenuPanel, ViewSwitcher, type ViewSwitcherProps, type WrapPolicyIngest, XlsxSourceMeta, adaptThemeToSurface, addEdgeOp, addItemOp, addNodeOp, addTimelineEventOp, applyAsciiDiagramCommand, applyRepairCommand, applyTimelineCommand, applyTreeCommand, asciiDiagramToCanvas, buildRecorderSlideDeck, clampSlideIndex, classifyFile, codeSnippetFenceLanguageToken, codeSnippetLanguageLabel, codeSnippetMarkdown, containFenceWidgetEvents, dataExtensionOf, dataLinkHrefOf, detectLanguageFromFileName, draftPatchFromImportedTheme, findAsciiDiagramBlockPos, findCodeSnippetBlockPos, findDataCardBlockPos, findHostFenceBlockPos, findMermaidDiagramBlockPos, findOwningHeadingPosition, findRepairableBlockPos, findTimelineBlockPos, findTransitionEntry, findTreeBlockPos, formatSeconds, getTimelineForNode, indentItemOp, ingestForWrite, inspectMermaidSource, isAsciiSourceVisible, isCodeSnippetFenceLanguage, isCodeSnippetNode, isExpandedPanel, isMermaidDiagramNode, isMermaidFlowchartShapeId, isMermaidSourceVisible, isRepairableFence, isTimelineSourceSafeForSemanticEdit, loadDataPreview, mapFenceEntries, markdownToTiptap, mermaidDiagramMarkdown, mermaidDiagramProperties, mermaidEditCapabilities, mermaidEditableTexts, mermaidErrorMessage, mermaidSurfaceScheme, monacoLanguageForFence, moveItemDownOp, moveItemUpOp, moveNodeOp, nextTimelineEventId, normalizeMermaidFlowchartShape, outdentItemOp, panelModeAfterToggle, parseTimelineForNode, partitionFiles, persistFromWrite, preloadMonaco, preloadMonacoSuggestions, processDataFiles, processMediaFiles, processTextFile, processTextFiles, readBlockAttrsParams, readBlockAttrsTransition, readBlockAttrsValue, readHeadingLineTransition, readHeadingViewBinding, removeEdgeOp, removeItemOp, removeNodeOp, removeTimelineEventOp, renameItemOp, renameNodeOp, renderMermaidDiagram, replaceAsciiFenceText, replaceCodeSnippetText, replaceHostFenceText, replaceAsciiFenceText as replaceTreeFenceText, resizeNodeOp, resolveFileKind, resolveMermaidSurfaceTheme, sanitizeAsciiLabel, sanitizeTimelineText, sanitizeTreeLabel, saveCsvEdits, saveXlsxEdits, searchPickerEntries, setBlockAttrsValue, setBlockDurationInSource, setBlockStartTimeInSource, setBlockTransitionInSource, setHeadingAttrsTransition, setHeadingLineTransition, setMediaClipInSource, shouldPasteAsAsciiFence, shouldPasteAsTimelineFence, shouldPasteAsTreeFence, showSlideTimingCheckbox, slideStepForKey, summarizeBlockProps, templateLabel, tiptapToMarkdown, toggleAsciiSource, toggleDirOp, toggleMermaidSource, transitionLabel, translateDiagramOp, unshownSlidesWarning, updateTimelineEventOp, useAsciiDiagramData, useBlockNavigator, useCodeSnippetData, useCustomTemplates, useCustomThemes, useDocCustomTemplates, useDocCustomThemes, useFileDrop, useMermaidDiagramData, useMermaidSurfaceTheme, useMonacoLoader, usePreviewSettings, usePreviewSettingsOptional, useTimelineData, useTreeViewData, validateMermaidSource, viewStateFromBinding, writeHeadingViewState };