prosemirror-state
Advanced tools
Comparing version 0.17.0 to 0.17.1
@@ -58,6 +58,7 @@ // ::- Superclass for editor selections. | ||
// negative, it will search backwards first. | ||
Selection.near = function near ($pos, bias) { | ||
Selection.near = function near ($pos, bias, textOnly) { | ||
if ( bias === void 0 ) bias = 1; | ||
if ( textOnly === void 0 ) textOnly = false; | ||
var result = this.findFrom($pos, bias) || this.findFrom($pos, -bias) | ||
var result = this.findFrom($pos, bias, textOnly) || this.findFrom($pos, -bias, textOnly) | ||
if (!result) { throw new RangeError("Searching for selection in invalid document " + $pos.node(0)) } | ||
@@ -64,0 +65,0 @@ return result |
@@ -86,3 +86,3 @@ var ref = require("prosemirror-transform"); | ||
prototypeAccessors.selectionSet.get = function () { | ||
return this.updated & UPDATED_SEL > 0 | ||
return (this.updated & UPDATED_SEL) > 0 | ||
}; | ||
@@ -101,3 +101,3 @@ | ||
prototypeAccessors.storedMarksSet.get = function () { | ||
return this.updated & UPDATED_MARKS > 0 | ||
return (this.updated & UPDATED_MARKS) > 0 | ||
}; | ||
@@ -214,3 +214,3 @@ | ||
prototypeAccessors.scrolledIntoView.get = function () { | ||
return this.updated | UPDATED_SCROLL > 0 | ||
return (this.updated & UPDATED_SCROLL) > 0 | ||
}; | ||
@@ -217,0 +217,0 @@ |
{ | ||
"name": "prosemirror-state", | ||
"version": "0.17.0", | ||
"version": "0.17.1", | ||
"description": "ProseMirror editor state", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -59,4 +59,4 @@ // ::- Superclass for editor selections. | ||
// negative, it will search backwards first. | ||
static near($pos, bias = 1) { | ||
let result = this.findFrom($pos, bias) || this.findFrom($pos, -bias) | ||
static near($pos, bias = 1, textOnly = false) { | ||
let result = this.findFrom($pos, bias, textOnly) || this.findFrom($pos, -bias, textOnly) | ||
if (!result) throw new RangeError("Searching for selection in invalid document " + $pos.node(0)) | ||
@@ -63,0 +63,0 @@ return result |
@@ -77,3 +77,3 @@ const {Transform} = require("prosemirror-transform") | ||
get selectionSet() { | ||
return this.updated & UPDATED_SEL > 0 | ||
return (this.updated & UPDATED_SEL) > 0 | ||
} | ||
@@ -92,3 +92,3 @@ | ||
get storedMarksSet() { | ||
return this.updated & UPDATED_MARKS > 0 | ||
return (this.updated & UPDATED_MARKS) > 0 | ||
} | ||
@@ -192,3 +192,3 @@ | ||
get scrolledIntoView() { | ||
return this.updated | UPDATED_SCROLL > 0 | ||
return (this.updated & UPDATED_SCROLL) > 0 | ||
} | ||
@@ -195,0 +195,0 @@ |
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
73027
1508