@codemirror/state 6.1.4 → 6.2.0
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 +6 -0
- package/dist/index.cjs +5 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1516,10 +1516,11 @@ class EditorSelection {
|
|
|
1516
1516
|
/**
|
|
1517
1517
|
Create a selection range.
|
|
1518
1518
|
*/
|
|
1519
|
-
static range(anchor, head, goalColumn) {
|
|
1520
|
-
let
|
|
1521
|
-
|
|
1522
|
-
|
|
1519
|
+
static range(anchor, head, goalColumn, bidiLevel) {
|
|
1520
|
+
let flags = ((goalColumn !== null && goalColumn !== void 0 ? goalColumn : 33554431 /* RangeFlag.NoGoalColumn */) << 5 /* RangeFlag.GoalColumnOffset */) |
|
|
1521
|
+
(bidiLevel == null ? 3 : Math.min(2, bidiLevel));
|
|
1522
|
+
return head < anchor ? SelectionRange.create(head, anchor, 16 /* RangeFlag.Inverted */ | 8 /* RangeFlag.AssocAfter */ | flags)
|
|
1523
|
+
: SelectionRange.create(anchor, head, (head > anchor ? 4 /* RangeFlag.AssocBefore */ : 0) | flags);
|
|
1523
1524
|
}
|
|
1524
1525
|
/**
|
|
1525
1526
|
@internal
|
package/dist/index.d.ts
CHANGED
|
@@ -476,7 +476,7 @@ declare class EditorSelection {
|
|
|
476
476
|
/**
|
|
477
477
|
Create a selection range.
|
|
478
478
|
*/
|
|
479
|
-
static range(anchor: number, head: number, goalColumn?: number): SelectionRange;
|
|
479
|
+
static range(anchor: number, head: number, goalColumn?: number, bidiLevel?: number): SelectionRange;
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
declare type FacetConfig<Input, Output> = {
|
package/dist/index.js
CHANGED
|
@@ -1511,10 +1511,11 @@ class EditorSelection {
|
|
|
1511
1511
|
/**
|
|
1512
1512
|
Create a selection range.
|
|
1513
1513
|
*/
|
|
1514
|
-
static range(anchor, head, goalColumn) {
|
|
1515
|
-
let
|
|
1516
|
-
|
|
1517
|
-
|
|
1514
|
+
static range(anchor, head, goalColumn, bidiLevel) {
|
|
1515
|
+
let flags = ((goalColumn !== null && goalColumn !== void 0 ? goalColumn : 33554431 /* RangeFlag.NoGoalColumn */) << 5 /* RangeFlag.GoalColumnOffset */) |
|
|
1516
|
+
(bidiLevel == null ? 3 : Math.min(2, bidiLevel));
|
|
1517
|
+
return head < anchor ? SelectionRange.create(head, anchor, 16 /* RangeFlag.Inverted */ | 8 /* RangeFlag.AssocAfter */ | flags)
|
|
1518
|
+
: SelectionRange.create(anchor, head, (head > anchor ? 4 /* RangeFlag.AssocBefore */ : 0) | flags);
|
|
1518
1519
|
}
|
|
1519
1520
|
/**
|
|
1520
1521
|
@internal
|