@tiptap/core 3.0.5 → 3.0.7

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": "3.0.5",
4
+ "version": "3.0.7",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -52,10 +52,10 @@
52
52
  "jsx-dev-runtime"
53
53
  ],
54
54
  "devDependencies": {
55
- "@tiptap/pm": "^3.0.5"
55
+ "@tiptap/pm": "^3.0.7"
56
56
  },
57
57
  "peerDependencies": {
58
- "@tiptap/pm": "^3.0.5"
58
+ "@tiptap/pm": "^3.0.7"
59
59
  },
60
60
  "repository": {
61
61
  "type": "git",
package/src/Extension.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Editor } from './Editor.js'
1
2
  import { type ExtendableConfig, Extendable } from './Extendable.js'
2
3
 
3
4
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
@@ -31,18 +32,21 @@ export class Extension<Options = any, Storage = any> extends Extendable<
31
32
  return super.configure(options) as Extension<Options, Storage>
32
33
  }
33
34
 
34
- extend<ExtendedOptions = Options, ExtendedStorage = Storage>(
35
- extendedConfig: () => Partial<ExtensionConfig<ExtendedOptions, ExtendedStorage>>,
36
- ): Extension<ExtendedOptions, ExtendedStorage>
37
- extend<ExtendedOptions = Options, ExtendedStorage = Storage>(
38
- extendedConfig: Partial<ExtensionConfig<ExtendedOptions, ExtendedStorage>>,
39
- ): Extension<ExtendedOptions, ExtendedStorage>
40
35
  extend<
41
36
  ExtendedOptions = Options,
42
37
  ExtendedStorage = Storage,
43
38
  ExtendedConfig = ExtensionConfig<ExtendedOptions, ExtendedStorage>,
44
39
  >(
45
- extendedConfig?: Partial<ExtendedConfig> | (() => Partial<ExtendedConfig>),
40
+ extendedConfig?:
41
+ | (() => Partial<ExtendedConfig>)
42
+ | (Partial<ExtendedConfig> &
43
+ ThisType<{
44
+ name: string
45
+ options: ExtendedOptions
46
+ storage: ExtendedStorage
47
+ editor: Editor
48
+ type: null
49
+ }>),
46
50
  ): Extension<ExtendedOptions, ExtendedStorage> {
47
51
  // If the extended config is a function, execute it to get the configuration object
48
52
  const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig
package/src/Mark.ts CHANGED
@@ -188,18 +188,21 @@ export class Mark<Options = any, Storage = any> extends Extendable<Options, Stor
188
188
  return super.configure(options) as Mark<Options, Storage>
189
189
  }
190
190
 
191
- extend<ExtendedOptions = Options, ExtendedStorage = Storage>(
192
- extendedConfig: () => Partial<MarkConfig<ExtendedOptions, ExtendedStorage>>,
193
- ): Mark<ExtendedOptions, ExtendedStorage>
194
- extend<ExtendedOptions = Options, ExtendedStorage = Storage>(
195
- extendedConfig: Partial<MarkConfig<ExtendedOptions, ExtendedStorage>>,
196
- ): Mark<ExtendedOptions, ExtendedStorage>
197
191
  extend<
198
192
  ExtendedOptions = Options,
199
193
  ExtendedStorage = Storage,
200
194
  ExtendedConfig = MarkConfig<ExtendedOptions, ExtendedStorage>,
201
195
  >(
202
- extendedConfig?: Partial<ExtendedConfig> | (() => Partial<ExtendedConfig>),
196
+ extendedConfig?:
197
+ | (() => Partial<ExtendedConfig>)
198
+ | (Partial<ExtendedConfig> &
199
+ ThisType<{
200
+ name: string
201
+ options: ExtendedOptions
202
+ storage: ExtendedStorage
203
+ editor: Editor
204
+ type: MarkType
205
+ }>),
203
206
  ): Mark<ExtendedOptions, ExtendedStorage> {
204
207
  // If the extended config is a function, execute it to get the configuration object
205
208
  const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig
package/src/Node.ts CHANGED
@@ -354,18 +354,21 @@ export class Node<Options = any, Storage = any> extends Extendable<Options, Stor
354
354
  return super.configure(options) as Node<Options, Storage>
355
355
  }
356
356
 
357
- extend<ExtendedOptions = Options, ExtendedStorage = Storage>(
358
- extendedConfig: () => Partial<NodeConfig<ExtendedOptions, ExtendedStorage>>,
359
- ): Node<ExtendedOptions, ExtendedStorage>
360
- extend<ExtendedOptions = Options, ExtendedStorage = Storage>(
361
- extendedConfig: Partial<NodeConfig<ExtendedOptions, ExtendedStorage>>,
362
- ): Node<ExtendedOptions, ExtendedStorage>
363
357
  extend<
364
358
  ExtendedOptions = Options,
365
359
  ExtendedStorage = Storage,
366
360
  ExtendedConfig = NodeConfig<ExtendedOptions, ExtendedStorage>,
367
361
  >(
368
- extendedConfig?: Partial<ExtendedConfig> | (() => Partial<ExtendedConfig>),
362
+ extendedConfig?:
363
+ | (() => Partial<ExtendedConfig>)
364
+ | (Partial<ExtendedConfig> &
365
+ ThisType<{
366
+ name: string
367
+ options: ExtendedOptions
368
+ storage: ExtendedStorage
369
+ editor: Editor
370
+ type: NodeType
371
+ }>),
369
372
  ): Node<ExtendedOptions, ExtendedStorage> {
370
373
  // If the extended config is a function, execute it to get the configuration object
371
374
  const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig