API reference
@searsuite/sear-assembly-plugin
Plugin lifecycle, runtime capabilities, state contributions, and extension registries.
92 exportsderived from source
Concept 1
Register behavior with its owner
Plugin and PluginSpec describe an optional feature. During assembly, a plugin can register services, state,
commands, queries, observations, capabilities, and codecs. Registration establishes who owns a value and which
operation may change it. A feature that owns Sheet fill, for example, keeps its fill matrix and commands in its own
package while the assembly only connects it to an editor.
Use when: adding optional built-in or third-party behavior. Choose the lowest layer that owns the behavior: portable values in a domain package, feature state and commands in a plugin, platform conversion in a host adapter. A plugin should not reach into another feature's state or duplicate its finite values.
Concept 2
Registration, commit, and teardown
The composition root runs explicit lifecycle phases. A state contribution is available before commands and consumers that need it; successful commands publish committed changes to observers and renderers. Resources acquired during registration must be released in reverse order when setup fails or the editor is destroyed.
PluginManager coordinates registration. Runtime capabilities expose editor-owned services to the host without
exposing its dependency-injection container. Session adapters capture transient values across a Workbook Sheet
remount; document codecs and versioned OT contributions handle durable export and collaboration separately.
- classEditorLifecycleErrorsource ↗
-
class EditorLifecycleError extends SearErrorPublic error raised when lifecycle stack ownership is violated.
constructorconstructor EditorLifecycleError(code: EditorLifecycleErrorCode, message: string, details?: SearErrorDetails): EditorLifecycleErrorcode: EditorLifecycleErrorCodemessage: stringdetails: SearErrorDetails
propertycode readonly code: EditorLifecycleErrorCodeStable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classEditorLifecycleStacksource ↗
-
class EditorLifecycleStackIdempotent reverse-order disposer stack used by editor composition roots.
constructorconstructor EditorLifecycleStack(): EditorLifecycleStackmethodadd add(disposer: (): void): voidAdds one owned resource disposer in acquisition order.
disposer: (): void
methoddispose dispose(): voidRuns every disposer in reverse order and continues cleanup after individual failures.
- classHeadlessToolbarsource ↗
-
class HeadlessToolbar extends SearToolbarToolbar implementation for hosts without a UI surface.
constructorconstructor HeadlessToolbar(): HeadlessToolbarpropertysymbolstatic readonly symbol: symbolDI token for resolving HeadlessToolbar.
methoddestroy destroy(): voidReleases resources owned by SearToolbar.
methodmount mount(_target: unknown): voidAttaches this adapter to its host surface.
_target: unknown
- classPluginsource ↗
-
class Plugin<SearCoreType, NodeTypeProperties, PluginStateType>Base contract implemented by sheet and document plugins.
Plugins own their state, declare lifecycle hooks, transform transactions into state, and render scene nodes for their host core. Runtime packages should extend this contract rather than reaching into Core internals.
constructorconstructor Plugin<SearCoreType, NodeTypeProperties, PluginStateType>(__namedParameters: PluginSpec<PluginStateType>): Plugin<SearCoreType, NodeTypeProperties, PluginStateType>Creates a plugin with its stable identity and initial state.
__namedParameters: PluginSpec<PluginStateType>
propertydepth readonly depth: numberDraw and event ordering hint; lower values run earlier.
propertydocumentState readonly documentState?: PluginDocumentStateContribution<PluginStateType, object> | readonly PluginDocumentStateContribution<PluginStateType, object>[]Document-state export modules owned by this plugin state.
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
propertypluginKey pluginKey: PluginKeyStable plugin key used by PluginManager and SceneGraph ownership maps.
propertytransactionHistory readonly transactionHistory?: PluginTransactionHistoryAdapterOptional history behavior for transactions owned by this plugin.
propertytransactionOT readonly transactionOT?: PluginTransactionOTContribution<OTOperation>Shared transaction algebra used by history and collaboration.
propertywarnOnDuplicateDepth readonly warnOnDuplicateDepth: booleanWhether PluginManager should warn when another ordered plugin shares this depth.
memberkey key: unknownmethodapply apply(pluginState: PluginStateType, transaction: Transaction): PluginStateType | nullApplies a transaction to plugin-owned state and returns the next state.
pluginState: PluginStateTypetransaction: Transaction
methoddirtyRect dirtyRect(searCore: SearCoreType, transaction: Transaction): PositionRect<unknown> | null | undefinedOptional. Return the pixel-space dirty rectangle that needs to be redrawn after this plugin processes
transaction.When implemented,
SearCoreSheet.dispatchwill callmarkDirtywith the returned rect and skip a full-canvas re-render for this plugin. When omitted (or whennull/undefinedis returned), dispatch falls back to a full render pass.searCore: SearCoreTypetransaction: Transaction
methodenforceRuntimeWriteBoundary enforceRuntimeWriteBoundary(assertWrite: (): void): voidInstalls the editor's command check for plugin-owned runtime sessions.
assertWrite: (): void
methodenforceStateWriteBoundary enforceStateWriteBoundary(commitToken: object): voidRestricts state replacement to the owning editor's commit phase.
commitToken: object
methodgetPluginConfig getPluginConfig(searCore: SearCoreType): unknownReturns this plugin's runtime configuration view for the current core.
searCore: SearCoreType
methodgetState getState(): PluginStateTypeReturns the plugin-owned state currently registered with the manager.
methodhasStateWriteBoundary hasStateWriteBoundary(): booleanReports whether the owning runtime has taken control of state replacement.
methodlockCommittedState lockCommittedState(state: PluginStateType): voidOptionally locks a committed plugin-owned local state value against retained handles.
state: PluginStateType
methodonClick onClick(earCore: SearCoreType, event: EventWithOffsetAndTarget<NodeTypeProperties>): boolean | voidPlugin pointer event handlers.
Return value contract:
- Return
falseto stop subsequent plugins from handling the same event. - Return
true/undefined/voidto continue dispatching.
This mechanism allows a plugin to explicitly suppress downstream handlers after it has consumed an event, replacing the old coupled approach where one plugin directly modified another plugin's state.
earCore: SearCoreTypeevent: EventWithOffsetAndTarget<NodeTypeProperties>
methodonDblClick onDblClick(earCore: SearCoreType, event: EventWithOffsetAndTarget<NodeTypeProperties>): boolean | voidHandles a double-click pointer event.
earCore: SearCoreTypeevent: EventWithOffsetAndTarget<NodeTypeProperties>
methodonInitialDataCell onInitialDataCell(searCore: SearCoreType, cell: unknown, row: number, col: number): voidReceives one non-empty cell during SearCoreSheet's shared startup scan. The scan runs once after every plugin state has been registered, so plugins can build derived indexes without independently traversing the whole sheet.
searCore: SearCoreTypecell: unknownrow: numbercol: number
methodonInitialDataComplete onInitialDataComplete(searCore: SearCoreType): voidCalled after the final cell of the shared startup scan is delivered.
searCore: SearCoreType
methodonMouseDown onMouseDown(searCore: SearCoreType, event: EventWithOffsetAndTarget<NodeTypeProperties>): boolean | voidHandles the start of a pointer press sequence.
searCore: SearCoreTypeevent: EventWithOffsetAndTarget<NodeTypeProperties>
methodonMouseMove onMouseMove(searCore: SearCoreType, event: EventWithOffsetAndTarget<NodeTypeProperties>): boolean | voidHandles pointer movement over the host surface.
searCore: SearCoreTypeevent: EventWithOffsetAndTarget<NodeTypeProperties>
methodonMouseUp onMouseUp(searCore: SearCoreType, event: EventWithOffsetAndTarget<NodeTypeProperties>): boolean | voidHandles the end of a pointer press sequence.
searCore: SearCoreTypeevent: EventWithOffsetAndTarget<NodeTypeProperties>
methodonResize onResize(): voidOptional hook invoked when the host viewport or sheet dimensions change.
methodonScroll onScroll(scrollManagerState: ScrollManagerState): voidReceives scroll state changes from the active scroll manager.
scrollManagerState: ScrollManagerState
methodonTransactionCommitted onTransactionCommitted(transaction: Transaction): voidRuns only after every step in the enclosing pipeline has succeeded and all staged plugin state has been committed. Use it for derived caches, notifications, persistence, and transport; never perform those effects in apply, because a later pipeline step may still fail.
transaction: TransactionA committed transaction from the completed pipeline.
methodprojectTransaction projectTransaction(state: PluginStateType, transaction: Transaction): readonly Transaction<Operation>[]Purely plans owner-targeted prerequisites before another owner's explicit transaction. Sheet runtimes stage these once, atomically with the original transaction, and retain them in the command pipeline for history and collaboration. Never mutate input state.
state: PluginStateTypetransaction: Transaction
methodregisterConfig registerConfig(): PluginConfigRegistration<Record<string, unknown>>[]Registers default configuration values owned by this plugin.
methodregisterState registerState(): PluginStateRegistration<PluginStateType> | PluginStateRegistration<unknown>[]Registers one or more plugin-owned state records with the host manager.
methodrender render(searCore: SearCoreType, offset?: { x: number; y: number }): Node<NodeTypeProperties> | Node<NodeTypeProperties>[] | nullProduces scene nodes owned by this plugin for the current core state.
searCore: SearCoreTypeoffset: { x: number; y: number }
methodsealRuntimeMetadata sealRuntimeMetadata(): voidFixes transaction and export metadata after the editor takes ownership.
methodsealRuntimeMethods sealRuntimeMethods(): voidPins transaction and render hooks after plugin startup.
methodsealRuntimeWrites sealRuntimeWrites(): voidCloses runtime-owned extension writes after every plugin has initialized and started.
methodsetState setState(state: PluginStateType, commitToken?: object): voidReplaces the plugin-owned state after an apply or runtime transition.
state: PluginStateTypecommitToken: object
- classPluginKeysource ↗
-
class PluginKeyStable unique key assigned to one plugin instance.
Plugin managers use this key to store state, render nodes, and diagnostics without requiring plugin classes to be singleton values.
constructorconstructor PluginKey(key?: string): PluginKeyConstructs a key using the provided base name.
key: stringHuman-readable plugin key prefix.
propertykey readonly key: stringUnique plugin key string.
- classPluginManagersource ↗
-
class PluginManager<SearCoreType, NodeTypeProperties>Ordered registry that owns plugin instances for one core/editor runtime.
constructorconstructor PluginManager<SearCoreType, NodeTypeProperties>(platform?: Platform): PluginManager<SearCoreType, NodeTypeProperties>Creates a PluginManager bound to the host diagnostics channel when available.
platform: Platform
propertysymbolstatic readonly symbol: symbolDI token for resolving the runtime plugin manager.
methodclearPlugins clearPlugins(token?: object): voidRemoves all registered plugins during host teardown.
token: object
methodenforceWriteBoundary enforceWriteBoundary(token: object): voidGives the owning runtime exclusive registry write access after assembly.
token: object
methodforEach forEach(callbackfn: (plugin: Plugin<SearCoreType, NodeTypeProperties, any>): void): voidVisits plugins in depth order so event, apply and render flows stay deterministic.
callbackfn: (plugin: Plugin<SearCoreType, NodeTypeProperties, any>): void
methodgetAllPlugins getAllPlugins(): Plugin<SearCoreType, NodeTypeProperties, any>[]Returns all registered plugins in insertion order.
methodgetCollaborativeTransactionPlugin getCollaborativeTransactionPlugin(ownerId: string): Plugin<SearCoreType, NodeTypeProperties, any> | undefinedResolves a stable collaboration owner to its editor-local plugin instance.
ownerId: string
methodgetCollaborativeTransactionPlugins getCollaborativeTransactionPlugins(): readonly Plugin<SearCoreType, NodeTypeProperties, any>[]Lists collaborative transaction owners registered in this runtime.
methodgetDocumentStateContributions getDocumentStateContributions(): readonly RegisteredPluginDocumentStateContribution[]Lists document-state export contributions registered by plugin state owners.
methodgetPluginState getPluginState<T>(key: PluginKey): T | undefinedReturns the state owned by a registered plugin key, if present.
key: PluginKey
methodgetTransactionHistoryAdapter getTransactionHistoryAdapter(transaction: Transaction): PluginTransactionHistoryAdapter | undefinedReturns the history adapter contributed by a transaction's state owner.
transaction: Transaction
methodgetTransactionOTContribution getTransactionOTContribution(transaction: Transaction): PluginTransactionOTContribution<OTOperation> | undefinedReturns the shared transaction OT contribution for one local transaction owner.
transaction: Transaction
methodinvertTransaction invertTransaction(transaction: Transaction): Transaction<Operation> | nullInverts a transaction through its owner's registered OT definition.
transaction: Transaction
methodregisterPlugin registerPlugin<T>(plugin: Plugin<SearCoreType, NodeTypeProperties, T>, token?: object): voidRegisters a plugin under its key and rejects duplicate ownership.
plugin: Plugin<SearCoreType, NodeTypeProperties, T>token: object
methodtransformTransaction transformTransaction(transaction: Transaction, other: Transaction): Transaction<Operation> | nullRebases a retained transaction over another committed transaction through the shared registry.
transaction: Transactionother: Transaction
methodunregisterPlugin unregisterPlugin(pluginOrKey: string | PluginKey | Plugin<SearCoreType, NodeTypeProperties, any>, token?: object): voidUnregisters a plugin and clears the manager-owned state reference.
pluginOrKey: string | PluginKey | Plugin<SearCoreType, NodeTypeProperties, any>token: object
- classRuntimeCapabilityErrorsource ↗
-
class RuntimeCapabilityError extends SearErrorPublic error raised when a runtime capability contract is violated.
constructorconstructor RuntimeCapabilityError(code: RuntimeCapabilityErrorCode, message: string, details?: SearErrorDetails): RuntimeCapabilityErrorcode: RuntimeCapabilityErrorCodemessage: stringdetails: SearErrorDetails
propertycode readonly code: RuntimeCapabilityErrorCodeStable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classRuntimeCapabilityRegistrysource ↗
-
class RuntimeCapabilityRegistry extends RuntimeCapabilityReaderEditor-local registry shared by Sheet, Doc and Workbook assemblies.
constructorconstructor RuntimeCapabilityRegistry(owner?: string): RuntimeCapabilityRegistryowner: string
methoddestroy destroy(): voidPermanently closes the registry and releases all published values.
methodenforceWriteBoundary enforceWriteBoundary(assertWrite: (): void): voidRequires editor command dispatch for capability changes after assembly.
assertWrite: (): void
methodget get<T>(capability: RuntimeCapability<T>): T | undefinedcapability: RuntimeCapability<T>
methodgetRegisteredCapabilityIds getRegisteredCapabilityIds(): readonly string[]methodhas has(capability: RuntimeCapability<unknown>): booleancapability: RuntimeCapability<unknown>
methodregister register<T>(capability: RuntimeCapability<T>, value: T): (): voidRegisters one value and returns an idempotent disposer for that registration.
capability: RuntimeCapability<T>value: T
methodrequire require<T>(capability: RuntimeCapability<T>): Tcapability: RuntimeCapability<T>
- classSearFormulaBarsource ↗
-
class SearFormulaBarPlatform-neutral lifecycle for a Sheet formula input surface.
constructorconstructor SearFormulaBar(): SearFormulaBarpropertysymbolstatic readonly symbol: symbolmethoddestroy destroy(): voidmethodmount mount(target: unknown): voidtarget: unknown
- classSearToolbarsource ↗
-
class SearToolbarPlatform-neutral toolbar lifecycle contract.
constructorconstructor SearToolbar(): SearToolbarpropertysymbolstatic readonly symbol: symbolDI token for resolving SearToolbar.
methoddestroy destroy(): voidReleases resources owned by SearToolbar.
methodmount mount(target: unknown): voidAttaches this adapter to its host surface.
target: unknown
- classSessionStateErrorsource ↗
-
class SessionStateError extends SearErrorError raised when a session-state contributor violates its registry contract.
constructorconstructor SessionStateError(code: SessionStateErrorCode, message: string, details?: SearErrorDetails): SessionStateErrorCreates a session-state contract error.
code: SessionStateErrorCodemessage: stringdetails: SearErrorDetails
propertycode readonly code: SessionStateErrorCodeStable machine-readable error code.
Inherited members 9
Inherited from SearError.
- classSessionStateRegistrysource ↗
-
class SessionStateRegistryEditor-local coordinator for all built-in and plugin-contributed session state.
constructorconstructor SessionStateRegistry(): SessionStateRegistrypropertysymbolstatic readonly symbol: typeof symbolDI token for resolving the editor-local registry.
methodassertRestorationOpen assertRestorationOpen(): voidRejects a retained contributor restore callback after editor initialization.
methodcapture capture(): SessionStateSnapshotCaptures every registered contributor while preserving state whose owner is not loaded.
methodclear clear(lifecycleToken?: object): voidClears contributors and retained state owned by this registry instance.
lifecycleToken: object
methodgetCompletedRestorePhases getCompletedRestorePhases(): readonly SessionStateRestorePhase[]Returns restore phases already completed by this editor lifecycle.
methodgetRegisteredStateIds getRegisteredStateIds(): readonly string[]Returns sorted ids for currently registered contributors.
methodloadSnapshot loadSnapshot(snapshot: SessionStateSnapshot): voidLoads a complete snapshot before lifecycle restoration begins.
snapshot: SessionStateSnapshot
methodregister register<State>(definition: SessionStateDefinition<State>, adapter: SessionStateAdapter<State>): (): voidRegisters one state owner and returns an idempotent disposer.
definition: SessionStateDefinition<State>adapter: SessionStateAdapter<State>
methodrestorePhase restorePhase(phase: SessionStateRestorePhase): voidRestores every registered contributor assigned to one ordered lifecycle phase.
phase: SessionStateRestorePhase
methodsealRestoration sealRestoration(lifecycleToken: object): voidCloses initialization-only restore operations for an assembled editor.
lifecycleToken: object
- classSheetFormatTransferRegistrysource ↗
-
class SheetFormatTransferRegistryEditor-local composition of state-owner format transfers.
constructorconstructor SheetFormatTransferRegistry(): SheetFormatTransferRegistrypropertysymbolstatic readonly symbol: typeof symbolmethodcapture capture(source: SheetMoveRange): SheetFormatTransferSnapshotsource: SheetMoveRange
methodcapturePortable capturePortable(source: SheetMoveRange): readonly SheetPortableFormatTransfer[]source: SheetMoveRange
methodclear clear(range: SheetMoveRange): readonly SheetFormatTransferPlan[]Plans all format owners against the same unchanged pre-clear state.
range: SheetMoveRange
methoddestroy destroy(): voidmethodplanPortable planPortable(captured: readonly SheetPortableFormatTransfer[], destination: SheetMoveRange): readonly SheetFormatTransferPlan[]captured: readonly SheetPortableFormatTransfer[]destination: SheetMoveRange
methodregister register(owner: SheetFormatTransferContribution): (): voidowner: SheetFormatTransferContribution
- classSheetRangeMoveRegistrysource ↗
-
class SheetRangeMoveRegistryEditor-local range-move planning extension point shared by state owners.
constructorconstructor SheetRangeMoveRegistry(): SheetRangeMoveRegistrypropertysymbolstatic readonly symbol: typeof symbolmethodanalyze analyze(context: SheetRangeMoveContext): SheetRangeMoveAnalysisAssesses all owner constraints without planning or publishing any mutation.
context: SheetRangeMoveContext
methoddestroy destroy(): voidReleases all editor-owned registrations.
methodhasConflict hasConflict(context: SheetRangeMoveContext): booleanValidates all owners before testing destination conflicts.
context: SheetRangeMoveContext
methodplan plan(context: SheetRangeMoveContext): readonly SheetRangeMovePlan[]Plans all owners against the same pre-move state.
context: SheetRangeMoveContext
methodregister register(contribution: SheetRangeMoveContribution): (): voidRegisters one owner and returns an idempotent disposer.
contribution: SheetRangeMoveContribution
- classSheetRangeMoveRejectedErrorsource ↗
-
class SheetRangeMoveRejectedError extends SearErrorA rejected assessment retains the state owner's stable diagnostic code.
constructorconstructor SheetRangeMoveRejectedError(analysis: { context: SheetRangeMoveContext; issue: { code: string; details: SearErrorDetails; message: string; ownerId: string }; status: "blocked" }): SheetRangeMoveRejectedErrorCreates the command failure from the same assessment consumed by preview.
analysis: { context: SheetRangeMoveContext; issue: { code: string; details: SearErrorDetails; message: string; ownerId: string }; status: "blocked" }
propertycode readonly code: stringStable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classSheetRangeReorderRegistrysource ↗
-
class SheetRangeReorderRegistryconstructorconstructor SheetRangeReorderRegistry(): SheetRangeReorderRegistrypropertysymbolstatic readonly symbol: typeof symbolmethoddestroy destroy(): voidmethodplan plan(context: SheetRangeReorderContext): readonly SheetRangeReorderPlan[]context: SheetRangeReorderContext
methodregister register(contribution: SheetRangeReorderContribution): (): voidcontribution: SheetRangeReorderContribution
- classSheetStructureMoveRegistrysource ↗
-
class SheetStructureMoveRegistryEditor-local preflight and operation planning for complete-axis moves.
constructorconstructor SheetStructureMoveRegistry(): SheetStructureMoveRegistrypropertysymbolstatic readonly symbol: typeof symbolmethoddestroy destroy(): voidReleases editor-owned contributions.
methodplan plan(context: SheetStructureMoveContext): readonly Operation[]Validates the original intent before compiling dependent operation updates.
context: SheetStructureMoveContext
methodregister register(contribution: SheetStructureMoveContribution): (): voidRegisters one contribution with order-independent, idempotent disposal.
contribution: SheetStructureMoveContribution
- interfacePluginCommandExtensionsource ↗
-
interface PluginCommandExtension<CommandBus>Plugin capability for registering typed commands against one host command bus.
methodregisterCommands registerCommands(commands: CommandBus): voidRegisters every stable command id owned by this plugin.
commands: CommandBus
- interfacePluginCommandRegistrarsource ↗
-
interface PluginCommandRegistrar<CommandBus>Required-method view used by host assemblies when invoking command registration.
methodregisterCommands registerCommands(commands: CommandBus): voidRegisters every stable command id owned by this plugin.
commands: CommandBus
- interfacePluginConfigRegistrationsource ↗
-
interface PluginConfigRegistration<ConfigType>Default configuration contributed by one plugin during editor setup.
- interfacePluginDataEngineRegistrationOptionssource ↗
-
interface PluginDataEngineRegistrationOptions<PluginStateType>Controls whether a plugin state registration is exposed through DataEngine and data views.
propertydataView readonly dataView?: readonly PluginDataViewFieldRegistration<PluginStateType>[]Field selectors contributed by this state to named read-only data views.
propertyenabled readonly enabled?: booleanWhen false, Core keeps the plugin private to PluginManager and skips DataEngine registration.
- interfacePluginDataViewFieldRegistrationsource ↗
-
interface PluginDataViewFieldRegistration<PluginStateType>Describes one plugin-owned field exposed to a named DataEngine read-only view.
propertyfieldKey readonly fieldKey: stringField name written into the named view. Duplicate names in one view are rejected by DataEngine.
propertyrequired readonly required?: booleanWhen false, a missing state or void field does not make the containing view unavailable.
propertyselect readonly select: (state: PluginStateType): unknownReads the field value from the current plugin-owned state whenever the view is requested.
propertyviewKey readonly viewKey: stringNamed data view that receives this field, such as a sheet-level read model.
- interfacePluginDocumentStateCodecsource ↗
-
interface PluginDocumentStateCodec<TDocumentState>JSON-export codec shape supplied by a plugin-owned document-state module.
propertykey readonly key: stringmethoddeserialize deserialize(payload: unknown, path: string): Partial<TDocumentState>payload: unknownpath: string
methodserialize serialize(state: TDocumentState): unknownstate: TDocumentState
- interfacePluginDocumentStateContributionsource ↗
-
interface PluginDocumentStateContribution<TOwnerState, TDocumentState>Document-state export contribution owned by one plugin state owner.
- interfacePluginObservationExtensionsource ↗
-
interface PluginObservationExtension<ObservationRegistry>Plugin capability for registering typed observations against one host observation registry.
methodregisterObservations registerObservations(observations: ObservationRegistry): voidRegisters every typed state and event observation source owned by this plugin.
observations: ObservationRegistry
- interfacePluginObservationRegistrarsource ↗
-
interface PluginObservationRegistrar<ObservationRegistry>Required-method view used by host assemblies when invoking observation registration.
methodregisterObservations registerObservations(observations: ObservationRegistry): voidRegisters every typed state and event observation source owned by this plugin.
observations: ObservationRegistry
- interfacePluginQueryRegistrarsource ↗
-
interface PluginQueryRegistrar<QueryRegistry>methodregisterQueries registerQueries(queries: QueryRegistry): voidqueries: QueryRegistry
- interfacePluginRuntimeCapabilityExtensionsource ↗
-
interface PluginRuntimeCapabilityExtension<RuntimeCapabilityRegistry>Plugin capability for publishing typed editor-owned services to plugins and hosts.
methodregisterCapabilities registerCapabilities(registry: RuntimeCapabilityRegistry): voidRegisters every runtime capability owned by this plugin.
registry: RuntimeCapabilityRegistry
- interfacePluginRuntimeCapabilityRegistrarsource ↗
-
interface PluginRuntimeCapabilityRegistrar<RuntimeCapabilityRegistry>Required-method view used by host assemblies when invoking capability registration.
methodregisterCapabilities registerCapabilities(registry: RuntimeCapabilityRegistry): voidregistry: RuntimeCapabilityRegistry
- interfacePluginSessionStateExtensionsource ↗
-
interface PluginSessionStateExtension<SessionStateRegistry>Plugin capability for registering editor-local session capture and restore behavior.
methodregisterSessionState registerSessionState(registry: SessionStateRegistry): voidRegisters every local session value owned by this plugin.
registry: SessionStateRegistry
- interfacePluginSessionStateRegistrarsource ↗
-
interface PluginSessionStateRegistrar<SessionStateRegistry>Required-method view used by host assemblies when invoking session-state registration.
methodregisterSessionState registerSessionState(registry: SessionStateRegistry): voidRegisters every local session value owned by this plugin.
registry: SessionStateRegistry
- interfacePluginSpecsource ↗
-
interface PluginSpec<T>Immutable identity and initial state used to construct a plugin instance.
- interfacePluginStateRegistrationsource ↗
-
interface PluginStateRegistration<PluginStateType>State registration returned by plugins during editor initialization.
propertydataEngine readonly dataEngine?: PluginDataEngineRegistrationOptions<PluginStateType>DataEngine exposure metadata for this state registration.
propertykey readonly key: PluginKeyPlugin key that owns the registered state.
propertystate readonly state: PluginStateTypeState value to register for that plugin key.
- interfacePluginTransactionHistoryAdaptersource ↗
-
interface PluginTransactionHistoryAdapterConverts one plugin-owned transaction into history operations and rebases retained history over transactions that committed later.
methodinvert invert(transaction: Transaction): Transaction<Operation> | nullCreates the transaction that reverses the supplied committed transaction.
transaction: Transaction
methodtransform transform(transaction: Transaction, other: Transaction): Transaction<Operation> | nullRebases a retained transaction over a transaction that committed later.
transaction: Transactionother: Transaction
- interfacePluginTransactionHistoryOperationssource ↗
-
interface PluginTransactionHistoryOperationsOperation-level functions used to build one plugin-owned history adapter.
methodinvert invert(operations: Operation[]): Operation[]Reverses an operation list in rollback order.
operations: Operation[]
methodtransform transform(operations: Operation[], other: Operation[]): Operation[]Rebases an operation list over operations that committed later.
operations: Operation[]other: Operation[]
- interfacePluginTransactionOTContributionsource ↗
-
interface PluginTransactionOTContribution<OperationType>Transaction algebra and collaboration metadata contributed by one state owner.
propertycollaborative readonly collaborative?: booleanWhether committed transactions owned by this plugin may cross a collaboration transport.
propertydefinition readonly definition: TransactionOTDefinition<OperationType>Versioned operation family used by history and collaboration.
propertyownerId readonly ownerId: stringStable wire identity independent from process-local PluginKey suffixes.
propertyrelations readonly relations?: readonly OTTransformRelation<OTOperation, OTOperation>[]Explicit relations needed by third-party operation families.
- interfaceRegisteredPluginDocumentStateContributionsource ↗
-
interface RegisteredPluginDocumentStateContributionDocument-state export contribution bound to the plugin instance that owns the source state.
propertycontribution readonly contribution: PluginDocumentStateContribution<unknown>propertyplugin readonly plugin: Plugin<unknown, NodeProperties, unknown> - interfaceRuntimeCapabilitysource ↗
-
interface RuntimeCapability<T>Typed token used to publish an editor-owned runtime service to plugins and hosts.
- interfaceRuntimeCapabilityReadersource ↗
-
interface RuntimeCapabilityReaderRead-only capability view exposed by an editor facade.
methodget get<T>(capability: RuntimeCapability<T>): T | undefinedcapability: RuntimeCapability<T>
methodgetRegisteredCapabilityIds getRegisteredCapabilityIds(): readonly string[]methodhas has(capability: RuntimeCapability<unknown>): booleancapability: RuntimeCapability<unknown>
methodrequire require<T>(capability: RuntimeCapability<T>): Tcapability: RuntimeCapability<T>
- interfaceSessionStateAdaptersource ↗
-
interface SessionStateAdapter<State>Captures and restores one detached local session value.
propertyrestoreAfter readonly restoreAfter?: readonly SessionStateDefinition<unknown>[]Contributors in the same phase that must restore before this one when they are registered.
propertyrestorePhase readonly restorePhase: SessionStateRestorePhaseLifecycle phase in which restore() may safely update the owning feature.
methodcapture capture(): State | undefinedReturns plain data or a supported built-in value; custom class instances are not session snapshots.
methodrestore restore(state: State): voidRestores local state during the declared lifecycle phase.
state: State
- interfaceSessionStateDefinitionsource ↗
-
interface SessionStateDefinition<State>Typed identity owned and exported by one local-state contributor.
- interfaceSheetFormatMatrixsource ↗
-
interface SheetFormatMatrix<Value>Sparse read contract implemented by feature-owned matrices.
methodforEachStoredInRange forEachStoredInRange(startRow: number, startColumn: number, endRow: number, endColumn: number, visit: (value: Value, row: number, column: number): void): voidstartRow: numberstartColumn: numberendRow: numberendColumn: numbervisit: (value: Value, row: number, column: number): void
methodgetDefaultValue getDefaultValue(): Value | null | undefinedmethodgetItem getItem(row: number, column: number): Value | null | undefinedrow: numbercolumn: number
- interfaceSheetFormatTransferContributionsource ↗
-
interface SheetFormatTransferContributionOptional state-owner contribution to format painting.
propertyid readonly id: stringmethodcapture capture(source: SheetMoveRange): SheetFormatTransferSnapshotsource: SheetMoveRange
methodclear clear(range: SheetMoveRange): readonly SheetFormatTransferPlan[]Plans removal of this owner's explicit formats without changing cell content.
range: SheetMoveRange
methodplanCaptured planCaptured(portable: unknown, destination: SheetMoveRange): readonly SheetFormatTransferPlan[]Plans a captured source pattern using this owner's current target state.
portable: unknowndestination: SheetMoveRange
- interfaceSheetFormatTransferPlansource ↗
-
interface SheetFormatTransferPlanOne owner's isolated plan; only the owner interprets its operations.
propertyoperations readonly operations: readonly Operation[]propertytarget readonly target: PluginKey - interfaceSheetFormatTransferRegistrarsource ↗
-
interface SheetFormatTransferRegistrarOptional plugin lifecycle extension for format-transfer registration.
methodregisterFormatTransfers registerFormatTransfers(registry: SheetFormatTransferRegistry): voidregistry: SheetFormatTransferRegistry
- interfaceSheetFormatTransferSnapshotsource ↗
-
interface SheetFormatTransferSnapshotCaptured format data, independent of subsequent source changes.
propertyportable readonly portable?: unknownCaptured owner data that can be planned against another Sheet instance.
methodplan plan(destination: SheetMoveRange, targetRegistry?: SheetFormatTransferRegistry): readonly SheetFormatTransferPlan[]destination: SheetMoveRangetargetRegistry: SheetFormatTransferRegistry
- interfaceSheetMoveRangesource ↗
-
interface SheetMoveRangeZero-based inclusive bounds of a cell range.
- interfaceSheetPortableFormatTransfersource ↗
-
interface SheetPortableFormatTransferSerializable owner snapshot for a transient clipboard payload.
- interfaceSheetRangeMoveContextsource ↗
-
interface SheetRangeMoveContextNormalized source and destination of a same-sheet cell move.
propertydestination readonly destination: SheetMoveRangepropertysource readonly source: SheetMoveRange - interfaceSheetRangeMoveContributionsource ↗
-
interface SheetRangeMoveContributionA state owner's participation in range moves, independent of storage representation.
propertyid readonly id: stringUnique registration identity, conventionally
<owner>.rangeMove; not a document field or operation target.methodhasConflict hasConflict(context: SheetRangeMoveContext): booleanReports whether destination data outside the source would be replaced.
context: SheetRangeMoveContext
methodplan plan(context: SheetRangeMoveContext): readonly SheetRangeMovePlan[]Reads current state and produces an isolated operation plan.
context: SheetRangeMoveContext
methodtransformPlans transformPlans(context: SheetRangeMoveContext, plans: readonly SheetRangeMovePlan[]): readonly SheetRangeMovePlan[]Rewrites plans after every state owner has contributed, for derived references.
context: SheetRangeMoveContextplans: readonly SheetRangeMovePlan[]
methodvalidate validate(context: SheetRangeMoveContext): voidReads owner-specific invariants without mutation; rejected constraints throw a SearError.
context: SheetRangeMoveContext
- interfaceSheetRangeMovePlansource ↗
-
interface SheetRangeMovePlanOperations produced by one state owner without mutating its live state.
propertyoperations readonly operations: readonly Operation[]propertytarget readonly target: PluginKey - interfaceSheetRangeReorderContextsource ↗
-
interface SheetRangeReorderContextOne stable row permutation within an inclusive cell range.
propertydestinationOf readonly destinationOf: (row: number): numberMaps a source row to its final row; columns never change.
propertyrange readonly range: SheetMoveRange - interfaceSheetRangeReorderContributionsource ↗
-
interface SheetRangeReorderContributionState owners contribute atomic updates without exposing their matrices to the sorter.
propertyid readonly id: stringmethodplan plan(context: SheetRangeReorderContext): readonly SheetRangeReorderPlan[]context: SheetRangeReorderContext
methodtransformPlans transformPlans(context: SheetRangeReorderContext, plans: readonly SheetRangeReorderPlan[]): readonly SheetRangeReorderPlan[]context: SheetRangeReorderContextplans: readonly SheetRangeReorderPlan[]
methodvalidate validate(context: SheetRangeReorderContext): voidcontext: SheetRangeReorderContext
- interfaceSheetRangeReorderPlansource ↗
-
interface SheetRangeReorderPlanpropertyoperations readonly operations: readonly Operation[]propertytarget readonly target: PluginKey - interfaceSheetRangeRuleEntrysource ↗
-
interface SheetRangeRuleEntry<Rule>A feature-owned rule and the rectangle it covers.
- interfaceSheetRangeRuleFragmentsource ↗
-
interface SheetRangeRuleFragment<Rule>One retained or relocated piece of an original rule.
- interfaceSheetRangeRuleMoveAdaptersource ↗
-
interface SheetRangeRuleMoveAdapter<Rule>Feature-specific storage and operation mapping for splittable range rules.
propertyid readonly id: stringmethodplan plan(context: SheetRangeMoveContext, affected: readonly SheetRangeRuleEntry<Rule>[], fragments: readonly SheetRangeRuleFragment<Rule>[]): readonly SheetRangeMovePlan[]context: SheetRangeMoveContextaffected: readonly SheetRangeRuleEntry<Rule>[]fragments: readonly SheetRangeRuleFragment<Rule>[]
methodreadRules readRules(): readonly SheetRangeRuleEntry<Rule>[]methodvalidate validate(context: SheetRangeMoveContext): voidcontext: SheetRangeMoveContext
- interfaceSheetStructureMoveContextsource ↗
-
interface SheetStructureMoveContextOne original-state structure permutation owned by a matrix plugin.
propertyoperations readonly operations: readonly Operation[]propertytarget readonly target: PluginKey - interfaceSheetStructureMoveContributionsource ↗
-
interface SheetStructureMoveContributionOwner-local validation and dependent edits compiled before a structure move is staged.
propertyid readonly id: stringmethodtransformOperations transformOperations(context: SheetStructureMoveContext): readonly Operation[]context: SheetStructureMoveContext
methodvalidate validate(context: SheetStructureMoveContext): voidcontext: SheetStructureMoveContext
- typeEditorLifecycleErrorCodesource ↗
-
type EditorLifecycleErrorCode = typeof EditorLifecycleErrorCode[keyof typeof EditorLifecycleErrorCode]Stable machine-readable errors raised by editor lifecycle stacks.
- typePluginDataViewFieldSelectorsource ↗
-
type PluginDataViewFieldSelector = { select: unknown }["select"]Controls whether a plugin state registration is exposed through DataEngine and collaboration.
- typePluginExtensionsource ↗
-
type PluginExtension = PluginCommandExtension<CommandBus> & conditional & conditional & conditional & conditionalMinimal host-extension contract shared by Sheet, Doc, and Workbook plugin types.
- typeRuntimeCapabilityErrorCodesource ↗
-
type RuntimeCapabilityErrorCode = typeof RuntimeCapabilityErrorCode[keyof typeof RuntimeCapabilityErrorCode]Supported runtime capability error codes.
- typeSessionStateErrorCodesource ↗
-
type SessionStateErrorCode = typeof SessionStateErrorCode[keyof typeof SessionStateErrorCode]Supported session-state error codes.
- typeSessionStateRestorePhasesource ↗
-
type SessionStateRestorePhase = typeof SessionStateRestorePhase[keyof typeof SessionStateRestorePhase]A supported local-state restoration phase.
- typeSessionStateSnapshotsource ↗
-
type SessionStateSnapshot = Readonly<Record<string, unknown>>Opaque in-memory snapshot keyed by contributor-owned definition ids.
- typeSheetFormatRangesource ↗
-
type SheetFormatRange = SheetMoveRangeInclusive range shared by format-transfer owners and hosts.
- typeSheetRangeMoveAnalysissource ↗
-
type SheetRangeMoveAnalysis = { context: SheetRangeMoveContext; status: typeof SheetRangeMoveStatus.Allowed | typeof SheetRangeMoveStatus.RequiresConfirmation } | { context: SheetRangeMoveContext; issue: { code: string; details: SearErrorDetails; message: string; ownerId: string }; status: typeof SheetRangeMoveStatus.Blocked }A move assessment contains no operations and never mutates document state.
- variableEditorLifecycleErrorCodesource ↗
-
EditorLifecycleErrorCode: { MultipleDisposalFailures: "SEAR_EDITOR_LIFECYCLE_MULTIPLE_DISPOSAL_FAILURES"; StackDisposed: "SEAR_EDITOR_LIFECYCLE_STACK_DISPOSED" }Stable machine-readable errors raised by editor lifecycle stacks.
- variableRuntimeCapabilityErrorCodesource ↗
-
RuntimeCapabilityErrorCode: { InvalidDefinition: "SEAR_RUNTIME_CAPABILITY_INVALID_DEFINITION"; NotRegistered: "SEAR_RUNTIME_CAPABILITY_NOT_REGISTERED"; RegistrationConflict: "SEAR_RUNTIME_CAPABILITY_REGISTRATION_CONFLICT"; RegistryDestroyed: "SEAR_RUNTIME_CAPABILITY_REGISTRY_DESTROYED" }Stable machine-readable errors raised by runtime capability registries.
- variableSessionStateErrorCodesource ↗
-
SessionStateErrorCode: { invalidDefinition: "SEAR_SESSION_STATE_INVALID_DEFINITION"; invalidRestoreDependency: "SEAR_SESSION_STATE_INVALID_RESTORE_DEPENDENCY"; invalidRestoreOrder: "SEAR_SESSION_STATE_INVALID_RESTORE_ORDER"; invalidRestorePhase: "SEAR_SESSION_STATE_INVALID_RESTORE_PHASE"; registrationConflict: "SEAR_SESSION_STATE_REGISTRATION_CONFLICT"; restoreDependencyCycle: "SEAR_SESSION_STATE_RESTORE_DEPENDENCY_CYCLE"; restoreInProgress: "SEAR_SESSION_STATE_RESTORE_IN_PROGRESS"; restorePhaseClosed: "SEAR_SESSION_STATE_RESTORE_PHASE_CLOSED"; … }Stable machine-readable errors raised by session-state contracts.
- variableSessionStateRestorePhasesource ↗
-
SessionStateRestorePhase: { AfterInitialize: "afterInitialize"; BeforeInitialize: "beforeInitialize" }Ordered lifecycle phases in which local state may be restored.
- variableSheetRangeMoveStatussource ↗
-
SheetRangeMoveStatus: { Allowed: "allowed"; Blocked: "blocked"; RequiresConfirmation: "requiresConfirmation" }Canonical outcomes shared by move preview and execution.
- functionassertSheetContributionWritesource ↗
-
assertSheetContributionWrite(owner: object): voidChecks registration changes without adding work to query or planning paths.
owner: object
- functioncloneSessionStateValuesource ↗
-
cloneSessionStateValue<T>(value: T): TCopies a session snapshot without trusting extension-provided clone hooks.
value: T
- functioncreateMatrixFormatTransfersource ↗
-
createMatrixFormatTransfer<Value>(id: string, target: PluginKey, readMatrix: (): SheetFormatMatrix<Value>): Required<SheetFormatTransferContribution>Captures sparse persisted formats and tiles them over an inclusive target.
id: stringtarget: PluginKeyreadMatrix: (): SheetFormatMatrix<Value>
- functioncreatePluginTransactionHistoryAdaptersource ↗
-
createPluginTransactionHistoryAdapter(operations: PluginTransactionHistoryOperations): PluginTransactionHistoryAdapterCreates a transaction history adapter while preserving owner identity and metadata.
operations: PluginTransactionHistoryOperations
- functioncreateRuntimeCapabilityReadersource ↗
-
createRuntimeCapabilityReader(registry: RuntimeCapabilityRegistry, hidden?: readonly RuntimeCapability<unknown>[]): RuntimeCapabilityReaderExposes selected capabilities without handing hosts the mutable registry itself.
registry: RuntimeCapabilityRegistryhidden: readonly RuntimeCapability<unknown>[]
- functioncreateSheetRangeRuleMoveContributionsource ↗
-
createSheetRangeRuleMoveContribution<Rule>(adapter: SheetRangeRuleMoveAdapter<Rule>): SheetRangeMoveContributionCreates a range-move contribution for rules that can be split at cell boundaries.
adapter: SheetRangeRuleMoveAdapter<Rule>
- functiondefineRuntimeCapabilitysource ↗
-
defineRuntimeCapability<T>(id: string): RuntimeCapability<T>Creates an immutable runtime capability definition with a stable process-wide identity.
id: string
- functiondefineSessionStatesource ↗
-
defineSessionState<State>(id: string): SessionStateDefinition<State>Creates an immutable typed identity for one local session value.
id: string
- functionhasPluginCommandRegistrarsource ↗
-
hasPluginCommandRegistrar<CommandBus>(plugin: unknown): pluginReturns whether a plugin contributes command registration for the current host.
plugin: unknown
- functionhasPluginObservationRegistrarsource ↗
-
hasPluginObservationRegistrar<ObservationRegistry>(plugin: unknown): pluginReturns whether a plugin contributes observation registration for the current host.
plugin: unknown
- functionhasPluginQueryRegistrarsource ↗
-
hasPluginQueryRegistrar<QueryRegistry>(plugin: unknown): pluginplugin: unknown
- functionhasPluginRuntimeCapabilityRegistrarsource ↗
-
hasPluginRuntimeCapabilityRegistrar<RuntimeCapabilityRegistry>(plugin: unknown): pluginReturns whether a plugin publishes runtime capabilities for the current editor.
plugin: unknown
- functionhasPluginSessionStateRegistrarsource ↗
-
hasPluginSessionStateRegistrar<SessionStateRegistry>(plugin: unknown): pluginReturns whether a plugin contributes local session-state registration for the current host.
plugin: unknown
- functionintersectSheetMoveRangessource ↗
-
intersectSheetMoveRanges(left: SheetMoveRange, right: SheetMoveRange): SheetMoveRange | nullReturns the shared inclusive area of two ranges, if any.
left: SheetMoveRangeright: SheetMoveRange
- functionisPointInSheetMoveRangesource ↗
-
isPointInSheetMoveRange(range: SheetMoveRange, row: number, column: number): booleanTests inclusive range membership.
range: SheetMoveRangerow: numbercolumn: number
- functionreadSessionStatesource ↗
-
readSessionState<State>(snapshot: SessionStateSnapshot, definition: SessionStateDefinition<State>): State | undefinedReads one contributor value from an opaque snapshot through its typed definition.
snapshot: SessionStateSnapshotdefinition: SessionStateDefinition<State>
- functionsealSheetContributionWritessource ↗
-
sealSheetContributionWrites(owner: object, assertWrite: (): void): voidSeals setup-time Sheet contribution registries after editor startup.
owner: objectassertWrite: (): void
- functionsubtractSheetMoveRangesource ↗
-
subtractSheetMoveRange(original: SheetMoveRange, cut: SheetMoveRange): SheetMoveRange[]Removes one inclusive rectangle, retaining at most four disjoint pieces.
original: SheetMoveRangecut: SheetMoveRange
- functiontranslateSheetMoveRangesource ↗
-
translateSheetMoveRange(range: SheetMoveRange, source: SheetMoveRange, destination: SheetMoveRange): SheetMoveRangeTranslates a rule fragment by the source-to-destination displacement.
range: SheetMoveRangesource: SheetMoveRangedestination: SheetMoveRange
No public exports match that search.