Skip to content

feat(tokens): add React Native output - #108

Open
monospaced wants to merge 12 commits into
mainfrom
claude/dreamy-goldberg-46ao80
Open

monospaced wants to merge 12 commits into
mainfrom
claude/dreamy-goldberg-46ao80

Conversation

@monospaced

Copy link
Copy Markdown
Owner

No description provided.

@netlify

netlify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for setds ready!

Name Link
🔨 Latest commit debf59b
🔍 Latest deploy log https://app.netlify.com/projects/setds/deploys/6ac79350f5da740008bca2ed
😎 Deploy Preview https://deploy-preview-108--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.

@monospaced
monospaced force-pushed the claude/dreamy-goldberg-46ao80 branch 4 times, most recently from c954ea2 to acb586d Compare October 7, 2026 20:37
@monospaced monospaced changed the title Claude/dreamy goldberg 46ao80 feat(tokens): add React Native output Oct 7, 2026
@monospaced
monospaced force-pushed the claude/dreamy-goldberg-46ao80 branch 17 times, most recently from beda187 to 4057c1c Compare October 8, 2026 09:48
claude added 7 commits October 8, 2026 12:51
Adds a Now entry to the roadmap scoping a React Native exploration in
three gated phases (token emit target, framework adapter, Expo demo app)
and records the architectural issues that block treating it as a second
adapter emitter: core's IR is HTML, styling lives in CSS not the SPEC,
modifier axes are media/selector driven, raw-HTML icons, DOM-bound custom
elements, ARIA vs RN a11y, and non-flex layout primitives.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VE8oEyyQB8YCVGrzDmkNpC
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VE8oEyyQB8YCVGrzDmkNpC
Records the planning decision that core and its SPEC are web-only: a
native library, if built, is a sibling that depends on set-tokens and
references the SPEC rather than generating from it. Keeps Phase 1 as
scoped and collapses the adapter and demo phases into one unscoped
sibling-library item.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VE8oEyyQB8YCVGrzDmkNpC
Content-theme becomes a provider concern rather than an emitted context,
and a Later item proposes retiring the inverse surfaces from the web
contract.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VE8oEyyQB8YCVGrzDmkNpC
Adds a second Style Dictionary platform to the system pipeline that emits
a typed, values-only module per brand at
@monospaced/set-tokens/react-native/<brand>, with base tokens merged in.

A new stage, prepare-react-native-output.mjs, resolves every context
permutation and partitions public tokens by the axis each one varies on
into static / size.<context> / theme.<theme>.<surface>. Context
enumeration and varying-axis classification move out of the JSON stage
into helpers/contexts.mjs so both consumer stages share them; the JSON
output is byte-identical.

style-dictionary.react-native.config.mjs owns value conversion (px to
points, ms to number, DTCG color to string, shadow to shadow* plus
elevation, typography to a text style with absolute lineHeight,
fontFamily to first family) as one total transform, uses SD's built-in
javascript/esm for the module, and a custom declarations format that
carries $description as JSDoc. Resolvers opt in with
$defs.build.targets.reactNative; forcedColors and the content-theme
contexts are not emitted. Only DTCG-typed tokens are emitted.

tokens:validate now checks the module shape. Package exports, READMEs,
the roadmap and a changeset are included.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VE8oEyyQB8YCVGrzDmkNpC
claude added 5 commits October 8, 2026 12:51
React Native's fontWeight accepts only hundreds, so Set's variable-font
weights (433, 466, 566) could neither type-check nor apply. The React
Native transform now snaps weights to the nearest hundred, and the
declarations format types every primitive leaf literally (24, "#007c7c",
400) so values are assignable where RN's own style types demand a
literal. Surfaced while building the first components against the
module; recorded as a Phase 2 follow-up about font packaging.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VE8oEyyQB8YCVGrzDmkNpC
…atar

New sibling library sharing Set's tokens through
@monospaced/set-tokens/react-native/<brand>, with no dependency on core
(ADR-0002). SetProvider resolves the three token partitions for the OS
colour scheme (or a pinned one) and the window width against the brand's
breakpoints; Surface opens a surface context and can pin a scheme for
its contents; useSetTokens exposes the resolved set. Components are typed
against the tokens every brand shares, with literals widened only where
brands differ.

Button mirrors core's appearance, size and tone vocabulary with metrics
and palette derived from the same tokens button.css uses; Avatar renders
image, initials or a tinted shape with core's hashing and initials rules.
Tests run through react-native-web in jsdom and assert behaviour and
accessibility semantics. Stories are included for the Storybook app that
follows.

Repo plumbing: root scripts, CI job, commit scope, changeset group and
public-source regex, eslint globals, gitignore, README table.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VE8oEyyQB8YCVGrzDmkNpC
Storybook for @monospaced/set-react-native rendered in the browser via
@storybook/react-native-web-vite, pinned to the repo's Storybook 10.4.0.
Toolbar globals for brand, colour scheme and surface drive the same
SetProvider and Surface an app would render. The package name is aliased
to its source so stories and preview share one module graph (and one
React context) and the build needs no prior package build. Workspace
glob, root scripts, CI steps, README and changeset group updated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VE8oEyyQB8YCVGrzDmkNpC
The React Native Icon carried its own copy of the icon registry, written
by core's generator alongside core's. Now that the registry is its own
package (#110), Icon imports ICON_NAMES, ICON_NODES and their types from
@monospaced/set-icons, the same data core renders, and the duplicate
generated file and the generator's second output go away.

The package depends on set-icons and externalises it from its bundle, as
with tokens, since Metro resolves it from node_modules. Like core, it
builds icons first (prebuild), and the React Native CI job and storybook
scripts build icons before typechecking. Versions move to 0.20.0 to stay
in lockstep after the release that shipped icons. Docs that described the
registry as generated from core's lists now point at the package.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117EqnKdQh8d3WVMjzGrwYG
@monospaced
monospaced force-pushed the claude/dreamy-goldberg-46ao80 branch from 4057c1c to debf59b Compare October 8, 2026 12:57
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