Files
explore/pages
zeekay e02ea37851 fix(_app): wrap in GuiProvider + supply theme tokens for useThemeState
After shipping the first createGui-only patch (7784eb5), the runtime error
changed from "Err0" → "Missing theme." The root cause:
useThemeState in @hanzogui/web throws if ThemeStateContext.Provider
isn't above the component (parentId === ""). Calling createGui populates
the global config, but the tree must also be wrapped in <GuiProvider>
which materialises the ThemeProvider + GuiRoot + ComponentContext chain.

Three deltas in this commit:

  1. createGui now receives explicit light/dark themes and color/space/
     size/radius/zIndex tokens. Empty {} no longer satisfies getThemes
     Deduped + downstream theme spreads. The tokens are minimal but
     non-empty; @luxfi/ui uses Tailwind for styling, so we only need
     hanzogui's internals to accept the config.
  2. Top of render tree now wraps everything in <GuiProvider config>.
     GuiProvider renders ComponentContext → ThemeProvider → GuiRoot
     (isRootRoot=true), giving useThemeState the parent context it
     requires.
  3. createGui call moved out of the typeof-window block — server and
     client both need it (SSR also instantiates @luxfi/ui frames at
     module load, even though component render is gated by hydration).
2026-06-10 17:36:54 -07:00
..
2025-09-05 15:53:00 +02:00
2025-10-17 14:58:12 +02:00
2025-12-18 16:02:53 +01:00
2025-09-23 20:41:43 +02:00