@tiptap/extension-gapcursor
Advanced tools
Comparing version 2.0.0-beta.4 to 2.0.0-beta.5
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.0.0-beta.5](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-gapcursor@2.0.0-beta.4...@tiptap/extension-gapcursor@2.0.0-beta.5) (2021-04-12) | ||
### Features | ||
* add parentConfig to extension context for more extendable extensions, fix [#259](https://github.com/ueberdosis/tiptap-next/issues/259) ([5e1ec5d](https://github.com/ueberdosis/tiptap-next/commit/5e1ec5d2a66be164f505d631f97861ab9344ba96)) | ||
# [2.0.0-beta.4](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-gapcursor@2.0.0-beta.3...@tiptap/extension-gapcursor@2.0.0-beta.4) (2021-03-16) | ||
@@ -8,0 +19,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { Extension } from '@tiptap/core'; | ||
import { Extension, ParentConfig } from '@tiptap/core'; | ||
declare module '@tiptap/core' { | ||
@@ -9,2 +9,3 @@ interface NodeConfig<Options> { | ||
options: Options; | ||
parentConfig: ParentConfig<NodeConfig<Options>>; | ||
}) => boolean | null); | ||
@@ -11,0 +12,0 @@ } |
@@ -17,3 +17,5 @@ 'use strict'; | ||
var _a; | ||
const context = { options: extension.options }; | ||
const context = core.createExtensionContext(extension, { | ||
options: extension.options, | ||
}); | ||
return { | ||
@@ -20,0 +22,0 @@ allowGapCursor: (_a = core.callOrReturn(extension.config.allowGapCursor, context)) !== null && _a !== void 0 ? _a : null, |
@@ -1,2 +0,2 @@ | ||
import { Extension, callOrReturn } from '@tiptap/core'; | ||
import { Extension, createExtensionContext, callOrReturn } from '@tiptap/core'; | ||
import { gapCursor } from 'prosemirror-gapcursor'; | ||
@@ -13,3 +13,5 @@ | ||
var _a; | ||
const context = { options: extension.options }; | ||
const context = createExtensionContext(extension, { | ||
options: extension.options, | ||
}); | ||
return { | ||
@@ -16,0 +18,0 @@ allowGapCursor: (_a = callOrReturn(extension.config.allowGapCursor, context)) !== null && _a !== void 0 ? _a : null, |
@@ -16,3 +16,5 @@ (function (global, factory) { | ||
var _a; | ||
const context = { options: extension.options }; | ||
const context = core.createExtensionContext(extension, { | ||
options: extension.options, | ||
}); | ||
return { | ||
@@ -19,0 +21,0 @@ allowGapCursor: (_a = core.callOrReturn(extension.config.allowGapCursor, context)) !== null && _a !== void 0 ? _a : null, |
{ | ||
"name": "@tiptap/extension-gapcursor", | ||
"description": "gapcursor extension for tiptap", | ||
"version": "2.0.0-beta.4", | ||
"version": "2.0.0-beta.5", | ||
"homepage": "https://tiptap.dev", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "7d740a5cd88daffa022e7004ebe3fdf9be8905da" | ||
"gitHead": "28d30a10341cb5cd10626b1b8c884c20787b5d72" | ||
} |
@@ -1,2 +0,7 @@ | ||
import { Extension, callOrReturn } from '@tiptap/core' | ||
import { | ||
Extension, | ||
callOrReturn, | ||
createExtensionContext, | ||
ParentConfig, | ||
} from '@tiptap/core' | ||
import { gapCursor } from 'prosemirror-gapcursor' | ||
@@ -12,3 +17,6 @@ | ||
| null | ||
| ((this: { options: Options }) => boolean | null), | ||
| ((this: { | ||
options: Options, | ||
parentConfig: ParentConfig<NodeConfig<Options>>, | ||
}) => boolean | null), | ||
} | ||
@@ -27,3 +35,5 @@ } | ||
extendNodeSchema(extension) { | ||
const context = { options: extension.options } | ||
const context = createExtensionContext(extension, { | ||
options: extension.options, | ||
}) | ||
@@ -30,0 +40,0 @@ return { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
894899
803