1 Commits
Author SHA1 Message Date
zeekay f1820f6c02 phase3-r2: wire @hanzo/gui as a runtime dependency
The SDK now ships with @hanzo/gui + @hanzogui/{core,helpers,constants,
themes,animate,animate-presence,button,input} as direct dependencies
(moved out of the optional peerDependencies block). Phase 3 R2 starts
swapping native primitives onto Tamagui-based @hanzo/gui components,
so consumers no longer have to install those packages themselves.

Three plumbing changes make this actually bundle in a consumer:

  1. scripts/patch-hanzogui-exports.cjs (vendored from lux/exchange):
     the published @hanzo/[email protected] + @hanzogui/*@7.0.0 packages ship
     without a populated dist/, so their package.json main/module/exports
     point at folders that do not exist. The patch rewrites those entries
     to point at the included src/ at install time. Root postinstall hook
     runs it deterministically on every pnpm install.

  2. app/bridge/vite.config.ts: alias react-native -> react-native-web,
     dedupe react/react-dom/react-native-web, set TAMAGUI_TARGET=web and
     __DEV__=false. Minimum viable Tamagui wiring (mirrors the wiring
     lux/exchange ships in a much larger config).

  3. app/bridge/package.json: add react-native-web@^0.19.0 dependency
     so the alias above resolves.

Result: pnpm install in a fresh checkout produces a working build with
zero manual setup. `pnpm build` in app/bridge succeeds.
2026-05-21 16:09:47 -07:00