← All packages

API reference

@searsuite/sear-assembly-core

The staged Sheet and Doc runtimes that execute pipelines and commit transactions.

65 exportsderived from source

enumPipelineStepKindsource ↗
enum PipelineStepKind

Built-in pipeline step kinds understood by SearCoreSheet.

enum memberInteraction
Interaction: "interaction"

Update local sheet interaction state; never synchronized through OT.

enum memberLocalAction
LocalAction: "local-action"

Run a command-owned local action; never synchronized through OT.

enum memberPostCommit
PostCommit: "post-commit"

Publish a command-owned local state change only after staging succeeds.

enum memberPostRender
PostRender: "post-render"

Re-render after the current frame's dirty regions have been flushed.

enum memberPreparedAction
PreparedAction: "prepared-action"

Prepare a local resource and return its rollback for failed staging.

enum memberRender
Render: "render"

Re-render a single plugin (no state change).

enum memberTransaction
Transaction: "transaction"

Stage a Transaction for atomic commit after every pipeline step succeeds.

classConsolePipelineLoggersource ↗
class ConsolePipelineLogger extends PipelineLifecycle

Console logger middleware for Pipeline lifecycle events.

Registers as a PipelineLifecycle hook and emits styled console output at each stage:

🚀 Pipeline: edit-exit-and-select (3 steps, 1 dirty)
  📝 commit-cell-value  → set R0C0 = {richtext}
  ✅ commit-cell-value
  📝 exit-edit-mode  → clear editor
  ✅ exit-edit-mode
  🏁 Pipeline done — rendered

This is the only place that touches console — the execution engine and caller code are fully decoupled from logging.

constructorconstructor
ConsolePipelineLogger(): ConsolePipelineLogger
methodonComplete
onComplete(_pipeline: Pipeline, rendered: boolean): void

Handles the complete lifecycle event.

_pipeline: Pipeline
rendered: boolean
methodonStart
onStart(pipeline: Pipeline): void

Handles the start lifecycle event.

pipeline: Pipeline
methodonStepComplete
onStepComplete(step: PipelineStep, _pipeline: Pipeline): void

Handles the step complete lifecycle event.

step: PipelineStep
_pipeline: Pipeline
methodonStepStart
onStepStart(step: PipelineStep, _pipeline: Pipeline, detail: string): void

Handles the step start lifecycle event.

step: PipelineStep
_pipeline: Pipeline
detail: string
classDocCompositionManagersource ↗
class DocCompositionManager extends DocCompositionProvider

Owns optional IME composition state independently from cursor and selection state.

constructorconstructor
DocCompositionManager(textShaper: TextShaper): DocCompositionManager
textShaper: TextShaper
propertysymbolstatic
readonly symbol: symbol

DI token for resolving DocCompositionManager.

methodclear
clear(teardownToken?: object): void

Clears all composing state.

teardownToken: object
methodenforceCommandBoundary
enforceCommandBoundary(isCommandExecuting: (): boolean, teardownToken?: object): void

Closes direct composition writes after editor assembly.

isCommandExecuting: (): boolean
teardownToken: object
methodgetCaretOffset
getCaretOffset(): number

Returns the logical caret offset inside the composing text.

methodgetCaretPixelOffset
getCaretPixelOffset(): number

Returns the latest measured caret pixel offset.

methodgetText
getText(): string

Returns the current composing text.

methodmeasure
measure(font?: string): DocCompositionLayout

Measures current composing text and records the caret pixel offset for rendering.

font: string
methodsetText
setText(text: string, caretOffset?: number): void

Updates the active composing text and logical caret offset.

text: string
caretOffset: number
classDocCursorManagersource ↗
class DocCursorManager

Injectable singleton that bridges document input state and render-node drawing.

  • The plugin computes pixel cursor coordinates (via DocLayoutEngine) and calls setCursor() before triggering a rerender.
  • Document overlay render nodes read getCursor() and draw the cursor bar if set.
  • clearCursor() is called on edit-session end so stale state is never drawn.
constructorconstructor
DocCursorManager(): DocCursorManager
propertysymbolstatic
readonly symbol: symbol

DI token for resolving DocCursorManager.

methodclearCursor
clearCursor(teardownToken?: object): void

Clear cursor and selection state (call on edit-session end).

teardownToken: object
methodenforceCommandBoundary
enforceCommandBoundary(isCommandExecuting: (): boolean, teardownToken: object): void

Seals assembled cursor writes while preserving command-owned rendering.

isCommandExecuting: (): boolean
teardownToken: object
methodgetCursor
getCursor(): CursorRenderInfo | null

Read the cursor render info. Returns null when no edit session is active.

methodgetSelectionRects
getSelectionRects(): SelectionRect[]

Read the selection highlight rectangles.

methodsetCursor
setCursor(info: CursorRenderInfo): void

Set (or update) the cursor render info for the upcoming draw call.

info: CursorRenderInfo
methodsetSelectionRects
setSelectionRects(rects: SelectionRect[]): void

Set selection highlight rectangles for the upcoming draw call.

rects: SelectionRect[]
classDocImmediateRenderPaintersource ↗
class DocImmediateRenderPainter

Shared painter for embedded rich-document content and transient viewport output.

constructorconstructor
DocImmediateRenderPainter(cursorManager: DocCursorManager, scrollManager: ScrollManager, lineRenderer: RichTextLineRenderer, compositionManager?: DocCompositionManager | null): DocImmediateRenderPainter

Creates a painter over the document cursor and scroll services.

cursorManager: DocCursorManager
scrollManager: ScrollManager
lineRenderer: RichTextLineRenderer
compositionManager: DocCompositionManager | null
methoddrawContent
drawContent(context: RenderContext, input: DocImmediateRenderPainterContentInput): void

Draws text lines from a layout snapshot in the caller's current transform.

context: RenderContext
input: DocImmediateRenderPainterContentInput
methoddrawSelectionRectsInViewport
drawSelectionRectsInViewport(context: RenderContext): void

Draws selection rectangles in viewport coordinates under an identity transform.

context: RenderContext
methoddrawSelectionRectsInWorld
drawSelectionRectsInWorld(context: RenderContext): void

Draws selection rectangles using the caller's current world transform.

context: RenderContext
methoddrawTextCursorOverlayInViewport
drawTextCursorOverlayInViewport(context: RenderContext): void

Draws IME composing text and caret in viewport coordinates.

context: RenderContext
classDocInputPluginsource ↗
class DocInputPlugin extends Plugin<SearCoreDoc, NodeProperties, DocInputState>

Plugin that applies rich-document text input and cursor navigation commands.

constructorconstructor
DocInputPlugin(docLayoutEngine: DocLayoutEngine, platform?: Platform): DocInputPlugin

Constructs the document input plugin with editor-session state only.

docLayoutEngine: DocLayoutEngine
platform: Platform
propertytransactionOT
readonly transactionOT: { definition: TransactionOTDefinition<RichDocOTOperation>; ownerId: "doc.input"; relations: readonly [OTTransformRelation<RichDocOTOperation, RichDocOTOperation>] }

All document data mutations use the shared RichDoc OT operation family.

propertypluginKeystatic
readonly pluginKey: PluginKey

Stable plugin key for document input state.

propertysymbolstatic
readonly symbol: symbol

DI token for resolving the document input plugin.

membersession
session: unknown
methodapply
apply(state: DocInputState, transaction: Transaction): DocInputState | null

Applies rich-document OT transactions owned by the document input plugin.

state: DocInputState
transaction: Transaction
methodclearSession
clearSession(): void

Clears the current edit session state.

methodcreateArrowTransaction
createArrowTransaction(direction: DocCursorDirection, shiftKey: boolean): Transaction

Builds a transaction for arrow-key cursor navigation.

direction: DocCursorDirection
shiftKey: boolean
methodcreateDeleteTransaction
createDeleteTransaction(): Transaction

Builds a transaction for Backspace deletion.

methodcreateInputTransaction
createInputTransaction(text: string): Transaction

Builds a transaction for committed text input.

text: string
methodcreateReplaceDocumentTransaction
createReplaceDocumentTransaction(document: RichDocNode[], selection?: DocSelection): Transaction

Builds a RichDoc OT transaction that replaces the active document session.

document: RichDocNode[]
selection: DocSelection
methodcreateSelectAllTransaction
createSelectAllTransaction(): Transaction

Builds a transaction that selects all content in the current document session.

methodcreateSoftEnterTransaction
createSoftEnterTransaction(): Transaction

Builds a transaction for soft-enter paragraph splitting.

methodcreateTransaction
createTransaction(command: DocCommand, docTransaction?: DocTransaction): Transaction

Builds a workspace transaction from a rich-document domain command.

command: DocCommand
docTransaction: DocTransaction
methodenforceSessionWriteBoundary
enforceSessionWriteBoundary(isCommandExecuting: (): boolean, commitToken: object, runWithoutMutationAuthority?: <Value>(callback: (): Value): Value): void

Binds the owning editor's command and commit boundary after initial state registration.

isCommandExecuting: (): boolean
commitToken: object
runWithoutMutationAuthority: <Value>(callback: (): Value): Value
methodgetLastSnapshot
getLastSnapshot(): LayoutSnapshot | null

Returns the derived layout snapshot used for vertical cursor movement.

methodgetPluginConfig
getPluginConfig(_searCore: SearCoreDoc): null

Document input has no plugin configuration.

_searCore: SearCoreDoc
methodhandleArrow
handleArrow(direction: DocCursorDirection, shiftKey: boolean): DocInputDispatchResult

Handles arrow-key cursor navigation.

direction: DocCursorDirection
shiftKey: boolean
methodhandleDelete
handleDelete(): DocInputDispatchResult

Handles Backspace deletion.

methodhandleInput
handleInput(text: string): DocInputDispatchResult

Handles committed text input.

text: string
methodhandleSelectAll
handleSelectAll(): DocInputDispatchResult

Selects all content in the current document session.

methodhandleSoftEnter
handleSoftEnter(): DocInputDispatchResult

Handles soft-enter paragraph splitting.

methodonTransactionCommitted
onTransactionCommitted(transaction: Transaction): void

Publishes committed document and selection projections after Core commits this plugin's transaction.

transaction: Transaction
methodregisterState
registerState(): { key: PluginKey; state: DocInputState }

Registers document input state under the plugin key.

methodrender
render(_searCore: SearCoreDoc): Node<NodeProperties>[] | null

Document input does not render scene nodes directly.

_searCore: SearCoreDoc
methodresetSession
resetSession(doc: RichDocNode[], selection?: DocSelection): void

Replaces the current edit session document and selection.

doc: RichDocNode[]
selection: DocSelection
methodrestoreSelection
restoreSelection(selection: DocSelection): void

Replaces local selection during session restoration without changing document content.

selection: DocSelection
methodsealSessionRestoration
sealSessionRestoration(): void

Closes the document initialization and session restoration phase.

methodsetLastSnapshot
setLastSnapshot(snapshot: LayoutSnapshot | null): void

Stores the last layout snapshot for cursor navigation.

snapshot: LayoutSnapshot | null
methodsubscribeDocument
subscribeDocument(listener: (): void): (): void

Subscribes to committed document projection changes.

listener: (): void
methodsubscribeSelection
subscribeSelection(listener: (): void): (): void

Subscribes to committed selection projection changes.

listener: (): void
Inherited members 28

Inherited from Plugin.

classDocRenderEnginesource ↗
class DocRenderEngine extends RenderEngine<NodeProperties, RenderCoordinatorManager>

Document render engine that mirrors Sheet's fixed strategy chain.

Domain-specific layout and SceneGraph projection happen before this class. The render engine owns only SceneGraph painting, dirty marks, viewport resizing, and ordered strategy dispatch.

constructorconstructor
DocRenderEngine(scrollManager: ScrollManager, renderContext: RenderContext, configEngine: ConfigEngine, renderCoordinatorManager: RenderCoordinatorManager, stage: SceneGraph<NodeProperties>, renderStrategyManager: RenderStrategyManager<NodeProperties>, screenRenderStrategy: ScreenRenderStrategy<NodeProperties>, dirtyRenderStrategy: DirtyRenderStrategy<NodeProperties>, stickyRenderStrategy: StickyRenderStrategy<NodeProperties>, overlayRenderStrategy: OverlayRenderStrategy<NodeProperties>): DocRenderEngine

Creates a render engine for one document editor instance.

scrollManager: ScrollManager
renderContext: RenderContext
configEngine: ConfigEngine
renderCoordinatorManager: RenderCoordinatorManager
stage: SceneGraph<NodeProperties>
renderStrategyManager: RenderStrategyManager<NodeProperties>
screenRenderStrategy: ScreenRenderStrategy<NodeProperties>
dirtyRenderStrategy: DirtyRenderStrategy<NodeProperties>
stickyRenderStrategy: StickyRenderStrategy<NodeProperties>
overlayRenderStrategy: OverlayRenderStrategy<NodeProperties>
propertysymbolstatic
readonly symbol: symbol

DI token for resolving DocRenderEngine.

methodgetLastScreenRenderMode
getLastScreenRenderMode(): ScreenRenderFrameMode | null

Returns the screen strategy mode used by the last render pass, if it painted.

methodinitialize
initialize(): void

Initializes DocRenderEngine.

methodinvalidateScreenCache
invalidateScreenCache(): void

Invalidates the off-screen body cache used by the screen strategy.

methodmarkDirty
markDirty(rect: PositionRect<templateLiteral>): void

Marks one document-world rectangle dirty for the next dirty pass.

rect: PositionRect<templateLiteral>
methodrender
render(node: Node<NodeProperties>): void

Runs the configured document render strategies over the current scene graph.

node: Node<NodeProperties>
methodresize
resize(width: number, height: number, scale: number): void

Resizes all Doc render layers and invalidates screen-cache reuse.

width: number
height: number
scale: number
methodsetBlockRasterCopyPlan
setBlockRasterCopyPlan(plan: BlockRasterCopyPlan | null): void

Supplies one layout-shift raster-copy plan for the next screen render pass.

plan: BlockRasterCopyPlan | null
methodsetViewport
setViewport(viewport: DocRenderViewport): void

Updates the viewport model used by subsequent render frames.

viewport: DocRenderViewport
methodsetViewScale
setViewScale(scale: number): void

Updates the view scale on every render strategy context.

scale: number
Inherited members 5

Inherited from RenderEngine.

classNoopDocCompositionProvidersource ↗
class NoopDocCompositionProvider extends DocCompositionProvider

Null provider used when no composition plugin is installed.

constructorconstructor
NoopDocCompositionProvider(): NoopDocCompositionProvider
methodmeasure
measure(_font: string): DocCompositionLayout

Measures no composing text.

_font: string
classPipelinesource ↗
class Pipeline

An observable, ordered conduit for state changes and renders.

The Pipeline is not a batch-optimisation — it is a monitoring and debugging tool. Every operation (transaction dispatch, render-only refresh, editor input, cell selection…) should be pushed through a Pipeline so that the full lifecycle is logged and traceable.

Lifecycle hooks (PipelineLifecycle) can be registered via use(). The execution engine calls these hooks at each stage, keeping the Pipeline itself decoupled from any specific logging or metrics logic.

Usage:

// A single-transaction dispatch (selection, collab, etc.)
const p = Pipeline.fromTransaction(&#39;select-cell&#39;, tx);
searCore.executePipeline(p);

// A multi-step operation (edit-exit-and-select)
const p = new Pipeline(featurePipelineName);
p.add(featureCommitStepName, cellValueTx);
p.add(featureCleanupStepName, cleanupTx);
p.addRender(featureRefreshStepName, selectionPluginKey);
p.markDirty(editorRect);
searCore.executePipeline(p);
constructorconstructor
Pipeline(name: string): Pipeline

Creates a named pipeline for diagnostics and command results.

name: string
propertydirtyRects
readonly dirtyRects: PositionRect<templateLiteral>[]

Dirty rectangles accumulated before the render phase.

propertyname
readonly name: string
propertysteps
readonly steps: PipelineStep[]

Ordered steps that will be executed by the pipeline executor.

methodadd
add(stepName: string, transaction: Transaction): this

Append a transaction step (shorthand).

stepName: string
transaction: Transaction
methodaddCustom
addCustom(stepName: string, kind: string, data?: unknown): this

Add a step handled by an executor registered by the host or an extension.

stepName: string
kind: string
data: unknown
methodaddInteraction
addInteraction(stepName: string, interaction: SheetInteractionSignal): this

Append a local interaction-state transition.

stepName: string
interaction: SheetInteractionSignal
methodaddLocalAction
addLocalAction(stepName: string, localAction: (): void): this

Append a command-owned local action step.

stepName: string
localAction: (): void
methodaddPostCommit
addPostCommit(stepName: string, postCommit: (): void): this

Append a local state publication deferred until all steps have staged successfully.

stepName: string
postCommit: (): void
methodaddPostRender
addPostRender(stepName: string, pluginKey: PluginKey): this

Schedule a visual refresh after this pipeline's normal frame has completed. Use this when a second scene update must not consume dirty regions produced by transaction-driven plugins in the same frame.

stepName: string
pluginKey: PluginKey
methodaddPreparedAction
addPreparedAction(stepName: string, prepare: (): (): void): this

Prepare an editor-local resource that is released if later staging fails.

stepName: string
prepare: (): (): void
methodaddRender
addRender(stepName: string, pluginKey: PluginKey): this

Append a render-only step for the given plugin.

stepName: string
pluginKey: PluginKey
methodaddTransaction
addTransaction(stepName: string, transaction: Transaction): this

Append a transaction step.

stepName: string
transaction: Transaction
methodemitComplete
emitComplete(rendered: boolean): void

Notify all hooks that the pipeline has completed.

rendered: boolean
methodemitStart
emitStart(): void

Notify all hooks that the pipeline is starting.

methodemitStepComplete
emitStepComplete(step: PipelineStep): void

Notify all hooks that a step has completed.

step: PipelineStep
methodemitStepStart
emitStepStart(step: PipelineStep): void

Notify all hooks that a step is starting. Provides auto-derived detail.

step: PipelineStep
methodmarkDirty
markDirty(rect: PositionRect<templateLiteral>): this

Defers a dirty rectangle until the pipeline executor reaches render.

rect: PositionRect<templateLiteral>
methoduse
use(hook: PipelineLifecycle): this

Register a lifecycle hook (middleware). Hooks fire in registration order.

hook: PipelineLifecycle
methodfromRenderstatic
fromRender(name: string, pluginKey: PluginKey): Pipeline

Creates a pipeline containing one render step for a plugin key.

name: string
pluginKey: PluginKey
methodfromTransactionstatic
fromTransaction(name: string, transaction: Transaction): Pipeline

Creates a pipeline containing one transaction step.

name: string
transaction: Transaction
classPipelineStepExecutorRegistrysource ↗
class PipelineStepExecutorRegistry

Per-container registry of Pipeline step executors.

The sheet core owns frame flushing; executors only perform their local work through PipelineStepExecutionContext. This keeps custom steps extensible without allowing them to bypass dirty-region or render-frame boundaries.

constructorconstructor
PipelineStepExecutorRegistry(): PipelineStepExecutorRegistry
propertysymbolstatic
readonly symbol: typeof symbol

DI token for resolving PipelineStepExecutorRegistry.

methodget
get(kind: string): PipelineStepExecutor | undefined

Returns the value.

kind: string
methodregister
register(executor: PipelineStepExecutor): (): void

Registers the value.

executor: PipelineStepExecutor
classSearContractViolationErrorsource ↗
class SearContractViolationError extends SearError

Error thrown when an internal assembly contract is violated.

constructorconstructor
SearContractViolationError(message: string, details?: SearErrorDetails): SearContractViolationError

Creates a SearContractViolationError instance.

message: string
details: SearErrorDetails
propertycode
readonly code: "SEAR_CONTRACT_VIOLATION"

Stable machine-readable error code.

Inherited members 9

Inherited from SearError.

classSearCoresource ↗
class SearCore<ChildType, NodeTypeProperties, RenderCoordinatorManagerType>

Platform-neutral core contract shared by sheet and document hosts.

constructorconstructor
SearCore<ChildType, NodeTypeProperties, RenderCoordinatorManagerType>(): SearCore<ChildType, NodeTypeProperties, RenderCoordinatorManagerType>
propertysymbolstatic
readonly symbol: symbol

DI token for resolving the active core implementation.

methodgetPlugin
getPlugin(pluginKey: PluginKey): unknown

Retrieves a plugin instance by plugin key.

pluginKey: PluginKey
methodregisterPlugin
registerPlugin<T>(plugin: Plugin<SearCore<ChildType, NodeTypeProperties, RenderCoordinatorManagerType>, NodeTypeProperties, T>): void

Registers a plugin with the core's plugin manager.

plugin: Plugin<SearCore<ChildType, NodeTypeProperties, RenderCoordinatorManagerType>, NodeTypeProperties, T>
classSearCoreDocsource ↗
class SearCoreDoc extends SearCore<SearCoreDoc, NodeProperties, unknown>

Stages and commits rich-document transactions for one editor runtime.

constructorconstructor
SearCoreDoc(blockManager: BlockManager, docCursorManager: DocCursorManager, docCompositionManager: DocCompositionManager, docLayoutEngine: DocLayoutEngine, pluginManager: PluginManager<SearCoreDoc, NodeProperties>, stepExecutorRegistry?: PipelineStepExecutorRegistry, runtimeLayers?: SearCoreDocRuntimeLayers): SearCoreDoc

Creates a SearCoreDoc instance.

blockManager: BlockManager
docCursorManager: DocCursorManager
docCompositionManager: DocCompositionManager
docLayoutEngine: DocLayoutEngine
pluginManager: PluginManager<SearCoreDoc, NodeProperties>
stepExecutorRegistry: PipelineStepExecutorRegistry
runtimeLayers: SearCoreDocRuntimeLayers
propertyblockManager
blockManager: BlockManager
propertyconfigEngine
configEngine: ConfigEngine<any> | null

Configuration layer used by standalone document hosts when configured by assembly.

propertyeventEngine
eventEngine: EventEngine<NodeProperties> | null

Event pipeline and hit-testing facade used by standalone document hosts.

propertypluginManager
readonly pluginManager: PluginManager<SearCoreDoc, NodeProperties>

Plugin manager for document runtime service plugins.

propertyrenderEngine
renderEngine: DocRenderEngine | null

Render engine used by standalone document hosts when configured by assembly.

propertyrenderStage
renderStage: SceneGraph<NodeProperties> | null

Scene graph used by standalone document rendering when configured by assembly.

propertypluginManagerSymbolstatic
readonly pluginManagerSymbol: symbol

DI token for resolving the Doc-owned PluginManager without colliding with Sheet managers.

propertyruntimeLayersSymbolstatic
readonly runtimeLayersSymbol: symbol

DI token for resolving the Doc runtime layers owned by this Core instance.

propertysymbolstatic
readonly symbol: symbol

DI token for resolving SearCoreDoc.

methodbindDocRenderRequestHandler
bindDocRenderRequestHandler(handler: DocRenderRequestHandler): void

Binds the document render scheduler used by hosts that execute document commands.

handler: DocRenderRequestHandler
methodclearDocRenderRequests
clearDocRenderRequests(): void

Clears diagnostic document render request history.

methoddestroy
destroy(ownerToken?: object): void

Releases standalone document runtime ownership held by Core.

ownerToken: object
methodenforceCommandBoundary
enforceCommandBoundary(isCommandExecuting: (): boolean, runWithoutMutationAuthority?: <Value>(callback: (): Value): Value): void

Permanently require command dispatch for state-changing pipelines in an assembled editor.

isCommandExecuting: (): boolean
runWithoutMutationAuthority: <Value>(callback: (): Value): Value
methodenforceTeardownBoundary
enforceTeardownBoundary(ownerToken: object): void

Reserves assembled Doc Core cleanup for its editor facade.

ownerToken: object
methodexecutePipeline
executePipeline(pipeline: Pipeline): void

Executes document command work through the shared observable Pipeline contract.

pipeline: Pipeline
methodexportSnapshot
exportSnapshot(document?: readonly RichDocNode[]): Schema[]

Exports a runtime document as the shared rich-document schema snapshot.

document: readonly RichDocNode[]
methodgetDocRenderLayoutState
getDocRenderLayoutState(): DocRenderLayoutState | null

Returns the layout state consumed by DocPlugin.render().

methodgetDocRenderRequests
getDocRenderRequests(): readonly DocRenderRequest[]

Returns a diagnostic snapshot of document render requests seen by this core.

methodgetLayoutSnapshot
getLayoutSnapshot(): LayoutSnapshot | null

Returns the latest document layout snapshot prepared by Core.

methodgetPlugin
getPlugin<T>(pluginKey: PluginKey): T | undefined

Returns the plugin.

pluginKey: PluginKey
methodgetPluginInstance
getPluginInstance(pluginKey: PluginKey): Plugin<SearCoreDoc, NodeProperties, any> | undefined

Get a plugin instance by key (for calling plugin-specific methods).

pluginKey: PluginKey
methodinitialize
initialize(): void

Initializes core-owned state, scene nodes, and runtime services.

methodloadSnapshot
loadSnapshot(snapshot: readonly Schema[]): RichDocNode[]

Loads one shared rich-document schema snapshot into this Core runtime.

snapshot: readonly Schema[]
methodmaterializeSnapshot
materializeSnapshot(snapshot: readonly Schema[]): RichDocNode[]

Converts a shared snapshot into detached runtime nodes without changing Core state.

snapshot: readonly Schema[]
methodprepareEditorRenderLayout
prepareEditorRenderLayout(input: DocEditorRenderLayoutInput): DocPreparedEditorRenderLayout

Prepares the current editable document frame through the Doc-owned layout path used by standalone document hosts and embedded editors.

input: DocEditorRenderLayoutInput
methodregisterPlugin
registerPlugin<T>(plugin: Plugin<SearCoreDoc, NodeProperties, T>): (): void

Registers the plugin.

plugin: Plugin<SearCoreDoc, NodeProperties, T>
methodrequestDocRender
requestDocRender(pluginKey?: PluginKey): void

Requests a document render for plugin-owned render nodes.

pluginKey: PluginKey
methodresolveCursorFromPoint
resolveCursorFromPoint(x: number, y: number, snapshot: LayoutSnapshot): DocCursorPos

Resolves a point inside the editable document frame to the closest document cursor position.

x: number
y: number
snapshot: LayoutSnapshot
methodsetDocRenderLayoutState
setDocRenderLayoutState(state: DocRenderLayoutState | null): void

Sets the layout state consumed by DocPlugin.render().

state: DocRenderLayoutState | null
methodstart
start(): void

Starts standalone document runtime layers after initial plugin-node construction.

methodunregisterPlugin
unregisterPlugin(pluginKey: PluginKey): void

Unregisters a plugin and removes core-owned runtime output for it.

pluginKey: PluginKey
classSearCoreSheetsource ↗
class SearCoreSheet extends SearCore<SearCoreSheet, CellProperties, SheetRenderCoordinatorManager>

Sheet-specific core runtime that coordinates plugins, data, render, events and pipeline execution.

constructorconstructor
SearCoreSheet(stage: SceneGraph<CellProperties>, pluginManager: PluginManager<SearCoreSheet, CellProperties>, dataEngine: SheetDataEngine, renderEngine: RenderEngine<CellProperties, SheetRenderCoordinatorManager>, eventEngine: EventEngine<CellProperties>, configEngine: ConfigEngine, lifecycleCoordinator: SheetLifecycleCoordinator, interactionStore: SheetInteractionStore, stepExecutorRegistry: PipelineStepExecutorRegistry, platform?: Platform): SearCoreSheet

Creates a sheet core from the DI-provided runtime services.

stage: SceneGraph<CellProperties>
pluginManager: PluginManager<SearCoreSheet, CellProperties>
dataEngine: SheetDataEngine
renderEngine: RenderEngine<CellProperties, SheetRenderCoordinatorManager>
eventEngine: EventEngine<CellProperties>
configEngine: ConfigEngine
lifecycleCoordinator: SheetLifecycleCoordinator
interactionStore: SheetInteractionStore
stepExecutorRegistry: PipelineStepExecutorRegistry
platform: Platform
propertyconfigEngine
configEngine: ConfigEngine

Configuration registry used by sheet plugins.

propertydataEngine
dataEngine: DataEngine

Data registry for plugin-owned sheet state.

propertyeventEngine
eventEngine: EventEngine<CellProperties>

Event pipeline and hit-testing facade for sheet interactions.

propertypluginManager
readonly pluginManager: PluginManager<SearCoreSheet, CellProperties>

Ordered plugin registry for this sheet runtime.

propertyrenderEngine
renderEngine: RenderEngine<CellProperties, SheetRenderCoordinatorManager>

Render pipeline facade for visible sheet scene updates.

methoddestroy
destroy(token?: object): void

Releases runtime controllers and their subscriptions owned by this sheet.

token: object
methodenforceCommandBoundary
enforceCommandBoundary(isCommandExecuting: (): boolean): void

Permanently require command dispatch for state-changing pipelines in an assembled editor.

isCommandExecuting: (): boolean
methodenforceTeardownBoundary
enforceTeardownBoundary(token: object): void

Reserves assembled runtime teardown for the owning editor facade.

token: object
methodexecutePipeline
executePipeline(pipeline: Pipeline): void

Execute a Pipeline — the single monitoring conduit for all state changes and render triggers.

Lifecycle hooks on the Pipeline emit observability events. Callers that construct a Pipeline can attach ConsolePipelineLogger explicitly when console diagnostics are desired.

pipeline: Pipeline
methodgetDataEngine
getDataEngine(): SheetDataEngine

Returns the sheet data engine with sheet-specific helpers.

methodgetPlugin
getPlugin(pluginKey: PluginKey): unknown

Returns state owned by the plugin identified by the given key.

pluginKey: PluginKey
methodgetRenderEngine
getRenderEngine(): RenderEngine<CellProperties, SheetRenderCoordinatorManager>

Returns the render engine bound to this sheet core.

methodgetStage
getStage(): SceneGraph<CellProperties>

Returns the scene graph used by render and event strategies.

methodinitialize
initialize(): void

Builds plugin state and initial scene nodes without starting runtime effects.

methodpreviewTransactionStates
previewTransactionStates(transactions: readonly Transaction<Operation>[]): ReadonlyMap<PluginKey, unknown>

Stages document transactions for a command without publishing their states.

transactions: readonly Transaction<Operation>[]
methodregisterPlugin
registerPlugin<T>(plugin: Plugin<SearCoreSheet, CellProperties, T>): void

Registers and initializes a plugin after core startup.

plugin: Plugin<SearCoreSheet, CellProperties, T>
methodrequestRender
requestRender<T>(plugin: Plugin<SearCoreSheet, CellProperties, T>): void

Convenience: wrap a render-only refresh in a Pipeline and execute it.

plugin: Plugin<SearCoreSheet, CellProperties, T>
methodstart
start(): void

Starts rendering, events, and lifecycle-owned runtime controllers.

Inherited members 1

Inherited from SearCore.

classSearDocParseErrorsource ↗
class SearDocParseError extends SearError

Error thrown when document input cannot be parsed.

constructorconstructor
SearDocParseError(message: string, details?: SearErrorDetails): SearDocParseError

Creates a SearDocParseError instance.

message: string
details: SearErrorDetails
propertycode
readonly code: "SEAR_DOC_PARSE"

Stable machine-readable error code.

Inherited members 9

Inherited from SearError.

classSearLifecycleErrorsource ↗
class SearLifecycleError extends SearError

Error thrown for invalid sheet lifecycle transitions.

constructorconstructor
SearLifecycleError(operation: string, state: string, message?: string): SearLifecycleError

Creates a SearLifecycleError instance.

operation: string
state: string
message: string
propertycode
readonly code: "SEAR_LIFECYCLE_INVALID_STATE"

Stable machine-readable error code.

Inherited members 9

Inherited from SearError.

classSearPipelineStepExecutorNotFoundErrorsource ↗
class SearPipelineStepExecutorNotFoundError extends SearError

Error thrown when a pipeline step kind has no registered executor.

constructorconstructor
SearPipelineStepExecutorNotFoundError(kind: string): SearPipelineStepExecutorNotFoundError

Creates a SearPipelineStepExecutorNotFoundError instance.

kind: string
propertycode
readonly code: "SEAR_PIPELINE_STEP_EXECUTOR_NOT_FOUND"

Stable machine-readable error code.

Inherited members 9

Inherited from SearError.

classSearRegistryConflictErrorsource ↗
class SearRegistryConflictError extends SearError

Error thrown when a registry key is registered more than once.

constructorconstructor
SearRegistryConflictError(registry: string, key: string, message?: string): SearRegistryConflictError

Creates a SearRegistryConflictError instance.

registry: string
key: string
message: string
propertycode
readonly code: "SEAR_REGISTRY_CONFLICT"

Stable machine-readable error code.

Inherited members 9

Inherited from SearError.

classSearRegistryEntryNotFoundErrorsource ↗
class SearRegistryEntryNotFoundError extends SearError

Error thrown when a required registry entry is missing.

constructorconstructor
SearRegistryEntryNotFoundError(registry: string, key: string, message?: string): SearRegistryEntryNotFoundError

Creates a SearRegistryEntryNotFoundError instance.

registry: string
key: string
message: string
propertycode
readonly code: "SEAR_REGISTRY_ENTRY_NOT_FOUND"

Stable machine-readable error code.

Inherited members 9

Inherited from SearError.

classSheetInteractionReducerRegistrysource ↗
class SheetInteractionReducerRegistry

Extensible dispatch table for local interaction-state transitions.

constructorconstructor
SheetInteractionReducerRegistry(): SheetInteractionReducerRegistry
propertysymbolstatic
readonly symbol: typeof symbol

DI token for resolving SheetInteractionReducerRegistry.

methodget
get(type: string): SheetInteractionReducer | undefined

Returns the value.

type: string
methodregister
register(reducer: SheetInteractionReducer): (): void

Registers the value.

reducer: SheetInteractionReducer
classSheetInteractionStoresource ↗
class SheetInteractionStore

Per-sheet, local-only interaction state. It deliberately does not use OT: these transitions are view/session concerns and must never be synchronized.

constructorconstructor
SheetInteractionStore(reducers: SheetInteractionReducerRegistry, platform?: Platform): SheetInteractionStore

Creates a SheetInteractionStore instance.

reducers: SheetInteractionReducerRegistry
platform: Platform
propertysymbolstatic
readonly symbol: typeof symbol

DI token for resolving SheetInteractionStore.

methodapply
apply(signal: SheetInteractionSignal): void

Applies a transaction to SheetInteractionStore state.

signal: SheetInteractionSignal
methodcommit
commit(state: SheetInteractionState, signals: readonly SheetInteractionSignal[]): void

Publishes a previously staged interaction state after pipeline commit.

state: SheetInteractionState

Final interaction state to make visible.

signals: readonly SheetInteractionSignal[]

Ordered signals to deliver to subscribers.

methodenforceCommandBoundary
enforceCommandBoundary(isCommandExecuting: (): boolean, runWithoutMutationAuthority?: <Value>(callback: (): Value): Value): void

Requires an editor command for every assembled interaction-state commit.

isCommandExecuting: (): boolean
runWithoutMutationAuthority: <Value>(callback: (): Value): Value
methodgetState
getState(): Readonly<SheetInteractionState>

Returns the state.

methodreduce
reduce(state: Readonly<SheetInteractionState>, signal: SheetInteractionSignal): SheetInteractionState

Reduces a signal without publishing it or changing the stored state. Pipeline execution uses this to stage interaction transitions until every other step has succeeded.

ReturnsThe prospective interaction state.

state: Readonly<SheetInteractionState>

Interaction state visible before the signal.

signal: SheetInteractionSignal

Local interaction transition to reduce.

methodsubscribe
subscribe(listener: (state: Readonly<SheetInteractionState>, signal: SheetInteractionSignal): void): (): void

Subscribes to state changes and returns an idempotent disposer.

listener: (state: Readonly<SheetInteractionState>, signal: SheetInteractionSignal): void
classSheetLifecycleCoordinatorsource ↗
class SheetLifecycleCoordinator

Starts and disposes the runtime controllers owned by one sheet instance.

constructorconstructor
SheetLifecycleCoordinator(): SheetLifecycleCoordinator
propertysymbolstatic
readonly symbol: typeof symbol

DI token for resolving SheetLifecycleCoordinator.

methodbeginTeardown
beginTeardown(token: object): void

Permits cleanup only for the owning editor.

token: object
methoddestroy
destroy(): void

Releases resources owned by SheetLifecycleCoordinator.

methodenforceCommandBoundary
enforceCommandBoundary(assertCommandWrite: (): void, teardownToken: object): void

Closes runtime registration after editor assembly.

assertCommandWrite: (): void
teardownToken: object
methodregister
register(controller: SheetLifecycleController): (): void

Adds a controller. Controllers registered after startup begin immediately, so applications can add lifecycle behavior without changing SearCoreSheet.

controller: SheetLifecycleController
methodstart
start(context: SheetLifecycleContext): void

Starts SheetLifecycleCoordinator.

context: SheetLifecycleContext
classSheetMatrixsource ↗
class SheetMatrix extends CSRMatrix<CellMatrixElement>

SheetMatrix public API.

constructorconstructor
SheetMatrix(data?: { data: CellMatrixElement[]; indices: number[]; indptr: number[] }, shape?: [number, number]): SheetMatrix

Constructs a CSRMatrix instance.

data: { data: CellMatrixElement[]; indices: number[]; indptr: number[] }

The data for the matrix.

shape: [number, number]

The shape of the matrix as [numRows, numCols].

methodclone
clone(): this

Copies stored cell payloads as well as sparse indexes.

Inherited members 34

Inherited from CSRMatrix.

classSheetViewportResizeControllersource ↗
class SheetViewportResizeController extends SheetLifecycleController

Keeps rendering, scrolling, and viewport-culled plugin nodes in sync with viewport size.

constructorconstructor
SheetViewportResizeController(subscriptionManager: SubscriptionManager): SheetViewportResizeController

Creates a SheetViewportResizeController instance.

subscriptionManager: SubscriptionManager
propertysymbolstatic
readonly symbol: typeof symbol

DI token for resolving SheetViewportResizeController.

methodapplyViewportResize
applyViewportResize(width: number, height: number): void

Applies a resize inside the command dispatched by the owning editor.

width: number
height: number
methoddestroy
destroy(): void

Releases resources owned by SheetViewportResizeController.

methodsetResizeExecutor
setResizeExecutor(executor: (size: { height: number; width: number }): void): void

Routes platform resize notifications through the owning editor's command bus.

executor: (size: { height: number; width: number }): void
methodstart
start(context: SheetLifecycleContext): void

Starts SheetViewportResizeController.

context: SheetLifecycleContext
interfaceCellMatrixElementsource ↗
interface CellMatrixElement

Persisted cell payload stored in the sheet matrix.

propertyformula
formula?: string

Formula source text for formula cells; calculated results live in formula plugin state.

propertyformulaEvaluationMode
formulaEvaluationMode?: "dynamic" | "legacy"

Array evaluation mode used when the formula was entered.

propertytype
type: string

Cell type identifier owned by the cell type catalog.

propertyvalue
value?: unknown

Raw value whose shape is owned by the cell type.

interfaceCursorRenderInfosource ↗
interface CursorRenderInfo

Pre-computed pixel cursor state set by document layout before each render.

propertyheight
height: number

Line height in pixels (used to size the cursor bar).

propertyvisible
visible: boolean

Whether the cursor bar is currently visible (blink phase).

propertyx
x: number

Absolute canvas X for the committed text caret.

propertyy
y: number

Absolute canvas Y for the laid-out line that owns the cursor.

interfaceDocCompositionLayoutsource ↗
interface DocCompositionLayout

Layout contribution from an in-flight IME composition.

propertyactive
readonly active: boolean

Whether there is active composing text to render.

propertycaretPixelOffset
readonly caretPixelOffset: number

Pixel offset from the composing-text start to the IME caret.

propertytext
readonly text: string

Current in-flight composing text.

propertytextWidth
readonly textWidth: number

Full composing text width in pixels.

interfaceDocCompositionProvidersource ↗
interface DocCompositionProvider

Provider used by layout code to account for optional IME composition.

methodmeasure
measure(font: string): DocCompositionLayout

Measures the active composing text against the current render font.

font: string
interfaceDocEditorRenderLayoutInputsource ↗
interface DocEditorRenderLayoutInput

Input used by SearCoreDoc to initialize one editable document frame.

propertycompositionProvider
readonly compositionProvider?: DocCompositionProvider

Optional IME composition provider installed by a feature plugin or embedded host.

propertycursorVisible
readonly cursorVisible?: boolean

Whether the transient text cursor should be visible in this frame.

propertydocument
readonly document: RichDocNode[]

Rich-document content to lay out and render.

propertyfitContentWidth
readonly fitContentWidth?: boolean

Whether the editable frame may grow horizontally to fit unwrapped content.

propertyfont
readonly font?: string

Font descriptor used by the text shaper for this layout.

propertyminContentWidth
readonly minContentWidth?: number

Optional minimum width needed to preserve pre-edit overflow sizing.

propertyminHeight
readonly minHeight: number

Minimum editor height supplied by the host surface.

propertyminWidth
readonly minWidth: number

Minimum editor width supplied by the host surface.

propertyorigin
readonly origin: Pick<PositionRectProps, "x" | "y">

Editor origin in world coordinates.

propertypadding
readonly padding?: number

Padding inside the editable frame.

propertyselection
readonly selection: DocSelection

Current document selection.

propertyverticalAlign
readonly verticalAlign?: DocVerticalAlign

Vertical positioning inside the editable frame. Defaults to center for embedded cell editors.

interfaceDocImmediateRenderPainterContentInputsource ↗
interface DocImmediateRenderPainterContentInput

Input for immediate rendering of laid-out document content lines.

propertyblockIndexes
readonly blockIndexes?: readonly number[]

Optional block indexes to draw; omitted means all blocks.

propertyclipRect
readonly clipRect?: PositionRect<templateLiteral>

Optional world-coordinate clipping rectangle.

propertyfont
readonly font?: string

Base font selected by the host for this document frame.

propertyorigin
readonly origin: Pick<PositionRectProps, "x" | "y">

Content origin in world coordinates.

propertysnapshot
readonly snapshot: LayoutSnapshot

Layout snapshot whose lines are relative to the content origin.

interfaceDocInputDispatchResultsource ↗
interface DocInputDispatchResult

Result of applying one domain input command to the active document input session.

propertycontentChanged
readonly contentChanged: boolean

Whether the command produced document OT operations.

propertyselection
readonly selection: DocSelection

Selection after all command steps have been applied and mapped.

propertyselectionOnly
readonly selectionOnly: boolean

Whether the command only changed selection/caret state.

interfaceDocInputStatesource ↗
interface DocInputState

State for an active rich-document input session.

propertydocSelection
docSelection: DocSelection

Current rich-document selection.

propertypendingDoc
pendingDoc: RichDocNode[]

Pending document content owned by the current edit session.

propertypreferredX
preferredX: number | null

Preferred x-position for repeated vertical cursor movement.

interfaceDocPreparedEditorRenderLayoutsource ↗
interface DocPreparedEditorRenderLayout

Doc-owned layout result consumed by host render surfaces.

propertycomposingCaretPixelOffset
readonly composingCaretPixelOffset: number

Pixel offset from composing-text start to the IME caret.

propertycontentWidth
readonly contentWidth: number

Width available to document content after padding.

propertycursorRelative
readonly cursorRelative: { height: number; x: number; y: number }

Cursor point relative to the editor frame.

propertypositionRect
readonly positionRect: PositionRectProps

Final editor frame in world coordinates.

propertysnapshot
readonly snapshot: LayoutSnapshot

Layout snapshot owned by the Doc input/render session.

interfaceDocRenderLayoutStatesource ↗
interface DocRenderLayoutState

Layout and viewport state exposed to document plugins during render().

propertyblockLayoutDiff
readonly blockLayoutDiff: DocBlockLayoutDiff

Block-level diff between the previous and current layout caches.

propertyblockRender
readonly blockRender?: DocBlockRenderDebugSnapshot

Debug and performance stats for the most recent block-render frame.

propertycontentRect
readonly contentRect: PositionRectProps

Editable content rectangle in viewport coordinates.

propertydocumentRect
readonly documentRect: PositionRectProps

Current document layout rectangle in world coordinates.

propertyfont
readonly font: string

Font selected by the host for this document render layout.

propertylayoutCache
readonly layoutCache: DocLayoutCache

Latest full-document layout cache.

propertyscroll
readonly scroll: { x: number; y: number }

Current viewport scroll offset.

propertyviewport
readonly viewport: { height: number; width: number }

Visible viewport dimensions.

propertyvisibleBlocks
readonly visibleBlocks: readonly DocBlockLayout[]

Laid-out blocks selected for the current viewport.

interfaceDocRenderOperationsource ↗
interface DocRenderOperation

Render-facing operation derived from a RichDoc OT operation.

propertyot
readonly ot: RichDocOTOperation
propertytype
readonly type: DocTransactionRenderOperationType
interfaceDocRenderRequestsource ↗
interface DocRenderRequest

One queued render request targeting plugin-owned document render nodes.

propertyrenderOperations
readonly renderOperations?: DocRenderOperations

Render-facing operations derived from committed RichDoc OT, or null when they cannot be converted safely.

propertyrenderPluginKey
readonly renderPluginKey?: PluginKey

Plugin whose render nodes should be refreshed. Omitted means every document plugin may refresh.

interfaceDocRenderViewportsource ↗
interface DocRenderViewport

Snapshot of the current document viewport used by render strategies.

propertycontentRect
readonly contentRect: PositionRectProps

Editable content rectangle inside the viewport.

propertyheight
readonly height: number

Visible viewport height in host-view units.

propertywidth
readonly width: number

Visible viewport width in host-view units.

interfacePipelineLifecyclesource ↗
interface PipelineLifecycle

Observer hooks emitted while a pipeline executes.

methodonComplete
onComplete(pipeline: Pipeline, rendered: boolean): void

Pipeline finished (all steps + render).

pipeline: Pipeline
rendered: boolean
methodonStart
onStart(pipeline: Pipeline): void

Pipeline begins execution.

pipeline: Pipeline
methodonStepComplete
onStepComplete(step: PipelineStep, pipeline: Pipeline): void

A single step has finished executing.

step: PipelineStep
pipeline: Pipeline
methodonStepStart
onStepStart(step: PipelineStep, pipeline: Pipeline, detail: string): void

A single step is about to execute. Receives auto-derived detail.

step: PipelineStep
pipeline: Pipeline
detail: string
interfacePipelineStepsource ↗
interface PipelineStep

One ordered unit of work inside a pipeline.

propertydata
data?: unknown

Extension-owned payload for a custom step executor.

propertyinteraction
interaction?: SheetInteractionSignal

Local interaction transition for interaction steps.

propertykind
kind: string

Built-in or extension-provided executor key.

propertylocalAction
localAction?: (): void

Command-owned action for local-action steps.

propertyname
name: string

Human-readable step name used by diagnostics.

propertypostCommit
postCommit?: (): void

Deferred local state publication after document and interaction commits.

propertyprepare
prepare?: (): (): void

Local preparation that returns its rollback action.

propertyrenderPluginKey
renderPluginKey?: PluginKey

Plugin key to re-render for render steps.

propertytransaction
transaction?: Transaction<Operation>

Transaction payload for transaction steps.

interfacePipelineStepExecutionContextsource ↗
interface PipelineStepExecutionContext

Effects an executor may request without taking ownership of frame flushing.

methodapplyInteraction
applyInteraction(step: PipelineStep): void
step: PipelineStep
methodexecuteTransaction
executeTransaction(step: PipelineStep): void
step: PipelineStep
methodmarkDirty
markDirty(rect: PositionRect<templateLiteral>): void
rect: PositionRect<templateLiteral>
methodprepareLocalAction
prepareLocalAction(step: PipelineStep): void
step: PipelineStep
methodrenderPlugin
renderPlugin(step: PipelineStep): void
step: PipelineStep
methodrunLocalAction
runLocalAction(step: PipelineStep): void
step: PipelineStep
methodschedulePostCommit
schedulePostCommit(step: PipelineStep): void
step: PipelineStep
methodschedulePostRender
schedulePostRender(step: PipelineStep): void
step: PipelineStep
interfacePipelineStepExecutorsource ↗
interface PipelineStepExecutor

Handles one extensible Pipeline step kind.

propertykind
readonly kind: string
methodexecute
execute(context: PipelineStepExecutionContext, step: PipelineStep): void
context: PipelineStepExecutionContext
step: PipelineStep
interfaceSearCoreDocRuntimeLayerssource ↗
interface SearCoreDocRuntimeLayers

Runtime layers owned by one SearCoreDoc instance.

propertyconfigEngine
readonly configEngine?: ConfigEngine<any> | null

Configuration layer used by standalone document hosts.

propertyeventEngine
readonly eventEngine?: EventEngine<NodeProperties> | null

Event pipeline and hit-testing facade used by standalone document hosts.

propertyplatform
readonly platform?: Platform | null

Platform diagnostics adapter used by document core guard clauses.

propertyrenderEngine
readonly renderEngine?: DocRenderEngine | null

Render engine used by standalone document hosts.

propertyrenderStage
readonly renderStage?: SceneGraph<NodeProperties> | null

Scene graph used by standalone document rendering.

interfaceSelectionRectsource ↗
interface SelectionRect

A single selection highlight rectangle in canvas coordinates.

propertyheight
height: number
propertywidth
width: number
propertyx
x: number
propertyy
y: number
interfaceSheetEditSessionsource ↗
interface SheetEditSession

Public contract for SheetEditSession.

propertyeditor
editor: string
propertytarget
target: readonly [number, number]
interfaceSheetInteractionReducersource ↗
interface SheetInteractionReducer

Reduces one local interaction signal into the per-sheet interaction state.

propertytype
readonly type: string
methodreduce
reduce(state: Readonly<SheetInteractionState>, signal: SheetInteractionSignal): SheetInteractionState
state: Readonly<SheetInteractionState>
signal: SheetInteractionSignal
interfaceSheetInteractionSignalsource ↗
interface SheetInteractionSignal

A local interaction event. Event names and payloads are owned by the feature that publishes and reduces them; Core only routes the event.

propertytype
type: string
interfaceSheetInteractionStatesource ↗
interface SheetInteractionState

Public contract for SheetInteractionState.

propertyeditSession
editSession: SheetEditSession | null
propertyselection
selection: { anchor: readonly [number, number]; focus: readonly [number, number]; source: string } | null
propertyselectionRevision
selectionRevision: number

Increments for every explicit selection transition.

propertysuppressedSelectionRevision
suppressedSelectionRevision: number | null

The selection revision consumed when the current/last edit session began.

interfaceSheetLifecycleContextsource ↗
interface SheetLifecycleContext

Shared context supplied to lifecycle controllers for one sheet instance.

propertycore
readonly core: SearCoreSheet
methodrefreshSheetBoundaries
refreshSheetBoundaries(): void
interfaceSheetLifecycleControllersource ↗
interface SheetLifecycleController

A startable and disposable runtime concern owned by a sheet instance.

methoddestroy
destroy(): void
methodstart
start(context: SheetLifecycleContext): void
context: SheetLifecycleContext
typeDocRenderDirtyBlockIdssource ↗
type DocRenderDirtyBlockIds = ReadonlySet<DocNodeId> | null

Dirty block ids extracted from document render operations, or null when reflow cannot be localized safely.

typeDocRenderOperationssource ↗
type DocRenderOperations = readonly DocRenderOperation[] | null

Render operations derived from document transactions, or null when they cannot be converted safely.

typeDocRenderRequestHandlersource ↗
type DocRenderRequestHandler = (requests: readonly DocRenderRequest[]): void

Function that handles committed document render requests.

variableDocInputTransactionMetasource ↗
DocInputTransactionMeta: { PreferredX: "docInput.preferredX"; RenderOperation: "docInput.renderOperation"; ReplaceSelection: "docInput.replaceSelection"; SelectionOnly: "docInput.selectionOnly"; Steps: "docInput.steps" }

Transaction metadata key containing selection mapping for DocInputPlugin.

variableSearAssemblyErrorCodesource ↗
SearAssemblyErrorCode: { contractViolation: "SEAR_CONTRACT_VIOLATION"; docParse: "SEAR_DOC_PARSE"; lifecycleInvalidState: "SEAR_LIFECYCLE_INVALID_STATE"; pipelineStepExecutorNotFound: "SEAR_PIPELINE_STEP_EXECUTOR_NOT_FOUND"; registryConflict: "SEAR_REGISTRY_CONFLICT"; registryEntryNotFound: "SEAR_REGISTRY_ENTRY_NOT_FOUND" }

Stable machine-readable error codes owned by assembly packages.

functioncollectDocReflowBlockIdssource ↗
collectDocReflowBlockIds(renderOperations: DocRenderOperations, document: readonly RichDocNode[]): DocRenderDirtyBlockIds

Collects blocks whose layout cache must be refreshed for reflow operations.

renderOperations: DocRenderOperations
document: readonly RichDocNode[]
functioncollectDocRenderOperationssource ↗
collectDocRenderOperations(transactions: readonly Transaction<Operation>[]): DocRenderOperations

Collects render operations derived from committed RichDoc OT transactions.

transactions: readonly Transaction<Operation>[]
functioncollectDocRepaintBlockIdssource ↗
collectDocRepaintBlockIds(renderOperations: DocRenderOperations, document: readonly RichDocNode[]): ReadonlySet<DocNodeId>

Collects blocks whose render nodes must be repainted without invalidating layout cache.

renderOperations: DocRenderOperations
document: readonly RichDocNode[]
functiongetActiveCommandIdsource ↗
getActiveCommandId(): string | null
functiongetCommandObserverEpochsource ↗
getCommandObserverEpoch(): number

Identifies the active observer scope so an older command cannot lend it write authority.

functionisInsideCommandExecutionsource ↗
isInsideCommandExecution(): boolean
functionlockCommittedSheetStatesource ↗
lockCommittedSheetState(state: unknown): void

Locks document-owned state after initialization or a successful transaction commit.

state: unknown
functionrunInsideCommandExecutionsource ↗
runInsideCommandExecution<T>(commandId: string, callback: CommandExecutionCallback<T>): T
commandId: string
callback: CommandExecutionCallback<T>
functionrunOutsideCommandExecutionsource ↗
runOutsideCommandExecution<T>(callback: CommandExecutionCallback<T>): T

Runs observers without inheriting the enclosing command's mutation authority.

callback: CommandExecutionCallback<T>
functionwarnIfOutsideCommandExecutionsource ↗
warnIfOutsideCommandExecution(operationName: string, warn?: CommandExecutionWarningReporter): void
operationName: string
warn: CommandExecutionWarningReporter
functionwarnIfSyntheticCommandDefinitionsource ↗
warnIfSyntheticCommandDefinition(busName: string, commandId: string, warn?: CommandExecutionWarningReporter): void
busName: string
commandId: string
warn: CommandExecutionWarningReporter