Angular Undo Redo History Store | ng-hub-ui-history

Angular undo and redo history store with Signals-friendly APIs, transactions, limits and reactive form support.

API reference

Inputs

createHistoryStore(config)

Type: HistoryStoreConfig<T, K>

Creates a signal-based store with optional limits and custom diff/patch functions.

registerObject(id, initialState) (Required)

Type: (id: K, initialState: T) => void

Registers object base state and starts linear history for that key.

commit(id, newState, options?) (Required)

Type: (id: K, state: T, options?: { label?: string }) => boolean

Stores diff patch, invalidates redo branch if pointer was not at tail.

watchForm(id, form, options?)

Type: (id: K, form: FormGroup, options?: WatchFormOptions) => () => void

Automatically commits form value changes and returns unsubscribe callback.

Outputs

states

Type: Signal<Map<K, T>>

Reactive signal map with current immutable snapshots per object id.

Templates

No templates documented yet.

CSS variables

No CSS variables documented yet.

Styling and theming

No styling examples are documented yet. This section will include customization recipes and theming examples.