Skip to content

Version Packages#2885

Merged
christianhg merged 1 commit into
mainfrom
changeset-release/main
Jul 6, 2026
Merged

Version Packages#2885
christianhg merged 1 commit into
mainfrom
changeset-release/main

Conversation

@ecoscript

@ecoscript ecoscript Bot commented Jul 1, 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 main, this PR will be updated.

Releases

@portabletext/editor@7.10.0

Minor Changes

  • #2897 cbdf301 Thanks @christianhg! - feat: add editor.dom.getPointAtCoordinates

    Pass viewport coordinates (for example a pointer event's clientX/clientY) and get back where a click at those coordinates would place the caret, as an editor selection point, or null when the coordinates don't hit the editor's content:

    const point = editor.dom.getPointAtCoordinates({
      x: event.clientX,
      y: event.clientY,
    })
    // {path: [{_key: 'b1'}, 'children', {_key: 's1'}], offset: 3}

    It's the counterpart of editor.dom.getSelectionRect: that one turns a selection into pixels, this one turns pixels back into a point. Behavior guards and actions get it on their dom argument.

  • #2902 ebff16b Thanks @christianhg! - feat: add getContainer traversal util

Patch Changes

  • #2907 067d3e8 Thanks @christianhg! - fix: push the canonical caret back when the browser parks it on an element

    Clicking the whitespace around a container (a table's gutter, the editable's padding) could leave the blinking caret rendered in that whitespace, a position the document model cannot express, even though the editor's selection pointed at real content. The selection sync now pushes the canonical DOM range back whenever the browser parks a collapsed caret on an element, so the visible caret always sits where the selection actually is.

  • #2884 0b82b78 Thanks @christianhg! - fix: scope editor.dom.getSelectionRect to the editor

    editor.dom.getSelectionRect now returns the rect of the passed snapshot's selection. Previously, when focus sat outside the editor or another Portable Text editor was mounted on the page, it could return the rect of an unrelated element.

  • #2912 f42372f Thanks @christianhg! - fix: implement editor-owned select-all

    Cmd+A/Ctrl+A previously relied on the browser's native select-all, which
    chromium silently collapses whenever a non-editable element sits at either
    content edge of the editor. Any document starting or ending with a block
    object, and any table-shaped container render with selection chrome, made
    select-all a no-op. The editor now handles the shortcut itself and selects
    the full document range, deterministically across browsers and custom
    renders. The behavior is registered alongside the other default keyboard
    shortcuts and can be overridden like any other.

  • #2894 ebb41dc Thanks @christianhg! - fix: resolve getSibling when blockIndexMap misses or disagrees with the tree

    getSibling previously returned undefined for siblings the tree
    plainly has when the anchor's path was absent from the block-index
    map, and could return the wrong sibling when the map was stale. It now
    verifies the mapped position against the tree and falls back to a
    linear scan, matching getNode and getChildren. Paths addressing
    the anchor by numeric index now resolve instead of returning
    undefined.

  • #2918 2f2d6e9 Thanks @christianhg! - fix: sync the selection in read-only editors

    Selections made in a read-only editor never reached the editor's model:
    the selection sync bailed unless the editable was the document's active
    element, which a read-only editable never is. Consumers saw a frozen
    selection (stale selection-derived UI stuck on screen after switching to
    read-only) and copying selected content put nothing on the clipboard
    since serialize read an outdated selection. The model now tracks the
    selection in read-only editors, so selection-derived rendering and copy
    work; editing remains blocked as before.

  • #2914 98f8340 Thanks @christianhg! - fix(perf): seek to the range's boundaries in range-bounded traversal

    Toggling a decorator or annotation no longer slows down with the
    selection's position in the document. Range-bounded node traversal
    previously walked from the document's first block to the selection;
    it now jumps directly to the blocks the range touches. Toggling bold
    on one word at the end of an 8,000-block document drops from ~10ms to
    ~3ms.

  • #2900 2831cd9 Thanks @christianhg! - fix(perf): notify render selectors only when their inputs can have changed

    Typing and moving the caret in large documents no longer pay a cost
    proportional to the block count. Previously every editor change
    re-ran an internal selector for every rendered block and span; in a
    document with thousands of blocks this made each keystroke and caret
    move noticeably sluggish. Rendered output is unchanged.

  • #2902 5dc3030 Thanks @christianhg! - fix: repair an empty container when select resolves onto it

    A behavior that removes every block inside an editable container child (like the table plugin's rectangle clear on a cell) and then selects it used to leave the selection parked on the container itself, since the replacement empty block only gets minted when normalization runs later. Typing in that state silently dropped the first character. The select operation now repairs the container the way normalization would and resolves again, so the caret lands inside the repaired container and typing works immediately.

  • #2898 f242007 Thanks @christianhg! - fix: keep equivalent DOM selections intact during selection validation

    Sweeping a text selection across table cells could log "DOM range out of sync, validating selection" and collapse the selection mid-drag. The validator now recognizes when the browser's selection is an equivalent representation of the editor's selection and leaves it alone instead of rewriting it.

  • #2893 70c90d1 Thanks @christianhg! - fix(perf): resolve the unset selection fallback's nearest spans without a document scan

    Backspacing through empty blocks, and any other edit that removes the
    node the selection sits in, no longer slows down with document size.
    Previously each such removal scanned the document from the start to
    find the nearest span; in large documents this made deleting empty
    lines feel sluggish (~267ms per backspace at 8,000 blocks, now ~20ms).

    One narrow behavioral fix rides along: when the removed node was
    addressed by a numeric path, the fallback previously moved the
    selection to the document's first span; it now moves it to the actual
    nearest span.

  • Updated dependencies [a570ace]:

    • @portabletext/markdown@1.4.3

@portabletext/markdown@1.4.3

Patch Changes

  • #2887 a570ace Thanks @christianhg! - fix: honor table headerRows: 0 in Markdown serialization

    portableTextToMarkdown now respects a table's headerRows field. A table with headerRows: 0 serializes with an empty Markdown header row and every row in the body, instead of silently promoting the first row to the header. markdownToPortableText reads an all-empty header row back as headerRows: 0 (dropping the empty header), so a headerless table round-trips. Tables with headerRows of 1 or more are unchanged, the first row is the header; because GFM allows a single header row, values above 1 still flatten to one header on export while the extra rows stay on the Portable Text side.

@portabletext/plugin-character-pair-decorator@8.0.27

Patch Changes

@portabletext/plugin-dnd@1.0.12

Patch Changes

@portabletext/plugin-emoji-picker@7.0.27

Patch Changes

@portabletext/plugin-input-rule@5.0.27

Patch Changes

@portabletext/plugin-list-index@1.0.12

Patch Changes

@portabletext/plugin-markdown-shortcuts@8.0.27

Patch Changes

@portabletext/plugin-one-line@7.0.27

Patch Changes

@portabletext/plugin-paste-link@4.0.27

Patch Changes

@portabletext/plugin-sdk-value@7.0.27

Patch Changes

@portabletext/plugin-typeahead-picker@6.0.27

Patch Changes

@portabletext/plugin-typography@8.0.27

Patch Changes

@portabletext/toolbar@8.0.27

Patch Changes

@portabletext/plugin-table@0.0.23

Patch Changes

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
portable-text-editor-documentation Ready Ready Preview, Comment Jul 6, 2026 10:32am
portable-text-example-basic Ready Ready Preview, Comment Jul 6, 2026 10:32am
portable-text-playground Ready Ready Preview, Comment Jul 6, 2026 10:32am

Request Review

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Stats — @portabletext/editor

Compared against main (2f2d6e9f)

@portabletext/editor

Metric Value vs main (2f2d6e9)
Internal (raw) 801.1 KB -
Internal (gzip) 153.2 KB -
Bundled (raw) 1.41 MB -
Bundled (gzip) 317.4 KB -
Import time 97ms +1ms, +1.4%

@portabletext/editor/behaviors

Metric Value vs main (2f2d6e9)
Internal (raw) 467 B -
Internal (gzip) 207 B -
Bundled (raw) 424 B -
Bundled (gzip) 171 B -
Import time 2ms -0ms, -2.8%

@portabletext/editor/plugins

Metric Value vs main (2f2d6e9)
Internal (raw) 2.7 KB -
Internal (gzip) 894 B -
Bundled (raw) 2.5 KB -
Bundled (gzip) 827 B -
Import time 7ms -0ms, -0.4%

@portabletext/editor/selectors

Metric Value vs main (2f2d6e9)
Internal (raw) 81.2 KB -
Internal (gzip) 14.9 KB -
Bundled (raw) 76.7 KB -
Bundled (gzip) 13.8 KB -
Import time 8ms -0ms, -1.1%

@portabletext/editor/traversal

Metric Value vs main (2f2d6e9)
Internal (raw) 28.0 KB -
Internal (gzip) 5.6 KB -
Bundled (raw) 27.9 KB -
Bundled (gzip) 5.5 KB -
Import time 6ms -0ms, -0.8%

@portabletext/editor/utils

Metric Value vs main (2f2d6e9)
Internal (raw) 29.7 KB -
Internal (gzip) 6.2 KB -
Bundled (raw) 27.1 KB -
Bundled (gzip) 5.8 KB -
Import time 6ms +0ms, +0.3%

🗺️ . · ./behaviors · ./plugins · ./selectors · ./traversal · ./utils · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

📦 Bundle Stats — @portabletext/markdown

Compared against main (2f2d6e9f)

Metric Value vs main (2f2d6e9)
Internal (raw) 53.8 KB -
Internal (gzip) 9.8 KB -
Bundled (raw) 348.9 KB -
Bundled (gzip) 96.3 KB -
Import time 37ms -2ms, -5.6%

🗺️ View treemap · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from 58a7a3c to f362087 Compare July 1, 2026 11:42
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from f362087 to fe68b84 Compare July 1, 2026 12:31
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from fe68b84 to 23ea976 Compare July 2, 2026 06:00
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from 23ea976 to 338bba4 Compare July 2, 2026 07:36
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from 338bba4 to 0684816 Compare July 2, 2026 07:49
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from 0684816 to 84a3dde Compare July 2, 2026 08:05
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from 84a3dde to 1a1295b Compare July 2, 2026 08:11
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from 27cde07 to 147fae5 Compare July 2, 2026 10:23
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from 147fae5 to a638f36 Compare July 2, 2026 16:56
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from a638f36 to b116aad Compare July 3, 2026 08:45
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from b116aad to 63b5e28 Compare July 3, 2026 09:25
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from 63b5e28 to 7be8c77 Compare July 3, 2026 09:53
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from 7be8c77 to 06a2bd4 Compare July 3, 2026 11:07
@ecoscript ecoscript Bot force-pushed the changeset-release/main branch from 06a2bd4 to 6119538 Compare July 3, 2026 11:10
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