<ThemeHost> in @cskn/ui, which runs the theme in a sandbox and draws the page tree it returns.
useThemeSelection(username, options?)
Reads are public; a visitor needs no session. When the host already resolved the theme before the page loaded, the hook starts with that answer and nothing is fetched.{ theme, settings, context? }. null when no theme is chosen, or the chosen theme was withdrawn.Version-pinned bundle path for
ThemeHost. Do not build it yourself: the sandbox checks the bytes against the selection’s hash, and an unpinned URL fails that check as soon as the theme is updated.Whether a theme is expected to paint. Before the real answer arrives, it remembers what this browser saw last time.
The page tree the edge already produced for this exact theme version. Pass it to
ThemeHost to skip the sandbox on first paint.options.appSlug defaults to the current app.
Appearance screen
useThemeGallery() lists the themes published for your app: { themes, isLoading }, each with slug, name, description, image?, version and the token paths the owner may tune. Pair it with selectTheme and @cskn/ui’s ThemeSettings for the tuning controls.
Plain functions
getThemes, getThemeSelection, saveThemeSelection, clearThemeSelection, themeBundleUrl, reportThemeResult.