Attributed editing: rich-textarea + text_attr (refs #413) - #414
Open
alextingiris wants to merge 2 commits into
Open
Attributed editing: rich-textarea + text_attr (refs #413)#414alextingiris wants to merge 2 commits into
alextingiris wants to merge 2 commits into
Conversation
TextBuffer stays the byte SoT; parallel style runs map through edits and paint via TextSpan. Expose <rich-textarea>, @native-sdk/core/text-attr, and a dogfood example. Refs vercel-labs#413. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@alextingiris is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
| end = end - del_len + inserted_len; | ||
| } else { | ||
| // overlaps deleted range | ||
| if (start < del_start) { |
Carry StyleRuns through styles= into glyph paint, register text-attr/text-doc SDK modules for subset builds, and ship a rich-document example with split/merge. Co-authored-by: Cursor <cursoragent@cursor.com>
| text_color; | ||
| const baseline_y = origin.y - scroll_y + run.baseline; | ||
| const origin_pt = pixelSnapTextPoint(tokens, geometry.PointF.init(origin.x + run.x, baseline_y)); | ||
| const slot: ObjectId = 40 + @as(ObjectId, @intCast(@min(ordinal, 200))); |
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.
Summary
TextBuffer+ parallel style runs (text_attr.zig/@native-sdk/core/text-attr)<rich-textarea>(element code 71) stampsWidgetRuntimeFlags.rich_editorexamples/rich-textarea+ skill-data notestext_doc.zigfor a later multi-block milestoneDesign discussion: #413
Dogfooded in Tonic desktop via
NATIVE_SDK_PATH+TONIC_NATIVE_RICH_EDITOR=1(Source + Bold/Italic/Strike + GFM preview; Lexical remains full-GFM).Test plan
zig test src/primitives/canvas/ui_schema_tests.zig(pins updated for element 71)native checkwithNATIVE_SDK_PATH(subset checker clean)scripts/gate.sh faston this branch (local Zig 0.16; unsigned commit — signing not configured on this machine)native run examples/rich-textarea— type, select, Bold/Italic, undo textMade with Cursor