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 CHANGED
@@ -4,11 +4,12 @@
4
4
 
5
5
  This package provides:
6
6
 
7
- * **`glchatStandardCatalog`** – the standard A2UI catalog with GLChat custom components (`Button`, `Card`, `Timeout`). Use it as `catalog={glchatStandardCatalog}` with `A2UIProvider`.
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 `A2UIProvider` and `A2UIRenderer` from this package with the GLChat catalog:
33
+ Use the GLChat-aware wrappers:
33
34
 
34
35
  ```tsx
35
36
  import {
36
- A2UIProvider,
37
- A2UIRenderer,
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
- <A2UIProvider messages={messages} catalog={glchatStandardCatalog}>
54
- <A2UIRenderer onAction={handleAction} />
55
- </A2UIProvider>
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
- <A2UIProvider messages={messages} catalog={glchatStandardCatalog}>
92
- <A2UIRenderer onAction={handleAction} />
93
- </A2UIProvider>
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
@@ -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"}
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { A2UIRenderer } from '@a2ui-sdk/react/0.8';
4
+ export function GlchatA2UIRenderer(props) {
5
+ return _jsx(A2UIRenderer, { ...props });
6
+ }
@@ -1,3 +1,3 @@
1
- export { A2UIProvider, A2UIRenderer, 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';
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,YAAY,EACZ,YAAY,EACZ,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;AAE7B,cAAc,sCAAsC,CAAC"}
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"}
@@ -3,9 +3,10 @@
3
3
  */
4
4
  export {
5
5
  // Core components
6
- A2UIProvider, A2UIRenderer, ComponentRenderer, standardCatalog,
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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glchat-a2ui-react-renderer",
3
- "version": "0.0.6",
3
+ "version": "0.1.0",
4
4
  "description": "A2UI (Agent-to-UI) React renderer for GLChat — render declarative UI from AI agent messages",
5
5
  "author": {
6
6
  "name": "GDP Labs",