@prosekit/core
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -40,2 +40,3 @@ // src/commands/add-mark.ts | ||
// src/commands/insert-node.ts | ||
import { TextSelection } from "@prosekit/pm/state"; | ||
import { insertPoint } from "@prosekit/pm/transform"; | ||
@@ -73,2 +74,3 @@ | ||
const tr = state.tr.insert(insertPos, node); | ||
tr.setSelection(TextSelection.near(tr.doc.resolve(insertPos))); | ||
dispatch(tr); | ||
@@ -102,3 +104,3 @@ } | ||
// src/utils/get-custom-selection.ts | ||
import { TextSelection } from "@prosekit/pm/state"; | ||
import { TextSelection as TextSelection2 } from "@prosekit/pm/state"; | ||
function getCustomSelection(state, from, to) { | ||
@@ -109,3 +111,3 @@ const pos = from != null ? from : to; | ||
const $to = state.doc.resolve(to != null ? to : pos); | ||
return TextSelection.between($from, $to); | ||
return TextSelection2.between($from, $to); | ||
} | ||
@@ -664,3 +666,3 @@ return state.selection; | ||
NodeSelection, | ||
TextSelection as TextSelection2 | ||
TextSelection as TextSelection3 | ||
} from "@prosekit/pm/state"; | ||
@@ -674,3 +676,3 @@ function isProseMirrorNode(node) { | ||
function isTextSelection(sel) { | ||
return sel instanceof TextSelection2; | ||
return sel instanceof TextSelection3; | ||
} | ||
@@ -677,0 +679,0 @@ function isNodeSelection(sel) { |
{ | ||
"name": "@prosekit/core", | ||
"type": "module", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "author": { |
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
80187
2528