@bendyline/squisq-editor-react 2.11.21 → 2.11.23
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/NOTICE.md +2 -2
- package/README.md +5 -3
- package/THIRD_PARTY_LICENSES.txt +2 -2
- package/dist/{chunk-5NXCXT55.js → chunk-JGIETDY5.js} +468 -146
- package/dist/{chunk-UCYZBMCG.js → chunk-TRBNNRLK.js} +3 -0
- package/dist/image-editor/index.d.ts +3 -3
- package/dist/index.d.ts +50 -47
- package/dist/index.js +2 -2
- package/dist/json-editor/index.d.ts +2 -2
- package/dist/recorder/index.d.ts +2 -3
- package/dist/{recorder-Civyq5SU.d.ts → recorder-rQGYsS6B.d.ts} +7 -7
- package/dist/review/index.js +1 -1
- package/dist/shell/index.d.ts +2 -3
- package/dist/shell/index.js +2 -2
- package/dist/{shell-XyXxGPs4.d.ts → shell-BVxeKlCx.d.ts} +44 -8
- package/dist/styles/fa-brands-400-LA6RBN2H.woff2 +0 -0
- package/dist/styles/fa-regular-400-NCGHE5NP.woff2 +0 -0
- package/dist/styles/fa-solid-900-EFITDVWS.woff2 +0 -0
- package/dist/styles/fa-v4compatibility-4GXT74DT.woff2 +0 -0
- package/dist/styles/index.css +654 -55
- package/dist/teleprompter/index.d.ts +6 -6
- package/package.json +11 -11
- package/dist/styles/fa-brands-400-AHOAZHCU.woff2 +0 -0
- package/dist/styles/fa-regular-400-VRZYIBIZ.woff2 +0 -0
- package/dist/styles/fa-solid-900-MDEYK55F.woff2 +0 -0
- package/dist/styles/fa-v4compatibility-ETEVP6IB.woff2 +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, RefObject, ReactElement } from 'react';
|
|
2
3
|
import { TableCellValue, TableCellEdit } from '@bendyline/squisq/table';
|
|
3
4
|
import { CalcEngineConfig, CalcEngine } from '@bendyline/squisq-calc';
|
|
4
5
|
import { IngestTable } from '@bendyline/squisq-grid-react';
|
|
5
6
|
import { XlsxWorkbookGrids } from '@bendyline/squisq-formats/xlsx';
|
|
6
|
-
import { ReactNode, RefObject, ReactElement } from 'react';
|
|
7
7
|
import { Doc, MediaProvider, ViewportPreset, Theme } from '@bendyline/squisq/schemas';
|
|
8
8
|
import { FenceRendererMap } from '@bendyline/squisq/fence';
|
|
9
9
|
import { CodeBlockCopyHandler } from '@bendyline/squisq-react';
|
|
@@ -304,6 +304,25 @@ declare function blockInsertionPoint(source: string, cursorOffset: number, place
|
|
|
304
304
|
*/
|
|
305
305
|
declare function joinBlockAt(source: string, offset: number, block: string): MarkdownSourceEdit;
|
|
306
306
|
|
|
307
|
+
interface FindOptions {
|
|
308
|
+
/** Match letter case exactly. Default: case-insensitive (Unicode case folding). */
|
|
309
|
+
readonly matchCase?: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* Only match where the query is not part of a longer word. Applies at each
|
|
312
|
+
* end of the query that is itself a word character, so `c++` still matches.
|
|
313
|
+
*/
|
|
314
|
+
readonly wholeWord?: boolean;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* A host request to show particular results, e.g. after opening a workspace
|
|
318
|
+
* search hit: the query, its options, and which match to select.
|
|
319
|
+
*/
|
|
320
|
+
interface FindRequest extends FindOptions {
|
|
321
|
+
readonly query: string;
|
|
322
|
+
/** 0-based index, in document order, of the match to select. */
|
|
323
|
+
readonly occurrence?: number;
|
|
324
|
+
}
|
|
325
|
+
|
|
307
326
|
/**
|
|
308
327
|
* Configuration a Scene host (diagram / drawing / layout widget) supplies
|
|
309
328
|
* so the shared inline text editor knows how to read and write the text of
|
|
@@ -468,6 +487,8 @@ interface EditorState {
|
|
|
468
487
|
editorMode: EditorMode;
|
|
469
488
|
/** Whether the host-triggered Find toolbar is active. */
|
|
470
489
|
findMode: boolean;
|
|
490
|
+
/** Host request for a particular query and match (see `EditorShellProps.findRequest`). */
|
|
491
|
+
findRequest: FindRequest | null;
|
|
471
492
|
/** Monaco language ID for the Raw editor. */
|
|
472
493
|
language: string;
|
|
473
494
|
/**
|
|
@@ -980,6 +1001,8 @@ interface EditorProviderProps {
|
|
|
980
1001
|
findMode?: boolean;
|
|
981
1002
|
/** Notified when Find mode requests a state change (for example, its X button). */
|
|
982
1003
|
onFindModeChange?: (active: boolean) => void;
|
|
1004
|
+
/** Query, options, and match to show when Find mode opens or the request changes. */
|
|
1005
|
+
findRequest?: FindRequest | null;
|
|
983
1006
|
/**
|
|
984
1007
|
* Initial visibility of the inline preview gutter. Defaults to false.
|
|
985
1008
|
* The toolbar's View menu can toggle it at runtime.
|
|
@@ -1059,7 +1082,7 @@ interface ViewPreferences {
|
|
|
1059
1082
|
/** Document vs. block-at-a-time layout. */
|
|
1060
1083
|
layoutMode?: LayoutMode;
|
|
1061
1084
|
}
|
|
1062
|
-
declare function EditorProvider({ initialMarkdown, initialView, articleId, colorScheme: initialColorScheme, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, mediaProvider, mediaEditRenders, imageDisplayMode, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, fenceRenderers, onCopyCode, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode: controlledFindMode, onFindModeChange, inlinePreview, showStatusBar, outline, blockTags, blockTagVisibility: initialBlockTagVisibility, themeInheritance, layoutMode, viewPreferences, onViewPreferencesChange, children, }: EditorProviderProps):
|
|
1085
|
+
declare function EditorProvider({ initialMarkdown, initialView, articleId, colorScheme: initialColorScheme, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, mediaProvider, mediaEditRenders, imageDisplayMode, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, fenceRenderers, onCopyCode, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode: controlledFindMode, onFindModeChange, findRequest, inlinePreview, showStatusBar, outline, blockTags, blockTagVisibility: initialBlockTagVisibility, themeInheritance, layoutMode, viewPreferences, onViewPreferencesChange, children, }: EditorProviderProps): react.JSX.Element;
|
|
1063
1086
|
|
|
1064
1087
|
/**
|
|
1065
1088
|
* Host-supplied context sections rendered INSIDE the Monaco (raw/code)
|
|
@@ -1468,6 +1491,19 @@ interface EditorShellProps {
|
|
|
1468
1491
|
findMode?: boolean;
|
|
1469
1492
|
/** Called when Find mode requests a state change, including its X button. */
|
|
1470
1493
|
onFindModeChange?: (active: boolean) => void;
|
|
1494
|
+
/**
|
|
1495
|
+
* Show particular results in Find mode: the query, its Match case / Whole
|
|
1496
|
+
* word options, and which match (`occurrence`, 0-based in document order)
|
|
1497
|
+
* to select. Applied when Find opens and whenever a new request object is
|
|
1498
|
+
* passed, so a host can open a document straight at a search hit.
|
|
1499
|
+
*/
|
|
1500
|
+
findRequest?: FindRequest | null;
|
|
1501
|
+
/**
|
|
1502
|
+
* Bind Ctrl/Cmd+F (find) and Ctrl+H / Cmd+Option+F (replace) while focus is
|
|
1503
|
+
* inside this editor. Off by default so hosts with their own shortcut keep
|
|
1504
|
+
* control; when on, the shortcuts replace Monaco's built-in find widget.
|
|
1505
|
+
*/
|
|
1506
|
+
findShortcut?: boolean;
|
|
1471
1507
|
/**
|
|
1472
1508
|
* Optional async provider for `@`-mention suggestions. When supplied,
|
|
1473
1509
|
* typing `@` inside the editor opens a popover of candidates; selecting
|
|
@@ -1721,7 +1757,7 @@ interface EditorShellProps {
|
|
|
1721
1757
|
* Complete markdown editor shell with toolbar, view switcher, and three
|
|
1722
1758
|
* editing modes: Raw (Monaco), WYSIWYG (Tiptap), and Preview.
|
|
1723
1759
|
*/
|
|
1724
|
-
declare function EditorShell({ initialMarkdown, initialView, hostMode, defaultViewportPreset, articleId, basePath, onChange, onLinkClick, showCodeCopyButton, onCopyCode, colorScheme, className, height, minHeight, maxHeight, mediaProvider, mediaEditRenders, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, showFilesToggle, showFilesWhenNotEmpty, showFormattingControls, showInsertControls, allowBinaryDownloads, toolbarSlotLeft, toolbarSlotAfterActions, toolbarSlotRight, summarizationDesigner, statusBarSlotRight, sidePanelSlot, reviewProviders, showPlayTab, allowPresentationWindow, allowPresentationFullscreen, allowPrint, submitOnEnter, calcEngineFactory, codeContext, fullWidth, uxFont, thinMargins, writeCanvasSettings, showStatusBar, imageDisplayMode, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode, onFindModeChange, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, fenceRenderers, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, placeholder, readOnly, imageSrc, imageAlt, imageMode, imageEditorContainer, onImageExport, inlinePreview, inlinePreviewWidth, outline, outlineWidth, blockTags, blockTagVisibility, themeInheritance, viewPreferences, onViewPreferencesChange, themeOverride, defaultThemeId, defaultThemeLabel, }: EditorShellProps):
|
|
1760
|
+
declare function EditorShell({ initialMarkdown, initialView, hostMode, defaultViewportPreset, articleId, basePath, onChange, onLinkClick, showCodeCopyButton, onCopyCode, colorScheme, className, height, minHeight, maxHeight, mediaProvider, mediaEditRenders, workspaceContainer, allowVersioning, versionBasename, versioningPrunePolicy, versioningAutoSaveIdleMs, onSaveVersion, showFilesToggle, showFilesWhenNotEmpty, showFormattingControls, showInsertControls, allowBinaryDownloads, toolbarSlotLeft, toolbarSlotAfterActions, toolbarSlotRight, summarizationDesigner, statusBarSlotRight, sidePanelSlot, reviewProviders, showPlayTab, allowPresentationWindow, allowPresentationFullscreen, allowPrint, submitOnEnter, calcEngineFactory, codeContext, fullWidth, uxFont, thinMargins, writeCanvasSettings, showStatusBar, imageDisplayMode, fileName, saveCoverImageOutput, saveDashboardImageOutput, language, findMode, onFindModeChange, findRequest, findShortcut, mentionProvider, proofing, proofingDefaultEnabled, proofingSpellingEnabled, proofingGrammarEnabled, proofingIgnoreStore, speechInput, documentLinkProvider, fenceRenderers, linkSchemes, allowRecording, allowNarrate, preserveSourceWrapping, placeholder, readOnly, imageSrc, imageAlt, imageMode, imageEditorContainer, onImageExport, inlinePreview, inlinePreviewWidth, outline, outlineWidth, blockTags, blockTagVisibility, themeInheritance, viewPreferences, onViewPreferencesChange, themeOverride, defaultThemeId, defaultThemeLabel, }: EditorShellProps): react.JSX.Element;
|
|
1725
1761
|
|
|
1726
1762
|
/**
|
|
1727
1763
|
* Shared editor context menu.
|
|
@@ -1807,7 +1843,7 @@ interface RawEditorProps {
|
|
|
1807
1843
|
* Raw markdown editor using Monaco Editor.
|
|
1808
1844
|
* Binds to the shared EditorContext for source synchronization.
|
|
1809
1845
|
*/
|
|
1810
|
-
declare function RawEditor({ monacoTheme, minimap, fontSize, wordWrap, className, submitOnEnter, readOnly, }: RawEditorProps):
|
|
1846
|
+
declare function RawEditor({ monacoTheme, minimap, fontSize, wordWrap, className, submitOnEnter, readOnly, }: RawEditorProps): react.JSX.Element;
|
|
1811
1847
|
|
|
1812
1848
|
interface WysiwygEditorProps {
|
|
1813
1849
|
/**
|
|
@@ -1844,7 +1880,7 @@ interface WysiwygEditorProps {
|
|
|
1844
1880
|
* Rich WYSIWYG markdown editor built on Tiptap (ProseMirror).
|
|
1845
1881
|
* Binds to the shared EditorContext for source synchronization.
|
|
1846
1882
|
*/
|
|
1847
|
-
declare function WysiwygEditor({ placeholder, className, submitOnEnter, readOnly, writeCanvasSettings, onOpenFilesPanel, calcEngineFactory, }: WysiwygEditorProps):
|
|
1883
|
+
declare function WysiwygEditor({ placeholder, className, submitOnEnter, readOnly, writeCanvasSettings, onOpenFilesPanel, calcEngineFactory, }: WysiwygEditorProps): react.JSX.Element;
|
|
1848
1884
|
|
|
1849
1885
|
interface PreviewPanelProps {
|
|
1850
1886
|
/** Base path for resolving media URLs in DocPlayer */
|
|
@@ -1869,7 +1905,7 @@ interface PreviewPanelProps {
|
|
|
1869
1905
|
* or document view. Controls (viewport, mode, theme, transform, captions)
|
|
1870
1906
|
* are rendered in the main toolbar via PreviewToolbarControls.
|
|
1871
1907
|
*/
|
|
1872
|
-
declare function PreviewPanel({ basePath, className, workspaceContainer, onLinkClick, showCodeCopyButton, onCopyCode, }: PreviewPanelProps):
|
|
1908
|
+
declare function PreviewPanel({ basePath, className, workspaceContainer, onLinkClick, showCodeCopyButton, onCopyCode, }: PreviewPanelProps): react.JSX.Element;
|
|
1873
1909
|
|
|
1874
1910
|
interface EditorInsertMenuItem {
|
|
1875
1911
|
id: string;
|
|
@@ -1881,4 +1917,4 @@ interface EditorInsertMenuItem {
|
|
|
1881
1917
|
/** Call from a toolbar slot; callbacks retain access to the editor context. */
|
|
1882
1918
|
declare function useEditorInsertMenuItems(items: readonly EditorInsertMenuItem[]): void;
|
|
1883
1919
|
|
|
1884
|
-
export { type
|
|
1920
|
+
export { type WriteCanvasSettings as $, type ApplySourceEditsOptions as A, type BlockInsertionBuilder as B, type CodeContext as C, type DashboardImageSaveOutput as D, type EditorHostMode as E, type FormulaEditRecord as F, type EditorShellProps as G, type EditorState as H, type FindOptions as I, type FindRequest as J, type FormulaSessionOptions as K, type ImageDisplayMode as L, type IngestedSidecar as M, type InsertBlockOptions as N, type LayoutMode as O, type MentionCandidate as P, type MentionProvider as Q, type OutlineBlock as R, type SceneTextChannel as S, type OutlineInsertion as T, PreviewPanel as U, type PreviewPanelProps as V, RawEditor as W, type XlsxSourceMeta as X, type RawEditorProps as Y, type ThemeInheritance as Z, type ViewPreferences as _, type CalcEngineFactory as a, WysiwygEditor as a0, type WysiwygEditorProps as a1, XLSX_LOCKED_REASON as a2, type XlsxFormulaSession as a3, applySourceEditsToText as a4, blockInsertionPoint as a5, createXlsxFormulaSession as a6, getBlockSlices as a7, headingDepthForInsertion as a8, ingestSidecarBytes as a9, joinBlockAt as aa, lineToOffset as ab, minimalReplaceEdit as ac, normalizeSourceEdits as ad, offsetToLine as ae, resolveOutlineInsertion as af, sliceIndexAtOffset as ag, sourceOutline as ah, spliceBlock as ai, useEditorContext as aj, useEditorContextMenuItems as ak, useEditorInsertMenuItems as al, type EditorView as b, type CsvSourceMeta as c, type BlockInsertionContext as d, type BlockPlacement as e, type BlockRange as f, type BlockSlice as g, type BlockTagVisibility as h, type CodeContextSection as i, type CoverImageSaveOutput as j, type DocumentLinkCandidate as k, type DocumentLinkProvider as l, type EditorActions as m, type EditorColorScheme as n, type EditorContextMenuContext as o, type EditorContextMenuItem as p, type EditorContextMenuItemVisibility as q, EditorContextMenuProvider as r, type EditorContextMenuProviderProps as s, type EditorContextValue as t, type EditorInsertMenuItem as u, type EditorMode as v, EditorProvider as w, type EditorProviderProps as x, type EditorSelectionInfo as y, EditorShell as z };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|