Skip to content

Commit 04b7973

Browse files
ecoscript[bot]christianhg
authored andcommitted
Version Packages
1 parent fae7074 commit 04b7973

33 files changed

Lines changed: 157 additions & 71 deletions

.changeset/annotation-remove-stack-overflow.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.changeset/behavior-event-chain-depth.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/mutually-exclusive-annotation-forward.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.changeset/partial-annotation-covered-text.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.changeset/solo-typing-sync-fidelity.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

packages/editor/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## 7.10.9
4+
5+
### Patch Changes
6+
7+
- [#2985](https://github.com/portabletext/editor/pull/2985) [`fae7074`](https://github.com/portabletext/editor/commit/fae7074fb1617a7da35bb22a1a18e473ce1cc0b9) Thanks [@ryanbonial](https://github.com/ryanbonial)! - fix: prevent unbounded `annotation.add` raise recursion under concurrent editing
8+
9+
The `preventOverlappingAnnotations` Core Behavior raises `annotation.remove` followed by the original `annotation.add` whenever its guard considers the annotation active. The guard and the `annotation.remove` operation could disagree on the effective selection: the guard read the raw `at` while the operation resolved stale points to a fallback position. When they disagreed, the remove stripped nothing, the guard kept answering "active", and the raise chain recursed until the call stack overflowed, leaving the editor blank. Concurrent remote patches routinely produce such selections by splitting or consuming the spans an in-flight `at` points to.
10+
11+
The guard now resolves `at` through the same machinery as the operation before asking whether the annotation is active, so the two can no longer disagree and the chain terminates.
12+
13+
- [#2985](https://github.com/portabletext/editor/pull/2985) [`1676271`](https://github.com/portabletext/editor/commit/16762713632e5fe66e6a58f9214cc9ccd89e6f31) Thanks [@ryanbonial](https://github.com/ryanbonial)! - fix: depth-limit Behavior event chains so cycles fail loudly instead of overflowing the call stack
14+
15+
Behaviors can `raise`/`forward`/`execute` events recursively, and a Behavior whose guard never flips false recursed until the call stack overflowed, leaving the editor blank until reload. The event chain is now depth-limited: exceeding the limit drops the event with a single console error naming the event type, and the editor stays at its last consistent state. Legitimate event chains stay far below the limit, which measures nesting, not sequential fan-out.
16+
17+
- [#2988](https://github.com/portabletext/editor/pull/2988) [`6592c0d`](https://github.com/portabletext/editor/commit/6592c0d82742c28bd2f4f27f78997456653bd8c8) Thanks [@christianhg](https://github.com/christianhg)! - fix: require covered text for `isActiveAnnotation`'s `'partial'` mode on expanded selections
18+
19+
`isActiveAnnotation(name, {mode: 'partial'})` reported the annotation active when an expanded selection merely touched it at a zero-width boundary, selecting none of its text. It now answers true only when the selection covers at least one character of an annotated span, matching the documented "partially selected" contract.
20+
21+
For collapsed selections the two modes now share the editor's canonical caret answer: active with the caret inside an annotated span, not active at its edges, matching typing semantics (annotations don't expand at their edges). Previously `'partial'` also counted a caret sitting exactly on an annotation's boundary.
22+
23+
Behaviors built on the selector inherit the correction: adding an annotation with a selection that only borders an existing one no longer triggers the overlap-prevention removal cycle for that annotation.
24+
325
## 7.10.8
426

527
### Patch Changes

packages/editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@portabletext/editor",
3-
"version": "7.10.8",
3+
"version": "7.10.9",
44
"description": "Portable Text Editor made in React",
55
"keywords": [
66
"collaborative",

packages/plugin-character-pair-decorator/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 8.0.37
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`fae7074`](https://github.com/portabletext/editor/commit/fae7074fb1617a7da35bb22a1a18e473ce1cc0b9), [`1676271`](https://github.com/portabletext/editor/commit/16762713632e5fe66e6a58f9214cc9ccd89e6f31), [`6592c0d`](https://github.com/portabletext/editor/commit/6592c0d82742c28bd2f4f27f78997456653bd8c8)]:
8+
- @portabletext/editor@7.10.9
9+
- @portabletext/plugin-input-rule@6.0.6
10+
311
## 8.0.36
412

513
### Patch Changes

packages/plugin-character-pair-decorator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@portabletext/plugin-character-pair-decorator",
3-
"version": "8.0.36",
3+
"version": "8.0.37",
44
"description": "Automatically match a pair of characters and decorate the text in between",
55
"keywords": [
66
"behaviors",

packages/plugin-dnd/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @portabletext/plugin-dnd
22

3+
## 1.0.21
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`fae7074`](https://github.com/portabletext/editor/commit/fae7074fb1617a7da35bb22a1a18e473ce1cc0b9), [`1676271`](https://github.com/portabletext/editor/commit/16762713632e5fe66e6a58f9214cc9ccd89e6f31), [`6592c0d`](https://github.com/portabletext/editor/commit/6592c0d82742c28bd2f4f27f78997456653bd8c8)]:
8+
- @portabletext/editor@7.10.9
9+
310
## 1.0.20
411

512
### Patch Changes

0 commit comments

Comments
 (0)