diff --git a/.changeset/sad-knives-return.md b/.changeset/sad-knives-return.md new file mode 100644 index 0000000000..f1c3a5e7c4 --- /dev/null +++ b/.changeset/sad-knives-return.md @@ -0,0 +1,5 @@ +--- +"@lynx-js/genui": patch +--- + +fix: export catalog jsx components diff --git a/packages/genui/a2ui/src/catalog/Button/index.tsx b/packages/genui/a2ui/src/catalog/Button/index.tsx index 0c1bcf4819..3ee11b6649 100644 --- a/packages/genui/a2ui/src/catalog/Button/index.tsx +++ b/packages/genui/a2ui/src/catalog/Button/index.tsx @@ -1,7 +1,7 @@ // Copyright 2026 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in the root directory of this source tree. -import { A2UIRenderer } from '../../react/A2UIRenderer.js'; +import { A2UIRenderer } from '../../react/A2UIRenderer.jsx'; import { useChecks } from '../../react/useChecks.js'; import type { CheckLike } from '../../react/useChecks.js'; import type { GenericComponentProps } from '../../store/types.js'; diff --git a/packages/genui/a2ui/src/catalog/Card/index.tsx b/packages/genui/a2ui/src/catalog/Card/index.tsx index d2cf6b25e2..169495244d 100644 --- a/packages/genui/a2ui/src/catalog/Card/index.tsx +++ b/packages/genui/a2ui/src/catalog/Card/index.tsx @@ -1,7 +1,7 @@ // Copyright 2026 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in the root directory of this source tree. -import { NodeRenderer } from '../../react/A2UIRenderer.js'; +import { NodeRenderer } from '../../react/A2UIRenderer.jsx'; import type { GenericComponentProps } from '../../store/types.js'; import '../../../styles/catalog/Card.css'; diff --git a/packages/genui/a2ui/src/catalog/Column/index.tsx b/packages/genui/a2ui/src/catalog/Column/index.tsx index ee50dfc0c8..ec815535ca 100644 --- a/packages/genui/a2ui/src/catalog/Column/index.tsx +++ b/packages/genui/a2ui/src/catalog/Column/index.tsx @@ -1,7 +1,7 @@ // Copyright 2026 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in the root directory of this source tree. -import { NodeRenderer } from '../../react/A2UIRenderer.js'; +import { NodeRenderer } from '../../react/A2UIRenderer.jsx'; import { useDataBinding } from '../../react/useDataBinding.js'; import type { ComponentInstance, diff --git a/packages/genui/a2ui/src/catalog/List/index.tsx b/packages/genui/a2ui/src/catalog/List/index.tsx index d57d62c98f..e458b76285 100755 --- a/packages/genui/a2ui/src/catalog/List/index.tsx +++ b/packages/genui/a2ui/src/catalog/List/index.tsx @@ -3,7 +3,7 @@ // LICENSE file in the root directory of this source tree. import type * as v0_9 from '@a2ui/web_core/v0_9'; -import { NodeRenderer } from '../../react/A2UIRenderer.js'; +import { NodeRenderer } from '../../react/A2UIRenderer.jsx'; import { useDataBinding } from '../../react/useDataBinding.js'; import type { GenericComponentProps } from '../../store/types.js'; diff --git a/packages/genui/a2ui/src/catalog/Modal/index.tsx b/packages/genui/a2ui/src/catalog/Modal/index.tsx index cc89682b4a..0ed6f72125 100644 --- a/packages/genui/a2ui/src/catalog/Modal/index.tsx +++ b/packages/genui/a2ui/src/catalog/Modal/index.tsx @@ -9,7 +9,7 @@ import { } from '@lynx-js/lynx-ui'; import { useState } from '@lynx-js/react'; -import { NodeRenderer } from '../../react/A2UIRenderer.js'; +import { NodeRenderer } from '../../react/A2UIRenderer.jsx'; import type { ComponentInstance, GenericComponentProps, diff --git a/packages/genui/a2ui/src/catalog/Row/index.tsx b/packages/genui/a2ui/src/catalog/Row/index.tsx index e20dea931b..9e7ac4c60f 100755 --- a/packages/genui/a2ui/src/catalog/Row/index.tsx +++ b/packages/genui/a2ui/src/catalog/Row/index.tsx @@ -1,7 +1,7 @@ // Copyright 2026 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in the root directory of this source tree. -import { NodeRenderer } from '../../react/A2UIRenderer.js'; +import { NodeRenderer } from '../../react/A2UIRenderer.jsx'; import type { GenericComponentProps } from '../../store/types.js'; import '../../../styles/catalog/Row.css'; diff --git a/packages/genui/a2ui/src/catalog/Tabs/index.tsx b/packages/genui/a2ui/src/catalog/Tabs/index.tsx index 0957f77159..10f69a2528 100644 --- a/packages/genui/a2ui/src/catalog/Tabs/index.tsx +++ b/packages/genui/a2ui/src/catalog/Tabs/index.tsx @@ -3,7 +3,7 @@ // LICENSE file in the root directory of this source tree. import { useState } from '@lynx-js/react'; -import { NodeRenderer } from '../../react/A2UIRenderer.js'; +import { NodeRenderer } from '../../react/A2UIRenderer.jsx'; import type { GenericComponentProps, Surface } from '../../store/types.js'; import '../../../styles/catalog/Tabs.css'; diff --git a/packages/genui/a2ui/src/catalog/index.ts b/packages/genui/a2ui/src/catalog/index.ts index c4942874ec..3d1173fd9f 100755 --- a/packages/genui/a2ui/src/catalog/index.ts +++ b/packages/genui/a2ui/src/catalog/index.ts @@ -28,23 +28,23 @@ export const catalogManifests: Record = {}; // Per-component re-exports so consumers can pick exactly what they need. // Each is an independently tree-shakeable ESM re-export — pulling `Text` // does not drag `Button` into the bundle. -export { Button } from './Button/index.js'; -export { Card } from './Card/index.js'; -export { CheckBox } from './CheckBox/index.js'; -export { ChoicePicker } from './ChoicePicker/index.js'; -export { DateTimeInput } from './DateTimeInput/index.js'; -export { LineChart } from './LineChart/index.js'; -export { PieChart } from './PieChart/index.js'; -export { Column } from './Column/index.js'; -export { Divider } from './Divider/index.js'; -export { Icon } from './Icon/index.js'; -export { Image } from './Image/index.js'; -export { List } from './List/index.js'; -export { Modal } from './Modal/index.js'; -export { RadioGroup } from './RadioGroup/index.js'; -export { Row } from './Row/index.js'; -export { Slider } from './Slider/index.js'; -export { Tabs } from './Tabs/index.js'; -export { Text } from './Text/index.js'; -export { TextField } from './TextField/index.js'; +export { Button } from './Button/index.jsx'; +export { Card } from './Card/index.jsx'; +export { CheckBox } from './CheckBox/index.jsx'; +export { ChoicePicker } from './ChoicePicker/index.jsx'; +export { DateTimeInput } from './DateTimeInput/index.jsx'; +export { LineChart } from './LineChart/index.jsx'; +export { PieChart } from './PieChart/index.jsx'; +export { Column } from './Column/index.jsx'; +export { Divider } from './Divider/index.jsx'; +export { Icon } from './Icon/index.jsx'; +export { Image } from './Image/index.jsx'; +export { List } from './List/index.jsx'; +export { Modal } from './Modal/index.jsx'; +export { RadioGroup } from './RadioGroup/index.jsx'; +export { Row } from './Row/index.jsx'; +export { Slider } from './Slider/index.jsx'; +export { Tabs } from './Tabs/index.jsx'; +export { Text } from './Text/index.jsx'; +export { TextField } from './TextField/index.jsx'; export { DEFAULT_CHART_COLORS, escapeXml, formatValue } from './utils/chart.js'; diff --git a/packages/genui/a2ui/src/react/A2UI.tsx b/packages/genui/a2ui/src/react/A2UI.tsx index 0b988dc31f..dded92d800 100644 --- a/packages/genui/a2ui/src/react/A2UI.tsx +++ b/packages/genui/a2ui/src/react/A2UI.tsx @@ -13,9 +13,9 @@ import { } from '@lynx-js/react'; import type { ReactNode } from '@lynx-js/react'; -import { A2UIProvider } from './A2UIProvider.js'; -import { A2UIRenderer } from './A2UIRenderer.js'; -import type { UnsupportedInfo } from './A2UIRenderer.js'; +import { A2UIProvider } from './A2UIProvider.jsx'; +import { A2UIRenderer } from './A2UIRenderer.jsx'; +import type { UnsupportedInfo } from './A2UIRenderer.jsx'; import type { Catalog, CatalogInput } from '../catalog/defineCatalog.js'; import { defineCatalog } from '../catalog/defineCatalog.js'; import { MessageProcessor } from '../store/MessageProcessor.js'; diff --git a/packages/genui/a2ui/src/react/index.ts b/packages/genui/a2ui/src/react/index.ts index ea9115c020..df107c2f3e 100644 --- a/packages/genui/a2ui/src/react/index.ts +++ b/packages/genui/a2ui/src/react/index.ts @@ -15,9 +15,9 @@ // that aggregates input validity — exporting the context now would // pre-commit the package to a Provider-based API before there's a real // consumer to validate it. -export { A2UI } from './A2UI.js'; -export type { A2UIProps } from './A2UI.js'; -export { NodeRenderer } from './A2UIRenderer.js'; +export { A2UI } from './A2UI.jsx'; +export type { A2UIProps } from './A2UI.jsx'; +export { NodeRenderer } from './A2UIRenderer.jsx'; export { useAction } from './useAction.js'; export type { ActionProps } from './useAction.js'; export { useDataBinding, useResolvedProps } from './useDataBinding.js'; diff --git a/packages/genui/a2ui/src/react/useA2UIContext.ts b/packages/genui/a2ui/src/react/useA2UIContext.ts index 76936f11ba..2f238992ff 100644 --- a/packages/genui/a2ui/src/react/useA2UIContext.ts +++ b/packages/genui/a2ui/src/react/useA2UIContext.ts @@ -3,8 +3,8 @@ // LICENSE file in the root directory of this source tree. import { useContext } from '@lynx-js/react'; -import { A2UIContext } from './A2UIProvider.js'; -import type { A2UIInternalContext } from './A2UIProvider.js'; +import { A2UIContext } from './A2UIProvider.jsx'; +import type { A2UIInternalContext } from './A2UIProvider.jsx'; /** * Internal helper used by catalog-component hooks (`useAction`, the diff --git a/packages/genui/a2ui/tsconfig.build.json b/packages/genui/a2ui/tsconfig.build.json index 3ae81e2906..7d51a5a50a 100644 --- a/packages/genui/a2ui/tsconfig.build.json +++ b/packages/genui/a2ui/tsconfig.build.json @@ -3,7 +3,7 @@ "compilerOptions": { "noEmit": false, "rootDir": "./src", - "jsx": "react-jsx", + "jsx": "preserve", "tsBuildInfoFile": "./dist/tsconfig.build.tsbuildinfo", }, "include": ["src"],