@prosekit/core
Advanced tools
Comparing version 0.7.10 to 0.7.11
@@ -25,2 +25,4 @@ export { addMark } from './_tsup-dts-rollup'; | ||
export { UnsetMarkOptions } from './_tsup-dts-rollup'; | ||
export { toggleWrap } from './_tsup-dts-rollup'; | ||
export { ToggleWrapOptions } from './_tsup-dts-rollup'; | ||
export { wrap } from './_tsup-dts-rollup'; | ||
@@ -27,0 +29,0 @@ export { WrapOptions } from './_tsup-dts-rollup'; |
@@ -404,2 +404,5 @@ import { | ||
// src/commands/toggle-wrap.ts | ||
import { lift } from "@prosekit/pm/commands"; | ||
// src/commands/wrap.ts | ||
@@ -420,2 +423,13 @@ import { findWrapping } from "@prosekit/pm/transform"; | ||
// src/commands/toggle-wrap.ts | ||
function toggleWrap(options) { | ||
const { type, attrs } = options; | ||
return (state, dispatch) => { | ||
if (isNodeActive(state, type, attrs)) { | ||
return lift(state, dispatch); | ||
} | ||
return wrap({ type, attrs })(state, dispatch); | ||
}; | ||
} | ||
// src/editor/with-priority.ts | ||
@@ -467,2 +481,3 @@ function withPriority(extension, priority) { | ||
wrap, | ||
toggleWrap, | ||
setBlockType, | ||
@@ -1435,2 +1450,3 @@ setNodeAttrs, | ||
toggleNode, | ||
toggleWrap, | ||
union, | ||
@@ -1437,0 +1453,0 @@ unsetBlockType, |
{ | ||
"name": "@prosekit/core", | ||
"type": "module", | ||
"version": "0.7.10", | ||
"version": "0.7.11", | ||
"private": false, | ||
@@ -48,3 +48,3 @@ "author": { | ||
"prosemirror-splittable": "^0.1.1", | ||
"type-fest": "^4.25.0", | ||
"type-fest": "^4.26.0", | ||
"@prosekit/pm": "^0.1.8" | ||
@@ -51,0 +51,0 @@ }, |
Sorry, the diff of this file is too big to display
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
174333
5451
Updatedtype-fest@^4.26.0