Repository navigation
Conversation
Explicit backend injection (setShapePlatform) plus per-render drawShape opts (Path2D class, pre-decoded images map, pattern cache) so non-browser renderers reuse the engine without touching globals; shared paint-order helper used by the editor; new exports and types. No behavior change, no new dependencies.
|
@calumk is attempting to deploy a commit to the naman's projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Fixes #37.
Small, dependency-free, behavior-preserving seam so out-of-tree renderers (see #36) can reuse the engine instead of forking it:
setShapePlatform({ Path2D, measureCtx, tileCanvas })— explicit backend injection; the browser never calls it, globals are never patched.drawShapeper-render opts:Path2Dclass, pre-decodedimagesmap (bypasses the browser loader — no placeholders),patternCachemap. No shared per-render state.sortShapesForRender()now backingEditor.shapesSorted()(identical behavior), plustextLayout/noteLayout/boundsUnionexports and full type declarations.platform.test.jsproves the injection paths with recording fakes.Note: overlaps #31's comparator — if that merges first, the helper takes the layered version on rebase (one-line change, test updated alongside).