Repository navigation
feat(icons): add set-icons, the icon registry as its own package - #110
Merged
Merged
Conversation
Set's icons are platform-neutral data: names picked from the TDesign
catalogue plus first-party icons, generated into a typed registry of
geometry that core renders as SVG markup and a native library can draw
with react-native-svg. They lived inside core because core was the only
consumer. This moves the two authoring lists, the generator and the
generated registry to @monospaced/set-icons, modelled on tokens ("as
data"), with the icon names emitted as a literal tuple so IconName types
as a union, and an icons:verify drift guard like the other generated
artifacts.
Core depends on the new package and re-exports SET_ICON_NAMES and
SetIconName unchanged, externalises the registry from its bundle, and
drops tdesign-icons-svg from its runtime dependencies (only the
generator ever used it). Root scripts, CI, commit scopes, the changeset
group and READMEs are updated; core, react, Storybook and documentation
build icons first since core's types resolve from its output.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VE8oEyyQB8YCVGrzDmkNpC
✅ Deploy Preview for setds ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Core's build resolves @monospaced/set-icons from that package's dist, so a bare `pnpm run core:build` (or a prepublishOnly) on a clean checkout failed at the types step. A prebuild hook, mirroring react's, builds icons first so core builds standalone wherever it is invoked. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DEJKfVQMw2PKR5FhDJd4F
The documentation site serves core's dist straight to the browser, where a bare import of @monospaced/set-icons cannot resolve. Core is the only web consumer of the registry, so bundle it as before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DEJKfVQMw2PKR5FhDJd4F
…exist The README, package description and root table named a @monospaced/set-react-native consumer. Only core consumes the registry today; describe the package as platform-neutral data without naming a library that has not been written. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DEJKfVQMw2PKR5FhDJd4F
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DEJKfVQMw2PKR5FhDJd4F
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DEJKfVQMw2PKR5FhDJd4F
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.
Requested by Scott · project thread
Summary
Set's icons are platform-neutral data: names picked from the TDesign catalogue plus first-party icons, generated into a typed registry of geometry. Core renders it as SVG markup; a native library can draw the same geometry with
react-native-svg. The registry lived inside core only because core was its only consumer. This gives it a home of its own, modelled on@monospaced/set-tokens("as data").New:
@monospaced/set-icons(packages/icons)icons-tdesign.ts,icons-custom.ts), the generator and the generated registry move here. Plaintscbuild, ESM + declarations.IconNametypes as a union andICON_NODESisRecord<IconName, IconNode[]>.icons:verifyregenerates and fails on drift, like the system, tokens and react guards.tdesign-icons-svgis a dev dependency here, used only at generation time.Core
SET_ICON_NAMESandSetIconNameare re-exported unchanged, so core's public API does not move.prebuildhook builds the icons package first (mirroring react's), sopnpm run core:buildworks on a clean checkout wherever it is invoked, including the Netlify deploy preview.tdesign-icons-svgleaves core's runtime dependencies; only the generator ever used it.Repo plumbing
icons:build/generate/typecheck/verify), aniconsCI job, andicons:buildahead of core in the core, react, Storybook and documentation builds, since core's types resolve from the package's output.iconscommit scope, changeset group and public-source regex, README tables,.gitignore.Changeset: icons and core as minor.
Verification
icons typecheck, verify and build; core typecheck and tests (2517); react verify and tests (65); core Storybook build; documentation typecheck; lint, stylelint, format. Core's dist confirmed free of bare imports after the inline change.
Groundwork for the React Native exploration branch, which will consume the same registry without depending on core (ADR-0002 there), but it stands on its own.
🤖 Generated with Claude Code
https://claude.ai/code/session_011DEJKfVQMw2PKR5FhDJd4F