@tiptap/extension-history 2.0.0-beta.13 → 2.0.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,4 +17,4 @@ declare module '@tiptap/core' {
17
17
  };
18
18
  }
19
19
  }
20
- export declare const History: Extension<HistoryOptions>;
20
+ export declare const History: Extension<HistoryOptions, any>;
@@ -7,9 +7,11 @@ var prosemirrorHistory = require('prosemirror-history');
7
7
 
8
8
  const History = core.Extension.create({
9
9
  name: 'history',
10
- defaultOptions: {
11
- depth: 100,
12
- newGroupDelay: 500,
10
+ addOptions() {
11
+ return {
12
+ depth: 100,
13
+ newGroupDelay: 500,
14
+ };
13
15
  },
14
16
  addCommands() {
15
17
  return {
@@ -31,10 +33,13 @@ const History = core.Extension.create({
31
33
  'Mod-z': () => this.editor.commands.undo(),
32
34
  'Mod-y': () => this.editor.commands.redo(),
33
35
  'Shift-Mod-z': () => this.editor.commands.redo(),
36
+ // Russian keyboard layouts
37
+ 'Mod-я': () => this.editor.commands.undo(),
38
+ 'Shift-Mod-я': () => this.editor.commands.redo(),
34
39
  };
35
40
  },
36
41
  });
37
42
 
38
43
  exports.History = History;
39
- exports.default = History;
44
+ exports["default"] = History;
40
45
  //# sourceMappingURL=tiptap-extension-history.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap-extension-history.cjs.js","sources":["../src/history.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { history, undo, redo } from 'prosemirror-history'\n\nexport interface HistoryOptions {\n depth: number,\n newGroupDelay: number,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n history: {\n /**\n * Undo recent changes\n */\n undo: () => ReturnType,\n /**\n * Reapply reverted changes\n */\n redo: () => ReturnType,\n }\n }\n}\n\nexport const History = Extension.create<HistoryOptions>({\n name: 'history',\n\n defaultOptions: {\n depth: 100,\n newGroupDelay: 500,\n },\n\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch)\n },\n redo: () => ({ state, dispatch }) => {\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': () => this.editor.commands.undo(),\n 'Mod-y': () => this.editor.commands.redo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n }\n },\n})\n"],"names":["Extension","undo","redo","history"],"mappings":";;;;;;;MAuBa,OAAO,GAAGA,cAAS,CAAC,MAAM,CAAiB;IACtD,IAAI,EAAE,SAAS;IAEf,cAAc,EAAE;QACd,KAAK,EAAE,GAAG;QACV,aAAa,EAAE,GAAG;KACnB;IAED,WAAW;QACT,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;gBAC9B,OAAOC,uBAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;aAC7B;YACD,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;gBAC9B,OAAOC,uBAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;aAC7B;SACF,CAAA;KACF;IAED,qBAAqB;QACnB,OAAO;YACLC,0BAAO,CAAC,IAAI,CAAC,OAAO,CAAC;SACtB,CAAA;KACF;IAED,oBAAoB;QAClB,OAAO;YACL,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC1C,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC1C,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;SACjD,CAAA;KACF;CACF;;;;;"}
1
+ {"version":3,"file":"tiptap-extension-history.cjs.js","sources":["../src/history.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { history, undo, redo } from 'prosemirror-history'\n\nexport interface HistoryOptions {\n depth: number,\n newGroupDelay: number,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n history: {\n /**\n * Undo recent changes\n */\n undo: () => ReturnType,\n /**\n * Reapply reverted changes\n */\n redo: () => ReturnType,\n }\n }\n}\n\nexport const History = Extension.create<HistoryOptions>({\n name: 'history',\n\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500,\n }\n },\n\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch)\n },\n redo: () => ({ state, dispatch }) => {\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': () => this.editor.commands.undo(),\n 'Mod-y': () => this.editor.commands.redo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n\n // Russian keyboard layouts\n 'Mod-я': () => this.editor.commands.undo(),\n 'Shift-Mod-я': () => this.editor.commands.redo(),\n }\n },\n})\n"],"names":["Extension","undo","redo","history"],"mappings":";;;;;;;MAuBa,OAAO,GAAGA,cAAS,CAAC,MAAM,CAAiB;IACtD,IAAI,EAAE,SAAS;IAEf,UAAU;QACR,OAAO;YACL,KAAK,EAAE,GAAG;YACV,aAAa,EAAE,GAAG;SACnB,CAAA;KACF;IAED,WAAW;QACT,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;gBAC9B,OAAOC,uBAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;aAC7B;YACD,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;gBAC9B,OAAOC,uBAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;aAC7B;SACF,CAAA;KACF;IAED,qBAAqB;QACnB,OAAO;YACLC,0BAAO,CAAC,IAAI,CAAC,OAAO,CAAC;SACtB,CAAA;KACF;IAED,oBAAoB;QAClB,OAAO;YACL,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC1C,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC1C,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;;YAGhD,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC1C,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;SACjD,CAAA;KACF;CACF;;;;;"}
@@ -3,9 +3,11 @@ import { undo, redo, history } from 'prosemirror-history';
3
3
 
4
4
  const History = Extension.create({
5
5
  name: 'history',
6
- defaultOptions: {
7
- depth: 100,
8
- newGroupDelay: 500,
6
+ addOptions() {
7
+ return {
8
+ depth: 100,
9
+ newGroupDelay: 500,
10
+ };
9
11
  },
10
12
  addCommands() {
11
13
  return {
@@ -27,10 +29,12 @@ const History = Extension.create({
27
29
  'Mod-z': () => this.editor.commands.undo(),
28
30
  'Mod-y': () => this.editor.commands.redo(),
29
31
  'Shift-Mod-z': () => this.editor.commands.redo(),
32
+ // Russian keyboard layouts
33
+ 'Mod-я': () => this.editor.commands.undo(),
34
+ 'Shift-Mod-я': () => this.editor.commands.redo(),
30
35
  };
31
36
  },
32
37
  });
33
38
 
34
- export default History;
35
- export { History };
39
+ export { History, History as default };
36
40
  //# sourceMappingURL=tiptap-extension-history.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap-extension-history.esm.js","sources":["../src/history.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { history, undo, redo } from 'prosemirror-history'\n\nexport interface HistoryOptions {\n depth: number,\n newGroupDelay: number,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n history: {\n /**\n * Undo recent changes\n */\n undo: () => ReturnType,\n /**\n * Reapply reverted changes\n */\n redo: () => ReturnType,\n }\n }\n}\n\nexport const History = Extension.create<HistoryOptions>({\n name: 'history',\n\n defaultOptions: {\n depth: 100,\n newGroupDelay: 500,\n },\n\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch)\n },\n redo: () => ({ state, dispatch }) => {\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': () => this.editor.commands.undo(),\n 'Mod-y': () => this.editor.commands.redo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n }\n },\n})\n"],"names":[],"mappings":";;;MAuBa,OAAO,GAAG,SAAS,CAAC,MAAM,CAAiB;IACtD,IAAI,EAAE,SAAS;IAEf,cAAc,EAAE;QACd,KAAK,EAAE,GAAG;QACV,aAAa,EAAE,GAAG;KACnB;IAED,WAAW;QACT,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;gBAC9B,OAAO,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;aAC7B;YACD,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;gBAC9B,OAAO,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;aAC7B;SACF,CAAA;KACF;IAED,qBAAqB;QACnB,OAAO;YACL,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;SACtB,CAAA;KACF;IAED,oBAAoB;QAClB,OAAO;YACL,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC1C,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC1C,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;SACjD,CAAA;KACF;CACF;;;;;"}
1
+ {"version":3,"file":"tiptap-extension-history.esm.js","sources":["../src/history.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { history, undo, redo } from 'prosemirror-history'\n\nexport interface HistoryOptions {\n depth: number,\n newGroupDelay: number,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n history: {\n /**\n * Undo recent changes\n */\n undo: () => ReturnType,\n /**\n * Reapply reverted changes\n */\n redo: () => ReturnType,\n }\n }\n}\n\nexport const History = Extension.create<HistoryOptions>({\n name: 'history',\n\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500,\n }\n },\n\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch)\n },\n redo: () => ({ state, dispatch }) => {\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': () => this.editor.commands.undo(),\n 'Mod-y': () => this.editor.commands.redo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n\n // Russian keyboard layouts\n 'Mod-я': () => this.editor.commands.undo(),\n 'Shift-Mod-я': () => this.editor.commands.redo(),\n }\n },\n})\n"],"names":[],"mappings":";;;MAuBa,OAAO,GAAG,SAAS,CAAC,MAAM,CAAiB;IACtD,IAAI,EAAE,SAAS;IAEf,UAAU;QACR,OAAO;YACL,KAAK,EAAE,GAAG;YACV,aAAa,EAAE,GAAG;SACnB,CAAA;KACF;IAED,WAAW;QACT,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;gBAC9B,OAAO,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;aAC7B;YACD,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;gBAC9B,OAAO,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;aAC7B;SACF,CAAA;KACF;IAED,qBAAqB;QACnB,OAAO;YACL,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;SACtB,CAAA;KACF;IAED,oBAAoB;QAClB,OAAO;YACL,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC1C,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC1C,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;;YAGhD,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC1C,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;SACjD,CAAA;KACF;CACF;;;;"}
@@ -1,14 +1,16 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tiptap/core'), require('prosemirror-history')) :
3
3
  typeof define === 'function' && define.amd ? define(['exports', '@tiptap/core', 'prosemirror-history'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@tiptap/extension-history'] = {}, global.core, global.prosemirrorHistory));
5
- }(this, (function (exports, core, prosemirrorHistory) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@tiptap/extension-history"] = {}, global.core, global.prosemirrorHistory));
5
+ })(this, (function (exports, core, prosemirrorHistory) { 'use strict';
6
6
 
7
7
  const History = core.Extension.create({
8
8
  name: 'history',
9
- defaultOptions: {
10
- depth: 100,
11
- newGroupDelay: 500,
9
+ addOptions() {
10
+ return {
11
+ depth: 100,
12
+ newGroupDelay: 500,
13
+ };
12
14
  },
13
15
  addCommands() {
14
16
  return {
@@ -30,14 +32,17 @@
30
32
  'Mod-z': () => this.editor.commands.undo(),
31
33
  'Mod-y': () => this.editor.commands.redo(),
32
34
  'Shift-Mod-z': () => this.editor.commands.redo(),
35
+ // Russian keyboard layouts
36
+ 'Mod-я': () => this.editor.commands.undo(),
37
+ 'Shift-Mod-я': () => this.editor.commands.redo(),
33
38
  };
34
39
  },
35
40
  });
36
41
 
37
42
  exports.History = History;
38
- exports.default = History;
43
+ exports["default"] = History;
39
44
 
40
45
  Object.defineProperty(exports, '__esModule', { value: true });
41
46
 
42
- })));
47
+ }));
43
48
  //# sourceMappingURL=tiptap-extension-history.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap-extension-history.umd.js","sources":["../src/history.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { history, undo, redo } from 'prosemirror-history'\n\nexport interface HistoryOptions {\n depth: number,\n newGroupDelay: number,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n history: {\n /**\n * Undo recent changes\n */\n undo: () => ReturnType,\n /**\n * Reapply reverted changes\n */\n redo: () => ReturnType,\n }\n }\n}\n\nexport const History = Extension.create<HistoryOptions>({\n name: 'history',\n\n defaultOptions: {\n depth: 100,\n newGroupDelay: 500,\n },\n\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch)\n },\n redo: () => ({ state, dispatch }) => {\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': () => this.editor.commands.undo(),\n 'Mod-y': () => this.editor.commands.redo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n }\n },\n})\n"],"names":["Extension","undo","redo","history"],"mappings":";;;;;;QAuBa,OAAO,GAAGA,cAAS,CAAC,MAAM,CAAiB;MACtD,IAAI,EAAE,SAAS;MAEf,cAAc,EAAE;UACd,KAAK,EAAE,GAAG;UACV,aAAa,EAAE,GAAG;OACnB;MAED,WAAW;UACT,OAAO;cACL,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;kBAC9B,OAAOC,uBAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;eAC7B;cACD,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;kBAC9B,OAAOC,uBAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;eAC7B;WACF,CAAA;OACF;MAED,qBAAqB;UACnB,OAAO;cACLC,0BAAO,CAAC,IAAI,CAAC,OAAO,CAAC;WACtB,CAAA;OACF;MAED,oBAAoB;UAClB,OAAO;cACL,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;cAC1C,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;cAC1C,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;WACjD,CAAA;OACF;GACF;;;;;;;;;;;"}
1
+ {"version":3,"file":"tiptap-extension-history.umd.js","sources":["../src/history.ts"],"sourcesContent":["import { Extension } from '@tiptap/core'\nimport { history, undo, redo } from 'prosemirror-history'\n\nexport interface HistoryOptions {\n depth: number,\n newGroupDelay: number,\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n history: {\n /**\n * Undo recent changes\n */\n undo: () => ReturnType,\n /**\n * Reapply reverted changes\n */\n redo: () => ReturnType,\n }\n }\n}\n\nexport const History = Extension.create<HistoryOptions>({\n name: 'history',\n\n addOptions() {\n return {\n depth: 100,\n newGroupDelay: 500,\n }\n },\n\n addCommands() {\n return {\n undo: () => ({ state, dispatch }) => {\n return undo(state, dispatch)\n },\n redo: () => ({ state, dispatch }) => {\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': () => this.editor.commands.undo(),\n 'Mod-y': () => this.editor.commands.redo(),\n 'Shift-Mod-z': () => this.editor.commands.redo(),\n\n // Russian keyboard layouts\n 'Mod-я': () => this.editor.commands.undo(),\n 'Shift-Mod-я': () => this.editor.commands.redo(),\n }\n },\n})\n"],"names":["Extension","undo","redo","history"],"mappings":";;;;;;QAuBa,OAAO,GAAGA,cAAS,CAAC,MAAM,CAAiB;MACtD,IAAI,EAAE,SAAS;MAEf,UAAU;UACR,OAAO;cACL,KAAK,EAAE,GAAG;cACV,aAAa,EAAE,GAAG;WACnB,CAAA;OACF;MAED,WAAW;UACT,OAAO;cACL,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;kBAC9B,OAAOC,uBAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;eAC7B;cACD,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;kBAC9B,OAAOC,uBAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;eAC7B;WACF,CAAA;OACF;MAED,qBAAqB;UACnB,OAAO;cACLC,0BAAO,CAAC,IAAI,CAAC,OAAO,CAAC;WACtB,CAAA;OACF;MAED,oBAAoB;UAClB,OAAO;cACL,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;cAC1C,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;cAC1C,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;;cAGhD,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;cAC1C,aAAa,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;WACjD,CAAA;OACF;GACF;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-history",
3
3
  "description": "history extension for tiptap",
4
- "version": "2.0.0-beta.13",
4
+ "version": "2.0.0-beta.17",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -24,8 +24,13 @@
24
24
  "@tiptap/core": "^2.0.0-beta.1"
25
25
  },
26
26
  "dependencies": {
27
- "@types/prosemirror-history": "^1.0.2",
28
- "prosemirror-history": "^1.1.3"
27
+ "@types/prosemirror-history": "^1.0.3",
28
+ "prosemirror-history": "^1.2.0"
29
29
  },
30
- "gitHead": "5c8e46b0d48aa09ba0d2e8337ae6bbb2d7503e82"
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/ueberdosis/tiptap",
33
+ "directory": "packages/extension-history"
34
+ },
35
+ "gitHead": "642627ec3635a1d8fa851887d75bee5f193ec63b"
31
36
  }
package/src/history.ts CHANGED
@@ -24,9 +24,11 @@ declare module '@tiptap/core' {
24
24
  export const History = Extension.create<HistoryOptions>({
25
25
  name: 'history',
26
26
 
27
- defaultOptions: {
28
- depth: 100,
29
- newGroupDelay: 500,
27
+ addOptions() {
28
+ return {
29
+ depth: 100,
30
+ newGroupDelay: 500,
31
+ }
30
32
  },
31
33
 
32
34
  addCommands() {
@@ -51,6 +53,10 @@ export const History = Extension.create<HistoryOptions>({
51
53
  'Mod-z': () => this.editor.commands.undo(),
52
54
  'Mod-y': () => this.editor.commands.redo(),
53
55
  'Shift-Mod-z': () => this.editor.commands.redo(),
56
+
57
+ // Russian keyboard layouts
58
+ 'Mod-я': () => this.editor.commands.undo(),
59
+ 'Shift-Mod-я': () => this.editor.commands.redo(),
54
60
  }
55
61
  },
56
62
  })
package/CHANGELOG.md DELETED
@@ -1,220 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [2.0.0-beta.13](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.12...@tiptap/extension-history@2.0.0-beta.13) (2021-06-07)
7
-
8
- **Note:** Version bump only for package @tiptap/extension-history
9
-
10
-
11
-
12
-
13
-
14
- # [2.0.0-beta.12](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.11...@tiptap/extension-history@2.0.0-beta.12) (2021-05-18)
15
-
16
- **Note:** Version bump only for package @tiptap/extension-history
17
-
18
-
19
-
20
-
21
-
22
- # [2.0.0-beta.11](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.10...@tiptap/extension-history@2.0.0-beta.11) (2021-05-13)
23
-
24
- **Note:** Version bump only for package @tiptap/extension-history
25
-
26
-
27
-
28
-
29
-
30
- # [2.0.0-beta.10](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.9...@tiptap/extension-history@2.0.0-beta.10) (2021-05-07)
31
-
32
-
33
- ### Bug Fixes
34
-
35
- * revert adding exports ([bc320d0](https://github.com/ueberdosis/tiptap/commit/bc320d0b4b80b0e37a7e47a56e0f6daec6e65d98))
36
-
37
-
38
-
39
-
40
-
41
- # [2.0.0-beta.9](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.8...@tiptap/extension-history@2.0.0-beta.9) (2021-05-06)
42
-
43
-
44
- ### Bug Fixes
45
-
46
- * revert adding type: module ([f8d6475](https://github.com/ueberdosis/tiptap/commit/f8d6475e2151faea6f96baecdd6bd75880d50d2c))
47
-
48
-
49
-
50
-
51
-
52
- # [2.0.0-beta.8](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.7...@tiptap/extension-history@2.0.0-beta.8) (2021-05-06)
53
-
54
-
55
- ### Bug Fixes
56
-
57
- * add exports to package.json ([1277fa4](https://github.com/ueberdosis/tiptap/commit/1277fa47151e9c039508cdb219bdd0ffe647f4ee))
58
-
59
-
60
-
61
-
62
-
63
- # [2.0.0-beta.7](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.6...@tiptap/extension-history@2.0.0-beta.7) (2021-05-06)
64
-
65
- **Note:** Version bump only for package @tiptap/extension-history
66
-
67
-
68
-
69
-
70
-
71
- # [2.0.0-beta.6](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.5...@tiptap/extension-history@2.0.0-beta.6) (2021-05-05)
72
-
73
- **Note:** Version bump only for package @tiptap/extension-history
74
-
75
-
76
-
77
-
78
-
79
- # [2.0.0-beta.5](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.4...@tiptap/extension-history@2.0.0-beta.5) (2021-04-23)
80
-
81
- **Note:** Version bump only for package @tiptap/extension-history
82
-
83
-
84
-
85
-
86
-
87
- # [2.0.0-beta.4](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.3...@tiptap/extension-history@2.0.0-beta.4) (2021-04-22)
88
-
89
- **Note:** Version bump only for package @tiptap/extension-history
90
-
91
-
92
-
93
-
94
-
95
- # [2.0.0-beta.3](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.2...@tiptap/extension-history@2.0.0-beta.3) (2021-04-16)
96
-
97
- **Note:** Version bump only for package @tiptap/extension-history
98
-
99
-
100
-
101
-
102
-
103
- # [2.0.0-beta.2](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-beta.1...@tiptap/extension-history@2.0.0-beta.2) (2021-04-15)
104
-
105
- **Note:** Version bump only for package @tiptap/extension-history
106
-
107
-
108
-
109
-
110
-
111
- # [2.0.0-beta.1](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.11...@tiptap/extension-history@2.0.0-beta.1) (2021-03-05)
112
-
113
- **Note:** Version bump only for package @tiptap/extension-history
114
-
115
-
116
-
117
-
118
-
119
- # [2.0.0-alpha.11](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.10...@tiptap/extension-history@2.0.0-alpha.11) (2021-02-16)
120
-
121
- **Note:** Version bump only for package @tiptap/extension-history
122
-
123
-
124
-
125
-
126
-
127
- # [2.0.0-alpha.10](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.9...@tiptap/extension-history@2.0.0-alpha.10) (2021-02-07)
128
-
129
- **Note:** Version bump only for package @tiptap/extension-history
130
-
131
-
132
-
133
-
134
-
135
- # [2.0.0-alpha.9](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.8...@tiptap/extension-history@2.0.0-alpha.9) (2021-02-05)
136
-
137
- **Note:** Version bump only for package @tiptap/extension-history
138
-
139
-
140
-
141
-
142
-
143
- # [2.0.0-alpha.8](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.7...@tiptap/extension-history@2.0.0-alpha.8) (2021-01-29)
144
-
145
- **Note:** Version bump only for package @tiptap/extension-history
146
-
147
-
148
-
149
-
150
-
151
- # [2.0.0-alpha.7](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.6...@tiptap/extension-history@2.0.0-alpha.7) (2021-01-29)
152
-
153
- **Note:** Version bump only for package @tiptap/extension-history
154
-
155
-
156
-
157
-
158
-
159
- # [2.0.0-alpha.6](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.5...@tiptap/extension-history@2.0.0-alpha.6) (2021-01-28)
160
-
161
- **Note:** Version bump only for package @tiptap/extension-history
162
-
163
-
164
-
165
-
166
-
167
- # [2.0.0-alpha.5](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.4...@tiptap/extension-history@2.0.0-alpha.5) (2020-12-18)
168
-
169
- **Note:** Version bump only for package @tiptap/extension-history
170
-
171
-
172
-
173
-
174
-
175
- # [2.0.0-alpha.4](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.3...@tiptap/extension-history@2.0.0-alpha.4) (2020-12-02)
176
-
177
- **Note:** Version bump only for package @tiptap/extension-history
178
-
179
-
180
-
181
-
182
-
183
- # [2.0.0-alpha.3](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.2...@tiptap/extension-history@2.0.0-alpha.3) (2020-11-19)
184
-
185
- **Note:** Version bump only for package @tiptap/extension-history
186
-
187
-
188
-
189
-
190
-
191
- # [2.0.0-alpha.2](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@2.0.0-alpha.1...@tiptap/extension-history@2.0.0-alpha.2) (2020-11-19)
192
-
193
- **Note:** Version bump only for package @tiptap/extension-history
194
-
195
-
196
-
197
-
198
-
199
- # [2.0.0-alpha.1](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@1.0.0-alpha.2...@tiptap/extension-history@2.0.0-alpha.1) (2020-11-18)
200
-
201
- **Note:** Version bump only for package @tiptap/extension-history
202
-
203
-
204
-
205
-
206
-
207
- # [1.0.0-alpha.2](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-history@1.0.0-alpha.1...@tiptap/extension-history@1.0.0-alpha.2) (2020-11-16)
208
-
209
- **Note:** Version bump only for package @tiptap/extension-history
210
-
211
-
212
-
213
-
214
-
215
- # 1.0.0-alpha.1 (2020-11-16)
216
-
217
-
218
- ### Reverts
219
-
220
- * Revert "use global namespace" ([0c9ce26](https://github.com/ueberdosis/tiptap/commit/0c9ce26c02c07d88a757c01b0a9d7f9e2b0b7502))