@portabletext/editor 2.13.7 → 2.14.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/lib/_chunks-dts/behavior.types.action.d.cts +3 -3
- package/lib/_chunks-dts/behavior.types.action.d.ts +51 -51
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/selectors/index.cjs +41 -1
- package/lib/selectors/index.cjs.map +1 -1
- package/lib/selectors/index.d.cts +15 -1
- package/lib/selectors/index.d.ts +15 -1
- package/lib/selectors/index.js +43 -3
- package/lib/selectors/index.js.map +1 -1
- package/package.json +2 -2
- package/src/internal-utils/to-slate-range.test.ts +2 -2
- package/src/internal-utils/to-slate-range.ts +1 -1
- package/src/selectors/index.ts +2 -0
- package/src/selectors/selector.get-next-inline-objects.ts +50 -0
- package/src/selectors/selector.get-previous-inline-objects.ts +47 -0
- package/src/utils/util.block-offset.test.ts +345 -488
package/lib/index.js
CHANGED
|
@@ -592,7 +592,7 @@ function toSlateRange(snapshot) {
|
|
|
592
592
|
if (!snapshot.context.selection)
|
|
593
593
|
return null;
|
|
594
594
|
if (isEqualSelectionPoints(snapshot.context.selection.anchor, snapshot.context.selection.focus)) {
|
|
595
|
-
const anchorPoint2 = toSlateSelectionPoint(snapshot, snapshot.context.selection.anchor, snapshot.context.selection.backward ? "
|
|
595
|
+
const anchorPoint2 = toSlateSelectionPoint(snapshot, snapshot.context.selection.anchor, snapshot.context.selection.backward ? "backward" : "forward");
|
|
596
596
|
return anchorPoint2 ? {
|
|
597
597
|
anchor: anchorPoint2,
|
|
598
598
|
focus: anchorPoint2
|