import { H as HistoryState, B as BaseHistoryState, M as MaybeDraft, I as IfMaybeUndefined, U as UndoableConfig, O as Overwrite, a as HistoryAdapter$1, b as BaseHistoryStateFn, G as GetConfigType, c as GetStateType, C as CreateHistoryAdapter$1, d as HistoryStateFn, P as PatchHistoryStateFn } from './index-qfQ1snmF.js'; export { f as BaseHistoryAdapterConfig, h as BuildHistoryAdapterConfig, D as DataFromRecipe, e as ImmerRecipe, l as PatchHistoryState, k as PatchState, W as WrapRecipeConfig, j as applyRecipe, i as buildCreateHistoryAdapter, g as getInitialState } from './index-qfQ1snmF.js'; import { PayloadAction, Action, CaseReducer } from '@reduxjs/toolkit'; import 'immer'; interface GetSelectorsOptions { /** * @deprecated * No longer used, as no memoisation is needed. * This option will be removed in the next major version. */ createSelector?: unknown; } interface HistorySelectors> { /** * Returns true if there are any patches in the past * @param state History state shape, with patches */ selectCanUndo: (state: State) => boolean; /** * Returns true if there are any patches in the future * @param state History state shape, with patches */ selectCanRedo: (state: State) => boolean; /** * A selector which automatically extracts the present state */ selectPresent: (state: State) => Data; /** * Returns true if the history is paused */ selectPaused: (state: State) => boolean; } interface UndoableMeta { undoable?: boolean; } declare function getUndoableMeta(action: { meta?: UndoableMeta; }): boolean | undefined; interface ReduxMethods> { /** * Moves the state back or forward in history by n steps. * @param state History state shape, with patches * @param n Number of steps to moveNegative numbers move backwards. */ jump>(state: S, n: number): S; /** * Moves the state back or forward in history by n steps. * @param state History state shape, with patches * @param action An action with a payload of the number of steps to move. Negative numbers move backwards. */ jump>(state: S, action: PayloadAction): S; /** An action creator prepare callback which doesn't take a payload */ withoutPayload(): (undoable?: boolean) => { payload: undefined; meta: UndoableMeta; }; /** An action creator prepare callback which takes a single payload */ withPayload

(): (...args: IfMaybeUndefined) => { payload: P; meta: UndoableMeta; }; /** Wraps a reducer in logic which automatically updates the state history, and extracts whether an action is undoable from its meta (`action.meta.undoable`) */ undoableReducer(reducer: CaseReducer, config?: Omit, "isUndoable">): >(state: State, action: A) => State; getSelectors(): HistorySelectors; getSelectors(selectState: (rootState: RootState) => State, options?: GetSelectorsOptions): HistorySelectors; } type HistoryAdapter = HistoryState> = Overwrite, ReduxMethods>; declare function getReduxMethods>(adapter: HistoryAdapter$1): ReduxMethods; type CreateHistoryAdapter = (adapterConfig?: GetConfigType) => Overwrite>, ReduxMethods>>; declare function withRedux(createAdapter: CreateHistoryAdapter$1): CreateHistoryAdapter; declare const createHistoryAdapter: CreateHistoryAdapter; declare const createPatchHistoryAdapter: CreateHistoryAdapter; export { BaseHistoryState, BaseHistoryStateFn, type CreateHistoryAdapter, GetConfigType, type GetSelectorsOptions, GetStateType, type HistoryAdapter, type HistorySelectors, HistoryState, HistoryStateFn, PatchHistoryStateFn, type ReduxMethods, UndoableConfig, type UndoableMeta, createHistoryAdapter, createPatchHistoryAdapter, getReduxMethods, getUndoableMeta, withRedux };