@tiptap/core 2.10.1 → 2.10.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.
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.10.1",
4
+ "version": "2.10.2",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -32,7 +32,7 @@
32
32
  "dist"
33
33
  ],
34
34
  "devDependencies": {
35
- "@tiptap/pm": "^2.10.1"
35
+ "@tiptap/pm": "^2.10.2"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@tiptap/pm": "^2.7.0"
package/src/Extension.ts CHANGED
@@ -61,7 +61,7 @@ declare module '@tiptap/core' {
61
61
  */
62
62
  addOptions?: (this: {
63
63
  name: string
64
- parent: ParentConfig<ExtensionConfig<Options, Storage>>['addOptions']
64
+ parent: Exclude<ParentConfig<ExtensionConfig<Options, Storage>>['addOptions'], undefined>
65
65
  }) => Options
66
66
 
67
67
  /**
@@ -76,7 +76,7 @@ declare module '@tiptap/core' {
76
76
  addStorage?: (this: {
77
77
  name: string
78
78
  options: Options
79
- parent: ParentConfig<ExtensionConfig<Options, Storage>>['addStorage']
79
+ parent: Exclude<ParentConfig<ExtensionConfig<Options, Storage>>['addStorage'], undefined>
80
80
  }) => Storage
81
81
 
82
82
  /**
@@ -474,9 +474,9 @@ export class Extension<Options = any, Storage = any> {
474
474
  }
475
475
 
476
476
  extend<ExtendedOptions = Options, ExtendedStorage = Storage>(
477
- extendedConfig: Partial<ExtensionConfig<Partial<ExtendedOptions>, Partial<ExtendedStorage>>> = {},
477
+ extendedConfig: Partial<ExtensionConfig<ExtendedOptions, ExtendedStorage>> = {},
478
478
  ) {
479
- const extension = new Extension<ExtendedOptions, ExtendedStorage>({ ...this.config, ...extendedConfig } as ExtensionConfig)
479
+ const extension = new Extension<ExtendedOptions, ExtendedStorage>({ ...this.config, ...extendedConfig })
480
480
 
481
481
  extension.parent = this
482
482
 
package/src/Mark.ts CHANGED
@@ -64,7 +64,7 @@ declare module '@tiptap/core' {
64
64
  */
65
65
  addOptions?: (this: {
66
66
  name: string
67
- parent: ParentConfig<MarkConfig<Options, Storage>>['addOptions']
67
+ parent: Exclude<ParentConfig<MarkConfig<Options, Storage>>['addOptions'], undefined>
68
68
  }) => Options
69
69
 
70
70
  /**
@@ -79,7 +79,7 @@ declare module '@tiptap/core' {
79
79
  addStorage?: (this: {
80
80
  name: string
81
81
  options: Options
82
- parent: ParentConfig<MarkConfig<Options, Storage>>['addStorage']
82
+ parent: Exclude<ParentConfig<MarkConfig<Options, Storage>>['addStorage'], undefined>
83
83
  }) => Storage
84
84
 
85
85
  /**
@@ -606,9 +606,9 @@ export class Mark<Options = any, Storage = any> {
606
606
  }
607
607
 
608
608
  extend<ExtendedOptions = Options, ExtendedStorage = Storage>(
609
- extendedConfig: Partial<MarkConfig<Partial<ExtendedOptions>, Partial<ExtendedStorage>>> = {},
609
+ extendedConfig: Partial<MarkConfig<ExtendedOptions, ExtendedStorage>> = {},
610
610
  ) {
611
- const extension = new Mark<ExtendedOptions, ExtendedStorage>(extendedConfig as MarkConfig)
611
+ const extension = new Mark<ExtendedOptions, ExtendedStorage>(extendedConfig)
612
612
 
613
613
  extension.parent = this
614
614
 
package/src/Node.ts CHANGED
@@ -65,7 +65,7 @@ declare module '@tiptap/core' {
65
65
  */
66
66
  addOptions?: (this: {
67
67
  name: string
68
- parent: ParentConfig<NodeConfig<Options, Storage>>['addOptions']
68
+ parent: Exclude<ParentConfig<NodeConfig<Options, Storage>>['addOptions'], undefined>
69
69
  }) => Options
70
70
 
71
71
  /**
@@ -80,7 +80,7 @@ declare module '@tiptap/core' {
80
80
  addStorage?: (this: {
81
81
  name: string
82
82
  options: Options
83
- parent: ParentConfig<NodeConfig<Options, Storage>>['addStorage']
83
+ parent: Exclude<ParentConfig<NodeConfig<Options, Storage>>['addStorage'], undefined>
84
84
  }) => Storage
85
85
 
86
86
  /**
@@ -816,9 +816,9 @@ export class Node<Options = any, Storage = any> {
816
816
  }
817
817
 
818
818
  extend<ExtendedOptions = Options, ExtendedStorage = Storage>(
819
- extendedConfig: Partial<NodeConfig<Partial<ExtendedOptions>, Partial<ExtendedStorage>>> = {},
819
+ extendedConfig: Partial<NodeConfig<ExtendedOptions, ExtendedStorage>> = {},
820
820
  ) {
821
- const extension = new Node<ExtendedOptions, ExtendedStorage>(extendedConfig as NodeConfig)
821
+ const extension = new Node<ExtendedOptions, ExtendedStorage>(extendedConfig)
822
822
 
823
823
  extension.parent = this
824
824