← All packages

API reference

@searsuite/sear-assembly-workbook

Workbook structure, Sheet mounting, workbook commands, sessions, and shared runtime services.

129 exportsderived from source

Concept 1

Compose a Workbook around Sheet editors

createWorkbookEditor() creates the Workbook runtime and mounts a Sheet editor for the active Sheet. The Workbook owns structure and shared services; the mounted Sheet editor owns its own commands, queries, capabilities, and selected plugins. WorkbookEditor keeps structural reads under document and mounted-Sheet access under sheets.

Use when: a product needs several Sheets with stable identities, switching, structural commands, or shared Workbook services. A single Sheet host can use createSheetEditor() directly.

Concept 2

Switch Sheets without conflating state

ActivateWorkbookSheetCommand captures the current Sheet document and local session, tears down that Sheet editor, and mounts the requested Sheet. The session is restored when returning to it. Workbook structural commands such as AddWorkbookSheetCommand and RenameWorkbookSheetCommand stage changes in a separate history from cell edits inside the active Sheet.

Stable sheetId values identify Sheets across rename and reorder operations. A host should use the Workbook document API for structure and the mounted Sheet API for content. WorkbookPlugin contributions can own shared services that survive a Sheet remount.

classWorkbookCollaborationPluginsource ↗
class WorkbookCollaborationPlugin extends WorkbookPlugin, WorkbookCollaborationSession

Owns collaboration state beyond the lifetime of any temporary active SheetEditor.

constructorconstructor
WorkbookCollaborationPlugin(transports: WorkbookCollaborationTransportFactory, platform: Platform): WorkbookCollaborationPlugin
transports: WorkbookCollaborationTransportFactory
platform: Platform
propertysymbolstatic
readonly symbol: typeof symbol
methodgetConnectedSheetIds
getConnectedSheetIds(): readonly string[]
methodgetSheetServices
getSheetServices(context: WorkbookCompanionSheetPluginContext): { token: symbol; value: { channel: CollaborationChannel; owner: "host" } }[]

Contributes parent-owned services without exposing the child editor container.

context: WorkbookCompanionSheetPluginContext
methodgetSheetStatus
getSheetStatus(sheetId: string): CollaborationStatus | undefined
sheetId: string
methodinitialize
initialize(context: WorkbookPluginContext): (): void
context: WorkbookPluginContext
methodonTransactionCommitted
onTransactionCommitted(event: WorkbookTransactionCommittedEvent): void
event: WorkbookTransactionCommittedEvent
methodonWorkbookDestroy
onWorkbookDestroy(): void
methodregisterCapabilities
registerCapabilities(registry: WorkbookRuntimeExtensionRegistry): void

Registers every runtime capability owned by this plugin.

registry: WorkbookRuntimeExtensionRegistry
methodregisterCommands
registerCommands(commands: WorkbookCommandBus): void

Registers every stable command id owned by this plugin.

commands: WorkbookCommandBus
Inherited members 7

Inherited from WorkbookPlugin.

classWorkbookCommandBussource ↗
class WorkbookCommandBus

Editor-scoped command bus for workbook-level sheet-list actions.

constructorconstructor
WorkbookCommandBus(options?: WorkbookCommandBusOptions): WorkbookCommandBus

Creates an empty workbook command bus.

options: WorkbookCommandBusOptions
propertysymbolstatic
readonly symbol: typeof symbol

DI token for the command bus owned by one WorkbookEditor.

methoddestroy
destroy(): void

Clears listeners and command registrations during teardown.

methodenforceRegistrationBoundary
enforceRegistrationBoundary(assertWrite: (): void): void

Closes setup-time command registration after the editor is assembled.

assertWrite: (): void
methodgetRegisteredCommandIds
getRegisteredCommandIds(): readonly string[]

Returns a stable snapshot of all workbook command ids exposed by this editor.

methodgetRegisteredCommands
getRegisteredCommands(): readonly WorkbookCommandDefinition<unknown, unknown>[]

Returns the typed definitions registered on this workbook editor instance.

methodhas
has(definition: string | WorkbookCommandDefinition<unknown, unknown>): boolean

Returns whether this workbook editor currently exposes a command id.

definition: string | WorkbookCommandDefinition<unknown, unknown>
methodisExecuting
isExecuting(): boolean

Whether this WorkbookEditor is currently dispatching a command.

methodregister
register<Definition>(definition: Definition, handler: WorkbookCommandHandler<Definition>): (): void

Registers one workbook command handler. The returned disposer removes the handler and is primarily useful for extension commands.

definition: Definition
handler: WorkbookCommandHandler<Definition>
methodrun
run<Definition>(definition: Definition, input: WorkbookCommandInput<Definition>): WorkbookCommandDefinitionResult<Definition>

Executes a registered workbook command through its typed definition.

definition: Definition
input: WorkbookCommandInput<Definition>
methodrunWithoutMutationAuthority
runWithoutMutationAuthority<Value>(callback: (): Value): Value

Invokes external observers without inheriting this editor's command write authority.

callback: (): Value
methodsubscribe
subscribe(listener: WorkbookCommandListener): (): void

Subscribes to command lifecycle events and returns an unsubscribe function.

listener: WorkbookCommandListener
classWorkbookFormulaDependencyGraphsource ↗
class WorkbookFormulaDependencyGraph

Workbook-qualified dependency graph owned by WorkbookFormulaPlugin.

constructorconstructor
WorkbookFormulaDependencyGraph(): WorkbookFormulaDependencyGraph
memberdirtySize
dirtySize: unknown
memberresultSize
resultSize: unknown
membersize
size: unknown
methodclear
clear(): void

Removes every formula and dependency edge.

methodgetBrokenReferences
getBrokenReferences(formulaCell: WorkbookCellReference): readonly WorkbookFormulaBrokenReference[]

Returns broken references owned by one formula cell.

formulaCell: WorkbookCellReference
methodgetDependencies
getDependencies(formulaCell: WorkbookCellReference): readonly WorkbookFormulaGraphReference[]

Returns workbook-qualified dependencies owned by one formula cell.

formulaCell: WorkbookCellReference
methodgetDependents
getDependents(cell: WorkbookCellReference): readonly WorkbookCellReference[]

Returns formula cells that currently depend on the given workbook cell.

cell: WorkbookCellReference
methodgetDirtyFormulaCells
getDirtyFormulaCells(): readonly WorkbookCellReference[]

Returns every workbook-qualified formula cell currently marked dirty.

methodgetFormulaCells
getFormulaCells(): readonly WorkbookCellReference[]

Returns every workbook-qualified formula cell currently registered.

methodgetFormulaResult
getFormulaResult(formulaCell: WorkbookCellReference): FormulaValue | undefined

Returns a derived workbook formula result, or #REF! when references are broken.

formulaCell: WorkbookCellReference
methodhasBrokenReferences
hasBrokenReferences(formulaCell: WorkbookCellReference): boolean

Reports whether one formula cell currently contains broken references.

formulaCell: WorkbookCellReference
methodhasFormulaCell
hasFormulaCell(formulaCell: WorkbookCellReference): boolean

Reports whether one workbook-qualified cell is registered as a formula cell.

formulaCell: WorkbookCellReference
methodisDirty
isDirty(formulaCell: WorkbookCellReference): boolean

Reports whether one workbook formula cell needs recalculation.

formulaCell: WorkbookCellReference
methodmarkDirty
markDirty(changedCells: readonly WorkbookCellReference[]): readonly WorkbookCellReference[]

Marks formulas that depend on changed workbook cells as dirty, including transitive formula chains.

changedCells: readonly WorkbookCellReference[]
methodmarkFormulaCellsDirty
markFormulaCellsDirty(formulaCells: readonly WorkbookCellReference[]): void

Marks formula cells themselves dirty after an external evaluation service changes.

formulaCells: readonly WorkbookCellReference[]
methodremoveFormulaCell
removeFormulaCell(formulaCell: WorkbookCellReference): void

Removes one formula cell and every reverse edge it owns.

formulaCell: WorkbookCellReference
methodremoveSheet
removeSheet(sheetId: string): void

Removes formulas on a deleted sheet and marks references to that sheet as broken.

sheetId: string
methodsetFormulaResult
setFormulaResult(formulaCell: WorkbookCellReference, result: FormulaValue): void

Stores a derived workbook formula result and marks the formula clean.

formulaCell: WorkbookCellReference
result: FormulaValue
methodupdateFormulaCell
updateFormulaCell(formulaCell: WorkbookCellReference, dependencies: readonly WorkbookFormulaReference[]): void

Registers dependencies for one workbook-qualified formula cell.

formulaCell: WorkbookCellReference
dependencies: readonly WorkbookFormulaReference[]
methodupdateFormulaCellReferences
updateFormulaCellReferences(formulaCell: WorkbookCellReference, dependencies: readonly WorkbookFormulaGraphReference[]): void

Registers graph references for one formula cell, including broken references.

formulaCell: WorkbookCellReference
dependencies: readonly WorkbookFormulaGraphReference[]
classWorkbookFormulaEvaluationRuntimesource ↗
class WorkbookFormulaEvaluationRuntime

Runtime adapter that evaluates workbook formulas through the shared formula engine.

constructorconstructor
WorkbookFormulaEvaluationRuntime(input?: { contextServices?: (): { dateTimeLocale?: FormulaDateTimeLocale; externalServices?: FormulaExternalServiceReader; languageService?: FormulaLanguageService; phoneticReader?: FormulaPhoneticReader; textLocale?: FormulaTextLocale; xmlXPath?: XmlXPathEvaluator }; evaluator?: IFormulaEvaluator; parser?: IFormulaParser }): WorkbookFormulaEvaluationRuntime

Creates a workbook formula evaluation runtime.

input: { contextServices?: (): { dateTimeLocale?: FormulaDateTimeLocale; externalServices?: FormulaExternalServiceReader; languageService?: FormulaLanguageService; phoneticReader?: FormulaPhoneticReader; textLocale?: FormulaTextLocale; xmlXPath?: XmlXPathEvaluator }; evaluator?: IFormulaEvaluator; parser?: IFormulaParser }
methodcompileFormula
compileFormula(formulaCell: WorkbookCellReference, source: string, workbookState: WorkbookDocumentState<SheetDocumentState>): CompiledWorkbookFormula

Compiles formula text into native AST plus stable workbook dependencies.

formulaCell: WorkbookCellReference
source: string
workbookState: WorkbookDocumentState<SheetDocumentState>
methodformatFormulaSource
formatFormulaSource(compiled: CompiledWorkbookFormula, workbookState: WorkbookDocumentState<SheetDocumentState>): string

Formats workbook formula source with current sheet names while keeping stable sheet-id bindings.

compiled: CompiledWorkbookFormula
workbookState: WorkbookDocumentState<SheetDocumentState>
methodrecalculateDirty
recalculateDirty(input: { formulas: ReadonlyMap<string, CompiledWorkbookFormula>; graph: WorkbookFormulaDependencyGraph; runtime: WorkbookPluginRuntime }): WorkbookFormulaRecalculationResult

Recalculates dirty formula cells whose dependencies are currently clean.

input: { formulas: ReadonlyMap<string, CompiledWorkbookFormula>; graph: WorkbookFormulaDependencyGraph; runtime: WorkbookPluginRuntime }
methodshiftCompiledFormulaReferences
shiftCompiledFormulaReferences(input: { changedSheetId: string; changes: readonly StructureChange[]; compiled: CompiledWorkbookFormula; formulaCell: WorkbookCellReference }): WorkbookFormulaCompiledReferenceShiftResult

Shifts compiled formula references after a row or column structure change.

input: { changedSheetId: string; changes: readonly StructureChange[]; compiled: CompiledWorkbookFormula; formulaCell: WorkbookCellReference }
classWorkbookFormulaObjectsPluginsource ↗
class WorkbookFormulaObjectsPlugin extends WorkbookPlugin

Workbook-owned editing surface for named formulas and table references.

constructorconstructor
WorkbookFormulaObjectsPlugin(): WorkbookFormulaObjectsPlugin
propertysymbolstatic
readonly symbol: typeof symbol
methodinitialize
initialize(context: WorkbookPluginContext): void
context: WorkbookPluginContext
methodonTransactionCommitted
onTransactionCommitted(): void
methodonWorkbookDestroy
onWorkbookDestroy(): void
methodregisterCommands
registerCommands(commands: WorkbookCommandBus): void

Registers every stable command id owned by this plugin.

commands: WorkbookCommandBus
methodregisterObservations
registerObservations(observations: ObservationRegistry): void

Registers every typed state and event observation source owned by this plugin.

observations: ObservationRegistry
Inherited members 8

Inherited from WorkbookPlugin.

classWorkbookFormulaPluginsource ↗
class WorkbookFormulaPlugin extends WorkbookPlugin

Workbook-level formula coordinator and cross-sheet dependency owner.

constructorconstructor
WorkbookFormulaPlugin(): WorkbookFormulaPlugin
propertysymbolstatic
readonly symbol: typeof symbol
methodassertSheetRangeMoveSupported
assertSheetRangeMoveSupported(sheetId: string, context: SheetRangeMoveContext): void

Rejects moves requiring reference edits outside the current Sheet transaction boundary.

sheetId: string
context: SheetRangeMoveContext
methodassertSheetStructureMoveSupported
assertSheetStructureMoveSupported(sheetId: string, context: SheetStructureMoveContext): void

Rejects qualified reference rewrites that cannot be persisted by a single Sheet transaction.

sheetId: string
context: SheetStructureMoveContext
methodformatReference
formatReference(reference: ParsedWorkbookFormulaReference): string

Formats a stable workbook reference with the latest workbook sheet name.

reference: ParsedWorkbookFormulaReference
methodgetDependencyGraph
getDependencyGraph(): WorkbookFormulaDependencyGraphReader

Returns the workbook-qualified dependency graph owned by this plugin instance.

methodgetFormulaResult
getFormulaResult(formulaCell: ParsedWorkbookFormulaReference): FormulaValue | undefined

Returns a workbook-level formula result when the skeleton can determine one.

formulaCell: ParsedWorkbookFormulaReference
methodgetSheetFormulaResult
getSheetFormulaResult(sheetId: string, row: number, col: number): FormulaValue | undefined

Returns a result only for formula cells that contain workbook-qualified references.

sheetId: string
row: number
col: number
methodgetSheetFormulaSource
getSheetFormulaSource(sheetId: string, row: number, col: number): string | undefined

Returns display-ready formula source for workbook formulas on one mounted sheet.

sheetId: string
row: number
col: number
methodgetSheetPlugins
getSheetPlugins(context: WorkbookCompanionSheetPluginContext): readonly SheetPluginImplementation<SheetPlugin<unknown>>[]

Contributes the active-sheet companion that forwards committed Sheet transactions.

context: WorkbookCompanionSheetPluginContext
methodgetSheetServices
getSheetServices(context: WorkbookCompanionSheetPluginContext): readonly { token: symbol; value: unknown }[]

Shares the workbook function registry with each mounted Sheet editor.

context: WorkbookCompanionSheetPluginContext
methodinitialize
initialize(context: WorkbookPluginContext): (): void

Starts observing workbook state for this WorkbookEditor instance.

context: WorkbookPluginContext
methodobserveSheetTransaction
observeSheetTransaction(sheetId: string, transaction: Transaction): void

Receives a committed Sheet transaction from the active SheetEditor companion.

sheetId: string
transaction: Transaction
methodparseReference
parseReference(reference: string): ParsedWorkbookFormulaReference

Parses a displayed cross-sheet reference against the latest workbook sheet names.

reference: string
methodrecalculateDirtyFormulas
recalculateDirtyFormulas(): RecalculateWorkbookFormulasCommandResult

Recalculates workbook formulas currently marked dirty.

methodregisterCommands
registerCommands(commands: WorkbookCommandBus): void

Registers workbook formula commands.

commands: WorkbookCommandBus
methodregisterObservations
registerObservations(observations: ObservationRegistry): void

Registers workbook formula diagnostic observations.

observations: ObservationRegistry
methodremoveFormulaCell
removeFormulaCell(formulaCell: WorkbookCellReference): void

Removes workbook formula bookkeeping for one formula cell.

formulaCell: WorkbookCellReference
methodsetFormulaCellFormula
setFormulaCellFormula(formulaCell: ParsedWorkbookFormulaReference, formulaSource: string): void

Registers and compiles one workbook formula source.

formulaCell: ParsedWorkbookFormulaReference
formulaSource: string
methodsetFormulaResult
setFormulaResult(formulaCell: ParsedWorkbookFormulaReference, result: FormulaValue): void

Stores a derived workbook formula result and marks the formula clean.

formulaCell: ParsedWorkbookFormulaReference
result: FormulaValue
methodupdateFormulaCell
updateFormulaCell(formulaCell: ParsedWorkbookFormulaReference, dependencies: readonly WorkbookFormulaReference[]): void

Registers workbook-qualified dependencies for one formula cell.

formulaCell: ParsedWorkbookFormulaReference
dependencies: readonly WorkbookFormulaReference[]
methodregisterServicesstatic
registerServices(__namedParameters: WorkbookPluginServiceContext): void

Registers one workbook-owned formula runtime shared by mounted Sheet editors.

__namedParameters: WorkbookPluginServiceContext
Inherited members 7

Inherited from WorkbookPlugin.

classWorkbookFormulaReferenceShiftersource ↗
class WorkbookFormulaReferenceShifter

Shifts workbook-qualified AST references for one structurally changed sheet.

constructorconstructor
WorkbookFormulaReferenceShifter(): WorkbookFormulaReferenceShifter
methodshiftReferences
shiftReferences(input: { ast: FormulaAST; changedSheetId: string; changes: readonly StructureChange[]; sheetBindings: ReadonlyMap<string, string> }): WorkbookFormulaReferenceShiftResult

Shifts workbook references whose stable binding points at the changed sheet.

input: { ast: FormulaAST; changedSheetId: string; changes: readonly StructureChange[]; sheetBindings: ReadonlyMap<string, string> }
classWorkbookHistoryPluginsource ↗
class WorkbookHistoryPlugin extends WorkbookPlugin

Built-in contributor for workbook structure and declared multi-sheet content history.

constructorconstructor
WorkbookHistoryPlugin(): WorkbookHistoryPlugin
propertysymbolstatic
readonly symbol: typeof symbol
methodgetContentMoveStatus
getContentMoveStatus(): WorkbookHistoryStatus

Exposes only multi-sheet content entries to the mounted Sheet history adapter.

methodgetStatus
getStatus(): WorkbookHistoryStatus
methodinitialize
initialize(context: WorkbookPluginContext): void
context: WorkbookPluginContext
methodonTransactionCommitted
onTransactionCommitted(event: WorkbookTransactionCommittedEvent): void
event: WorkbookTransactionCommittedEvent
methodonWorkbookDestroy
onWorkbookDestroy(): void
methodregisterCommands
registerCommands(commands: WorkbookCommandBus): void

Registers every stable command id owned by this plugin.

commands: WorkbookCommandBus
methodregisterObservations
registerObservations(observations: ObservationRegistry): void

Registers every typed state and event observation source owned by this plugin.

observations: ObservationRegistry
methodregisterSessionState
registerSessionState(registry: SessionStateRegistry): void

Registers every local session value owned by this plugin.

registry: SessionStateRegistry
methodsubscribe
subscribe(listener: (status: WorkbookHistoryStatus): void): (): void
listener: (status: WorkbookHistoryStatus): void
Inherited members 7

Inherited from WorkbookPlugin.

classWorkbookPluginsource ↗
class WorkbookPlugin extends PluginExtension<WorkbookCommandBus, ObservationRegistry, SessionStateRegistry, WorkbookRuntimeExtensionRegistry>

Base contract for plugins owned by createWorkbookEditor().

constructorconstructor
WorkbookPlugin(): WorkbookPlugin
methodenforceRuntimeWriteBoundary
enforceRuntimeWriteBoundary(assertWrite: (): void): void

Closes plugin-owned runtime mutations after Workbook assembly.

assertWrite: (): void
methodgetSheetPlugins
getSheetPlugins(context: WorkbookCompanionSheetPluginContext): readonly SheetPluginImplementation<SheetPlugin<unknown>>[]
context: WorkbookCompanionSheetPluginContext
methodgetSheetServices
getSheetServices(context: WorkbookCompanionSheetPluginContext): readonly WorkbookCompanionSheetService<unknown>[]

Contributes parent-owned services without exposing the child editor container.

context: WorkbookCompanionSheetPluginContext
methodinitialize
initialize(context: WorkbookPluginContext): void | WorkbookPluginDisposer
context: WorkbookPluginContext
methodonBeforeSheetActivation
onBeforeSheetActivation(input: ActivateWorkbookSheetCommandInput): void

Runs inside the activation command before the source Sheet is captured.

input: ActivateWorkbookSheetCommandInput
methodonSheetActivationFailed
onSheetActivationFailed(input: ActivateWorkbookSheetCommandInput): void

Restores plugin-local work if activation fails before commit.

input: ActivateWorkbookSheetCommandInput
methodonTransactionCommitted
onTransactionCommitted(event: WorkbookTransactionCommittedEvent): void
event: WorkbookTransactionCommittedEvent
methodonWorkbookDestroy
onWorkbookDestroy(context: WorkbookPluginContext): void
context: WorkbookPluginContext
methodregisterCapabilities
registerCapabilities(registry: WorkbookRuntimeExtensionRegistry): void

Registers every runtime capability owned by this plugin.

registry: WorkbookRuntimeExtensionRegistry
methodregisterCommands
registerCommands(commands: WorkbookCommandBus): void

Registers every stable command id owned by this plugin.

commands: WorkbookCommandBus
methodregisterObservations
registerObservations(observations: ObservationRegistry): void

Registers every typed state and event observation source owned by this plugin.

observations: ObservationRegistry
methodregisterSessionState
registerSessionState(registry: SessionStateRegistry): void

Registers every local session value owned by this plugin.

registry: SessionStateRegistry
methodregisterServicesstatic
registerServices(context: WorkbookPluginServiceContext): void
context: WorkbookPluginServiceContext
classWorkbookRangeMoveErrorsource ↗
class WorkbookRangeMoveError extends SearError

Prevents a same-sheet move from leaving workbook-qualified references stale.

constructorconstructor
WorkbookRangeMoveError(sheetId: string): WorkbookRangeMoveError
sheetId: string
propertycode
readonly code: "WORKBOOK_RANGE_MOVE_QUALIFIED_REFERENCE"

Stable machine-readable identifier for this error category.

Inherited members 9

Inherited from SearError.

classWorkbookRuntimeExtensionRegistrysource ↗
class WorkbookRuntimeExtensionRegistry extends RuntimeCapabilityRegistry

Editor-local capability registry exposed through WorkbookEditor.capabilities.

constructorconstructor
WorkbookRuntimeExtensionRegistry(): WorkbookRuntimeExtensionRegistry
propertysymbolstatic
readonly symbol: typeof symbol
Inherited members 7

Inherited from RuntimeCapabilityRegistry.

classWorkbookSessionStoresource ↗
class WorkbookSessionStore

Owns built-in workbook session values without exposing their shape to aggregate capture.

constructorconstructor
WorkbookSessionStore(documentState: WorkbookDocumentState): WorkbookSessionStore
documentState: WorkbookDocumentState
propertysymbolstatic
readonly symbol: typeof symbol
methodbindActiveSheetCapture
bindActiveSheetCapture(capture: (): { sheetId: string; state?: Readonly<Record<string, unknown>> }): void
capture: (): { sheetId: string; state?: Readonly<Record<string, unknown>> }
methodclear
clear(lifecycleToken?: object): void
lifecycleToken: object
methodenforceCommandBoundary
enforceCommandBoundary(isExecuting: (): boolean, lifecycleToken: object): void

Restricts runtime session changes to this editor's command dispatch.

isExecuting: (): boolean
lifecycleToken: object
methodgetActiveSheetId
getActiveSheetId(): string
methodgetSheetSessionState
getSheetSessionState(sheetId: string): Readonly<Record<string, unknown>> | undefined
sheetId: string
methodregisterSessionState
registerSessionState(registry: SessionStateRegistry): void

Registers the built-in contributors beside third-party workbook contributors.

registry: SessionStateRegistry
methodremoveMissingSheets
removeMissingSheets(liveSheetIds: ReadonlySet<string>, ownerToken?: object): void
liveSheetIds: ReadonlySet<string>
ownerToken: object
methodsetActiveSheetId
setActiveSheetId(sheetId: string, ownerToken?: object): void
sheetId: string
ownerToken: object
methodsetSheetSessionState
setSheetSessionState(sheetId: string, state: Readonly<Record<string, unknown>> | undefined, ownerToken?: object): void
sheetId: string
state: Readonly<Record<string, unknown>> | undefined
ownerToken: object
methodvalidate
validate(documentState: WorkbookDocumentState): void
documentState: WorkbookDocumentState
classWorkbookStructureMoveErrorsource ↗
class WorkbookStructureMoveError extends SearError

Prevents an axis move from leaving qualified reference sources outside its transaction stale.

constructorconstructor
WorkbookStructureMoveError(sheetId: string): WorkbookStructureMoveError
sheetId: string
propertycode
readonly code: "WORKBOOK_STRUCTURE_MOVE_QUALIFIED_REFERENCE"

Stable machine-readable identifier for this error category.

Inherited members 9

Inherited from SearError.

classWorkbookTransactionsource ↗
class WorkbookTransaction

Ordered, atomic workbook mutation assembled inside a typed command handler. Reducers stage state only; the WorkbookEditor owns validation and commit.

constructorconstructor
WorkbookTransaction(id: string, historyAction?: WorkbookHistoryAction, contentSheetIds?: readonly string[]): WorkbookTransaction
id: string
historyAction: WorkbookHistoryAction
contentSheetIds: readonly string[]

Sheet states whose before/after snapshots belong to this history entry.

propertycontentSheetIds
readonly contentSheetIds: readonly string[]
propertyhistoryAction
readonly historyAction: WorkbookHistoryAction
propertyid
readonly id: string
methodaddStep
addStep(name: string, reduce: WorkbookTransactionReducer): this

Adds one pure reducer to the staged transaction.

name: string
reduce: WorkbookTransactionReducer
methodgetStepNames
getStepNames(): readonly string[]

Returns stable step names for diagnostics and tests.

interfaceActivateWorkbookSheetCommandInputsource ↗
interface ActivateWorkbookSheetCommandInput

Input for activating a workbook sheet.

propertysheetId
readonly sheetId: string

Sheet id to make active.

interfaceCaptureWorkbookSessionStateCommandResultsource ↗
interface CaptureWorkbookSessionStateCommandResult

Captured local state for remounting one WorkbookEditor runtime.

propertysessionState
readonly sessionState: WorkbookSessionState
interfaceCompiledWorkbookFormulasource ↗
interface CompiledWorkbookFormula

Compiled workbook formula with native workbook-reference AST nodes.

propertyast
readonly ast: FormulaAST

Parsed AST consumed by the configured formula evaluator.

propertybrokenReferences
readonly brokenReferences: readonly WorkbookFormulaBrokenReference[]

References that are already known to be invalid.

propertydependencies
readonly dependencies: readonly WorkbookFormulaReference[]

Stable workbook dependencies extracted from the AST.

propertyhasExpandedObjects
readonly hasExpandedObjects?: boolean
propertyhasWorkbookReferences
readonly hasWorkbookReferences: boolean

Whether the formula contains at least one workbook-qualified reference.

propertysheetBindings
readonly sheetBindings: ReadonlyMap<string, string>

Formula-text sheet names bound to stable sheet ids at compile time.

propertysource
readonly source: string

Original user-authored formula source.

interfaceExportWorkbookStateCommandResultsource ↗
interface ExportWorkbookStateCommandResult

Current workbook-owned document snapshot.

propertydocumentState
readonly documentState: WorkbookDocumentState<SheetDocumentState>
interfaceHideWorkbookSheetCommandInputsource ↗
interface HideWorkbookSheetCommandInput

Input for hiding a workbook sheet.

propertynextActiveSheetId
readonly nextActiveSheetId?: string

Optional active sheet to select when hiding the current active sheet.

propertysheetId
readonly sheetId: string

Sheet id to hide.

interfaceRecalculateWorkbookFormulasCommandResultsource ↗
interface RecalculateWorkbookFormulasCommandResult

Result returned after recalculating workbook-level dirty formulas.

propertyrecalculatedCells
readonly recalculatedCells: readonly WorkbookCellReference[]

Formula cells recalculated by this command.

propertyremainingDirtyCells
readonly remainingDirtyCells: readonly WorkbookCellReference[]

Formula cells still dirty after the command completes.

interfaceSetWorkbookDefinedNameInputsource ↗
interface SetWorkbookDefinedNameInput
propertyformula
readonly formula: string
propertyname
readonly name: string
interfaceUnhideWorkbookSheetCommandInputsource ↗
interface UnhideWorkbookSheetCommandInput

Input for unhiding a workbook sheet.

propertysheetId
readonly sheetId: string

Sheet id to reveal.

interfaceWorkbookActiveSheetEditorSnapshotsource ↗
interface WorkbookActiveSheetEditorSnapshot

Current live SheetEditor mounted by one WorkbookEditor instance.

propertyeditor
readonly editor: SheetEditor

Live editor owned by the workbook assembly.

propertysheetId
readonly sheetId: string

Stable id of the sheet mounted by the live editor.

interfaceWorkbookCollaborationSessionsource ↗
interface WorkbookCollaborationSession

Read-only host facade for Workbook-owned collaboration channels.

methodgetConnectedSheetIds
getConnectedSheetIds(): readonly string[]
methodgetSheetStatus
getSheetStatus(sheetId: string): CollaborationStatus | undefined
sheetId: string
interfaceWorkbookCollaborationTransportFactorysource ↗
interface WorkbookCollaborationTransportFactory

Creates one transport per Workbook-owned Sheet collaboration channel.

methodcreate
create(): CollabTransport
interfaceWorkbookCommandBusOptionssource ↗
interface WorkbookCommandBusOptions

Optional diagnostics hooks used by the workbook command bus.

propertywarn
readonly warn?: (message: string, ...details: unknown[]): void

Receives non-fatal command-boundary diagnostics.

interfaceWorkbookCommandControllersource ↗
interface WorkbookCommandController

Internal controller API implemented by the workbook editor facade.

methodactivateSheet
activateSheet(input: ActivateWorkbookSheetCommandInput): WorkbookCommandResult
input: ActivateWorkbookSheetCommandInput
methodaddSheet
addSheet(input: AddWorkbookSheetCommandInput): WorkbookCommandResult
input: AddWorkbookSheetCommandInput
methodhideSheet
hideSheet(input: HideWorkbookSheetCommandInput): WorkbookCommandResult
input: HideWorkbookSheetCommandInput
methodmoveSheet
moveSheet(input: MoveWorkbookSheetInput): WorkbookCommandResult
input: MoveWorkbookSheetInput
methodremoveSheet
removeSheet(input: RemoveWorkbookSheetCommandInput): WorkbookCommandResult
input: RemoveWorkbookSheetCommandInput
methodrenameSheet
renameSheet(input: RenameWorkbookSheetInput): WorkbookCommandResult
input: RenameWorkbookSheetInput
methodunhideSheet
unhideSheet(input: UnhideWorkbookSheetCommandInput): WorkbookCommandResult
input: UnhideWorkbookSheetCommandInput
interfaceWorkbookCommandDefinitionsource ↗
interface WorkbookCommandDefinition<Input, Result>

Stable workbook command identifier carrying its input and result contract.

property[workbookCommandInputType]
readonly [workbookCommandInputType]: Input

Phantom field that preserves the command input type for callers.

property[workbookCommandResultType]
readonly [workbookCommandResultType]: Result

Phantom field that preserves the command result type for callers.

propertyid
readonly id: string

Globally stable command id owned by the workbook assembly package.

interfaceWorkbookCommandEventsource ↗
interface WorkbookCommandEvent

Lifecycle event emitted by the workbook command bus for diagnostics and host UI.

propertyerror
readonly error?: unknown

Original thrown value when the command failed.

propertyid
readonly id: string

Stable command id being executed.

propertyphase
readonly phase: CommandExecutionPhase

Execution phase represented by this event.

interfaceWorkbookCommandResultsource ↗
interface WorkbookCommandResult

Result returned by workbook-level sheet-list commands.

propertyactiveSheetEditorChanged
readonly activeSheetEditorChanged: boolean

Whether the live active SheetEditor instance was replaced.

propertydocumentState
readonly documentState: WorkbookDocumentState<SheetDocumentState>

Latest workbook state after the command.

interfaceWorkbookCompanionSheetPluginContextsource ↗
interface WorkbookCompanionSheetPluginContext extends WorkbookPluginContext

Context used when a Workbook plugin contributes plugins to a mounted SheetEditor.

propertysheetId
readonly sheetId: string
propertysheetState
readonly sheetState: SheetDocumentState
Inherited members 2

Inherited from WorkbookPluginContext.

interfaceWorkbookCompanionSheetServicesource ↗
interface WorkbookCompanionSheetService<Value>

One typed service value contributed to a temporary child SheetEditor container.

propertytoken
readonly token: symbol
propertyvalue
readonly value: Value
interfaceWorkbookDocumentApisource ↗
interface WorkbookDocumentApi

Read-only access to the document-owned state of one WorkbookEditor.

methodgetState
getState(): WorkbookDocumentState<SheetDocumentState>

Returns the current in-memory workbook document state.

interfaceWorkbookDocumentStateSerializationOptionssource ↗
interface WorkbookDocumentStateSerializationOptions<TSheetState>

Options for workbook document-state serialization.

propertysheetRegistry
readonly sheetRegistry?: DocumentStateCodecRegistry<TSheetState>

Registry that owns Sheet document-state module serialization.

interfaceWorkbookEditorsource ↗
interface WorkbookEditor

Public workbook facade returned by createWorkbookEditor().

propertycapabilities
readonly capabilities: RuntimeCapabilityReader

Read-only access to typed services owned by this editor's isolated runtime.

propertycommands
readonly commands: WorkbookCommandBus

The supported command entry point for workbook user and program actions.

propertydocument
readonly document: WorkbookDocumentApi

Read-only access to document-owned workbook state.

propertyobservations
readonly observations: ObservationRegistry

Typed editor-local state and event observations exposed to the host.

propertysheets
readonly sheets: WorkbookSheetsApi

Read-only access to the active and mounted SheetEditor.

methoddestroy
destroy(): void

Releases the active SheetEditor, plugins, observations, commands, and editor-local services.

interfaceWorkbookEditorConfigurationsource ↗
interface WorkbookEditorConfiguration

Public configuration accepted by createWorkbookEditor().

propertyadapters
readonly adapters: SheetEditorAdapters
propertycaptureSheetSessionState
readonly captureSheetSessionState?: WorkbookSheetSessionStateCapture
propertycaptureSheetState
readonly captureSheetState?: WorkbookSheetStateCapture
propertydocumentState
readonly documentState: WorkbookDocumentState<SheetDocumentState>
propertyonCreated
readonly onCreated?: (editor: WorkbookEditor): void

One-time assembly callback for registering host-owned commands.

propertyplugins
readonly plugins?: readonly WorkbookPluginImplementation<WorkbookPlugin>[]
propertysessionState
readonly sessionState?: Readonly<Record<string, unknown>>
propertysheetEditorFactory
readonly sheetEditorFactory?: WorkbookSheetEditorFactory
propertysheetPlugins
readonly sheetPlugins?: readonly SheetPluginImplementation<SheetPlugin<unknown>>[]
propertyviewport
readonly viewport?: { height: number; width: number }
propertywarn
readonly warn?: (message: string, ...details: unknown[]): void
interfaceWorkbookFormulaBrokenReferencesource ↗
interface WorkbookFormulaBrokenReference

Dependency entry retained after a workbook formula reference becomes invalid.

propertykind
readonly kind: "broken"
propertyreason
readonly reason: WorkbookFormulaBrokenReferenceReason
propertyreference
readonly reference: WorkbookFormulaReference
propertysheetId
readonly sheetId: string
interfaceWorkbookFormulaCompiledReferenceShiftResultsource ↗
interface WorkbookFormulaCompiledReferenceShiftResult

Result of applying row/column structure edits to one compiled workbook formula.

propertychanged
readonly changed: boolean

Whether formula position, AST, dependencies, or broken-reference metadata changed.

propertycompiled
readonly compiled: CompiledWorkbookFormula

Updated compiled formula.

interfaceWorkbookFormulaObjectssource ↗
interface WorkbookFormulaObjects
propertynames
readonly names?: Readonly<Record<string, string>>
propertytables
readonly tables?: readonly WorkbookFormulaTable[]
interfaceWorkbookFormulaRecalculationResultsource ↗
interface WorkbookFormulaRecalculationResult

Result returned after recalculating dirty workbook formulas.

propertyrecalculatedCells
readonly recalculatedCells: readonly WorkbookCellReference[]

Formula cells that were evaluated and stored in the workbook result cache.

propertyremainingDirtyCells
readonly remainingDirtyCells: readonly WorkbookCellReference[]

Dirty formula cells that could not be evaluated in this pass.

interfaceWorkbookFormulaReferenceShiftResultsource ↗
interface WorkbookFormulaReferenceShiftResult

Result of shifting workbook-qualified formula references in one AST.

propertyast
readonly ast: FormulaAST

Shifted AST, or the original AST when no workbook reference changed.

propertybrokenReferences
readonly brokenReferences: readonly WorkbookFormulaReference[]

References that became invalid because the target row or column was deleted.

propertychanged
readonly changed: boolean

Whether the AST identity changed.

interfaceWorkbookFormulaSheetTransactionEventsource ↗
interface WorkbookFormulaSheetTransactionEvent

Local event emitted when a companion Sheet plugin observes a committed transaction.

propertysheetId
readonly sheetId: string

Workbook sheet id that owned the active SheetEditor when the transaction committed.

propertytransaction
readonly transaction: Transaction

Committed Sheet transaction observed from the active SheetEditor.

interfaceWorkbookFormulaStateSnapshotsource ↗
interface WorkbookFormulaStateSnapshot

State snapshot for the workbook-scoped formula runtime.

propertyactiveSheetId
readonly activeSheetId: string | null

Active sheet id in the observed workbook state.

propertycachedFormulaResultCount
readonly cachedFormulaResultCount: number

Number of derived workbook formula results currently cached.

propertydirtyFormulaCellCount
readonly dirtyFormulaCellCount: number

Number of workbook formula cells waiting for recalculation.

propertyformulaCellCount
readonly formulaCellCount: number

Number of formula cells currently indexed in the workbook dependency graph.

propertyobservedSheetTransactionCount
readonly observedSheetTransactionCount: number

Number of active-sheet transactions observed by companion Sheet plugins.

propertysheetIds
readonly sheetIds: readonly string[]

Sheet ids currently present in the observed workbook state.

propertyworkbookId
readonly workbookId: string | null

Workbook id currently observed by WorkbookFormulaPlugin.

interfaceWorkbookFormulaTablesource ↗
interface WorkbookFormulaTable
propertyheaders
readonly headers: boolean
propertyname
readonly name: string
propertyrange
readonly range: string
propertysheet
readonly sheet: string
interfaceWorkbookHistoryEntrysource ↗
interface WorkbookHistoryEntry

Workbook transaction snapshots retained independently from SheetEditor history.

propertyafter
readonly after: WorkbookTransactionState
propertybefore
readonly before: WorkbookTransactionState
propertycontentSheetIds
readonly contentSheetIds?: readonly string[]

Sheet content restored with this entry; other sheet content stays current.

interfaceWorkbookHistorySessionStatesource ↗
interface WorkbookHistorySessionState

Workbook-local undo and redo stacks.

propertyredoStack
readonly redoStack: readonly WorkbookHistoryEntry[]
propertyundoStack
readonly undoStack: readonly WorkbookHistoryEntry[]
interfaceWorkbookHistoryStatussource ↗
interface WorkbookHistoryStatus

Current workbook structure undo/redo availability.

propertycanRedo
readonly canRedo: boolean
propertycanUndo
readonly canUndo: boolean
interfaceWorkbookPluginContextsource ↗
interface WorkbookPluginContext

Context passed to Workbook plugin lifecycle hooks.

propertycontainer
readonly container: Container
propertyruntime
readonly runtime: WorkbookPluginRuntime
interfaceWorkbookPluginImplementationsource ↗
interface WorkbookPluginImplementation<TPlugin>

Injectable Workbook plugin class accepted by createWorkbookEditor().

constructorconstructor
WorkbookPluginImplementation(...args: never[]): TPlugin
args: never[]
propertysymbol
readonly symbol: symbol
methodregisterServices
registerServices(context: WorkbookPluginServiceContext): void
context: WorkbookPluginServiceContext
interfaceWorkbookPluginRuntimesource ↗
interface WorkbookPluginRuntime

Runtime services exposed to Workbook plugins for one WorkbookEditor instance.

propertycommands
readonly commands: WorkbookCommandBus
propertydocument
readonly document: WorkbookDocumentApi
propertyextensions
readonly extensions: WorkbookRuntimeExtensionRegistry
propertyformula
readonly formula: { externalServices: IFormulaExternalServiceProvider; functions: IFunctionRegistry; textServices: IFormulaTextServiceProvider; webService: WebServiceClient; xmlXPath: XmlXPathEvaluator }
propertyobservations
readonly observations: ObservationRegistry
propertysession
readonly session: SessionStateRegistry
propertysheets
readonly sheets: WorkbookSheetsApi
methodcreateCommandResult
createCommandResult(activeSheetEditorChanged: boolean): WorkbookCommandResult

Returns the current result shape for a command that performs no mutation.

activeSheetEditorChanged: boolean
methodexecuteTransaction
executeTransaction(transaction: WorkbookTransaction): WorkbookCommandResult

Commits a transaction assembled inside a typed Workbook command.

transaction: WorkbookTransaction
interfaceWorkbookPluginServiceContextsource ↗
interface WorkbookPluginServiceContext

Services available before a Workbook plugin is registered in its editor-local container.

propertycontainer
readonly container: Container
interfaceWorkbookSheetEditorFactoryInputsource ↗
interface WorkbookSheetEditorFactoryInput

Input passed when the workbook assembly creates one active SheetEditor.

propertyconfiguration
readonly configuration: SheetEditorConfiguration
propertysheetId
readonly sheetId: string
interfaceWorkbookSheetsApisource ↗
interface WorkbookSheetsApi

Read-only access to SheetEditor instances owned by one WorkbookEditor.

methodgetActiveEditor
getActiveEditor(): SheetEditor

Returns the SheetEditor mounted for the active sheet.

methodgetActiveId
getActiveId(): string

Returns the stable id of the active sheet.

methodgetEditor
getEditor(sheetId: string): SheetEditor | null

Returns the mounted SheetEditor when sheetId is active; detached sheets return null.

sheetId: string
interfaceWorkbookSheetSessionStateCaptureInputsource ↗
interface WorkbookSheetSessionStateCaptureInput

Read-only active SheetEditor session capture hook.

propertyeditor
readonly editor: SheetEditor
propertysessionState
readonly sessionState: Readonly<Record<string, unknown>> | undefined
propertysheetId
readonly sheetId: string
interfaceWorkbookSheetStateCaptureInputsource ↗
interface WorkbookSheetStateCaptureInput

Read-only active SheetEditor capture hook used by custom hosts and focused tests.

propertydocumentState
readonly documentState: WorkbookDocumentState<SheetDocumentState>
propertyeditor
readonly editor: SheetEditor
propertysheetId
readonly sheetId: string
propertysheetState
readonly sheetState: SheetDocumentState
interfaceWorkbookTransactionCommittedEventsource ↗
interface WorkbookTransactionCommittedEvent

Immutable event delivered after a complete workbook transaction commits.

propertyafter
readonly after: WorkbookTransactionState
propertybefore
readonly before: WorkbookTransactionState
propertytransaction
readonly transaction: WorkbookTransaction
interfaceWorkbookTransactionStatesource ↗
interface WorkbookTransactionState

Detached state staged by workbook transaction reducers.

propertyactiveSheetId
readonly activeSheetId: string
propertydocumentState
readonly documentState: WorkbookDocumentState<SheetDocumentState>
typeAddWorkbookSheetCommandInputsource ↗
type AddWorkbookSheetCommandInput = AddWorkbookSheetInput<SheetDocumentState> & { activate?: boolean }

Input for adding a sheet to the workbook.

typeMoveWorkbookSheetCommandInputsource ↗
type MoveWorkbookSheetCommandInput = MoveWorkbookSheetInput

Input for moving a sheet tab.

typeRemoveWorkbookSheetCommandInputsource ↗
type RemoveWorkbookSheetCommandInput = RemoveWorkbookSheetInput & { nextActiveSheetId?: WorkbookSheetId }

Input for removing a sheet from the workbook.

typeRenameWorkbookSheetCommandInputsource ↗
type RenameWorkbookSheetCommandInput = RenameWorkbookSheetInput

Input for renaming a workbook sheet.

typeWorkbookCommandDefinitionResultsource ↗
type WorkbookCommandDefinitionResult = conditional

Extracts the result contract from a typed workbook command definition.

typeWorkbookCommandHandlersource ↗
type WorkbookCommandHandler = (input: WorkbookCommandInput<Definition>): WorkbookCommandDefinitionResult<Definition>

Factory installed by the workbook assembly to run one typed command.

typeWorkbookCommandInputsource ↗
type WorkbookCommandInput = conditional

Extracts the input contract from a typed workbook command definition.

typeWorkbookCommandListenersource ↗
type WorkbookCommandListener = (event: WorkbookCommandEvent): void

Observer invoked when workbook command execution starts, completes or fails.

typeWorkbookFormulaBrokenReferenceReasonsource ↗
type WorkbookFormulaBrokenReferenceReason = typeof WorkbookFormulaBrokenReferenceReason[keyof typeof WorkbookFormulaBrokenReferenceReason]

Reason a workbook formula reference can no longer resolve.

typeWorkbookFormulaGraphReferencesource ↗
type WorkbookFormulaGraphReference = WorkbookFormulaReference | WorkbookFormulaBrokenReference

Dependency entry stored by the workbook formula graph.

typeWorkbookFormulaGraphReferenceKindsource ↗
type WorkbookFormulaGraphReferenceKind = typeof WorkbookFormulaGraphReferenceKind[keyof typeof WorkbookFormulaGraphReferenceKind]

Dependency graph reference entry kind value.

typeWorkbookHistoryActionsource ↗
type WorkbookHistoryAction = typeof WorkbookHistoryAction[keyof typeof WorkbookHistoryAction]

History behavior attached to one workbook transaction.

typeWorkbookPluginDisposersource ↗
type WorkbookPluginDisposer = (): void

Resource disposer returned by Workbook plugin lifecycle hooks.

typeWorkbookRuntimeCapabilityReadersource ↗
type WorkbookRuntimeCapabilityReader = RuntimeCapabilityReader
typeWorkbookRuntimeCapabilityTokensource ↗
type WorkbookRuntimeCapabilityToken = RuntimeCapability<T>
typeWorkbookSessionStatesource ↗
type WorkbookSessionState = SessionStateSnapshot

Opaque editor-local workbook state keyed by contributor-owned definitions.

typeWorkbookSheetEditorFactorysource ↗
type WorkbookSheetEditorFactory = (input: WorkbookSheetEditorFactoryInput): SheetEditor
typeWorkbookSheetSessionStateCapturesource ↗
type WorkbookSheetSessionStateCapture = (input: WorkbookSheetSessionStateCaptureInput): SheetSessionState | undefined
typeWorkbookSheetStateCapturesource ↗
type WorkbookSheetStateCapture = (input: WorkbookSheetStateCaptureInput): SheetDocumentState
typeWorkbookTransactionReducersource ↗
type WorkbookTransactionReducer = (state: WorkbookTransactionState): WorkbookTransactionState

One pure staged workbook mutation.

variableActivateWorkbookSheetCommandsource ↗
ActivateWorkbookSheetCommand: WorkbookCommandDefinition<ActivateWorkbookSheetCommandInput, WorkbookCommandResult>

Official command for activating a workbook sheet.

variableAddWorkbookSheetCommandsource ↗
AddWorkbookSheetCommand: WorkbookCommandDefinition<AddWorkbookSheetCommandInput, WorkbookCommandResult>

Official command for adding a sheet descriptor and sheet state payload.

variableCancelWorkbookFormulaReferencePickCommandsource ↗
CancelWorkbookFormulaReferencePickCommand: WorkbookCommandDefinition<void, void>

Cancels a pending cross-sheet reference pick.

variableCaptureWorkbookFormulaDraftCommandsource ↗
CaptureWorkbookFormulaDraftCommand: WorkbookCommandDefinition<void, void>

Retains the source formula draft before activating another sheet.

variableCaptureWorkbookSessionStateCommandsource ↗
CaptureWorkbookSessionStateCommand: WorkbookCommandDefinition<void, CaptureWorkbookSessionStateCommandResult>
variableConnectWorkbookCollaborationCommandsource ↗
ConnectWorkbookCollaborationCommand: WorkbookCommandDefinition<{ options: CollaborationConnectOptions; sheetId: string }, Promise<void>>

Connects the long-lived collaboration channel for one Workbook sheet.

variableDisconnectWorkbookCollaborationCommandsource ↗
DisconnectWorkbookCollaborationCommand: WorkbookCommandDefinition<{ sheetId: string }, void>

Disconnects one Workbook-owned collaboration channel.

variableExportWorkbookStateCommandsource ↗
ExportWorkbookStateCommand: WorkbookCommandDefinition<void, ExportWorkbookStateCommandResult>
variableHideWorkbookSheetCommandsource ↗
HideWorkbookSheetCommand: WorkbookCommandDefinition<HideWorkbookSheetCommandInput, WorkbookCommandResult>

Official command for hiding a workbook sheet.

variableMoveWorkbookSheetCommandsource ↗
MoveWorkbookSheetCommand: WorkbookCommandDefinition<MoveWorkbookSheetInput, WorkbookCommandResult>

Official command for moving a workbook sheet tab.

variablePickWorkbookFormulaReferenceCommandsource ↗
PickWorkbookFormulaReferenceCommand: WorkbookCommandDefinition<{ end: Point; start: Point }, void>

Applies a picked range to the retained formula draft.

variableRecalculateWorkbookFormulasCommandsource ↗
RecalculateWorkbookFormulasCommand: WorkbookCommandDefinition<void, RecalculateWorkbookFormulasCommandResult>

Recalculates workbook-level formulas marked dirty by cross-sheet changes.

variableRedoWorkbookCommandsource ↗
RedoWorkbookCommand: WorkbookCommandDefinition<void, void>

Re-applies the most recently reverted workbook structure mutation.

variableRemoveWorkbookDefinedNameCommandsource ↗
RemoveWorkbookDefinedNameCommand: WorkbookCommandDefinition<{ name: string }, void>
variableRemoveWorkbookFormulaTableCommandsource ↗
RemoveWorkbookFormulaTableCommand: WorkbookCommandDefinition<{ name: string }, void>
variableRemoveWorkbookSheetCommandsource ↗
RemoveWorkbookSheetCommand: WorkbookCommandDefinition<RemoveWorkbookSheetCommandInput, WorkbookCommandResult>

Official command for removing a sheet descriptor and sheet state payload.

variableRenameWorkbookSheetCommandsource ↗
RenameWorkbookSheetCommand: WorkbookCommandDefinition<RenameWorkbookSheetInput, WorkbookCommandResult>

Official command for renaming a workbook sheet.

variableRestoreWorkbookFormulaDraftCommandsource ↗
RestoreWorkbookFormulaDraftCommand: WorkbookCommandDefinition<void, void>

Restores the retained draft when the source sheet becomes active again.

variableSetWorkbookDefinedNameCommandsource ↗
SetWorkbookDefinedNameCommand: WorkbookCommandDefinition<SetWorkbookDefinedNameInput, void>
variableSetWorkbookFormulaTableCommandsource ↗
SetWorkbookFormulaTableCommand: WorkbookCommandDefinition<WorkbookFormulaTable, void>
variableUndoWorkbookCommandsource ↗
UndoWorkbookCommand: WorkbookCommandDefinition<void, void>

Reverts the most recent committed workbook structure mutation.

variableUnhideWorkbookSheetCommandsource ↗
UnhideWorkbookSheetCommand: WorkbookCommandDefinition<UnhideWorkbookSheetCommandInput, WorkbookCommandResult>

Official command for unhiding a workbook sheet.

variableWorkbookActiveSheetEditorObservationsource ↗
WorkbookActiveSheetEditorObservation: StateObservationDefinition<WorkbookActiveSheetEditorSnapshot>

Current live active SheetEditor, updated only when the mounted editor changes.

variableWorkbookActiveSheetSessionStateDefinitionsource ↗
WorkbookActiveSheetSessionStateDefinition: SessionStateDefinition<string>

Stable session identity for the locally active workbook sheet.

variableWorkbookCollaborationCapabilitysource ↗
WorkbookCollaborationCapability: WorkbookRuntimeCapabilityToken<WorkbookCollaborationSession>
variableWorkbookCollaborationTransportFactorysource ↗
WorkbookCollaborationTransportFactory: { symbol: symbol }
variableWorkbookDocumentStateObservationsource ↗
WorkbookDocumentStateObservation: StateObservationDefinition<WorkbookDocumentState<SheetDocumentState>>

Current workbook-owned metadata and per-sheet document payloads.

variableWorkbookFormulaBindingsMetadataKeysource ↗
WorkbookFormulaBindingsMetadataKey: "searsuite.workbook.formulaBindings"

Runtime metadata holding bindings restored from a durable workbook file.

variableWorkbookFormulaBrokenReferenceReasonsource ↗
WorkbookFormulaBrokenReferenceReason: { ReferenceDeleted: "referenceDeleted"; SheetDeleted: "sheetDeleted" }

Reason a workbook formula reference can no longer resolve.

variableWorkbookFormulaGraphReferenceKindsource ↗
WorkbookFormulaGraphReferenceKind: { Broken: "broken" }

Dependency graph reference entry kinds that are not normal workbook formula references.

variableWorkbookFormulaObjectsMetadataKeysource ↗
WorkbookFormulaObjectsMetadataKey: "searsuite.workbook.formulaObjects"

Metadata key owned by workbook formula evaluation.

variableWorkbookFormulaObjectsObservationsource ↗
WorkbookFormulaObjectsObservation: StateObservationDefinition<WorkbookFormulaObjects>
variableWorkbookFormulaSheetTransactionObservationsource ↗
WorkbookFormulaSheetTransactionObservation: EventObservationDefinition<WorkbookFormulaSheetTransactionEvent>

WorkbookFormulaPlugin event stream for committed active-sheet transactions.

variableWorkbookFormulaStateObservationsource ↗
WorkbookFormulaStateObservation: StateObservationDefinition<WorkbookFormulaStateSnapshot>

WorkbookFormulaPlugin state exposed to diagnostic hosts.

variableWorkbookHistoryActionsource ↗
WorkbookHistoryAction: { Ignore: "ignore"; Record: "record"; Redo: "redo"; Undo: "undo" }

Controls whether a committed workbook transaction participates in structural history.

variableWorkbookHistorySessionStateDefinitionsource ↗
WorkbookHistorySessionStateDefinition: SessionStateDefinition<WorkbookHistorySessionState>

Session identity owned by workbook structural history.

variableWorkbookHistoryStatusObservationsource ↗
WorkbookHistoryStatusObservation: StateObservationDefinition<WorkbookHistoryStatus>

Typed workbook structural history status.

variableWorkbookRuntimeCapabilitysource ↗
WorkbookRuntimeCapability: { Commands: WorkbookRuntimeCapabilityToken<WorkbookCommandBus>; Formula: WorkbookRuntimeCapabilityToken<{ externalServices: IFormulaExternalServiceProvider; functions: IFunctionRegistry; textServices: IFormulaTextServiceProvider; webService: WebServiceClient; xmlXPath: XmlXPathEvaluator }>; Observations: WorkbookRuntimeCapabilityToken<ObservationRegistry>; Platform: WorkbookRuntimeCapabilityToken<Platform>; Runtime: WorkbookRuntimeCapabilityToken<WorkbookPluginRuntime>; Session: WorkbookRuntimeCapabilityToken<SessionStateRegistry> }

Workbook capabilities registered by the default assembly root.

variableWorkbookSheetSessionsStateDefinitionsource ↗
WorkbookSheetSessionsStateDefinition: SessionStateDefinition<Readonly<Record<string, Readonly<Record<string, unknown>>>>>

Stable session identity for detached SheetEditor snapshots keyed by sheet id.

functioncreateWorkbookEditorsource ↗
createWorkbookEditor(configuration: WorkbookEditorConfiguration): WorkbookEditor

Creates a Workbook editor with an isolated DI container and plugin graph.

Workbook-owned services survive individual Sheet mounts. The editor keeps structure, collaboration channels, formula registries, and detached Sheet sessions keyed by stable Sheet identifiers.

ReturnsA Workbook facade that owns its mounted Sheet editor lifecycle.

Example
const workbook = createWorkbookEditor(configuration);
await workbook.commands.run(ActivateWorkbookSheetCommand, { sheetId });
workbook.destroy();
configuration: WorkbookEditorConfiguration

Workbook document state, host adapters, and Workbook and Sheet plugins.

functiondefineWorkbookCommandsource ↗
defineWorkbookCommand<Input, Result>(id: string): WorkbookCommandDefinition<Input, Result>

Creates an immutable workbook-owned command contract.

id: string
functiondefineWorkbookRuntimeCapabilitysource ↗
defineWorkbookRuntimeCapability<T>(id: string): WorkbookRuntimeCapabilityToken<T>

Creates a typed capability published by a Workbook plugin.

id: string
functiondeserializeWorkbookDocumentStatesource ↗
deserializeWorkbookDocumentState<TSheetState>(payload: unknown, options?: WorkbookDocumentStateSerializationOptions<TSheetState>): WorkbookDocumentState<TSheetState>

Deserializes a stable SearSuite JSON workbook file into runtime document state.

payload: unknown
options: WorkbookDocumentStateSerializationOptions<TSheetState>
functionisWorkbookFormulaBrokenReferencesource ↗
isWorkbookFormulaBrokenReference(reference: WorkbookFormulaGraphReference): reference

Reports whether one workbook formula graph reference is a retained broken reference.

reference: WorkbookFormulaGraphReference
functionregisterDefaultWorkbookCommandssource ↗
registerDefaultWorkbookCommands(commands: WorkbookCommandBus, controller: WorkbookCommandController): void

Registers the built-in workbook commands on one workbook command bus.

commands: WorkbookCommandBus
controller: WorkbookCommandController
functionregisterWorkbookPluginCapabilitiessource ↗
registerWorkbookPluginCapabilities(plugins: readonly unknown[], registry: WorkbookRuntimeExtensionRegistry): void

Publishes every typed runtime capability contributed by Workbook plugins.

plugins: readonly unknown[]
registry: WorkbookRuntimeExtensionRegistry
functionregisterWorkbookPluginCommandssource ↗
registerWorkbookPluginCommands(plugins: readonly unknown[], commands: WorkbookCommandBus): void
plugins: readonly unknown[]
commands: WorkbookCommandBus
functionregisterWorkbookPluginObservationssource ↗
registerWorkbookPluginObservations(plugins: readonly unknown[], observations: ObservationRegistry): void
plugins: readonly unknown[]
observations: ObservationRegistry
functionregisterWorkbookPluginSessionStatessource ↗
registerWorkbookPluginSessionStates(plugins: readonly unknown[], session: SessionStateRegistry): void
plugins: readonly unknown[]
session: SessionStateRegistry
functionresolveWorkbookPluginssource ↗
resolveWorkbookPlugins(container: Container, implementations: readonly WorkbookPluginImplementation<WorkbookPlugin>[]): WorkbookPlugin[]

Resolves isolated Workbook plugin singletons from one editor-local container.

container: Container
implementations: readonly WorkbookPluginImplementation<WorkbookPlugin>[]
functionserializeWorkbookDocumentStatesource ↗
serializeWorkbookDocumentState<TSheetState>(documentState: WorkbookDocumentState<TSheetState>, options?: WorkbookDocumentStateSerializationOptions<TSheetState>): SearWorkbookFile<WorkbookSheetDescriptor>

Serializes a workbook document state into the stable SearSuite JSON format.

documentState: WorkbookDocumentState<TSheetState>
options: WorkbookDocumentStateSerializationOptions<TSheetState>
variableCommandExecutionPhasesource ↗
CommandExecutionPhase: { Completed: "completed"; Failed: "failed"; Started: "started" }

Stable lifecycle phases emitted by Sheet, Doc, and Workbook command buses.