@tiptap/core 3.0.3 → 3.0.4
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/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/Extension.ts +9 -1
- package/src/Mark.ts +9 -1
- package/src/Node.ts +9 -1
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.
|
|
4
|
+
"version": "3.0.4",
|
|
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.
|
|
55
|
+
"@tiptap/pm": "^3.0.4"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@tiptap/pm": "^3.0.
|
|
58
|
+
"@tiptap/pm": "^3.0.4"
|
|
59
59
|
},
|
|
60
60
|
"repository": {
|
|
61
61
|
"type": "git",
|
package/src/Extension.ts
CHANGED
|
@@ -31,11 +31,19 @@ export class Extension<Options = any, Storage = any> extends Extendable<
|
|
|
31
31
|
return super.configure(options) as Extension<Options, Storage>
|
|
32
32
|
}
|
|
33
33
|
|
|
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>
|
|
34
40
|
extend<
|
|
35
41
|
ExtendedOptions = Options,
|
|
36
42
|
ExtendedStorage = Storage,
|
|
37
43
|
ExtendedConfig = ExtensionConfig<ExtendedOptions, ExtendedStorage>,
|
|
38
|
-
>(
|
|
44
|
+
>(
|
|
45
|
+
extendedConfig?: Partial<ExtendedConfig> | (() => Partial<ExtendedConfig>),
|
|
46
|
+
): Extension<ExtendedOptions, ExtendedStorage> {
|
|
39
47
|
// If the extended config is a function, execute it to get the configuration object
|
|
40
48
|
const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig
|
|
41
49
|
return super.extend(resolvedConfig) as Extension<ExtendedOptions, ExtendedStorage>
|
package/src/Mark.ts
CHANGED
|
@@ -188,11 +188,19 @@ 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>
|
|
191
197
|
extend<
|
|
192
198
|
ExtendedOptions = Options,
|
|
193
199
|
ExtendedStorage = Storage,
|
|
194
200
|
ExtendedConfig = MarkConfig<ExtendedOptions, ExtendedStorage>,
|
|
195
|
-
>(
|
|
201
|
+
>(
|
|
202
|
+
extendedConfig?: Partial<ExtendedConfig> | (() => Partial<ExtendedConfig>),
|
|
203
|
+
): Mark<ExtendedOptions, ExtendedStorage> {
|
|
196
204
|
// If the extended config is a function, execute it to get the configuration object
|
|
197
205
|
const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig
|
|
198
206
|
return super.extend(resolvedConfig) as Mark<ExtendedOptions, ExtendedStorage>
|
package/src/Node.ts
CHANGED
|
@@ -354,11 +354,19 @@ 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>
|
|
357
363
|
extend<
|
|
358
364
|
ExtendedOptions = Options,
|
|
359
365
|
ExtendedStorage = Storage,
|
|
360
366
|
ExtendedConfig = NodeConfig<ExtendedOptions, ExtendedStorage>,
|
|
361
|
-
>(
|
|
367
|
+
>(
|
|
368
|
+
extendedConfig?: Partial<ExtendedConfig> | (() => Partial<ExtendedConfig>),
|
|
369
|
+
): Node<ExtendedOptions, ExtendedStorage> {
|
|
362
370
|
// If the extended config is a function, execute it to get the configuration object
|
|
363
371
|
const resolvedConfig = typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig
|
|
364
372
|
return super.extend(resolvedConfig) as Node<ExtendedOptions, ExtendedStorage>
|