@bendyline/squisq-editor-react 2.6.0 → 2.7.1
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-WH3DL6TG.js → chunk-AZ5ME4XG.js} +1 -1
- package/dist/{chunk-5FG3NAPH.js → chunk-BYXVO34Z.js} +886 -980
- package/dist/{chunk-JUAQQTJE.js → chunk-V3J5S7X6.js} +284 -128
- package/dist/index.d.ts +126 -46
- package/dist/index.js +27 -3
- package/dist/recorder/index.d.ts +1 -1
- package/dist/recorder/index.js +12 -2
- package/dist/{recorder-xL-5Vfbu.d.ts → recorder-DFP0Dw4v.d.ts} +100 -1
- package/dist/shell/index.d.ts +2 -1
- package/dist/shell/index.js +2 -2
- package/dist/{shell-BXG_NlvR.d.ts → shell-595XbANu.d.ts} +24 -2
- package/dist/styles/index.css +8 -0
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CodeContext, E as EditorHostMode, S as SceneTextChannel } from './shell-
|
|
2
|
-
export { B as BlockTagVisibility, a as CodeContextSection, D as DocumentLinkCandidate, b as DocumentLinkProvider, c as EditorActions, d as EditorColorScheme, e as EditorContextValue, f as EditorMode, g as EditorProvider, h as EditorProviderProps, i as EditorShell, j as EditorShellProps, k as EditorState, l as EditorView, I as ImageDisplayMode, L as LayoutMode, M as MentionCandidate, m as MentionProvider, P as PreviewPanel, n as PreviewPanelProps, R as RawEditor, o as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, W as WriteCanvasSettings, p as WysiwygEditor, q as WysiwygEditorProps, u as useEditorContext } from './shell-
|
|
1
|
+
import { C as CodeContext, E as EditorHostMode, S as SceneTextChannel } from './shell-595XbANu.js';
|
|
2
|
+
export { B as BlockTagVisibility, a as CodeContextSection, D as DocumentLinkCandidate, b as DocumentLinkProvider, c as EditorActions, d as EditorColorScheme, e as EditorContextValue, f as EditorMode, g as EditorProvider, h as EditorProviderProps, i as EditorShell, j as EditorShellProps, k as EditorState, l as EditorView, I as ImageDisplayMode, L as LayoutMode, M as MentionCandidate, m as MentionProvider, P as PreviewPanel, n as PreviewPanelProps, R as RawEditor, o as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, W as WriteCanvasSettings, p as WysiwygEditor, q as WysiwygEditorProps, u as useEditorContext } from './shell-595XbANu.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode, CSSProperties } from 'react';
|
|
@@ -9,6 +9,7 @@ export { CanvasRect, ImageEditor, ImageEditorAction, ImageEditorProps, ImageEdit
|
|
|
9
9
|
import { CodeBlockCopyHandler, DisplayMode, CaptionStyle, VideoPresentation, PipSize, PipShape, PipPosition } from '@bendyline/squisq-react';
|
|
10
10
|
import { IconFamily } from '@bendyline/squisq/icons';
|
|
11
11
|
import { CoverSlideTemplate, CoverSlidePlayback, ConnectorRouting, AsciiDiagram, Tree, AsciiTimeline, AsciiTimelineSide, AsciiTimelineMarker } from '@bendyline/squisq/doc';
|
|
12
|
+
export { BuildPreviewDocOptions, buildPreviewDoc, documentTitleFromFileName } from '@bendyline/squisq/doc';
|
|
12
13
|
import { MarkdownWrapState } from '@bendyline/squisq/markdown';
|
|
13
14
|
import * as monaco_editor from 'monaco-editor';
|
|
14
15
|
import { M as MonacoLanguageRequest, a as MonacoLanguageLoadOptions } from './monacoLanguageDetection-DEyUW-BS.js';
|
|
@@ -18,11 +19,12 @@ import { Extension } from '@tiptap/core';
|
|
|
18
19
|
import * as _tiptap_extension_heading from '@tiptap/extension-heading';
|
|
19
20
|
import { DecorationSet } from '@tiptap/pm/view';
|
|
20
21
|
import { Editor } from '@tiptap/react';
|
|
21
|
-
import { PluginKey } from '@tiptap/pm/state';
|
|
22
|
+
import { Transaction, PluginKey } from '@tiptap/pm/state';
|
|
22
23
|
import { Node } from '@tiptap/pm/model';
|
|
23
24
|
import { RenderResult } from 'mermaid';
|
|
25
|
+
import { FenceRendererMap } from '@bendyline/squisq/fence';
|
|
24
26
|
export { JsonEditor, JsonEditorProps } from './json-editor/index.js';
|
|
25
|
-
export { C as CameraStreamOptions, D as DEFAULT_RECORDER_DEVICE_SETTINGS, 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
|
|
27
|
+
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, S as ScreenStreamHandle, x as ScreenStreamOptions, T as TimingJson, y as buildRecorderAudioConstraints, z as buildRecorderCameraConstraints, A as buildRecorderScreenAudioConstraints, B as buildRecorderScreenConstraints, E as buildTimingJson, F as encodeTimingJson, G as hasRecorderDeviceChoice, H as recordedMediaKind, I as recorderBitsPerSecond, J as recorderDeviceGroups, K as recorderDeviceOptions, L as requestCameraStream, N as requestMicStream, O as requestScreenStream, P as timingPathFor, Q as useMediaDevices, U as useStreamPreview } from './recorder-DFP0Dw4v.js';
|
|
26
28
|
export { C as CanvasSink, a as CaptureKind, D as DEFAULT_TELEPROMPTER_PREFS, F as FloatOpenOptions, b as FloatTier, c as FloatingWindowHandle, d as FloatingWindowManager, M as MicAnalysisHandle, e as MicAnalysisStatus, N as NarrationRecorderController, f as NarrationRecorderState, g as NarrationStageHandle, h as NarrationTake, P as PrompterTransport, R as RecorderAudioBitrateMode, i as RecorderCameraLane, j as RecorderExtendedMediaOptions, k as RecorderSource, l as RecorderState, m as ResolvedFormat, T as TeleprompterController, n as TeleprompterPrefs, o as TeleprompterRecordingDeps, U as UseMediaRecorderOptions, p as UseMediaRecorderResult, q as UseNarrationStageOptions, r as buildFilename, s as createFloatingWindowManager, t as detectFloatTiers, u as getCaptureKind, v as resolveFormat, w as supportsDisplayMedia, x as supportsMediaRecorder, y as supportsUserMedia, z as useFloatingWindow, A as useMediaRecorder, B as useMicAnalysis, E as useNarrationRecorder, G as useNarrationStage, H as useTeleprompter, I as vadConfigForSensitivity } from './useNarrationStage-Bk3mdW75.js';
|
|
27
29
|
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';
|
|
28
30
|
import '@bendyline/squisq/versions';
|
|
@@ -1610,46 +1612,6 @@ declare function markdownToTiptap(markdown: string): string;
|
|
|
1610
1612
|
*/
|
|
1611
1613
|
declare function tiptapToMarkdown(html: string): string;
|
|
1612
1614
|
|
|
1613
|
-
/**
|
|
1614
|
-
* buildPreviewDoc — Converts a markdown-derived Doc into a player-ready Doc
|
|
1615
|
-
* with TemplateBlock slides and interleaved images.
|
|
1616
|
-
*
|
|
1617
|
-
* Shared between PreviewPanel (live preview) and export flows (HTML/video).
|
|
1618
|
-
*
|
|
1619
|
-
* Pipeline:
|
|
1620
|
-
* 1. Flatten hierarchical blocks into a linear slide sequence
|
|
1621
|
-
* 2. Convert each block into a TemplateBlock-compatible object
|
|
1622
|
-
* 3. Interleave images as standalone imageWithCaption slides
|
|
1623
|
-
* 4. Synthesize a dummy audio segment for timer-based playback
|
|
1624
|
-
*/
|
|
1625
|
-
|
|
1626
|
-
/**
|
|
1627
|
-
* Build a player-ready Doc from a markdown-derived Doc.
|
|
1628
|
-
*
|
|
1629
|
-
* Flattens hierarchical blocks, converts each to a TemplateBlock-compatible
|
|
1630
|
-
* slide, interleaves images, recalculates timing, and adds a synthetic
|
|
1631
|
-
* audio segment.
|
|
1632
|
-
*/
|
|
1633
|
-
interface BuildPreviewDocOptions {
|
|
1634
|
-
/**
|
|
1635
|
-
* Human-facing title to use as the header of the leading heading-less
|
|
1636
|
-
* "preamble" block when the document has no frontmatter `title:`. Hosts
|
|
1637
|
-
* typically pass the file name (extension stripped) via
|
|
1638
|
-
* {@link documentTitleFromFileName}. When neither this nor a frontmatter
|
|
1639
|
-
* title is present, the preamble simply renders with no header rather than
|
|
1640
|
-
* the placeholder block id.
|
|
1641
|
-
*/
|
|
1642
|
-
documentTitle?: string;
|
|
1643
|
-
}
|
|
1644
|
-
/**
|
|
1645
|
-
* Derive a display title from a file name: strip any directory prefix and the
|
|
1646
|
-
* trailing extension (`docs/Longview Plan.md` → `Longview Plan`). Returns an
|
|
1647
|
-
* empty string for an absent/blank name so callers can pass the result through
|
|
1648
|
-
* without extra guards.
|
|
1649
|
-
*/
|
|
1650
|
-
declare function documentTitleFromFileName(fileName?: string): string;
|
|
1651
|
-
declare function buildPreviewDoc(doc: Doc, options?: BuildPreviewDocOptions): Doc;
|
|
1652
|
-
|
|
1653
1615
|
/**
|
|
1654
1616
|
* TemplateAnnotation — Tiptap Heading Extension
|
|
1655
1617
|
*
|
|
@@ -1749,6 +1711,23 @@ interface FenceBlockEntry {
|
|
|
1749
1711
|
/** Document position of the codeBlock node at the current state. */
|
|
1750
1712
|
pos: number;
|
|
1751
1713
|
}
|
|
1714
|
+
/**
|
|
1715
|
+
* Remap a family's previous registry entries onto the new document, returning
|
|
1716
|
+
* `mappedPos -> id` for every fence whose identity carries over.
|
|
1717
|
+
*
|
|
1718
|
+
* Two passes:
|
|
1719
|
+
* 1. survivors whose start position was untouched — the common case;
|
|
1720
|
+
* 2. boundary-churn survivors, where an attrs-only `setNodeMarkup` makes
|
|
1721
|
+
* `mapResult` report the start as deleted even though the same block is
|
|
1722
|
+
* still there. Adopt the old id only when a codeBlock sits at the mapped
|
|
1723
|
+
* position, the slot is unclaimed, AND the old node actually survived
|
|
1724
|
+
* (see {@link survivedAsChurn}).
|
|
1725
|
+
*
|
|
1726
|
+
* Callers then walk the new doc: a position present in this map keeps its id
|
|
1727
|
+
* (and may use a lenient re-parse gate); a position absent from it is a NEW
|
|
1728
|
+
* fence that must pass full detection.
|
|
1729
|
+
*/
|
|
1730
|
+
declare function mapFenceEntries(tr: Transaction, previous: readonly FenceBlockEntry[], doc: Node): Map<number, string>;
|
|
1752
1731
|
|
|
1753
1732
|
/**
|
|
1754
1733
|
* AsciiDiagramExtension — Tiptap/ProseMirror plugin that turns code blocks
|
|
@@ -2496,9 +2475,19 @@ interface CodeSnippetPluginState {
|
|
|
2496
2475
|
interface CodeSnippetExtensionOptions {
|
|
2497
2476
|
/** When false, leave all ordinary language-tagged fences as code blocks. */
|
|
2498
2477
|
enabled?: boolean;
|
|
2478
|
+
/**
|
|
2479
|
+
* Fence languages this extension must NOT claim — typically the keys of
|
|
2480
|
+
* a host `FenceRendererMap` so `HostFenceExtension` can own them instead
|
|
2481
|
+
* of every unknown language becoming a Monaco inset. Tokens are
|
|
2482
|
+
* normalized like fence languages (first token, lowercased). Evaluated
|
|
2483
|
+
* at configure time: changing the *set* of registered languages
|
|
2484
|
+
* requires re-configuring the editor; renderer implementations can
|
|
2485
|
+
* change freely behind the host extension's getter.
|
|
2486
|
+
*/
|
|
2487
|
+
reservedLanguages?: readonly string[];
|
|
2499
2488
|
}
|
|
2500
2489
|
declare const CODE_SNIPPET_KEY: PluginKey<CodeSnippetPluginState>;
|
|
2501
|
-
declare function isCodeSnippetNode(node: Node): boolean;
|
|
2490
|
+
declare function isCodeSnippetNode(node: Node, reserved?: ReadonlySet<string>): boolean;
|
|
2502
2491
|
declare function findCodeSnippetBlockPos(editor: Editor, blockId: string): number | null;
|
|
2503
2492
|
declare const CodeSnippetExtension: Extension<CodeSnippetExtensionOptions, any>;
|
|
2504
2493
|
|
|
@@ -2680,6 +2669,97 @@ declare function applyTreeCommand(editor: Editor, blockId: string, cmd: TreeComm
|
|
|
2680
2669
|
*/
|
|
2681
2670
|
declare function shouldPasteAsTreeFence(text: string): boolean;
|
|
2682
2671
|
|
|
2672
|
+
/**
|
|
2673
|
+
* HostFenceExtension — mounts HOST-registered fence renderers
|
|
2674
|
+
* (`@bendyline/squisq/fence`) inside the WYSIWYG editor.
|
|
2675
|
+
*
|
|
2676
|
+
* Structurally a sibling of TreeViewExtension/CodeSnippetExtension:
|
|
2677
|
+
* position registry with stable synthetic ids, `mapFenceEntries` for
|
|
2678
|
+
* boundary-churn survival, hide-the-fence node decoration + a widget
|
|
2679
|
+
* decoration hosting a React root with `containFenceWidgetEvents`.
|
|
2680
|
+
*
|
|
2681
|
+
* Ownership is simply "the host registry claims this fence language".
|
|
2682
|
+
* The registry is read through a GETTER (the `mentionProvider` pattern)
|
|
2683
|
+
* so renderer implementations can change without remounting the editor;
|
|
2684
|
+
* the *set* of claimed languages is also consulted per-transaction, but
|
|
2685
|
+
* remember to pass the same languages to
|
|
2686
|
+
* `CodeSnippetExtension.reservedLanguages` or Monaco claims them first.
|
|
2687
|
+
*
|
|
2688
|
+
* The fence body is the single source of truth. Renderers receive
|
|
2689
|
+
* `mode: 'edit'` plus a `replaceValue` callback that rewrites the fence
|
|
2690
|
+
* text in one undoable transaction; the info-string meta is NOT provided
|
|
2691
|
+
* (it does not survive the ProseMirror round-trip — payload lives in the
|
|
2692
|
+
* body, see the fence contract docs).
|
|
2693
|
+
*
|
|
2694
|
+
* The React surface lives in `HostFenceWidget.tsx`, mirroring how every
|
|
2695
|
+
* other fence family splits its `.ts` extension from its `.tsx` widget.
|
|
2696
|
+
*/
|
|
2697
|
+
|
|
2698
|
+
type HostFenceBlockEntry = FenceBlockEntry;
|
|
2699
|
+
interface HostFencePluginState {
|
|
2700
|
+
entries: HostFenceBlockEntry[];
|
|
2701
|
+
decorations: DecorationSet;
|
|
2702
|
+
seq: number;
|
|
2703
|
+
}
|
|
2704
|
+
declare const HOST_FENCE_KEY: PluginKey<HostFencePluginState>;
|
|
2705
|
+
interface HostFenceExtensionOptions {
|
|
2706
|
+
/** When false, the extension is inert. */
|
|
2707
|
+
enabled?: boolean;
|
|
2708
|
+
/**
|
|
2709
|
+
* Getter for the host registry — read on every ownership check so
|
|
2710
|
+
* renderer implementations stay live without an editor remount.
|
|
2711
|
+
*/
|
|
2712
|
+
renderers?: () => FenceRendererMap | null | undefined;
|
|
2713
|
+
/** Getter for the active theme, forwarded into the render context. */
|
|
2714
|
+
theme?: () => Theme | undefined;
|
|
2715
|
+
}
|
|
2716
|
+
declare function findHostFenceBlockPos(editor: Editor, blockId: string): number | null;
|
|
2717
|
+
/**
|
|
2718
|
+
* Replace a claimed fence's body in one undoable transaction. This is
|
|
2719
|
+
* what backs `FenceRenderContext.replaceValue` in edit mode; exported so
|
|
2720
|
+
* hosts building their own extensions get the same write boundary
|
|
2721
|
+
* (read-only enforcement included) as the built-in fence families.
|
|
2722
|
+
*/
|
|
2723
|
+
declare function replaceHostFenceText(editor: Editor, blockId: string, next: string): boolean;
|
|
2724
|
+
declare const HostFenceExtension: Extension<HostFenceExtensionOptions, any>;
|
|
2725
|
+
|
|
2726
|
+
/**
|
|
2727
|
+
* Shared DOM containment for the interactive widgets that the fence-widget
|
|
2728
|
+
* families (ascii diagram, tree, timeline, mermaid) mount over a hidden code
|
|
2729
|
+
* fence via a ProseMirror widget decoration.
|
|
2730
|
+
*
|
|
2731
|
+
* Why this exists: a widget host is `contentEditable="false"` inside a
|
|
2732
|
+
* contentEditable ProseMirror surface, but the real form controls it contains
|
|
2733
|
+
* (`<input>`, `<textarea>`, `<select>`) still bubble their COMPLETE edit
|
|
2734
|
+
* stream up to the editor's DOM. ProseMirror's own handlers sit on
|
|
2735
|
+
* `view.dom`, so a `beforeinput`/`paste`/`compositionend` that originated in
|
|
2736
|
+
* a widget's rename field is ALSO interpreted as text insertion at the
|
|
2737
|
+
* document selection — the user types in the widget and the characters land
|
|
2738
|
+
* in the document. Stopping propagation at the host boundary is what keeps
|
|
2739
|
+
* the two edit surfaces separate.
|
|
2740
|
+
*
|
|
2741
|
+
* `keydown`/`keyup`/`pointerdown`/`mousedown` are contained for the same
|
|
2742
|
+
* reason: they drive ProseMirror's keymap and selection handling.
|
|
2743
|
+
*
|
|
2744
|
+
* This must stay ONE list used by every host — it drifted into three
|
|
2745
|
+
* divergent copies once already (only the timeline stopped the composition /
|
|
2746
|
+
* paste stream, so IME and paste edits leaked out of the diagram and tree
|
|
2747
|
+
* widgets).
|
|
2748
|
+
*/
|
|
2749
|
+
/**
|
|
2750
|
+
* Every event a mounted fence widget must keep to itself. Ordered
|
|
2751
|
+
* pointer → key → text-input → composition → clipboard.
|
|
2752
|
+
*/
|
|
2753
|
+
declare const FENCE_WIDGET_CONTAINED_EVENTS: readonly ["pointerdown", "mousedown", "keydown", "keyup", "beforeinput", "input", "change", "compositionstart", "compositionupdate", "compositionend", "paste", "cut"];
|
|
2754
|
+
/**
|
|
2755
|
+
* Stop every contained event at `container` so interaction inside a mounted
|
|
2756
|
+
* fence widget never reaches the ProseMirror editor that hosts it.
|
|
2757
|
+
*
|
|
2758
|
+
* Call once, on the host element created by a widget decoration, before
|
|
2759
|
+
* mounting React into it.
|
|
2760
|
+
*/
|
|
2761
|
+
declare function containFenceWidgetEvents(container: HTMLElement): void;
|
|
2762
|
+
|
|
2683
2763
|
/**
|
|
2684
2764
|
* TimelineViewExtension — mounts a WYSIWYG timeline editor over qualifying
|
|
2685
2765
|
* authored timeline code fences while keeping the fence text as source of
|
|
@@ -2843,4 +2923,4 @@ declare function applyTimelineCommand(editor: Editor, blockId: string, command:
|
|
|
2843
2923
|
/** Paste gate for bare, high-confidence Unicode timeline art. */
|
|
2844
2924
|
declare function shouldPasteAsTimelineFence(text: string): boolean;
|
|
2845
2925
|
|
|
2846
|
-
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, type BlockRange, type BlockSlice,
|
|
2926
|
+
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, type BlockRange, type BlockSlice, CODE_SNIPPET_KEY, CODE_SNIPPET_LANGUAGES, CodeContext, CodeContextZones, type CodeSnippetBlockEntry, type CodeSnippetData, CodeSnippetExtension, type CodeSnippetExtensionOptions, type CodeSnippetLanguage, type CodeSnippetPluginState, CodeSnippetWidget, type CodeSnippetWidgetProps, type CustomTemplateContextValue, CustomTemplateProvider, type CustomTemplateProviderProps, type CustomThemeContextValue, CustomThemeProvider, type CustomThemeProviderProps, DEFAULT_MERMAID_DIAGRAM_TYPE, 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, HOST_FENCE_KEY, type HeadingTransitionAttrs, 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, 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, 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 RepairableBlockEntry, RepairableDiagramExtension, type RepairableDiagramExtensionOptions, type RepairablePluginState, StatusBar, type StatusBarProps, 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, addEdgeOp, addItemOp, addNodeOp, addTimelineEventOp, applyAsciiDiagramCommand, applyRepairCommand, applyTimelineCommand, applyTreeCommand, asciiDiagramToCanvas, classifyFile, codeSnippetFenceLanguageToken, codeSnippetLanguageLabel, codeSnippetMarkdown, containFenceWidgetEvents, detectLanguageFromFileName, draftPatchFromImportedTheme, findAsciiDiagramBlockPos, findCodeSnippetBlockPos, findHostFenceBlockPos, findMermaidDiagramBlockPos, findRepairableBlockPos, findTimelineBlockPos, findTransitionEntry, findTreeBlockPos, formatSeconds, getBlockSlices, getTimelineForNode, indentItemOp, ingestForWrite, inspectMermaidSource, isAsciiSourceVisible, isCodeSnippetFenceLanguage, isCodeSnippetNode, isMermaidDiagramNode, isMermaidFlowchartShapeId, isMermaidSourceVisible, isRepairableFence, isTimelineSourceSafeForSemanticEdit, lineToOffset, mapFenceEntries, markdownToTiptap, mermaidDiagramMarkdown, mermaidDiagramProperties, mermaidEditCapabilities, mermaidEditableTexts, mermaidErrorMessage, monacoLanguageForFence, moveItemDownOp, moveItemUpOp, moveNodeOp, nextTimelineEventId, normalizeMermaidFlowchartShape, offsetToLine, outdentItemOp, parseTimelineForNode, partitionFiles, persistFromWrite, preloadMonaco, preloadMonacoSuggestions, processMediaFiles, processTextFile, processTextFiles, readBlockAttrsParams, readBlockAttrsTransition, readBlockAttrsValue, readHeadingLineTransition, removeEdgeOp, removeItemOp, removeNodeOp, removeTimelineEventOp, renameItemOp, renameNodeOp, renderMermaidDiagram, replaceAsciiFenceText, replaceCodeSnippetText, replaceHostFenceText, replaceAsciiFenceText as replaceTreeFenceText, resizeNodeOp, resolveFileKind, sanitizeAsciiLabel, sanitizeTimelineText, sanitizeTreeLabel, searchPickerEntries, setBlockAttrsValue, setBlockDurationInSource, setBlockStartTimeInSource, setBlockTransitionInSource, setHeadingAttrsTransition, setHeadingLineTransition, setMediaClipInSource, shouldPasteAsAsciiFence, shouldPasteAsTimelineFence, shouldPasteAsTreeFence, sliceIndexAtOffset, spliceBlock, summarizeBlockProps, templateLabel, tiptapToMarkdown, toggleAsciiSource, toggleDirOp, toggleMermaidSource, transitionLabel, translateDiagramOp, updateTimelineEventOp, useAsciiDiagramData, useBlockNavigator, useCodeSnippetData, useCustomTemplates, useCustomThemes, useDocCustomTemplates, useDocCustomThemes, useFileDrop, useMermaidDiagramData, useMonacoLoader, usePreviewSettings, useTimelineData, useTreeViewData };
|
package/dist/index.js
CHANGED
|
@@ -26,8 +26,11 @@ import {
|
|
|
26
26
|
EditorProvider,
|
|
27
27
|
EditorShell,
|
|
28
28
|
EmojiPicker,
|
|
29
|
+
FENCE_WIDGET_CONTAINED_EVENTS,
|
|
29
30
|
FontPicker,
|
|
31
|
+
HOST_FENCE_KEY,
|
|
30
32
|
HeadingWithTemplate,
|
|
33
|
+
HostFenceExtension,
|
|
31
34
|
IMAGE_TREATMENT_PRESETS,
|
|
32
35
|
ImportThemeSection,
|
|
33
36
|
InlinePreviewGutter,
|
|
@@ -92,11 +95,13 @@ import {
|
|
|
92
95
|
codeSnippetLanguageLabel,
|
|
93
96
|
codeSnippetMarkdown,
|
|
94
97
|
compileDraft,
|
|
98
|
+
containFenceWidgetEvents,
|
|
95
99
|
detectLanguageFromFileName,
|
|
96
100
|
documentTitleFromFileName,
|
|
97
101
|
draftPatchFromImportedTheme,
|
|
98
102
|
findAsciiDiagramBlockPos,
|
|
99
103
|
findCodeSnippetBlockPos,
|
|
104
|
+
findHostFenceBlockPos,
|
|
100
105
|
findMermaidDiagramBlockPos,
|
|
101
106
|
findRepairableBlockPos,
|
|
102
107
|
findTimelineBlockPos,
|
|
@@ -117,6 +122,7 @@ import {
|
|
|
117
122
|
isRepairableFence,
|
|
118
123
|
isTimelineSourceSafeForSemanticEdit,
|
|
119
124
|
lineToOffset,
|
|
125
|
+
mapFenceEntries,
|
|
120
126
|
mermaidDiagramMarkdown,
|
|
121
127
|
mermaidDiagramProperties,
|
|
122
128
|
mermaidEditCapabilities,
|
|
@@ -152,6 +158,7 @@ import {
|
|
|
152
158
|
renderMermaidDiagram,
|
|
153
159
|
replaceAsciiFenceText,
|
|
154
160
|
replaceCodeSnippetText,
|
|
161
|
+
replaceHostFenceText,
|
|
155
162
|
resizeNodeOp,
|
|
156
163
|
resolveFileKind,
|
|
157
164
|
sanitizeAsciiLabel,
|
|
@@ -194,7 +201,7 @@ import {
|
|
|
194
201
|
usePreviewSettings,
|
|
195
202
|
useTimelineData,
|
|
196
203
|
useTreeViewData
|
|
197
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-BYXVO34Z.js";
|
|
198
205
|
import "./chunk-V4NBQF5C.js";
|
|
199
206
|
import {
|
|
200
207
|
JsonEditor
|
|
@@ -212,9 +219,10 @@ import {
|
|
|
212
219
|
} from "./chunk-V44VP242.js";
|
|
213
220
|
import {
|
|
214
221
|
RecorderButton
|
|
215
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-AZ5ME4XG.js";
|
|
216
223
|
import {
|
|
217
224
|
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
225
|
+
RecorderDeviceQuickPicks,
|
|
218
226
|
RecorderDeviceSettingsPanel,
|
|
219
227
|
RecorderModal,
|
|
220
228
|
RecorderPanel,
|
|
@@ -223,11 +231,15 @@ import {
|
|
|
223
231
|
buildRecorderScreenAudioConstraints,
|
|
224
232
|
buildRecorderScreenConstraints,
|
|
225
233
|
getCaptureKind,
|
|
234
|
+
hasRecorderDeviceChoice,
|
|
226
235
|
recordedMediaKind,
|
|
227
236
|
recorderBitsPerSecond,
|
|
237
|
+
recorderDeviceGroups,
|
|
238
|
+
recorderDeviceOptions,
|
|
228
239
|
requestScreenStream,
|
|
240
|
+
useMediaDevices,
|
|
229
241
|
useMediaRecorder
|
|
230
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-V3J5S7X6.js";
|
|
231
243
|
import "./chunk-GS7QWYFT.js";
|
|
232
244
|
import {
|
|
233
245
|
TeleprompterView
|
|
@@ -718,8 +730,11 @@ export {
|
|
|
718
730
|
EditorProvider,
|
|
719
731
|
EditorShell,
|
|
720
732
|
EmojiPicker,
|
|
733
|
+
FENCE_WIDGET_CONTAINED_EVENTS,
|
|
721
734
|
FolderView,
|
|
735
|
+
HOST_FENCE_KEY,
|
|
722
736
|
HeadingWithTemplate,
|
|
737
|
+
HostFenceExtension,
|
|
723
738
|
ImageEditor,
|
|
724
739
|
ImageViewer,
|
|
725
740
|
ImportThemeSection,
|
|
@@ -749,6 +764,7 @@ export {
|
|
|
749
764
|
REPAIRABLE_KEY,
|
|
750
765
|
RawEditor,
|
|
751
766
|
RecorderButton,
|
|
767
|
+
RecorderDeviceQuickPicks,
|
|
752
768
|
RecorderDeviceSettingsPanel,
|
|
753
769
|
RecorderModal,
|
|
754
770
|
RecorderPanel,
|
|
@@ -803,6 +819,7 @@ export {
|
|
|
803
819
|
codeSnippetLanguageLabel,
|
|
804
820
|
codeSnippetMarkdown,
|
|
805
821
|
configureMonacoWorkers,
|
|
822
|
+
containFenceWidgetEvents,
|
|
806
823
|
createFloatingWindowManager,
|
|
807
824
|
detectFloatTiers,
|
|
808
825
|
detectLanguageFromFileName,
|
|
@@ -813,6 +830,7 @@ export {
|
|
|
813
830
|
executeNarrationSave,
|
|
814
831
|
findAsciiDiagramBlockPos,
|
|
815
832
|
findCodeSnippetBlockPos,
|
|
833
|
+
findHostFenceBlockPos,
|
|
816
834
|
findMermaidDiagramBlockPos,
|
|
817
835
|
findRepairableBlockPos,
|
|
818
836
|
findTimelineBlockPos,
|
|
@@ -822,6 +840,7 @@ export {
|
|
|
822
840
|
getBlockSlices,
|
|
823
841
|
getCaptureKind,
|
|
824
842
|
getTimelineForNode,
|
|
843
|
+
hasRecorderDeviceChoice,
|
|
825
844
|
imageEditorReducer,
|
|
826
845
|
indentItemOp,
|
|
827
846
|
ingestForWrite,
|
|
@@ -837,6 +856,7 @@ export {
|
|
|
837
856
|
isRepairableFence,
|
|
838
857
|
isTimelineSourceSafeForSemanticEdit,
|
|
839
858
|
lineToOffset,
|
|
859
|
+
mapFenceEntries,
|
|
840
860
|
markdownToTiptap,
|
|
841
861
|
measureTokenLines,
|
|
842
862
|
mermaidDiagramMarkdown,
|
|
@@ -868,6 +888,8 @@ export {
|
|
|
868
888
|
readHeadingLineTransition,
|
|
869
889
|
recordedMediaKind,
|
|
870
890
|
recorderBitsPerSecond,
|
|
891
|
+
recorderDeviceGroups,
|
|
892
|
+
recorderDeviceOptions,
|
|
871
893
|
registerPcmWorklet,
|
|
872
894
|
removeEdgeOp,
|
|
873
895
|
removeItemOp,
|
|
@@ -878,6 +900,7 @@ export {
|
|
|
878
900
|
renderMermaidDiagram,
|
|
879
901
|
replaceAsciiFenceText,
|
|
880
902
|
replaceCodeSnippetText,
|
|
903
|
+
replaceHostFenceText,
|
|
881
904
|
replaceAsciiFenceText as replaceTreeFenceText,
|
|
882
905
|
requestCameraStream,
|
|
883
906
|
requestMicStream,
|
|
@@ -927,6 +950,7 @@ export {
|
|
|
927
950
|
useFileDrop,
|
|
928
951
|
useFloatingWindow,
|
|
929
952
|
useImageEditor,
|
|
953
|
+
useMediaDevices,
|
|
930
954
|
useMediaRecorder,
|
|
931
955
|
useMermaidDiagramData,
|
|
932
956
|
useMicAnalysis,
|
package/dist/recorder/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CameraStreamOptions, D as DEFAULT_RECORDER_DEVICE_SETTINGS, 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
|
|
1
|
+
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, s as RecorderPanel, t as RecorderPanelProps, u as RecorderSaveResult, v as RecorderScreenAudioSettings, w as RecorderScreenDeviceSettings, S as ScreenStreamHandle, x as ScreenStreamOptions, T as TimingJson, y as buildRecorderAudioConstraints, z as buildRecorderCameraConstraints, A as buildRecorderScreenAudioConstraints, B as buildRecorderScreenConstraints, E as buildTimingJson, F as encodeTimingJson, G as hasRecorderDeviceChoice, H as recordedMediaKind, I as recorderBitsPerSecond, J as recorderDeviceGroups, K as recorderDeviceOptions, L as requestCameraStream, N as requestMicStream, O as requestScreenStream, P as timingPathFor, Q as useMediaDevices, U as useStreamPreview } from '../recorder-DFP0Dw4v.js';
|
|
2
2
|
export { a as CaptureKind, R as RecorderAudioBitrateMode, i as RecorderCameraLane, j as RecorderExtendedMediaOptions, k as RecorderSource, l as RecorderState, m as ResolvedFormat, U as UseMediaRecorderOptions, p as UseMediaRecorderResult, r as buildFilename, u as getCaptureKind, v as resolveFormat, w as supportsDisplayMedia, x as supportsMediaRecorder, y as supportsUserMedia, A as useMediaRecorder } from '../useNarrationStage-Bk3mdW75.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import '@bendyline/squisq/schemas';
|
package/dist/recorder/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RecorderButton
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-AZ5ME4XG.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
6
|
+
RecorderDeviceQuickPicks,
|
|
6
7
|
RecorderDeviceSettingsPanel,
|
|
7
8
|
RecorderModal,
|
|
8
9
|
RecorderPanel,
|
|
@@ -11,11 +12,15 @@ import {
|
|
|
11
12
|
buildRecorderScreenAudioConstraints,
|
|
12
13
|
buildRecorderScreenConstraints,
|
|
13
14
|
getCaptureKind,
|
|
15
|
+
hasRecorderDeviceChoice,
|
|
14
16
|
recordedMediaKind,
|
|
15
17
|
recorderBitsPerSecond,
|
|
18
|
+
recorderDeviceGroups,
|
|
19
|
+
recorderDeviceOptions,
|
|
16
20
|
requestScreenStream,
|
|
21
|
+
useMediaDevices,
|
|
17
22
|
useMediaRecorder
|
|
18
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-V3J5S7X6.js";
|
|
19
24
|
import "../chunk-GS7QWYFT.js";
|
|
20
25
|
import {
|
|
21
26
|
buildFilename,
|
|
@@ -33,6 +38,7 @@ import {
|
|
|
33
38
|
export {
|
|
34
39
|
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
35
40
|
RecorderButton,
|
|
41
|
+
RecorderDeviceQuickPicks,
|
|
36
42
|
RecorderDeviceSettingsPanel,
|
|
37
43
|
RecorderModal,
|
|
38
44
|
RecorderPanel,
|
|
@@ -44,8 +50,11 @@ export {
|
|
|
44
50
|
buildTimingJson,
|
|
45
51
|
encodeTimingJson,
|
|
46
52
|
getCaptureKind,
|
|
53
|
+
hasRecorderDeviceChoice,
|
|
47
54
|
recordedMediaKind,
|
|
48
55
|
recorderBitsPerSecond,
|
|
56
|
+
recorderDeviceGroups,
|
|
57
|
+
recorderDeviceOptions,
|
|
49
58
|
requestCameraStream,
|
|
50
59
|
requestMicStream,
|
|
51
60
|
requestScreenStream,
|
|
@@ -54,6 +63,7 @@ export {
|
|
|
54
63
|
supportsMediaRecorder,
|
|
55
64
|
supportsUserMedia,
|
|
56
65
|
timingPathFor,
|
|
66
|
+
useMediaDevices,
|
|
57
67
|
useMediaRecorder,
|
|
58
68
|
useStreamPreview
|
|
59
69
|
};
|
|
@@ -240,6 +240,105 @@ interface RecorderDeviceSettingsPanelProps {
|
|
|
240
240
|
}
|
|
241
241
|
declare function RecorderDeviceSettingsPanel({ value, onChange, disabled, microphoneEnabled, cameraEnabled, screenEnabled, systemAudioEnabled, separateAudioRecorder, primaryStream, cameraStream, }: RecorderDeviceSettingsPanelProps): react_jsx_runtime.JSX.Element;
|
|
242
242
|
|
|
243
|
+
/**
|
|
244
|
+
* Microphone / camera pickers promoted out of "Advanced device settings".
|
|
245
|
+
*
|
|
246
|
+
* Choosing WHICH microphone or camera to record is an everyday decision on a
|
|
247
|
+
* machine that has more than one, and burying it under a disclosure whose
|
|
248
|
+
* other twenty fields are constraint plumbing puts it in the wrong place. Each
|
|
249
|
+
* picker therefore appears inline when — and only when — two conditions hold:
|
|
250
|
+
* its source is enabled, and the browser reports more than one real device of
|
|
251
|
+
* that kind (see `recorderDeviceOptions` for what "real" excludes). A machine
|
|
252
|
+
* with a single webcam gets no camera picker, because there is nothing to pick.
|
|
253
|
+
*
|
|
254
|
+
* These are the SAME selects as the ones in the advanced panel, bound to the
|
|
255
|
+
* same `RecorderDeviceSettings` and rendering the same option list — a
|
|
256
|
+
* shortcut to one setting, never a second source of truth.
|
|
257
|
+
*/
|
|
258
|
+
interface RecorderDeviceQuickPicksProps {
|
|
259
|
+
/** Enumerated devices, typically from `useMediaDevices()`. */
|
|
260
|
+
devices: readonly MediaDeviceInfo[];
|
|
261
|
+
microphoneEnabled: boolean;
|
|
262
|
+
cameraEnabled: boolean;
|
|
263
|
+
audioDeviceId: string;
|
|
264
|
+
cameraDeviceId: string;
|
|
265
|
+
onAudioDeviceChange: (deviceId: string) => void;
|
|
266
|
+
onCameraDeviceChange: (deviceId: string) => void;
|
|
267
|
+
disabled?: boolean;
|
|
268
|
+
}
|
|
269
|
+
declare function RecorderDeviceQuickPicks({ devices, microphoneEnabled, cameraEnabled, audioDeviceId, cameraDeviceId, onAudioDeviceChange, onCameraDeviceChange, disabled, }: RecorderDeviceQuickPicksProps): react_jsx_runtime.JSX.Element | null;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Turning an `enumerateDevices()` result into the option list a recorder
|
|
273
|
+
* device picker should show — and answering "does the user actually have a
|
|
274
|
+
* choice here?", which is what decides whether a picker is worth surfacing
|
|
275
|
+
* outside Advanced settings.
|
|
276
|
+
*
|
|
277
|
+
* Two kinds of entry are dropped:
|
|
278
|
+
*
|
|
279
|
+
* - **Alias ids.** Chromium reports `deviceId: 'default'` and
|
|
280
|
+
* `'communications'` for audio inputs: synthetic entries that POINT AT a
|
|
281
|
+
* real device further down the list. Counting them makes a single-microphone
|
|
282
|
+
* machine look like it has three. A picker's own "System default" choice
|
|
283
|
+
* (the empty deviceId — no constraint at all) already covers that intent.
|
|
284
|
+
* - **Blank ids.** Before the first permission grant, browsers return one
|
|
285
|
+
* label-less, id-less entry per device. There is nothing to select, so those
|
|
286
|
+
* are placeholders, not choices.
|
|
287
|
+
*
|
|
288
|
+
* The currently-selected id is always kept, even when a rule above would drop
|
|
289
|
+
* it, so a setting persisted from an earlier session can never silently vanish
|
|
290
|
+
* from the control that owns it.
|
|
291
|
+
*/
|
|
292
|
+
/** One selectable capture device. */
|
|
293
|
+
interface RecorderDeviceOption {
|
|
294
|
+
deviceId: string;
|
|
295
|
+
/** `device.label`, or a positional fallback when labels are withheld. */
|
|
296
|
+
label: string;
|
|
297
|
+
groupId: string;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* The real, selectable devices of one kind. Excludes the synthetic
|
|
301
|
+
* "System default" entry a picker renders itself.
|
|
302
|
+
*/
|
|
303
|
+
declare function recorderDeviceOptions(devices: readonly MediaDeviceInfo[], kind: MediaDeviceKind, noun: string, selectedDeviceId?: string): RecorderDeviceOption[];
|
|
304
|
+
/**
|
|
305
|
+
* True when more than one real device exists — i.e. picking between them is a
|
|
306
|
+
* decision the user could meaningfully make, rather than a control that can
|
|
307
|
+
* only ever restate the system default.
|
|
308
|
+
*/
|
|
309
|
+
declare function hasRecorderDeviceChoice(options: readonly RecorderDeviceOption[]): boolean;
|
|
310
|
+
/** Distinct hardware groups represented by an option list, in first-seen order. */
|
|
311
|
+
declare function recorderDeviceGroups(options: readonly RecorderDeviceOption[]): Array<{
|
|
312
|
+
id: string;
|
|
313
|
+
label: string;
|
|
314
|
+
}>;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Live `enumerateDevices()` inventory plus the browser's supported-constraint
|
|
318
|
+
* map, shared by every recorder surface that offers a device picker.
|
|
319
|
+
*
|
|
320
|
+
* Enumeration is best effort: browsers withhold labels — and sometimes ids —
|
|
321
|
+
* until the first permission grant, and that grant frequently does NOT fire
|
|
322
|
+
* `devicechange`. Callers holding a preview stream should therefore call
|
|
323
|
+
* `refresh()` when it lands:
|
|
324
|
+
*
|
|
325
|
+
* ```ts
|
|
326
|
+
* const { devices, refresh } = useMediaDevices();
|
|
327
|
+
* useEffect(() => {
|
|
328
|
+
* if (micStream || cameraStream) refresh();
|
|
329
|
+
* }, [micStream, cameraStream, refresh]);
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
/** What the browser will tell us about capture devices right now. */
|
|
333
|
+
interface MediaDeviceInventory {
|
|
334
|
+
devices: MediaDeviceInfo[];
|
|
335
|
+
/** `getSupportedConstraints()`, or null when the browser withholds it. */
|
|
336
|
+
supported: Record<string, boolean> | null;
|
|
337
|
+
/** Re-enumerate — call after a permission grant reveals labels. */
|
|
338
|
+
refresh: () => void;
|
|
339
|
+
}
|
|
340
|
+
declare function useMediaDevices(): MediaDeviceInventory;
|
|
341
|
+
|
|
243
342
|
/**
|
|
244
343
|
* useStreamPreview — binds a `MediaStream` to a `<video>` element's
|
|
245
344
|
* `srcObject`. Decouples the preview surface from `useMediaRecorder`,
|
|
@@ -412,4 +511,4 @@ declare function encodeTimingJson(timing: TimingJson): Uint8Array;
|
|
|
412
511
|
*/
|
|
413
512
|
declare function timingPathFor(audioRelativePath: string): string;
|
|
414
513
|
|
|
415
|
-
export {
|
|
514
|
+
export { buildRecorderScreenAudioConstraints as A, buildRecorderScreenConstraints as B, type CameraStreamOptions as C, DEFAULT_RECORDER_DEVICE_SETTINGS as D, buildTimingJson as E, encodeTimingJson as F, hasRecorderDeviceChoice as G, recordedMediaKind as H, recorderBitsPerSecond as I, recorderDeviceGroups as J, recorderDeviceOptions as K, requestCameraStream as L, type MediaDeviceInventory as M, requestMicStream as N, requestScreenStream as O, timingPathFor as P, useMediaDevices as Q, type RecordedBookmark as R, type ScreenStreamHandle as S, type TimingJson as T, useStreamPreview as U, type RecordedMediaKind as a, type RecorderAudioDeviceSettings as b, RecorderButton as c, type RecorderButtonProps as d, type RecorderCameraDeviceSettings as e, type RecorderCameraSaveResult as f, type RecorderColorScheme as g, type RecorderConstraintMode as h, type RecorderDeviceOption as i, RecorderDeviceQuickPicks as j, type RecorderDeviceQuickPicksProps as k, type RecorderDeviceSettings as l, RecorderDeviceSettingsPanel as m, type RecorderDeviceSettingsPanelProps as n, type RecorderEncodingSettings as o, RecorderModal as p, type RecorderModalProps as q, type RecorderNarrationOptions as r, RecorderPanel as s, type RecorderPanelProps as t, type RecorderSaveResult as u, type RecorderScreenAudioSettings as v, type RecorderScreenDeviceSettings as w, type ScreenStreamOptions as x, buildRecorderAudioConstraints as y, buildRecorderCameraConstraints as z };
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { B as BlockTagVisibility, D as DocumentLinkCandidate, b as DocumentLinkProvider, c as EditorActions, d as EditorColorScheme, e as EditorContextValue, E as EditorHostMode, f as EditorMode, g as EditorProvider, h as EditorProviderProps, i as EditorShell, j as EditorShellProps, k as EditorState, l as EditorView, I as ImageDisplayMode, L as LayoutMode, M as MentionCandidate, m as MentionProvider, P as PreviewPanel, n as PreviewPanelProps, R as RawEditor, o as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, p as WysiwygEditor, q as WysiwygEditorProps, u as useEditorContext } from '../shell-
|
|
1
|
+
export { B as BlockTagVisibility, D as DocumentLinkCandidate, b as DocumentLinkProvider, c as EditorActions, d as EditorColorScheme, e as EditorContextValue, E as EditorHostMode, f as EditorMode, g as EditorProvider, h as EditorProviderProps, i as EditorShell, j as EditorShellProps, k as EditorState, l as EditorView, I as ImageDisplayMode, L as LayoutMode, M as MentionCandidate, m as MentionProvider, P as PreviewPanel, n as PreviewPanelProps, R as RawEditor, o as RawEditorProps, T as ThemeInheritance, V as ViewPreferences, p as WysiwygEditor, q as WysiwygEditorProps, u as useEditorContext } from '../shell-595XbANu.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@bendyline/squisq/schemas';
|
|
5
|
+
import '@bendyline/squisq/fence';
|
|
5
6
|
import '@bendyline/squisq/markdown';
|
|
6
7
|
import '@bendyline/squisq/storage';
|
|
7
8
|
import '@bendyline/squisq/versions';
|
package/dist/shell/index.js
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
RawEditor,
|
|
6
6
|
WysiwygEditor,
|
|
7
7
|
useEditorContext
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-BYXVO34Z.js";
|
|
9
9
|
import "../chunk-V4NBQF5C.js";
|
|
10
10
|
import "../chunk-K2WJYVS4.js";
|
|
11
11
|
import "../chunk-V44VP242.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-V3J5S7X6.js";
|
|
13
13
|
import "../chunk-GS7QWYFT.js";
|
|
14
14
|
import "../chunk-IQFPX2CE.js";
|
|
15
15
|
import "../chunk-OWOKKZAU.js";
|