@tiptap/core 2.5.0 → 2.5.2

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.
@@ -40,11 +40,6 @@ export interface EditorEvents {
40
40
  editor: Editor;
41
41
  transaction: Transaction;
42
42
  };
43
- beforeTransaction: {
44
- editor: Editor;
45
- transaction: Transaction;
46
- nextState: EditorState;
47
- };
48
43
  transaction: {
49
44
  editor: Editor;
50
45
  transaction: Transaction;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/core",
3
3
  "description": "headless rich text editor",
4
- "version": "2.5.0",
4
+ "version": "2.5.2",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -32,10 +32,10 @@
32
32
  "dist"
33
33
  ],
34
34
  "devDependencies": {
35
- "@tiptap/pm": "^2.5.0"
35
+ "@tiptap/pm": "^2.5.2"
36
36
  },
37
37
  "peerDependencies": {
38
- "@tiptap/pm": "^2.5.0"
38
+ "@tiptap/pm": "^2.5.2"
39
39
  },
40
40
  "repository": {
41
41
  "type": "git",
package/src/Editor.ts CHANGED
@@ -406,11 +406,6 @@ export class Editor extends EventEmitter<EditorEvents> {
406
406
  const state = this.state.apply(transaction)
407
407
  const selectionHasChanged = !this.state.selection.eq(state.selection)
408
408
 
409
- this.emit('beforeTransaction', {
410
- editor: this,
411
- transaction,
412
- nextState: state,
413
- })
414
409
  this.view.updateState(state)
415
410
  this.emit('transaction', {
416
411
  editor: this,
package/src/Extension.ts CHANGED
@@ -459,8 +459,8 @@ export class Extension<Options = any, Storage = any> {
459
459
  // with different calls of `configure`
460
460
  const extension = this.extend({
461
461
  ...this.config,
462
- addOptions() {
463
- return mergeDeep(this.parent?.() || {}, options) as Options
462
+ addOptions: () => {
463
+ return mergeDeep(this.options as Record<string, any>, options) as Options
464
464
  },
465
465
  })
466
466
 
package/src/Mark.ts CHANGED
@@ -591,8 +591,8 @@ export class Mark<Options = any, Storage = any> {
591
591
  // with different calls of `configure`
592
592
  const extension = this.extend({
593
593
  ...this.config,
594
- addOptions() {
595
- return mergeDeep(this.parent?.() || {}, options) as Options
594
+ addOptions: () => {
595
+ return mergeDeep(this.options as Record<string, any>, options) as Options
596
596
  },
597
597
  })
598
598
 
package/src/Node.ts CHANGED
@@ -782,8 +782,8 @@ export class Node<Options = any, Storage = any> {
782
782
  // with different calls of `configure`
783
783
  const extension = this.extend({
784
784
  ...this.config,
785
- addOptions() {
786
- return mergeDeep(this.parent?.() || {}, options) as Options
785
+ addOptions: () => {
786
+ return mergeDeep(this.options as Record<string, any>, options) as Options
787
787
  },
788
788
  })
789
789
 
package/src/types.ts CHANGED
@@ -50,7 +50,6 @@ export interface EditorEvents {
50
50
  }
51
51
  update: { editor: Editor; transaction: Transaction }
52
52
  selectionUpdate: { editor: Editor; transaction: Transaction }
53
- beforeTransaction: { editor: Editor; transaction: Transaction, nextState: EditorState }
54
53
  transaction: { editor: Editor; transaction: Transaction }
55
54
  focus: { editor: Editor; event: FocusEvent; transaction: Transaction }
56
55
  blur: { editor: Editor; event: FocusEvent; transaction: Transaction }