readonly contentSheetIds?: readonly string[]Sheet content restored with this entry; other sheet content stays current.
API reference
Workbook structure, Sheet mounting, workbook commands, sessions, and shared runtime services.
129 exportsderived from source
Concept 1
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
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.
class WorkbookCollaborationPlugin extends WorkbookPlugin, WorkbookCollaborationSessionOwns collaboration state beyond the lifetime of any temporary active SheetEditor.
WorkbookCollaborationPlugin(transports: WorkbookCollaborationTransportFactory, platform: Platform): WorkbookCollaborationPlugintransports: WorkbookCollaborationTransportFactoryplatform: Platformreadonly symbol: typeof symbolgetConnectedSheetIds(): readonly string[]getSheetServices(context: WorkbookCompanionSheetPluginContext): { token: symbol; value: { channel: CollaborationChannel; owner: "host" } }[]Contributes parent-owned services without exposing the child editor container.
context: WorkbookCompanionSheetPluginContextgetSheetStatus(sheetId: string): CollaborationStatus | undefinedsheetId: stringinitialize(context: WorkbookPluginContext): (): voidcontext: WorkbookPluginContextonTransactionCommitted(event: WorkbookTransactionCommittedEvent): voidevent: WorkbookTransactionCommittedEventonWorkbookDestroy(): voidregisterCapabilities(registry: WorkbookRuntimeExtensionRegistry): voidRegisters every runtime capability owned by this plugin.
registry: WorkbookRuntimeExtensionRegistryregisterCommands(commands: WorkbookCommandBus): voidRegisters every stable command id owned by this plugin.
commands: WorkbookCommandBusInherited from WorkbookPlugin.
class WorkbookCommandBusEditor-scoped command bus for workbook-level sheet-list actions.
WorkbookCommandBus(options?: WorkbookCommandBusOptions): WorkbookCommandBusCreates an empty workbook command bus.
options: WorkbookCommandBusOptionsreadonly symbol: typeof symbolDI token for the command bus owned by one WorkbookEditor.
destroy(): voidClears listeners and command registrations during teardown.
enforceRegistrationBoundary(assertWrite: (): void): voidCloses setup-time command registration after the editor is assembled.
assertWrite: (): voidgetRegisteredCommandIds(): readonly string[]Returns a stable snapshot of all workbook command ids exposed by this editor.
getRegisteredCommands(): readonly WorkbookCommandDefinition<unknown, unknown>[]Returns the typed definitions registered on this workbook editor instance.
has(definition: string | WorkbookCommandDefinition<unknown, unknown>): booleanReturns whether this workbook editor currently exposes a command id.
definition: string | WorkbookCommandDefinition<unknown, unknown>isExecuting(): booleanWhether this WorkbookEditor is currently dispatching a command.
register<Definition>(definition: Definition, handler: WorkbookCommandHandler<Definition>): (): voidRegisters one workbook command handler. The returned disposer removes the handler and is primarily useful for extension commands.
definition: Definitionhandler: WorkbookCommandHandler<Definition>run<Definition>(definition: Definition, input: WorkbookCommandInput<Definition>): WorkbookCommandDefinitionResult<Definition>Executes a registered workbook command through its typed definition.
definition: Definitioninput: WorkbookCommandInput<Definition>runWithoutMutationAuthority<Value>(callback: (): Value): ValueInvokes external observers without inheriting this editor's command write authority.
callback: (): Valuesubscribe(listener: WorkbookCommandListener): (): voidSubscribes to command lifecycle events and returns an unsubscribe function.
listener: WorkbookCommandListenerclass WorkbookFormulaDependencyGraphWorkbook-qualified dependency graph owned by WorkbookFormulaPlugin.
WorkbookFormulaDependencyGraph(): WorkbookFormulaDependencyGraphdirtySize: unknownresultSize: unknownsize: unknownclear(): voidRemoves every formula and dependency edge.
getBrokenReferences(formulaCell: WorkbookCellReference): readonly WorkbookFormulaBrokenReference[]Returns broken references owned by one formula cell.
formulaCell: WorkbookCellReferencegetDependencies(formulaCell: WorkbookCellReference): readonly WorkbookFormulaGraphReference[]Returns workbook-qualified dependencies owned by one formula cell.
formulaCell: WorkbookCellReferencegetDependents(cell: WorkbookCellReference): readonly WorkbookCellReference[]Returns formula cells that currently depend on the given workbook cell.
cell: WorkbookCellReferencegetDirtyFormulaCells(): readonly WorkbookCellReference[]Returns every workbook-qualified formula cell currently marked dirty.
getFormulaCells(): readonly WorkbookCellReference[]Returns every workbook-qualified formula cell currently registered.
getFormulaResult(formulaCell: WorkbookCellReference): FormulaValue | undefinedReturns a derived workbook formula result, or #REF! when references are broken.
formulaCell: WorkbookCellReferencehasBrokenReferences(formulaCell: WorkbookCellReference): booleanReports whether one formula cell currently contains broken references.
formulaCell: WorkbookCellReferencehasFormulaCell(formulaCell: WorkbookCellReference): booleanReports whether one workbook-qualified cell is registered as a formula cell.
formulaCell: WorkbookCellReferenceisDirty(formulaCell: WorkbookCellReference): booleanReports whether one workbook formula cell needs recalculation.
formulaCell: WorkbookCellReferencemarkDirty(changedCells: readonly WorkbookCellReference[]): readonly WorkbookCellReference[]Marks formulas that depend on changed workbook cells as dirty, including transitive formula chains.
changedCells: readonly WorkbookCellReference[]markFormulaCellsDirty(formulaCells: readonly WorkbookCellReference[]): voidMarks formula cells themselves dirty after an external evaluation service changes.
formulaCells: readonly WorkbookCellReference[]removeFormulaCell(formulaCell: WorkbookCellReference): voidRemoves one formula cell and every reverse edge it owns.
formulaCell: WorkbookCellReferenceremoveSheet(sheetId: string): voidRemoves formulas on a deleted sheet and marks references to that sheet as broken.
sheetId: stringsetFormulaResult(formulaCell: WorkbookCellReference, result: FormulaValue): voidStores a derived workbook formula result and marks the formula clean.
formulaCell: WorkbookCellReferenceresult: FormulaValueupdateFormulaCell(formulaCell: WorkbookCellReference, dependencies: readonly WorkbookFormulaReference[]): voidRegisters dependencies for one workbook-qualified formula cell.
formulaCell: WorkbookCellReferencedependencies: readonly WorkbookFormulaReference[]updateFormulaCellReferences(formulaCell: WorkbookCellReference, dependencies: readonly WorkbookFormulaGraphReference[]): voidRegisters graph references for one formula cell, including broken references.
formulaCell: WorkbookCellReferencedependencies: readonly WorkbookFormulaGraphReference[]class WorkbookFormulaEvaluationRuntimeRuntime adapter that evaluates workbook formulas through the shared formula engine.
WorkbookFormulaEvaluationRuntime(input?: { contextServices?: (): { dateTimeLocale?: FormulaDateTimeLocale; externalServices?: FormulaExternalServiceReader; languageService?: FormulaLanguageService; phoneticReader?: FormulaPhoneticReader; textLocale?: FormulaTextLocale; xmlXPath?: XmlXPathEvaluator }; evaluator?: IFormulaEvaluator; parser?: IFormulaParser }): WorkbookFormulaEvaluationRuntimeCreates a workbook formula evaluation runtime.
input: { contextServices?: (): { dateTimeLocale?: FormulaDateTimeLocale; externalServices?: FormulaExternalServiceReader; languageService?: FormulaLanguageService; phoneticReader?: FormulaPhoneticReader; textLocale?: FormulaTextLocale; xmlXPath?: XmlXPathEvaluator }; evaluator?: IFormulaEvaluator; parser?: IFormulaParser }compileFormula(formulaCell: WorkbookCellReference, source: string, workbookState: WorkbookDocumentState<SheetDocumentState>): CompiledWorkbookFormulaCompiles formula text into native AST plus stable workbook dependencies.
formulaCell: WorkbookCellReferencesource: stringworkbookState: WorkbookDocumentState<SheetDocumentState>formatFormulaSource(compiled: CompiledWorkbookFormula, workbookState: WorkbookDocumentState<SheetDocumentState>): stringFormats workbook formula source with current sheet names while keeping stable sheet-id bindings.
compiled: CompiledWorkbookFormulaworkbookState: WorkbookDocumentState<SheetDocumentState>recalculateDirty(input: { formulas: ReadonlyMap<string, CompiledWorkbookFormula>; graph: WorkbookFormulaDependencyGraph; runtime: WorkbookPluginRuntime }): WorkbookFormulaRecalculationResultRecalculates dirty formula cells whose dependencies are currently clean.
input: { formulas: ReadonlyMap<string, CompiledWorkbookFormula>; graph: WorkbookFormulaDependencyGraph; runtime: WorkbookPluginRuntime }shiftCompiledFormulaReferences(input: { changedSheetId: string; changes: readonly StructureChange[]; compiled: CompiledWorkbookFormula; formulaCell: WorkbookCellReference }): WorkbookFormulaCompiledReferenceShiftResultShifts compiled formula references after a row or column structure change.
input: { changedSheetId: string; changes: readonly StructureChange[]; compiled: CompiledWorkbookFormula; formulaCell: WorkbookCellReference }class WorkbookFormulaObjectsPlugin extends WorkbookPluginWorkbook-owned editing surface for named formulas and table references.
WorkbookFormulaObjectsPlugin(): WorkbookFormulaObjectsPluginreadonly symbol: typeof symbolinitialize(context: WorkbookPluginContext): voidcontext: WorkbookPluginContextonTransactionCommitted(): voidonWorkbookDestroy(): voidregisterCommands(commands: WorkbookCommandBus): voidRegisters every stable command id owned by this plugin.
commands: WorkbookCommandBusregisterObservations(observations: ObservationRegistry): voidRegisters every typed state and event observation source owned by this plugin.
observations: ObservationRegistryInherited from WorkbookPlugin.
class WorkbookFormulaPlugin extends WorkbookPluginWorkbook-level formula coordinator and cross-sheet dependency owner.
WorkbookFormulaPlugin(): WorkbookFormulaPluginreadonly symbol: typeof symbolassertSheetRangeMoveSupported(sheetId: string, context: SheetRangeMoveContext): voidRejects moves requiring reference edits outside the current Sheet transaction boundary.
sheetId: stringcontext: SheetRangeMoveContextassertSheetStructureMoveSupported(sheetId: string, context: SheetStructureMoveContext): voidRejects qualified reference rewrites that cannot be persisted by a single Sheet transaction.
sheetId: stringcontext: SheetStructureMoveContextformatReference(reference: ParsedWorkbookFormulaReference): stringFormats a stable workbook reference with the latest workbook sheet name.
reference: ParsedWorkbookFormulaReferencegetDependencyGraph(): WorkbookFormulaDependencyGraphReaderReturns the workbook-qualified dependency graph owned by this plugin instance.
getFormulaResult(formulaCell: ParsedWorkbookFormulaReference): FormulaValue | undefinedReturns a workbook-level formula result when the skeleton can determine one.
formulaCell: ParsedWorkbookFormulaReferencegetSheetFormulaResult(sheetId: string, row: number, col: number): FormulaValue | undefinedReturns a result only for formula cells that contain workbook-qualified references.
sheetId: stringrow: numbercol: numbergetSheetFormulaSource(sheetId: string, row: number, col: number): string | undefinedReturns display-ready formula source for workbook formulas on one mounted sheet.
sheetId: stringrow: numbercol: numbergetSheetPlugins(context: WorkbookCompanionSheetPluginContext): readonly SheetPluginImplementation<SheetPlugin<unknown>>[]Contributes the active-sheet companion that forwards committed Sheet transactions.
context: WorkbookCompanionSheetPluginContextgetSheetServices(context: WorkbookCompanionSheetPluginContext): readonly { token: symbol; value: unknown }[]Shares the workbook function registry with each mounted Sheet editor.
context: WorkbookCompanionSheetPluginContextinitialize(context: WorkbookPluginContext): (): voidStarts observing workbook state for this WorkbookEditor instance.
context: WorkbookPluginContextobserveSheetTransaction(sheetId: string, transaction: Transaction): voidReceives a committed Sheet transaction from the active SheetEditor companion.
sheetId: stringtransaction: TransactionparseReference(reference: string): ParsedWorkbookFormulaReferenceParses a displayed cross-sheet reference against the latest workbook sheet names.
reference: stringrecalculateDirtyFormulas(): RecalculateWorkbookFormulasCommandResultRecalculates workbook formulas currently marked dirty.
registerCommands(commands: WorkbookCommandBus): voidRegisters workbook formula commands.
commands: WorkbookCommandBusregisterObservations(observations: ObservationRegistry): voidRegisters workbook formula diagnostic observations.
observations: ObservationRegistryremoveFormulaCell(formulaCell: WorkbookCellReference): voidRemoves workbook formula bookkeeping for one formula cell.
formulaCell: WorkbookCellReferencesetFormulaCellFormula(formulaCell: ParsedWorkbookFormulaReference, formulaSource: string): voidRegisters and compiles one workbook formula source.
formulaCell: ParsedWorkbookFormulaReferenceformulaSource: stringsetFormulaResult(formulaCell: ParsedWorkbookFormulaReference, result: FormulaValue): voidStores a derived workbook formula result and marks the formula clean.
formulaCell: ParsedWorkbookFormulaReferenceresult: FormulaValueupdateFormulaCell(formulaCell: ParsedWorkbookFormulaReference, dependencies: readonly WorkbookFormulaReference[]): voidRegisters workbook-qualified dependencies for one formula cell.
formulaCell: ParsedWorkbookFormulaReferencedependencies: readonly WorkbookFormulaReference[]registerServices(__namedParameters: WorkbookPluginServiceContext): voidRegisters one workbook-owned formula runtime shared by mounted Sheet editors.
__namedParameters: WorkbookPluginServiceContextInherited from WorkbookPlugin.
class WorkbookFormulaReferenceShifterShifts workbook-qualified AST references for one structurally changed sheet.
WorkbookFormulaReferenceShifter(): WorkbookFormulaReferenceShiftershiftReferences(input: { ast: FormulaAST; changedSheetId: string; changes: readonly StructureChange[]; sheetBindings: ReadonlyMap<string, string> }): WorkbookFormulaReferenceShiftResultShifts workbook references whose stable binding points at the changed sheet.
input: { ast: FormulaAST; changedSheetId: string; changes: readonly StructureChange[]; sheetBindings: ReadonlyMap<string, string> }class WorkbookHistoryPlugin extends WorkbookPluginBuilt-in contributor for workbook structure and declared multi-sheet content history.
WorkbookHistoryPlugin(): WorkbookHistoryPluginreadonly symbol: typeof symbolgetContentMoveStatus(): WorkbookHistoryStatusExposes only multi-sheet content entries to the mounted Sheet history adapter.
getStatus(): WorkbookHistoryStatusinitialize(context: WorkbookPluginContext): voidcontext: WorkbookPluginContextonTransactionCommitted(event: WorkbookTransactionCommittedEvent): voidevent: WorkbookTransactionCommittedEventonWorkbookDestroy(): voidregisterCommands(commands: WorkbookCommandBus): voidRegisters every stable command id owned by this plugin.
commands: WorkbookCommandBusregisterObservations(observations: ObservationRegistry): voidRegisters every typed state and event observation source owned by this plugin.
observations: ObservationRegistryregisterSessionState(registry: SessionStateRegistry): voidRegisters every local session value owned by this plugin.
registry: SessionStateRegistrysubscribe(listener: (status: WorkbookHistoryStatus): void): (): voidlistener: (status: WorkbookHistoryStatus): voidInherited from WorkbookPlugin.
class WorkbookPlugin extends PluginExtension<WorkbookCommandBus, ObservationRegistry, SessionStateRegistry, WorkbookRuntimeExtensionRegistry>Base contract for plugins owned by createWorkbookEditor().
WorkbookPlugin(): WorkbookPluginenforceRuntimeWriteBoundary(assertWrite: (): void): voidCloses plugin-owned runtime mutations after Workbook assembly.
assertWrite: (): voidgetSheetPlugins(context: WorkbookCompanionSheetPluginContext): readonly SheetPluginImplementation<SheetPlugin<unknown>>[]context: WorkbookCompanionSheetPluginContextgetSheetServices(context: WorkbookCompanionSheetPluginContext): readonly WorkbookCompanionSheetService<unknown>[]Contributes parent-owned services without exposing the child editor container.
context: WorkbookCompanionSheetPluginContextinitialize(context: WorkbookPluginContext): void | WorkbookPluginDisposercontext: WorkbookPluginContextonBeforeSheetActivation(input: ActivateWorkbookSheetCommandInput): voidRuns inside the activation command before the source Sheet is captured.
input: ActivateWorkbookSheetCommandInputonSheetActivationFailed(input: ActivateWorkbookSheetCommandInput): voidRestores plugin-local work if activation fails before commit.
input: ActivateWorkbookSheetCommandInputonTransactionCommitted(event: WorkbookTransactionCommittedEvent): voidevent: WorkbookTransactionCommittedEventonWorkbookDestroy(context: WorkbookPluginContext): voidcontext: WorkbookPluginContextregisterCapabilities(registry: WorkbookRuntimeExtensionRegistry): voidRegisters every runtime capability owned by this plugin.
registry: WorkbookRuntimeExtensionRegistryregisterCommands(commands: WorkbookCommandBus): voidRegisters every stable command id owned by this plugin.
commands: WorkbookCommandBusregisterObservations(observations: ObservationRegistry): voidRegisters every typed state and event observation source owned by this plugin.
observations: ObservationRegistryregisterSessionState(registry: SessionStateRegistry): voidRegisters every local session value owned by this plugin.
registry: SessionStateRegistryregisterServices(context: WorkbookPluginServiceContext): voidcontext: WorkbookPluginServiceContextclass WorkbookRangeMoveError extends SearErrorPrevents a same-sheet move from leaving workbook-qualified references stale.
WorkbookRangeMoveError(sheetId: string): WorkbookRangeMoveErrorsheetId: stringreadonly code: "WORKBOOK_RANGE_MOVE_QUALIFIED_REFERENCE"Stable machine-readable identifier for this error category.
Inherited from SearError.
class WorkbookRuntimeExtensionRegistry extends RuntimeCapabilityRegistryEditor-local capability registry exposed through WorkbookEditor.capabilities.
WorkbookRuntimeExtensionRegistry(): WorkbookRuntimeExtensionRegistryreadonly symbol: typeof symbolInherited from RuntimeCapabilityRegistry.
class WorkbookSessionStoreOwns built-in workbook session values without exposing their shape to aggregate capture.
WorkbookSessionStore(documentState: WorkbookDocumentState): WorkbookSessionStoredocumentState: WorkbookDocumentStatereadonly symbol: typeof symbolbindActiveSheetCapture(capture: (): { sheetId: string; state?: Readonly<Record<string, unknown>> }): voidcapture: (): { sheetId: string; state?: Readonly<Record<string, unknown>> }clear(lifecycleToken?: object): voidlifecycleToken: objectenforceCommandBoundary(isExecuting: (): boolean, lifecycleToken: object): voidRestricts runtime session changes to this editor's command dispatch.
isExecuting: (): booleanlifecycleToken: objectgetActiveSheetId(): stringgetSheetSessionState(sheetId: string): Readonly<Record<string, unknown>> | undefinedsheetId: stringregisterSessionState(registry: SessionStateRegistry): voidRegisters the built-in contributors beside third-party workbook contributors.
registry: SessionStateRegistryremoveMissingSheets(liveSheetIds: ReadonlySet<string>, ownerToken?: object): voidliveSheetIds: ReadonlySet<string>ownerToken: objectsetActiveSheetId(sheetId: string, ownerToken?: object): voidsheetId: stringownerToken: objectsetSheetSessionState(sheetId: string, state: Readonly<Record<string, unknown>> | undefined, ownerToken?: object): voidsheetId: stringstate: Readonly<Record<string, unknown>> | undefinedownerToken: objectvalidate(documentState: WorkbookDocumentState): voiddocumentState: WorkbookDocumentStateclass WorkbookStructureMoveError extends SearErrorPrevents an axis move from leaving qualified reference sources outside its transaction stale.
WorkbookStructureMoveError(sheetId: string): WorkbookStructureMoveErrorsheetId: stringreadonly code: "WORKBOOK_STRUCTURE_MOVE_QUALIFIED_REFERENCE"Stable machine-readable identifier for this error category.
Inherited from SearError.
class WorkbookTransactionOrdered, atomic workbook mutation assembled inside a typed command handler. Reducers stage state only; the WorkbookEditor owns validation and commit.
WorkbookTransaction(id: string, historyAction?: WorkbookHistoryAction, contentSheetIds?: readonly string[]): WorkbookTransactionid: stringhistoryAction: WorkbookHistoryActioncontentSheetIds: readonly string[]Sheet states whose before/after snapshots belong to this history entry.
readonly contentSheetIds: readonly string[]readonly historyAction: WorkbookHistoryActionreadonly id: stringaddStep(name: string, reduce: WorkbookTransactionReducer): thisAdds one pure reducer to the staged transaction.
name: stringreduce: WorkbookTransactionReducergetStepNames(): readonly string[]Returns stable step names for diagnostics and tests.
interface ActivateWorkbookSheetCommandInputInput for activating a workbook sheet.
readonly sheetId: stringSheet id to make active.
interface CaptureWorkbookSessionStateCommandResultCaptured local state for remounting one WorkbookEditor runtime.
readonly sessionState: WorkbookSessionStateinterface CompiledWorkbookFormulaCompiled workbook formula with native workbook-reference AST nodes.
readonly ast: FormulaASTParsed AST consumed by the configured formula evaluator.
readonly brokenReferences: readonly WorkbookFormulaBrokenReference[]References that are already known to be invalid.
readonly dependencies: readonly WorkbookFormulaReference[]Stable workbook dependencies extracted from the AST.
readonly hasExpandedObjects?: booleanreadonly hasWorkbookReferences: booleanWhether the formula contains at least one workbook-qualified reference.
readonly sheetBindings: ReadonlyMap<string, string>Formula-text sheet names bound to stable sheet ids at compile time.
readonly source: stringOriginal user-authored formula source.
interface ExportWorkbookStateCommandResultCurrent workbook-owned document snapshot.
readonly documentState: WorkbookDocumentState<SheetDocumentState>interface HideWorkbookSheetCommandInputInput for hiding a workbook sheet.
readonly nextActiveSheetId?: stringOptional active sheet to select when hiding the current active sheet.
readonly sheetId: stringSheet id to hide.
interface RecalculateWorkbookFormulasCommandResultResult returned after recalculating workbook-level dirty formulas.
readonly recalculatedCells: readonly WorkbookCellReference[]Formula cells recalculated by this command.
readonly remainingDirtyCells: readonly WorkbookCellReference[]Formula cells still dirty after the command completes.
interface SetWorkbookDefinedNameInputinterface UnhideWorkbookSheetCommandInputInput for unhiding a workbook sheet.
readonly sheetId: stringSheet id to reveal.
interface WorkbookActiveSheetEditorSnapshotCurrent live SheetEditor mounted by one WorkbookEditor instance.
interface WorkbookCollaborationSessionRead-only host facade for Workbook-owned collaboration channels.
getConnectedSheetIds(): readonly string[]getSheetStatus(sheetId: string): CollaborationStatus | undefinedsheetId: stringinterface WorkbookCollaborationTransportFactoryCreates one transport per Workbook-owned Sheet collaboration channel.
create(): CollabTransportinterface WorkbookCommandBusOptionsOptional diagnostics hooks used by the workbook command bus.
readonly warn?: (message: string, ...details: unknown[]): voidReceives non-fatal command-boundary diagnostics.
interface WorkbookCommandControllerInternal controller API implemented by the workbook editor facade.
activateSheet(input: ActivateWorkbookSheetCommandInput): WorkbookCommandResultinput: ActivateWorkbookSheetCommandInputaddSheet(input: AddWorkbookSheetCommandInput): WorkbookCommandResultinput: AddWorkbookSheetCommandInputhideSheet(input: HideWorkbookSheetCommandInput): WorkbookCommandResultinput: HideWorkbookSheetCommandInputmoveSheet(input: MoveWorkbookSheetInput): WorkbookCommandResultinput: MoveWorkbookSheetInputremoveSheet(input: RemoveWorkbookSheetCommandInput): WorkbookCommandResultinput: RemoveWorkbookSheetCommandInputrenameSheet(input: RenameWorkbookSheetInput): WorkbookCommandResultinput: RenameWorkbookSheetInputunhideSheet(input: UnhideWorkbookSheetCommandInput): WorkbookCommandResultinput: UnhideWorkbookSheetCommandInputinterface WorkbookCommandDefinition<Input, Result>Stable workbook command identifier carrying its input and result contract.
readonly [workbookCommandInputType]: InputPhantom field that preserves the command input type for callers.
readonly [workbookCommandResultType]: ResultPhantom field that preserves the command result type for callers.
readonly id: stringGlobally stable command id owned by the workbook assembly package.
interface WorkbookCommandEventLifecycle event emitted by the workbook command bus for diagnostics and host UI.
interface WorkbookCommandResultResult returned by workbook-level sheet-list commands.
readonly activeSheetEditorChanged: booleanWhether the live active SheetEditor instance was replaced.
readonly documentState: WorkbookDocumentState<SheetDocumentState>Latest workbook state after the command.
interface WorkbookCompanionSheetPluginContext extends WorkbookPluginContextContext used when a Workbook plugin contributes plugins to a mounted SheetEditor.
readonly sheetId: stringreadonly sheetState: SheetDocumentStateinterface WorkbookCompanionSheetService<Value>One typed service value contributed to a temporary child SheetEditor container.
interface WorkbookDocumentApiRead-only access to the document-owned state of one WorkbookEditor.
getState(): WorkbookDocumentState<SheetDocumentState>Returns the current in-memory workbook document state.
interface WorkbookDocumentStateSerializationOptions<TSheetState>Options for workbook document-state serialization.
readonly sheetRegistry?: DocumentStateCodecRegistry<TSheetState>Registry that owns Sheet document-state module serialization.
interface WorkbookEditorPublic workbook facade returned by createWorkbookEditor().
readonly capabilities: RuntimeCapabilityReaderRead-only access to typed services owned by this editor's isolated runtime.
readonly commands: WorkbookCommandBusThe supported command entry point for workbook user and program actions.
readonly document: WorkbookDocumentApiRead-only access to document-owned workbook state.
readonly observations: ObservationRegistryTyped editor-local state and event observations exposed to the host.
readonly sheets: WorkbookSheetsApiRead-only access to the active and mounted SheetEditor.
destroy(): voidReleases the active SheetEditor, plugins, observations, commands, and editor-local services.
interface WorkbookEditorConfigurationPublic configuration accepted by createWorkbookEditor().
readonly adapters: SheetEditorAdaptersreadonly captureSheetSessionState?: WorkbookSheetSessionStateCapturereadonly captureSheetState?: WorkbookSheetStateCapturereadonly documentState: WorkbookDocumentState<SheetDocumentState>readonly onCreated?: (editor: WorkbookEditor): voidOne-time assembly callback for registering host-owned commands.
readonly plugins?: readonly WorkbookPluginImplementation<WorkbookPlugin>[]readonly sessionState?: Readonly<Record<string, unknown>>readonly sheetEditorFactory?: WorkbookSheetEditorFactoryreadonly sheetPlugins?: readonly SheetPluginImplementation<SheetPlugin<unknown>>[]readonly viewport?: { height: number; width: number }readonly warn?: (message: string, ...details: unknown[]): voidinterface WorkbookFormulaBrokenReferenceDependency entry retained after a workbook formula reference becomes invalid.
interface WorkbookFormulaCompiledReferenceShiftResultResult of applying row/column structure edits to one compiled workbook formula.
interface WorkbookFormulaObjectsinterface WorkbookFormulaRecalculationResultResult returned after recalculating dirty workbook formulas.
readonly recalculatedCells: readonly WorkbookCellReference[]Formula cells that were evaluated and stored in the workbook result cache.
readonly remainingDirtyCells: readonly WorkbookCellReference[]Dirty formula cells that could not be evaluated in this pass.
interface WorkbookFormulaReferenceShiftResultResult of shifting workbook-qualified formula references in one AST.
readonly ast: FormulaASTShifted AST, or the original AST when no workbook reference changed.
readonly brokenReferences: readonly WorkbookFormulaReference[]References that became invalid because the target row or column was deleted.
readonly changed: booleanWhether the AST identity changed.
interface WorkbookFormulaSheetTransactionEventLocal event emitted when a companion Sheet plugin observes a committed transaction.
readonly sheetId: stringWorkbook sheet id that owned the active SheetEditor when the transaction committed.
readonly transaction: TransactionCommitted Sheet transaction observed from the active SheetEditor.
interface WorkbookFormulaStateSnapshotState snapshot for the workbook-scoped formula runtime.
readonly activeSheetId: string | nullActive sheet id in the observed workbook state.
readonly cachedFormulaResultCount: numberNumber of derived workbook formula results currently cached.
readonly dirtyFormulaCellCount: numberNumber of workbook formula cells waiting for recalculation.
readonly formulaCellCount: numberNumber of formula cells currently indexed in the workbook dependency graph.
readonly observedSheetTransactionCount: numberNumber of active-sheet transactions observed by companion Sheet plugins.
readonly sheetIds: readonly string[]Sheet ids currently present in the observed workbook state.
readonly workbookId: string | nullWorkbook id currently observed by WorkbookFormulaPlugin.
interface WorkbookFormulaTableinterface WorkbookHistoryEntryWorkbook transaction snapshots retained independently from SheetEditor history.
readonly after: WorkbookTransactionStatereadonly before: WorkbookTransactionStatereadonly contentSheetIds?: readonly string[]Sheet content restored with this entry; other sheet content stays current.
interface WorkbookHistorySessionStateWorkbook-local undo and redo stacks.
interface WorkbookHistoryStatusCurrent workbook structure undo/redo availability.
interface WorkbookPluginContextContext passed to Workbook plugin lifecycle hooks.
interface WorkbookPluginImplementation<TPlugin>Injectable Workbook plugin class accepted by createWorkbookEditor().
WorkbookPluginImplementation(...args: never[]): TPluginargs: never[]readonly symbol: symbolregisterServices(context: WorkbookPluginServiceContext): voidcontext: WorkbookPluginServiceContextinterface WorkbookPluginRuntimeRuntime services exposed to Workbook plugins for one WorkbookEditor instance.
readonly commands: WorkbookCommandBusreadonly document: WorkbookDocumentApireadonly extensions: WorkbookRuntimeExtensionRegistryreadonly formula: { externalServices: IFormulaExternalServiceProvider; functions: IFunctionRegistry; textServices: IFormulaTextServiceProvider; webService: WebServiceClient; xmlXPath: XmlXPathEvaluator }readonly observations: ObservationRegistryreadonly session: SessionStateRegistryreadonly sheets: WorkbookSheetsApicreateCommandResult(activeSheetEditorChanged: boolean): WorkbookCommandResultReturns the current result shape for a command that performs no mutation.
activeSheetEditorChanged: booleanexecuteTransaction(transaction: WorkbookTransaction): WorkbookCommandResultCommits a transaction assembled inside a typed Workbook command.
transaction: WorkbookTransactioninterface WorkbookPluginServiceContextServices available before a Workbook plugin is registered in its editor-local container.
readonly container: Containerinterface WorkbookSheetEditorFactoryInputInput passed when the workbook assembly creates one active SheetEditor.
readonly configuration: SheetEditorConfigurationreadonly sheetId: stringinterface WorkbookSheetsApiRead-only access to SheetEditor instances owned by one WorkbookEditor.
getActiveEditor(): SheetEditorReturns the SheetEditor mounted for the active sheet.
getActiveId(): stringReturns the stable id of the active sheet.
getEditor(sheetId: string): SheetEditor | nullReturns the mounted SheetEditor when sheetId is active; detached sheets return null.
sheetId: stringinterface WorkbookSheetSessionStateCaptureInputRead-only active SheetEditor session capture hook.
readonly editor: SheetEditorreadonly sessionState: Readonly<Record<string, unknown>> | undefinedreadonly sheetId: stringinterface WorkbookSheetStateCaptureInputRead-only active SheetEditor capture hook used by custom hosts and focused tests.
readonly documentState: WorkbookDocumentState<SheetDocumentState>readonly editor: SheetEditorreadonly sheetId: stringreadonly sheetState: SheetDocumentStateinterface WorkbookTransactionCommittedEventImmutable event delivered after a complete workbook transaction commits.
readonly after: WorkbookTransactionStatereadonly before: WorkbookTransactionStatereadonly transaction: WorkbookTransactioninterface WorkbookTransactionStateDetached state staged by workbook transaction reducers.
readonly activeSheetId: stringreadonly documentState: WorkbookDocumentState<SheetDocumentState>type AddWorkbookSheetCommandInput = AddWorkbookSheetInput<SheetDocumentState> & { activate?: boolean }Input for adding a sheet to the workbook.
type MoveWorkbookSheetCommandInput = MoveWorkbookSheetInputInput for moving a sheet tab.
type RemoveWorkbookSheetCommandInput = RemoveWorkbookSheetInput & { nextActiveSheetId?: WorkbookSheetId }Input for removing a sheet from the workbook.
type RenameWorkbookSheetCommandInput = RenameWorkbookSheetInputInput for renaming a workbook sheet.
type WorkbookCommandDefinitionResult = conditionalExtracts the result contract from a typed workbook command definition.
type WorkbookCommandHandler = (input: WorkbookCommandInput<Definition>): WorkbookCommandDefinitionResult<Definition>Factory installed by the workbook assembly to run one typed command.
type WorkbookCommandInput = conditionalExtracts the input contract from a typed workbook command definition.
type WorkbookCommandListener = (event: WorkbookCommandEvent): voidObserver invoked when workbook command execution starts, completes or fails.
type WorkbookFormulaBrokenReferenceReason = typeof WorkbookFormulaBrokenReferenceReason[keyof typeof WorkbookFormulaBrokenReferenceReason]Reason a workbook formula reference can no longer resolve.
type WorkbookFormulaGraphReference = WorkbookFormulaReference | WorkbookFormulaBrokenReferenceDependency entry stored by the workbook formula graph.
type WorkbookFormulaGraphReferenceKind = typeof WorkbookFormulaGraphReferenceKind[keyof typeof WorkbookFormulaGraphReferenceKind]Dependency graph reference entry kind value.
type WorkbookHistoryAction = typeof WorkbookHistoryAction[keyof typeof WorkbookHistoryAction]History behavior attached to one workbook transaction.
type WorkbookPluginDisposer = (): voidResource disposer returned by Workbook plugin lifecycle hooks.
type WorkbookRuntimeCapabilityReader = RuntimeCapabilityReadertype WorkbookRuntimeCapabilityToken = RuntimeCapability<T>type WorkbookSessionState = SessionStateSnapshotOpaque editor-local workbook state keyed by contributor-owned definitions.
type WorkbookSheetEditorFactory = (input: WorkbookSheetEditorFactoryInput): SheetEditortype WorkbookSheetSessionStateCapture = (input: WorkbookSheetSessionStateCaptureInput): SheetSessionState | undefinedtype WorkbookSheetStateCapture = (input: WorkbookSheetStateCaptureInput): SheetDocumentStatetype WorkbookTransactionReducer = (state: WorkbookTransactionState): WorkbookTransactionStateOne pure staged workbook mutation.
ActivateWorkbookSheetCommand: WorkbookCommandDefinition<ActivateWorkbookSheetCommandInput, WorkbookCommandResult>Official command for activating a workbook sheet.
AddWorkbookSheetCommand: WorkbookCommandDefinition<AddWorkbookSheetCommandInput, WorkbookCommandResult>Official command for adding a sheet descriptor and sheet state payload.
CancelWorkbookFormulaReferencePickCommand: WorkbookCommandDefinition<void, void>Cancels a pending cross-sheet reference pick.
CaptureWorkbookFormulaDraftCommand: WorkbookCommandDefinition<void, void>Retains the source formula draft before activating another sheet.
CaptureWorkbookSessionStateCommand: WorkbookCommandDefinition<void, CaptureWorkbookSessionStateCommandResult>ConnectWorkbookCollaborationCommand: WorkbookCommandDefinition<{ options: CollaborationConnectOptions; sheetId: string }, Promise<void>>Connects the long-lived collaboration channel for one Workbook sheet.
DisconnectWorkbookCollaborationCommand: WorkbookCommandDefinition<{ sheetId: string }, void>Disconnects one Workbook-owned collaboration channel.
ExportWorkbookStateCommand: WorkbookCommandDefinition<void, ExportWorkbookStateCommandResult>HideWorkbookSheetCommand: WorkbookCommandDefinition<HideWorkbookSheetCommandInput, WorkbookCommandResult>Official command for hiding a workbook sheet.
MoveWorkbookSheetCommand: WorkbookCommandDefinition<MoveWorkbookSheetInput, WorkbookCommandResult>Official command for moving a workbook sheet tab.
PickWorkbookFormulaReferenceCommand: WorkbookCommandDefinition<{ end: Point; start: Point }, void>Applies a picked range to the retained formula draft.
RecalculateWorkbookFormulasCommand: WorkbookCommandDefinition<void, RecalculateWorkbookFormulasCommandResult>Recalculates workbook-level formulas marked dirty by cross-sheet changes.
RedoWorkbookCommand: WorkbookCommandDefinition<void, void>Re-applies the most recently reverted workbook structure mutation.
RemoveWorkbookDefinedNameCommand: WorkbookCommandDefinition<{ name: string }, void>RemoveWorkbookFormulaTableCommand: WorkbookCommandDefinition<{ name: string }, void>RemoveWorkbookSheetCommand: WorkbookCommandDefinition<RemoveWorkbookSheetCommandInput, WorkbookCommandResult>Official command for removing a sheet descriptor and sheet state payload.
RenameWorkbookSheetCommand: WorkbookCommandDefinition<RenameWorkbookSheetInput, WorkbookCommandResult>Official command for renaming a workbook sheet.
RestoreWorkbookFormulaDraftCommand: WorkbookCommandDefinition<void, void>Restores the retained draft when the source sheet becomes active again.
SetWorkbookDefinedNameCommand: WorkbookCommandDefinition<SetWorkbookDefinedNameInput, void>SetWorkbookFormulaTableCommand: WorkbookCommandDefinition<WorkbookFormulaTable, void>UndoWorkbookCommand: WorkbookCommandDefinition<void, void>Reverts the most recent committed workbook structure mutation.
UnhideWorkbookSheetCommand: WorkbookCommandDefinition<UnhideWorkbookSheetCommandInput, WorkbookCommandResult>Official command for unhiding a workbook sheet.
WorkbookActiveSheetEditorObservation: StateObservationDefinition<WorkbookActiveSheetEditorSnapshot>Current live active SheetEditor, updated only when the mounted editor changes.
WorkbookActiveSheetSessionStateDefinition: SessionStateDefinition<string>Stable session identity for the locally active workbook sheet.
WorkbookCollaborationCapability: WorkbookRuntimeCapabilityToken<WorkbookCollaborationSession>WorkbookCollaborationTransportFactory: { symbol: symbol }WorkbookDocumentStateObservation: StateObservationDefinition<WorkbookDocumentState<SheetDocumentState>>Current workbook-owned metadata and per-sheet document payloads.
WorkbookFormulaBindingsMetadataKey: "searsuite.workbook.formulaBindings"Runtime metadata holding bindings restored from a durable workbook file.
WorkbookFormulaBrokenReferenceReason: { ReferenceDeleted: "referenceDeleted"; SheetDeleted: "sheetDeleted" }Reason a workbook formula reference can no longer resolve.
WorkbookFormulaGraphReferenceKind: { Broken: "broken" }Dependency graph reference entry kinds that are not normal workbook formula references.
WorkbookFormulaObjectsMetadataKey: "searsuite.workbook.formulaObjects"Metadata key owned by workbook formula evaluation.
WorkbookFormulaObjectsObservation: StateObservationDefinition<WorkbookFormulaObjects>WorkbookFormulaSheetTransactionObservation: EventObservationDefinition<WorkbookFormulaSheetTransactionEvent>WorkbookFormulaPlugin event stream for committed active-sheet transactions.
WorkbookFormulaStateObservation: StateObservationDefinition<WorkbookFormulaStateSnapshot>WorkbookFormulaPlugin state exposed to diagnostic hosts.
WorkbookHistoryAction: { Ignore: "ignore"; Record: "record"; Redo: "redo"; Undo: "undo" }Controls whether a committed workbook transaction participates in structural history.
WorkbookHistorySessionStateDefinition: SessionStateDefinition<WorkbookHistorySessionState>Session identity owned by workbook structural history.
WorkbookHistoryStatusObservation: StateObservationDefinition<WorkbookHistoryStatus>Typed workbook structural history status.
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.
WorkbookSheetSessionsStateDefinition: SessionStateDefinition<Readonly<Record<string, Readonly<Record<string, unknown>>>>>Stable session identity for detached SheetEditor snapshots keyed by sheet id.
createWorkbookEditor(configuration: WorkbookEditorConfiguration): WorkbookEditorCreates 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.
const workbook = createWorkbookEditor(configuration);
await workbook.commands.run(ActivateWorkbookSheetCommand, { sheetId });
workbook.destroy();configuration: WorkbookEditorConfigurationWorkbook document state, host adapters, and Workbook and Sheet plugins.
defineWorkbookCommand<Input, Result>(id: string): WorkbookCommandDefinition<Input, Result>Creates an immutable workbook-owned command contract.
id: stringdefineWorkbookRuntimeCapability<T>(id: string): WorkbookRuntimeCapabilityToken<T>Creates a typed capability published by a Workbook plugin.
id: stringdeserializeWorkbookDocumentState<TSheetState>(payload: unknown, options?: WorkbookDocumentStateSerializationOptions<TSheetState>): WorkbookDocumentState<TSheetState>Deserializes a stable SearSuite JSON workbook file into runtime document state.
payload: unknownoptions: WorkbookDocumentStateSerializationOptions<TSheetState>isWorkbookFormulaBrokenReference(reference: WorkbookFormulaGraphReference): referenceReports whether one workbook formula graph reference is a retained broken reference.
reference: WorkbookFormulaGraphReferenceregisterDefaultWorkbookCommands(commands: WorkbookCommandBus, controller: WorkbookCommandController): voidRegisters the built-in workbook commands on one workbook command bus.
commands: WorkbookCommandBuscontroller: WorkbookCommandControllerregisterWorkbookPluginCapabilities(plugins: readonly unknown[], registry: WorkbookRuntimeExtensionRegistry): voidPublishes every typed runtime capability contributed by Workbook plugins.
plugins: readonly unknown[]registry: WorkbookRuntimeExtensionRegistryregisterWorkbookPluginCommands(plugins: readonly unknown[], commands: WorkbookCommandBus): voidplugins: readonly unknown[]commands: WorkbookCommandBusregisterWorkbookPluginObservations(plugins: readonly unknown[], observations: ObservationRegistry): voidplugins: readonly unknown[]observations: ObservationRegistryregisterWorkbookPluginSessionStates(plugins: readonly unknown[], session: SessionStateRegistry): voidplugins: readonly unknown[]session: SessionStateRegistryresolveWorkbookPlugins(container: Container, implementations: readonly WorkbookPluginImplementation<WorkbookPlugin>[]): WorkbookPlugin[]Resolves isolated Workbook plugin singletons from one editor-local container.
container: Containerimplementations: readonly WorkbookPluginImplementation<WorkbookPlugin>[]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>CommandExecutionPhase: { Completed: "completed"; Failed: "failed"; Started: "started" }Stable lifecycle phases emitted by Sheet, Doc, and Workbook command buses.
No public exports match that search.