API reference
@searsuite/sear-plugin-history
Commit-driven Sheet and Doc undo and redo stacks.
12 exportsderived from source
- classNoopSheetExternalHistorysource ↗
-
class NoopSheetExternalHistory extends SheetExternalHistoryOptional parent history visible through a mounted Sheet editor.
constructorconstructor NoopSheetExternalHistory(): NoopSheetExternalHistorymethodgetStatus getStatus(): SheetExternalHistoryStatusmethodredo redo(): voidmethodsubscribe subscribe(): (): voidmethodundo undo(): void - classSheetExternalHistorysource ↗
-
class SheetExternalHistoryOptional parent history visible through a mounted Sheet editor.
constructorconstructor SheetExternalHistory(): SheetExternalHistorypropertysymbolstatic readonly symbol: typeof symbolmethodgetStatus getStatus(): SheetExternalHistoryStatusmethodredo redo(): void | Promise<void>methodsubscribe subscribe(listener: (): void): (): voidlistener: (): void
methodundo undo(): void | Promise<void> - classSheetHistoryPluginsource ↗
-
class SheetHistoryPlugin extends Plugin<SearCoreSheet, CellProperties, null>, SheetLifecycleController, SheetHistoryStatusProviderEditor-local command history for plugin-owned Sheet state with registered transaction algebra.
constructorconstructor SheetHistoryPlugin(plugins: PluginManager<SearCoreSheet, CellProperties>, interaction: SheetInteractionStore, keyboard: KeyboardRouter, platform: Platform, commands: SheetCommandBus, externalHistory: SheetExternalHistory): SheetHistoryPluginplugins: PluginManager<SearCoreSheet, CellProperties>interaction: SheetInteractionStorekeyboard: KeyboardRouterplatform: Platformcommands: SheetCommandBusexternalHistory: SheetExternalHistory
propertywarnOnDuplicateDepth readonly warnOnDuplicateDepth: falseWhether PluginManager should warn when another ordered plugin shares this depth.
propertypluginKeystatic readonly pluginKey: PluginKeyStable owner key for the private history state.
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving the default Sheet history plugin.
methodapply apply(_state: null, _transaction: Transaction): nullHistory observes committed commands and owns no transactional sheet projection.
_state: null_transaction: Transaction
methoddestroy destroy(): voidReleases command/status subscriptions owned by this editor instance.
methodgetPluginConfig getPluginConfig(): nullHistory has no render-time configuration.
methodgetStatus getStatus(): SheetHistoryStatusReturns current undo and redo availability.
methodregisterCommands registerCommands(commands: SheetCommandBus): voidRegisters typed history commands on this editor's command bus.
commands: SheetCommandBus
methodregisterObservations registerObservations(observations: ObservationRegistry): voidRegisters the host-facing history status observation for this editor.
observations: ObservationRegistry
methodregisterSessionState registerSessionState(registry: SessionStateRegistry): voidRegisters sheet-local undo and redo history for editor remounts.
registry: SessionStateRegistry
methodregisterState registerState(): { dataEngine: { enabled: boolean }; key: PluginKey; state: null }History state is private runtime state and is never persisted or synchronized.
methodrender render(): nullHistory contributes no scene nodes.
methodstart start(_context: SheetLifecycleContext): voidStarts command observation and semantic keyboard shortcuts after Core is ready.
_context: SheetLifecycleContext
methodsubscribe subscribe(listener: (status: SheetHistoryStatus): void): (): voidSubscribes to future history availability changes.
listener: (status: SheetHistoryStatus): void
Inherited members 29
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetHistoryStatusProvidersource ↗
-
class SheetHistoryStatusProviderEditor-local DI contract used by plugins that render history controls.
constructorconstructor SheetHistoryStatusProvider(): SheetHistoryStatusProviderpropertysymbolstatic readonly symbol: typeof symbolDI token for resolving the active editor's history status provider.
methodgetStatus getStatus(): SheetHistoryStatusReturns the current editor-local history availability.
methodsubscribe subscribe(listener: (status: SheetHistoryStatus): void): (): voidObserves future history availability changes and returns an idempotent disposer.
listener: (status: SheetHistoryStatus): void
- interfaceSheetExternalHistoryStatussource ↗
-
interface SheetExternalHistoryStatus - interfaceSheetHistoryEntrysource ↗
-
interface SheetHistoryEntry - interfaceSheetHistorySessionStatesource ↗
-
interface SheetHistorySessionStateIn-memory history retained for one sheet session while a workbook is open.
- interfaceSheetHistoryStatussource ↗
-
interface SheetHistoryStatusImmutable status published whenever one editor's history availability changes.
- variableRedoSheetCommandsource ↗
-
RedoSheetCommand: SheetCommandDefinition<void, SheetCommandResult>Reapplies the latest sheet mutation reverted by undo.
- variableSheetHistorySessionStateDefinitionsource ↗
-
SheetHistorySessionStateDefinition: SessionStateDefinition<SheetHistorySessionState>Stable session-state identity owned by SheetHistoryPlugin.
- variableSheetHistoryStatusObservationsource ↗
-
SheetHistoryStatusObservation: StateObservationDefinition<SheetHistoryStatus>Editor-local undo/redo availability exposed to third-party hosts.
- variableUndoSheetCommandsource ↗
-
UndoSheetCommand: SheetCommandDefinition<void, SheetCommandResult>Reverts the latest successfully committed sheet mutation.
No public exports match that search.