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
Here's the full contract for history: everything you can bind, listen to, project and theme, gathered in one place. Wire up what you need and style what you want — it's standalone and signal-friendly.
Inputs
Dial history in with 4 inputs. Bind them like any Angular @Input.
| Name | Type | Default | Description |
|---|---|---|---|
createHistoryStore(config) | HistoryStoreConfig<T, K> | — | Creates a signal-based store with optional limits and custom diff/patch functions. |
registerObject(id, initialState)Required | (id: K, initialState: T) => void | — | Registers object base state and starts linear history for that key. |
commit(id, newState, options?)Required | (id: K, state: T, options?: { label?: string }) => boolean | — | Stores diff patch, invalidates redo branch if pointer was not at tail. |
watchForm(id, form, options?) | (id: K, form: FormGroup, options?: WatchFormOptions) => () => void | — | Automatically commits form value changes and returns unsubscribe callback. |
Outputs
React to what history does — 1 events to hook your logic onto.
| Name | Type | Description |
|---|---|---|
states | 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.