glchat-a2ui-react-renderer 0.0.6 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -14
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/src/a2ui/GlchatA2UIProvider.d.ts +4 -0
- package/dist/src/a2ui/GlchatA2UIProvider.d.ts.map +1 -0
- package/dist/src/a2ui/GlchatA2UIProvider.js +8 -0
- package/dist/src/a2ui/GlchatA2UIRenderer.d.ts +4 -0
- package/dist/src/a2ui/GlchatA2UIRenderer.d.ts.map +1 -0
- package/dist/src/a2ui/GlchatA2UIRenderer.js +6 -0
- package/dist/src/a2ui/adapter.d.ts +1 -1
- package/dist/src/a2ui/adapter.d.ts.map +1 -1
- package/dist/src/a2ui/adapter.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
This package provides:
|
|
6
6
|
|
|
7
|
-
* **`
|
|
7
|
+
* **`GlchatA2UIProvider`** – `A2UIProvider` wrapper that uses the GLChat catalog by default.
|
|
8
|
+
* **`GlchatA2UIRenderer`** – thin wrapper around `A2UIRenderer`.
|
|
9
|
+
* **`glchatStandardCatalog`** – the standard A2UI catalog with GLChat custom components (`Button`, `Card`, `Timeout`) for manual wiring.
|
|
8
10
|
* **Tailwind theming** – `styles/globals.css`, `styles/theme-v4.css`, and `tailwind-config.cjs` for default tokens and utilities.
|
|
9
11
|
|
|
10
|
-
This library provides **GLChat-specific components and styling** while remaining fully compatible with the upstream
|
|
11
|
-
A2UI renderer.
|
|
12
|
+
This library provides **GLChat-specific components and styling** while remaining fully compatible with the upstream A2UI renderer.
|
|
12
13
|
|
|
13
14
|
---
|
|
14
15
|
|
|
@@ -29,13 +30,12 @@ npm install glchat-a2ui-react-renderer
|
|
|
29
30
|
|
|
30
31
|
# Quick Start
|
|
31
32
|
|
|
32
|
-
Use
|
|
33
|
+
Use the GLChat-aware wrappers:
|
|
33
34
|
|
|
34
35
|
```tsx
|
|
35
36
|
import {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
glchatStandardCatalog,
|
|
37
|
+
GlchatA2UIProvider,
|
|
38
|
+
GlchatA2UIRenderer,
|
|
39
39
|
type A2UIMessage,
|
|
40
40
|
type A2UIAction,
|
|
41
41
|
} from 'glchat-a2ui-react-renderer';
|
|
@@ -50,13 +50,13 @@ function App() {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
return (
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
</
|
|
53
|
+
<GlchatA2UIProvider messages={messages}>
|
|
54
|
+
<GlchatA2UIRenderer onAction={handleAction} />
|
|
55
|
+
</GlchatA2UIProvider>
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
```
|
|
59
58
|
|
|
59
|
+
```
|
|
60
60
|
# Custom Catalog
|
|
61
61
|
|
|
62
62
|
To extend catalog, you can use `glchatStandardCatalog` as the base standard.
|
|
@@ -88,9 +88,9 @@ function App() {
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
return (
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
</
|
|
91
|
+
<GlchatA2UIProvider messages={messages} catalog={glchatStandardCatalog}>
|
|
92
|
+
<GlchatA2UIRenderer onAction={handleAction} />
|
|
93
|
+
</GlchatA2UIProvider>
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
```
|
|
@@ -207,6 +207,11 @@ You may also extend the theme via:
|
|
|
207
207
|
|
|
208
208
|
# Exports
|
|
209
209
|
|
|
210
|
+
## GLChat wrappers
|
|
211
|
+
|
|
212
|
+
* `GlchatA2UIProviderProps`
|
|
213
|
+
* `GlchatA2UIRendererProps`
|
|
214
|
+
|
|
210
215
|
## GLChat catalog
|
|
211
216
|
|
|
212
217
|
* `glchatStandardCatalog` – standard catalog with custom Button, Card, Timeout
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { GlchatA2UIProvider, type GlchatA2UIProviderProps, } from './src/a2ui/GlchatA2UIProvider.js';
|
|
2
|
+
export { GlchatA2UIRenderer, type GlchatA2UIRendererProps, } from './src/a2ui/GlchatA2UIRenderer.js';
|
|
1
3
|
export { glchatStandardCatalog } from './src/a2ui/glchatStandardCatalog.js';
|
|
2
4
|
export * from './src/a2ui/adapter.js';
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAG5E,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAG5E,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// Wrapper components around @a2ui-sdk/react/0.8 with GLChat defaults
|
|
2
|
+
export { GlchatA2UIProvider, } from './src/a2ui/GlchatA2UIProvider.js';
|
|
3
|
+
export { GlchatA2UIRenderer, } from './src/a2ui/GlchatA2UIRenderer.js';
|
|
1
4
|
// GLChat catalog (extended upstream standard with custom components)
|
|
2
5
|
export { glchatStandardCatalog } from './src/a2ui/glchatStandardCatalog.js';
|
|
3
6
|
// Re-exports from @a2ui-sdk/react/0.8
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type A2UIProviderProps } from '@a2ui-sdk/react/0.8';
|
|
2
|
+
export type GlchatA2UIProviderProps = A2UIProviderProps;
|
|
3
|
+
export declare function GlchatA2UIProvider(props: Readonly<GlchatA2UIProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=GlchatA2UIProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlchatA2UIProvider.d.ts","sourceRoot":"","sources":["../../../src/a2ui/GlchatA2UIProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG3E,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AAExD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,uBAAuB,CAAC,2CAI1E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { A2UIProvider } from '@a2ui-sdk/react/0.8';
|
|
4
|
+
import { glchatStandardCatalog } from './glchatStandardCatalog.js';
|
|
5
|
+
export function GlchatA2UIProvider(props) {
|
|
6
|
+
const catalog = props.catalog ?? glchatStandardCatalog;
|
|
7
|
+
return _jsx(A2UIProvider, { ...props, catalog: catalog });
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type A2UIRendererProps } from '@a2ui-sdk/react/0.8';
|
|
2
|
+
export type GlchatA2UIRendererProps = A2UIRendererProps;
|
|
3
|
+
export declare function GlchatA2UIRenderer(props: Readonly<GlchatA2UIRendererProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=GlchatA2UIRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlchatA2UIRenderer.d.ts","sourceRoot":"","sources":["../../../src/a2ui/GlchatA2UIRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AAExD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,uBAAuB,CAAC,2CAE1E"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ComponentRenderer, standardCatalog, useDispatchAction, useDataBinding, useFormBinding, useSurfaceContext, useDataModelContext, useA2UIMessageHandler, ActionProvider, useActionContext, type A2UIMessage, type A2UIAction, type Action, type ValueSource, type A2UIProviderProps, type A2UIRendererProps, type A2UIMessageHandler, type CatalogComponent, } from '@a2ui-sdk/react/0.8';
|
|
2
2
|
export * from '@a2ui-sdk/types/0.8/standard-catalog';
|
|
3
3
|
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/a2ui/adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/a2ui/adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,iBAAiB,EACjB,eAAe,EAEf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EAErB,cAAc,EACd,gBAAgB,EAEhB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,GACtB,MAAM,qBAAqB,CAAC;AAG7B,cAAc,sCAAsC,CAAC"}
|
package/dist/src/a2ui/adapter.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export {
|
|
5
5
|
// Core components
|
|
6
|
-
|
|
6
|
+
ComponentRenderer, standardCatalog,
|
|
7
7
|
// Hooks
|
|
8
8
|
useDispatchAction, useDataBinding, useFormBinding, useSurfaceContext, useDataModelContext, useA2UIMessageHandler,
|
|
9
9
|
// Context providers
|
|
10
10
|
ActionProvider, useActionContext, } from '@a2ui-sdk/react/0.8';
|
|
11
|
+
// Re-exports standard catalog types
|
|
11
12
|
export * from '@a2ui-sdk/types/0.8/standard-catalog';
|