API reference
@searsuite/sear-assembly-commands
Typed command definitions and transaction factories shared by editor composition roots.
79 exportsderived from source
Concept 1
Commands are the mutation boundary
A host or input handler requests a change by running a feature-owned command. The command definition identifies the operation; the registered handler builds the state owner's operations. The Sheet core stages those operations and commits them as one change. Rendering and observers then see the committed result rather than a partial step.
SheetCommandDispatcher and DocCommandBus are dispatch contracts, not alternate state stores. Use the typed
command exported by the feature that owns the behavior. For selection, SelectRangeCommand changes the selected
range and GetSelection reads it afterward.
Use when: changing editor state from application code or wiring a host event. Read-only questions belong to a query; ongoing notifications belong to observations. Neither should mutate committed state.
Concept 2
What happens after a command runs
A command can stage several owner-specific operations in one pipeline. If preparation or staging fails, the transaction does not publish a partial document. Successful commits advance history and collaboration through the owning feature's adapters; local interaction and render updates follow the commit boundary.
Command definitions, transaction factories, and handlers work together: definitions provide typed inputs and results, handlers decide which operations to make, and state owners define how those operations change their own data. This is why an optional plugin can add a command without expanding a central command switch.
- classDocCommandBussource ↗
-
class DocCommandBusThe supported execution entry point for document user and program actions.
constructorconstructor DocCommandBus(platform?: Platform): DocCommandBusCreates a command bus that reports boundary diagnostics through the host platform.
platform: Platform
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving the command bus bound to one document editor instance.
methodbind bind(context: DocCommandContext): voidBinds the command bus to the runtime services for one editor instance.
context: DocCommandContext
methoddestroy destroy(): voidClears editor binding, listeners, and command registrations during teardown.
methodenforceRegistrationBoundary enforceRegistrationBoundary(assertWrite: (): void): voidCloses setup-time command registration after the editor is assembled.
assertWrite: (): void
methodgetRegisteredCommandIds getRegisteredCommandIds(): readonly string[]Returns a stable snapshot of all document commands exposed by this editor instance.
methodgetRegisteredCommands getRegisteredCommands(): readonly DocCommandDefinition<unknown, DocCommandResult>[]Returns the typed definitions registered on this editor instance.
methodhas has(definition: string | DocCommandDefinition<unknown, DocCommandResult>): booleanReturns whether this editor instance currently exposes a document command id.
definition: string | DocCommandDefinition<unknown, DocCommandResult>
methodisExecuting isExecuting(): booleanWhether this editor's command bus is currently dispatching a command.
methodregister register<Definition>(definition: Definition, factory: DocCommandFactory<Definition>): (): voidRegisters one feature-owned command factory. The returned function must be called by lifecycle cleanup when a feature registers dynamically.
definition: Definitionfactory: DocCommandFactory<Definition>
methodrun run<Definition>(definition: Definition, input: DocCommandInput<Definition>): DocCommandDefinitionResult<Definition>Executes a registered command through its feature-owned typed definition.
definition: Definitioninput: DocCommandInput<Definition>
methodrunWithoutMutationAuthority runWithoutMutationAuthority<Value>(callback: (): Value): ValueInvokes external observers without inheriting this editor's command write authority.
callback: (): Value
methodsubscribe subscribe(listener: DocCommandListener): (): voidSubscribes to document command lifecycle events and returns an unsubscribe function.
listener: DocCommandListener
- classDocCommandDispatchersource ↗
-
class DocCommandDispatcherExecutes document command objects against one command context.
constructorconstructor DocCommandDispatcher(): DocCommandDispatchermethodexecute execute<Result>(context: DocCommandContext, command: DocEditorCommand<Result>): ResultRuns a command, validates its result and applies its operation/effects.
context: DocCommandContextcommand: DocEditorCommand<Result>
- classEffectCommandsource ↗
-
class EffectCommand extends SheetCommand<SheetCommandResult>Command that emits local effects without mutating OT state.
constructorconstructor EffectCommand(effects: readonly SheetCommandEffect[]): EffectCommandCreates an effect-only command.
effects: readonly SheetCommandEffect[]
propertyid readonly id: "effect.apply"Stable id for effect-only command execution.
methodexecute execute(_context: SheetCommandContext): SheetCommandResultReturns an empty pipeline plus the local effects to apply.
_context: SheetCommandContext
- classLocalActionCommandsource ↗
-
class LocalActionCommand extends SheetCommand<SheetCommandResult>Runs a local, command-owned action that does not produce an OT transaction.
constructorconstructor LocalActionCommand(id: string, run: (): void): LocalActionCommandCreates a command that schedules one local action in a pipeline.
id: stringrun: (): void
propertyid readonly id: stringStable, domain-owned command identifier for observability and automation.
methodexecute execute(_context: SheetCommandContext): SheetCommandResultReturns a pipeline containing only the local action step.
_context: SheetCommandContext
- classPipelineExecutionCommandsource ↗
-
class PipelineExecutionCommand extends SheetCommand<SheetCommandResult>Executes a complete, named pipeline through the command bus.
constructorconstructor PipelineExecutionCommand(id: string, pipeline: Pipeline): PipelineExecutionCommandCreates a command around an existing named pipeline.
id: stringpipeline: Pipeline
propertyid readonly id: stringStable, domain-owned command identifier for observability and automation.
methodexecute execute(_context: SheetCommandContext): SheetCommandResultReturns the provided pipeline unchanged.
_context: SheetCommandContext
- classSheetAxisMoveBoundsErrorsource ↗
-
class SheetAxisMoveBoundsError extends SearErrorA requested block or insertion boundary falls outside its axis.
constructorconstructor SheetAxisMoveBoundsError(input: SheetMoveAxisInput, size: number): SheetAxisMoveBoundsErrorinput: SheetMoveAxisInputsize: number
propertycode readonly code: "SHEET_AXIS_MOVE_BOUNDS"Stable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classSheetCommandBussource ↗
-
class SheetCommandBusThe only supported execution entry point for sheet user and program actions. Hosts bind it to one editor instance after the Core has been created.
constructorconstructor SheetCommandBus(platform?: Platform): SheetCommandBusCreates a command bus that reports boundary diagnostics through the host platform.
platform: Platform
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving the command bus bound to one editor instance.
methodbind bind(context: SheetCommandContext): voidBinds the command bus to the runtime services for one editor instance.
context: SheetCommandContext
methoddestroy destroy(): voidClears editor binding, listeners and command registrations during teardown.
methodenforceRegistrationBoundary enforceRegistrationBoundary(assertWrite: (): void): voidCloses setup-time command registration after the editor is assembled.
assertWrite: (): void
methodgetRegisteredCommandIds getRegisteredCommandIds(): readonly string[]Returns a stable snapshot of all commands exposed by this editor instance.
methodgetRegisteredCommands getRegisteredCommands(): readonly SheetCommandDefinition<unknown, SheetCommandResult>[]Returns the typed definitions registered on this editor instance.
methodhas has(definition: string | SheetCommandDefinition<unknown, SheetCommandResult>): booleanReturns whether this editor instance currently exposes a command id.
definition: string | SheetCommandDefinition<unknown, SheetCommandResult>
methodisExecuting isExecuting(): booleanWhether this editor's command bus is currently dispatching a command.
methodregister register<Definition>(definition: Definition, factory: SheetCommandFactory<Definition>): (): voidRegisters one feature-owned command factory. The returned function must be called by the feature's lifecycle cleanup when it registers dynamically.
definition: Definitionfactory: SheetCommandFactory<Definition>
methodrun run<Definition>(definition: Definition, input: SheetCommandInput<Definition>): SheetCommandDefinitionResult<Definition>Executes a registered command through its feature-owned typed definition.
definition: Definitioninput: SheetCommandInput<Definition>
methodrunWithoutMutationAuthority runWithoutMutationAuthority<Value>(callback: (): Value): ValueInvokes external observers without inheriting this editor's command write authority.
callback: (): Value
methodsubscribe subscribe(listener: SheetCommandListener): (): voidSubscribes to command lifecycle events and returns an unsubscribe function.
listener: SheetCommandListener
- classSheetCommandDispatchersource ↗
-
class SheetCommandDispatcherExecutes command objects against one command context.
constructorconstructor SheetCommandDispatcher(): SheetCommandDispatchermethodexecute execute<Result>(context: SheetCommandContext, command: SheetCommand<Result>): ResultRuns a command, validates its result and applies its pipeline/effects.
context: SheetCommandContextcommand: SheetCommand<Result>
- classSheetQueryRegistrysource ↗
-
class SheetQueryRegistryEditor-local registry for typed, side-effect-free sheet queries.
constructorconstructor SheetQueryRegistry(): SheetQueryRegistrypropertysymbolstatic readonly symbol: typeof symbolmethoddestroy destroy(): voidmethodenforceWriteBoundary enforceWriteBoundary(assertWrite: (): void): voidRequires editor command dispatch for registration changes after assembly.
assertWrite: (): void
methodgetRegisteredQueryIds getRegisteredQueryIds(): readonly string[]methodhas has(definition: string | SheetQueryDefinition<unknown, unknown>): booleandefinition: string | SheetQueryDefinition<unknown, unknown>
methodregister register<Definition>(definition: Definition, handler: SheetQueryHandler<SheetQueryInput<Definition>, SheetQueryResult<Definition>>): (): voiddefinition: Definitionhandler: SheetQueryHandler<SheetQueryInput<Definition>, SheetQueryResult<Definition>>
methodrun run<Definition>(definition: Definition, input: SheetQueryInput<Definition>): SheetQueryResult<Definition>definition: Definitioninput: SheetQueryInput<Definition>
- classTransactionPipelineCommandsource ↗
-
class TransactionPipelineCommand extends SheetCommand<SheetCommandResult>Executes an already-created transaction through the pipeline command boundary.
constructorconstructor TransactionPipelineCommand(id: string, transaction: Transaction): TransactionPipelineCommandCreates a command around an existing transaction.
id: stringtransaction: Transaction
propertyid readonly id: stringStable, domain-owned command identifier for observability and automation.
methodexecute execute(_context: SheetCommandContext): SheetCommandResultConverts the provided transaction into a pipeline result.
_context: SheetCommandContext
- interfaceDocCommandContextsource ↗
-
interface DocCommandContextRuntime services exposed to document commands while they execute.
methodapplyEffect applyEffect(effect: DocCommandEffect): voidApplies a local UI/runtime effect after the operation has been committed.
effect: DocCommandEffect
methodexecutePipeline executePipeline(pipeline: Pipeline): voidExecutes command-owned work through the document core's shared pipeline boundary. Implementations commit document state before rendering.
pipeline: Pipeline
- interfaceDocCommandDefinitionsource ↗
-
interface DocCommandDefinition<Input, Result>A stable document command identifier carrying its input and result contract.
property[docCommandInputType] readonly [docCommandInputType]: InputPhantom field that preserves the command input type for callers.
property[docCommandResultType] readonly [docCommandResultType]: ResultPhantom field that preserves the command result type for callers.
propertyid readonly id: stringGlobally stable command id owned by the document feature package that defines it.
- interfaceDocCommandEventsource ↗
-
interface DocCommandEventLifecycle event emitted by the document command bus for diagnostics and host UI.
propertyerror readonly error?: unknownOriginal thrown value when the command failed.
propertyid readonly id: stringStable command id being executed.
propertyphase readonly phase: CommandExecutionPhaseExecution phase represented by this event.
propertyresult readonly result?: DocCommandResultResult returned by a completed command.
- interfaceDocCommandResultsource ↗
-
interface DocCommandResultStandard command result that document Core can execute and observe.
- interfaceDocEditorCommandsource ↗
-
interface DocEditorCommand<Result>Executable unit behind a typed document command definition.
- interfaceExtendSelectionCommandInputsource ↗
-
interface ExtendSelectionCommandInputInput required to extend a sheet selection by keyboard navigation.
propertycursor readonly cursor: SelectionPointCurrent moving edge before this navigation step.
propertydirection readonly direction: SelectionMoveDirectionDirection requested by the user.
propertyfindMerge readonly findMerge: (point: SelectionPoint): { end: SelectionPoint; start: SelectionPoint } | undefinedLookup for merged ranges that should be selected as a whole.
propertyjumpToEdge readonly jumpToEdge?: booleanWhether navigation should jump to the sheet edge.
propertylastCol readonly lastCol: numberLast valid column index.
propertylastRow readonly lastRow: numberLast valid row index.
propertyorigin readonly origin: SelectionPointFixed selection anchor where extension began.
- interfaceMoveSelectionCommandInputsource ↗
-
interface MoveSelectionCommandInputPublic contract for MoveSelectionCommandInput.
propertydirection readonly direction: SelectionMoveDirectionpropertyfindMerge readonly findMerge: (point: SheetPoint): SheetMergedCellRange | undefinedpropertyfocus readonly focus: SheetPointpropertyjumpToEdge readonly jumpToEdge?: booleanpropertylastCol readonly lastCol: numberpropertylastRow readonly lastRow: number - interfaceMoveSelectionCommandResultsource ↗
-
interface MoveSelectionCommandResultPublic contract for MoveSelectionCommandResult.
- interfaceSelectRangeCommandInputsource ↗
-
interface SelectRangeCommandInputPublic contract for SelectRangeCommandInput.
- interfaceSelectRangeCommandResultsource ↗
-
interface SelectRangeCommandResultPublic contract for SelectRangeCommandResult.
- interfaceSheetClearRangeContentsCommandDataSourcesource ↗
-
interface SheetClearRangeContentsCommandDataSource<Cell>Sheet cell data required to create clear-contents operations.
propertytarget readonly target: PluginKeyPlugin key that owns the persisted sheet data matrix.
methodgetColumnCount getColumnCount(): numberCurrent column count.
methodgetRowCount getRowCount(): numberCurrent row count.
methodreadCell readCell(row: number, column: number): Cell | nullReads the current cell value at
row,column.row: numbercolumn: number
- interfaceSheetClearRangeContentsInputsource ↗
-
interface SheetClearRangeContentsInput extends SheetRangeInputPublic input for clearing persisted contents in a range.
- interfaceSheetCommandsource ↗
-
interface SheetCommand<Result>Executable unit behind a typed command definition.
- interfaceSheetCommandContextsource ↗
-
interface SheetCommandContextRuntime services exposed to commands while they execute.
methodapplyEffect applyEffect(effect: SheetCommandEffect): voidApplies a local UI/runtime effect after pipeline execution.
effect: SheetCommandEffect
methodexecutePipeline executePipeline(pipeline: Pipeline): voidApplies the command-produced pipeline through the core transaction boundary.
pipeline: Pipeline
- interfaceSheetCommandDefinitionsource ↗
-
interface SheetCommandDefinition<Input, Result>A stable command identifier carrying its input and result contract.
property[sheetCommandInputType] readonly [sheetCommandInputType]: InputPhantom field that preserves the command input type for callers.
property[sheetCommandResultType] readonly [sheetCommandResultType]: ResultPhantom field that preserves the command result type for callers.
propertyid readonly id: stringGlobally stable command id owned by the feature package that defines it.
- interfaceSheetCommandEventsource ↗
-
interface SheetCommandEventLifecycle event emitted by the command bus for diagnostics and host UI.
propertyerror readonly error?: unknownOriginal thrown value when the command failed.
propertyid readonly id: stringStable command id being executed.
propertyphase readonly phase: CommandExecutionPhaseExecution phase represented by this event.
propertyresult readonly result?: SheetCommandResultSuccessfully executed command result, present only for the completed phase.
- interfaceSheetCommandResultsource ↗
-
interface SheetCommandResultStandard command result that Core can execute and observe.
propertycompletion readonly completion?: Promise<unknown>Optional asynchronous completion of a command-owned external effect.
propertyeffects readonly effects?: readonly SheetCommandEffect[]Optional local effects requested after pipeline execution.
propertyhistoryGroup readonly historyGroup?: { id: string; phase: "end" | "begin" }Optional identifier for combining two committed commands into one undo entry.
propertypipeline readonly pipeline: PipelinePipeline containing transaction, render, interaction and local-action steps.
- interfaceSheetDeleteColumnsInputsource ↗
-
interface SheetDeleteColumnsInputPublic input for deleting columns starting at
index. - interfaceSheetDeleteRowsInputsource ↗
-
interface SheetDeleteRowsInputPublic input for deleting rows starting at
index. - interfaceSheetInsertColumnsInputsource ↗
-
interface SheetInsertColumnsInputPublic input for inserting columns before
index. - interfaceSheetInsertRowsInputsource ↗
-
interface SheetInsertRowsInputPublic input for inserting rows before
index. - interfaceSheetMoveAxisInputsource ↗
-
interface SheetMoveAxisInputMoves a contiguous block before a boundary in the original axis (0 through size).
- interfaceSheetQueryDefinitionsource ↗
-
interface SheetQueryDefinition<Input, Result>A stable query identifier carrying its input and result contract.
property__input readonly __input?: Inputproperty__result readonly __result?: Resultpropertyid readonly id: stringpropertyresultMode readonly resultMode?: "reader"Reader queries return a live, read-only projection instead of a data snapshot.
- interfaceSheetRangeBoundssource ↗
-
interface SheetRangeBoundsNormalized rectangular sheet range bounds expressed as inclusive cell coordinates.
- interfaceSheetRangeInputsource ↗
-
interface SheetRangeInputCommon range input accepted by explicit range commands.
- interfaceSheetStructureCommandDataSourcesource ↗
-
interface SheetStructureCommandDataSource<Cell>Sheet matrix access used by structure commands without depending on a concrete data package.
propertytarget readonly target: PluginKeyPlugin key that owns the persisted sheet data matrix.
methodgetColumnCount getColumnCount(): numberCurrent column count.
methodgetRowCount getRowCount(): numberCurrent row count.
methodreadColumn readColumn(index: number): Cell | null[]Reads a dense column payload for invertible column deletion.
index: number
methodreadRow readRow(index: number): Cell | null[]Reads a dense row payload for invertible row deletion.
index: number
- typeCommandExecutionPhasesource ↗
-
type CommandExecutionPhase = typeof CommandExecutionPhase[keyof typeof CommandExecutionPhase]Public string union for command lifecycle event phases.
- typeDocCommandDefinitionResultsource ↗
-
type DocCommandDefinitionResult = conditionalExtracts the result contract from a typed document command definition.
- typeDocCommandEffectsource ↗
-
type DocCommandEffect = { type: "focus-document" } | { type: "reset-caret-blink" }Local runtime effects that document commands can request outside document state.
- typeDocCommandFactorysource ↗
-
type DocCommandFactory = (input: DocCommandInput<Definition>): DocEditorCommand<DocCommandDefinitionResult<Definition>>Factory installed by a document feature plugin to create a command from typed input.
- typeDocCommandInputsource ↗
-
type DocCommandInput = conditionalExtracts the input contract from a typed document command definition.
- typeDocCommandListenersource ↗
-
type DocCommandListener = (event: DocCommandEvent): voidObserver invoked when document command execution starts, completes, or fails.
- typeSelectionMoveDirectionsource ↗
-
type SelectionMoveDirection = typeof SelectionMoveDirection[keyof typeof SelectionMoveDirection]Type contract for SelectionMoveDirection.
- typeSheetCellPointsource ↗
-
type SheetCellPoint = readonly [number, number]A zero-based sheet cell coordinate expressed as
[row, column]. - typeSheetCommandDefinitionResultsource ↗
-
type SheetCommandDefinitionResult = conditionalExtracts the result contract from a typed command definition.
- typeSheetCommandFactorysource ↗
-
type SheetCommandFactory = (input: SheetCommandInput<Definition>): SheetCommand<SheetCommandDefinitionResult<Definition>>Factory installed by a feature plugin to create a command from typed input.
- typeSheetCommandInputsource ↗
-
type SheetCommandInput = conditionalExtracts the input contract from a typed command definition.
- typeSheetCommandListenersource ↗
-
type SheetCommandListener = (event: SheetCommandEvent): voidObserver invoked when command execution starts, completes or fails.
- typeSheetQueryHandlersource ↗
-
type SheetQueryHandler = (input: Input): Result - typeSheetQueryInputsource ↗
-
type SheetQueryInput = conditional - typeSheetQueryResultsource ↗
-
type SheetQueryResult = conditional - typeSheetRangeCommandDataSourcesource ↗
-
type SheetRangeCommandDataSource = SheetClearRangeContentsCommandDataSource<Cell>Data source for the built-in clear-contents command.
- variableClearRangeContentsCommandsource ↗
-
ClearRangeContentsCommand: SheetCommandDefinition<SheetClearRangeContentsInput, SheetCommandResult>Clears persisted cell contents in an explicit rectangular range.
- variableCommandExecutionPhasesource ↗
-
CommandExecutionPhase: { Completed: "completed"; Failed: "failed"; Started: "started" }Stable lifecycle phases emitted by Sheet, Doc, and Workbook command buses.
- variableDeleteColumnCommandsource ↗
-
DeleteColumnCommand: SheetCommandDefinition<SheetDeleteColumnsInput, SheetCommandResult>Deletes one or more columns starting at the requested column index.
- variableDeleteRowCommandsource ↗
-
DeleteRowCommand: SheetCommandDefinition<SheetDeleteRowsInput, SheetCommandResult>Deletes one or more rows starting at the requested row index.
- variableInsertColumnCommandsource ↗
-
InsertColumnCommand: SheetCommandDefinition<SheetInsertColumnsInput, SheetCommandResult>Inserts one or more columns before the requested column index.
- variableInsertRowCommandsource ↗
-
InsertRowCommand: SheetCommandDefinition<SheetInsertRowsInput, SheetCommandResult>Inserts one or more rows before the requested row index.
- variableMoveColumnsCommandsource ↗
-
MoveColumnsCommand: SheetCommandDefinition<SheetMoveAxisInput, SheetCommandResult>Reorders complete columns without overwriting their neighbors.
- variableMoveRowsCommandsource ↗
-
MoveRowsCommand: SheetCommandDefinition<SheetMoveAxisInput, SheetCommandResult>Reorders complete rows without overwriting their neighbors.
- variableSelectionMoveDirectionsource ↗
-
SelectionMoveDirection: { Down: "down"; Left: "left"; Right: "right"; Up: "up" }Cardinal directions accepted by sheet-selection navigation commands.
- functioncreateClearRangeContentsOperationssource ↗
-
createClearRangeContentsOperations<Cell>(input: SheetClearRangeContentsInput, dataSource: SheetClearRangeContentsCommandDataSource<Cell>): UpdateCellOTOperation<Cell>[]Creates UpdateCell operations that clear non-empty cells inside a range.
input: SheetClearRangeContentsInputdataSource: SheetClearRangeContentsCommandDataSource<Cell>
- functioncreateDeleteColumnOperationssource ↗
-
createDeleteColumnOperations(input: SheetDeleteColumnsInput, dataSource: Pick<SheetStructureCommandDataSource, "getColumnCount" | "readColumn">): DeleteColOTOperation<unknown>[]Creates ColDelete operations from public command input, ordered from right to left.
input: SheetDeleteColumnsInputdataSource: Pick<SheetStructureCommandDataSource, "getColumnCount" | "readColumn">
- functioncreateDeleteRowOperationssource ↗
-
createDeleteRowOperations(input: SheetDeleteRowsInput, dataSource: Pick<SheetStructureCommandDataSource, "getRowCount" | "readRow">): DeleteRowOTOperation<unknown>[]Creates RowDelete operations from public command input, ordered from bottom to top.
input: SheetDeleteRowsInputdataSource: Pick<SheetStructureCommandDataSource, "getRowCount" | "readRow">
- functioncreateInsertColumnOperationssource ↗
-
createInsertColumnOperations(input: SheetInsertColumnsInput, dataSource: Pick<SheetStructureCommandDataSource, "getRowCount">): InsertColOTOperation<unknown>[]Creates ColInsert operations from public command input.
input: SheetInsertColumnsInputdataSource: Pick<SheetStructureCommandDataSource, "getRowCount">
- functioncreateInsertRowOperationssource ↗
-
createInsertRowOperations(input: SheetInsertRowsInput, dataSource: Pick<SheetStructureCommandDataSource, "getColumnCount">): InsertRowOTOperation<unknown>[]Creates RowInsert operations from public command input.
input: SheetInsertRowsInputdataSource: Pick<SheetStructureCommandDataSource, "getColumnCount">
- functioncreateMoveColumnsOperationssource ↗
-
createMoveColumnsOperations(input: SheetMoveAxisInput, size: number): MoveColOTOperation<unknown>[]Creates column swaps implementing insertion at an original column boundary.
input: SheetMoveAxisInputsize: number
- functioncreateMoveRowsOperationssource ↗
-
createMoveRowsOperations(input: SheetMoveAxisInput, size: number): MoveRowOTOperation<unknown>[]Creates row swaps implementing insertion at an original row boundary.
input: SheetMoveAxisInputsize: number
- functioncreateSheetTransactionsource ↗
-
createSheetTransaction<OperationType>(target: PluginKey, operations: readonly OperationType[], meta?: Readonly<Record<string, unknown>>): TransactionCreates a transaction for command factories that need to produce pipeline transactions internally.
target: PluginKeyoperations: readonly OperationType[]meta: Readonly<Record<string, unknown>>
- functiondefineDocCommandsource ↗
-
defineDocCommand<Input, Result>(id: string): DocCommandDefinition<Input, Result>Creates an immutable, feature-owned document command contract.
id: string
- functiondefineSheetCommandsource ↗
-
defineSheetCommand<Input, Result>(id: string): SheetCommandDefinition<Input, Result>Creates an immutable, feature-owned command contract.
id: string
- functiondefineSheetQuerysource ↗
-
defineSheetQuery<Input, Result>(id: string): SheetQueryDefinition<Input, Result>Creates an immutable, feature-owned query contract.
id: string
- functiondefineSheetReaderQuerysource ↗
-
defineSheetReaderQuery<Input, Result>(id: string): SheetQueryDefinition<Input, Result>Defines a live reader whose methods own detached values at their read boundary.
id: string
- functionextendSelectionsource ↗
-
extendSelection(input: ExtendSelectionCommandInput): { anchor: [number, number]; cursor: [number, number]; focus: [number, number] }Extends a selection by one keyboard navigation step.
ReturnsNormalized selection range and updated moving cursor.
input: ExtendSelectionCommandInputCurrent selection extension state.
- functionmoveSelectionsource ↗
-
moveSelection(input: MoveSelectionCommandInput): MoveSelectionCommandResultResolves navigation as a sheet interaction, including merged-range boundaries.
input: MoveSelectionCommandInput
- functionregisterSheetRangeCommandssource ↗
-
registerSheetRangeCommands(commands: SheetCommandBus, dataSource: SheetRangeCommandDataSource): voidRegisters the built-in range commands on one sheet command bus.
commands: SheetCommandBusdataSource: SheetRangeCommandDataSource
- functionregisterSheetStructureCommandssource ↗
-
registerSheetStructureCommands(commands: SheetCommandBus, dataSource: SheetStructureCommandDataSource, moves?: SheetStructureMoveRegistry): voidRegisters the default sheet row/column structure commands.
commands: SheetCommandBusdataSource: SheetStructureCommandDataSourcemoves: SheetStructureMoveRegistry
- functionselectRangesource ↗
-
selectRange(input: SelectRangeCommandInput): SelectRangeCommandResultNormalizes pointer or test-provided ranges so intersected merged cells are selected whole.
input: SelectRangeCommandInput
- classSheetQueryBussource ↗
-
class SheetQueryBusEditor-local registry for typed, side-effect-free sheet queries.
constructorconstructor SheetQueryRegistry(): SheetQueryRegistrypropertysymbolstatic readonly symbol: typeof symbolmethoddestroy destroy(): voidmethodenforceWriteBoundary enforceWriteBoundary(assertWrite: (): void): voidRequires editor command dispatch for registration changes after assembly.
assertWrite: (): void
methodgetRegisteredQueryIds getRegisteredQueryIds(): readonly string[]methodhas has(definition: string | SheetQueryDefinition<unknown, unknown>): booleandefinition: string | SheetQueryDefinition<unknown, unknown>
methodregister register<Definition>(definition: Definition, handler: SheetQueryHandler<SheetQueryInput<Definition>, SheetQueryResult<Definition>>): (): voiddefinition: Definitionhandler: SheetQueryHandler<SheetQueryInput<Definition>, SheetQueryResult<Definition>>
methodrun run<Definition>(definition: Definition, input: SheetQueryInput<Definition>): SheetQueryResult<Definition>definition: Definitioninput: SheetQueryInput<Definition>
No public exports match that search.