Closed
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
1867dbd to
27f29bd
Compare
27f29bd to
f1f25b9
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.
What changed
Removes the
valuewrapper and__inlineflag from block objects and inline objects in the Slate tree. PT properties now live directly on Slate nodes.The void-child span stays in Slate's tree for cursor behavior — that's a Slate rendering concern, not a data concern. Everything else is pure PT.
Why
Foundation for container (nested block) support. With the tree PT-native, a container block is just an element with real
children— no special wrapping, no void model to work around.How
types/slate.ts—VoidElementreplaced withObjectElement(novalue, no__inline, just[key: string]: unknown)values.ts—toSlateBlock/fromSlateBlockspread PT properties directly instead of wrapping invalueapply-operation-to-portable-text.ts— removed allvalue/__inlineunwrappingoperation-to-patches.ts— properties read directly from nodes, not from.valueapplyPatch.ts— patches applied directly to nodes, not to.valueslate-plugin.schema.ts—isInlineuses schema only, no__inlinecheckrender.element.tsx/render.inline-object.tsx— schema-based inline detection, direct property access18 files changed, 151 insertions, 339 deletions (net -188 lines). 317/317 unit tests pass.