Repository navigation
fix(canvas): draw the kind icons from lucide's public exports - #93
Merged
Merged
Conversation
The kind icons were read from lucide-react's per-icon modules through their internal __iconNode export. Newer lucide-react builds replaced it with an __iconData object, so every icon came back undefined and the canvas threw on first paint, which is why the lucide-react bumps keep failing. The framework-free lucide package exports the same [tag, attrs] lists by name, so the icons now come from there. It is pinned to the lucide-react version so both draw the same icon set.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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.
What this changes
The node kind icons now come from the
lucidepackage's named exports instead of lucide-react's internal per-icon modules. Unblocks #92.Why
nodeVisuals.tsimported__iconNodefrom 33 files underlucide-react/dist/esm/icons/. That isn't public API, and newer lucide-react builds replaced it with an__iconDataobject, so every icon came back undefined and the canvas threw on first paint (KIND_ICON[kind].map). That's why the lucide-react bumps keep failing.lucideexports the same[tag, attrs]lists by name. It's pinned to 1.41.0 to match lucide-react, and all 33 icons are identical to what ships today apart from the Reactkeyattributes, so the renderers key by index now. Thelucide-icons.d.tsshim isn't needed anymore.Verification
lucide@1.41.0againstlucide-react@1.41.0: same primitivesoxlintclean on the changed files