API reference
@searsuite/sear-plugin-formula
Sheet formula source, evaluation scheduling, dependency tracking, and result projection.
56 exportsderived from source
- namespaceFormulaRegistryOwnershipsource ↗
-
FormulaRegistryOwnership: unknownvariablesymbol symbol: typeof symbol - namespaceFormulaSchedulerDataSourcesource ↗
-
FormulaSchedulerDataSource: unknownvariablesymbol symbol: typeof symbolDI token for resolving FormulaSchedulerDataSource.
- classCellFormulaValueConverterRegistrysource ↗
-
class CellFormulaValueConverterRegistryCell type → formula semantic value registry.
Rendering and formula coercion intentionally use separate registries: a custom cell type can define its calculation semantics without coupling to a Canvas renderer.
constructorconstructor CellFormulaValueConverterRegistry(platform: Platform): CellFormulaValueConverterRegistryCreates a registry with the built-in cell-to-formula semantics.
platform: PlatformPlatform adapter used for diagnostics when unknown cell types fall back to text.
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving CellFormulaValueConverterRegistry.
methodregister register(converter: CellFormulaValueConverter): (): voidRegisters or overrides formula semantics for one cell type.
ReturnsDisposer that restores the previous converter only if this registration is still active.
converter: CellFormulaValueConverterConverter owned by a built-in package or third-party plugin.
methodtoFormulaValue toFormulaValue(cell: CellMatrixElement): FormulaValueConverts a persisted sheet cell into the formula value contract.
ReturnsFormula value, including canonical propagated formula errors or
#VALUE!for malformed error payloads.cell: CellMatrixElementMatrix cell to convert; the method never writes back to the sheet matrix.
- classFormulaCalculationTraceBussource ↗
-
class FormulaCalculationTraceBus extends IFormulaCalculationTraceProviderEditor-local formula trace event hub.
The hub fans out local runtime trace to host/plugin subscribers. It is intentionally independent from OT, rendering, and persistence; publishing an event must not mutate sheet state or request a render pipeline.
constructorconstructor FormulaCalculationTraceBus(platform: Platform): FormulaCalculationTraceBusCreates a trace hub bound to one editor instance.
platform: Platform
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving FormulaCalculationTraceBus.
methodemit emit(event: Omit<FormulaBatchFlushedEvent, "sequence"> | Omit<FormulaDependenciesChangedEvent, "sequence"> | Omit<FormulaErrorChangedEvent, "sequence"> | Omit<FormulaRecalculationCompletedEvent, "sequence">): voidEmits one calculation trace event to current subscribers.
Listener failures are reported through Platform.warn and do not interrupt formula recalculation, dependency maintenance, rendering invalidation, or other subscribers.
event: Omit<FormulaBatchFlushedEvent, "sequence"> | Omit<FormulaDependenciesChangedEvent, "sequence"> | Omit<FormulaErrorChangedEvent, "sequence"> | Omit<FormulaRecalculationCompletedEvent, "sequence">Event payload without provider-owned sequence metadata.
methodenforceCommandBoundary enforceCommandBoundary(isCommandExecuting: (): boolean): voidSeals event publication after initial formula data has been scanned.
isCommandExecuting: (): boolean
methodsubscribeFormulaCalculationTrace subscribeFormulaCalculationTrace(listener: FormulaCalculationTraceListener): (): voidSubscribes to formula calculation trace events for one editor instance.
ReturnsFunction that removes the listener; calling it more than once is safe.
listener: FormulaCalculationTraceListenerCallback invoked for future calculation trace events.
- classFormulaCrossSheetHighlightSourcesource ↗
-
class FormulaCrossSheetHighlightSourceOptional workbook-owned source for cross-sheet formula reference overlays.
constructorconstructor FormulaCrossSheetHighlightSource(): FormulaCrossSheetHighlightSourcepropertysymbolstatic readonly symbol: typeof symbolmethodgetReferences getReferences(selectionRevision: number, selectionSource?: string): readonly FormulaCrossSheetReference[]selectionRevision: numberselectionSource: string
- classFormulaRefShiftersource ↗
-
class FormulaRefShifterRewrites formula references after Sheet structure changes.
constructorconstructor FormulaRefShifter(parser: IFormulaParser): FormulaRefShifterCreates a FormulaRefShifter instance.
parser: IFormulaParser
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving FormulaRefShifter.
methodshiftAll shiftAll(formulas: Map<number, FormulaAST>, changes: StructureChange[]): { key: number; newAst: FormulaAST }[]Handles structural changes by traversing all formula ASTs and shifting references.
ReturnsFormula list that needs updates (key -> new AST).
formulas: Map<number, FormulaAST>Current AST cache for all formulas (CellKey -> AST).
changes: StructureChange[]Structural change list for row/column insertion and deletion.
- classFormulaRenderInvalidatorsource ↗
-
class FormulaRenderInvalidatorFormula-result publisher for the shared displayed-value change bus.
The formula scheduler reports changes after updating derived results. Other features subscribe to the shared bus without depending on formula internals.
constructorconstructor FormulaRenderInvalidator(displayedValueChanges: SheetDisplayedValueChanges): FormulaRenderInvalidatordisplayedValueChanges: SheetDisplayedValueChanges
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving FormulaRenderInvalidator.
methodbind bind(handler: FormulaRenderInvalidationHandler): (): voidRegisters the legacy formula-result callback for one editor instance.
ReturnsDisposer that removes this handler if it is still active.
handler: FormulaRenderInvalidationHandlerCallback that maps changed formula keys to render work.
methodinvalidateFormulaResults invalidateFormulaResults(keys: readonly number[]): voidReports formula result changes to displayed-value subscribers.
keys: readonly number[]Formula cell keys whose derived display values changed.
- classFormulaResultProviderRegistrysource ↗
-
class FormulaResultProviderRegistry extends IFormulaResultProviderInstance-local result provider registry exposed as the renderer's formula result reader.
constructorconstructor FormulaResultProviderRegistry(): FormulaResultProviderRegistrypropertysymbolstatic readonly symbol: typeof symbolDI token for resolving the registry owned by one SheetEditor instance.
methodenforceCommandBoundary enforceCommandBoundary(isExecuting: (): boolean, remove: (id: number): void): voidBinds post-assembly registration and disposal to the owning command bus.
isExecuting: (): booleanremove: (id: number): void
methodforEachFormulaResultInRange forEachFormulaResultInRange(startRow: number, startColumn: number, endRow: number, endColumn: number, visit: (row: number, column: number): void): voidVisits derived result coordinates published by registered providers, once per position.
startRow: numberstartColumn: numberendRow: numberendColumn: numbervisit: (row: number, column: number): void
methodgetFormulaResult getFormulaResult(row: number, col: number): FormulaValue | undefinedReads the first defined result supplied by registered providers.
row: numbercol: number
methodregister register(registration: FormulaResultProviderRegistration): (): voidRegisters one formula result provider and returns an idempotent disposer.
registration: FormulaResultProviderRegistration
methodunregister unregister(id: number): voidRemoves one provider inside the formula owner's unregister command.
id: number
- classFormulaResultStoresource ↗
-
class FormulaResultStoreStores calculated formula results independently from persisted formula source.
constructorconstructor FormulaResultStore(valueConverters: CellFormulaValueConverterRegistry): FormulaResultStoreCreates a FormulaResultStore instance.
valueConverters: CellFormulaValueConverterRegistry
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving FormulaResultStore.
methodcellToFormulaValue cellToFormulaValue(row: number, col: number, cell: CellMatrixElement | null | undefined): FormulaValueConverts a CellMatrixElement to a FormulaValue.
Used when evaluators read cell data:
- formula cells: read the local calculated result from this store; derived and unsynced.
- richtext/string cells: return text values, converting numeric strings to numbers.
- null/undefined: return 0 for empty cells.
Called by both SheetFormulaPlugin.apply for aggCache delta calculation and RecalcScheduler.createEvalContext, so it lives on the store to avoid duplicated logic or callback plumbing.
row: numbercol: numbercell: CellMatrixElement | null | undefined
methodclear clear(): voidClears state owned by FormulaResultStore.
methoddelete delete(key: number): voidRemoves the calculated result for one formula cell.
key: number
methodenforceCommandBoundary enforceCommandBoundary(isCommandExecuting: (): boolean): voidCloses direct result writes after the owning Sheet has started.
isCommandExecuting: (): boolean
methodforEachSpillInRange forEachSpillInRange(startRow: number, startColumn: number, endRow: number, endColumn: number, visit: (row: number, column: number): void): voidVisits projected spill coordinates in a range; formula anchors live in the Sheet data matrix.
startRow: numberstartColumn: numberendRow: numberendColumn: numbervisit: (row: number, column: number): void
methodget get(key: number): FormulaValue | undefinedReturns the value.
key: number
methodgetAt getAt(row: number, col: number): FormulaValue | undefinedReads an anchor or projected spill value at any sheet coordinate.
row: numbercol: number
methodhas has(key: number): booleanReturns whether value exists.
key: number
methodset set(key: number, value: FormulaValue): voidUpdates the value.
key: numbervalue: FormulaValue
methodsetFormulaResult setFormulaResult(key: number, value: FormulaValue, context: { isCellInBounds: unknown; isCellOccupied?: unknown }): number[]Stores a formula result and projects a rectangular array into derived spill cells.
key: numbervalue: FormulaValuecontext: { isCellInBounds: unknown; isCellOccupied?: unknown }
- classFormulaRichResultProviderRegistrysource ↗
-
class FormulaRichResultProviderRegistry extends IFormulaRichResultProviderInstance-local provider registry for formula hyperlinks, images, and future rich results.
constructorconstructor FormulaRichResultProviderRegistry(): FormulaRichResultProviderRegistrypropertysymbolstatic readonly symbol: typeof symbolmethodenforceCommandBoundary enforceCommandBoundary(isExecuting: (): boolean, remove: (id: number): void): voidisExecuting: (): booleanremove: (id: number): void
methodgetFormulaRichResult getFormulaRichResult(row: number, col: number): FormulaRichResult | undefinedrow: numbercol: number
methodregister register(registration: FormulaRichResultProviderRegistration): (): voidregistration: FormulaRichResultProviderRegistration
methodunregister unregister(id: number): voidid: number
- classFormulaSourceProviderRegistrysource ↗
-
class FormulaSourceProviderRegistry extends IFormulaSourceProviderEditor-local ordered registry for formula source providers.
constructorconstructor FormulaSourceProviderRegistry(): FormulaSourceProviderRegistrypropertysymbolstatic readonly symbol: typeof symbolDI token for resolving IFormulaSourceProvider.
methodenforceCommandBoundary enforceCommandBoundary(isExecuting: (): boolean, remove: (id: number): void): voidisExecuting: (): booleanremove: (id: number): void
methodgetFormulaSource getFormulaSource(row: number, col: number): string | undefinedGets the formula source that should be presented to the user for one cell.
Providers may return undefined when they do not own the queried cell. The default sheet formula provider returns the persisted formula text, while workbook-aware providers can return display text formatted from stable workbook bindings and the current sheet names.
row: numbercol: number
methodregister register(registration: FormulaSourceProviderRegistration): (): voidregistration: FormulaSourceProviderRegistration
methodunregister unregister(id: number): voidid: number
- classRecalcSchedulersource ↗
-
class RecalcSchedulerSchedules dependency-aware formula recalculation with visible-cell priority.
constructorconstructor RecalcScheduler(graph: IDependencyGraph, evaluator: IFormulaEvaluator, resultStore: FormulaResultStore, aggCache: IAggregationCache, dataSource: FormulaSchedulerDataSource, platform: Platform, renderInvalidator: FormulaRenderInvalidator, trace: FormulaCalculationTraceBus, functionRegistry?: IFunctionRegistry, iterationSettings?: IFormulaIterationSettingsProvider): RecalcSchedulerCreates a RecalcScheduler instance.
graph: IDependencyGraphevaluator: IFormulaEvaluatorresultStore: FormulaResultStoreaggCache: IAggregationCachedataSource: FormulaSchedulerDataSourceplatform: PlatformrenderInvalidator: FormulaRenderInvalidatortrace: FormulaCalculationTraceBusfunctionRegistry: IFunctionRegistryiterationSettings: IFormulaIterationSettingsProvider
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving RecalcScheduler.
methodbindAstCache bindAstCache(cache: ReadonlyMap<number, FormulaAST>): voidBinds the formula owner's cache during plugin setup.
cache: ReadonlyMap<number, FormulaAST>
methodbindCommandBus bindCommandBus(commands: SheetCommandBus): voidBinds asynchronous formula work to the owning editor's command bus.
commands: SheetCommandBus
methodbindTeardownToken bindTeardownToken(token: object): voidGives the owning editor lifecycle exclusive authority to dispose the mounted scheduler.
token: object
methoddiscardPendingWork discardPendingWork(): voidDiscards pending formula batches when committed formula inputs are replaced.
methoddispose dispose(token?: object): voidReleases scheduler-owned subscriptions.
token: object
methodgetFormulaKeys getFormulaKeys(): IterableIterator<number>Iterates formula coordinates without exposing the cache for mutation.
methodmarkDirty markDirty(changedKeys: number[]): voidTriggers recalculation.
Performs only two actions:
- Mark dirty formulas, propagated by BFS without sorting.
- Start the async scheduling loop without blocking the current frame.
changedKeys: number[]
methodmarkFunctionsDirty markFunctionsDirty(functionNames: readonly string[]): voidRecalculates formulas that contain any of the supplied function names.
functionNames: readonly string[]
methodprocessScheduledBatch processScheduledBatch(): voidRuns one budgeted batch inside the formula owner's command.
methodrecalculateVolatile recalculateVolatile(): voidStarts an explicit recalculation epoch for every formula containing a volatile call.
methodresumePendingWork resumePendingWork(): voidResumes pending work inside a viewport or external-service command.
methodwaitForIdle waitForIdle(): Promise<void>Resolves when the scheduler has no running or pending formula work.
- classSheetFormulaPluginsource ↗
-
class SheetFormulaPlugin extends Plugin<SearCoreSheet, CellProperties, FormulaPluginState>, IFormulaResultProvider, IFormulaSourceProvider, IFormulaStatusProviderOwns formula source, dependency tracking, recalculation, and result projection.
constructorconstructor SheetFormulaPlugin(parser: IFormulaParser, graph: IDependencyGraph, aggCache: IAggregationCache, resultStore: FormulaResultStore, scheduler: RecalcScheduler, refShifter: FormulaRefShifter, trace: FormulaCalculationTraceBus, dataEngine?: DataEngine, platform?: Platform, results?: IFormulaResultProvider, resultProviders?: FormulaResultProviderRegistry, richResultProviders?: FormulaRichResultProviderRegistry, sourceProviders?: FormulaSourceProviderRegistry, functions?: IFunctionRegistry, externalServices?: IFormulaExternalServiceProvider, textServices?: IFormulaTextServiceProvider): SheetFormulaPluginCreates a SheetFormulaPlugin instance.
parser: IFormulaParsergraph: IDependencyGraphaggCache: IAggregationCacheresultStore: FormulaResultStorescheduler: RecalcSchedulerrefShifter: FormulaRefShiftertrace: FormulaCalculationTraceBusdataEngine: DataEngineplatform: Platformresults: IFormulaResultProviderresultProviders: FormulaResultProviderRegistryrichResultProviders: FormulaRichResultProviderRegistrysourceProviders: FormulaSourceProviderRegistryfunctions: IFunctionRegistryexternalServices: IFormulaExternalServiceProvidertextServices: IFormulaTextServiceProvider
propertyinterestedIn interestedIn: MatrixOTActionName[]Operation types listened to by this plugin:
- uc: UpdateCell
- ri: RowInsert
- rd: RowDelete
- ci: ColInsert
- cd: ColDelete
propertypluginKeystatic readonly pluginKey: PluginKeyStable plugin key for SheetFormulaPlugin.
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving SheetFormulaPlugin.
methodapply apply(_pluginState: null, transaction: Transaction): nullRejects unsupported structure operations before the owning transaction commits. Derived ASTs are not staged as plugin state.
_pluginState: nulltransaction: Transaction
methodenforceProviderCommandBoundary enforceProviderCommandBoundary(commands: SheetCommandBus, workbookOwnership?: FormulaRegistryOwnership): voidSeals provider registration once every configured Sheet plugin has started.
commands: SheetCommandBusworkbookOwnership: FormulaRegistryOwnership
methodforEachFormulaResultInRange forEachFormulaResultInRange(startRow: number, startColumn: number, endRow: number, endColumn: number, visit: (row: number, column: number): void): voidExposes derived spill coordinates to sparse range consumers.
startRow: numberstartColumn: numberendRow: numberendColumn: numbervisit: (row: number, column: number): void
methodgetFormulaCellStatus getFormulaCellStatus(row: number, col: number): FormulaCellStatusIFormulaStatusProvider implementation used by hosts and plugins to inspect formula source, result, dirty state, and dependency edges without touching plugin-owned caches directly.
row: numbercol: number
methodgetFormulaResult getFormulaResult(row: number, col: number): FormulaValue | undefinedIFormulaResultProvider implementation used by rendering to read formula results.
Returns FormulaValue from resultStore, or undefined when it has not been calculated yet. The rendering layer (FormulaCell) converts it to display text.
row: numbercol: number
methodgetFormulaSource getFormulaSource(row: number, col: number): string | undefinedIFormulaSourceProvider implementation used by editors to read persisted formula text.
row: numbercol: number
methodgetPluginConfig getPluginConfig(): unknownReturns the plugin config.
methodonInitialDataCell onInitialDataCell(_searCore: SearCoreSheet, value: unknown, row: number, col: number): voidReceives cells from shared startup scanning and builds AST/dependency indexes for existing formula cells.
Initial data such as content.json is injected directly into SheetDataPlugin and does not pass through the command pipeline -> apply, so formula-derived indexes must be built here.
_searCore: SearCoreSheetvalue: unknownrow: numbercol: number
methodonInitialDataComplete onInitialDataComplete(_searCore: SearCoreSheet): voidStarts one recalculation after dependencies for all initial formulas have been registered.
_searCore: SearCoreSheet
methodonTransactionCommitted onTransactionCommitted(transaction: Transaction): voidRebuilds derived indexes after the owning document transaction commits.
transaction: TransactionSuccessfully committed transaction.
methodregisterCommands registerCommands(commands: SheetCommandBus): voidRegisters formula host commands.
commands: SheetCommandBusCommand bus owned by one editor instance.
methodregisterConfig registerConfig(): { config: ConfigUnit<FormulaReferenceHighlightConfig>; key: PluginKey }[]Registers default configuration values owned by this plugin.
methodregisterObservations registerObservations(observations: ObservationRegistry): voidRegisters formula calculation trace as an editor-local host observation.
observations: ObservationRegistry
methodregisterRangeMoves registerRangeMoves(registry: SheetRangeMoveRegistry): voidContributes formula identity updates to the same atomic cell-move plan.
registry: SheetRangeMoveRegistry
methodregisterRangeReorders registerRangeReorders(registry: SheetRangeReorderRegistry): voidregistry: SheetRangeReorderRegistry
methodregisterState registerState(): { dataEngine: { enabled: boolean }; key: PluginKey; state: null }Formula indexes are editor-local and do not enter Sheet document views.
methodregisterStructureMoves registerStructureMoves(registry: SheetStructureMoveRegistry): voidPlans persisted reference rewrites for complete row and column reordering.
registry: SheetStructureMoveRegistry
methodrender render(): Node<CellProperties>[]Render method; the formula plugin does not render nodes directly.
Formula cells are rendered by FormulaCell through render-registry registration. This plugin owns data updates, not visual presentation.
Inherited members 25
Inherited from Plugin.
- depth
- documentState
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- projectTransaction
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetFormulaReferenceHighlightPluginsource ↗
-
class SheetFormulaReferenceHighlightPlugin extends Plugin<SearCoreSheet, CellProperties, Record<string, never>>Highlights formula precedents and dependents for the active cell.
This intentionally remains separate from Selection: formula dependency status is optional, while Selection itself must stay independent of formula support.
constructorconstructor SheetFormulaReferenceHighlightPlugin(statusProvider: IFormulaStatusProvider, configEngine: ConfigEngine, highlightRegistry: SheetHighlightRegistry, interactionStore: SheetInteractionStore): SheetFormulaReferenceHighlightPluginCreates a SheetFormulaReferenceHighlightPlugin instance.
statusProvider: IFormulaStatusProviderconfigEngine: ConfigEnginehighlightRegistry: SheetHighlightRegistryinteractionStore: SheetInteractionStore
propertydepth depth: numberDraw above regular cells and below Selection's edit overlay.
propertyinterestedIn interestedIn: string[]Declares which Sheet OT action names this plugin is interested in. The engine will only call
applywhen a transaction contains at least one operation matching these action names, unless the transaction is owned by this plugin.['uc', 'rr', 'rc']— only called for UpdateCell, ResizeRow, ResizeCol['*']— called for any transaction (wildcard)[]— only called for this plugin's own transactions
propertyhighlightProviderKeystatic readonly highlightProviderKey: "formula-selection-references"Stable key for the formula-reference highlight contribution.
propertypluginKeystatic readonly pluginKey: PluginKeyStable plugin key for SheetFormulaReferenceHighlightPlugin.
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving SheetFormulaReferenceHighlightPlugin.
methodapply apply(_state: Record<string, never>, _transaction: Transaction): Record<string, never> | nullApplies a transaction to SheetFormulaReferenceHighlightPlugin state.
_state: Record<string, never>_transaction: Transaction
methodbindCrossSheetSource bindCrossSheetSource(source: FormulaCrossSheetHighlightSource): voidBinds an optional workbook-owned reference source for this Sheet instance.
source: FormulaCrossSheetHighlightSource
methodgetHighlights getHighlights(context: SheetHighlightContext): SheetRangeHighlight[]The provider contract consumed by SheetHighlightPlugin.
context: SheetHighlightContext
methodgetPluginConfig getPluginConfig(): unknownReturns the plugin config.
methodregisterState registerState(): { key: PluginKey; state: Record<string, never> }Registers the state.
methodrender render(_searCore: SearCoreSheet): Node<CellProperties>[]Renders SheetFormulaReferenceHighlightPlugin scene output.
_searCore: SearCoreSheet
Inherited members 28
Inherited from Plugin.
- documentState
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceCellFormulaValueConvertersource ↗
-
interface CellFormulaValueConverterDefines how one persisted cell type enters the formula domain.
propertycellType readonly cellType: stringPersisted cell type identifier handled by this converter.
methodtoFormulaValue toFormulaValue(cell: CellMatrixElement): FormulaValueConverts one sheet matrix element into a formula-engine value.
ReturnsFormula value used by formula evaluation and dependency recalculation.
cell: CellMatrixElementPersisted sheet cell to read without mutating sheet state.
- interfaceFormulaCellStatusCommandInputsource ↗
-
interface FormulaCellStatusCommandInputInput for querying one cell's formula status through the host command bus.
- interfaceFormulaCellStatusCommandResultsource ↗
-
interface FormulaCellStatusCommandResult extends SheetCommandResultCommand result for a formula status query.
The pipeline is intentionally empty: formula status reads must not mutate OT state, request rendering, or produce local effects.
propertystatus readonly status: FormulaCellStatusFormula status snapshot returned by the formula status provider.
- interfaceFormulaCrossSheetReferencesource ↗
-
interface FormulaCrossSheetReferenceOne workbook-qualified reference projected onto the currently mounted sheet.
- interfaceFormulaDependencyCellRefsource ↗
-
interface FormulaDependencyCellRefProduct-facing cell coordinate plus A1 reference label.
- interfaceFormulaDependencyStatussource ↗
-
interface FormulaDependencyStatusProduct-facing formula dependency status for one queried cell.
propertycell readonly cell: FormulaDependencyCellRefQueried cell with display label.
propertydependents readonly dependents: readonly FormulaDependencyCellRef[]Direct formula cells that depend on the queried cell.
propertyprecedents readonly precedents: readonly FormulaDependencyReference[]Direct precedent references used by the formula in the queried cell.
propertystatus readonly status: FormulaCellStatusUnderlying formula status snapshot for consumers that need result/error/dirty details.
propertytransitiveDependents readonly transitiveDependents: readonly FormulaDependencyCellRef[]Transitive dependent formula cells, only populated when requested.
propertytransitivePrecedents readonly transitivePrecedents: readonly FormulaDependencyCellRef[]Transitive precedent cells, only populated when requested.
- interfaceFormulaDependencyStatusCommandInputsource ↗
-
interface FormulaDependencyStatusCommandInputInput for querying product-facing formula dependency status.
propertycol readonly col: numberColumn index (0-based).
propertyincludeTransitive readonly includeTransitive?: booleanWhether to include transitive dependency/dependent cells beyond direct edges.
propertymaxDepth readonly maxDepth?: numberMaximum traversal depth used when includeTransitive is true. Defaults to 8.
propertyrow readonly row: numberRow index (0-based).
- interfaceFormulaDependencyStatusCommandResultsource ↗
-
interface FormulaDependencyStatusCommandResult extends SheetCommandResultCommand result for a product-facing formula dependency query.
The pipeline is intentionally empty: dependency reads must not mutate OT state, request rendering, or produce local effects.
propertydependencyStatus readonly dependencyStatus: FormulaDependencyStatusProduct-facing dependency snapshot for the queried cell.
- interfaceFormulaIdleCommandResultsource ↗
-
interface FormulaIdleCommandResult extends SheetCommandResultResult returned when waiting for one editor instance's formula scheduler.
propertyidle readonly idle: Promise<void>Promise resolved when the formula scheduler becomes idle.
- interfaceFormulaIdleProvidersource ↗
-
interface FormulaIdleProviderProvider contract used by the deterministic formula-idle command.
methodwaitForIdle waitForIdle(): Promise<void>Resolves after all currently scheduled formula work has completed.
- interfaceFormulaReferenceColorPalettesource ↗
-
interface FormulaReferenceColorPaletteNamed palette entries stay compatible with the reactive configuration engine.
propertyazure azure: stringpropertyblue blue: stringpropertybrown brown: stringpropertycyan cyan: stringpropertyemerald emerald: stringpropertygreen green: stringpropertyindigo indigo: stringpropertyorange orange: stringpropertyrose rose: stringpropertyslate slate: stringpropertyteal teal: stringpropertyviolet violet: string - interfaceFormulaReferenceHighlightConfigsource ↗
-
interface FormulaReferenceHighlightConfigFormula-reference overlay settings used while editing a formula.
propertyactiveReferenceFillOpacity activeReferenceFillOpacity: numberOpacity of the referenced-cell overlay under the formula cursor.
propertyreferenceColors referenceColors: FormulaReferenceColorPaletteStable, high-contrast colors assigned to formula references.
propertyreferenceFillOpacity referenceFillOpacity: numberOpacity of referenced-cell overlays when the cursor is elsewhere.
- interfaceFormulaRegistryOwnershipsource ↗
-
interface FormulaRegistryOwnershipMarks formula registries borrowed from a Workbook owner by a mounted Sheet.
propertyexternalServices readonly externalServices: booleanpropertyfunctions readonly functions: booleanpropertytextServices readonly textServices: boolean - interfaceFormulaResultProviderRegistrationsource ↗
-
interface FormulaResultProviderRegistrationOrdered formula result provider registered for one SheetEditor instance.
- interfaceFormulaRichResultProviderRegistrationsource ↗
-
interface FormulaRichResultProviderRegistrationOrdered rich-result provider registered for one SheetEditor instance.
- interfaceFormulaSchedulerDataSourcesource ↗
-
interface FormulaSchedulerDataSourceNarrow data-source contract used by RecalcScheduler.
Implementations adapt host-owned sheet data, viewport state, and dimension services into formula-engine concepts. The scheduler depends only on this contract, not on render, scroll, or DataEngine packages.
methodcreateEvalContext createEvalContext(resultStore: FormulaResultStore): EvalContextBuilds the latest evaluation context for a recalculation batch.
ReturnsEvalContext for the current committed sheet snapshot.
resultStore: FormulaResultStorePer-client derived formula result store used when formula cells reference formula cells.
methodgetViewportFormulaKeys getViewportFormulaKeys(formulaKeys: Iterable<number>): Set<number>Selects formula keys that are currently visible and should be evaluated first.
ReturnsFormula keys inside the current visible viewport.
formulaKeys: Iterable<number>Formula AST keys known to the scheduler.
methodonExternalServiceInvalidated onExternalServiceInvalidated(handler: FormulaExternalServiceInvalidationHandler): (): voidSubscribes to host-service cache changes that require selected functions to be evaluated again.
handler: FormulaExternalServiceInvalidationHandler
methodonViewportChanged onViewportChanged(handler: FormulaViewportChangeHandler): (): voidSubscribes to viewport changes that should wake pending formula recalculation.
ReturnsDisposer for the subscription.
handler: FormulaViewportChangeHandlerCallback invoked after viewport-priority inputs change.
- interfaceFormulaSourceProviderRegistrationsource ↗
-
interface FormulaSourceProviderRegistration - interfaceUnregisterFormulaProviderInputsource ↗
-
interface UnregisterFormulaProviderInputpropertykind readonly kind: FormulaProviderKindpropertyregistrationId readonly registrationId: number - typeFormulaDependencyReferencesource ↗
-
type FormulaDependencyReference = FormulaDependencyCellRef & { kind: typeof FormulaNodeKind.Cell } | { end: FormulaDependencyCellRef; kind: typeof FormulaNodeKind.Range; ref: string; start: FormulaDependencyCellRef } | FormulaDependencyCellRef & { kind: typeof FormulaNodeKind.WorkbookCell; sheetName: string } | { end: FormulaDependencyCellRef; kind: typeof FormulaNodeKind.WorkbookRange; ref: string; sheetName: string; start: FormulaDependencyCellRef } | { endCol: number; kind: typeof FormulaNodeKind.ColumnRange; ref: string; startCol: number } | { endRow: number; kind: typeof FormulaNodeKind.RowRange; ref: string; startRow: number }Product-facing dependency edge that preserves range-level formula semantics.
- typeFormulaPluginStatesource ↗
-
type FormulaPluginState = nullFormula owns no document state; its ASTs and results are derived caches.
- typeFormulaProviderKindsource ↗
-
type FormulaProviderKind = typeof FormulaProviderKind[keyof typeof FormulaProviderKind]Formula-owned provider families sharing one editor-local unregister command.
- typeFormulaRenderInvalidationHandlersource ↗
-
type FormulaRenderInvalidationHandler = (keys: readonly CellKey[]): voidCompatibility callback for formula-result change notifications.
- typeFormulaViewportChangeHandlersource ↗
-
type FormulaViewportChangeHandler = (): voidCallback invoked when viewport-priority scheduling inputs may have changed.
- variableDiscardFormulaWorkCommandsource ↗
-
DiscardFormulaWorkCommand: SheetCommandDefinition<void, SheetCommandResult>Invalidates an obsolete formula calculation generation.
- variableFormulaCalculationTraceObservationsource ↗
-
FormulaCalculationTraceObservation: EventObservationDefinition<FormulaCalculationTraceEvent>Editor-local formula calculation trace events exposed to diagnostic hosts.
- variableFormulaProviderKindsource ↗
-
FormulaProviderKind: { Result: "result"; RichResult: "richResult"; Source: "source" }Formula-owned provider families sharing one editor-local unregister command.
- variableformulaReferenceHighlightConfigsource ↗
-
formulaReferenceHighlightConfig: FormulaReferenceHighlightConfig - variableGetFormulaCellStatusCommandsource ↗
-
GetFormulaCellStatusCommand: SheetCommandDefinition<FormulaCellStatusCommandInput, FormulaCellStatusCommandResult>Host command that reads one cell's formula status.
- variableGetFormulaDependencyStatusCommandsource ↗
-
GetFormulaDependencyStatusCommand: SheetCommandDefinition<FormulaDependencyStatusCommandInput, FormulaDependencyStatusCommandResult>Host command that reads product-facing formula dependency status.
- variableMarkFormulaDirtyCommandsource ↗
-
MarkFormulaDirtyCommand: SheetCommandDefinition<readonly number[], SheetCommandResult>Marks formula dependencies dirty after an external result or function changes.
- variableResumeFormulaWorkCommandsource ↗
-
ResumeFormulaWorkCommand: SheetCommandDefinition<void, SheetCommandResult>Resumes pending formula work when the visible viewport changes.
- variableRunFormulaBatchCommandsource ↗
-
RunFormulaBatchCommand: SheetCommandDefinition<void, SheetCommandResult>Executes one scheduled, time-bounded formula calculation batch.
- variablesheetFormulaPluginKeysource ↗
-
sheetFormulaPluginKey: PluginKeyShared identity for formula plugin state and configuration.
- variableUnregisterFormulaProviderCommandsource ↗
-
UnregisterFormulaProviderCommand: SheetCommandDefinition<UnregisterFormulaProviderInput, SheetCommandResult>Removes an editor-local formula provider registration.
- variableUnregisterSheetFormulaExternalServiceCommandsource ↗
-
UnregisterSheetFormulaExternalServiceCommand: SheetCommandDefinition<number, SheetCommandResult>Removes one Sheet-owned external formula service contribution.
- variableUnregisterSheetFormulaFunctionCommandsource ↗
-
UnregisterSheetFormulaFunctionCommand: SheetCommandDefinition<number, SheetCommandResult>Removes one function contribution through its Sheet owner.
- variableUnregisterSheetFormulaTextServiceCommandsource ↗
-
UnregisterSheetFormulaTextServiceCommand: SheetCommandDefinition<number, SheetCommandResult>Removes one Sheet-owned formula text service contribution.
- variableWaitForFormulaIdleCommandsource ↗
-
WaitForFormulaIdleCommand: SheetCommandDefinition<void, FormulaIdleCommandResult>Host command that exposes deterministic formula-idle synchronization.
- functiongetFormulaReferenceColorsource ↗
-
getFormulaReferenceColor(referenceIndex: number, colors?: FormulaReferenceColorPalette): stringAssigns a formula reference its Excel-style, position-based palette color.
referenceIndex: numbercolors: FormulaReferenceColorPalette
- functionlockFormulaResultValuesource ↗
-
lockFormulaResultValue(value: FormulaValue): voidLocks a calculated value once when it enters the editor-local result cache.
value: FormulaValue
- functionregisterFormulaStatusCommandssource ↗
-
registerFormulaStatusCommands(commands: SheetCommandBus, provider: IFormulaStatusProvider, idleProvider?: FormulaIdleProvider): voidRegisters formula status query commands.
commands: SheetCommandBusCommand bus for one editor instance.
provider: IFormulaStatusProviderFormula status provider bound to the same editor instance.
idleProvider: FormulaIdleProvider
- functionwaitForFormulaIdlesource ↗
-
waitForFormulaIdle(commands: SheetCommandBus): Promise<void>Waits deterministically for one editor's formula scheduler to become idle.
commands: SheetCommandBus
No public exports match that search.