readonly contentSheetIds?: readonly string[]Sheet content restored with this entry; other sheet content stays current.
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.
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();configurationWorkbook document state, host adapters, and Workbook and Sheet plugins.
Public 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.
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.
getSheetPlugins(context: WorkbookCompanionSheetPluginContext): readonly SheetPluginImplementation<SheetPlugin<unknown>>[]getSheetServices(context: WorkbookCompanionSheetPluginContext): readonly WorkbookCompanionSheetService<unknown>[]Contributes parent-owned services without exposing the child editor container.
initialize(context: WorkbookPluginContext): void | WorkbookPluginDisposeronBeforeSheetActivation(input: ActivateWorkbookSheetCommandInput): voidRuns inside the activation command before the source Sheet is captured.
onSheetActivationFailed(input: ActivateWorkbookSheetCommandInput): voidRestores plugin-local work if activation fails before commit.
onTransactionCommitted(event: WorkbookTransactionCommittedEvent): voidonWorkbookDestroy(context: WorkbookPluginContext): voidregisterCapabilities(registry: WorkbookRuntimeExtensionRegistry): voidRegisters every runtime capability owned by this plugin.
registerCommands(commands: WorkbookCommandBus): voidRegisters every stable command id owned by this plugin.
registerObservations(observations: ObservationRegistry): voidRegisters every typed state and event observation source owned by this plugin.
registerSessionState(registry: SessionStateRegistry): voidRegisters every local session value owned by this plugin.
registerServices(context: WorkbookPluginServiceContext): voidstaticPublic 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[]): voidContext passed to Workbook plugin lifecycle hooks.
readonly container: Containerreadonly runtime: WorkbookPluginRuntimeinterface WorkbookPluginImplementation<TPlugin>Injectable Workbook plugin class accepted by createWorkbookEditor().
Runtime 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.
executeTransaction(transaction: WorkbookTransaction): WorkbookCommandResultCommits a transaction assembled inside a typed Workbook command.
Services available before a Workbook plugin is registered in its editor-local container.
readonly container: Containertype WorkbookPluginDisposer = (): voidResource disposer returned by Workbook plugin lifecycle hooks.
type WorkbookRuntimeCapabilityReader = RuntimeCapabilityReadertype WorkbookRuntimeCapabilityToken = RuntimeCapability<T>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.
defineWorkbookRuntimeCapability<T>(id: string): WorkbookRuntimeCapabilityToken<T>Creates a typed capability published by a Workbook plugin.
registerWorkbookPluginCapabilities(plugins: readonly unknown[], registry: WorkbookRuntimeExtensionRegistry): voidPublishes every typed runtime capability contributed by Workbook plugins.
registerWorkbookPluginCommands(plugins: readonly unknown[], commands: WorkbookCommandBus): voidregisterWorkbookPluginObservations(plugins: readonly unknown[], observations: ObservationRegistry): voidregisterWorkbookPluginSessionStates(plugins: readonly unknown[], session: SessionStateRegistry): voidresolveWorkbookPlugins(container: Container, implementations: readonly WorkbookPluginImplementation<WorkbookPlugin>[]): WorkbookPlugin[]Resolves isolated Workbook plugin singletons from one editor-local container.
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.
Input for activating a workbook sheet.
readonly sheetId: stringSheet id to make active.
Input for hiding a workbook sheet.
readonly nextActiveSheetId?: stringOptional active sheet to select when hiding the current active sheet.
readonly sheetId: stringSheet id to hide.
Input for unhiding a workbook sheet.
readonly sheetId: stringSheet id to reveal.
Input passed when the workbook assembly creates one active SheetEditor.
Read-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.
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 WorkbookSheetEditorFactory = (input: WorkbookSheetEditorFactoryInput): SheetEditorActivateWorkbookSheetCommand: 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.
HideWorkbookSheetCommand: WorkbookCommandDefinition<HideWorkbookSheetCommandInput, WorkbookCommandResult>Official command for hiding a workbook sheet.
MoveWorkbookSheetCommand: WorkbookCommandDefinition<MoveWorkbookSheetInput, WorkbookCommandResult>Official command for moving a workbook sheet tab.
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.
UnhideWorkbookSheetCommand: WorkbookCommandDefinition<UnhideWorkbookSheetCommandInput, WorkbookCommandResult>Official command for unhiding a workbook sheet.
Read-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.
Read-only active SheetEditor capture hook used by custom hosts and focused tests.
type WorkbookSheetStateCapture = (input: WorkbookSheetStateCaptureInput): SheetDocumentStateWorkbookDocumentStateObservation: StateObservationDefinition<WorkbookDocumentState<SheetDocumentState>>Current workbook-owned metadata and per-sheet document payloads.
deserializeWorkbookDocumentState<TSheetState>(payload: unknown, options?: WorkbookDocumentStateSerializationOptions<TSheetState>): WorkbookDocumentState<TSheetState>Deserializes a stable SearSuite JSON workbook file into runtime document state.
serializeWorkbookDocumentState<TSheetState>(documentState: WorkbookDocumentState<TSheetState>, options?: WorkbookDocumentStateSerializationOptions<TSheetState>): SearWorkbookFile<WorkbookSheetDescriptor>Serializes a workbook document state into the stable SearSuite JSON format.
Owns built-in workbook session values without exposing their shape to aggregate capture.
WorkbookSessionStore(documentState: WorkbookDocumentState): WorkbookSessionStorereadonly symbol: typeof symbolstaticbindActiveSheetCapture(capture: (): { sheetId: string; state?: Readonly<Record<string, unknown>> }): voidclear(lifecycleToken?: object): voidenforceCommandBoundary(isExecuting: (): boolean, lifecycleToken: object): voidRestricts runtime session changes to this editor's command dispatch.
getActiveSheetId(): stringgetSheetSessionState(sheetId: string): Readonly<Record<string, unknown>> | undefinedregisterSessionState(registry: SessionStateRegistry): voidRegisters the built-in contributors beside third-party workbook contributors.
removeMissingSheets(liveSheetIds: ReadonlySet<string>, ownerToken?: object): voidsetActiveSheetId(sheetId: string, ownerToken?: object): voidsetSheetSessionState(sheetId: string, state: Readonly<Record<string, unknown>> | undefined, ownerToken?: object): voidvalidate(documentState: WorkbookDocumentState): voidCaptured local state for remounting one WorkbookEditor runtime.
Current workbook-owned document snapshot.
Current live SheetEditor mounted by one WorkbookEditor instance.
readonly editor: SheetEditorLive editor owned by the workbook assembly.
readonly sheetId: stringStable id of the sheet mounted by the live editor.
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.
readonly token: symbolreadonly value: ValueRead-only active SheetEditor session capture hook.
type WorkbookSessionState = SessionStateSnapshotOpaque editor-local workbook state keyed by contributor-owned definitions.
type WorkbookSheetSessionStateCapture = (input: WorkbookSheetSessionStateCaptureInput): SheetSessionState | undefinedCaptureWorkbookSessionStateCommand: WorkbookCommandDefinition<void, CaptureWorkbookSessionStateCommandResult>ExportWorkbookStateCommand: WorkbookCommandDefinition<void, ExportWorkbookStateCommandResult>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.
WorkbookSheetSessionsStateDefinition: SessionStateDefinition<Readonly<Record<string, Readonly<Record<string, unknown>>>>>Stable session identity for detached SheetEditor snapshots keyed by sheet id.
Defined names and formula tables belong to the Workbook, so expressions can refer to them across Sheets.
class WorkbookFormulaObjectsPlugin extends WorkbookPluginWorkbook-owned editing surface for named formulas and table references.
WorkbookFormulaObjectsPlugin(): WorkbookFormulaObjectsPluginreadonly symbol: typeof symbolstaticinitialize(context: WorkbookPluginContext): voidonTransactionCommitted(): voidonWorkbookDestroy(): voidregisterCommands(commands: WorkbookCommandBus): voidRegisters every stable command id owned by this plugin.
registerObservations(observations: ObservationRegistry): voidRegisters every typed state and event observation source owned by this plugin.
Inherited from WorkbookPlugin.
readonly formula: stringreadonly name: stringreadonly headers: booleanreadonly name: stringreadonly range: stringreadonly sheet: stringRemoveWorkbookDefinedNameCommand: WorkbookCommandDefinition<{ name: string }, void>RemoveWorkbookFormulaTableCommand: WorkbookCommandDefinition<{ name: string }, void>SetWorkbookDefinedNameCommand: WorkbookCommandDefinition<SetWorkbookDefinedNameInput, void>SetWorkbookFormulaTableCommand: WorkbookCommandDefinition<WorkbookFormulaTable, void>WorkbookFormulaObjectsMetadataKey: "searsuite.workbook.formulaObjects"Metadata key owned by workbook formula evaluation.
WorkbookFormulaObjectsObservation: StateObservationDefinition<WorkbookFormulaObjects>Shifts 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.
Dependency entry retained after a workbook formula reference becomes invalid.
Result of applying row/column structure edits to one compiled workbook formula.
readonly changed: booleanWhether formula position, AST, dependencies, or broken-reference metadata changed.
readonly compiled: CompiledWorkbookFormulaUpdated compiled formula.
Result 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.
type WorkbookFormulaBrokenReferenceReason = typeof WorkbookFormulaBrokenReferenceReason[keyof typeof WorkbookFormulaBrokenReferenceReason]
WorkbookFormulaBrokenReferenceReason: { ReferenceDeleted: "referenceDeleted"; SheetDeleted: "sheetDeleted" }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]
WorkbookFormulaGraphReferenceKind: { Broken: "broken" }Dependency graph reference entry kind value.
CancelWorkbookFormulaReferencePickCommand: WorkbookCommandDefinition<void, void>Cancels a pending cross-sheet reference pick.
CaptureWorkbookFormulaDraftCommand: WorkbookCommandDefinition<void, void>Retains the source formula draft before activating another sheet.
PickWorkbookFormulaReferenceCommand: WorkbookCommandDefinition<{ end: Point; start: Point }, void>Applies a picked range to the retained formula draft.
RestoreWorkbookFormulaDraftCommand: WorkbookCommandDefinition<void, void>Restores the retained draft when the source sheet becomes active again.
isWorkbookFormulaBrokenReference(reference: WorkbookFormulaGraphReference): referenceReports whether one workbook formula graph reference is a retained broken reference.
Workbook-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.
getDependencies(formulaCell: WorkbookCellReference): readonly WorkbookFormulaGraphReference[]Returns workbook-qualified dependencies owned by one formula cell.
getDependents(cell: WorkbookCellReference): readonly WorkbookCellReference[]Returns formula cells that currently depend on the given workbook cell.
getDirtyFormulaCells(): 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.
hasBrokenReferences(formulaCell: WorkbookCellReference): booleanReports whether one formula cell currently contains broken references.
hasFormulaCell(formulaCell: WorkbookCellReference): booleanReports whether one workbook-qualified cell is registered as a formula cell.
isDirty(formulaCell: WorkbookCellReference): booleanReports whether one workbook formula cell needs recalculation.
markDirty(changedCells: readonly WorkbookCellReference[]): readonly WorkbookCellReference[]Marks formulas that depend on changed workbook cells as dirty, including transitive formula chains.
markFormulaCellsDirty(formulaCells: readonly WorkbookCellReference[]): voidMarks formula cells themselves dirty after an external evaluation service changes.
removeFormulaCell(formulaCell: WorkbookCellReference): voidRemoves one formula cell and every reverse edge it owns.
removeSheet(sheetId: string): voidRemoves formulas on a deleted sheet and marks references to that sheet as broken.
setFormulaResult(formulaCell: WorkbookCellReference, result: FormulaValue): voidStores a derived workbook formula result and marks the formula clean.
updateFormulaCell(formulaCell: WorkbookCellReference, dependencies: readonly WorkbookFormulaReference[]): voidRegisters dependencies for one workbook-qualified formula cell.
updateFormulaCellReferences(formulaCell: WorkbookCellReference, dependencies: readonly WorkbookFormulaGraphReference[]): voidRegisters graph references for one formula cell, including broken references.
Runtime 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.
compileFormula(formulaCell: WorkbookCellReference, source: string, workbookState: WorkbookDocumentState<SheetDocumentState>): CompiledWorkbookFormulaCompiles formula text into native AST plus stable workbook dependencies.
formatFormulaSource(compiled: CompiledWorkbookFormula, workbookState: WorkbookDocumentState<SheetDocumentState>): stringFormats workbook formula source with current sheet names while keeping stable sheet-id bindings.
recalculateDirty(input: { formulas: ReadonlyMap<string, CompiledWorkbookFormula>; graph: WorkbookFormulaDependencyGraph; runtime: WorkbookPluginRuntime }): WorkbookFormulaRecalculationResultRecalculates dirty formula cells whose dependencies are currently clean.
shiftCompiledFormulaReferences(input: { changedSheetId: string; changes: readonly StructureChange[]; compiled: CompiledWorkbookFormula; formulaCell: WorkbookCellReference }): WorkbookFormulaCompiledReferenceShiftResultShifts compiled formula references after a row or column structure change.
class WorkbookFormulaPlugin extends WorkbookPluginWorkbook-level formula coordinator and cross-sheet dependency owner.
WorkbookFormulaPlugin(): WorkbookFormulaPluginreadonly symbol: typeof symbolstaticassertSheetRangeMoveSupported(sheetId: string, context: SheetRangeMoveContext): voidRejects moves requiring reference edits outside the current Sheet transaction boundary.
assertSheetStructureMoveSupported(sheetId: string, context: SheetStructureMoveContext): voidRejects qualified reference rewrites that cannot be persisted by a single Sheet transaction.
formatReference(reference: ParsedWorkbookFormulaReference): stringFormats a stable workbook reference with the latest workbook sheet name.
getDependencyGraph(): 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.
getSheetFormulaResult(sheetId: string, row: number, col: number): FormulaValue | undefinedReturns a result only for formula cells that contain workbook-qualified references.
getSheetFormulaSource(sheetId: string, row: number, col: number): string | undefinedReturns display-ready formula source for workbook formulas on one mounted sheet.
getSheetPlugins(context: WorkbookCompanionSheetPluginContext): readonly SheetPluginImplementation<SheetPlugin<unknown>>[]Contributes the active-sheet companion that forwards committed Sheet transactions.
getSheetServices(context: WorkbookCompanionSheetPluginContext): readonly { token: symbol; value: unknown }[]Shares the workbook function registry with each mounted Sheet editor.
initialize(context: WorkbookPluginContext): (): voidStarts observing workbook state for this WorkbookEditor instance.
observeSheetTransaction(sheetId: string, transaction: Transaction): voidReceives a committed Sheet transaction from the active SheetEditor companion.
parseReference(reference: string): ParsedWorkbookFormulaReferenceParses a displayed cross-sheet reference against the latest workbook sheet names.
recalculateDirtyFormulas(): RecalculateWorkbookFormulasCommandResultRecalculates workbook formulas currently marked dirty.
registerCommands(commands: WorkbookCommandBus): voidRegisters workbook formula commands.
registerObservations(observations: ObservationRegistry): voidRegisters workbook formula diagnostic observations.
removeFormulaCell(formulaCell: WorkbookCellReference): voidRemoves workbook formula bookkeeping for one formula cell.
setFormulaCellFormula(formulaCell: ParsedWorkbookFormulaReference, formulaSource: string): voidRegisters and compiles one workbook formula source.
setFormulaResult(formulaCell: ParsedWorkbookFormulaReference, result: FormulaValue): voidStores a derived workbook formula result and marks the formula clean.
updateFormulaCell(formulaCell: ParsedWorkbookFormulaReference, dependencies: readonly WorkbookFormulaReference[]): voidRegisters workbook-qualified dependencies for one formula cell.
registerServices(__namedParameters: WorkbookPluginServiceContext): voidstaticRegisters one workbook-owned formula runtime shared by mounted Sheet editors.
Inherited from WorkbookPlugin.
Compiled 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.
Result 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.
Result 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.
Local 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.
State 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.
RecalculateWorkbookFormulasCommand: WorkbookCommandDefinition<void, RecalculateWorkbookFormulasCommandResult>Recalculates workbook-level formulas marked dirty by cross-sheet changes.
WorkbookFormulaBindingsMetadataKey: "searsuite.workbook.formulaBindings"Runtime metadata holding bindings restored from a durable workbook file.
WorkbookFormulaSheetTransactionObservation: EventObservationDefinition<WorkbookFormulaSheetTransactionEvent>WorkbookFormulaPlugin event stream for committed active-sheet transactions.
WorkbookFormulaStateObservation: StateObservationDefinition<WorkbookFormulaStateSnapshot>WorkbookFormulaPlugin state exposed to diagnostic hosts.
class WorkbookCollaborationPlugin extends WorkbookPlugin, WorkbookCollaborationSessionOwns collaboration state beyond the lifetime of any temporary active SheetEditor.
WorkbookCollaborationPlugin(transports: WorkbookCollaborationTransportFactory, platform: Platform): WorkbookCollaborationPluginreadonly symbol: typeof symbolstaticgetConnectedSheetIds(): readonly string[]getSheetServices(context: WorkbookCompanionSheetPluginContext): { token: symbol; value: { channel: CollaborationChannel; owner: "host" } }[]Contributes parent-owned services without exposing the child editor container.
getSheetStatus(sheetId: string): CollaborationStatus | undefinedinitialize(context: WorkbookPluginContext): (): voidonTransactionCommitted(event: WorkbookTransactionCommittedEvent): voidonWorkbookDestroy(): voidregisterCapabilities(registry: WorkbookRuntimeExtensionRegistry): voidRegisters every runtime capability owned by this plugin.
registerCommands(commands: WorkbookCommandBus): voidRegisters every stable command id owned by this plugin.
Inherited from WorkbookPlugin.
class WorkbookHistoryPlugin extends WorkbookPluginBuilt-in contributor for workbook structure and declared multi-sheet content history.
WorkbookHistoryPlugin(): WorkbookHistoryPluginreadonly symbol: typeof symbolstaticgetContentMoveStatus(): WorkbookHistoryStatusExposes only multi-sheet content entries to the mounted Sheet history adapter.
getStatus(): WorkbookHistoryStatusinitialize(context: WorkbookPluginContext): voidonTransactionCommitted(event: WorkbookTransactionCommittedEvent): voidonWorkbookDestroy(): voidregisterCommands(commands: WorkbookCommandBus): voidRegisters every stable command id owned by this plugin.
registerObservations(observations: ObservationRegistry): voidRegisters every typed state and event observation source owned by this plugin.
registerSessionState(registry: SessionStateRegistry): voidRegisters every local session value owned by this plugin.
subscribe(listener: (status: WorkbookHistoryStatus): void): (): voidInherited from WorkbookPlugin.
Read-only host facade for Workbook-owned collaboration channels.
interface WorkbookCollaborationTransportFactory
WorkbookCollaborationTransportFactory: { symbol: symbol }Creates one transport per Workbook-owned Sheet collaboration channel.
Workbook 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.
Workbook-local undo and redo stacks.
Current workbook structure undo/redo availability.
readonly canRedo: booleanreadonly canUndo: booleantype WorkbookHistoryAction = typeof WorkbookHistoryAction[keyof typeof WorkbookHistoryAction]
WorkbookHistoryAction: { Ignore: "ignore"; Record: "record"; Redo: "redo"; Undo: "undo" }History behavior attached to one workbook transaction.
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.
RedoWorkbookCommand: WorkbookCommandDefinition<void, void>Re-applies the most recently reverted workbook structure mutation.
UndoWorkbookCommand: WorkbookCommandDefinition<void, void>Reverts the most recent committed workbook structure mutation.
WorkbookCollaborationCapability: WorkbookRuntimeCapabilityToken<WorkbookCollaborationSession>WorkbookHistorySessionStateDefinition: SessionStateDefinition<WorkbookHistorySessionState>Session identity owned by workbook structural history.
WorkbookHistoryStatusObservation: StateObservationDefinition<WorkbookHistoryStatus>Typed workbook structural history status.
Workbook commands stage structural changes, and WorkbookTransaction commits them as one state transition.
Editor-scoped command bus for workbook-level sheet-list actions.
WorkbookCommandBus(options?: WorkbookCommandBusOptions): WorkbookCommandBusCreates an empty workbook command bus.
readonly symbol: typeof symbolstaticDI 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.
getRegisteredCommandIds(): 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.
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.
run<Definition>(definition: Definition, input: WorkbookCommandInput<Definition>): WorkbookCommandDefinitionResult<Definition>Executes a registered workbook command through its typed definition.
runWithoutMutationAuthority<Value>(callback: (): Value): ValueInvokes external observers without inheriting this editor's command write authority.
subscribe(listener: WorkbookCommandListener): (): voidSubscribes to command lifecycle events and returns an unsubscribe function.
class WorkbookRangeMoveError extends SearErrorPrevents a same-sheet move from leaving workbook-qualified references stale.
WorkbookRangeMoveError(sheetId: string): WorkbookRangeMoveErrorreadonly 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 symbolstaticInherited from RuntimeCapabilityRegistry.
class WorkbookStructureMoveError extends SearErrorPrevents an axis move from leaving qualified reference sources outside its transaction stale.
WorkbookStructureMoveError(sheetId: string): WorkbookStructureMoveErrorreadonly code: "WORKBOOK_STRUCTURE_MOVE_QUALIFIED_REFERENCE"Stable machine-readable identifier for this error category.
Inherited from SearError.
Ordered, 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[]): WorkbookTransactioncontentSheetIdsSheet 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.
getStepNames(): readonly string[]Returns stable step names for diagnostics and tests.
Optional diagnostics hooks used by the workbook command bus.
readonly warn?: (message: string, ...details: unknown[]): voidReceives non-fatal command-boundary diagnostics.
Internal controller API implemented by the workbook editor facade.
activateSheet(input: ActivateWorkbookSheetCommandInput): WorkbookCommandResultaddSheet(input: AddWorkbookSheetCommandInput): WorkbookCommandResulthideSheet(input: HideWorkbookSheetCommandInput): WorkbookCommandResultmoveSheet(input: MoveWorkbookSheetInput): WorkbookCommandResultremoveSheet(input: RemoveWorkbookSheetCommandInput): WorkbookCommandResultrenameSheet(input: RenameWorkbookSheetInput): WorkbookCommandResultunhideSheet(input: UnhideWorkbookSheetCommandInput): WorkbookCommandResultinterface 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.
Lifecycle event emitted by the workbook command bus for diagnostics and host UI.
readonly error?: unknownOriginal thrown value when the command failed.
readonly id: stringStable command id being executed.
readonly phase: CommandExecutionPhaseExecution phase represented by this event.
Result 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.
Immutable event delivered after a complete workbook transaction commits.
Detached state staged by workbook transaction reducers.
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 WorkbookTransactionReducer = (state: WorkbookTransactionState): WorkbookTransactionStateOne pure staged workbook mutation.
defineWorkbookCommand<Input, Result>(id: string): WorkbookCommandDefinition<Input, Result>Creates an immutable workbook-owned command contract.
registerDefaultWorkbookCommands(commands: WorkbookCommandBus, controller: WorkbookCommandController): voidRegisters the built-in workbook commands on one workbook command bus.
CommandExecutionPhase: { Completed: "completed"; Failed: "failed"; Started: "started" }Stable lifecycle phases emitted by Sheet, Doc, and Workbook command buses.
No matching API entries.