Version Packages#2885
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📦 Bundle Stats —
|
| 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.
58a7a3c to
f362087
Compare
f362087 to
fe68b84
Compare
fe68b84 to
23ea976
Compare
23ea976 to
338bba4
Compare
338bba4 to
0684816
Compare
0684816 to
84a3dde
Compare
84a3dde to
1a1295b
Compare
27cde07 to
147fae5
Compare
147fae5 to
a638f36
Compare
a638f36 to
b116aad
Compare
b116aad to
63b5e28
Compare
63b5e28 to
7be8c77
Compare
7be8c77 to
06a2bd4
Compare
06a2bd4 to
6119538
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
cbdf301Thanks @christianhg! - feat: addeditor.dom.getPointAtCoordinatesPass 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, ornullwhen the coordinates don't hit the editor's content: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 theirdomargument.#2902
ebff16bThanks @christianhg! - feat: addgetContainertraversal utilPatch Changes
#2907
067d3e8Thanks @christianhg! - fix: push the canonical caret back when the browser parks it on an elementClicking 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
0b82b78Thanks @christianhg! - fix: scopeeditor.dom.getSelectionRectto the editoreditor.dom.getSelectionRectnow 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
f42372fThanks @christianhg! - fix: implement editor-owned select-allCmd+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
ebb41dcThanks @christianhg! - fix: resolvegetSiblingwhenblockIndexMapmisses or disagrees with the treegetSiblingpreviously returnedundefinedfor siblings the treeplainly 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
getNodeandgetChildren. Paths addressingthe anchor by numeric index now resolve instead of returning
undefined.#2918
2f2d6e9Thanks @christianhg! - fix: sync the selection in read-only editorsSelections 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
serializeread an outdated selection. The model now tracks theselection in read-only editors, so selection-derived rendering and copy
work; editing remains blocked as before.
#2914
98f8340Thanks @christianhg! - fix(perf): seek to the range's boundaries in range-bounded traversalToggling 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
2831cd9Thanks @christianhg! - fix(perf): notify render selectors only when their inputs can have changedTyping 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
5dc3030Thanks @christianhg! - fix: repair an empty container whenselectresolves onto itA 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
selectoperation now repairs the container the way normalization would and resolves again, so the caret lands inside the repaired container and typing works immediately.#2898
f242007Thanks @christianhg! - fix: keep equivalent DOM selections intact during selection validationSweeping 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
70c90d1Thanks @christianhg! - fix(perf): resolve theunsetselection fallback's nearest spans without a document scanBackspacing 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
Patch Changes
#2887
a570aceThanks @christianhg! - fix: honor tableheaderRows: 0in Markdown serializationportableTextToMarkdownnow respects a table'sheaderRowsfield. A table withheaderRows: 0serializes with an empty Markdown header row and every row in the body, instead of silently promoting the first row to the header.markdownToPortableTextreads an all-empty header row back asheaderRows: 0(dropping the empty header), so a headerless table round-trips. Tables withheaderRowsof 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
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-dnd@1.0.12
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-emoji-picker@7.0.27
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-input-rule@5.0.27
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-list-index@1.0.12
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-markdown-shortcuts@8.0.27
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-one-line@7.0.27
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-paste-link@4.0.27
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-sdk-value@7.0.27
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-typeahead-picker@6.0.27
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-typography@8.0.27
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/toolbar@8.0.27
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]:@portabletext/plugin-table@0.0.23
Patch Changes
067d3e8,cbdf301,0b82b78,f42372f,ebff16b,ebb41dc,2f2d6e9,98f8340,2831cd9,5dc3030,f242007,70c90d1]: