@codemirror/view 6.42.0 → 6.42.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,11 @@
1
+ ## 6.42.1 (2026-05-07)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix a bug where block wrappers could be applied incorrectly during composition.
6
+
7
+ Fix an issue leading to constant text geometry resets in variable-width fonts.
8
+
1
9
  ## 6.42.0 (2026-05-06)
2
10
 
3
11
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -2311,6 +2311,7 @@ class TileBuilder {
2311
2311
  this.cache.reused.set(oldTile, 2 /* Reused.DOM */);
2312
2312
  let text = new TextTile(composition.text, composition.text.nodeValue);
2313
2313
  text.flags |= 8 /* TileFlag.Composition */;
2314
+ this.pos = composition.range.toB;
2314
2315
  head.append(text);
2315
2316
  }
2316
2317
  addInlineWidget(widget, marks, openStart) {
@@ -5345,8 +5346,7 @@ class HeightOracle {
5345
5346
  }
5346
5347
  refresh(whiteSpace, lineHeight, charWidth, textHeight, lineLength, knownHeights) {
5347
5348
  let lineWrapping = wrappingWhiteSpace.indexOf(whiteSpace) > -1;
5348
- let changed = Math.abs(lineHeight - this.lineHeight) > 0.3 || this.lineWrapping != lineWrapping ||
5349
- Math.abs(charWidth - this.charWidth) > 0.1;
5349
+ let changed = Math.abs(lineHeight - this.lineHeight) > 0.3 || this.lineWrapping != lineWrapping;
5350
5350
  this.lineWrapping = lineWrapping;
5351
5351
  this.lineHeight = lineHeight;
5352
5352
  this.charWidth = charWidth;
package/dist/index.js CHANGED
@@ -2307,6 +2307,7 @@ class TileBuilder {
2307
2307
  this.cache.reused.set(oldTile, 2 /* Reused.DOM */);
2308
2308
  let text = new TextTile(composition.text, composition.text.nodeValue);
2309
2309
  text.flags |= 8 /* TileFlag.Composition */;
2310
+ this.pos = composition.range.toB;
2310
2311
  head.append(text);
2311
2312
  }
2312
2313
  addInlineWidget(widget, marks, openStart) {
@@ -5341,8 +5342,7 @@ class HeightOracle {
5341
5342
  }
5342
5343
  refresh(whiteSpace, lineHeight, charWidth, textHeight, lineLength, knownHeights) {
5343
5344
  let lineWrapping = wrappingWhiteSpace.indexOf(whiteSpace) > -1;
5344
- let changed = Math.abs(lineHeight - this.lineHeight) > 0.3 || this.lineWrapping != lineWrapping ||
5345
- Math.abs(charWidth - this.charWidth) > 0.1;
5345
+ let changed = Math.abs(lineHeight - this.lineHeight) > 0.3 || this.lineWrapping != lineWrapping;
5346
5346
  this.lineWrapping = lineWrapping;
5347
5347
  this.lineHeight = lineHeight;
5348
5348
  this.charWidth = charWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/view",
3
- "version": "6.42.0",
3
+ "version": "6.42.1",
4
4
  "description": "DOM view component for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",