Tweak comments, benchmarking, types, and code.#330
Merged
minjoonkim merged 1 commit intovariant-canvasfrom Apr 27, 2026
Merged
Conversation
220b691 to
4399568
Compare
minjoonkim
approved these changes
Apr 27, 2026
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.
Small changes, a benchmarking convenience, and a doc tweak.
Fix
mousemoveno longer dispatchesmouseover/mouseouton every pixel — only on actual enter/leave transitions. Adds 5 regression tests covering the transition cases.Benchmark / dev server
web-dev-server.config.mjsresolves@nightingale-elements/*to each package'ssrc/index.tsand transpiles TS on the fly, sodev/benchmarks/*.htmlruns without ayarn build.yarn benchmark:variation-canvasscript opens the benchmark page directly.NightingaleVariationCanvas#whenDrawn()lets the benchmark await actual draw completion instead of guessing with double-RAF.Polish
MAX_HIT_RADIUSwarns when a variant exceeds the hit-test cap.pointer-events: noneon the background canvas (defense in depth).extends withCanvas(NightingaleVariation)line capturing the migration cost when SVG is removed.as unknown as Parameters<typeof createEvent>["1"]casts —VariationDatumis structurally compatible.getVariantEndfallback as a second parity gap.Type re-export tweak
packages/nightingale-variation/src/index.tsusesexport type { … }for the existing type re-exports. Same public API, but per-file transpilers (incl. the new dev server) now drop them at JS-emit time so the browser doesn't try to bind nonexistent runtime exports.