Skip to content

feat(icons): add set-icons, the icon registry as its own package - #110

Merged
monospaced merged 6 commits into
mainfrom
claude/icons-package
Oct 8, 2026
Merged

monospaced merged 6 commits into
mainfrom
claude/icons-package

Conversation

@monospaced

@monospaced monospaced commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

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)

  • The two authoring lists (icons-tdesign.ts, icons-custom.ts), the generator and the generated registry move here. Plain tsc build, ESM + declarations.
  • The registry now emits the shipped names as a literal tuple, so IconName types as a union and ICON_NODES is Record<IconName, IconNode[]>.
  • icons:verify regenerates and fails on drift, like the system, tokens and react guards.
  • tdesign-icons-svg is a dev dependency here, used only at generation time.

Core

  • Depends on the new package. SET_ICON_NAMES and SetIconName are re-exported unchanged, so core's public API does not move.
  • The registry stays inlined in core's bundle, so core's dist remains self-contained: the documentation site serves it straight to the browser, where a bare import could not resolve.
  • A prebuild hook builds the icons package first (mirroring react's), so pnpm run core:build works on a clean checkout wherever it is invoked, including the Netlify deploy preview.
  • tdesign-icons-svg leaves core's runtime dependencies; only the generator ever used it.

Repo plumbing

  • Root scripts (icons:build / generate / typecheck / verify), an icons CI job, and icons:build ahead of core in the core, react, Storybook and documentation builds, since core's types resolve from the package's output.
  • icons commit 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

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
@netlify

netlify Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for setds ready!

Name Link
🔨 Latest commit 8f9aad0
🔍 Latest deploy log https://app.netlify.com/projects/setds/deploys/6ac7882601662c0008e3066a
😎 Deploy Preview https://deploy-preview-110--setds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

claude added 5 commits October 8, 2026 10:03
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
@monospaced
monospaced merged commit ac98459 into main Oct 8, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants