@searsuite/sear-assembly-setup
Create an editor
createSheetEditor() assembles one visual Sheet editor from an initial document, selected plugins, and host-provided
platform, rendering, and input adapters. Use createDocEditor() for a standalone rich-text document. A Workbook
host uses createWorkbookEditor() when it needs stable Sheet identities and switching between Sheets.
Import these entry points from their owning @searsuite/sear-assembly-* package. The assembly connects contracts;
it does not take ownership of a feature's document state. If no visual host is needed, createHeadlessEditor()
provides a smaller entry point for server work and tests.
Use when: the application is ready to provide the adapters required by its chosen editor and to own the editor lifecycle. Start with the headless assembly when rendering and input are unnecessary.
createEmptySheetDocumentState() supplies a starting Sheet state. After creation, application actions and input
handlers run typed commands through editor.commands; state owners stage operations, and the editor commits them
together. Queries read the current state, observations report committed changes, and capabilities expose services
owned by this editor instance.
A visual Sheet session also contains viewport and other local state. That session is separate from the durable
document. A Workbook captures the mounted Sheet's document and local session before switching Sheets. Call
editor.destroy() when the host unmounts the editor so adapters, listeners, and plugins release their resources.
Related concepts: commands define the mutation path; plugins own feature state; the Workbook assembly owns Sheet structure and switching.
- functioncreateSheetEditor
-
createSheetEditor(options: SheetEditorConfiguration): SheetEditorAssembles the default sheet editor runtime from platform adapters and state.
The returned editor owns an isolated dependency container, plugin graph, and render lifecycle. Hosts interact with it through commands, queries, observations, and capabilities, and must call
destroy()when the session is no longer mounted.ReturnsA fully initialized Sheet editor facade.
Exampleconst editor = createSheetEditor({ adapters, sheetState, plugins }); await editor.commands.run(command, input); editor.destroy();optionsPlatform adapters, initial Sheet state, plugins, and runtime configuration.
- interfaceSheetEditor
-
property readonly capabilities: RuntimeCapabilityReaderRead-only access to typed services owned by this editor's isolated runtime.
property readonly commands: SheetCommandBusThe sole supported entry point for user and program commands.
property readonly observations: ObservationRegistryTyped editor-local state and event observations exposed to the host.
property readonly queries: SheetQueryRegistryTyped runtime query registry for side-effect-free editor reads.
method destroy(): voidReleases runtime services and every active host observation subscription.
- functioncreateDocEditor
-
createDocEditor(options: DocEditorConfiguration): DocEditorAssembles a standalone rich-document editor from platform-neutral adapters and document content.
The editor owns its DI container, selected document plugins, rendering services, input adapters, and lifecycle. Product chrome remains a host concern and communicates with the editor through its public facade.
ReturnsA fully initialized rich-document editor facade.
Exampleconst editor = createDocEditor({ adapters, documentState }); editor.focus(); editor.destroy();optionsPlatform adapters, initial document state, plugins, and viewport configuration.
- interfaceDocEditor
-
Public standalone document editor API returned by
createDocEditor().property readonly capabilities: RuntimeCapabilityReaderRead-only access to typed services owned by this editor's isolated runtime.
property readonly commands: DocCommandBusThe supported command entry point for document user and program actions.
property readonly observations: ObservationRegistryTyped editor-local state and event observations exposed to the host.
method destroy(): voidReleases listeners, timers, adapter state, and DI-owned services for this editor instance.
method focus(): voidRequests focus for the host text-input adapter, preserving IME placement.
method getDocument(): RichDocNode[]Returns a clone of the current rich-document content.
method getText(): stringReturns the current plain-text view using one newline between paragraphs.
method loadDocument(document: RichDocNode[]): voidReplaces the document content and renders the new state.
method render(): voidRenders the current editor state into the configured render context.
- interfaceDocDocumentState
-
Document-owned rich content eligible for future ExportPlugin serialization.
property readonly document: RichDocNode[]Rich-document tree owned by this editor document.
- interfaceDocEditorAdapters
-
Platform-specific services required to assemble a standalone document editor.
property eventRegistrar?: InjectableImplementation<EventRegistrar>Optional host event registrar; defaults to a headless registrar when omitted.
property keyboardRouter: InjectableImplementation<KeyboardRouter>Keyboard router for action keys such as arrows, backspace, enter, and select-all.
property platform: InjectableImplementation<Platform>Platform implementation that owns timers, resize observation, and diagnostics.
property pointerCapture: InjectableImplementation<PointerCapture>Host-wide pointer capture adapter that emits render-root view coordinates.
property scroller?: InjectableImplementation<Scroller & { getPublisher: unknown }>Optional host scroller adapter for wheel/touch viewport scrolling.
property textInput: InjectableImplementation<TextInput>Text input adapter for printable text, paste/cut, and IME composition.
method createRenderContext(): RenderContextCreates the visible render context used by the document editor.
method createTextShaper(renderContext: RenderContext): TextShaperOptional text-shaping adapter; omission uses render-context measurements.
method registerEnvironment(container: Container): voidRegisters host environment values, such as keyboard and pointer event sources. Runs after base services are registered and before adapters are resolved.
- interfaceDocEditorConfiguration
-
Configuration for assembling a standalone rich-document editor.
property adapters: DocEditorAdaptersPlatform adapters supplied by the host application.
property defaultPlugins?: false | readonly DocPluginImplementation<DocPlugin<unknown>>[]Default document feature plugins; pass false to assemble only custom plugins.
property devicePixelRatio?: numberRaster scale used to initialize and resize the render context.
property documentState: DocDocumentStateInitial document-owned state.
property fontFamily?: stringDefault font family and fallback list applied to document text.
property fontSize?: numberDefault font size applied when measuring and rendering document text.
property incrementalRenderPolicyLimits?: IncrementalRenderPolicyLimitsConfigGuardrails used when deciding whether document block raster reuse should run for a frame.
property lineHeightMultiplier?: numberDefault line-height multiplier applied to paragraphs without an explicit override.
property paragraphSpacingAfter?: numberDefault spacing after non-final paragraphs.
property plugins?: DocPluginImplementation<DocPlugin<unknown>>[]Document plugins installed after the default editing and rendering features.
property sessionState?: Readonly<Record<string, unknown>>Optional editor-local state restored during an in-memory remount.
property verticalAlign?: DocVerticalAlignVertical positioning used by standalone document layout; defaults to top.
property viewport?: DocEditorViewportInitial viewport size; defaults to 800 by 600 when the host cannot know it yet.
method contentRect(viewport: DocEditorViewport): DocEditorContentRectResolves the editable content rectangle from the current viewport. Hosts use this to add page margins, rulers, or chrome without changing core document layout.
method onCreated(editor: DocEditor): voidCalled once the editor object has been assembled and initial content rendered.
- interfaceSheetDocumentState
-
Document data owned by one sheet and eligible for future ExportPlugin serialization.
property cellAlignments: AlignmentMatrixproperty cellBorders?: CellBorderMatrixSparse custom cell-edge state; absence initializes an empty border owner.
property cellFills: CellFillMatrixSparse cell fill state.
property cellFormats: CellFormatMatrixSparse per-cell number-format state.
property cellHighlights: CellHighlightMatrixSparse conditional highlight rules anchored at their range starts.
property cellMerges: CellMergeMatrixproperty cellVerticalAlignments: VerticalAlignmentMatrixSparse vertical cell alignment state.
property columnSizes: ColumnShapeDimensionsCSRMatrixproperty dataValidations?: DataValidationMatrixSparse data validation rules anchored at range starts.
property duplicates: DuplicateMatrixSparse duplicate-item highlight state.
property filters?: SheetFilterMatrixSheet-owned filter range and column rules.
property fixedRows?: FixedRowMatrixSparse per-row fixed state.
property freeze?: SheetFreezeMatrixPersistent top and left freeze boundaries.
property rowSizes: RowShapeDimensionsCSRMatrixproperty sheetData: SheetMatrix - interfaceSheetEditorAdapters
-
Platform-specific services required to assemble the default sheet editor.
property clipboard?: InjectableImplementation<SheetClipboard>property collabTransport: InjectableImplementation<CollabTransport>property cursorEngine: InjectableImplementation<CursorEngine>property eventRegistrar: InjectableImplementation<EventRegistrar>property fileDownload?: InjectableImplementation<FileDownload>Optional host file-save capability; existing environment bindings take precedence. The editor owns newly created adapters.
property formulaBar?: InjectableImplementation<SearFormulaBar>Optional formula input surface supplied by the host.
property keyboardRouter: InjectableImplementation<KeyboardRouter>property platform: InjectableImplementation<Platform>property pointerCapture: InjectableImplementation<PointerCapture>property scroller: InjectableImplementation<Scroller & { getPublisher: unknown }>property textInput: InjectableImplementation<TextInput>property toolbar: InjectableImplementation<SearToolbar>property userInteraction?: InjectableImplementation<UserInteractionService>Host-owned service for decisions that require a user response.
property webServiceClient?: InjectableImplementation<WebServiceClient>Asynchronous web-service transport used by host-managed formula caches.
property xmlXPathEvaluator?: InjectableImplementation<XmlXPathEvaluator>XML/XPath evaluator used by XML-backed formula plugins.
method createFunctionRegistry(): IFunctionRegistryCreates the function catalog owned by this editor or its parent workbook.
method createRenderContexts(): { hitRenderContext: RenderContext; offScreenRenderContext: RenderContext; renderContext: RenderContext }method createTextShaper(renderContext: RenderContext): TextShaperCreates an editor-local text shaper; omission uses render-context measurements.
method registerEnvironment(container: Container): void - interfaceSheetEditorConfiguration
-
property adapters: SheetEditorAdaptersproperty cellFontFamily?: stringDefault font family and fallback list used by ordinary Sheet cells.
property cellFontSize?: numberDefault font size used by ordinary Sheet cells.
property embeddedEditor?: SheetEmbeddedEditorOptional editor used to render and edit rich text embedded in Sheet cells.
property plugins?: SheetEditorPluginImplementation[]property sessionState?: Readonly<Record<string, unknown>>Optional editor-local state restored when remounting a workbook sheet.
property sheetState: SheetDocumentStateproperty viewport?: { height: number; width: number }method onCreated(editor: SheetEditor): void
Document editing commands
- variableRedoDocCommand
-
RedoDocCommand: DocCommandDefinition<void, DocCommandResult>Re-applies the most recently undone document mutation.
- variableUndoDocCommand
-
UndoDocCommand: DocCommandDefinition<void, DocCommandResult>Reverts the most recent committed document mutation.
- variableClearDocCompositionCommand
-
ClearDocCompositionCommand: DocCommandDefinition<void, DocCommandResult>Clears the active IME composition preview text.
- variableDeleteDocBackwardCommand
-
DeleteDocBackwardCommand: DocCommandDefinition<void, DocCommandResult>Deletes content before the current document selection.
- variableFocusDocCommand
-
FocusDocCommand: DocCommandDefinition<void, DocCommandResult>Focuses the host text-input adapter for the document editor.
- variableInsertDocTableCommand
-
InsertDocTableCommand: DocCommandDefinition<InsertDocTableInput, DocCommandResult>Inserts a table block at the current document position.
- interfaceInsertDocTableInput
-
Input accepted by InsertDocTableCommand.
property readonly columns: numberNumber of columns in the inserted table.
property readonly rows: numberNumber of rows in the inserted table.
- variableInsertDocTextCommand
-
InsertDocTextCommand: DocCommandDefinition<InsertDocTextInput, DocCommandResult>Inserts text at the current document selection.
- interfaceInsertDocTextInput
-
Input accepted by InsertDocTextCommand.
property readonly text: stringText to insert at the current document selection.
- variableLoadDocumentCommand
-
LoadDocumentCommand: DocCommandDefinition<LoadDocumentInput, DocCommandResult>Replaces the active document content.
- interfaceLoadDocumentInput
-
Input accepted by LoadDocumentCommand.
property readonly document: RichDocNode[]Rich-document content to load into the document editor.
- variableMoveDocCursorCommand
-
MoveDocCursorCommand: DocCommandDefinition<MoveDocCursorInput, DocCommandResult>Moves the current document cursor.
- interfaceMoveDocCursorInput
-
Input accepted by MoveDocCursorCommand.
property readonly direction: DocCursorDirectionDirection for cursor movement.
property readonly shiftKey?: booleanWhether the movement should extend the current selection.
- variableSelectAllDocCommand
-
SelectAllDocCommand: DocCommandDefinition<void, DocCommandResult>Selects all document content.
- variableSetDocBoldCommand
-
SetDocBoldCommand: DocCommandDefinition<SetDocBoldInput, DocCommandResult>Sets whether the selected document text is bold.
- interfaceSetDocBoldInput
-
Input accepted by SetDocBoldCommand. A null or false value clears bold.
property readonly bold: boolean | null - variableSetDocCompositionCommand
-
SetDocCompositionCommand: DocCommandDefinition<SetDocCompositionInput, DocCommandResult>Sets the active IME composition preview text.
- interfaceSetDocCompositionInput
-
Input accepted by SetDocCompositionCommand.
property readonly caretOffset: numberCaret offset inside the composing text.
property readonly text: stringCurrent composing text emitted by the host input method.
- variableSetDocFontFamilyCommand
-
SetDocFontFamilyCommand: DocCommandDefinition<SetDocFontFamilyInput, DocCommandResult>Sets the font family on the selected document text.
- interfaceSetDocFontFamilyInput
-
Input accepted by SetDocFontFamilyCommand. A null or empty value clears the font family.
- variableSetDocFontSizeCommand
-
SetDocFontSizeCommand: DocCommandDefinition<SetDocFontSizeInput, DocCommandResult>Sets the font size in pixels on the selected document text.
- interfaceSetDocFontSizeInput
-
Input accepted by SetDocFontSizeCommand. A null or empty value clears the font size.
property readonly fontSize: number | null - variableSetDocItalicCommand
-
SetDocItalicCommand: DocCommandDefinition<SetDocItalicInput, DocCommandResult> - interfaceSetDocItalicInput
-
property readonly italic: boolean | null - variableSetDocSelectionCommand
-
SetDocSelectionCommand: DocCommandDefinition<SetDocSelectionInput, DocCommandResult>Sets the active document selection without changing content.
- interfaceSetDocSelectionInput
-
Input accepted by SetDocSelectionCommand.
property readonly selection: DocSelectionSelection to make active in the document editor.
- variableSetDocStrikethroughCommand
-
SetDocStrikethroughCommand: DocCommandDefinition<SetDocStrikethroughInput, DocCommandResult> - interfaceSetDocStrikethroughInput
- variableSetDocTextColorCommand
-
SetDocTextColorCommand: DocCommandDefinition<SetDocTextColorInput, DocCommandResult>Sets the text color on the selected document text.
- interfaceSetDocTextColorInput
-
Input accepted by SetDocTextColorCommand. A null or empty value clears the text color.
property readonly color: string | null - variableSetDocUnderlineCommand
-
SetDocUnderlineCommand: DocCommandDefinition<SetDocUnderlineInput, DocCommandResult> - interfaceSetDocUnderlineInput
- variableSplitDocParagraphCommand
-
SplitDocParagraphCommand: DocCommandDefinition<void, DocCommandResult>Splits the current paragraph at the current document selection.
- variableToggleDocBoldCommand
-
ToggleDocBoldCommand: DocCommandDefinition<void, DocCommandResult>Toggles bold on the selected document text.
- variableToggleDocItalicCommand
-
ToggleDocItalicCommand: DocCommandDefinition<void, DocCommandResult> - variableToggleDocStrikethroughCommand
-
ToggleDocStrikethroughCommand: DocCommandDefinition<void, DocCommandResult> - variableToggleDocUnderlineCommand
-
ToggleDocUnderlineCommand: DocCommandDefinition<void, DocCommandResult>
Document lifecycle commands
- classDocInputBindingRegistry
-
Registry that lets multiple document plugins contribute handlers to single-subscription input adapters.
constructor DocInputBindingRegistry(): DocInputBindingRegistryproperty readonly symbol: typeof symbolstaticDI token for resolving the input binding registry.
method clear(): voidRemoves every registered handler.
method createKeyboardHandlers(): KeyboardRouterHandlersCreates the composed keyboard handlers passed to the host keyboard adapter.
method createTextHandlers(): TextInputHandlersCreates the composed text handlers passed to the host text adapter.
method enforceCommandBoundary(isCommandExecuting: (): boolean, isTearingDown: (): boolean): voidCloses registration changes after editor startup.
method registerKeyboardHandlers(handlers: KeyboardRouterHandlers): (): voidAdds keyboard-action handlers and returns a disposer.
method registerTextHandlers(handlers: TextInputHandlers): (): voidAdds text-input handlers and returns a disposer.
- interfaceCaptureDocSessionStateCommandResult
-
interface CaptureDocSessionStateCommandResult extends DocCommandResultResult of capturing editor-local state for an in-memory document remount.
- interfaceExportDocStateCommandResult
-
interface ExportDocStateCommandResult extends DocCommandResultResult of exporting detached document-owned state for an in-memory remount.
- typeDocViewportScrollInput
-
type DocViewportScrollInput = ScrollManagerStateInternal adapter input for one platform-originated document scroll state update.
- variableApplyDocViewportScrollCommand
-
ApplyDocViewportScrollCommand: DocCommandDefinition<ScrollManagerState, DocCommandResult>Applies one platform-originated document scroll update.
- variableCaptureDocSessionStateCommand
-
CaptureDocSessionStateCommand: DocCommandDefinition<void, CaptureDocSessionStateCommandResult>Captures every registered local document session contributor.
- variableExportDocStateCommand
-
ExportDocStateCommand: DocCommandDefinition<void, ExportDocStateCommandResult>Exports the current document-owned state without local session values.
- variableRenderDocViewportCommand
-
RenderDocViewportCommand: DocCommandDefinition<void, DocCommandResult>Renders the document viewport after the committed scroll state changes.
- variableResizeDocViewportCommand
-
ResizeDocViewportCommand: DocCommandDefinition<DocEditorViewport, DocCommandResult>Resizes the standalone document viewport.
- variableScrollDocViewportToCommand
-
ScrollDocViewportToCommand: DocCommandDefinition<DocViewportSessionState, DocCommandResult>Scrolls the standalone document viewport to an absolute world position.
- variableUpdateDocDefaultConfigCommand
-
UpdateDocDefaultConfigCommand: DocCommandDefinition<EditorDefaultConfigOverrides<DocConfig>, DocCommandResult>Updates editor-local Doc defaults without changing document state.
- variableRenderDocCommand
-
RenderDocCommand: DocCommandDefinition<void, DocCommandResult>Requests a document render without changing content.
Document plugins and styles
- classCaretPlugin
-
class CaretPlugin extends DocPlugin<null>Owns caret movement, focus, blink state, and caret overlay rendering.
constructor CaretPlugin(caretState: DocCaretState): CaretPluginproperty readonly symbol: typeof symbolstaticDI token for resolving CaretPlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
method registerServices(context: DocPluginServiceContext): voidstaticRegisters caret-owned state before the plugin is resolved.
Inherited members 39
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- classDocContentRenderPlugin
-
class DocContentRenderPlugin extends DocPlugin<null>Default content renderer for text nodes laid out by the document layout engine.
constructor DocContentRenderPlugin(): DocContentRenderPluginproperty readonly symbol: typeof symbolstaticDI token for resolving DocContentRenderPlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(searCore: SearCoreDoc): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
Inherited members 42
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerCommands
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classDocDebugOverlayPlugin
-
class DocDebugOverlayPlugin extends DocPlugin<null>Debug overlay for document block-level render bounds.
constructor DocDebugOverlayPlugin(): DocDebugOverlayPluginproperty readonly symbol: typeof symbolstaticDI token for resolving DocDebugOverlayPlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
method start(): voidStarts runtime behavior after the first document frame.
Inherited members 41
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerCommands
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- registerServices
- classHistoryPlugin
-
class HistoryPlugin extends DocPlugin<null>Tracks committed document snapshots and contributes transaction-safe undo/redo commands.
constructor HistoryPlugin(input: DocInputPlugin, platform?: Platform): HistoryPluginproperty readonly symbol: typeof symbolstaticDI token for resolving HistoryPlugin.
method apply(_state: null, _transaction: Transaction): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidRegisters document undo and redo shortcuts with the composed keyboard adapter.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method getStatus(): DocHistoryStatusmethod initialize(): voidAligns the history baseline with state restored before Core initialization.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method onTransactionCommitted(transaction: Transaction): voidUpdates history only after Core has committed the owning document transaction.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
method registerObservations(observations: ObservationRegistry): voidRegisters typed state and event observations owned by this document plugin.
method registerSessionState(registry: SessionStateRegistry): voidRegisters local state that must survive an in-memory editor remount.
method registerState(): { dataEngine: { enabled: boolean }; key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
method subscribe(listener: (status: DocHistoryStatus): void): (): voidInherited members 36
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classSelectionPlugin
-
class SelectionPlugin extends DocPlugin<null>Owns document selection commands, select-all shortcut, and pointer drag selection.
constructor SelectionPlugin(input: DocInputPlugin): SelectionPluginproperty readonly symbol: typeof symbolstaticDI token for resolving SelectionPlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
method registerObservations(observations: ObservationRegistry): voidRegisters the host-facing selection observation.
method registerSessionState(registry: SessionStateRegistry): voidRegisters selection-owned local remount state.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
method start(): voidStarts runtime behavior after the first document frame.
Inherited members 37
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- registerServices
- classTextInputPlugin
-
class TextInputPlugin extends DocPlugin<null>Owns printable text input and delete bindings.
constructor TextInputPlugin(): TextInputPluginproperty readonly symbol: typeof symbolstaticDI token for resolving TextInputPlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
method registerServices(context: DocPluginServiceContext): voidstaticRegisters text node model support owned by this plugin.
Inherited members 39
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- variableDefaultDocFeaturePlugins
-
DefaultDocFeaturePlugins: readonly [typeof ParagraphPlugin, typeof CompositionPlugin, typeof TextInputPlugin, typeof SelectionPlugin, typeof CaretPlugin, typeof DocContentRenderPlugin, typeof RichTextLineBoxPlugin, typeof FontFamilyTextStylePlugin, typeof FontSizeTextStylePlugin, typeof BoldTextStylePlugin, typeof ItalicTextStylePlugin, typeof UnderlineTextStylePlugin, typeof StrikethroughTextStylePlugin, typeof TextColorStylePlugin, typeof TablePlugin, typeof HistoryPlugin]Default feature plugins installed by createDocEditor unless overridden.
- functionregisterDefaultDocFeatures
-
registerDefaultDocFeatures(container: Container, manager: PluginManager<SearCoreDoc, NodeProperties>, implementations: false | readonly DocPluginImplementation<DocPlugin<unknown>>[] | undefined): DocPlugin<unknown>[]Registers the default document feature plugins selected for one editor instance.
- functionregisterDocFeaturePlugins
-
registerDocFeaturePlugins(container: Container, manager: PluginManager<SearCoreDoc, NodeProperties>, implementations: readonly DocPluginImplementation<DocPlugin<unknown>>[] | undefined): DocPlugin<unknown>[]Registers document feature plugin instances with the Core-owned PluginManager.
- enumBoldTextStyleKey
-
Persisted style key owned by the bold text-style plugin.
enum member Bold: "bold" - classBoldTextStylePlugin
-
class BoldTextStylePlugin extends InlineTextStylePluginBaseContributes bold rendering and bold document commands.
constructor BoldTextStylePlugin(): BoldTextStylePluginproperty readonly symbol: typeof symbolstaticDI token for resolving BoldTextStylePlugin.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
Inherited members 46
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- variableDocCaretPluginKey
-
DocCaretPluginKey: PluginKey - variableDocCompositionPluginKey
-
DocCompositionPluginKey: PluginKey - variableDocContentRenderPluginKey
-
DocContentRenderPluginKey: PluginKeyDefault document feature plugin keys used by command pipelines.
- classDocPlugin
-
class DocPlugin<StateType> extends Plugin<SearCoreDoc, NodeProperties, StateType>, PluginExtension<DocCommandBus, ObservationRegistry, SessionStateRegistry, DocRuntimeExtensionRegistry>Convenience base class for a Plugin targeting createDocEditor().
constructor DocPlugin<StateType>(__namedParameters: PluginSpec<StateType>): DocPlugin<StateType>Creates a plugin with its stable identity and initial state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method initialize(context: DocPluginRuntimeContext): voidPrepares behavior that requires initialized Core state but must run before runtime effects.
method onEditorDestroy(context: DocPluginRuntimeContext): voidReleases resources owned by this plugin before the Core is destroyed.
method registerBlockFlows(registry: RichTextBlockFlowRegistry): voidRegisters plugin-owned top-level block flow resolvers.
method registerCapabilities(registry: DocRuntimeExtensionRegistry): voidPublishes typed runtime services owned by this document plugin.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerInlineStyleRenderers(registry: RichTextRunRenderRegistry): voidRegisters plugin-owned render behavior for styled text runs.
method registerInlineStyles(registry: RichTextInlineStyleRegistry): voidRegisters plugin-owned inline text style readers and mutation policies.
method registerKeyboardHandlers(context: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
method registerLineBoxes(registry: RichTextLineBoxRegistry): voidRegisters plugin-owned rich-text line box resolvers.
method registerObservations(observations: ObservationRegistry): voidRegisters typed state and event observations owned by this document plugin.
method registerSessionState(registry: SessionStateRegistry): voidRegisters local state that must survive an in-memory editor remount.
method start(context: DocPluginRuntimeContext): voidStarts runtime behavior after the first document frame.
method registerServices(context: DocPluginServiceContext): voidstaticRegisters bindings required before this Doc plugin is instantiated.
Inherited members 34
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceDocPluginImplementation
-
interface DocPluginImplementation<TPlugin>Injectable DocPlugin class accepted by createDocEditor().
- interfaceDocPluginRuntime
-
Stable host capabilities supplied to a DocPlugin after editor assembly.
property readonly commands: DocCommandBusCommand bus exposed by the document editor instance.
property readonly document: { blockFlows: RichTextBlockFlowRegistry; core: SearCoreDoc; cursor: DocCursorManager; inlineStyles: RichTextInlineStyleRegistry; input: DocInputPlugin; layout: DocLayoutEngine; lineBoxes: RichTextLineBoxRegistry; nodes: DocNodeRegistry }Rich-document domain services.
property readonly events: { engine: EventEngine<NodeProperties>; registrar: EventRegistrar }Event and hit-test services used by document interactions.
property readonly extensions: DocRuntimeExtensionRegistryExtension capability registry for third-party document plugins.
property readonly input: { keyboard: KeyboardRouter; pointer: PointerCapture; text: TextInput }Host input adapters used by document editing commands.
property readonly observations: ObservationRegistryTyped state and event observations owned by this editor instance.
property readonly platform: PlatformPlatform adapter for timers, resize observation, and diagnostics.
property readonly plugins: PluginManager<SearCoreDoc, NodeProperties>Ordered document plugin registry for this editor.
property readonly render: { context: RenderContext; engine: DocRenderEngineCapability }Document render services and visible context.
property readonly scroll: { manager: ScrollManager }Scroll state shared by document layout and rendering.
property readonly session: SessionStateRegistryLocal remount state contributed by built-in and third-party plugins.
property readonly textShaper: TextShaperText shaper used by document layout and rendering.
- variableDocPluginRuntimeCapability
-
DocPluginRuntimeCapability: { CaretState: DocRuntimeCapability<DocCaretStateCapability>; Composition: DocRuntimeCapability<DocCompositionManager>; InputBindings: DocRuntimeCapability<DocInputBindingRegistryCapability>; Interaction: DocRuntimeCapability<DocInteractionRuntime> }Runtime extension tokens owned by document plugins assembled by editor composition roots.
- interfaceDocPluginRuntimeContext
-
interface DocPluginRuntimeContext extends DocPluginSetupContextDocument setup capabilities plus the Core created by createDocEditor().
property readonly core: SearCoreDocCore document runtime.
- interfaceDocPluginServiceContext
-
Services available while createDocEditor() registers document plugins.
property readonly container: ContainerDI container used by the document assembly root.
- interfaceDocPluginSetupContext
-
Typed public services available before createDocEditor() starts Core.
property readonly container: ContainerDI container used by the document assembly root.
property readonly runtime: DocPluginRuntimeRuntime services available to document plugins.
- enumFontFamilyTextStyleKey
-
Persisted style key owned by the font-family text-style plugin.
enum member FontFamily: "fontFamily" - classFontFamilyTextStylePlugin
-
class FontFamilyTextStylePlugin extends InlineTextStylePluginBaseContributes font-family rendering and the set-font-family document command.
constructor FontFamilyTextStylePlugin(): FontFamilyTextStylePluginproperty readonly symbol: typeof symbolstaticDI token for resolving FontFamilyTextStylePlugin.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
Inherited members 47
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- enumFontSizeTextStyleKey
-
Persisted style key owned by the font-size text-style plugin.
enum member FontSize: "fontSize" - classFontSizeTextStylePlugin
-
class FontSizeTextStylePlugin extends InlineTextStylePluginBaseContributes font-size rendering and the set-font-size document command.
constructor FontSizeTextStylePlugin(): FontSizeTextStylePluginproperty readonly symbol: typeof symbolstaticDI token for resolving FontSizeTextStylePlugin.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
Inherited members 47
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- enumItalicTextStyleKey
-
enum member Italic: "italic" - classItalicTextStylePlugin
-
class ItalicTextStylePlugin extends InlineTextStylePluginBaseContributes italic rendering, mutation, and keyboard commands.
constructor ItalicTextStylePlugin(): ItalicTextStylePluginproperty readonly symbol: typeof symbolstaticmethod registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
Inherited members 46
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classParagraphPlugin
-
class ParagraphPlugin extends DocPlugin<null>Registers paragraph and text node model support plus block-level commands.
constructor ParagraphPlugin(): ParagraphPluginproperty readonly symbol: typeof symbolstaticDI token for resolving ParagraphPlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method registerBlockFlows(registry: RichTextBlockFlowRegistry): voidRegisters plugin-owned top-level block flow resolvers.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
method registerLineBoxes(registry: RichTextLineBoxRegistry): voidRegisters plugin-owned rich-text line box resolvers.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
method registerServices(context: DocPluginServiceContext): voidstaticRegisters paragraph node model support owned by this plugin.
Inherited members 37
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- functionregisterDocPluginCapabilities
-
registerDocPluginCapabilities(plugins: readonly unknown[], registry: DocRuntimeExtensionRegistry): voidPublishes every typed runtime capability contributed by document plugins.
- functionregisterDocPluginCommands
-
registerDocPluginCommands(plugins: readonly unknown[], commands: DocCommandBus): (): void - functionregisterDocPluginInlineStyles
-
registerDocPluginInlineStyles(plugins: readonly unknown[], registry: RichTextInlineStyleRegistry): (): voidRegisters every inline text-style contribution owned by document plugins.
- functionregisterDocPluginLineBoxes
-
registerDocPluginLineBoxes(plugins: readonly unknown[], registry: RichTextLineBoxRegistry): (): voidRegisters every rich-text line box contribution owned by document plugins.
- functionregisterDocPluginObservations
-
registerDocPluginObservations(plugins: readonly unknown[], observations: ObservationRegistry): voidRegisters every typed observation source contributed by document plugins.
- functionregisterDocPluginSessionStates
-
registerDocPluginSessionStates(plugins: readonly unknown[], registry: SessionStateRegistry): voidRegisters every local session-state adapter contributed by document plugins.
- typeRichTextInlineStyle
-
type RichTextInlineStyle = Readonly<Record<string, unknown>>Domain-neutral inline style bag carried by measured rich-text chars.
- classRichTextLineBoxPlugin
-
class RichTextLineBoxPlugin extends DocPlugin<null>Registers rich-text line box resolution for document layout.
constructor RichTextLineBoxPlugin(): RichTextLineBoxPluginproperty readonly symbol: typeof symbolstaticDI token for resolving RichTextLineBoxPlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method registerLineBoxes(registry: RichTextLineBoxRegistry): voidRegisters plugin-owned rich-text line box resolvers.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
Inherited members 43
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerCommands
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- enumStrikethroughTextStyleKey
-
enum member Strikethrough: "strikethrough" - classStrikethroughTextStylePlugin
-
class StrikethroughTextStylePlugin extends InlineTextStylePluginBaseContributes strikethrough rendering, mutation, and keyboard commands.
constructor StrikethroughTextStylePlugin(): StrikethroughTextStylePluginproperty readonly symbol: typeof symbolstaticmethod registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
Inherited members 46
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classTablePlugin
-
class TablePlugin extends DocPlugin<null>Contributes table model and insertion command without adding table knowledge to Core.
constructor TablePlugin(): TablePluginproperty readonly symbol: typeof symbolstaticDI token for resolving TablePlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method configure(context: DocPluginSetupContext): voidConfigures the document editor before runtime start.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method onEditorDestroy(): voidReleases resources owned by this plugin before the Core is destroyed.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<NodeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
method registerServices(context: DocPluginServiceContext): voidstaticRegisters table node model support owned by this plugin.
Inherited members 40
Inherited from DocPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- enumTextColorStyleKey
-
Persisted style key owned by the text-color style plugin.
enum member Color: "color" - enumUnderlineTextStyleKey
-
enum member Underline: "underline" - classUnderlineTextStylePlugin
-
class UnderlineTextStylePlugin extends InlineTextStylePluginBaseContributes underline rendering, mutation, and keyboard commands.
constructor UnderlineTextStylePlugin(): UnderlineTextStylePluginproperty readonly symbol: typeof symbolstaticmethod registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
method registerKeyboardHandlers(__namedParameters: DocKeyboardHandlerRegistrationContext): voidRegisters keyboard-to-command bindings owned by this document plugin.
Inherited members 46
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
Document rendering and viewport
- classDocCaretState
-
Shared caret blink state used by document feature plugins and render layout.
constructor DocCaretState(): DocCaretStateproperty readonly symbol: typeof symbolstaticDI token for resolving caret state owned by CaretPlugin.
method enforceCommandBoundary(isCommandExecuting: (): boolean): voidCloses direct caret writes after editor assembly.
method isVisible(): booleanReturns whether the caret should be painted in the current frame.
method reset(): voidRestarts the blink cycle with the caret visible.
method setVisible(visible: boolean): voidSets the current caret visibility.
method toggle(): booleanToggles the caret visibility for a blink tick.
- classDocRenderLayoutService
-
Owns Doc layout cache, page map, and viewport range derivation.
constructor DocRenderLayoutService(inputPlugin: DocInputPlugin, extensions: DocRuntimeExtensionRegistry, renderContext: RenderContext, scrollManager: ScrollManager, sceneTree: Tree<PositionRect<templateLiteral>>, configuration: DocEditorRuntimeConfiguration, configEngine: ConfigEngine, cursorManager: DocCursorManager, compositionProvider: DocCompositionProvider, layoutEngine: DocLayoutEngine, virtualLayouts: DocVirtualLayoutStore, commands: DocCommandBus): DocRenderLayoutServiceCreates a render-layout service for one standalone document editor.
property readonly symbol: typeof symbolstaticDI token for resolving the render-layout service.
method getLatestVirtualLayoutSummary(): DocVirtualLayoutSummary | nullmethod prepareRenderLayout(contentRect: DocEditorContentRect, viewport: DocEditorViewport, renderOperations?: DocRenderOperations): DocRenderLayoutBuilds the current render layout before plugins produce render nodes.
method prepareViewportLayout(contentRect: DocEditorContentRect, viewport: DocEditorViewport): DocRenderLayoutReuses the previous full-document layout and updates only viewport-derived fields.
method recordBlockRenderDebugSnapshot(snapshot: DocBlockRenderDebugSnapshot): voidRecords block-render reuse/debug stats for the latest render frame.
method recordRenderPrepareTiming(mode: DocRenderPrepareMode, durationMs: number): voidmethod refreshInteractionLayout(contentRect: DocEditorContentRect, _viewport: DocEditorViewport): DocRenderLayout | nullReuses the latest layout snapshot and refreshes selection/caret geometry only.
method reset(): voidClears cached layout and page state.
method subscribeVirtualLayoutSummary(listener: DocVirtualLayoutSummaryListener): (): void - classRichTextBlockNode
-
class RichTextBlockNode extends RichTextVisualNodeScene node that indexes and draws one top-level rich-text block.
constructor RichTextBlockNode(input: { block: { id: string; index: number }; font: string; lineRenderer: RichTextLineRenderer; lines: readonly RichTextRenderLine[]; origin?: Pick<PositionRectProps, "x" | "y">; rect: PositionRectProps }): RichTextBlockNodeCreates a block-level rich-text scene node.
method drawScene(context: RenderContext, clipRegion?: ClipRegion): voidDraws all visible text runs inside this block.
Inherited members 42
Inherited from RichTextVisualNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- classRichTextRunNode
-
class RichTextRunNode extends RichTextVisualNodeScene node that draws one contiguous styled rich-text run in world coordinates.
constructor RichTextRunNode(input: { baselineY: number; font: string; fontAscent: number; fontDescent: number; properties: Partial<RichTextRenderNodeProperties>; rect: PositionRectProps; runRenderer: RichTextRunRenderer; style?: Readonly<Record<string, unknown>>; … }): RichTextRunNodeCreates a text-run scene node.
method drawScene(context: RenderContext, clipRegion?: ClipRegion): voidDraws the text run into the active world-space transform.
Inherited members 42
Inherited from RichTextVisualNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- interfaceDocEditorContentRect
-
interface DocEditorContentRect extends DocEditorViewportRectangle used for document text layout and rendering.
- interfaceDocEditorViewport
-
Viewport dimensions in host-view coordinates.
property height: numberViewport height in host-view units.
property width: numberViewport width in host-view units.
- interfaceDocRenderLayout
-
Layout/cache/page-map result exposed to document plugins for one render pass.
property readonly blockLayoutDiff: DocBlockLayoutDiffBlock-level diff between the previous and current layout caches.
property readonly composingCaretPixelOffset: numberPixel offset from composing-text start to the IME caret.
property readonly cursorX: numberCursor x in world coordinates.
property readonly cursorY: numberCursor y in world coordinates.
property readonly documentRect: { height: number; width: number; x: number; y: number }Current document layout rectangle in world coordinates.
property readonly layoutCache: DocLayoutCacheLatest full-document layout cache.
property readonly pageMap: DocPageMapLatest page map derived from the layout cache.
property readonly visibleBlocks: readonly DocBlockLayout[]Laid-out blocks selected for plugin-owned render nodes.
- interfaceDocViewportSessionState
-
Local viewport position retained while remounting one document editor.
property readonly x: numberproperty readonly y: number - interfaceRichTextRenderLine
-
Minimal layout-line shape consumed by rich-text render nodes.
property readonly chars: readonly RichTextRenderChar[]property readonly charStartOffset: numberproperty readonly cursorXOffsets?: readonly number[]property readonly fontAscent: numberproperty readonly height: numberproperty readonly textNodePath: readonly number[]property readonly x: numberproperty readonly y: number - interfaceRichTextRenderNodeProperties
-
interface RichTextRenderNodeProperties extends NodePropertiesRender-node properties used by rich-text scene graphs.
property readonly blockId?: stringStable top-level rich-text block id.
property readonly blockIndex?: numberTop-level rich-text block index.
property readonly lineIndex?: numberLayout line index inside the full rich-text snapshot.
property readonly renderRole?: "block" | "line" | "page" | "text-run" | "selection" | "caret" | "composition"Semantic role for rich-text render nodes.
Inherited members 25
Inherited from NodeProperties.
- typeDocVirtualLayoutSummaryListener
-
type DocVirtualLayoutSummaryListener = (summary: DocVirtualLayoutSummary): void - variableDocViewportObservation
-
DocViewportObservation: StateObservationDefinition<DocViewportSessionState>Current document viewport position exposed to hosts and plugins.
- variableDocViewportSessionStateDefinition
-
DocViewportSessionStateDefinition: SessionStateDefinition<DocViewportSessionState>Stable session-state identity owned by the document viewport assembly.
- functioncreateRichTextRunRect
-
createRichTextRunRect(x: number, baselineY: number, width: number, height: number, fontAscent: number): PositionRect<templateLiteral>Creates a world-space rectangle for one rich-text line/run.
- functionregisterDocViewportCommands
-
registerDocViewportCommands(input: { commands: DocCommandBus; renderCoordinator: DocRenderCoordinator; scrollManager: ScrollManager; viewportEnvironment: DocViewportEnvironment }): voidRegisters viewport-owned document commands on the editor command bus.
- functionregisterDocViewportState
-
registerDocViewportState(session: SessionStateRegistry, observations: ObservationRegistry, scrollManager: ScrollManager): voidRegisters viewport remount state and its host-facing observation.
- interfaceDocVirtualLayoutSummary
-
Public virtual layout summary exposed through the Doc layout-service capability.
property readonly blockRender?: DocBlockRenderDebugSnapshotproperty readonly cacheHits: numberproperty readonly cacheMisses: numberproperty readonly cursorBlock: number | nullproperty readonly documentHeight: numberproperty readonly heightIndexUpdated: booleanproperty readonly initialLoadMs?: numberproperty readonly materializedBlocks: numberproperty readonly materializedIndexes: stringproperty readonly model: "reused" | "rebuilt"property readonly rangeEnd: numberproperty readonly rangeStart: numberproperty readonly renderPhase?: DocVirtualLayoutRenderPhaseproperty readonly timings: DocVirtualLayoutTimingSummaryproperty readonly totalBlocks: number
Document state and observations
- interfaceDocBaseServices
-
Base service instances created before runtime adapters and plugins are wired.
property readonly configEngine: ConfigEngineConfiguration engine registered in the DI container.
property readonly stage: SceneGraph<RichTextRenderNodeProperties>Scene graph that owns standalone document content render nodes.
- interfaceDocEditorChange
-
Snapshot delivered when the document content changes.
property readonly document: RichDocNode[]Cloned rich-document content after the change.
property readonly text: stringPlain-text view using one newline between paragraphs.
- interfaceDocHistoryEntry
-
Detached before/after snapshots for one committed document mutation.
property readonly afterDocument: RichDocNode[]property readonly afterSelection: DocSelectionproperty readonly beforeDocument: RichDocNode[]property readonly beforeSelection: DocSelectionproperty readonly operations?: readonly RichDocOTOperation[]RichDoc OT operations committed by the document mutation.
- interfaceDocHistorySessionState
-
Document-local undo and redo stacks retained during editor remounts.
- interfaceDocHistoryStatus
-
Current document undo/redo availability.
property readonly canRedo: booleanproperty readonly canUndo: boolean - interfaceDocInlineStyleStatus
-
Whether one inline style can be applied, is active, and has a common selected value.
property readonly active: booleanproperty readonly enabled: booleanproperty readonly value: unknownThe common selected value, or null when unset or mixed.
- interfaceDocRuntime
-
Runtime services assembled after Doc base services and host environment values are available.
property readonly eventEngine: EventEngine<NodeProperties>Event pipeline and hit-testing facade for document interactions.
property readonly eventRegistrar: EventRegistrarEvent registrar selected by the host or the headless fallback.
property readonly pluginManager: PluginManager<SearCoreDoc, NodeProperties>Document plugin manager populated by feature registration.
property readonly renderContexts: { hit: RenderContext; main: RenderContext; offScreen: RenderContext }Render contexts for visible, off-screen, and hit-test layers.
property readonly renderEngine: DocRenderEngineDocument render engine populated with the shared Sheet-like strategy chain.
property readonly scrollManager: ScrollManagerScroll manager coordinating document viewport state.
- typeDocInlineStyleState
-
type DocInlineStyleState = Readonly<Record<string, DocInlineStyleStatus>>Inline style state consumed by document toolbars and other host controls.
- typeDocSessionState
-
type DocSessionState = SessionStateSnapshotOpaque in-memory contributor snapshot retained while remounting a document editor.
- variableDocDocumentObservation
-
DocDocumentObservation: StateObservationDefinition<DocEditorChange>Committed document content exposed as an editor-local typed state observation.
- variableDocHistorySessionStateDefinition
-
DocHistorySessionStateDefinition: SessionStateDefinition<DocHistorySessionState>Stable session-state identity owned by document history.
- variableDocHistoryStatusObservation
-
DocHistoryStatusObservation: StateObservationDefinition<DocHistoryStatus>Undo/redo availability exposed as an editor-local state observation.
- variableDocInlineStyleObservation
-
DocInlineStyleObservation: StateObservationDefinition<Readonly<Record<string, DocInlineStyleStatus>>>Current inline-style availability and activation for the document selection.
- variableDocSelectionObservation
-
DocSelectionObservation: StateObservationDefinition<DocSelection>Current document selection exposed as an editor-local typed observation.
- variableDocSelectionSessionStateDefinition
-
DocSelectionSessionStateDefinition: SessionStateDefinition<DocSelection>Stable identity for local document selection retained during remounts.
- functionregisterDocBaseServices
-
registerDocBaseServices(container: Container, adapters: DocEditorAdapters, _viewport: DocEditorViewport, defaultConfigOverrides?: EditorDefaultConfigOverrides<DocConfig>): DocBaseServicesRegisters document editor base services into the DI container.
- functionregisterDocConfigCommands
-
registerDocConfigCommands(commands: DocCommandBus, config: ConfigEngine<DocConfig>): voidRegisters Doc configuration changes on the owning command bus.
- functionregisterDocDocumentObservation
-
registerDocDocumentObservation(observations: ObservationRegistry, document: DocDocumentSessionCoordinator): voidRegisters the document-owned read projection with the editor observation registry.
- functionregisterDocInlineStyleObservation
-
registerDocInlineStyleObservation(observations: ObservationRegistry, input: DocInputPlugin, inlineStyles: RichTextInlineStyleRegistry): voidRegisters the selection-derived inline-style state with the editor observation registry.
- functionregisterDocRuntime
-
registerDocRuntime(container: Container, adapters: DocEditorAdapters, viewport: DocEditorViewport): DocRuntimeRegisters render, input, scroll, command, and plugin runtime services for Doc.
- functionregisterDocSessionStateCommands
-
registerDocSessionStateCommands(commands: DocCommandBus, session: SessionStateRegistry): voidRegisters the in-memory document session capture command.
- functionregisterDocStateSnapshotCommands
-
registerDocStateSnapshotCommands(commands: DocCommandBus, document: DocDocumentSessionCoordinator): voidRegisters the document-owned state snapshot command.
- interfaceDocInteractionRuntime
-
View services exposed to document interaction plugins.
method getContentRect(): DocInteractionContentRectmethod getRoot(): unknownmethod getViewport(): DocInteractionViewportmethod readRootViewOffset(): { x: number; y: number }method resolveCursorFromPointer(input: DocPointerInput): DocCursorPosmethod subscribePointerDrag(handlers: DocPointerDragHandlers): (): void - variableDocRuntimeCapability
-
DocRuntimeCapability: { BlockFlows: DocRuntimeCapability<RichTextBlockFlowRegistry>; Commands: DocRuntimeCapability<DocCommandBus>; Config: DocRuntimeCapability<ConfigEngine<any>>; Document: DocRuntimeCapability<{ blockFlows: RichTextBlockFlowRegistry; core: SearCoreDoc; cursor: DocCursorManager; inlineStyles: RichTextInlineStyleRegistry; input: DocInputPlugin; layout: DocLayoutEngine; lineBoxes: RichTextLineBoxRegistry; nodes: DocNodeRegistry }>; Events: DocRuntimeCapability<{ engine: EventEngine<NodeProperties>; registrar: EventRegistrar }>; InlineStyles: DocRuntimeCapability<RichTextInlineStyleRegistry>; Input: DocRuntimeCapability<{ keyboard: KeyboardRouter; pointer: PointerCapture; text: TextInput }>; LayoutService: DocRuntimeCapability<DocRenderLayoutServiceCapability>; … }Document runtime capabilities registered by the default assembly root.
- typeDocRuntimeCapabilityReader
-
type DocRuntimeCapabilityReader = RuntimeCapabilityReaderRead-only view of editor-local document runtime capabilities exposed to hosts.
- variableDocRuntimeCapabilityToken
-
DocRuntimeCapabilityToken: { BlockFlows: DocRuntimeCapability<RichTextBlockFlowRegistry>; Commands: DocRuntimeCapability<DocCommandBus>; Config: DocRuntimeCapability<ConfigEngine<any>>; Document: DocRuntimeCapability<{ blockFlows: RichTextBlockFlowRegistry; core: SearCoreDoc; cursor: DocCursorManager; inlineStyles: RichTextInlineStyleRegistry; input: DocInputPlugin; layout: DocLayoutEngine; lineBoxes: RichTextLineBoxRegistry; nodes: DocNodeRegistry }>; Events: DocRuntimeCapability<{ engine: EventEngine<NodeProperties>; registrar: EventRegistrar }>; InlineStyles: DocRuntimeCapability<RichTextInlineStyleRegistry>; Input: DocRuntimeCapability<{ keyboard: KeyboardRouter; pointer: PointerCapture; text: TextInput }>; LayoutService: DocRuntimeCapability<DocRenderLayoutServiceCapability>; … }Document runtime capabilities registered by the default assembly root.
- classDocRuntimeExtensionRegistry
-
class DocRuntimeExtensionRegistry extends RuntimeCapabilityRegistryRegistry of extension capabilities available to document plugins.
constructor DocRuntimeExtensionRegistry(): DocRuntimeExtensionRegistryproperty readonly symbol: typeof symbolstaticDI token for resolving the document runtime extension registry.
Inherited members 7
Inherited from RuntimeCapabilityRegistry.
- classTextColorStylePlugin
-
class TextColorStylePlugin extends InlineTextStylePluginBaseContributes text-color rendering and mutation for text nodes.
constructor TextColorStylePlugin(): TextColorStylePluginproperty readonly symbol: typeof symbolstaticDI token for resolving TextColorStylePlugin.
method registerCommands(commands: DocCommandBus): voidRegisters every stable command id owned by this document plugin.
Inherited members 47
Inherited from InlineTextStylePluginBase.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerBlockFlows
- registerCapabilities
- registerConfig
- registerInlineStyleRenderers
- registerInlineStyles
- registerKeyboardHandlers
- registerLineBoxes
- registerObservations
- registerSessionState
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
Sheet commands and snapshots
- interfaceCaptureSheetSessionStateCommandResult
-
interface CaptureSheetSessionStateCommandResult extends SheetCommandResultResult of capturing editor-local state for an in-memory workbook remount.
- interfaceExportSheetStateCommandResult
-
interface ExportSheetStateCommandResult extends SheetCommandResultCommand result for exporting the current sheet state snapshot.
The pipeline is intentionally empty: exporting state must not mutate OT state, request rendering, or produce local effects.
property readonly sheetState: SheetDocumentStateCloned state payload suitable for workbook persistence or sheet remounting.
- interfaceSheetScrollToInput
-
Public programmatic input for an absolute world-space viewport position.
property readonly x: numberproperty readonly y: number - typeSheetScrollInput
-
type SheetScrollInput = ScrollManagerStateInternal adapter input for one platform-originated scroll state update.
- variableApplyViewportScrollCommand
-
ApplyViewportScrollCommand: SheetCommandDefinition<ScrollManagerState, SheetCommandResult> - variableCaptureSheetSessionStateCommand
-
CaptureSheetSessionStateCommand: SheetCommandDefinition<void, CaptureSheetSessionStateCommandResult>Captures local state that must survive switching away from one workbook sheet.
- variableExportSheetStateCommand
-
ExportSheetStateCommand: SheetCommandDefinition<void, ExportSheetStateCommandResult>Host command that exports a cloned state snapshot for the active SheetEditor.
- variableResizeSheetViewportCommand
-
ResizeSheetViewportCommand: SheetCommandDefinition<{ height: number; width: number }, SheetCommandResult> - variableScrollViewportToCommand
-
ScrollViewportToCommand: SheetCommandDefinition<SheetScrollToInput, SheetCommandResult> - variableUnregisterSheetInputValidatorCommand
-
UnregisterSheetInputValidatorCommand: SheetCommandDefinition<number, SheetCommandResult>Removes one editor-local input validator through the Sheet command bus.
- variableUpdateSheetDefaultConfigCommand
-
UpdateSheetDefaultConfigCommand: SheetCommandDefinition<EditorDefaultConfigOverrides<SheetConfig>, SheetCommandResult>Updates editor-local Sheet defaults without changing document state.
- functioncloneSheetDocumentState
-
cloneSheetDocumentState(state: SheetDocumentState): SheetDocumentStateTakes ownership of an input Sheet snapshot without retaining caller-owned mutable values.
- functioncreateDefaultSheetDocumentStateExportRegistry
-
createDefaultSheetDocumentStateExportRegistry(): DocumentStateCodecRegistry<SheetDocumentState>Creates the default registry for built-in Sheet document-state modules.
- functioncreateEmptySheetDocumentState
-
createEmptySheetDocumentState(rowCount: number, columnCount: number): SheetDocumentStateCreates an empty Sheet document with matching dimensions for import adapters.
- functiondeserializeSheetDocumentState
-
deserializeSheetDocumentState<TSheetState>(payload: unknown, registry?: DocumentStateCodecRegistry<TSheetState>, path?: string): TSheetStateDeserializes one Sheet document state through registered state-owner codecs.
- functionregisterSheetStateSnapshotCommands
-
registerSheetStateSnapshotCommands(commands: SheetCommandBus, pluginManager: PluginManager<SearCoreSheet, CellProperties>): voidRegisters sheet state snapshot commands for the default sheet assembly.
- functionserializeSheetDocumentState
-
serializeSheetDocumentState<TSheetState>(sheetState: TSheetState, registry?: DocumentStateCodecRegistry<TSheetState>): SearSheetDocumentFileSerializes one Sheet document state through registered state-owner codecs.
Sheet plugins and capabilities
- classDefaultSheetClipboardDataSource
-
class DefaultSheetClipboardDataSource extends SheetClipboardDataSourceDefault data source bridging clipboard commands to the active Sheet data view.
constructor DefaultSheetClipboardDataSource(dataEngine: DataEngine, queries: SheetQueryRegistry, ownerFormats: SheetFormatTransferRegistry, platform: Platform, rangeMoves: SheetRangeMoveRegistry, cutSession: SheetClipboardCutSession, identity: SheetClipboardSheetIdentity, inputValidation: SheetCellInputValidationRegistry): DefaultSheetClipboardDataSourceproperty readonly cutSession: SheetClipboardCutSessionproperty readonly cutSourceId: stringproperty readonly formatTarget: PluginKeyproperty readonly target: PluginKeymethod bindPreviewRuntime(core: SearCoreSheet, plugins: PluginManager<SearCoreSheet, CellProperties>, bridge: SheetClipboardWorkbookBridge | null): voidmethod captureMergedRanges(range: SheetRangeBounds): readonly SheetClipboardMergedRange[]method captureOwnerFormats(range: SheetRangeBounds): readonly SheetPortableFormatTransfer[]method clearOwnerFormats(range: SheetRangeBounds): readonly SheetFormatTransferPlan[]method createClipboardCutId(): stringmethod getColumnCount(): numbermethod getMergedRange(row: number, column: number): SheetRangeBounds | nullOptional host projection for rejecting writes hidden by merged cells.
method getRowCount(): numbermethod getSelection(): SheetRangeBounds | nullmethod isRowVisible(row: number): booleanmethod planClearMergedRanges(range: SheetRangeBounds): { operations: UpdateCellOTOperation<SheetCellMerge>[]; target: PluginKey }method planOwnerFormats(captured: readonly SheetPortableFormatTransfer[], target: SheetRangeBounds): readonly SheetFormatTransferPlan[]method planPasteMergedRanges(merges: readonly SheetClipboardMergedRange[], target: SheetClipboardCellPoint): { operations: UpdateCellOTOperation<SheetCellMerge>[]; target: PluginKey }method planRangeMove(source: SheetClipboardRangeInput, destination: SheetClipboardRangeInput): readonly SheetRangeMovePlan[]method prepareCrossSheetCut(cutId: string, clearPipeline: Pipeline): voidmethod readCell(row: number, column: number): CellMatrixElement | nullmethod readCellFormat(row: number, column: number): CellFormat | nullmethod scheduleCrossSheetMove(cutId: string, sourceId: string, pastePipeline: Pipeline): Promise<void>method validatePasteCell(row: number, column: number, cell: CellMatrixElement | null): SheetCellInputValidationResultOptional editor-local validation applied before any pasted value is written.
- classSheetDebugOverlayPlugin
-
class SheetDebugOverlayPlugin extends SheetPlugin<null>Empty Sheet debug overlay placeholder used by hosts that enable ?debug.
constructor SheetDebugOverlayPlugin(): SheetDebugOverlayPluginproperty readonly symbol: typeof symbolstaticDI token for resolving SheetDebugOverlayPlugin.
method apply(_state: null, _transaction: unknown): nullApplies a transaction to plugin-owned state and returns the next state.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method registerState(): { key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): Node<CellProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
Inherited members 44
Inherited from SheetPlugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- configure
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- initialize
- lockCommittedState
- onClick
- onDblClick
- onEditorDestroy
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerCapabilities
- registerCellVisualReaders
- registerCommands
- registerConfig
- registerFormatTransfers
- registerObservations
- registerQueries
- registerRangeMoves
- registerSessionState
- registerStructureMoves
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- start
- registerServices
- classSheetPlugin
-
class SheetPlugin<StateType> extends Plugin<SearCoreSheet, CellProperties, StateType>, PluginExtension<SheetCommandBus, ObservationRegistry, SessionStateRegistry, SheetRuntimeExtensionRegistry, SheetQueryRegistry>Convenience base class for a Plugin targeting createSheetEditor().
constructor SheetPlugin<StateType>(__namedParameters: PluginSpec<StateType>): SheetPlugin<StateType>Creates a plugin with its stable identity and initial state.
method configure(context: SheetPluginSetupContext): voidConfigures the Sheet editor before its Core is created.
method initialize(context: SheetPluginRuntimeContext): voidPrepares behavior that requires initialized Core state but must run before the first frame and other runtime effects.
method onEditorDestroy(context: SheetPluginRuntimeContext): voidReleases resources owned by this plugin before the Core is destroyed.
This deliberately does not use the name
destroy: DI containers may treat a no-argument destroy() method as an owned-instance disposer.method registerCapabilities(registry: SheetRuntimeExtensionRegistry): voidPublishes typed runtime services owned by this plugin.
method registerCellVisualReaders(registry: SheetCellVisualReaderRegistry, context: SheetCellVisualReaderRegistrationContext): voidRegisters plugin-owned properties used to compose rendered Sheet cells.
method registerCommands(commands: SheetCommandBus): voidRegisters every stable command id owned by this plugin.
method registerFormatTransfers(registry: SheetFormatTransferRegistry): voidContributes owner-defined format capture and transfer plans.
method registerObservations(observations: ObservationRegistry): voidRegisters typed state and event observations owned by this plugin.
method registerQueries(queries: SheetQueryRegistry): voidmethod registerRangeMoves(registry: SheetRangeMoveRegistry): voidContributes state-owner planning for same-sheet cell moves.
method registerSessionState(registry: SessionStateRegistry): voidRegisters local state that must survive an in-memory editor remount.
method registerStructureMoves(registry: SheetStructureMoveRegistry): voidContributes preflight and dependent operation planning for whole-axis reordering.
method start(context: SheetPluginRuntimeContext): voidStarts runtime behavior after the Core has rendered its first frame.
method registerServices(context: SheetPluginServiceContext): voidstaticRegisters bindings required before this Sheet plugin is instantiated.
Inherited members 34
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- apply
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getPluginConfig
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- registerState
- render
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetRuntimeExtensionRegistry
-
class SheetRuntimeExtensionRegistry extends RuntimeCapabilityRegistryRegistry for typed sheet runtime extension values.
Third-party plugins use this registry to publish and consume capabilities without mutating the runtime facade shape directly.
Inherited members 7
Inherited from RuntimeCapabilityRegistry.
- interfaceSheetPluginImplementation
-
interface SheetPluginImplementation<TPlugin>Injectable SheetPlugin class accepted by createSheetEditor().
- interfaceSheetPluginRuntime
-
interface SheetPluginRuntime extends SheetPluginSetupRuntimeRuntime capabilities available after the command bus is bound and Core exists.
property readonly commands: SheetCommandBusproperty readonly toolbar: SearToolbarInherited members 19
Inherited from SheetPluginSetupRuntime.
- interfaceSheetPluginRuntimeContext
-
interface SheetPluginRuntimeContext extends SheetPluginSetupContextSheet setup capabilities plus the Core created by createSheetEditor().
property readonly core: SearCoreSheetproperty readonly runtime: SheetPluginRuntime - interfaceSheetPluginServiceContext
-
Services available while createSheetEditor() registers Sheet plugins.
property readonly container: Container - interfaceSheetPluginSetupContext
-
Typed public services available before createSheetEditor() creates its Core.
- interfaceSheetPluginSetupRuntime
-
Stable host capabilities available before the command bus and Core are ready. Services are grouped by responsibility so plugins need not rely on untyped container lookups for normal extension work.
property readonly cells: { catalog: CellTypeCatalog }property readonly collaboration: { session: Pick<CollaborationSession, "getStatus"> }property readonly config: ConfigEngineproperty readonly data: SheetDataEngineproperty readonly embeddedEditor?: { editor: SheetEmbeddedEditor }Optional Sheet-facing rich-text editor supplied by the host.
property readonly events: { engine: EventEngine<CellProperties>; registrar: EventRegistrar }property readonly extensions: SheetRuntimeExtensionRegistryproperty readonly formula: { externalServices: IFormulaExternalServiceProvider; functions: IFunctionRegistry; results: FormulaResultProviderRegistry; richResults: FormulaRichResultProviderRegistry; sources: FormulaSourceProviderRegistry; textServices: IFormulaTextServiceProvider; webService: WebServiceClient; xmlXPath: XmlXPathEvaluator }property readonly input: { cursor: CursorEngine; cursorRules: CursorRegistry; keyboard: KeyboardRouter; pointer: PointerCapture; text: TextInput }property readonly interaction: { pipelineSteps: PipelineStepExecutorRegistry; reducers: SheetInteractionReducerRegistry; store: SheetInteractionStore }property readonly lifecycle: SheetLifecycleCoordinatorproperty readonly observations: ObservationRegistryproperty readonly platform: Platformproperty readonly plugins: PluginManager<SearCoreSheet, CellProperties>property readonly queries: SheetQueryRegistryproperty readonly render: { cellVisualReaders: SheetCellVisualReaderRegistry; contexts: { hit: RenderContext; main: RenderContext; offScreen: RenderContext }; coordinator: SheetRenderCoordinatorManager; dirtyTracker: GenerationalDirtyTracker; dirtyTree: Tree<PositionRect<templateLiteral>>; engine: SheetRenderEngine; rendererRegistry: SheetRendererRegistry<CellProperties>; stage: SceneGraph<CellProperties>; … }property readonly scroll: { coordinates: CoordinateEngine; manager: ScrollManager; scroller: Scroller; transformer: CoordinateTransformer }property readonly session: SessionStateRegistryEditor-local capture and restore registry shared by every session-state owner.
property readonly textShaper: TextShaper - typeSheetRuntimeCapabilityReader
-
type SheetRuntimeCapabilityReader = RuntimeCapabilityReaderRead-only view of editor-local runtime capabilities exposed to hosts.
- typeSheetRuntimeCapabilityToken
-
type SheetRuntimeCapabilityToken = RuntimeCapability<T>Typed extension capability exposed through the sheet runtime facade.
- variableSheetRuntimeCapability
-
SheetRuntimeCapability: { Cells: SheetRuntimeCapability<{ catalog: CellTypeCatalog }>; Collaboration: SheetRuntimeCapability<{ session: Pick<CollaborationSession, "getStatus"> }>; Commands: SheetRuntimeCapability<SheetCommandBus>; Config: SheetRuntimeCapability<ConfigEngine<any>>; Data: SheetRuntimeCapability<SheetDataEngine>; EmbeddedEditor: SheetRuntimeCapability<{ editor: SheetEmbeddedEditor }>; Events: SheetRuntimeCapability<{ engine: EventEngine<CellProperties>; registrar: EventRegistrar }>; Formula: SheetRuntimeCapability<{ externalServices: IFormulaExternalServiceProvider; functions: IFunctionRegistry; results: FormulaResultProviderRegistry; richResults: FormulaRichResultProviderRegistry; sources: FormulaSourceProviderRegistry; textServices: IFormulaTextServiceProvider; webService: WebServiceClient; xmlXPath: XmlXPathEvaluator }>; … } - functiondefineSheetRuntimeCapability
-
defineSheetRuntimeCapability<T>(id: string): SheetRuntimeCapability<T>Defines a typed runtime capability token.
ReturnsImmutable capability descriptor.
idStable capability id.
- functionregisterSheetConfigCommands
-
registerSheetConfigCommands(commands: SheetCommandBus, config: ConfigEngine<SheetConfig>): voidRegisters Sheet configuration changes on the owning command bus.
- functionregisterSheetPluginCapabilities
-
registerSheetPluginCapabilities(plugins: readonly unknown[], registry: SheetRuntimeExtensionRegistry): voidPublishes every typed runtime capability contributed by Sheet plugins.
- functionregisterSheetPluginCellVisualReaders
-
registerSheetPluginCellVisualReaders(plugins: readonly unknown[], registry: SheetCellVisualReaderRegistry, context: SheetCellVisualReaderRegistrationContext): voidRegisters every plugin-owned Sheet cell visual reader.
- functionregisterSheetPluginCommands
-
registerSheetPluginCommands(plugins: readonly unknown[], commands: SheetCommandBus): void - functionregisterSheetPluginObservations
-
registerSheetPluginObservations(plugins: readonly unknown[], observations: ObservationRegistry): voidRegisters every typed observation source contributed by Sheet plugins.
- functionregisterSheetPluginQueries
-
registerSheetPluginQueries(plugins: readonly unknown[], queries: SheetQueryRegistry): void - functionregisterSheetPluginSessionStates
-
registerSheetPluginSessionStates(plugins: readonly unknown[], registry: SessionStateRegistry): voidRegisters every local session-state adapter contributed by Sheet plugins.
Sheet viewport and session
- interfaceSheetClipboardWorkbookBridge
-
Workbook-owned endpoint for an atomic move between two sheets.
- interfaceSheetViewportSessionState
-
Local viewport position retained while remounting one workbook sheet.
property readonly x: numberproperty readonly y: number - typeSheetSessionState
-
type SheetSessionState = SessionStateSnapshotOpaque, in-memory contributor snapshot retained per sheet while a workbook editor is open.
- variableSheetClipboardWorkbookBridgeSymbol
-
SheetClipboardWorkbookBridgeSymbol: typeof SheetClipboardWorkbookBridgeSymbol - variableSheetViewportSessionStateDefinition
-
SheetViewportSessionStateDefinition: SessionStateDefinition<SheetViewportSessionState>Stable session-state identity owned by the Sheet viewport assembly.
- functionregisterSheetSessionStateCommands
-
registerSheetSessionStateCommands(commands: SheetCommandBus, session: SessionStateRegistry): voidRegisters the in-memory Sheet session capture command.
- functionregisterSheetViewportCommands
-
registerSheetViewportCommands(commands: SheetCommandBus, scrollManager: ScrollManager, resizeController: SheetViewportResizeController): voidRegisters viewport-owned commands on the editor command bus.
- functionregisterSheetViewportSessionState
-
registerSheetViewportSessionState(registry: SessionStateRegistry, scrollManager: ScrollManager): voidRegisters viewport-owned local remount state with the editor-local registry.
Plugin and session setup
A session snapshot holds local editor state for remounting. Durable Sheet and Doc content stays in the document state.
- classViewportOverlayNode
-
class ViewportOverlayNode extends RichTextVisualNodeViewport overlay node that draws transient UI under an identity transform.
constructor ViewportOverlayNode(input: { depth?: number; drawOverlay: (context: RenderContext): void; nodeKey: string; rect: PositionRectProps; role?: "selection" | "caret" }): ViewportOverlayNodeCreates a viewport overlay render node.
method drawScene(context: RenderContext): voidDraws overlay content; the node owns transform isolation for viewport-space plugins.
Inherited members 42
Inherited from RichTextVisualNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- functionregisterDefaultDependencies
-
registerDefaultDependencies(container: Container): voidRegisters the small common runtime set into an explicit host container.
- functiondefineDocRuntimeCapability
-
defineDocRuntimeCapability<T>(id: string): DocRuntimeCapability<T>Creates a typed document runtime capability token.
- functiondefineSessionState
-
defineSessionState<State>(id: string): SessionStateDefinition<State>Creates an immutable typed identity for one local session value.
- functionreadSessionState
-
readSessionState<State>(snapshot: SessionStateSnapshot, definition: SessionStateDefinition<State>): State | undefinedReads one contributor value from an opaque snapshot through its typed definition.
- interfaceSessionStateAdapter
-
interface SessionStateAdapter<State>Captures and restores one detached local session value.
property readonly restoreAfter?: readonly SessionStateDefinition<unknown>[]Contributors in the same phase that must restore before this one when they are registered.
property readonly restorePhase: SessionStateRestorePhaseLifecycle phase in which restore() may safely update the owning feature.
method capture(): State | undefinedReturns plain data or a supported built-in value; custom class instances are not session snapshots.
method restore(state: State): voidRestores local state during the declared lifecycle phase.
- interfaceSessionStateDefinition
-
interface SessionStateDefinition<State>Typed identity owned and exported by one local-state contributor.
property readonly id: stringStable, globally unique id used in the in-memory session snapshot.
property readonly stateType?: StateCompile-time state carrier; never populated at runtime.
- classSessionStateError
-
class SessionStateError extends SearErrorError raised when a session-state contributor violates its registry contract.
constructor SessionStateError(code: SessionStateErrorCode, message: string, details?: SearErrorDetails): SessionStateErrorCreates a session-state contract error.
property readonly code: SessionStateErrorCodeStable machine-readable error code.
Inherited members 9
Inherited from SearError.
- variableSessionStateErrorCode
-
SessionStateErrorCode: { invalidDefinition: "SEAR_SESSION_STATE_INVALID_DEFINITION"; invalidRestoreDependency: "SEAR_SESSION_STATE_INVALID_RESTORE_DEPENDENCY"; invalidRestoreOrder: "SEAR_SESSION_STATE_INVALID_RESTORE_ORDER"; invalidRestorePhase: "SEAR_SESSION_STATE_INVALID_RESTORE_PHASE"; registrationConflict: "SEAR_SESSION_STATE_REGISTRATION_CONFLICT"; restoreDependencyCycle: "SEAR_SESSION_STATE_RESTORE_DEPENDENCY_CYCLE"; restoreInProgress: "SEAR_SESSION_STATE_RESTORE_IN_PROGRESS"; restorePhaseClosed: "SEAR_SESSION_STATE_RESTORE_PHASE_CLOSED"; … }Stable machine-readable errors raised by session-state contracts.
- classSessionStateRegistry
-
Editor-local coordinator for all built-in and plugin-contributed session state.
constructor SessionStateRegistry(): SessionStateRegistryproperty readonly symbol: typeof symbolstaticDI token for resolving the editor-local registry.
method assertRestorationOpen(): voidRejects a retained contributor restore callback after editor initialization.
method capture(): SessionStateSnapshotCaptures every registered contributor while preserving state whose owner is not loaded.
method clear(lifecycleToken?: object): voidClears contributors and retained state owned by this registry instance.
method getCompletedRestorePhases(): readonly SessionStateRestorePhase[]Returns restore phases already completed by this editor lifecycle.
method getRegisteredStateIds(): readonly string[]Returns sorted ids for currently registered contributors.
method loadSnapshot(snapshot: SessionStateSnapshot): voidLoads a complete snapshot before lifecycle restoration begins.
method register<State>(definition: SessionStateDefinition<State>, adapter: SessionStateAdapter<State>): (): voidRegisters one state owner and returns an idempotent disposer.
method restorePhase(phase: SessionStateRestorePhase): voidRestores every registered contributor assigned to one ordered lifecycle phase.
method sealRestoration(lifecycleToken: object): voidCloses initialization-only restore operations for an assembled editor.
- variableSessionStateRestorePhase
-
SessionStateRestorePhase: { AfterInitialize: "afterInitialize"; BeforeInitialize: "beforeInitialize" }Ordered lifecycle phases in which local state may be restored.
- typeSessionStateSnapshot
-
type SessionStateSnapshot = Readonly<Record<string, unknown>>Opaque in-memory snapshot keyed by contributor-owned definition ids.
No matching API entries.