Skip to content

Version Packages (next) - #3310

Open
ecoscript[bot] wants to merge 1 commit into
nextfrom
changeset-release/next
Open

ecoscript[bot] wants to merge 1 commit into
nextfrom
changeset-release/next

Conversation

@ecoscript

@ecoscript ecoscript Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to next, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

next is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on next.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@portabletext/editor@9.0.0-next.0

Major Changes

  • #3246 e52a9d2 Thanks @christianhg! - fix: emit structural repair patches immediately and make engine normalization the sole repairer

    The editor repairs structural defects in any value passed to it, initial or updated: it generates a _key for a block or child that has none or duplicates a sibling's, and it inserts an empty span into a text block with no children. Until now those repairs stayed in the editor's memory and the fixing patches were only emitted once the user made their first edit. Now they are emitted as soon as the value is applied. The practical consequence: loading a broken document can produce a mutation to persist before any user action.

    • An editable editor that receives a broken value emits the fixing patch events and their mutation right away. A host persisting mutations stores the repaired document immediately instead of at the user's first edit.
    • A read-only editor that receives a broken value emits the patch events right away too, but holds the mutation until the editor becomes editable, because hosts reject writes to read-only documents.
    • If a newer value arrives while a repair mutation is still pending, the outdated repair is discarded, whether the editor is read-only and holding it or editable and simply hasn't flushed it yet: a repair is never mistaken for unsaved edit work, so a host that already fixed the same defect with its own key supersedes ours regardless of which arrives first. When the newer value is broken too, a fresh repair for it is emitted instead. A repair computed against a value that is no longer current is discarded rather than delivered, with two exceptions: a repair whose target block can't yet be identified keeps flushing on its usual schedule instead of risking a silent drop, and a repair overtaken by another client's own patches to the same document is still delivered and converges with the later write, the same as any other concurrent edit. A later value that still shows the exact shape a block was just repaired from is recognized as the host not having caught up yet rather than a fresh defect: no repair is recomputed for it, and a repair already pending for that block is not discarded as superseded.
    • Mutations still held when the editor unmounts are delivered to mutation listeners during unmount. A host that rejects mutations while read-only loses them there, as it did before.
    • A block missing its _key no longer triggers the "invalid value" prompt. It is repaired like the other defects, emitting the same events. The prompt still appears for defects that need a human decision (an unknown _type, a non-object block), and its resolution patches now address the defective block's position instead of possibly addressing the wrong block. A keyless child with such a defect is now named by its position in the prompt too, instead of showing an undefined key.
    • markDefs that no span references are no longer removed when a value enters the editor. They are removed when the user next edits that block.

    InvalidValueResolution.autoResolve is removed. The editor repairs mechanically fixable defects itself on intake, so no resolution is ever auto-resolvable; hosts that branched on the flag can delete that path.

    A mutation event's value now reflects the value the editor holds at the moment the mutation flushes, not the value that was current when its patches were produced. A mutation held read-only and flushed later carries the up-to-date value, not a stale snapshot from before the hold.

@portabletext/plugin-character-pair-decorator@9.0.16-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0
    • @portabletext/plugin-input-rule@7.0.16-next.0

@portabletext/plugin-decorations@1.0.3-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0

@portabletext/plugin-dnd@2.0.17-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0

@portabletext/plugin-emoji-picker@8.0.16-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0
    • @portabletext/plugin-input-rule@7.0.16-next.0

@portabletext/plugin-input-rule@7.0.16-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0

@portabletext/plugin-list-index@2.0.15-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0

@portabletext/plugin-markdown-shortcuts@9.0.16-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0
    • @portabletext/plugin-character-pair-decorator@9.0.16-next.0
    • @portabletext/plugin-input-rule@7.0.16-next.0

@portabletext/plugin-one-line@8.0.15-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0

@portabletext/plugin-paste-link@5.0.15-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0

@portabletext/plugin-sdk-value@8.1.10-next.0

Patch Changes

  • #3246 41c8331 Thanks @christianhg! - fix: don't latch the value-sync machine on patches emitted while read-only

    A read-only editor that receives a structurally invalid value (for example a block missing its _key) repairs it and emits the repair patch immediately. Previously the plugin mistook that repair for an unsaved user edit and stopped applying store updates until it was pushed, which cannot happen while read-only, so the editor stopped receiving remote changes for the rest of the read-only session. It now keeps applying store updates and pushes the repair once the editor becomes editable.

    One additional change: a background sync pass no longer mistakes the still-unpushed repair for the store having drifted and reverts it; the repaired content stays stable until the editor becomes editable and the repair pushes.

    Another additional change: a handful of Behavior events (select, mouse.click, clipboard.copy, and the serialization events) still run their actions while read-only, so a custom Behavior that mutates on one of those is now protected the same way as any other unpushed edit, instead of being mistaken for a held repair and risking reversion by the background sync pass.

    One more additional change: a store update applied while a read-only repair is still held now supersedes it instead of racing it. Previously the held repair could still flush after the newer update, pushing stale content (or, with pushPatches, a stale key) back over it.

  • Updated dependencies [e52a9d2]:

    • @portabletext/editor@9.0.0-next.0

@portabletext/plugin-table@2.0.15-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0

@portabletext/plugin-typeahead-picker@7.0.16-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0
    • @portabletext/plugin-input-rule@7.0.16-next.0

@portabletext/plugin-typography@9.0.16-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0
    • @portabletext/plugin-input-rule@7.0.16-next.0

@portabletext/toolbar@9.0.16-next.0

Patch Changes

  • Updated dependencies [e52a9d2]:
    • @portabletext/editor@9.0.0-next.0

@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
portable-text-editor-documentation Ready Ready Preview Sep 25, 2026 6:39am UTC
portable-text-example-basic Ready Ready Preview Sep 25, 2026 6:39am UTC
portable-text-playground Ready Ready Preview Sep 25, 2026 6:39am UTC

Request Review

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Bundle Stats

✅ No significant changes.

All scenario measurements (7)

🗺️ @portabletext/editor / @portabletext/editor · @portabletext/editor / @portabletext/editor/behaviors · @portabletext/editor / @portabletext/editor/plugins · @portabletext/editor / @portabletext/editor/selectors · @portabletext/editor / @portabletext/editor/traversal · @portabletext/editor / @portabletext/editor/utils · @portabletext/markdown / @portabletext/markdown · Artifacts

Scenario Kind Bundle (raw / gzip) Gzip change Import time Import change
⚪ @portabletext/editor / @portabletext/editor export 1.07 MB / 135.3 KB None 57 ms +1 ms, +1.8%
⚪ @portabletext/editor / @portabletext/editor/behaviors export 4.0 KB / 147 B None 2 ms +0 ms, +6.4%
⚪ @portabletext/editor / @portabletext/editor/plugins export 5.1 KB / 645 B None 6 ms -0 ms, -4.3%
⚪ @portabletext/editor / @portabletext/editor/selectors export 94.7 KB / 9.3 KB None 6 ms -0 ms, -3.5%
⚪ @portabletext/editor / @portabletext/editor/traversal export 42.8 KB / 4.0 KB None 5 ms -0 ms, -0.9%
⚪ @portabletext/editor / @portabletext/editor/utils export 33.8 KB / 4.1 KB None 5 ms +0 ms, +1.7%
⚪ @portabletext/markdown / @portabletext/markdown export 388.2 KB / 61.8 KB None 26 ms +0 ms, +0.2%

Significant means at least 1.0 KB and 1% gzip, or at least 5 ms and 10% import time.

@christianhg christianhg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not to be merged by mistake, so I'm "requesting changes" to mitigate that.

This branch was successfully deployed

3 active deployments
Preview – portable-text-editor-documentation — 8ef56e1b Deployed Sep 25, 2026 by vercel[bot]
Preview – portable-text-playground — 8ef56e1b Deployed Sep 25, 2026 by vercel[bot]
Preview – portable-text-example-basic — 8ef56e1b Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant