From 9d82aea351f9c194806dc66209364c4fec1409f2 Mon Sep 17 00:00:00 2001 From: ankit-thesys Date: Mon, 4 May 2026 14:22:09 +0530 Subject: [PATCH 1/2] fix(react-ui): re-export full ThemeProvider barrel from main entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hand-listed re-export of `./components/ThemeProvider` only surfaced `ThemeProvider`, `createTheme`, the default themes, `swatchTokens`, and a couple of types — `useTheme` and `ThemeContext` were left off. Combined with the `./*` exports map (which compiles each component into a standalone subpath chunk while the main entry inlines its own copy), consumers ended up with two separate `createContext()` calls at runtime: - `` from `@openuidev/react-ui` writes to the main bundle's ThemeContext. - `useTheme` from `@openuidev/react-ui/ThemeProvider` reads the subpath chunk's ThemeContext. Two contexts, never the same instance — `useTheme()` always returned the default value when `` was mounted from the main entry. Caused a real downstream regression in `@thesys/artifact` where `PresentationThemeProvider` reads the ambient mode via `useTheme()`; slides always rendered in light mode regardless of the outer ``. Switching to `export * from "./components/ThemeProvider"` matches the pattern used by every other component on this file, picks up `useTheme` + `ThemeContext` (alongside `ThemeProps` and `ThemeMode` which were previously listed separately below), and is forward- compatible with future ThemeProvider additions. --- packages/react-ui/src/index.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/react-ui/src/index.ts b/packages/react-ui/src/index.ts index 3332aac49..3b5acf053 100644 --- a/packages/react-ui/src/index.ts +++ b/packages/react-ui/src/index.ts @@ -64,16 +64,8 @@ export * from "./components/TagBlock"; export * from "./components/TextArea"; export * from "./components/TextCallout"; export * from "./components/TextContent"; -export { - ThemeProvider, - createTheme, - defaultDarkTheme, - defaultLightTheme, - swatchTokens, - type Theme, -} from "./components/ThemeProvider"; -export type { ThemeProps } from "./components/ThemeProvider/ThemeProvider"; -export type { ThemeMode } from "./components/ThemeProvider/types"; +export * from "./components/ThemeProvider"; + export * from "./components/ToolCall"; export * from "./components/ToolResult"; From 418b5a3447b29dac05cdc96a89a405c3ea465b47 Mon Sep 17 00:00:00 2001 From: ankit-thesys Date: Mon, 4 May 2026 14:24:30 +0530 Subject: [PATCH 2/2] version bump --- packages/react-ui/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-ui/package.json b/packages/react-ui/package.json index 45f2c69ab..eba394ba6 100644 --- a/packages/react-ui/package.json +++ b/packages/react-ui/package.json @@ -2,7 +2,7 @@ "type": "module", "name": "@openuidev/react-ui", "license": "MIT", - "version": "0.11.5", + "version": "0.11.6", "description": "Component library for Generative UI SDK", "main": "dist/index.cjs", "module": "dist/index.mjs",