@tiptap/extension-gapcursor
Advanced tools
Comparing version 3.0.0-next.0 to 3.0.0-next.1
@@ -1,31 +0,34 @@ | ||
import { Extension, callOrReturn, getExtensionField } from '@tiptap/core'; | ||
import { gapCursor } from '@tiptap/pm/gapcursor'; | ||
/** | ||
* This extension allows you to add a gap cursor to your editor. | ||
* A gap cursor is a cursor that appears when you click on a place | ||
* where no content is present, for example inbetween nodes. | ||
* @see https://tiptap.dev/api/extensions/gapcursor | ||
*/ | ||
const Gapcursor = Extension.create({ | ||
name: 'gapCursor', | ||
addProseMirrorPlugins() { | ||
return [ | ||
gapCursor(), | ||
]; | ||
}, | ||
extendNodeSchema(extension) { | ||
var _a; | ||
const context = { | ||
name: extension.name, | ||
options: extension.options, | ||
storage: extension.storage, | ||
}; | ||
return { | ||
allowGapCursor: (_a = callOrReturn(getExtensionField(extension, 'allowGapCursor', context))) !== null && _a !== void 0 ? _a : null, | ||
}; | ||
}, | ||
// src/gapcursor.ts | ||
import { | ||
callOrReturn, | ||
Extension, | ||
getExtensionField | ||
} from "@tiptap/core"; | ||
import { gapCursor } from "@tiptap/pm/gapcursor"; | ||
var Gapcursor = Extension.create({ | ||
name: "gapCursor", | ||
addProseMirrorPlugins() { | ||
return [ | ||
gapCursor() | ||
]; | ||
}, | ||
extendNodeSchema(extension) { | ||
var _a; | ||
const context = { | ||
name: extension.name, | ||
options: extension.options, | ||
storage: extension.storage | ||
}; | ||
return { | ||
allowGapCursor: (_a = callOrReturn(getExtensionField(extension, "allowGapCursor", context))) != null ? _a : null | ||
}; | ||
} | ||
}); | ||
export { Gapcursor, Gapcursor as default }; | ||
//# sourceMappingURL=index.js.map | ||
// src/index.ts | ||
var src_default = Gapcursor; | ||
export { | ||
Gapcursor, | ||
src_default as default | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@tiptap/extension-gapcursor", | ||
"description": "gapcursor extension for tiptap", | ||
"version": "3.0.0-next.0", | ||
"version": "3.0.0-next.1", | ||
"homepage": "https://tiptap.dev", | ||
@@ -18,3 +18,3 @@ "keywords": [ | ||
".": { | ||
"types": "./dist/packages/extension-gapcursor/src/index.d.ts", | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js", | ||
@@ -26,4 +26,3 @@ "require": "./dist/index.cjs" | ||
"module": "dist/index.js", | ||
"umd": "dist/index.umd.js", | ||
"types": "dist/packages/extension-gapcursor/src/index.d.ts", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
@@ -34,8 +33,8 @@ "src", | ||
"devDependencies": { | ||
"@tiptap/core": "^3.0.0-next.0", | ||
"@tiptap/pm": "^3.0.0-next.0" | ||
"@tiptap/core": "^3.0.0-next.1", | ||
"@tiptap/pm": "^3.0.0-next.1" | ||
}, | ||
"peerDependencies": { | ||
"@tiptap/core": "^3.0.0-next.0", | ||
"@tiptap/pm": "^3.0.0-next.0" | ||
"@tiptap/core": "^3.0.0-next.1", | ||
"@tiptap/pm": "^3.0.0-next.1" | ||
}, | ||
@@ -48,5 +47,4 @@ "repository": { | ||
"scripts": { | ||
"clean": "rm -rf dist", | ||
"build": "npm run clean && rollup -c" | ||
"build": "tsup" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
11767
10
159
1