{"mappings":";kNA6Ca,IAAAA,EAAUC,EAAU,OAAuB,CACtD,KAAM,UAEN,YAAU,CACR,MAAO,CACL,MAAO,IACP,cAAe,MAInB,aAAW,CACT,MAAO,CACL,KAAM,IAAM,CAAC,CAAE,MAAAC,EAAO,SAAAC,CAAQ,IACrBC,EAAKF,EAAOC,CAAQ,EAE7B,KAAM,IAAM,CAAC,CAAE,MAAAD,EAAO,SAAAC,CAAQ,IACrBE,EAAKH,EAAOC,CAAQ,IAKjC,uBAAqB,CACnB,MAAO,CACLG,EAAQ,KAAK,OAAO,IAIxB,sBAAoB,CAClB,MAAO,CACL,QAAS,IAAM,KAAK,OAAO,SAAS,KAAI,EACxC,cAAe,IAAM,KAAK,OAAO,SAAS,KAAI,EAC9C,QAAS,IAAM,KAAK,OAAO,SAAS,KAAI,EAGxC,aAAS,IAAM,KAAK,OAAO,SAAS,KAAI,EACxC,mBAAe,IAAM,KAAK,OAAO,SAAS,KAAI,GAGnD,CAAA","names":["History","Extension","state","dispatch","undo","redo","history"],"sources":["../esm/npm/@tiptap/extension-history@2.27.3/node_modules/@tiptap/extension-history/src/history.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { history, redo, undo } from '@tiptap/pm/history'\n\nexport interface HistoryOptions {\n  /**\n   * The amount of history events that are collected before the oldest events are discarded.\n   * @default 100\n   * @example 50\n   */\n  depth: number,\n\n  /**\n   * The delay (in milliseconds) between changes after which a new group should be started.\n   * @default 500\n   * @example 1000\n   */\n  newGroupDelay: number,\n}\n\ndeclare module '@tiptap/core' {\n  interface Commands\u003cReturnType\u003e {\n    history: {\n      /**\n       * Undo recent changes\n       * @example editor.commands.undo()\n       */\n      undo: () =\u003e ReturnType,\n      /**\n       * Reapply reverted changes\n       * @example editor.commands.redo()\n       */\n      redo: () =\u003e ReturnType,\n    }\n  }\n}\n\n/**\n * This extension allows you to undo and redo recent changes.\n * @see https://www.tiptap.dev/api/extensions/history\n *\n * **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n * the `history` extension, as it is not compatible with the `collaboration` extension.\n *\n * `@tiptap/extension-collaboration` uses its own history implementation.\n */\nexport const History = Extension.create\u003cHistoryOptions\u003e({\n  name: 'history',\n\n  addOptions() {\n    return {\n      depth: 100,\n      newGroupDelay: 500,\n    }\n  },\n\n  addCommands() {\n    return {\n      undo: () =\u003e ({ state, dispatch }) =\u003e {\n        return undo(state, dispatch)\n      },\n      redo: () =\u003e ({ state, dispatch }) =\u003e {\n        return redo(state, dispatch)\n      },\n    }\n  },\n\n  addProseMirrorPlugins() {\n    return [\n      history(this.options),\n    ]\n  },\n\n  addKeyboardShortcuts() {\n    return {\n      'Mod-z': () =\u003e this.editor.commands.undo(),\n      'Shift-Mod-z': () =\u003e this.editor.commands.redo(),\n      'Mod-y': () =\u003e this.editor.commands.redo(),\n\n      // Russian keyboard layouts\n      'Mod-я': () =\u003e this.editor.commands.undo(),\n      'Shift-Mod-я': () =\u003e this.editor.commands.redo(),\n    }\n  },\n})\n"],"version":3}
