@tiptap/core 3.9.1 → 3.10.1

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.9.1",
4
+ "version": "3.10.1",
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.9.1"
55
+ "@tiptap/pm": "^3.10.1"
56
56
  },
57
57
  "peerDependencies": {
58
- "@tiptap/pm": "^3.9.1"
58
+ "@tiptap/pm": "^3.10.1"
59
59
  },
60
60
  "repository": {
61
61
  "type": "git",
@@ -215,10 +215,16 @@ export class ExtensionManager {
215
215
  return []
216
216
  }
217
217
 
218
+ const nodeViewResult = addNodeView()
219
+
220
+ if (!nodeViewResult) {
221
+ return []
222
+ }
223
+
218
224
  const nodeview: NodeViewConstructor = (node, view, getPos, decorations, innerDecorations) => {
219
225
  const HTMLAttributes = getRenderedAttributes(node, extensionAttributes)
220
226
 
221
- return addNodeView()({
227
+ return nodeViewResult({
222
228
  // pass-through
223
229
  node,
224
230
  view,
package/src/Node.ts CHANGED
@@ -18,7 +18,7 @@ export interface NodeConfig<Options = any, Storage = any>
18
18
  editor: Editor
19
19
  type: NodeType
20
20
  parent: ParentConfig<NodeConfig<Options, Storage>>['addNodeView']
21
- }) => NodeViewRenderer)
21
+ }) => NodeViewRenderer | null)
22
22
  | null
23
23
 
24
24
  /**
package/src/index.ts CHANGED
@@ -9,6 +9,7 @@ export * from './helpers/index.js'
9
9
  export * from './InputRule.js'
10
10
  export * from './inputRules/index.js'
11
11
  export { createElement, Fragment, createElement as h } from './jsx-runtime.js'
12
+ export * from './lib/index.js'
12
13
  export * from './Mark.js'
13
14
  export * from './MarkView.js'
14
15
  export * from './Node.js'