@bendyline/squisq-editor-react 2.11.3 → 2.11.5
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-PMNNJYFD.js → chunk-34FRFDQ6.js} +138 -30
- package/dist/{chunk-7RRYZULY.js → chunk-BJ3TXAIQ.js} +155 -15
- package/dist/{chunk-VH45VMPL.js → chunk-DN6XFOY2.js} +1 -1
- package/dist/chunk-DUO5XZQK.js +1653 -0
- package/dist/{chunk-UNOKKSAC.js → chunk-ENDRPV6T.js} +1 -1
- package/dist/{chunk-A2W4GYPG.js → chunk-ES6CPRCW.js} +5 -4
- package/dist/{chunk-SK3MQSHQ.js → chunk-UYKOTWJM.js} +1 -1
- package/dist/{chunk-AAIZHMVD.js → chunk-WMNH5ROU.js} +2802 -3764
- package/dist/index.d.ts +9 -57
- package/dist/index.js +19 -17
- package/dist/json-editor/index.js +2 -2
- package/dist/proofing/index.d.ts +2 -2
- package/dist/recorder/index.d.ts +2 -2
- package/dist/recorder/index.js +3 -3
- package/dist/{recorder-GrEh4xE8.d.ts → recorder-B6MtQH5u.d.ts} +4 -2
- package/dist/review/index.d.ts +285 -0
- package/dist/review/index.js +103 -0
- package/dist/shell/index.d.ts +4 -2
- package/dist/shell/index.js +9 -7
- package/dist/{shell-CJkHDwpz.d.ts → shell-Dwf_W4K4.d.ts} +116 -3
- package/dist/styles/index.css +152 -0
- package/dist/teleprompter/index.d.ts +2 -2
- package/dist/teleprompter/index.js +2 -2
- package/dist/types-C0puuw-M.d.ts +81 -0
- package/dist/{types-B_aHRuSc.d.ts → types-De4z-gGb.d.ts} +1 -1
- package/dist/{useNarrationStage-B6r9Zlq-.d.ts → useNarrationStage-D3Sgcf0L.d.ts} +19 -0
- package/package.json +10 -6
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-
|
|
2
|
-
export { B as
|
|
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-Dwf_W4K4.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-Dwf_W4K4.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';
|
|
@@ -26,16 +26,18 @@ import { FenceRendererMap } from '@bendyline/squisq/fence';
|
|
|
26
26
|
import { TableViewState } from '@bendyline/squisq/table';
|
|
27
27
|
import { EditJournal } from '@bendyline/squisq-grid-react';
|
|
28
28
|
export { JsonEditor, JsonEditorProps } from './json-editor/index.js';
|
|
29
|
-
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-
|
|
30
|
-
import { R as RecorderState } from './useNarrationStage-
|
|
31
|
-
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-
|
|
29
|
+
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-B6MtQH5u.js';
|
|
30
|
+
import { R as RecorderState } from './useNarrationStage-D3Sgcf0L.js';
|
|
31
|
+
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-D3Sgcf0L.js';
|
|
32
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 { H as HarperProofingConfig,
|
|
33
|
+
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
34
|
export { createHarperProofingProvider } from './proofing/index.js';
|
|
35
35
|
export { PROOF_DIALECTS, PROOF_FRONTMATTER_KEYS, ProofCategory, ProofDialect, ProofFinding, ProofRange, ProofSuggestion, ProofSuggestionKind } from '@bendyline/squisq/proof';
|
|
36
36
|
import '@bendyline/squisq-calc';
|
|
37
37
|
import '@bendyline/squisq-formats/xlsx';
|
|
38
38
|
import '@bendyline/squisq/versions';
|
|
39
|
+
import './types-C0puuw-M.js';
|
|
40
|
+
import '@bendyline/squisq/review';
|
|
39
41
|
import '@bendyline/squisq/imageEdit';
|
|
40
42
|
import '@bendyline/squisq/jsonForm';
|
|
41
43
|
import '@bendyline/squisq/narration';
|
|
@@ -173,56 +175,6 @@ interface BlockCardViewProps {
|
|
|
173
175
|
}
|
|
174
176
|
declare function BlockCardView({ active, blockCount, activeBlockKey, onPrev, onNext, onAdd, children, className, }: BlockCardViewProps): react_jsx_runtime.JSX.Element;
|
|
175
177
|
|
|
176
|
-
/**
|
|
177
|
-
* blockRange
|
|
178
|
-
*
|
|
179
|
-
* Source-text-range slicing for the block-at-a-time editing view. Splits a
|
|
180
|
-
* full markdown document into ordered, contiguous slices — one per
|
|
181
|
-
* heading-defined block plus an optional leading preamble — so a single
|
|
182
|
-
* block can be shown in isolation and edits spliced back into the parent.
|
|
183
|
-
*
|
|
184
|
-
* A block runs from its heading line through the character just before the
|
|
185
|
-
* next heading at ANY depth (or EOF). Sub-headings therefore start their own
|
|
186
|
-
* slices — they are NOT folded into their parent — which matches the
|
|
187
|
-
* "don't see child blocks" requirement and the `slicePastHeading` boundary
|
|
188
|
-
* in `blockSlice.ts`. Ranges are half-open `[startOffset, endOffset)` and
|
|
189
|
-
* line-aligned, so trailing blank lines stay with the current block and
|
|
190
|
-
* `spliceBlock(src, range, getBlockSlices(src)[i].text) === src` for every i.
|
|
191
|
-
*
|
|
192
|
-
* These are pure functions over a markdown string — no React, no editor
|
|
193
|
-
* coupling — so any host can reuse them.
|
|
194
|
-
*/
|
|
195
|
-
/** Half-open character range into the full source: `[startOffset, endOffset)`. */
|
|
196
|
-
interface BlockRange {
|
|
197
|
-
startOffset: number;
|
|
198
|
-
endOffset: number;
|
|
199
|
-
}
|
|
200
|
-
/** One block's source text plus the range it occupies in the full document. */
|
|
201
|
-
interface BlockSlice {
|
|
202
|
-
text: string;
|
|
203
|
-
range: BlockRange;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Split `fullSource` into ordered block slices.
|
|
207
|
-
*
|
|
208
|
-
* - With no headings, the entire post-frontmatter body is a single slice
|
|
209
|
-
* (so an empty or heading-less document still shows one editable card).
|
|
210
|
-
* - With headings, a leading preamble slice is included only when the text
|
|
211
|
-
* before the first heading has non-whitespace content. Each heading then
|
|
212
|
-
* yields one slice spanning up to the next heading (any depth) or EOF.
|
|
213
|
-
*
|
|
214
|
-
* Frontmatter is never part of any slice — slices start at the body offset.
|
|
215
|
-
*/
|
|
216
|
-
declare function getBlockSlices(fullSource: string): BlockSlice[];
|
|
217
|
-
/** Replace the text in `range` with `newText`, returning the new full source. */
|
|
218
|
-
declare function spliceBlock(fullSource: string, range: BlockRange, newText: string): string;
|
|
219
|
-
/** Character offset of the start of 1-based `line` (clamps past EOF). */
|
|
220
|
-
declare function lineToOffset(source: string, line: number): number;
|
|
221
|
-
/** 1-based line number containing `offset`. */
|
|
222
|
-
declare function offsetToLine(source: string, offset: number): number;
|
|
223
|
-
/** Index of the slice whose range contains `offset`, or -1. */
|
|
224
|
-
declare function sliceIndexAtOffset(slices: BlockSlice[], offset: number): number;
|
|
225
|
-
|
|
226
178
|
/**
|
|
227
179
|
* useTimelineClock
|
|
228
180
|
*
|
|
@@ -3380,4 +3332,4 @@ declare function unshownSlidesWarning(total: number, unshown: number): string |
|
|
|
3380
3332
|
/** The exact label of the review-state block-timings checkbox. */
|
|
3381
3333
|
declare const SLIDE_TIMING_CHECKBOX_LABEL = "Update block timings when I save this narration";
|
|
3382
3334
|
|
|
3383
|
-
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,
|
|
3335
|
+
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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,6 @@ import {
|
|
|
32
32
|
DropZoneOverlay,
|
|
33
33
|
EMPTY_TRANSITION,
|
|
34
34
|
EditorContextMenuProvider,
|
|
35
|
-
EditorProvider,
|
|
36
35
|
EditorShell,
|
|
37
36
|
EmojiPicker,
|
|
38
37
|
FENCE_WIDGET_CONTAINED_EVENTS,
|
|
@@ -111,7 +110,6 @@ import {
|
|
|
111
110
|
createXlsxFormulaSession,
|
|
112
111
|
dataExtensionOf,
|
|
113
112
|
dataLinkHrefOf,
|
|
114
|
-
detectLanguageFromFileName,
|
|
115
113
|
draftPatchFromImportedTheme,
|
|
116
114
|
findAsciiDiagramBlockPos,
|
|
117
115
|
findCodeSnippetBlockPos,
|
|
@@ -124,7 +122,6 @@ import {
|
|
|
124
122
|
findTransitionEntry,
|
|
125
123
|
findTreeBlockPos,
|
|
126
124
|
formatSeconds,
|
|
127
|
-
getBlockSlices,
|
|
128
125
|
getTimelineForNode,
|
|
129
126
|
indentItemOp,
|
|
130
127
|
ingestForWrite,
|
|
@@ -138,7 +135,6 @@ import {
|
|
|
138
135
|
isMermaidSourceVisible,
|
|
139
136
|
isRepairableFence,
|
|
140
137
|
isTimelineSourceSafeForSemanticEdit,
|
|
141
|
-
lineToOffset,
|
|
142
138
|
loadDataPreview,
|
|
143
139
|
mapFenceEntries,
|
|
144
140
|
mermaidDiagramMarkdown,
|
|
@@ -153,7 +149,6 @@ import {
|
|
|
153
149
|
moveNodeOp,
|
|
154
150
|
nextTimelineEventId,
|
|
155
151
|
normalizeMermaidFlowchartShape,
|
|
156
|
-
offsetToLine,
|
|
157
152
|
outdentItemOp,
|
|
158
153
|
parseTimelineForNode,
|
|
159
154
|
partitionFiles,
|
|
@@ -181,7 +176,6 @@ import {
|
|
|
181
176
|
replaceCodeSnippetText,
|
|
182
177
|
replaceHostFenceText,
|
|
183
178
|
resizeNodeOp,
|
|
184
|
-
resolveFileKind,
|
|
185
179
|
resolveMermaidSurfaceTheme,
|
|
186
180
|
sanitizeAsciiLabel,
|
|
187
181
|
sanitizeTimelineText,
|
|
@@ -199,8 +193,6 @@ import {
|
|
|
199
193
|
shouldPasteAsAsciiFence,
|
|
200
194
|
shouldPasteAsTimelineFence,
|
|
201
195
|
shouldPasteAsTreeFence,
|
|
202
|
-
sliceIndexAtOffset,
|
|
203
|
-
spliceBlock,
|
|
204
196
|
summarizeBlockProps,
|
|
205
197
|
templateLabel,
|
|
206
198
|
themeToDraft,
|
|
@@ -211,13 +203,11 @@ import {
|
|
|
211
203
|
translateDiagramOp,
|
|
212
204
|
updateTimelineEventOp,
|
|
213
205
|
useAsciiDiagramData,
|
|
214
|
-
useBlockNavigator,
|
|
215
206
|
useCodeSnippetData,
|
|
216
207
|
useCustomTemplates,
|
|
217
208
|
useCustomThemes,
|
|
218
209
|
useDocCustomTemplates,
|
|
219
210
|
useDocCustomThemes,
|
|
220
|
-
useEditorContext,
|
|
221
211
|
useEditorContextMenuItems,
|
|
222
212
|
useEscapeDismissal,
|
|
223
213
|
useFileDrop,
|
|
@@ -229,15 +219,27 @@ import {
|
|
|
229
219
|
useTreeViewData,
|
|
230
220
|
viewStateFromBinding,
|
|
231
221
|
writeHeadingViewState
|
|
232
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-WMNH5ROU.js";
|
|
223
|
+
import {
|
|
224
|
+
EditorProvider,
|
|
225
|
+
detectLanguageFromFileName,
|
|
226
|
+
getBlockSlices,
|
|
227
|
+
lineToOffset,
|
|
228
|
+
offsetToLine,
|
|
229
|
+
resolveFileKind,
|
|
230
|
+
sliceIndexAtOffset,
|
|
231
|
+
spliceBlock,
|
|
232
|
+
useBlockNavigator,
|
|
233
|
+
useEditorContext
|
|
234
|
+
} from "./chunk-DUO5XZQK.js";
|
|
233
235
|
import "./chunk-V4NBQF5C.js";
|
|
234
236
|
import {
|
|
235
237
|
JsonEditor
|
|
236
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-UYKOTWJM.js";
|
|
237
239
|
import {
|
|
238
240
|
markdownToTiptap,
|
|
239
241
|
tiptapToMarkdown
|
|
240
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-ES6CPRCW.js";
|
|
241
243
|
import {
|
|
242
244
|
ImageEditor,
|
|
243
245
|
ImageViewer,
|
|
@@ -247,7 +249,7 @@ import {
|
|
|
247
249
|
} from "./chunk-V44VP242.js";
|
|
248
250
|
import {
|
|
249
251
|
RecorderButton
|
|
250
|
-
} from "./chunk-
|
|
252
|
+
} from "./chunk-DN6XFOY2.js";
|
|
251
253
|
import {
|
|
252
254
|
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
253
255
|
RecorderDeviceQuickPicks,
|
|
@@ -278,11 +280,11 @@ import {
|
|
|
278
280
|
unshownSlidesWarning,
|
|
279
281
|
useMediaDevices,
|
|
280
282
|
useMediaRecorder
|
|
281
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-BJ3TXAIQ.js";
|
|
282
284
|
import "./chunk-GS7QWYFT.js";
|
|
283
285
|
import {
|
|
284
286
|
TeleprompterView
|
|
285
|
-
} from "./chunk-
|
|
287
|
+
} from "./chunk-ENDRPV6T.js";
|
|
286
288
|
import {
|
|
287
289
|
DEFAULT_TELEPROMPTER_PREFS,
|
|
288
290
|
EYE_LINE_FRACTION,
|
|
@@ -322,7 +324,7 @@ import {
|
|
|
322
324
|
useStreamPreview,
|
|
323
325
|
useTeleprompter,
|
|
324
326
|
vadConfigForSensitivity
|
|
325
|
-
} from "./chunk-
|
|
327
|
+
} from "./chunk-34FRFDQ6.js";
|
|
326
328
|
|
|
327
329
|
// src/FolderView.tsx
|
|
328
330
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/proofing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HarperProofingConfig,
|
|
2
|
-
export {
|
|
1
|
+
import { H as HarperProofingConfig, P as ProofingProvider } from '../types-De4z-gGb.js';
|
|
2
|
+
export { a as ProofingCapability, b as ProofingDocumentRef, c as ProofingIgnoreStore, d as ProofingLanguage, e as ProofingLintOptions, f as ProofingProviderFactory } from '../types-De4z-gGb.js';
|
|
3
3
|
export { PROOF_DIALECTS, PROOF_FRONTMATTER_KEYS, ProofCategory, ProofDialect, ProofFinding, ProofRange, ProofSuggestion, ProofSuggestionKind } from '@bendyline/squisq/proof';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/recorder/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, y as ScreenStreamOptions, 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-
|
|
2
|
-
export { a as CaptureKind, i as RecorderAudioBitrateMode, j as RecorderCameraLane, k as RecorderExtendedMediaOptions, l as RecorderSource, R 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-
|
|
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, y as ScreenStreamOptions, 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-B6MtQH5u.js';
|
|
2
|
+
export { a as CaptureKind, i as RecorderAudioBitrateMode, j as RecorderCameraLane, k as RecorderExtendedMediaOptions, l as RecorderSource, R 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-D3Sgcf0L.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import '@bendyline/squisq/schemas';
|
|
5
5
|
import '@bendyline/squisq/storage';
|
package/dist/recorder/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RecorderButton
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-DN6XFOY2.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
6
6
|
RecorderDeviceQuickPicks,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
requestScreenStream,
|
|
21
21
|
useMediaDevices,
|
|
22
22
|
useMediaRecorder
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-BJ3TXAIQ.js";
|
|
24
24
|
import "../chunk-GS7QWYFT.js";
|
|
25
25
|
import {
|
|
26
26
|
buildFilename,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
supportsUserMedia,
|
|
35
35
|
timingPathFor,
|
|
36
36
|
useStreamPreview
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-34FRFDQ6.js";
|
|
38
38
|
export {
|
|
39
39
|
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
40
40
|
RecorderButton,
|
|
@@ -1,7 +1,7 @@
|
|
|
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 } from './useNarrationStage-
|
|
4
|
+
import { l as RecorderSource, o as TeleprompterRecordingDeps } from './useNarrationStage-D3Sgcf0L.js';
|
|
5
5
|
import { CSSProperties, RefObject } from 'react';
|
|
6
6
|
|
|
7
7
|
type RecordedMediaKind = 'audio' | 'video';
|
|
@@ -61,6 +61,8 @@ interface RecorderSlidesOptions {
|
|
|
61
61
|
captureTimings?: boolean;
|
|
62
62
|
}
|
|
63
63
|
interface RecorderModalProps {
|
|
64
|
+
/** Combined recording byte threshold. Defaults to 90 MiB; final chunks are retained. */
|
|
65
|
+
maxRecordingBytes?: number;
|
|
64
66
|
/** Required — recordings are written here. */
|
|
65
67
|
mediaProvider: MediaProvider;
|
|
66
68
|
/**
|
|
@@ -155,7 +157,7 @@ interface SlideTimingSaveResult {
|
|
|
155
157
|
/** Take length the block ranges were normalized against. */
|
|
156
158
|
durationSec: number;
|
|
157
159
|
}
|
|
158
|
-
declare function RecorderModal({ mediaProvider, container, initialMode, colorScheme, onClose, onSave, narration, slides, title, }: RecorderModalProps): react_jsx_runtime.JSX.Element;
|
|
160
|
+
declare function RecorderModal({ mediaProvider, container, initialMode, colorScheme, onClose, onSave, narration, slides, title, maxRecordingBytes, }: RecorderModalProps): react_jsx_runtime.JSX.Element;
|
|
159
161
|
|
|
160
162
|
interface RecorderButtonProps {
|
|
161
163
|
/** Where to write the resulting recording. Required. */
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { R as ReviewProvider, a as ReviewCapability, b as ReviewHue } from '../types-C0puuw-M.js';
|
|
2
|
+
export { D as DEFAULT_REVIEW_DEBOUNCE_MS, c as DEFAULT_REVIEW_HUE, d as ReviewProviderFactory, r as resolveReviewProvider } from '../types-C0puuw-M.js';
|
|
3
|
+
import { ReactNode, ReactElement } from 'react';
|
|
4
|
+
import { ReviewFinding, ReviewRequest, ReviewDocumentRef, ReviewBlockInput } from '@bendyline/squisq/review';
|
|
5
|
+
export { PROOFING_REVIEW_SOURCE, ReviewBlockInput, ReviewDocumentRef, ReviewEvent, ReviewFinding, ReviewRequest, ReviewSeverity, ReviewSuggestion, ReviewSuggestionKind, proofFindingToReviewFinding } from '@bendyline/squisq/review';
|
|
6
|
+
import { Extension, Editor } from '@tiptap/core';
|
|
7
|
+
import { EditorState } from '@tiptap/pm/state';
|
|
8
|
+
import { Node } from '@tiptap/pm/model';
|
|
9
|
+
import { editor } from 'monaco-editor';
|
|
10
|
+
import { P as ProofingProvider } from '../types-De4z-gGb.js';
|
|
11
|
+
import '@bendyline/squisq/proof';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Multi-provider review orchestration, without React.
|
|
15
|
+
*
|
|
16
|
+
* Framework-free on purpose: the interesting behaviour here is scheduling —
|
|
17
|
+
* when a pass starts, what cancels it, and which results are still worth
|
|
18
|
+
* showing — and all of it is far easier to pin down against a fake clock than
|
|
19
|
+
* through a rendered component.
|
|
20
|
+
*
|
|
21
|
+
* The scheduling contract mirrors proofing's, with one difference that is the
|
|
22
|
+
* whole point of review: **each provider is scheduled independently**. A
|
|
23
|
+
* spellchecker re-running 450 ms after a keystroke and a model that takes
|
|
24
|
+
* seconds cannot share a cadence, and a single shared timer would have to be
|
|
25
|
+
* wrong for one of them.
|
|
26
|
+
*
|
|
27
|
+
* Per provider: one debounced single-flight pass at a time, a dirty flag
|
|
28
|
+
* coalescing anything arriving mid-pass into exactly one trailing pass, and
|
|
29
|
+
* results discarded when the document moved under them.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
type ReviewProviderPhase = 'idle' | 'preparing' | 'running' | 'ready' | 'error';
|
|
33
|
+
interface ReviewProviderStatus {
|
|
34
|
+
id: string;
|
|
35
|
+
label: string;
|
|
36
|
+
phase: ReviewProviderPhase;
|
|
37
|
+
/** Findings from this provider's most recent completed pass. */
|
|
38
|
+
findings: readonly ReviewFinding[];
|
|
39
|
+
/** Set when the provider's last pass failed. */
|
|
40
|
+
error: string | null;
|
|
41
|
+
}
|
|
42
|
+
interface ReviewSnapshot {
|
|
43
|
+
/** Every provider's findings, in provider order then document order. */
|
|
44
|
+
findings: readonly ReviewFinding[];
|
|
45
|
+
providers: readonly ReviewProviderStatus[];
|
|
46
|
+
/** True while any provider has a pass in flight. */
|
|
47
|
+
running: boolean;
|
|
48
|
+
}
|
|
49
|
+
/** What the runner needs to build a request. Called fresh for every pass. */
|
|
50
|
+
type ReviewRequestSource = () => ReviewRequest | null;
|
|
51
|
+
interface ReviewRunnerOptions {
|
|
52
|
+
providers: readonly ReviewProvider[];
|
|
53
|
+
/** Builds the request for a pass, and reports the document revision. */
|
|
54
|
+
buildRequest: ReviewRequestSource;
|
|
55
|
+
/**
|
|
56
|
+
* Monotonic document revision. A pass whose revision no longer matches at
|
|
57
|
+
* completion is discarded: its findings are about text that has since
|
|
58
|
+
* changed, and drawing them would put a mark on an unrelated word.
|
|
59
|
+
*/
|
|
60
|
+
revision: () => number;
|
|
61
|
+
onChange: (snapshot: ReviewSnapshot) => void;
|
|
62
|
+
setTimer?: (fn: () => void, ms: number) => unknown;
|
|
63
|
+
clearTimer?: (handle: unknown) => void;
|
|
64
|
+
}
|
|
65
|
+
declare class ReviewRunner {
|
|
66
|
+
private readonly runtimes;
|
|
67
|
+
private readonly options;
|
|
68
|
+
private readonly setTimer;
|
|
69
|
+
private readonly clearTimer;
|
|
70
|
+
private disposed;
|
|
71
|
+
constructor(options: ReviewRunnerOptions);
|
|
72
|
+
/** The document changed. Reschedule every provider. */
|
|
73
|
+
schedule(): void;
|
|
74
|
+
/** Run now, skipping the debounce — the user asked for a review. */
|
|
75
|
+
runNow(): void;
|
|
76
|
+
snapshot(): ReviewSnapshot;
|
|
77
|
+
/** Drop a finding from the visible set without re-running anything. */
|
|
78
|
+
removeFinding(findingId: string): void;
|
|
79
|
+
dispose(): void;
|
|
80
|
+
private scheduleOne;
|
|
81
|
+
private runPass;
|
|
82
|
+
private setPhase;
|
|
83
|
+
private fail;
|
|
84
|
+
private emit;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Review orchestration — the one place that coordinates the providers, the two
|
|
89
|
+
* editor surfaces, and the document.
|
|
90
|
+
*
|
|
91
|
+
* The scheduling itself lives in {@link ReviewRunner}, deliberately outside
|
|
92
|
+
* React so it can be tested against a fake clock. This hook owns only what is
|
|
93
|
+
* genuinely React's: turning the current document into a request, pushing the
|
|
94
|
+
* resulting findings at whichever surface is mounted, and tearing both down.
|
|
95
|
+
*
|
|
96
|
+
* Findings index the markdown SOURCE. That is exactly what Monaco shows, so
|
|
97
|
+
* the Source view draws them directly; the Write view has no published mapping
|
|
98
|
+
* from a source offset back to a ProseMirror position and anchors on the
|
|
99
|
+
* finding's own text instead — see `decorations.ts`.
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
interface ReviewState extends ReviewSnapshot {
|
|
103
|
+
/** Run every provider now, skipping the debounce. */
|
|
104
|
+
reviewNow: () => void;
|
|
105
|
+
/** Remove a finding from view without re-running anything. */
|
|
106
|
+
dismissFinding: (findingId: string) => void;
|
|
107
|
+
/** Move the caret to a finding, switching views when it can only be shown there. */
|
|
108
|
+
goToFinding: (findingId: string) => void;
|
|
109
|
+
}
|
|
110
|
+
declare function useReview(capabilities?: readonly ReviewCapability[]): ReviewState | null;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Review state distribution.
|
|
114
|
+
*
|
|
115
|
+
* `ReviewRoot` sits INSIDE `EditorProvider` and wraps the shell body, the same
|
|
116
|
+
* shape as `ProofingRoot`: children pass through with stable identity, so a
|
|
117
|
+
* review pass re-renders only review consumers and never the editors
|
|
118
|
+
* themselves. A pass can take seconds, and re-rendering an editor on each one
|
|
119
|
+
* would be felt.
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/** Review state, or `null` when the host injected no providers. */
|
|
123
|
+
declare function useReviewState(): ReviewState | null;
|
|
124
|
+
declare function ReviewRoot({ providers, children, }: {
|
|
125
|
+
providers?: readonly ReviewCapability[];
|
|
126
|
+
children: ReactNode;
|
|
127
|
+
}): ReactElement;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Docked review pane — a right-side flex sibling of the editor, listing every
|
|
131
|
+
* provider's findings grouped by provider.
|
|
132
|
+
*
|
|
133
|
+
* Grouped rather than merged into one document-ordered list, because the
|
|
134
|
+
* providers are answering different questions. A spelling mistake and "this
|
|
135
|
+
* section buries its point" interleaved by position reads as noise; under their
|
|
136
|
+
* own headings each list is scannable.
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
declare function ReviewPanel(): ReactElement | null;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Turn a markdown source into the blocks a review provider receives.
|
|
143
|
+
*
|
|
144
|
+
* A block here is what the editor's own navigation calls one: a
|
|
145
|
+
* heading-delimited section, not a paragraph. That is the better review unit
|
|
146
|
+
* anyway — "does this section make its case?" is a question worth asking, and
|
|
147
|
+
* a provider that wants finer grain can split the text it was given.
|
|
148
|
+
*
|
|
149
|
+
* Two things happen that a provider should not have to redo. Machine
|
|
150
|
+
* vocabulary is masked — `{[…]}` annotations and code, which a reviewer would
|
|
151
|
+
* otherwise "fix" — using the same equal-length blanking proofing uses, so
|
|
152
|
+
* every offset still indexes the real source. And each block carries its
|
|
153
|
+
* heading, because the same paragraph reads differently under a different one.
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
interface BuildReviewRequestOptions {
|
|
157
|
+
source: string;
|
|
158
|
+
documentRef: ReviewDocumentRef;
|
|
159
|
+
/** Blocks whose text differs from the previous pass, when known. */
|
|
160
|
+
changedBlockKeys?: readonly number[];
|
|
161
|
+
language?: 'plaintext' | 'markdown';
|
|
162
|
+
}
|
|
163
|
+
declare function buildReviewRequest(options: BuildReviewRequestOptions): ReviewRequest;
|
|
164
|
+
/** Which blocks changed between two passes, by text identity. */
|
|
165
|
+
declare function changedBlockKeys(previous: readonly ReviewBlockInput[], next: readonly ReviewBlockInput[]): number[];
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Where a review finding is drawn, in each surface.
|
|
169
|
+
*
|
|
170
|
+
* The two surfaces differ in a way that matters. A review finding's offsets
|
|
171
|
+
* index the markdown **source**, which is exactly what Monaco shows — so the
|
|
172
|
+
* Source view is a direct mapping. The Write view renders a ProseMirror
|
|
173
|
+
* document whose text differs from the source (frontmatter is stripped, prose
|
|
174
|
+
* may be rewrapped, markup is marks rather than characters), and there is no
|
|
175
|
+
* published mapping from a source offset back to a ProseMirror position.
|
|
176
|
+
*
|
|
177
|
+
* So the Write view anchors on the finding's own text instead, and only when
|
|
178
|
+
* that text appears exactly once. Anchoring on an ambiguous match would put a
|
|
179
|
+
* mark on a different paragraph than the one reviewed, which is worse than
|
|
180
|
+
* drawing nothing: the panel still lists the finding, and the host can offer
|
|
181
|
+
* Source view to act on it.
|
|
182
|
+
*/
|
|
183
|
+
|
|
184
|
+
/** One squiggle to draw in the Write view, in absolute ProseMirror positions. */
|
|
185
|
+
interface ReviewDecorationSpec {
|
|
186
|
+
findingId: string;
|
|
187
|
+
source: string;
|
|
188
|
+
hue: ReviewHue;
|
|
189
|
+
from: number;
|
|
190
|
+
to: number;
|
|
191
|
+
}
|
|
192
|
+
/** The class pair every review mark carries. */
|
|
193
|
+
declare function reviewUnderlineClass(hue: ReviewHue): string;
|
|
194
|
+
/**
|
|
195
|
+
* Locate a finding in a ProseMirror document by its own text.
|
|
196
|
+
*
|
|
197
|
+
* Returns null when the text is absent or appears more than once. Ambiguity is
|
|
198
|
+
* treated as absence deliberately — see the module note.
|
|
199
|
+
*/
|
|
200
|
+
declare function findUniqueTextRange(doc: Node, text: string): {
|
|
201
|
+
from: number;
|
|
202
|
+
to: number;
|
|
203
|
+
} | null;
|
|
204
|
+
/** Write-view decorations for the findings whose text can be located exactly. */
|
|
205
|
+
declare function buildWriteViewDecorations(doc: Node, findings: readonly ReviewFinding[], hueFor: (source: string) => ReviewHue): ReviewDecorationSpec[];
|
|
206
|
+
/**
|
|
207
|
+
* Source-view decorations. Offsets map straight through, because the finding
|
|
208
|
+
* and the model index the same string.
|
|
209
|
+
*/
|
|
210
|
+
declare function buildSourceViewDecorations(model: editor.ITextModel, findings: readonly ReviewFinding[], hueFor: (source: string) => ReviewHue): editor.IModelDeltaDecoration[];
|
|
211
|
+
/** The hover card body for one finding. */
|
|
212
|
+
declare function reviewHoverMarkdown(finding: ReviewFinding): string;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Review marks for the Write view.
|
|
216
|
+
*
|
|
217
|
+
* A sibling of `proofing/ProofingExtension.ts`, and it inherits that file's
|
|
218
|
+
* load-bearing decision: on an ordinary document change the current
|
|
219
|
+
* `DecorationSet` is MAPPED through the transaction rather than rebuilt. A
|
|
220
|
+
* review pass can take seconds, so without mapping every mark would sit on
|
|
221
|
+
* stale text for the whole of it. Every consumer resolves positions from the
|
|
222
|
+
* live decorations, never from the offsets a pass reported.
|
|
223
|
+
*
|
|
224
|
+
* It registers its own plugin key, so review marks and proofing squiggles
|
|
225
|
+
* coexist rather than one replacing the other.
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
/** Write-view review marks. Registered unconditionally; inert until fed. */
|
|
229
|
+
declare const ReviewExtension: Extension<any, any>;
|
|
230
|
+
/** Replace the Write view's review marks with a fresh pass's results. */
|
|
231
|
+
declare function updateReviewDecorations(editor: Editor, specs: readonly ReviewDecorationSpec[]): void;
|
|
232
|
+
/** Clear every review mark. */
|
|
233
|
+
declare function clearReviewDecorations(editor: Editor): void;
|
|
234
|
+
interface ResolvedReviewDecoration {
|
|
235
|
+
findingId: string;
|
|
236
|
+
source: string;
|
|
237
|
+
hue: ReviewHue;
|
|
238
|
+
from: number;
|
|
239
|
+
to: number;
|
|
240
|
+
}
|
|
241
|
+
/** The review mark at a position, at its current mapped range. */
|
|
242
|
+
declare function reviewDecorationAt(state: EditorState, pos: number): ResolvedReviewDecoration | null;
|
|
243
|
+
/**
|
|
244
|
+
* The review mark for a finding id, at its current mapped range.
|
|
245
|
+
*
|
|
246
|
+
* This is what makes applying a suggestion safe after the user has typed: the
|
|
247
|
+
* range comes from the live decoration, so the edit lands where the text moved
|
|
248
|
+
* to rather than where it was when the pass ran.
|
|
249
|
+
*/
|
|
250
|
+
declare function reviewDecorationById(state: EditorState, findingId: string): ResolvedReviewDecoration | null;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Run a proofing engine as a review provider.
|
|
254
|
+
*
|
|
255
|
+
* This is what keeps there from being two pipelines. Proofing predates review
|
|
256
|
+
* and has the narrower contract — one flat string in, a whole array out, no
|
|
257
|
+
* cancellation — so the adapter owns the difference: it joins the blocks the
|
|
258
|
+
* way proofing's own orchestration does, lints once, and maps each finding back
|
|
259
|
+
* to the block it came from.
|
|
260
|
+
*
|
|
261
|
+
* Linting the joined text rather than block by block is deliberate. A grammar
|
|
262
|
+
* engine reads across a paragraph boundary, and a per-block call would lose
|
|
263
|
+
* every finding that spans one.
|
|
264
|
+
*/
|
|
265
|
+
|
|
266
|
+
interface ProofingReviewAdapterOptions {
|
|
267
|
+
/** Namespace for the findings. Defaults to `harper`. */
|
|
268
|
+
id?: string;
|
|
269
|
+
label?: string;
|
|
270
|
+
hue?: ReviewHue;
|
|
271
|
+
/** Proofing is cheap enough to re-run shortly after a keystroke. */
|
|
272
|
+
debounceMs?: number;
|
|
273
|
+
}
|
|
274
|
+
/** The idle delay proofing has always used. */
|
|
275
|
+
declare const PROOFING_DEBOUNCE_MS = 450;
|
|
276
|
+
/**
|
|
277
|
+
* Adapt a {@link ProofingProvider} to the review contract.
|
|
278
|
+
*
|
|
279
|
+
* The adapter does not own the provider's lifetime: a host that passed an
|
|
280
|
+
* instance keeps its warm engine across shell remounts, exactly as before.
|
|
281
|
+
* Only a provider the adapter constructed is disposed by it.
|
|
282
|
+
*/
|
|
283
|
+
declare function createProofingReviewProvider(provider: ProofingProvider, options?: ProofingReviewAdapterOptions): ReviewProvider;
|
|
284
|
+
|
|
285
|
+
export { PROOFING_DEBOUNCE_MS, type ProofingReviewAdapterOptions, type ResolvedReviewDecoration, ReviewCapability, type ReviewDecorationSpec, ReviewExtension, ReviewHue, ReviewPanel, ReviewProvider, type ReviewProviderStatus, ReviewRoot, ReviewRunner, type ReviewSnapshot, type ReviewState, buildReviewRequest, buildSourceViewDecorations, buildWriteViewDecorations, changedBlockKeys, clearReviewDecorations, createProofingReviewProvider, findUniqueTextRange, reviewDecorationAt, reviewDecorationById, reviewHoverMarkdown, reviewUnderlineClass, updateReviewDecorations, useReview, useReviewState };
|