@searsuite/sear-plugin-history
Commit-driven Sheet and Doc undo and redo stacks.
History state
- classNoopSheetExternalHistory
-
class NoopSheetExternalHistory extends SheetExternalHistoryOptional parent history visible through a mounted Sheet editor.
constructor NoopSheetExternalHistory(): NoopSheetExternalHistorymethod getStatus(): SheetExternalHistoryStatusmethod redo(): voidmethod subscribe(): (): voidmethod undo(): void - classSheetExternalHistory
-
Optional parent history visible through a mounted Sheet editor.
constructor SheetExternalHistory(): SheetExternalHistoryproperty readonly symbol: typeof symbolstaticmethod getStatus(): SheetExternalHistoryStatusmethod redo(): void | Promise<void>method subscribe(listener: (): void): (): voidmethod undo(): void | Promise<void> - classSheetHistoryPlugin
-
class SheetHistoryPlugin extends Plugin<SearCoreSheet, CellProperties, null>, SheetLifecycleController, SheetHistoryStatusProviderEditor-local command history for plugin-owned Sheet state with registered transaction algebra.
constructor SheetHistoryPlugin(plugins: PluginManager<SearCoreSheet, CellProperties>, interaction: SheetInteractionStore, keyboard: KeyboardRouter, platform: Platform, commands: SheetCommandBus, externalHistory: SheetExternalHistory): SheetHistoryPluginproperty readonly warnOnDuplicateDepth: falseWhether PluginManager should warn when another ordered plugin shares this depth.
property readonly pluginKey: PluginKeystaticStable owner key for the private history state.
property readonly symbol: typeof symbolstaticDI token for resolving the default Sheet history plugin.
method apply(_state: null, _transaction: Transaction): nullHistory observes committed commands and owns no transactional sheet projection.
method destroy(): voidReleases command/status subscriptions owned by this editor instance.
method getPluginConfig(): nullHistory has no render-time configuration.
method getStatus(): SheetHistoryStatusReturns current undo and redo availability.
method registerCommands(commands: SheetCommandBus): voidRegisters typed history commands on this editor's command bus.
method registerObservations(observations: ObservationRegistry): voidRegisters the host-facing history status observation for this editor.
method registerSessionState(registry: SessionStateRegistry): voidRegisters sheet-local undo and redo history for editor remounts.
method registerState(): { dataEngine: { enabled: boolean }; key: PluginKey; state: null }History state is private runtime state and is never persisted or synchronized.
method render(): nullHistory contributes no scene nodes.
method start(_context: SheetLifecycleContext): voidStarts command observation and semantic keyboard shortcuts after Core is ready.
method subscribe(listener: (status: SheetHistoryStatus): void): (): voidSubscribes to future history availability changes.
Inherited members 28
Inherited from Plugin.
- depth
- documentState
- interestedIn
- 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
- classSheetHistoryStatusProvider
-
Editor-local DI contract used by plugins that render history controls.
constructor SheetHistoryStatusProvider(): SheetHistoryStatusProviderproperty readonly symbol: typeof symbolstaticDI token for resolving the active editor's history status provider.
method getStatus(): SheetHistoryStatusReturns the current editor-local history availability.
method subscribe(listener: (status: SheetHistoryStatus): void): (): voidObserves future history availability changes and returns an idempotent disposer.
- interfaceSheetExternalHistoryStatus
-
property readonly canRedo: booleanproperty readonly canUndo: boolean - interfaceSheetHistoryEntry
-
property groupId?: stringPending group token retained until a matching command commits.
property redo: Transaction<Operation>[]property undo: Transaction<Operation>[] - interfaceSheetHistorySessionState
-
In-memory history retained for one sheet session while a workbook is open.
- interfaceSheetHistoryStatus
-
Immutable status published whenever one editor's history availability changes.
property readonly canRedo: booleanproperty readonly canUndo: boolean - variableSheetHistorySessionStateDefinition
-
SheetHistorySessionStateDefinition: SessionStateDefinition<SheetHistorySessionState>Stable session-state identity owned by SheetHistoryPlugin.
- variableSheetHistoryStatusObservation
-
SheetHistoryStatusObservation: StateObservationDefinition<SheetHistoryStatus>Editor-local undo/redo availability exposed to third-party hosts.
Undo and redo
- variableRedoSheetCommand
-
RedoSheetCommand: SheetCommandDefinition<void, SheetCommandResult>Reapplies the latest sheet mutation reverted by undo.
- variableUndoSheetCommand
-
UndoSheetCommand: SheetCommandDefinition<void, SheetCommandResult>Reverts the latest successfully committed sheet mutation.
No matching API entries.