/** * Legacy data model for page history. * The new method is to use the useHistory in the editor. * This legacy data model is still used by other function modules like viewer / mapper. */ import { HistoryAction } from './editor/history'; import { EditorModel } from './editormodel'; import { ModelWrapper } from './modelwrapper'; import { MMELRepo } from './repo'; interface Breadcrumb { label: JSX.Element; onNavigate: () => void; } export interface HistoryItem { page: string; pathtext: string; } export interface PageHistory { items: HistoryItem[]; } export interface EditHistoryItem { mw: ModelWrapper; phistory: PageHistory; } export interface EditHistory { past: EditHistoryItem[]; future: EditHistoryItem[]; } export declare type RepoHistory = MMELRepo[]; export declare function cloneHistory(history: PageHistory): PageHistory; export declare function createPageHistory(mw: ModelWrapper): PageHistory; export declare function createModelHistory(model: EditorModel): HistoryItem[]; export declare function getBreadcrumbs(ph: PageHistory, onPageChange: (updated: PageHistory, newPage: string) => void): Breadcrumb[]; export declare function getBreadcrumbsActions(history: HistoryItem[], onPageChange: (x: HistoryAction) => void): Breadcrumb[]; export declare function addToHistory(ph: PageHistory, pageid: string, label: string): void; export declare function popPage(ph: PageHistory): string; export declare function popUntil(ph: PageHistory, i: number): string; export {}; //# sourceMappingURL=history.d.ts.map