Files
bridge/pkg
zeekay 73fa005ef9 pkg/bridge: bootstrap @hanzo/gui runtime + provider in mountBridge
Phase 3 R2 swapped <button>/<input> primitives onto @hanzo/gui's Button
and Input components in SwapForm, WalletConnect, and AssetInput, but the
runtime bootstrap was never added. The library's primitives read from
globalThis.__guiConfig at render time and throw Error("Err0") when null,
and the JSX tree also needs a GuiProvider for theme context — without
both, the SDK mounts to a blank page.

Wire both inside the SDK so consumers don't need to know about them:

  - mount.ts: call createGui(getDefaultGuiConfig()) before React render,
    idempotent (skips when globalThis.__guiConfig already populated).
  - Bridge.tsx: wrap <BridgeApp /> in <GuiProvider defaultTheme="dark">.

@hanzogui/config-default added as a direct dependency (was transitive
only). Imports cast to unknown to bridge the source/types mismatch
introduced by the monorepo's postinstall rename of upstream
createHanzogui/HanzoguiProvider → createGui/GuiProvider on .ts files
but not the shipped .d.ts.
2026-05-21 17:00:40 -07:00
..