@codemirror/view 6.43.0 → 6.43.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 +10 -0
- package/dist/index.cjs +9 -6
- package/dist/index.js +9 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 6.43.1 (2026-06-09)
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
Work around an issue in with some IMEs (like Tibetan) in MacOS Chrome where composition could get interrupted needlessly.
|
|
6
|
+
|
|
7
|
+
Fix a crash when calling on a line with only `display: none` content.
|
|
8
|
+
|
|
9
|
+
Improve reuse of widgets near composition, which in some cases prevents Safari from doing odd thing with the selection.
|
|
10
|
+
|
|
1
11
|
## 6.43.0 (2026-05-14)
|
|
2
12
|
|
|
3
13
|
### New features
|
package/dist/index.cjs
CHANGED
|
@@ -2631,6 +2631,7 @@ class TileUpdate {
|
|
|
2631
2631
|
if (composition && next.fromA <= composition.range.fromA && next.toA >= composition.range.toA) {
|
|
2632
2632
|
this.forward(next.fromA, composition.range.fromA, composition.range.fromA < composition.range.toA ? 1 : -1);
|
|
2633
2633
|
this.emit(posB, composition.range.fromB);
|
|
2634
|
+
this.builder.flushBuffer();
|
|
2634
2635
|
this.cache.clear(); // Must not reuse DOM across composition
|
|
2635
2636
|
this.builder.addComposition(composition, compositionContext);
|
|
2636
2637
|
this.text.skip(composition.range.toB - composition.range.fromB);
|
|
@@ -3844,12 +3845,11 @@ class InlineCoordsScan {
|
|
|
3844
3845
|
}
|
|
3845
3846
|
// Scan through the rectangles for the content of a tile with inline
|
|
3846
3847
|
// content, looking for one that overlaps the queried position
|
|
3847
|
-
// vertically
|
|
3848
|
-
//
|
|
3849
|
-
//
|
|
3850
|
-
//
|
|
3851
|
-
// these will be
|
|
3852
|
-
// will be child tiles.
|
|
3848
|
+
// vertically and is closest horizontally. The caller is responsible
|
|
3849
|
+
// for dividing its content into N pieces, and pass an array with
|
|
3850
|
+
// N+1 positions (including the position after the last piece). For
|
|
3851
|
+
// a text tile, these will be character clusters, for a composite
|
|
3852
|
+
// tile, these will be child tiles.
|
|
3853
3853
|
scan(positions, getRects, recursed = false) {
|
|
3854
3854
|
let lo = 0, hi = positions.length - 1, seen = new Set();
|
|
3855
3855
|
let bidi = this.bidiIn(positions[0], positions[hi]);
|
|
@@ -3921,6 +3921,8 @@ class InlineCoordsScan {
|
|
|
3921
3921
|
// If no element with y overlap is found, find the nearest element
|
|
3922
3922
|
// on the y axis, move this.y into it, and retry the scan.
|
|
3923
3923
|
if (!closestRect) {
|
|
3924
|
+
if (!below && !above)
|
|
3925
|
+
return { i: positions[0], after: false };
|
|
3924
3926
|
let side = above && (!below || (this.y - above.bottom < below.top - this.y)) ? above : below;
|
|
3925
3927
|
this.y = (side.top + side.bottom) / 2;
|
|
3926
3928
|
return this.scan(positions, getRects, true);
|
|
@@ -6814,6 +6816,7 @@ const baseTheme$1 = buildTheme("." + baseThemeID, {
|
|
|
6814
6816
|
padding: "0 2px 0 6px"
|
|
6815
6817
|
},
|
|
6816
6818
|
".cm-layer": {
|
|
6819
|
+
userSelect: "none", // #1708
|
|
6817
6820
|
position: "absolute",
|
|
6818
6821
|
left: 0,
|
|
6819
6822
|
top: 0,
|
package/dist/index.js
CHANGED
|
@@ -2627,6 +2627,7 @@ class TileUpdate {
|
|
|
2627
2627
|
if (composition && next.fromA <= composition.range.fromA && next.toA >= composition.range.toA) {
|
|
2628
2628
|
this.forward(next.fromA, composition.range.fromA, composition.range.fromA < composition.range.toA ? 1 : -1);
|
|
2629
2629
|
this.emit(posB, composition.range.fromB);
|
|
2630
|
+
this.builder.flushBuffer();
|
|
2630
2631
|
this.cache.clear(); // Must not reuse DOM across composition
|
|
2631
2632
|
this.builder.addComposition(composition, compositionContext);
|
|
2632
2633
|
this.text.skip(composition.range.toB - composition.range.fromB);
|
|
@@ -3840,12 +3841,11 @@ class InlineCoordsScan {
|
|
|
3840
3841
|
}
|
|
3841
3842
|
// Scan through the rectangles for the content of a tile with inline
|
|
3842
3843
|
// content, looking for one that overlaps the queried position
|
|
3843
|
-
// vertically
|
|
3844
|
-
//
|
|
3845
|
-
//
|
|
3846
|
-
//
|
|
3847
|
-
// these will be
|
|
3848
|
-
// will be child tiles.
|
|
3844
|
+
// vertically and is closest horizontally. The caller is responsible
|
|
3845
|
+
// for dividing its content into N pieces, and pass an array with
|
|
3846
|
+
// N+1 positions (including the position after the last piece). For
|
|
3847
|
+
// a text tile, these will be character clusters, for a composite
|
|
3848
|
+
// tile, these will be child tiles.
|
|
3849
3849
|
scan(positions, getRects, recursed = false) {
|
|
3850
3850
|
let lo = 0, hi = positions.length - 1, seen = new Set();
|
|
3851
3851
|
let bidi = this.bidiIn(positions[0], positions[hi]);
|
|
@@ -3917,6 +3917,8 @@ class InlineCoordsScan {
|
|
|
3917
3917
|
// If no element with y overlap is found, find the nearest element
|
|
3918
3918
|
// on the y axis, move this.y into it, and retry the scan.
|
|
3919
3919
|
if (!closestRect) {
|
|
3920
|
+
if (!below && !above)
|
|
3921
|
+
return { i: positions[0], after: false };
|
|
3920
3922
|
let side = above && (!below || (this.y - above.bottom < below.top - this.y)) ? above : below;
|
|
3921
3923
|
this.y = (side.top + side.bottom) / 2;
|
|
3922
3924
|
return this.scan(positions, getRects, true);
|
|
@@ -6809,6 +6811,7 @@ const baseTheme$1 = /*@__PURE__*/buildTheme("." + baseThemeID, {
|
|
|
6809
6811
|
padding: "0 2px 0 6px"
|
|
6810
6812
|
},
|
|
6811
6813
|
".cm-layer": {
|
|
6814
|
+
userSelect: "none", // #1708
|
|
6812
6815
|
position: "absolute",
|
|
6813
6816
|
left: 0,
|
|
6814
6817
|
top: 0,
|