feat: NucleusIcons#25
Open
Priva28 wants to merge 4 commits intonucleusfontsfrom
Open
Conversation
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
Adds icon tokens to nucleus. Source SVGs live in
tokens/definitions/icons/{outline,regular,solid}(140-ish per variant, 141 unique icons total — most ship in all three variants, a handful are variant-specific). The build pipeline now emits per-platform icon outputs alongside the existing colors and fonts.Almost all of it is auto-generated icon assets. Per icon, per variant we emit:
.imagesetdirectory withContents.json+ the SVG (≈ 832 files)build/is tracked)iOS
NucleusIconsSPM library withResources/Icons.xcassets(one.imagesetper icon × variant, all template-rendered with vector preservation).NucleusIconis aString-rawValue enum where the raw value is the kebab-case icon name..image(_:)and.uiImage(_:)return a SwiftUIImage?/UIImage?for a givenVariant, returningnilif the icon doesn't ship in that variant.availableVariantsexposes which variants exist per case.Android
android/nucleus/src/main/res/drawable/with anucleus_icon_prefix.NucleusIcons.ktis anenum classwith nullable@DrawableResfields per variant, plusdrawableRes(variant)and@Composable painter(variant). We tint at the call site (Icon(painter, tint = …)) — drawables ship with a black placeholder fill.tokens/formats/icons-android.ts. Most icons are pure paths, butgift.svguses<rect>/<circle>/matrix transforms, so the converter handles those by flattening to path data.Web
build/web/icons/{name}-{variant}.svg.build/web/nucleus-icons.jsonmanifest indexed by icon name with both file paths and inlined SVG strings per variant.package.jsontemplate updated to shipicons/*.