Skip to content

Stage 6: Native (@reactive/silk-native) - #15

Merged
ntucker merged 4 commits into
mainfrom
stage-6-silk-native
Jul 26, 2026
Merged

Stage 6: Native (@reactive/silk-native)#15
ntucker merged 4 commits into
mainfrom
stage-6-silk-native

Conversation

@ntucker

@ntucker ntucker commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Introduce @reactive/silk-native: context ThemeProvider / SilkProvider, recipe mappers (no CSS vars), and exemplar components Box / Stack / Inline / Text / Button sharing the same Theme object and recipe contracts as web.
  • Replace the Stage 1 apps/native-spike with apps/native-example (Expo) exit demo; add RNW Storybook stories, Native guide MDX, and a NativeShell docs fixture with a tested state matrix.
  • Extend packed-consumer-check and hard nativeIsolatedGzip perf budgets; document native theme delivery / escape hatches in ARCHITECTURE and API_POLICY. silk-core stays free of React Native views.

Test plan

  • yarn workspace @reactive/silk-core build && yarn workspace @reactive/silk-native build
  • yarn workspace @reactive/silk-native test (mappers, conformance, RNW render/a11y)
  • yarn workspace @reactive/silk-native-example test and export:web (Metro consumability)
  • yarn workspace @reactive/silk-docs test (includes NativeShell fixture)
  • yarn test:packed and yarn test:perf
  • Spot-check Storybook Native Components + Fixtures/NativeShell under light/dark/compact toolbar globals

Made with Cursor

Graduate the native spike into a publishable package with context theming,
recipe-driven Box/Stack/Inline/Text/Button, Expo example, RNW docs fixture,
and packaging/perf gates — without teaching silk-core about React Native.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9535b16

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@reactive/silk-native Minor
@reactive/silk-docs Patch
@reactive/silk-native-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Opacity on the solid accent button blended the fill with the canvas and
dropped white label contrast below 4.5:1; demo a layout-only style hatch instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/silk-native/src/styles/mapStyles.ts
Removes states the code could never reach rather than restyling working code.
ThemeProviderInner's appearance prop claimed `string | null | undefined`, but
RN's useColorScheme only ever returns ColorSchemeName, so both nullable states
were fictional; Button's density chain ended in a recipe fallback the required
context density preempts; buttonColors set an identical borderWidth in all five
branches and declared a backgroundColor it never left undefined; RnViewStyle
exposed opacity and maxWidth no mapper emits.

Caches resolveNativeFontFamily by stack — re-splitting a 106-char CSS font list
dominated mapTextStyle. Hoisting default themes to module scope was tried and
reverted: evaluating createTheme at import time defeats tree-shaking and blew
every native gzip budget (Box 943 -> 3213 B against a 1300 B ceiling).

Derives NativeShellState from an exported states array so the story and test
matrices cannot drift, collapses the two fixture tsconfigs in
packed-consumer-check into one helper, and replaces its substring scan for
workspace: ranges with a per-dependency check that names the offender.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b009f6c. Configure here.

Comment thread packages/silk-native/src/styles/mapStyles.ts
mapStackStyle relied on React Native's implicit solid default while
mapButtonStyle sets borderStyle outright; spelling it out keeps the two
mappers consistent and matches the web rail's `1px solid` shorthand.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ntucker
ntucker merged commit 0789bd0 into main Jul 26, 2026
3 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.

1 participant