@codemirror/state 6.1.0 → 6.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 6.1.1 (2022-08-03)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix a bug in range set span iteration that would cause decorations to be inappropriately split in some situations.
6
+
1
7
  ## 6.1.0 (2022-06-30)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -2011,7 +2011,7 @@ function flatten(extension, compartments, newCompartments) {
2011
2011
  else if (ext instanceof FacetProvider) {
2012
2012
  result[prec].push(ext);
2013
2013
  if (ext.facet.extensions)
2014
- inner(ext.facet.extensions, prec);
2014
+ inner(ext.facet.extensions, Prec_.default);
2015
2015
  }
2016
2016
  else {
2017
2017
  let content = ext.extension;
@@ -3734,6 +3734,8 @@ class SpanCursor {
3734
3734
  let nextVal = this.cursor.value;
3735
3735
  if (!nextVal.point) { // Opening a range
3736
3736
  this.addActive(trackOpen);
3737
+ if (this.cursor.from < from && this.cursor.to > from)
3738
+ trackExtra++;
3737
3739
  this.cursor.next();
3738
3740
  }
3739
3741
  else if (wasPoint && this.cursor.to == this.to && this.cursor.from < this.cursor.to) {
package/dist/index.js CHANGED
@@ -2006,7 +2006,7 @@ function flatten(extension, compartments, newCompartments) {
2006
2006
  else if (ext instanceof FacetProvider) {
2007
2007
  result[prec].push(ext);
2008
2008
  if (ext.facet.extensions)
2009
- inner(ext.facet.extensions, prec);
2009
+ inner(ext.facet.extensions, Prec_.default);
2010
2010
  }
2011
2011
  else {
2012
2012
  let content = ext.extension;
@@ -3728,6 +3728,8 @@ class SpanCursor {
3728
3728
  let nextVal = this.cursor.value;
3729
3729
  if (!nextVal.point) { // Opening a range
3730
3730
  this.addActive(trackOpen);
3731
+ if (this.cursor.from < from && this.cursor.to > from)
3732
+ trackExtra++;
3731
3733
  this.cursor.next();
3732
3734
  }
3733
3735
  else if (wasPoint && this.cursor.to == this.to && this.cursor.from < this.cursor.to) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/state",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "description": "Editor state data structures for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",