@bendyline/squisq-editor-react 2.11.18 → 2.11.20
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-H7YTL6SL.js → chunk-DJS5I5NO.js} +1 -1
- package/dist/{chunk-DPAMJV6A.js → chunk-HSWWEWT4.js} +31 -2
- package/dist/{chunk-45NQUR62.js → chunk-JI74KA6C.js} +197 -126
- package/dist/chunk-K56KR27T.js +141 -0
- package/dist/{chunk-WKZLBGPX.js → chunk-LR6Q2MK4.js} +1 -1
- package/dist/{chunk-GIXXD2O3.js → chunk-NL4JP55H.js} +3453 -2606
- package/dist/{chunk-2XXBDECJ.js → chunk-OCQEWWHI.js} +1 -1
- package/dist/{chunk-U6NVT3BY.js → chunk-UFK47ZAI.js} +42 -22
- package/dist/{chunk-UBFNLWCN.js → chunk-V2OLZOYJ.js} +2 -2
- package/dist/{chunk-CGENKHWY.js → chunk-ZS6G2P57.js} +27 -3
- package/dist/deviceSettings-BSkIQncC.d.ts +83 -0
- package/dist/{dictationSession-PN3OT5LJ.js → dictationSession-SLDNYIZ2.js} +3 -133
- package/dist/index.d.ts +200 -18
- package/dist/index.js +33 -10
- package/dist/json-editor/index.js +3 -3
- package/dist/recorder/index.d.ts +4 -2
- package/dist/recorder/index.js +3 -3
- package/dist/{recorder-CRsw0eC7.d.ts → recorder-Civyq5SU.d.ts} +4 -82
- package/dist/review/index.js +2 -2
- package/dist/screenRegion-Ci_RsCzG.d.ts +8 -0
- package/dist/shell/index.d.ts +2 -2
- package/dist/shell/index.js +11 -9
- package/dist/{shell-Cb0P_ln8.d.ts → shell-DTefmCBG.d.ts} +40 -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 +113 -3
- package/dist/teleprompter/index.d.ts +3 -2
- package/dist/teleprompter/index.js +2 -2
- package/dist/types-Bi4ZVKvN.d.ts +126 -0
- package/dist/{useNarrationStage-vKtk6H-V.d.ts → useNarrationStage-DlighI1z.d.ts} +17 -9
- package/package.json +6 -6
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Doc, Theme, ViewportConfig, MediaProvider } from '@bendyline/squisq/schemas';
|
|
3
3
|
import { ContentContainer } from '@bendyline/squisq/storage';
|
|
4
|
-
import { l as RecorderSource, o as TeleprompterRecordingDeps
|
|
4
|
+
import { l as RecorderSource, o as TeleprompterRecordingDeps } from './useNarrationStage-DlighI1z.js';
|
|
5
5
|
import { CSSProperties, RefObject } from 'react';
|
|
6
|
+
import { R as RecorderDeviceSettings } from './deviceSettings-BSkIQncC.js';
|
|
7
|
+
import { S as ScreenCaptureRegion } from './screenRegion-Ci_RsCzG.js';
|
|
6
8
|
|
|
7
9
|
type RecordedMediaKind = 'audio' | 'video';
|
|
8
10
|
/**
|
|
@@ -216,86 +218,6 @@ interface RecorderPanelProps {
|
|
|
216
218
|
}
|
|
217
219
|
declare function RecorderPanel({ mediaProvider, container, initialMode, colorScheme, onSave, narration, slides, tooltip, title, className, open: controlledOpen, onOpenChange, showTrigger, }: RecorderPanelProps): react_jsx_runtime.JSX.Element;
|
|
218
220
|
|
|
219
|
-
/**
|
|
220
|
-
* User-configurable recorder device/encoding settings.
|
|
221
|
-
*
|
|
222
|
-
* Values stay serializable so the modal can include them in its capture key:
|
|
223
|
-
* changing a setting releases any prepared preview before a new stream is
|
|
224
|
-
* requested. Numeric and string track values are expressed as either `ideal`
|
|
225
|
-
* (best effort) or `exact` (fail when unavailable) constraints. Display
|
|
226
|
-
* capture is the exception: the screen-capture standard rejects exact
|
|
227
|
-
* constraints during its user picker, so those values always remain ideal.
|
|
228
|
-
*/
|
|
229
|
-
|
|
230
|
-
type RecorderConstraintMode = 'ideal' | 'exact';
|
|
231
|
-
interface RecorderAudioDeviceSettings {
|
|
232
|
-
deviceId: string;
|
|
233
|
-
groupId?: string;
|
|
234
|
-
autoGainControl?: boolean;
|
|
235
|
-
channelCount?: number;
|
|
236
|
-
echoCancellation?: boolean;
|
|
237
|
-
latency?: number;
|
|
238
|
-
noiseSuppression?: boolean;
|
|
239
|
-
sampleRate?: number;
|
|
240
|
-
sampleSize?: number;
|
|
241
|
-
}
|
|
242
|
-
interface RecorderCameraDeviceSettings {
|
|
243
|
-
deviceId: string;
|
|
244
|
-
groupId?: string;
|
|
245
|
-
aspectRatio?: number;
|
|
246
|
-
backgroundBlur?: boolean;
|
|
247
|
-
facingMode?: string;
|
|
248
|
-
frameRate?: number;
|
|
249
|
-
height?: number;
|
|
250
|
-
resizeMode?: string;
|
|
251
|
-
width?: number;
|
|
252
|
-
}
|
|
253
|
-
interface RecorderScreenDeviceSettings {
|
|
254
|
-
/** Crop in captured pixels, relative to the chosen surface (not the desktop). */
|
|
255
|
-
crop?: ScreenCaptureRegion;
|
|
256
|
-
aspectRatio?: number;
|
|
257
|
-
cursor?: string;
|
|
258
|
-
displaySurface?: string;
|
|
259
|
-
frameRate?: number;
|
|
260
|
-
height?: number;
|
|
261
|
-
logicalSurface?: boolean;
|
|
262
|
-
resizeMode?: string;
|
|
263
|
-
width?: number;
|
|
264
|
-
}
|
|
265
|
-
interface RecorderScreenAudioSettings {
|
|
266
|
-
restrictOwnAudio?: boolean;
|
|
267
|
-
suppressLocalAudioPlayback?: boolean;
|
|
268
|
-
}
|
|
269
|
-
interface RecorderEncodingSettings {
|
|
270
|
-
audioMimeType: string;
|
|
271
|
-
videoMimeType: string;
|
|
272
|
-
bitsPerSecond?: number;
|
|
273
|
-
audioBitsPerSecond?: number;
|
|
274
|
-
videoBitsPerSecond?: number;
|
|
275
|
-
audioBitrateMode?: 'constant' | 'variable';
|
|
276
|
-
videoKeyFrameIntervalDuration?: number;
|
|
277
|
-
videoKeyFrameIntervalCount?: number;
|
|
278
|
-
}
|
|
279
|
-
interface RecorderDeviceSettings {
|
|
280
|
-
constraintMode: RecorderConstraintMode;
|
|
281
|
-
audio: RecorderAudioDeviceSettings;
|
|
282
|
-
camera: RecorderCameraDeviceSettings;
|
|
283
|
-
screen: RecorderScreenDeviceSettings;
|
|
284
|
-
screenAudio: RecorderScreenAudioSettings;
|
|
285
|
-
encoding: RecorderEncodingSettings;
|
|
286
|
-
}
|
|
287
|
-
declare const DEFAULT_RECORDER_DEVICE_SETTINGS: RecorderDeviceSettings;
|
|
288
|
-
/** Build microphone constraints from the advanced settings form. */
|
|
289
|
-
declare function buildRecorderAudioConstraints(settings: RecorderDeviceSettings): MediaTrackConstraints;
|
|
290
|
-
/** Build camera constraints from the advanced settings form. */
|
|
291
|
-
declare function buildRecorderCameraConstraints(settings: RecorderDeviceSettings): MediaTrackConstraints;
|
|
292
|
-
/** Build display-capture constraints independently from camera constraints. */
|
|
293
|
-
declare function buildRecorderScreenConstraints(settings: RecorderDeviceSettings): MediaTrackConstraints;
|
|
294
|
-
/** Build the audio-track constraints specific to getDisplayMedia. */
|
|
295
|
-
declare function buildRecorderScreenAudioConstraints(settings: RecorderDeviceSettings): MediaTrackConstraints;
|
|
296
|
-
/** Convert the form's kbps values to the bps values MediaRecorder expects. */
|
|
297
|
-
declare function recorderBitsPerSecond(value: number | undefined): number | undefined;
|
|
298
|
-
|
|
299
221
|
interface RecorderDeviceSettingsPanelProps {
|
|
300
222
|
value: RecorderDeviceSettings;
|
|
301
223
|
onChange: (next: RecorderDeviceSettings) => void;
|
|
@@ -585,4 +507,4 @@ declare function encodeTimingJson(timing: TimingJson): Uint8Array;
|
|
|
585
507
|
*/
|
|
586
508
|
declare function timingPathFor(audioRelativePath: string): string;
|
|
587
509
|
|
|
588
|
-
export {
|
|
510
|
+
export { requestMicStream as A, requestScreenStream as B, type CameraStreamOptions as C, timingPathFor as D, useMediaDevices as E, useStreamPreview as F, type MediaDeviceInventory as M, type RecordedBookmark as R, type ScreenStreamHandle as S, type TimingJson as T, type RecordedMediaKind as a, RecorderButton as b, type RecorderButtonProps as c, type RecorderCameraSaveResult as d, type RecorderColorScheme as e, type RecorderDeviceOption as f, RecorderDeviceQuickPicks as g, type RecorderDeviceQuickPicksProps as h, RecorderDeviceSettingsPanel as i, type RecorderDeviceSettingsPanelProps as j, RecorderModal as k, type RecorderModalProps as l, type RecorderNarrationOptions as m, RecorderPanel as n, type RecorderPanelProps as o, type RecorderSaveResult as p, type RecorderSlidesOptions as q, type ScreenStreamOptions as r, type SlideTimingSaveResult as s, buildTimingJson as t, encodeTimingJson as u, hasRecorderDeviceChoice as v, recordedMediaKind as w, recorderDeviceGroups as x, recorderDeviceOptions as y, requestCameraStream as z };
|
package/dist/review/index.js
CHANGED
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
updateReviewDecorations,
|
|
20
20
|
useReview,
|
|
21
21
|
useReviewState
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-JI74KA6C.js";
|
|
23
23
|
import "../chunk-DNEVUOBZ.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-HSWWEWT4.js";
|
|
25
25
|
|
|
26
26
|
// src/review/proofingAdapter.ts
|
|
27
27
|
import {
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { h as BlockTagVisibility, k as DocumentLinkCandidate, l as DocumentLinkProvider, m as EditorActions, n as EditorColorScheme, o as EditorContextMenuContext, p as EditorContextMenuItem, q as EditorContextMenuItemVisibility, r as EditorContextMenuProvider, s as EditorContextMenuProviderProps, t as EditorContextValue, E as EditorHostMode, u as EditorInsertMenuItem, v as EditorMode, w as EditorProvider, x as EditorProviderProps, z as EditorShell, G as EditorShellProps, H as EditorState, b as EditorView, J as ImageDisplayMode, M as LayoutMode, N as MentionCandidate, O as MentionProvider, R as PreviewPanel, T as PreviewPanelProps, U as RawEditor, V as RawEditorProps, W as ThemeInheritance, Y as ViewPreferences, _ as WysiwygEditor, $ as WysiwygEditorProps, ah as useEditorContext, ai as useEditorContextMenuItems, aj as useEditorInsertMenuItems } from '../shell-DTefmCBG.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import '@bendyline/squisq/table';
|
|
4
4
|
import '@bendyline/squisq-calc';
|
|
@@ -12,7 +12,7 @@ import '@bendyline/squisq/markdown';
|
|
|
12
12
|
import '@bendyline/squisq/storage';
|
|
13
13
|
import '../types-De4z-gGb.js';
|
|
14
14
|
import '@bendyline/squisq/proof';
|
|
15
|
-
import '../
|
|
15
|
+
import '../types-Bi4ZVKvN.js';
|
|
16
16
|
import '@bendyline/squisq/versions';
|
|
17
17
|
import '@tiptap/core';
|
|
18
18
|
import 'monaco-editor';
|
package/dist/shell/index.js
CHANGED
|
@@ -5,21 +5,22 @@ import {
|
|
|
5
5
|
RawEditor,
|
|
6
6
|
WysiwygEditor,
|
|
7
7
|
useEditorContextMenuItems
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-NL4JP55H.js";
|
|
9
9
|
import {
|
|
10
10
|
EditorProvider,
|
|
11
|
-
useEditorContext
|
|
12
|
-
|
|
11
|
+
useEditorContext,
|
|
12
|
+
useEditorInsertMenuItems
|
|
13
|
+
} from "../chunk-JI74KA6C.js";
|
|
13
14
|
import "../chunk-DNEVUOBZ.js";
|
|
14
15
|
import "../chunk-V4NBQF5C.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-OCQEWWHI.js";
|
|
17
|
+
import "../chunk-HSWWEWT4.js";
|
|
17
18
|
import "../chunk-K4Z2GIX4.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-UFK47ZAI.js";
|
|
19
20
|
import "../chunk-LRZJD5YD.js";
|
|
20
21
|
import "../chunk-GS7QWYFT.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-DJS5I5NO.js";
|
|
23
|
+
import "../chunk-ZS6G2P57.js";
|
|
23
24
|
import "../chunk-DNJ6HOES.js";
|
|
24
25
|
export {
|
|
25
26
|
EditorContextMenuProvider,
|
|
@@ -29,5 +30,6 @@ export {
|
|
|
29
30
|
RawEditor,
|
|
30
31
|
WysiwygEditor,
|
|
31
32
|
useEditorContext,
|
|
32
|
-
useEditorContextMenuItems
|
|
33
|
+
useEditorContextMenuItems,
|
|
34
|
+
useEditorInsertMenuItems
|
|
33
35
|
};
|
|
@@ -10,7 +10,7 @@ import { CodeBlockCopyHandler } from '@bendyline/squisq-react';
|
|
|
10
10
|
import { MarkdownSourceEdit, MarkdownDocument } from '@bendyline/squisq/markdown';
|
|
11
11
|
import { ContentContainer } from '@bendyline/squisq/storage';
|
|
12
12
|
import { a as ProofingCapability, c as ProofingIgnoreStore } from './types-De4z-gGb.js';
|
|
13
|
-
import { DictationControl, SpeechInputCapability } from './
|
|
13
|
+
import { D as DictationControl, b as SpeechInputCapability } from './types-Bi4ZVKvN.js';
|
|
14
14
|
import { DocumentVersionManager, SaveVersionOptions, SaveVersionResult, PrunePolicy } from '@bendyline/squisq/versions';
|
|
15
15
|
import { Editor } from '@tiptap/core';
|
|
16
16
|
import { editor } from 'monaco-editor';
|
|
@@ -410,6 +410,8 @@ interface EditorSelectionInfo {
|
|
|
410
410
|
view: EditorView;
|
|
411
411
|
/** The selected text, empty when the selection is a bare cursor. */
|
|
412
412
|
text: string;
|
|
413
|
+
/** Selected Markdown, preserving formatting and block metadata when available. */
|
|
414
|
+
markdown?: string;
|
|
413
415
|
/** True when the selection is a bare cursor rather than a range. */
|
|
414
416
|
empty: boolean;
|
|
415
417
|
}
|
|
@@ -735,6 +737,12 @@ interface EditorContextValue extends EditorState, EditorActions {
|
|
|
735
737
|
* reads it from here.
|
|
736
738
|
*/
|
|
737
739
|
versioning: DocumentVersionManager | null;
|
|
740
|
+
/**
|
|
741
|
+
* Whether versions are also saved automatically after an idle pause
|
|
742
|
+
* (`versioningAutoSaveIdleMs` above zero), so the version-history panel
|
|
743
|
+
* only promises automatic saves when the host has them on.
|
|
744
|
+
*/
|
|
745
|
+
versioningAutoSaves: boolean;
|
|
738
746
|
/**
|
|
739
747
|
* Stamp a new snapshot of the current document. No-op (returns
|
|
740
748
|
* `unchanged`) when content matches the latest version. Always safe
|
|
@@ -1687,12 +1695,31 @@ interface EditorShellProps {
|
|
|
1687
1695
|
* in-progress theme without mutating the document.
|
|
1688
1696
|
*/
|
|
1689
1697
|
themeOverride?: Theme | null;
|
|
1698
|
+
/**
|
|
1699
|
+
* Host default document theme — a FALLBACK for documents whose frontmatter
|
|
1700
|
+
* names no theme (`squisq-theme`, legacy `themeId` / `theme`). A document's
|
|
1701
|
+
* own theme always wins; built-in and custom-theme ids are accepted. Every
|
|
1702
|
+
* surface (Use/Play, inline and block previews, the Write view's
|
|
1703
|
+
* `themeInheritance` mirroring) renders the same resolved theme.
|
|
1704
|
+
*
|
|
1705
|
+
* While set, the theme pickers offer a "Default (<theme name>)" entry that
|
|
1706
|
+
* removes the document's theme key, and choosing any concrete theme —
|
|
1707
|
+
* `standard` included — writes it explicitly so the document stays pinned.
|
|
1708
|
+
* Unlike {@link themeOverride}, this never overrides the document.
|
|
1709
|
+
*/
|
|
1710
|
+
defaultThemeId?: string;
|
|
1711
|
+
/**
|
|
1712
|
+
* Label for the picker entry that follows {@link defaultThemeId}, rendered
|
|
1713
|
+
* as `"<label> (<theme name>)"` — e.g. `'Workspace default'`. Defaults to
|
|
1714
|
+
* `'Default'`.
|
|
1715
|
+
*/
|
|
1716
|
+
defaultThemeLabel?: string;
|
|
1690
1717
|
}
|
|
1691
1718
|
/**
|
|
1692
1719
|
* Complete markdown editor shell with toolbar, view switcher, and three
|
|
1693
1720
|
* editing modes: Raw (Monaco), WYSIWYG (Tiptap), and Preview.
|
|
1694
1721
|
*/
|
|
1695
|
-
declare function EditorShell({ initialMarkdown, initialView, hostMode, defaultViewportPreset, articleId, basePath, onChange, onLinkClick, showCodeCopyButton, onCopyCode, colorScheme, className, height, minHeight, maxHeight, mediaProvider, mediaEditRenders, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, showFilesToggle, showFilesWhenNotEmpty, showFormattingControls, showInsertControls, allowBinaryDownloads, toolbarSlotLeft, toolbarSlotAfterActions, toolbarSlotRight, statusBarSlotRight, sidePanelSlot, reviewProviders, showPlayTab, allowPresentationWindow, allowPresentationFullscreen, allowPrint, submitOnEnter, calcEngineFactory, codeContext, fullWidth, uxFont, thinMargins, writeCanvasSettings, showStatusBar, imageDisplayMode, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode, onFindModeChange, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, fenceRenderers, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, placeholder, readOnly, imageSrc, imageAlt, imageMode, imageEditorContainer, onImageExport, inlinePreview, inlinePreviewWidth, outline, outlineWidth, blockTags, blockTagVisibility, themeInheritance, viewPreferences, onViewPreferencesChange, themeOverride, }: EditorShellProps): react_jsx_runtime.JSX.Element;
|
|
1722
|
+
declare function EditorShell({ initialMarkdown, initialView, hostMode, defaultViewportPreset, articleId, basePath, onChange, onLinkClick, showCodeCopyButton, onCopyCode, colorScheme, className, height, minHeight, maxHeight, mediaProvider, mediaEditRenders, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, showFilesToggle, showFilesWhenNotEmpty, showFormattingControls, showInsertControls, allowBinaryDownloads, toolbarSlotLeft, toolbarSlotAfterActions, toolbarSlotRight, statusBarSlotRight, sidePanelSlot, reviewProviders, showPlayTab, allowPresentationWindow, allowPresentationFullscreen, allowPrint, submitOnEnter, calcEngineFactory, codeContext, fullWidth, uxFont, thinMargins, writeCanvasSettings, showStatusBar, imageDisplayMode, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode, onFindModeChange, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, fenceRenderers, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, placeholder, readOnly, imageSrc, imageAlt, imageMode, imageEditorContainer, onImageExport, inlinePreview, inlinePreviewWidth, outline, outlineWidth, blockTags, blockTagVisibility, themeInheritance, viewPreferences, onViewPreferencesChange, themeOverride, defaultThemeId, defaultThemeLabel, }: EditorShellProps): react_jsx_runtime.JSX.Element;
|
|
1696
1723
|
|
|
1697
1724
|
/**
|
|
1698
1725
|
* Shared editor context menu.
|
|
@@ -1842,4 +1869,14 @@ interface PreviewPanelProps {
|
|
|
1842
1869
|
*/
|
|
1843
1870
|
declare function PreviewPanel({ basePath, className, workspaceContainer, onLinkClick, showCodeCopyButton, onCopyCode, }: PreviewPanelProps): react_jsx_runtime.JSX.Element;
|
|
1844
1871
|
|
|
1845
|
-
|
|
1872
|
+
interface EditorInsertMenuItem {
|
|
1873
|
+
id: string;
|
|
1874
|
+
label: string;
|
|
1875
|
+
icon?: ReactNode;
|
|
1876
|
+
disabled?: boolean;
|
|
1877
|
+
onSelect: () => void;
|
|
1878
|
+
}
|
|
1879
|
+
/** Call from a toolbar slot; callbacks retain access to the editor context. */
|
|
1880
|
+
declare function useEditorInsertMenuItems(items: readonly EditorInsertMenuItem[]): void;
|
|
1881
|
+
|
|
1882
|
+
export { type WysiwygEditorProps as $, type ApplySourceEditsOptions as A, type BlockInsertionBuilder as B, type CodeContext as C, type DashboardImageSaveOutput as D, type EditorHostMode as E, type FormulaEditRecord as F, type EditorShellProps as G, type EditorState as H, type FormulaSessionOptions as I, type ImageDisplayMode as J, type IngestedSidecar as K, type InsertBlockOptions as L, type LayoutMode as M, type MentionCandidate as N, type MentionProvider as O, type OutlineBlock as P, type OutlineInsertion as Q, PreviewPanel as R, type SceneTextChannel as S, type PreviewPanelProps as T, RawEditor as U, type RawEditorProps as V, type ThemeInheritance as W, type XlsxSourceMeta as X, type ViewPreferences as Y, type WriteCanvasSettings as Z, WysiwygEditor as _, type CalcEngineFactory as a, XLSX_LOCKED_REASON as a0, type XlsxFormulaSession as a1, applySourceEditsToText as a2, blockInsertionPoint as a3, createXlsxFormulaSession as a4, getBlockSlices as a5, headingDepthForInsertion as a6, ingestSidecarBytes as a7, joinBlockAt as a8, lineToOffset as a9, minimalReplaceEdit as aa, normalizeSourceEdits as ab, offsetToLine as ac, resolveOutlineInsertion as ad, sliceIndexAtOffset as ae, sourceOutline as af, spliceBlock as ag, useEditorContext as ah, useEditorContextMenuItems as ai, useEditorInsertMenuItems as aj, type EditorView as b, type CsvSourceMeta as c, type BlockInsertionContext as d, type BlockPlacement as e, type BlockRange as f, type BlockSlice as g, type BlockTagVisibility as h, type CodeContextSection as i, type CoverImageSaveOutput as j, type DocumentLinkCandidate as k, type DocumentLinkProvider as l, type EditorActions as m, type EditorColorScheme as n, type EditorContextMenuContext as o, type EditorContextMenuItem as p, type EditorContextMenuItemVisibility as q, EditorContextMenuProvider as r, type EditorContextMenuProviderProps as s, type EditorContextValue as t, type EditorInsertMenuItem as u, type EditorMode as v, EditorProvider as w, type EditorProviderProps as x, type EditorSelectionInfo as y, EditorShell as z };
|
package/dist/speech/index.d.ts
CHANGED
|
@@ -1,126 +1,43 @@
|
|
|
1
|
+
import { R as RecorderDeviceSettings } from '../deviceSettings-BSkIQncC.js';
|
|
2
|
+
import { S as SpeechInputProvider } from '../types-Bi4ZVKvN.js';
|
|
3
|
+
export { D as DictationControl, a as SPEECH_INPUT_SAMPLE_RATE, b as SpeechInputCapability, c as SpeechInputProviderFactory, d as SpeechInputReadiness, e as SpeechInputReadinessState, f as SpeechInputTranscribeOptions, g as SpeechInputTranscript, i as isSpeechInputProviderFactory, r as resolveSpeechInputProvider } from '../types-Bi4ZVKvN.js';
|
|
4
|
+
import '../screenRegion-Ci_RsCzG.js';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
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.
|
|
7
|
+
* One dictation session: microphone → progressive takes → 16 kHz WAV → the
|
|
8
|
+
* host's provider → transcript callbacks.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
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.
|
|
10
|
+
* This module (with the engine, the activity gate and the WAV encoder it pulls
|
|
11
|
+
* in) is only ever reached through a dynamic `import()` from the dictation
|
|
12
|
+
* controller, so a shell without a `speechInput` capability loads none of it.
|
|
28
13
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
|
|
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;
|
|
14
|
+
|
|
15
|
+
interface DictationSessionOptions {
|
|
16
|
+
provider: SpeechInputProvider;
|
|
17
|
+
/** Aborted when the controller cancels the session (or unmounts). */
|
|
18
|
+
signal: AbortSignal;
|
|
51
19
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
20
|
+
* Recorder device settings to honour (the chosen microphone and its
|
|
21
|
+
* constraints). Echo cancellation, noise suppression and auto gain are
|
|
22
|
+
* always on for dictation regardless.
|
|
54
23
|
*/
|
|
55
|
-
|
|
24
|
+
deviceSettings?: RecorderDeviceSettings;
|
|
25
|
+
onTranscript: (text: string) => void;
|
|
26
|
+
onAudioLevel: (level: number) => void;
|
|
27
|
+
onPendingChange: (pending: number) => void;
|
|
28
|
+
onLongPause: (hadTranscript: boolean) => void;
|
|
29
|
+
onError: (error: Error) => void;
|
|
56
30
|
}
|
|
57
|
-
interface
|
|
58
|
-
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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;
|
|
31
|
+
interface DictationSessionHandle {
|
|
32
|
+
/** Stop listening, transcribe and deliver every captured take, then resolve. */
|
|
33
|
+
stop(): Promise<void>;
|
|
34
|
+
/** Drop everything immediately — no further callbacks. */
|
|
35
|
+
cancel(): void;
|
|
124
36
|
}
|
|
125
37
|
|
|
126
|
-
|
|
38
|
+
/** Capture into a host-owned transcript without editing the document. Loaded only on a gesture. */
|
|
39
|
+
declare function startDictationSession(options: DictationSessionOptions): Promise<DictationSessionHandle>;
|
|
40
|
+
/** Encode an uploaded audio take using the same wire format as microphone capture. */
|
|
41
|
+
declare function encodeMonoPcm16Wav(channels: readonly Float32Array[], sampleRate: number): Promise<Uint8Array<ArrayBuffer>>;
|
|
42
|
+
|
|
43
|
+
export { type DictationSessionHandle, type DictationSessionOptions, SpeechInputProvider, encodeMonoPcm16Wav, startDictationSession };
|
package/dist/speech/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
encodeMonoPcm16Wav,
|
|
3
|
+
startDictationSession
|
|
4
|
+
} from "../chunk-2MP7QE7O.js";
|
|
1
5
|
import {
|
|
2
6
|
SPEECH_INPUT_SAMPLE_RATE,
|
|
3
7
|
isSpeechInputProviderFactory,
|
|
@@ -5,6 +9,8 @@ import {
|
|
|
5
9
|
} from "../chunk-DNEVUOBZ.js";
|
|
6
10
|
export {
|
|
7
11
|
SPEECH_INPUT_SAMPLE_RATE,
|
|
12
|
+
encodeMonoPcm16Wav,
|
|
8
13
|
isSpeechInputProviderFactory,
|
|
9
|
-
resolveSpeechInputProvider
|
|
14
|
+
resolveSpeechInputProvider,
|
|
15
|
+
startDictationSession
|
|
10
16
|
};
|
package/dist/styles/index.css
CHANGED
|
@@ -7866,8 +7866,9 @@
|
|
|
7866
7866
|
.squisq-toolbar-contextual--clipped {
|
|
7867
7867
|
visibility: hidden;
|
|
7868
7868
|
}
|
|
7869
|
-
.squisq-toolbar-button--overflowed
|
|
7870
|
-
|
|
7869
|
+
.squisq-toolbar-button.squisq-toolbar-button--overflowed,
|
|
7870
|
+
.squisq-toolbar-group.squisq-toolbar-group--collapsed {
|
|
7871
|
+
display: none;
|
|
7871
7872
|
}
|
|
7872
7873
|
.squisq-toolbar-view-tab {
|
|
7873
7874
|
padding: 8px 14px 4px;
|
|
@@ -9259,6 +9260,18 @@
|
|
|
9259
9260
|
color: var(--squisq-text-muted);
|
|
9260
9261
|
flex-shrink: 0;
|
|
9261
9262
|
gap: 12px;
|
|
9263
|
+
container: squisq-status-bar / inline-size;
|
|
9264
|
+
}
|
|
9265
|
+
@container squisq-status-bar (max-width: 520px) {
|
|
9266
|
+
.squisq-status-chars,
|
|
9267
|
+
.squisq-status-lines {
|
|
9268
|
+
display: none;
|
|
9269
|
+
}
|
|
9270
|
+
}
|
|
9271
|
+
@container squisq-status-bar (max-width: 300px) {
|
|
9272
|
+
.squisq-status-blocks {
|
|
9273
|
+
display: none;
|
|
9274
|
+
}
|
|
9262
9275
|
}
|
|
9263
9276
|
.squisq-status-item {
|
|
9264
9277
|
white-space: nowrap;
|
|
@@ -11448,7 +11461,8 @@
|
|
|
11448
11461
|
color: var(--squisq-danger-strong);
|
|
11449
11462
|
background: var(--squisq-danger-soft);
|
|
11450
11463
|
}
|
|
11451
|
-
.squisq-version-history-empty
|
|
11464
|
+
.squisq-version-history-empty,
|
|
11465
|
+
.squisq-version-history-note {
|
|
11452
11466
|
padding: 16px 12px;
|
|
11453
11467
|
font-size: 12px;
|
|
11454
11468
|
color: var(--squisq-text-muted);
|
|
@@ -17225,6 +17239,102 @@
|
|
|
17225
17239
|
min-height: 0;
|
|
17226
17240
|
}
|
|
17227
17241
|
|
|
17242
|
+
/* src/styles/video-embed.css */
|
|
17243
|
+
.squisq-video-embed-host {
|
|
17244
|
+
display: block;
|
|
17245
|
+
width: 100%;
|
|
17246
|
+
max-width: 720px;
|
|
17247
|
+
margin: 1em 0 0.25em;
|
|
17248
|
+
user-select: none;
|
|
17249
|
+
}
|
|
17250
|
+
.squisq-video-embed-host[data-orientation=portrait] {
|
|
17251
|
+
max-width: 340px;
|
|
17252
|
+
}
|
|
17253
|
+
.squisq-video-embed-host-frame {
|
|
17254
|
+
position: relative;
|
|
17255
|
+
overflow: hidden;
|
|
17256
|
+
border-radius: 6px;
|
|
17257
|
+
background: var(--squisq-media-well);
|
|
17258
|
+
}
|
|
17259
|
+
.squisq-video-embed-host-frame iframe {
|
|
17260
|
+
position: absolute;
|
|
17261
|
+
inset: 0;
|
|
17262
|
+
width: 100%;
|
|
17263
|
+
height: 100%;
|
|
17264
|
+
border: 0;
|
|
17265
|
+
}
|
|
17266
|
+
.squisq-video-embed-host-bar {
|
|
17267
|
+
display: flex;
|
|
17268
|
+
align-items: center;
|
|
17269
|
+
gap: 8px;
|
|
17270
|
+
margin-top: 6px;
|
|
17271
|
+
font-family: var(--squisq-ux-font, system-ui, sans-serif);
|
|
17272
|
+
font-size: 12px;
|
|
17273
|
+
color: var(--squisq-text-muted);
|
|
17274
|
+
}
|
|
17275
|
+
.squisq-video-embed-host-convert {
|
|
17276
|
+
padding: 2px 8px;
|
|
17277
|
+
font: inherit;
|
|
17278
|
+
color: var(--squisq-accent-strong);
|
|
17279
|
+
background: var(--squisq-accent-subtle);
|
|
17280
|
+
border: 1px solid var(--squisq-accent-border);
|
|
17281
|
+
border-radius: 4px;
|
|
17282
|
+
cursor: pointer;
|
|
17283
|
+
}
|
|
17284
|
+
.squisq-video-embed-host-convert:hover {
|
|
17285
|
+
background: var(--squisq-accent-soft);
|
|
17286
|
+
}
|
|
17287
|
+
.squisq-wysiwyg-editor p.squisq-video-embed-caption {
|
|
17288
|
+
margin-top: 0;
|
|
17289
|
+
font-size: 0.875em;
|
|
17290
|
+
opacity: 0.75;
|
|
17291
|
+
}
|
|
17292
|
+
.squisq-wysiwyg-editor p.squisq-video-embed-caption--html {
|
|
17293
|
+
font-family:
|
|
17294
|
+
ui-monospace,
|
|
17295
|
+
SFMono-Regular,
|
|
17296
|
+
Menlo,
|
|
17297
|
+
Consolas,
|
|
17298
|
+
monospace;
|
|
17299
|
+
font-size: 0.75em;
|
|
17300
|
+
white-space: nowrap;
|
|
17301
|
+
overflow: hidden;
|
|
17302
|
+
text-overflow: ellipsis;
|
|
17303
|
+
}
|
|
17304
|
+
.squisq-video-dialog {
|
|
17305
|
+
max-width: 520px;
|
|
17306
|
+
}
|
|
17307
|
+
.squisq-video-dialog-status {
|
|
17308
|
+
font-size: 12px;
|
|
17309
|
+
line-height: 1.4;
|
|
17310
|
+
color: var(--squisq-text-muted);
|
|
17311
|
+
}
|
|
17312
|
+
.squisq-video-dialog-status--ok {
|
|
17313
|
+
color: var(--squisq-success);
|
|
17314
|
+
}
|
|
17315
|
+
.squisq-video-dialog-preview {
|
|
17316
|
+
position: relative;
|
|
17317
|
+
max-width: 100%;
|
|
17318
|
+
}
|
|
17319
|
+
.squisq-video-dialog-preview .squisq-video-embed {
|
|
17320
|
+
margin: 0;
|
|
17321
|
+
max-width: 100%;
|
|
17322
|
+
}
|
|
17323
|
+
.squisq-video-dialog-preview .squisq-video-embed[data-orientation=portrait] {
|
|
17324
|
+
max-width: 180px;
|
|
17325
|
+
margin-inline: auto;
|
|
17326
|
+
}
|
|
17327
|
+
.squisq-video-dialog-preview .squisq-video-embed-frame {
|
|
17328
|
+
border-radius: 6px;
|
|
17329
|
+
overflow: hidden;
|
|
17330
|
+
background: var(--squisq-media-well);
|
|
17331
|
+
}
|
|
17332
|
+
.squisq-video-dialog-hint {
|
|
17333
|
+
font-size: 12px;
|
|
17334
|
+
line-height: 1.4;
|
|
17335
|
+
color: var(--squisq-text-faint);
|
|
17336
|
+
}
|
|
17337
|
+
|
|
17228
17338
|
/* ../grid-react/dist/styles/index.css */
|
|
17229
17339
|
.squisq-grid {
|
|
17230
17340
|
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TeleprompterView
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-DJS5I5NO.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-ZS6G2P57.js";
|
|
35
35
|
import "../chunk-DNJ6HOES.js";
|
|
36
36
|
export {
|
|
37
37
|
DEFAULT_TELEPROMPTER_PREFS,
|