From 2b04edee6c1e311ab011e31d65f45f24a3754715 Mon Sep 17 00:00:00 2001 From: Aditya Pandey Date: Tue, 10 Mar 2026 02:03:41 +0530 Subject: [PATCH 1/3] rename lang-react to react-lang --- .github/workflows/publish-npm-package.yml | 4 +- benchmarks/generate-samples.ts | 2 +- benchmarks/package.json | 2 +- docs/app/(home)/components/HeroSection.tsx | 2 +- docs/app/docs/openui-lang/page.tsx | 2 +- .../components/CatalogPanel/CatalogPanel.tsx | 2 +- .../components/PreviewPanel/PreviewPanel.tsx | 4 +- .../overview-components/overview-page.tsx | 6 +-- docs/content/docs/api-reference/index.mdx | 4 +- docs/content/docs/api-reference/meta.json | 2 +- .../{lang-react.mdx => react-lang.mdx} | 4 +- docs/content/docs/api-reference/react-ui.mdx | 2 +- .../docs/openui-lang/defining-components.mdx | 6 +-- docs/content/docs/openui-lang/index.mdx | 2 +- .../docs/openui-lang/interactivity.mdx | 4 +- docs/content/docs/openui-lang/quickstart.mdx | 6 +-- docs/content/docs/openui-lang/renderer.mdx | 2 +- .../docs/openui-lang/standard-library.mdx | 6 +-- .../docs/openui-lang/system-prompts.mdx | 2 +- docs/imports/YouRegisterComponents-43-365.tsx | 2 +- docs/next.config.mjs | 2 +- docs/package.json | 2 +- examples/openui-chat/next.config.ts | 2 +- examples/openui-chat/package.json | 2 +- .../src/templates/openui-chat/package.json | 2 +- packages/react-headless/AGENTS.md | 2 +- packages/{lang-react => react-lang}/README.md | 4 +- .../eslint.config.cjs | 0 .../{lang-react => react-lang}/package.json | 2 +- .../src/Renderer.tsx | 0 .../{lang-react => react-lang}/src/context.ts | 0 .../src/hooks/index.ts | 0 .../src/hooks/useFormValidation.ts | 0 .../src/hooks/useOpenUIState.ts | 0 .../{lang-react => react-lang}/src/index.ts | 0 .../{lang-react => react-lang}/src/library.ts | 0 .../src/parser/index.ts | 0 .../src/parser/parser.ts | 0 .../src/parser/prompt.ts | 0 .../src/parser/types.ts | 0 .../src/utils/index.ts | 0 .../src/utils/validation.ts | 0 .../{lang-react => react-lang}/tsconfig.json | 0 packages/react-ui/package.json | 2 +- .../OpenUIChat/GenUIAssistantMessage.tsx | 4 +- .../src/components/OpenUIChat/types.ts | 4 +- .../OpenUIChat/withChatProvider.tsx | 2 +- .../src/genui-lib/Accordion/index.tsx | 2 +- .../react-ui/src/genui-lib/Action/schema.ts | 2 +- .../react-ui/src/genui-lib/Button/index.tsx | 2 +- .../react-ui/src/genui-lib/Buttons/index.tsx | 2 +- .../react-ui/src/genui-lib/Callout/index.tsx | 2 +- .../react-ui/src/genui-lib/Card/index.tsx | 2 +- .../src/genui-lib/CardHeader/index.tsx | 2 +- .../react-ui/src/genui-lib/Carousel/index.tsx | 2 +- .../genui-lib/Charts/AreaChartCondensed.ts | 2 +- .../src/genui-lib/Charts/BarChartCondensed.ts | 2 +- .../genui-lib/Charts/HorizontalBarChart.ts | 2 +- .../genui-lib/Charts/LineChartCondensed.ts | 2 +- .../react-ui/src/genui-lib/Charts/PieChart.ts | 2 +- .../react-ui/src/genui-lib/Charts/Point.ts | 2 +- .../src/genui-lib/Charts/RadarChart.ts | 2 +- .../src/genui-lib/Charts/RadialChart.ts | 2 +- .../src/genui-lib/Charts/ScatterChart.ts | 2 +- .../src/genui-lib/Charts/ScatterSeries.ts | 2 +- .../react-ui/src/genui-lib/Charts/Series.ts | 2 +- .../genui-lib/Charts/SingleStackedBarChart.ts | 2 +- .../react-ui/src/genui-lib/Charts/Slice.ts | 2 +- .../src/genui-lib/CheckBoxGroup/index.tsx | 2 +- .../src/genui-lib/CodeBlock/index.tsx | 2 +- .../src/genui-lib/DatePicker/index.tsx | 2 +- .../src/genui-lib/FollowUpBlock/index.tsx | 2 +- .../src/genui-lib/FollowUpItem/index.tsx | 2 +- .../react-ui/src/genui-lib/Form/index.tsx | 2 +- .../src/genui-lib/FormControl/index.tsx | 2 +- .../react-ui/src/genui-lib/Image/index.tsx | 2 +- .../src/genui-lib/ImageBlock/index.tsx | 2 +- .../src/genui-lib/ImageGallery/index.tsx | 2 +- .../react-ui/src/genui-lib/Input/index.tsx | 2 +- .../react-ui/src/genui-lib/Label/index.tsx | 2 +- .../src/genui-lib/ListBlock/index.tsx | 2 +- .../react-ui/src/genui-lib/ListItem/index.tsx | 2 +- .../src/genui-lib/MarkDownRenderer/index.tsx | 2 +- .../src/genui-lib/RadioGroup/index.tsx | 2 +- .../src/genui-lib/SectionBlock/index.tsx | 2 +- .../src/genui-lib/SectionItem/index.tsx | 2 +- .../react-ui/src/genui-lib/Select/index.tsx | 2 +- .../src/genui-lib/Separator/index.tsx | 2 +- .../react-ui/src/genui-lib/Slider/index.tsx | 2 +- .../react-ui/src/genui-lib/Stack/index.tsx | 2 +- .../react-ui/src/genui-lib/Steps/index.tsx | 2 +- .../src/genui-lib/SwitchGroup/index.tsx | 2 +- .../react-ui/src/genui-lib/Table/index.tsx | 2 +- .../react-ui/src/genui-lib/Tabs/index.tsx | 2 +- packages/react-ui/src/genui-lib/Tag/index.tsx | 2 +- .../react-ui/src/genui-lib/TagBlock/index.tsx | 2 +- .../react-ui/src/genui-lib/TextArea/index.tsx | 2 +- .../src/genui-lib/TextCallout/index.tsx | 2 +- .../src/genui-lib/TextContent/index.tsx | 2 +- .../src/genui-lib/openuiChatLibrary.tsx | 4 +- .../react-ui/src/genui-lib/openuiLibrary.tsx | 4 +- pnpm-lock.yaml | 44 +++++++++---------- 102 files changed, 126 insertions(+), 126 deletions(-) rename docs/content/docs/api-reference/{lang-react.mdx => react-lang.mdx} (98%) rename packages/{lang-react => react-lang}/README.md (71%) rename packages/{lang-react => react-lang}/eslint.config.cjs (100%) rename packages/{lang-react => react-lang}/package.json (95%) rename packages/{lang-react => react-lang}/src/Renderer.tsx (100%) rename packages/{lang-react => react-lang}/src/context.ts (100%) rename packages/{lang-react => react-lang}/src/hooks/index.ts (100%) rename packages/{lang-react => react-lang}/src/hooks/useFormValidation.ts (100%) rename packages/{lang-react => react-lang}/src/hooks/useOpenUIState.ts (100%) rename packages/{lang-react => react-lang}/src/index.ts (100%) rename packages/{lang-react => react-lang}/src/library.ts (100%) rename packages/{lang-react => react-lang}/src/parser/index.ts (100%) rename packages/{lang-react => react-lang}/src/parser/parser.ts (100%) rename packages/{lang-react => react-lang}/src/parser/prompt.ts (100%) rename packages/{lang-react => react-lang}/src/parser/types.ts (100%) rename packages/{lang-react => react-lang}/src/utils/index.ts (100%) rename packages/{lang-react => react-lang}/src/utils/validation.ts (100%) rename packages/{lang-react => react-lang}/tsconfig.json (100%) diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index ee493d379..70702f32d 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -8,13 +8,13 @@ on: workflow_dispatch: inputs: package: - description: "Package to publish (react-ui, react-headless, or lang-react)" + description: "Package to publish (react-ui, react-headless, or react-lang)" required: true type: choice options: - react-ui - react-headless - - lang-react + - react-lang jobs: publish: diff --git a/benchmarks/generate-samples.ts b/benchmarks/generate-samples.ts index 5afb968ed..e00b38d5a 100644 --- a/benchmarks/generate-samples.ts +++ b/benchmarks/generate-samples.ts @@ -1,5 +1,5 @@ import { OpenAI } from "openai"; -import { createParser } from "../packages/lang-react/src/parser/parser.js"; +import { createParser } from "../packages/react-lang/src/parser/parser.js"; import { writeFileSync, mkdirSync, readFileSync } from "fs"; import { join } from "path"; import { astToVercelJsonl } from "./vercel-jsonl-converter.js"; diff --git a/benchmarks/package.json b/benchmarks/package.json index 2fc78d279..0f32b3448 100644 --- a/benchmarks/package.json +++ b/benchmarks/package.json @@ -8,7 +8,7 @@ "bench": "tsx run-benchmark.ts" }, "dependencies": { - "@openuidev/lang-react": "workspace:*", + "@openuidev/react-lang": "workspace:*", "@openuidev/react-ui": "workspace:*", "openai": "^6.22.0", "tiktoken": "^1.0.14" diff --git a/docs/app/(home)/components/HeroSection.tsx b/docs/app/(home)/components/HeroSection.tsx index acd6106e4..da8bb8df6 100644 --- a/docs/app/(home)/components/HeroSection.tsx +++ b/docs/app/(home)/components/HeroSection.tsx @@ -53,7 +53,7 @@ const mobileFadeUp = (delay: number) => ({ }); // CTAs -const primaryCTA = "npm install @openuidev/lang-react @openuidev/react-ui"; +const primaryCTA = "npm install @openuidev/react-lang @openuidev/react-ui"; const secondaryCTA = "Try Playground"; const COPIED_FEEDBACK_MS = 3000; // --------------------------------------------------------------------------- diff --git a/docs/app/docs/openui-lang/page.tsx b/docs/app/docs/openui-lang/page.tsx index 83b82d5be..0c1cd6abc 100644 --- a/docs/app/docs/openui-lang/page.tsx +++ b/docs/app/docs/openui-lang/page.tsx @@ -23,7 +23,7 @@ const steps = [ { title: "Define Library", description: "Create your component library with Zod schemas and generate the system prompt", - code: `import { defineComponent, createLibrary } from '@openuidev/lang-react'; + code: `import { defineComponent, createLibrary } from '@openuidev/react-lang'; import { z } from 'zod'; const Card = defineComponent({ diff --git a/docs/app/playground/components/CatalogPanel/CatalogPanel.tsx b/docs/app/playground/components/CatalogPanel/CatalogPanel.tsx index 5ad8032fc..0c8d392e2 100644 --- a/docs/app/playground/components/CatalogPanel/CatalogPanel.tsx +++ b/docs/app/playground/components/CatalogPanel/CatalogPanel.tsx @@ -1,6 +1,6 @@ "use client"; -import type { ComponentGroup } from "@openuidev/lang-react"; +import type { ComponentGroup } from "@openuidev/react-lang"; import { openuiLibrary } from "@openuidev/react-ui"; import { ChevronLeft, ChevronRight, LayoutList } from "lucide-react"; import { useState } from "react"; diff --git a/docs/app/playground/components/PreviewPanel/PreviewPanel.tsx b/docs/app/playground/components/PreviewPanel/PreviewPanel.tsx index 6dd60dbe9..022f95fca 100644 --- a/docs/app/playground/components/PreviewPanel/PreviewPanel.tsx +++ b/docs/app/playground/components/PreviewPanel/PreviewPanel.tsx @@ -1,5 +1,5 @@ -import type { ParseResult } from "@openuidev/lang-react"; -import { Renderer } from "@openuidev/lang-react"; +import type { ParseResult } from "@openuidev/react-lang"; +import { Renderer } from "@openuidev/react-lang"; import { openuiLibrary, ThemeProvider } from "@openuidev/react-ui"; import { Loader2, Maximize2, Monitor } from "lucide-react"; import { useCallback, useEffect, useMemo, useState } from "react"; diff --git a/docs/components/overview-components/overview-page.tsx b/docs/components/overview-components/overview-page.tsx index 97b60cab3..5ff7e79af 100644 --- a/docs/components/overview-components/overview-page.tsx +++ b/docs/components/overview-components/overview-page.tsx @@ -118,7 +118,7 @@ export function OverviewPage() { - + createLibrary, Renderer, parser APIs, action types, and renderer/form hooks. diff --git a/docs/content/docs/api-reference/meta.json b/docs/content/docs/api-reference/meta.json index 660b46cd5..c4241495a 100644 --- a/docs/content/docs/api-reference/meta.json +++ b/docs/content/docs/api-reference/meta.json @@ -1,5 +1,5 @@ { "title": "API Reference", "root": true, - "pages": ["index", "lang-react", "react-headless", "react-ui"] + "pages": ["index", "react-lang", "react-headless", "react-ui"] } diff --git a/docs/content/docs/api-reference/lang-react.mdx b/docs/content/docs/api-reference/react-lang.mdx similarity index 98% rename from docs/content/docs/api-reference/lang-react.mdx rename to docs/content/docs/api-reference/react-lang.mdx index 09bba5588..95c4be860 100644 --- a/docs/content/docs/api-reference/lang-react.mdx +++ b/docs/content/docs/api-reference/react-lang.mdx @@ -1,5 +1,5 @@ --- -title: "@openuidev/lang-react" +title: "@openuidev/react-lang" description: API reference for the OpenUI Lang runtime, library, parser, and renderer. --- @@ -15,7 +15,7 @@ import { BuiltinActionType, createParser, createStreamingParser, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; ``` ## `defineComponent(config)` diff --git a/docs/content/docs/api-reference/react-ui.mdx b/docs/content/docs/api-reference/react-ui.mdx index 2a7ec6632..27e35b9e9 100644 --- a/docs/content/docs/api-reference/react-ui.mdx +++ b/docs/content/docs/api-reference/react-ui.mdx @@ -60,7 +60,7 @@ All three layouts accept: - `assistantMessage?: AssistantMessageComponent` - `userMessage?: UserMessageComponent` - `composer?: ComposerComponent` - - `componentLibrary?: Library` (from `@openuidev/lang-react`) + - `componentLibrary?: Library` (from `@openuidev/react-lang`) - Theme wrapper props: - `theme?: ThemeProps` - `disableThemeProvider?: boolean` diff --git a/docs/content/docs/openui-lang/defining-components.mdx b/docs/content/docs/openui-lang/defining-components.mdx index ead3eaf9c..c4a70b18d 100644 --- a/docs/content/docs/openui-lang/defining-components.mdx +++ b/docs/content/docs/openui-lang/defining-components.mdx @@ -8,7 +8,7 @@ Use `defineComponent(...)` to register each component and `createLibrary(...)` t ## Core API ```tsx -import { defineComponent, createLibrary } from "@openuidev/lang-react"; +import { defineComponent, createLibrary } from "@openuidev/react-lang"; import { z } from "zod"; const StatCard = defineComponent({ @@ -42,7 +42,7 @@ export const myLibrary = createLibrary({ ## Nesting pattern with `.ref` ```tsx -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; const Item = defineComponent({ @@ -67,7 +67,7 @@ const List = defineComponent({ To define container components that accepts multiple child components, you can use the `z.union` function to define the child components. ```tsx -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; const TextBlock = defineComponent({ diff --git a/docs/content/docs/openui-lang/index.mdx b/docs/content/docs/openui-lang/index.mdx index 591bafdab..625c83b9b 100644 --- a/docs/content/docs/openui-lang/index.mdx +++ b/docs/content/docs/openui-lang/index.mdx @@ -33,7 +33,7 @@ It is designed for: ```tsx import "@openuidev/react-ui/components.css"; -import { Renderer } from "@openuidev/lang-react"; +import { Renderer } from "@openuidev/react-lang"; import { openuiLibrary, openuiPromptOptions } from "@openuidev/react-ui"; const systemPrompt = openuiLibrary.prompt(openuiPromptOptions); diff --git a/docs/content/docs/openui-lang/interactivity.mdx b/docs/content/docs/openui-lang/interactivity.mdx index 62ba4a59b..dd2324cea 100644 --- a/docs/content/docs/openui-lang/interactivity.mdx +++ b/docs/content/docs/openui-lang/interactivity.mdx @@ -125,7 +125,7 @@ Built-in validators include `required`, `minLength`, `maxLength`, `min`, `max`, Full Renderer props reference. - - Complete lang-react API. + + Complete react-lang API. diff --git a/docs/content/docs/openui-lang/quickstart.mdx b/docs/content/docs/openui-lang/quickstart.mdx index dfb5c8cc3..347f8c1a9 100644 --- a/docs/content/docs/openui-lang/quickstart.mdx +++ b/docs/content/docs/openui-lang/quickstart.mdx @@ -3,19 +3,19 @@ title: Quick Start description: Use the OpenUI library to render OpenUI Lang immediately. --- -This is the fastest path: use `openuiLibrary` from `@openuidev/react-ui` and render LLM output with `@openuidev/lang-react`. +This is the fastest path: use `openuiLibrary` from `@openuidev/react-ui` and render LLM output with `@openuidev/react-lang`. ## Installation ```bash -npm install @openuidev/lang-react @openuidev/react-ui +npm install @openuidev/react-lang @openuidev/react-ui ``` ## Render output ```tsx import "@openuidev/react-ui/components.css"; -import { Renderer } from "@openuidev/lang-react"; +import { Renderer } from "@openuidev/react-lang"; import { openuiLibrary } from "@openuidev/react-ui"; ; diff --git a/docs/content/docs/openui-lang/renderer.mdx b/docs/content/docs/openui-lang/renderer.mdx index c22039676..9e528362e 100644 --- a/docs/content/docs/openui-lang/renderer.mdx +++ b/docs/content/docs/openui-lang/renderer.mdx @@ -8,7 +8,7 @@ description: Parse and render OpenUI Lang streams in React. ## Basic usage ```tsx -import { Renderer } from "@openuidev/lang-react"; +import { Renderer } from "@openuidev/react-lang"; import { openuiLibrary } from "@openuidev/react-ui"; export function AssistantMessage({ diff --git a/docs/content/docs/openui-lang/standard-library.mdx b/docs/content/docs/openui-lang/standard-library.mdx index 2ac59e108..0c71f9f74 100644 --- a/docs/content/docs/openui-lang/standard-library.mdx +++ b/docs/content/docs/openui-lang/standard-library.mdx @@ -8,14 +8,14 @@ OpenUI ships with a prebuilt `openuiLibrary` for common layouts, forms, content, ## Install ```bash -npm install @openuidev/lang-react @openuidev/react-ui +npm install @openuidev/react-lang @openuidev/react-ui ``` ## Render with OpenUI library ```tsx import "@openuidev/react-ui/components.css"; -import { Renderer } from "@openuidev/lang-react"; +import { Renderer } from "@openuidev/react-lang"; import { openuiLibrary } from "@openuidev/react-ui"; ; @@ -32,7 +32,7 @@ const systemPrompt = openuiLibrary.prompt(openuiPromptOptions); ## Extend it ```ts -import { createLibrary, defineComponent } from "@openuidev/lang-react"; +import { createLibrary, defineComponent } from "@openuidev/react-lang"; import { openuiLibrary } from "@openuidev/react-ui"; import { z } from "zod"; diff --git a/docs/content/docs/openui-lang/system-prompts.mdx b/docs/content/docs/openui-lang/system-prompts.mdx index 4c6ec510d..8072cd4bd 100644 --- a/docs/content/docs/openui-lang/system-prompts.mdx +++ b/docs/content/docs/openui-lang/system-prompts.mdx @@ -16,7 +16,7 @@ const systemPrompt = openuiLibrary.prompt(openuiPromptOptions); ## Prompt options ```ts -import type { PromptOptions } from "@openuidev/lang-react"; +import type { PromptOptions } from "@openuidev/react-lang"; const options: PromptOptions = { preamble: "You are an assistant that outputs only OpenUI Lang.", diff --git a/docs/imports/YouRegisterComponents-43-365.tsx b/docs/imports/YouRegisterComponents-43-365.tsx index d883ecdda..83807bee7 100644 --- a/docs/imports/YouRegisterComponents-43-365.tsx +++ b/docs/imports/YouRegisterComponents-43-365.tsx @@ -135,7 +135,7 @@ export default function YouRegisterComponents() {

{` import { z } from "zod" import { Carousel, CarouselCard } from "components/Carousel" -import { defineComponent, createLibrary } from "@openuidev/lang-react" +import { defineComponent, createLibrary } from "@openuidev/react-lang" const CarouselCard = defineComponent({ name: "CarouselCard", diff --git a/docs/next.config.mjs b/docs/next.config.mjs index 4547a01e8..3266b317f 100644 --- a/docs/next.config.mjs +++ b/docs/next.config.mjs @@ -9,7 +9,7 @@ const withMDX = createMDX(); /** @type {import('next').NextConfig} */ const config = { serverExternalPackages: ["@takumi-rs/image-response"], - transpilePackages: ["@openuidev/react-ui", "@openuidev/lang-react"], + transpilePackages: ["@openuidev/react-ui", "@openuidev/react-lang"], turbopack: { root: dirname(dirname(__dirname)), }, diff --git a/docs/package.json b/docs/package.json index d81d8d07c..259dcabd9 100644 --- a/docs/package.json +++ b/docs/package.json @@ -13,7 +13,7 @@ "format:check": "prettier --check ." }, "dependencies": { - "@openuidev/lang-react": "workspace:^", + "@openuidev/react-lang": "workspace:^", "@openuidev/react-headless": "workspace:^", "@openuidev/react-ui": "workspace:^", "@takumi-rs/image-response": "^0.68.17", diff --git a/examples/openui-chat/next.config.ts b/examples/openui-chat/next.config.ts index 26350d601..69512fdcd 100644 --- a/examples/openui-chat/next.config.ts +++ b/examples/openui-chat/next.config.ts @@ -2,7 +2,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { turbopack: {}, - transpilePackages: ["@openuidev/react-ui", "@openuidev/react-headless", "@openuidev/lang-react"], + transpilePackages: ["@openuidev/react-ui", "@openuidev/react-headless", "@openuidev/react-lang"], }; export default nextConfig; diff --git a/examples/openui-chat/package.json b/examples/openui-chat/package.json index 04b99f074..28bd6860c 100644 --- a/examples/openui-chat/package.json +++ b/examples/openui-chat/package.json @@ -11,7 +11,7 @@ "dependencies": { "@openuidev/react-ui": "workspace:*", "@openuidev/react-headless": "workspace:*", - "@openuidev/lang-react": "workspace:*", + "@openuidev/react-lang": "workspace:*", "lucide-react": "^0.575.0", "next": "16.1.6", "openai": "^6.22.0", diff --git a/packages/create-openui-app/src/templates/openui-chat/package.json b/packages/create-openui-app/src/templates/openui-chat/package.json index 5f7811b9f..d043fd702 100644 --- a/packages/create-openui-app/src/templates/openui-chat/package.json +++ b/packages/create-openui-app/src/templates/openui-chat/package.json @@ -11,7 +11,7 @@ "dependencies": { "@openuidev/react-ui": "latest", "@openuidev/react-headless": "latest", - "@openuidev/lang-react": "latest", + "@openuidev/react-lang": "latest", "next": "16.1.6", "openai": "^6.22.0", "react": "19.2.3", diff --git a/packages/react-headless/AGENTS.md b/packages/react-headless/AGENTS.md index d6c861313..dcdb9d58a 100644 --- a/packages/react-headless/AGENTS.md +++ b/packages/react-headless/AGENTS.md @@ -12,7 +12,7 @@ pnpm --filter @openuidev/react-headless run ci # lint:check + format:check pnpm build && pnpm test ``` -Build order: **`react-headless`** → `lang-react` → `react-ui`. This package has no upstream workspace deps (only `@ag-ui/core` from npm), so it can always build independently. +Build order: **`react-headless`** → `react-lang` → `react-ui`. This package has no upstream workspace deps (only `@ag-ui/core` from npm), so it can always build independently. ## File Map diff --git a/packages/lang-react/README.md b/packages/react-lang/README.md similarity index 71% rename from packages/lang-react/README.md rename to packages/react-lang/README.md index c72f7a9c7..15f9dc74d 100644 --- a/packages/lang-react/README.md +++ b/packages/react-lang/README.md @@ -1,11 +1,11 @@ -# @openuidev/lang-react +# @openuidev/react-lang React renderer for OpenUI Lang. ## Install ```bash -pnpm add @openuidev/lang-react +pnpm add @openuidev/react-lang ``` ## Docs diff --git a/packages/lang-react/eslint.config.cjs b/packages/react-lang/eslint.config.cjs similarity index 100% rename from packages/lang-react/eslint.config.cjs rename to packages/react-lang/eslint.config.cjs diff --git a/packages/lang-react/package.json b/packages/react-lang/package.json similarity index 95% rename from packages/lang-react/package.json rename to packages/react-lang/package.json index 39ce9cb07..4e4a201eb 100644 --- a/packages/lang-react/package.json +++ b/packages/react-lang/package.json @@ -1,5 +1,5 @@ { - "name": "@openuidev/lang-react", + "name": "@openuidev/react-lang", "version": "0.1.1", "description": "OpenUI-lang renderer and standard library for React", "license": "MIT", diff --git a/packages/lang-react/src/Renderer.tsx b/packages/react-lang/src/Renderer.tsx similarity index 100% rename from packages/lang-react/src/Renderer.tsx rename to packages/react-lang/src/Renderer.tsx diff --git a/packages/lang-react/src/context.ts b/packages/react-lang/src/context.ts similarity index 100% rename from packages/lang-react/src/context.ts rename to packages/react-lang/src/context.ts diff --git a/packages/lang-react/src/hooks/index.ts b/packages/react-lang/src/hooks/index.ts similarity index 100% rename from packages/lang-react/src/hooks/index.ts rename to packages/react-lang/src/hooks/index.ts diff --git a/packages/lang-react/src/hooks/useFormValidation.ts b/packages/react-lang/src/hooks/useFormValidation.ts similarity index 100% rename from packages/lang-react/src/hooks/useFormValidation.ts rename to packages/react-lang/src/hooks/useFormValidation.ts diff --git a/packages/lang-react/src/hooks/useOpenUIState.ts b/packages/react-lang/src/hooks/useOpenUIState.ts similarity index 100% rename from packages/lang-react/src/hooks/useOpenUIState.ts rename to packages/react-lang/src/hooks/useOpenUIState.ts diff --git a/packages/lang-react/src/index.ts b/packages/react-lang/src/index.ts similarity index 100% rename from packages/lang-react/src/index.ts rename to packages/react-lang/src/index.ts diff --git a/packages/lang-react/src/library.ts b/packages/react-lang/src/library.ts similarity index 100% rename from packages/lang-react/src/library.ts rename to packages/react-lang/src/library.ts diff --git a/packages/lang-react/src/parser/index.ts b/packages/react-lang/src/parser/index.ts similarity index 100% rename from packages/lang-react/src/parser/index.ts rename to packages/react-lang/src/parser/index.ts diff --git a/packages/lang-react/src/parser/parser.ts b/packages/react-lang/src/parser/parser.ts similarity index 100% rename from packages/lang-react/src/parser/parser.ts rename to packages/react-lang/src/parser/parser.ts diff --git a/packages/lang-react/src/parser/prompt.ts b/packages/react-lang/src/parser/prompt.ts similarity index 100% rename from packages/lang-react/src/parser/prompt.ts rename to packages/react-lang/src/parser/prompt.ts diff --git a/packages/lang-react/src/parser/types.ts b/packages/react-lang/src/parser/types.ts similarity index 100% rename from packages/lang-react/src/parser/types.ts rename to packages/react-lang/src/parser/types.ts diff --git a/packages/lang-react/src/utils/index.ts b/packages/react-lang/src/utils/index.ts similarity index 100% rename from packages/lang-react/src/utils/index.ts rename to packages/react-lang/src/utils/index.ts diff --git a/packages/lang-react/src/utils/validation.ts b/packages/react-lang/src/utils/validation.ts similarity index 100% rename from packages/lang-react/src/utils/validation.ts rename to packages/react-lang/src/utils/validation.ts diff --git a/packages/lang-react/tsconfig.json b/packages/react-lang/tsconfig.json similarity index 100% rename from packages/lang-react/tsconfig.json rename to packages/react-lang/tsconfig.json diff --git a/packages/react-ui/package.json b/packages/react-ui/package.json index 72fc7de9b..91b941646 100644 --- a/packages/react-ui/package.json +++ b/packages/react-ui/package.json @@ -59,7 +59,7 @@ "ci": "pnpm run lint:check && pnpm run format:check" }, "peerDependencies": { - "@openuidev/lang-react": "workspace:^", + "@openuidev/react-lang": "workspace:^", "@openuidev/react-headless": "workspace:^", "react": ">=19.0.0", "react-dom": ">=19.0.0", diff --git a/packages/react-ui/src/components/OpenUIChat/GenUIAssistantMessage.tsx b/packages/react-ui/src/components/OpenUIChat/GenUIAssistantMessage.tsx index 0a20a64d2..c07278cbf 100644 --- a/packages/react-ui/src/components/OpenUIChat/GenUIAssistantMessage.tsx +++ b/packages/react-ui/src/components/OpenUIChat/GenUIAssistantMessage.tsx @@ -1,7 +1,7 @@ "use client"; -import type { ActionEvent, Library } from "@openuidev/lang-react"; -import { BuiltinActionType, Renderer } from "@openuidev/lang-react"; +import type { ActionEvent, Library } from "@openuidev/react-lang"; +import { BuiltinActionType, Renderer } from "@openuidev/react-lang"; import type { AssistantMessage, ToolMessage } from "@openuidev/react-headless"; import { useThread } from "@openuidev/react-headless"; import { useCallback, useMemo } from "react"; diff --git a/packages/react-ui/src/components/OpenUIChat/types.ts b/packages/react-ui/src/components/OpenUIChat/types.ts index 9120d8eb5..e3a83f062 100644 --- a/packages/react-ui/src/components/OpenUIChat/types.ts +++ b/packages/react-ui/src/components/OpenUIChat/types.ts @@ -1,4 +1,4 @@ -import type { Library } from "@openuidev/lang-react"; +import type { Library } from "@openuidev/react-lang"; import type { AssistantMessage, UserMessage } from "@openuidev/react-headless"; import { ReactNode } from "react"; import { ScrollVariant } from "../../hooks/useScrollToBottom"; @@ -132,7 +132,7 @@ export interface SharedChatUIProps { userMessage?: UserMessageComponent; composer?: ComposerComponent; /** - * Component library created via `createLibrary()` from `@openuidev/lang-react`. + * Component library created via `createLibrary()` from `@openuidev/react-lang`. * When provided, assistant messages are rendered using the GenUI `Renderer` * instead of the default markdown renderer. If `assistantMessage` is also * provided, `assistantMessage` takes priority. diff --git a/packages/react-ui/src/components/OpenUIChat/withChatProvider.tsx b/packages/react-ui/src/components/OpenUIChat/withChatProvider.tsx index c20bbe14f..1fdaf6da4 100644 --- a/packages/react-ui/src/components/OpenUIChat/withChatProvider.tsx +++ b/packages/react-ui/src/components/OpenUIChat/withChatProvider.tsx @@ -1,4 +1,4 @@ -import type { Library } from "@openuidev/lang-react"; +import type { Library } from "@openuidev/react-lang"; import type { AssistantMessage, ChatProviderProps, UserMessage } from "@openuidev/react-headless"; import { ChatProvider } from "@openuidev/react-headless"; import { useMemo } from "react"; diff --git a/packages/react-ui/src/genui-lib/Accordion/index.tsx b/packages/react-ui/src/genui-lib/Accordion/index.tsx index 6d213fea8..ed1f831b0 100644 --- a/packages/react-ui/src/genui-lib/Accordion/index.tsx +++ b/packages/react-ui/src/genui-lib/Accordion/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { diff --git a/packages/react-ui/src/genui-lib/Action/schema.ts b/packages/react-ui/src/genui-lib/Action/schema.ts index 60d59f3fd..84b2d6b74 100644 --- a/packages/react-ui/src/genui-lib/Action/schema.ts +++ b/packages/react-ui/src/genui-lib/Action/schema.ts @@ -1,4 +1,4 @@ -import { BuiltinActionType } from "@openuidev/lang-react"; +import { BuiltinActionType } from "@openuidev/react-lang"; import { z } from "zod"; const continueConversationAction = z.object({ diff --git a/packages/react-ui/src/genui-lib/Button/index.tsx b/packages/react-ui/src/genui-lib/Button/index.tsx index 02ddbc3d8..f3090d4b7 100644 --- a/packages/react-ui/src/genui-lib/Button/index.tsx +++ b/packages/react-ui/src/genui-lib/Button/index.tsx @@ -7,7 +7,7 @@ import { useFormValidation, useIsStreaming, useTriggerAction, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; import { Button as OpenUIButton } from "../../components/Button"; import { ButtonSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/Buttons/index.tsx b/packages/react-ui/src/genui-lib/Buttons/index.tsx index 464387987..ce63cdaa2 100644 --- a/packages/react-ui/src/genui-lib/Buttons/index.tsx +++ b/packages/react-ui/src/genui-lib/Buttons/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { Buttons as OpenUIButtons, type ButtonsProps } from "../../components/Buttons"; import { ButtonsSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/Callout/index.tsx b/packages/react-ui/src/genui-lib/Callout/index.tsx index 1e7671cb8..c736c9e40 100644 --- a/packages/react-ui/src/genui-lib/Callout/index.tsx +++ b/packages/react-ui/src/genui-lib/Callout/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { Callout as OpenUICallout } from "../../components/Callout"; import { MarkDownRenderer } from "../../components/MarkDownRenderer"; import { CalloutSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/Card/index.tsx b/packages/react-ui/src/genui-lib/Card/index.tsx index d4b2026fb..e1981d34b 100644 --- a/packages/react-ui/src/genui-lib/Card/index.tsx +++ b/packages/react-ui/src/genui-lib/Card/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { Card as OpenUICard } from "../../components/Card"; import { CardSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/CardHeader/index.tsx b/packages/react-ui/src/genui-lib/CardHeader/index.tsx index 6d0dd4ed8..037df48ec 100644 --- a/packages/react-ui/src/genui-lib/CardHeader/index.tsx +++ b/packages/react-ui/src/genui-lib/CardHeader/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { CardHeader as OpenUICardHeader } from "../../components/CardHeader"; import { CardHeaderSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/Carousel/index.tsx b/packages/react-ui/src/genui-lib/Carousel/index.tsx index cb9735491..abfc957e2 100644 --- a/packages/react-ui/src/genui-lib/Carousel/index.tsx +++ b/packages/react-ui/src/genui-lib/Carousel/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { z } from "zod"; import { diff --git a/packages/react-ui/src/genui-lib/Charts/AreaChartCondensed.ts b/packages/react-ui/src/genui-lib/Charts/AreaChartCondensed.ts index 6777b2358..394c23b99 100644 --- a/packages/react-ui/src/genui-lib/Charts/AreaChartCondensed.ts +++ b/packages/react-ui/src/genui-lib/Charts/AreaChartCondensed.ts @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { AreaChart as AreaChartCondensedComponent } from "../../components/Charts"; diff --git a/packages/react-ui/src/genui-lib/Charts/BarChartCondensed.ts b/packages/react-ui/src/genui-lib/Charts/BarChartCondensed.ts index a0fa6e070..c9b4db761 100644 --- a/packages/react-ui/src/genui-lib/Charts/BarChartCondensed.ts +++ b/packages/react-ui/src/genui-lib/Charts/BarChartCondensed.ts @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { BarChart as BarChartCondensedComponent } from "../../components/Charts"; diff --git a/packages/react-ui/src/genui-lib/Charts/HorizontalBarChart.ts b/packages/react-ui/src/genui-lib/Charts/HorizontalBarChart.ts index 56cb855a9..df45564a6 100644 --- a/packages/react-ui/src/genui-lib/Charts/HorizontalBarChart.ts +++ b/packages/react-ui/src/genui-lib/Charts/HorizontalBarChart.ts @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { HorizontalBarChart as HorizontalBarChartComponent } from "../../components/Charts"; diff --git a/packages/react-ui/src/genui-lib/Charts/LineChartCondensed.ts b/packages/react-ui/src/genui-lib/Charts/LineChartCondensed.ts index 483ab51e3..431ba3d34 100644 --- a/packages/react-ui/src/genui-lib/Charts/LineChartCondensed.ts +++ b/packages/react-ui/src/genui-lib/Charts/LineChartCondensed.ts @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { LineChart as LineChartCondensedComponent } from "../../components/Charts"; diff --git a/packages/react-ui/src/genui-lib/Charts/PieChart.ts b/packages/react-ui/src/genui-lib/Charts/PieChart.ts index 4c264ec25..71feb636d 100644 --- a/packages/react-ui/src/genui-lib/Charts/PieChart.ts +++ b/packages/react-ui/src/genui-lib/Charts/PieChart.ts @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { PieChart as PieChartComponent } from "../../components/Charts"; diff --git a/packages/react-ui/src/genui-lib/Charts/Point.ts b/packages/react-ui/src/genui-lib/Charts/Point.ts index d55c3da40..c27e11b02 100644 --- a/packages/react-ui/src/genui-lib/Charts/Point.ts +++ b/packages/react-ui/src/genui-lib/Charts/Point.ts @@ -1,4 +1,4 @@ -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; export const PointSchema = z.object({ diff --git a/packages/react-ui/src/genui-lib/Charts/RadarChart.ts b/packages/react-ui/src/genui-lib/Charts/RadarChart.ts index cfe379e3b..1f4c1a0f4 100644 --- a/packages/react-ui/src/genui-lib/Charts/RadarChart.ts +++ b/packages/react-ui/src/genui-lib/Charts/RadarChart.ts @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { RadarChart as RadarChartComponent } from "../../components/Charts"; diff --git a/packages/react-ui/src/genui-lib/Charts/RadialChart.ts b/packages/react-ui/src/genui-lib/Charts/RadialChart.ts index bef4b31db..31f0da5fb 100644 --- a/packages/react-ui/src/genui-lib/Charts/RadialChart.ts +++ b/packages/react-ui/src/genui-lib/Charts/RadialChart.ts @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { RadialChart as RadialChartComponent } from "../../components/Charts"; diff --git a/packages/react-ui/src/genui-lib/Charts/ScatterChart.ts b/packages/react-ui/src/genui-lib/Charts/ScatterChart.ts index 05e8f145f..e6fefa5a0 100644 --- a/packages/react-ui/src/genui-lib/Charts/ScatterChart.ts +++ b/packages/react-ui/src/genui-lib/Charts/ScatterChart.ts @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { ScatterChart as ScatterChartComponent } from "../../components/Charts"; diff --git a/packages/react-ui/src/genui-lib/Charts/ScatterSeries.ts b/packages/react-ui/src/genui-lib/Charts/ScatterSeries.ts index df43a3a87..979be6256 100644 --- a/packages/react-ui/src/genui-lib/Charts/ScatterSeries.ts +++ b/packages/react-ui/src/genui-lib/Charts/ScatterSeries.ts @@ -1,4 +1,4 @@ -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; import { PointSchema } from "./Point"; diff --git a/packages/react-ui/src/genui-lib/Charts/Series.ts b/packages/react-ui/src/genui-lib/Charts/Series.ts index 4210a7747..cc5c46854 100644 --- a/packages/react-ui/src/genui-lib/Charts/Series.ts +++ b/packages/react-ui/src/genui-lib/Charts/Series.ts @@ -1,4 +1,4 @@ -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; export const SeriesSchema = z.object({ diff --git a/packages/react-ui/src/genui-lib/Charts/SingleStackedBarChart.ts b/packages/react-ui/src/genui-lib/Charts/SingleStackedBarChart.ts index ce5564d41..a1a049b91 100644 --- a/packages/react-ui/src/genui-lib/Charts/SingleStackedBarChart.ts +++ b/packages/react-ui/src/genui-lib/Charts/SingleStackedBarChart.ts @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { SingleStackedBar as SingleStackedBarChartComponent } from "../../components/Charts"; diff --git a/packages/react-ui/src/genui-lib/Charts/Slice.ts b/packages/react-ui/src/genui-lib/Charts/Slice.ts index 57a111ab1..fd67cd3a2 100644 --- a/packages/react-ui/src/genui-lib/Charts/Slice.ts +++ b/packages/react-ui/src/genui-lib/Charts/Slice.ts @@ -1,4 +1,4 @@ -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; export const SliceSchema = z.object({ diff --git a/packages/react-ui/src/genui-lib/CheckBoxGroup/index.tsx b/packages/react-ui/src/genui-lib/CheckBoxGroup/index.tsx index dd86a8f52..61d6af5af 100644 --- a/packages/react-ui/src/genui-lib/CheckBoxGroup/index.tsx +++ b/packages/react-ui/src/genui-lib/CheckBoxGroup/index.tsx @@ -9,7 +9,7 @@ import { useIsStreaming, useSetFieldValue, type SubComponentOf, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { CheckBoxGroup as OpenUICheckBoxGroup } from "../../components/CheckBoxGroup"; diff --git a/packages/react-ui/src/genui-lib/CodeBlock/index.tsx b/packages/react-ui/src/genui-lib/CodeBlock/index.tsx index 87a217ad8..5f08aeeb0 100644 --- a/packages/react-ui/src/genui-lib/CodeBlock/index.tsx +++ b/packages/react-ui/src/genui-lib/CodeBlock/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { CodeBlock as OpenUICodeBlock } from "../../components/CodeBlock"; import { CodeBlockSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/DatePicker/index.tsx b/packages/react-ui/src/genui-lib/DatePicker/index.tsx index 4f289fb93..0bc27f41e 100644 --- a/packages/react-ui/src/genui-lib/DatePicker/index.tsx +++ b/packages/react-ui/src/genui-lib/DatePicker/index.tsx @@ -8,7 +8,7 @@ import { useGetFieldValue, useIsStreaming, useSetFieldValue, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; import React from "react"; import { DatePicker as OpenUIDatePicker } from "../../components/DatePicker"; import { DatePickerSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/FollowUpBlock/index.tsx b/packages/react-ui/src/genui-lib/FollowUpBlock/index.tsx index afcc5c7ab..954da05af 100644 --- a/packages/react-ui/src/genui-lib/FollowUpBlock/index.tsx +++ b/packages/react-ui/src/genui-lib/FollowUpBlock/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent, useTriggerAction } from "@openuidev/lang-react"; +import { defineComponent, useTriggerAction } from "@openuidev/react-lang"; import { z } from "zod"; import { FollowUpBlock as OpenUIFollowUpBlock } from "../../components/FollowUpBlock"; import { FollowUpItem as OpenUIFollowUpItem } from "../../components/FollowUpItem"; diff --git a/packages/react-ui/src/genui-lib/FollowUpItem/index.tsx b/packages/react-ui/src/genui-lib/FollowUpItem/index.tsx index 691c74824..407325a4d 100644 --- a/packages/react-ui/src/genui-lib/FollowUpItem/index.tsx +++ b/packages/react-ui/src/genui-lib/FollowUpItem/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; export const FollowUpItem = defineComponent({ diff --git a/packages/react-ui/src/genui-lib/Form/index.tsx b/packages/react-ui/src/genui-lib/Form/index.tsx index 2c30c5c15..25dca5064 100644 --- a/packages/react-ui/src/genui-lib/Form/index.tsx +++ b/packages/react-ui/src/genui-lib/Form/index.tsx @@ -5,7 +5,7 @@ import { FormNameContext, FormValidationContext, useCreateFormValidation, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; import { FormSchema } from "./schema"; export { FormSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/FormControl/index.tsx b/packages/react-ui/src/genui-lib/FormControl/index.tsx index b22529845..11d6d3ff0 100644 --- a/packages/react-ui/src/genui-lib/FormControl/index.tsx +++ b/packages/react-ui/src/genui-lib/FormControl/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent, useFormValidation } from "@openuidev/lang-react"; +import { defineComponent, useFormValidation } from "@openuidev/react-lang"; import { AlertCircle } from "lucide-react"; import { FormControl as OpenUIFormControl } from "../../components/FormControl"; import { Hint as OpenUIHint } from "../../components/FormControl/Hint"; diff --git a/packages/react-ui/src/genui-lib/Image/index.tsx b/packages/react-ui/src/genui-lib/Image/index.tsx index 8e23741b6..5b3cf9b66 100644 --- a/packages/react-ui/src/genui-lib/Image/index.tsx +++ b/packages/react-ui/src/genui-lib/Image/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { Image as OpenUIImage } from "../../components/Image"; import { ImageSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/ImageBlock/index.tsx b/packages/react-ui/src/genui-lib/ImageBlock/index.tsx index 8579410c7..8da5fab92 100644 --- a/packages/react-ui/src/genui-lib/ImageBlock/index.tsx +++ b/packages/react-ui/src/genui-lib/ImageBlock/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { ImageBlock as OpenUIImageBlock } from "../../components/ImageBlock"; import { ImageBlockSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/ImageGallery/index.tsx b/packages/react-ui/src/genui-lib/ImageGallery/index.tsx index 382b2cddb..dd211518c 100644 --- a/packages/react-ui/src/genui-lib/ImageGallery/index.tsx +++ b/packages/react-ui/src/genui-lib/ImageGallery/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { ImageGallery as OpenUIImageGallery } from "../../components/ImageGallery"; import { ImageGallerySchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/Input/index.tsx b/packages/react-ui/src/genui-lib/Input/index.tsx index 9beee3cb1..26dc44058 100644 --- a/packages/react-ui/src/genui-lib/Input/index.tsx +++ b/packages/react-ui/src/genui-lib/Input/index.tsx @@ -8,7 +8,7 @@ import { useGetFieldValue, useIsStreaming, useSetFieldValue, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; import React from "react"; import { Input as OpenUIInput } from "../../components/Input"; import { InputSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/Label/index.tsx b/packages/react-ui/src/genui-lib/Label/index.tsx index 48ae1df93..3dff4e37f 100644 --- a/packages/react-ui/src/genui-lib/Label/index.tsx +++ b/packages/react-ui/src/genui-lib/Label/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { Label as OpenUILabel } from "../../components/Label"; import { LabelSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/ListBlock/index.tsx b/packages/react-ui/src/genui-lib/ListBlock/index.tsx index 7a5255f42..e3f581b99 100644 --- a/packages/react-ui/src/genui-lib/ListBlock/index.tsx +++ b/packages/react-ui/src/genui-lib/ListBlock/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { BuiltinActionType, defineComponent, useTriggerAction } from "@openuidev/lang-react"; +import { BuiltinActionType, defineComponent, useTriggerAction } from "@openuidev/react-lang"; import { ChevronRight } from "lucide-react"; import { z } from "zod"; import { ListBlock as OpenUIListBlock } from "../../components/ListBlock"; diff --git a/packages/react-ui/src/genui-lib/ListItem/index.tsx b/packages/react-ui/src/genui-lib/ListItem/index.tsx index 52284bb62..92229b3a9 100644 --- a/packages/react-ui/src/genui-lib/ListItem/index.tsx +++ b/packages/react-ui/src/genui-lib/ListItem/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; import { actionSchema } from "../Action/schema"; diff --git a/packages/react-ui/src/genui-lib/MarkDownRenderer/index.tsx b/packages/react-ui/src/genui-lib/MarkDownRenderer/index.tsx index 5070cabb3..7283c91af 100644 --- a/packages/react-ui/src/genui-lib/MarkDownRenderer/index.tsx +++ b/packages/react-ui/src/genui-lib/MarkDownRenderer/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { MarkDownRenderer as OpenUIMarkDownRenderer } from "../../components/MarkDownRenderer"; import { MarkDownRendererSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/RadioGroup/index.tsx b/packages/react-ui/src/genui-lib/RadioGroup/index.tsx index e7476b940..67b9896e7 100644 --- a/packages/react-ui/src/genui-lib/RadioGroup/index.tsx +++ b/packages/react-ui/src/genui-lib/RadioGroup/index.tsx @@ -8,7 +8,7 @@ import { useGetFieldValue, useIsStreaming, useSetFieldValue, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { RadioGroup as OpenUIRadioGroup } from "../../components/RadioGroup"; diff --git a/packages/react-ui/src/genui-lib/SectionBlock/index.tsx b/packages/react-ui/src/genui-lib/SectionBlock/index.tsx index 5f475b523..536a85f90 100644 --- a/packages/react-ui/src/genui-lib/SectionBlock/index.tsx +++ b/packages/react-ui/src/genui-lib/SectionBlock/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent, useIsStreaming } from "@openuidev/lang-react"; +import { defineComponent, useIsStreaming } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { diff --git a/packages/react-ui/src/genui-lib/SectionItem/index.tsx b/packages/react-ui/src/genui-lib/SectionItem/index.tsx index 5187bfb0e..f9b0f0bf6 100644 --- a/packages/react-ui/src/genui-lib/SectionItem/index.tsx +++ b/packages/react-ui/src/genui-lib/SectionItem/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; import { SectionContentChildUnion } from "../sectionContentUnion"; diff --git a/packages/react-ui/src/genui-lib/Select/index.tsx b/packages/react-ui/src/genui-lib/Select/index.tsx index ea3137456..5a7a8f8b1 100644 --- a/packages/react-ui/src/genui-lib/Select/index.tsx +++ b/packages/react-ui/src/genui-lib/Select/index.tsx @@ -8,7 +8,7 @@ import { useGetFieldValue, useIsStreaming, useSetFieldValue, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; import React from "react"; import { Select as OpenUISelect, diff --git a/packages/react-ui/src/genui-lib/Separator/index.tsx b/packages/react-ui/src/genui-lib/Separator/index.tsx index f3a5f0646..57d9a5b56 100644 --- a/packages/react-ui/src/genui-lib/Separator/index.tsx +++ b/packages/react-ui/src/genui-lib/Separator/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { Separator as OpenUISeparator } from "../../components/Separator"; import { SeparatorSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/Slider/index.tsx b/packages/react-ui/src/genui-lib/Slider/index.tsx index 8ba149419..41718dd58 100644 --- a/packages/react-ui/src/genui-lib/Slider/index.tsx +++ b/packages/react-ui/src/genui-lib/Slider/index.tsx @@ -9,7 +9,7 @@ import { useIsStreaming, useSetDefaultValue, useSetFieldValue, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; import React from "react"; import { Slider as OpenUISlider } from "../../components/Slider"; import { SliderSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/Stack/index.tsx b/packages/react-ui/src/genui-lib/Stack/index.tsx index 76fca4cc9..d6def1464 100644 --- a/packages/react-ui/src/genui-lib/Stack/index.tsx +++ b/packages/react-ui/src/genui-lib/Stack/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { StackSchema } from "./schema"; export { StackSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/Steps/index.tsx b/packages/react-ui/src/genui-lib/Steps/index.tsx index 2b147c2f9..a674bc1ef 100644 --- a/packages/react-ui/src/genui-lib/Steps/index.tsx +++ b/packages/react-ui/src/genui-lib/Steps/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { MarkDownRenderer } from "../../components/MarkDownRenderer"; diff --git a/packages/react-ui/src/genui-lib/SwitchGroup/index.tsx b/packages/react-ui/src/genui-lib/SwitchGroup/index.tsx index 1b94ed809..2fa1fc7ea 100644 --- a/packages/react-ui/src/genui-lib/SwitchGroup/index.tsx +++ b/packages/react-ui/src/genui-lib/SwitchGroup/index.tsx @@ -7,7 +7,7 @@ import { useIsStreaming, useSetFieldValue, type SubComponentOf, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { SwitchGroup as OpenUISwitchGroup } from "../../components/SwitchGroup"; diff --git a/packages/react-ui/src/genui-lib/Table/index.tsx b/packages/react-ui/src/genui-lib/Table/index.tsx index 72a6d2e45..2dfb85534 100644 --- a/packages/react-ui/src/genui-lib/Table/index.tsx +++ b/packages/react-ui/src/genui-lib/Table/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; import { ScrollableTable as OpenUITable, diff --git a/packages/react-ui/src/genui-lib/Tabs/index.tsx b/packages/react-ui/src/genui-lib/Tabs/index.tsx index c0b887da2..b036e3051 100644 --- a/packages/react-ui/src/genui-lib/Tabs/index.tsx +++ b/packages/react-ui/src/genui-lib/Tabs/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { z } from "zod"; import { diff --git a/packages/react-ui/src/genui-lib/Tag/index.tsx b/packages/react-ui/src/genui-lib/Tag/index.tsx index 6fc38b7a4..9d05e9c31 100644 --- a/packages/react-ui/src/genui-lib/Tag/index.tsx +++ b/packages/react-ui/src/genui-lib/Tag/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { Tag as OpenUITag } from "../../components/Tag"; import { TagSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/TagBlock/index.tsx b/packages/react-ui/src/genui-lib/TagBlock/index.tsx index 4222aff0e..57e4ca418 100644 --- a/packages/react-ui/src/genui-lib/TagBlock/index.tsx +++ b/packages/react-ui/src/genui-lib/TagBlock/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { Tag as OpenUITag } from "../../components/Tag"; import { TagBlock as OpenUITagBlock } from "../../components/TagBlock"; import { asArray } from "../helpers"; diff --git a/packages/react-ui/src/genui-lib/TextArea/index.tsx b/packages/react-ui/src/genui-lib/TextArea/index.tsx index 6c4985a04..c6baa1f19 100644 --- a/packages/react-ui/src/genui-lib/TextArea/index.tsx +++ b/packages/react-ui/src/genui-lib/TextArea/index.tsx @@ -8,7 +8,7 @@ import { useGetFieldValue, useIsStreaming, useSetFieldValue, -} from "@openuidev/lang-react"; +} from "@openuidev/react-lang"; import React from "react"; import { TextArea as OpenUITextArea } from "../../components/TextArea"; import { TextAreaSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/TextCallout/index.tsx b/packages/react-ui/src/genui-lib/TextCallout/index.tsx index 54bfddd56..33849610e 100644 --- a/packages/react-ui/src/genui-lib/TextCallout/index.tsx +++ b/packages/react-ui/src/genui-lib/TextCallout/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import { TextCallout as OpenUITextCallout } from "../../components/TextCallout"; import { TextCalloutSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/TextContent/index.tsx b/packages/react-ui/src/genui-lib/TextContent/index.tsx index c4d1e222b..cfbf2683e 100644 --- a/packages/react-ui/src/genui-lib/TextContent/index.tsx +++ b/packages/react-ui/src/genui-lib/TextContent/index.tsx @@ -1,6 +1,6 @@ "use client"; -import { defineComponent } from "@openuidev/lang-react"; +import { defineComponent } from "@openuidev/react-lang"; import React from "react"; import { MarkDownRenderer } from "../../components/MarkDownRenderer"; import { TextContentSchema } from "./schema"; diff --git a/packages/react-ui/src/genui-lib/openuiChatLibrary.tsx b/packages/react-ui/src/genui-lib/openuiChatLibrary.tsx index 2c8a074a0..5ec9dc737 100644 --- a/packages/react-ui/src/genui-lib/openuiChatLibrary.tsx +++ b/packages/react-ui/src/genui-lib/openuiChatLibrary.tsx @@ -1,7 +1,7 @@ "use client"; -import type { ComponentGroup, PromptOptions } from "@openuidev/lang-react"; -import { createLibrary, defineComponent } from "@openuidev/lang-react"; +import type { ComponentGroup, PromptOptions } from "@openuidev/react-lang"; +import { createLibrary, defineComponent } from "@openuidev/react-lang"; import { z } from "zod"; import { Card as OpenUICard } from "../components/Card"; diff --git a/packages/react-ui/src/genui-lib/openuiLibrary.tsx b/packages/react-ui/src/genui-lib/openuiLibrary.tsx index 7d87e757e..3758e770a 100644 --- a/packages/react-ui/src/genui-lib/openuiLibrary.tsx +++ b/packages/react-ui/src/genui-lib/openuiLibrary.tsx @@ -1,7 +1,7 @@ "use client"; -import type { ComponentGroup, PromptOptions } from "@openuidev/lang-react"; -import { createLibrary } from "@openuidev/lang-react"; +import type { ComponentGroup, PromptOptions } from "@openuidev/react-lang"; +import { createLibrary } from "@openuidev/react-lang"; // Content import { Callout } from "./Callout"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70b0c0d85..520afbee4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,12 +44,12 @@ importers: docs: dependencies: - '@openuidev/lang-react': - specifier: workspace:^ - version: link:../packages/lang-react '@openuidev/react-headless': specifier: workspace:^ version: link:../packages/react-headless + '@openuidev/react-lang': + specifier: workspace:^ + version: link:../packages/react-lang '@openuidev/react-ui': specifier: workspace:^ version: link:../packages/react-ui @@ -126,12 +126,12 @@ importers: examples/openui-chat: dependencies: - '@openuidev/lang-react': - specifier: workspace:* - version: link:../../packages/lang-react '@openuidev/react-headless': specifier: workspace:* version: link:../../packages/react-headless + '@openuidev/react-lang': + specifier: workspace:* + version: link:../../packages/react-lang '@openuidev/react-ui': specifier: workspace:* version: link:../../packages/react-ui @@ -195,19 +195,6 @@ importers: specifier: ^4.19.2 version: 4.20.3 - packages/lang-react: - dependencies: - react: - specifier: '>=19.0.0' - version: 19.2.4 - zod: - specifier: ^4.0.0 - version: 4.3.6 - devDependencies: - '@types/react': - specifier: ^19.0.0 - version: 19.2.14 - packages/react-headless: dependencies: '@ag-ui/core': @@ -233,17 +220,30 @@ importers: specifier: ^4.0.18 version: 4.0.18(@opentelemetry/api@1.9.0)(@types/node@25.3.2)(jiti@2.6.1)(jsdom@28.1.0)(lightningcss@1.31.1)(sass@1.89.2)(terser@5.43.0)(tsx@4.20.3)(yaml@2.8.0) + packages/react-lang: + dependencies: + react: + specifier: '>=19.0.0' + version: 19.2.4 + zod: + specifier: ^4.0.0 + version: 4.3.6 + devDependencies: + '@types/react': + specifier: ^19.0.0 + version: 19.2.14 + packages/react-ui: dependencies: '@floating-ui/react-dom': specifier: ^2.1.2 version: 2.1.3(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@openuidev/lang-react': - specifier: workspace:^ - version: link:../lang-react '@openuidev/react-headless': specifier: workspace:^ version: link:../react-headless + '@openuidev/react-lang': + specifier: workspace:^ + version: link:../react-lang '@radix-ui/react-accordion': specifier: ^1.2.2 version: 1.2.11(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) From cfea3ceb12753cea6b6fb309c3849e93a9cf0c5c Mon Sep 17 00:00:00 2001 From: Aditya Pandey Date: Tue, 10 Mar 2026 11:35:29 +0530 Subject: [PATCH 2/3] lint --- .../src/components/OpenUIChat/GenUIAssistantMessage.tsx | 4 ++-- packages/react-ui/src/components/OpenUIChat/types.ts | 2 +- .../react-ui/src/components/OpenUIChat/withChatProvider.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-ui/src/components/OpenUIChat/GenUIAssistantMessage.tsx b/packages/react-ui/src/components/OpenUIChat/GenUIAssistantMessage.tsx index c07278cbf..2a3728137 100644 --- a/packages/react-ui/src/components/OpenUIChat/GenUIAssistantMessage.tsx +++ b/packages/react-ui/src/components/OpenUIChat/GenUIAssistantMessage.tsx @@ -1,9 +1,9 @@ "use client"; -import type { ActionEvent, Library } from "@openuidev/react-lang"; -import { BuiltinActionType, Renderer } from "@openuidev/react-lang"; import type { AssistantMessage, ToolMessage } from "@openuidev/react-headless"; import { useThread } from "@openuidev/react-headless"; +import type { ActionEvent, Library } from "@openuidev/react-lang"; +import { BuiltinActionType, Renderer } from "@openuidev/react-lang"; import { useCallback, useMemo } from "react"; import { separateContentAndContext, wrapContent, wrapContext } from "../../utils/contentParser"; import { AssistantMessageContainer } from "../Shell"; diff --git a/packages/react-ui/src/components/OpenUIChat/types.ts b/packages/react-ui/src/components/OpenUIChat/types.ts index e3a83f062..e9a9a9bcc 100644 --- a/packages/react-ui/src/components/OpenUIChat/types.ts +++ b/packages/react-ui/src/components/OpenUIChat/types.ts @@ -1,5 +1,5 @@ -import type { Library } from "@openuidev/react-lang"; import type { AssistantMessage, UserMessage } from "@openuidev/react-headless"; +import type { Library } from "@openuidev/react-lang"; import { ReactNode } from "react"; import { ScrollVariant } from "../../hooks/useScrollToBottom"; import { ConversationStarterProps } from "../../types/ConversationStarter"; diff --git a/packages/react-ui/src/components/OpenUIChat/withChatProvider.tsx b/packages/react-ui/src/components/OpenUIChat/withChatProvider.tsx index 1fdaf6da4..714334433 100644 --- a/packages/react-ui/src/components/OpenUIChat/withChatProvider.tsx +++ b/packages/react-ui/src/components/OpenUIChat/withChatProvider.tsx @@ -1,6 +1,6 @@ -import type { Library } from "@openuidev/react-lang"; import type { AssistantMessage, ChatProviderProps, UserMessage } from "@openuidev/react-headless"; import { ChatProvider } from "@openuidev/react-headless"; +import type { Library } from "@openuidev/react-lang"; import { useMemo } from "react"; import { ThemeProps, ThemeProvider } from "../ThemeProvider"; import { GenUIAssistantMessage } from "./GenUIAssistantMessage"; From 760f9feaf0b44ec7e0c5b7322eb7de4931969eb1 Mon Sep 17 00:00:00 2001 From: Aditya Pandey Date: Tue, 10 Mar 2026 12:08:42 +0530 Subject: [PATCH 3/3] update react lang version --- packages/react-lang/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-lang/package.json b/packages/react-lang/package.json index 4e4a201eb..c9d0685ac 100644 --- a/packages/react-lang/package.json +++ b/packages/react-lang/package.json @@ -1,6 +1,6 @@ { "name": "@openuidev/react-lang", - "version": "0.1.1", + "version": "0.1.2", "description": "OpenUI-lang renderer and standard library for React", "license": "MIT", "type": "module",