glchat-a2ui-react-renderer 0.0.3 → 0.0.5

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,22 +4,6 @@ A2UI (Agent-to-UI) React renderer for [GLChat](https://github.com/GDP-ADMIN/glch
4
4
 
5
5
  **This library is temporary** while waiting for the [official A2UI React renderer](https://a2ui.org/renderers/) to be released (planned Q1 2026). When the official React renderer is available, we recommend migrating to the official library. This implementation is structured to align with the official Lit and Angular renderers so that switching later should involve minimal changes.
6
6
 
7
- ## Implementation guide
8
-
9
- This renderer is guided by the **[A2UI Renderer Implementation Guide](https://a2ui.org/guides/renderer-development/)** and follows the same patterns as the existing official renderers:
10
-
11
- - **[Lit (Web Components)](https://github.com/google/A2UI/tree/main/renderers/lit)** — [A2UI Renderers](https://a2ui.org/renderers/)
12
- - **[Angular](https://github.com/google/A2UI/tree/main/renderers/angular)** — [A2UI Renderers](https://a2ui.org/renderers/)
13
-
14
- ### Current implementation
15
-
16
- - **Message processing & state:** JSONL-friendly parsing, message dispatcher (`beginRendering`, `surfaceUpdate`, `dataModelUpdate`, `deleteSurface`), surface manager keyed by `surfaceId`, component buffer (adjacency list) per surface, data model store per surface.
17
- - **Progressive rendering:** Buffer updates until `beginRendering`; then render from the given `root`; component catalog (type → React component).
18
- - **Data binding:** `BoundValue` resolution (literal and/or path against the surface data model); `setData(surfaceId, path, value)` for TextField/CheckBox so input changes update the model and refresh the UI.
19
- - **Client–server:** User actions with resolved `action.context` sent as `userAction` payloads.
20
-
21
- **Public API (aligned with Lit/Angular):** `MessageProcessor` (`getSurfaces()`, `processMessages()`, `clearSurfaces()`, `setData()`, `dispatch()`, `events.subscribe()`), `A2UISurface` (receives `surfaceId`, `surface`, optional `processor` + `refreshSurfaces`), and `useA2UIProcessor()` hook. No single “messages in, everything handled” component — the app feeds messages into the processor and renders one `A2UISurface` per surface.
22
-
23
7
  ## Install
24
8
 
25
9
  ```bash
@@ -83,7 +67,6 @@ function ChatSurfaces({ messages }: { messages: string }) {
83
67
  {Array.from(surfaces.entries()).map(([surfaceId, surface]) => (
84
68
  <A2UISurface
85
69
  key={surfaceId}
86
- surfaceId={surfaceId}
87
70
  surface={surface}
88
71
  processor={processor}
89
72
  refreshSurfaces={refreshSurfaces}
@@ -98,7 +81,6 @@ function ChatSurfaces({ messages }: { messages: string }) {
98
81
 
99
82
  | Prop | Required | Description |
100
83
  |------|----------|-------------|
101
- | `surfaceId` | Yes | Surface id (from `processor.getSurfaces()`). |
102
84
  | `surface` | Yes | Surface state (from `processor.getSurfaces()`). |
103
85
  | `processor` | No | With `refreshSurfaces`, enables TextField/CheckBox two-way binding. Subscribe to `processor.events` for user actions. |
104
86
  | `refreshSurfaces` | No | Call after `processMessages()` so UI re-renders; pass with `processor` for inputs. |
@@ -127,6 +109,23 @@ import 'glchat-a2ui-react-renderer/styles.css';
127
109
 
128
110
  Override theme via CSS variables on `:root` or `.a2ui-surface` (e.g. `--a2ui-primary`, `--a2ui-destructive`). Pass a **theme** prop to supply custom `className` strings per component or part without replacing the catalog.
129
111
 
112
+
113
+ ## Implementation guide
114
+
115
+ This renderer is guided by the **[A2UI Renderer Implementation Guide](https://a2ui.org/guides/renderer-development/)** and follows the same patterns as the existing official renderers:
116
+
117
+ - **[Lit (Web Components)](https://github.com/google/A2UI/tree/main/renderers/lit)** — [A2UI Renderers](https://a2ui.org/renderers/)
118
+ - **[Angular](https://github.com/google/A2UI/tree/main/renderers/angular)** — [A2UI Renderers](https://a2ui.org/renderers/)
119
+
120
+ ### Current implementation
121
+
122
+ - **Message processing & state:** JSONL-friendly parsing, message dispatcher (`beginRendering`, `surfaceUpdate`, `dataModelUpdate`, `deleteSurface`), surface manager keyed by `surfaceId`, component buffer (adjacency list) per surface, data model store per surface.
123
+ - **Progressive rendering:** Buffer updates until `beginRendering`; then render from the given `root`; component catalog (type → React component).
124
+ - **Data binding:** `BoundValue` resolution (literal and/or path against the surface data model); `setData(surfaceId, path, value)` for TextField/CheckBox so input changes update the model and refresh the UI.
125
+ - **Client–server:** User actions with resolved `action.context` sent as `userAction` payloads.
126
+
127
+ **Public API (aligned with Lit/Angular):** `MessageProcessor` (`getSurfaces()`, `processMessages()`, `clearSurfaces()`, `setData()`, `dispatch()`, `events.subscribe()`), `A2UISurface` (receives `surfaceId`, `surface`, optional `processor` + `refreshSurfaces`), and `useA2UIProcessor()` hook. No single “messages in, everything handled” component — the app feeds messages into the processor and renders one `A2UISurface` per surface.
128
+
130
129
  ## Docs
131
130
 
132
131
  - [A2UI Renderer Implementation Guide](https://a2ui.org/guides/renderer-development/)
package/dist/index.d.ts CHANGED
@@ -14,6 +14,6 @@ export { resolveBoundValue, updateDataModel, getPathFromBoundValue, resolveActio
14
14
  export { MessageDispatcher } from './src/runtime/dispatcher.js';
15
15
  export { SurfaceManager } from './src/runtime/surfaceManager.js';
16
16
  export { parseJSONLStream, isValidMessage } from './src/helpers/messageParser.js';
17
- export type { A2UIMessage, BeginRenderingMessage, SurfaceUpdateMessage, DataModelUpdateMessage, DeleteSurfaceMessage, BoundValue, ComponentDefinition, ClientToServerMessage, ClientError, DispatchedEvent, UserAction, ActionDefinition, ActionContextInput, DataModelContent, ValueMapItem, SurfaceState, Component, Theme, } from './src/types.js';
17
+ export type { A2UIMessage, BeginRenderingMessage, SurfaceUpdateMessage, DataModelUpdateMessage, DeleteSurfaceMessage, BoundValue, ComponentDefinition, ClientToServerMessage, ClientError, DispatchedEvent, UserAction, ActionDefinition, DataModelContent, ValueMapItem, SurfaceState, Component, Theme, } from './src/types.js';
18
18
  export { defaultTheme } from './src/types.js';
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC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,CAAC;AAG9E,OAAO,EACL,eAAe,EACf,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,YAAY,GACb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAElF,YAAY,EACV,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,KAAK,GACN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -4,7 +4,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
4
4
  }
5
5
  declare const buttonVariants: (props?: ({
6
6
  variant?: "primary" | "secondary" | "destructive" | "destructive-subtle" | "outline" | "ghost-primary" | "ghost-neutral" | "ghost-destructive" | "link-primary" | "link-neutral" | null | undefined;
7
- size?: "small" | "tiny" | "medium" | "large" | "icon" | null | undefined;
7
+ size?: "icon" | "small" | "tiny" | "medium" | "large" | null | undefined;
8
8
  shape?: "normal" | "pill" | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
10
  declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,7 +1,7 @@
1
1
  interface A2UIImageProps {
2
2
  url: string;
3
- fit?: 'cover' | 'contain' | 'fill' | 'none' | 'scaleDown';
4
- usageHint?: 'avatar' | 'hero' | 'thumbnail';
3
+ fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
4
+ usageHint?: 'icon' | 'avatar' | 'smallFeature' | 'mediumFeature' | 'largeFeature' | 'header';
5
5
  className?: string;
6
6
  }
7
7
  export declare function A2UIImage({ url, fit, usageHint, className, }: A2UIImageProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/Image.tsx"],"names":[],"mappings":"AAOA,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;IAC1D,SAAS,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAgBD,wBAAgB,SAAS,CAAC,EACxB,GAAG,EACH,GAAa,EACb,SAAS,EACT,SAAS,GACV,EAAE,cAAc,2CAahB"}
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/Image.tsx"],"names":[],"mappings":"AAIA,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,cAAc,GAAG,eAAe,GAAG,cAAc,GAAG,QAAQ,CAAC;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAmBD,wBAAgB,SAAS,CAAC,EACxB,GAAG,EACH,GAAa,EACb,SAAS,EACT,SAAS,GACV,EAAE,cAAc,2CAahB"}
@@ -1,20 +1,20 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- /**
4
- * A2UI Image component
5
- */
6
3
  import { cn } from '../helpers/css.js';
7
4
  const fitClasses = {
8
- cover: 'a2ui-image--cover',
9
5
  contain: 'a2ui-image--contain',
6
+ cover: 'a2ui-image--cover',
10
7
  fill: 'a2ui-image--fill',
11
8
  none: 'a2ui-image--none',
12
- scaleDown: 'a2ui-image--scale-down',
9
+ 'scale-down': 'a2ui-image--scale-down',
13
10
  };
14
11
  const usageHintClasses = {
12
+ icon: 'a2ui-image--icon',
15
13
  avatar: 'a2ui-image--avatar',
16
- hero: 'a2ui-image--hero',
17
- thumbnail: 'a2ui-image--thumbnail',
14
+ smallFeature: 'a2ui-image--small-feature',
15
+ mediumFeature: 'a2ui-image--medium-feature',
16
+ largeFeature: 'a2ui-image--large-feature',
17
+ header: 'a2ui-image--header',
18
18
  };
19
19
  export function A2UIImage({ url, fit = 'cover', usageHint, className, }) {
20
20
  return (_jsx("img", { src: url, alt: "a2ui image", className: cn('a2ui-image', fitClasses[fit], usageHint && usageHintClasses[usageHint], className) }));
@@ -3,8 +3,6 @@ import type { MessageProcessor } from '../runtime/messageProcessor.js';
3
3
  import type { SurfaceState, Theme } from '../types.js';
4
4
  import { type ComponentCatalog } from './catalog.js';
5
5
  export interface A2UISurfaceProps {
6
- /** Surface identifier (from processor.getSurfaces()) */
7
- surfaceId: string;
8
6
  /** Surface state (from processor.getSurfaces()) */
9
7
  surface: SurfaceState;
10
8
  /**
@@ -24,5 +22,5 @@ export interface A2UISurfaceProps {
24
22
  * app passes surfaceId and surface from processor.getSurfaces(), and renders
25
23
  * one A2UISurface per surface.
26
24
  */
27
- export declare function A2UISurface({ surfaceId, surface, processor, refreshSurfaces, catalog, theme, }: A2UISurfaceProps): React.ReactNode;
25
+ export declare function A2UISurface({ surface, processor, refreshSurfaces, catalog, theme, }: Readonly<A2UISurfaceProps>): React.ReactNode;
28
26
  //# sourceMappingURL=Surface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../../src/rendering/Surface.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAGV,YAAY,EACZ,KAAK,EAEN,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,KAAK,gBAAgB,EAItB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,OAAO,EAAE,YAAY,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,gFAAgF;IAChF,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,8FAA8F;IAC9F,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,OAAO,EACP,SAAS,EACT,eAAe,EACf,OAAyB,EACzB,KAAK,GACN,EAAE,gBAAgB,GAAG,KAAK,CAAC,SAAS,CAqEpC"}
1
+ {"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../../src/rendering/Surface.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAGV,YAAY,EACZ,KAAK,EAEN,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,KAAK,gBAAgB,EAItB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,OAAO,EAAE,YAAY,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,gFAAgF;IAChF,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,8FAA8F;IAC9F,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,SAAS,EACT,eAAe,EACf,OAAyB,EACzB,KAAK,GACN,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,SAAS,CA6D9C"}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useCallback, useRef } from 'react';
3
+ import { useCallback } from 'react';
4
4
  import { resolveActionContext } from '../runtime/bindingResolver.js';
5
5
  import { DEFAULT_CATALOG, renderComponentFromCatalog, } from './catalog.js';
6
6
  /**
@@ -8,15 +8,14 @@ import { DEFAULT_CATALOG, renderComponentFromCatalog, } from './catalog.js';
8
8
  * app passes surfaceId and surface from processor.getSurfaces(), and renders
9
9
  * one A2UISurface per surface.
10
10
  */
11
- export function A2UISurface({ surfaceId, surface, processor, refreshSurfaces, catalog = DEFAULT_CATALOG, theme, }) {
12
- const surfaceRef = useRef(null);
11
+ export function A2UISurface({ surface, processor, refreshSurfaces, catalog = DEFAULT_CATALOG, theme, }) {
13
12
  const handleAction = useCallback((action, sourceComponentId) => {
14
13
  const resolvedContext = action.context != null
15
14
  ? resolveActionContext(action.context, surface.dataModel)
16
15
  : undefined;
17
16
  const userAction = {
18
17
  name: action.name,
19
- surfaceId,
18
+ surfaceId: surface.surfaceId,
20
19
  sourceComponentId,
21
20
  context: resolvedContext,
22
21
  timestamp: new Date().toISOString(),
@@ -25,10 +24,7 @@ export function A2UISurface({ surfaceId, surface, processor, refreshSurfaces, ca
25
24
  if (processor) {
26
25
  processor.dispatch(message);
27
26
  }
28
- if (surfaceRef.current) {
29
- surfaceRef.current.dispatchEvent(new CustomEvent('a2uiaction', { detail: message, bubbles: true }));
30
- }
31
- }, [processor, surfaceId, surface.dataModel]);
27
+ }, [processor, surface]);
32
28
  const renderComponentById = useCallback((componentId) => {
33
29
  const componentDef = surface.componentBuffer.get(componentId);
34
30
  if (!componentDef) {
@@ -42,14 +38,14 @@ export function A2UISurface({ surfaceId, surface, processor, refreshSurfaces, ca
42
38
  onAction: handleAction,
43
39
  renderChild: (childId) => renderComponentById(childId),
44
40
  processor,
45
- surfaceId,
41
+ surfaceId: surface.surfaceId,
46
42
  refreshSurfaces,
47
43
  theme,
48
44
  };
49
45
  return renderComponentFromCatalog(catalog, componentDef.component, props);
50
- }, [surface.componentBuffer, surface.dataModel, handleAction, catalog, processor, surfaceId, refreshSurfaces, theme]);
46
+ }, [surface.componentBuffer, surface.dataModel, handleAction, catalog, processor, surface, refreshSurfaces, theme]);
51
47
  if (!surface.ready || !surface.rootId) {
52
48
  return null;
53
49
  }
54
- return (_jsx("div", { ref: surfaceRef, className: "a2ui-surface", "data-surface-id": surfaceId, children: renderComponentById(surface.rootId) }));
50
+ return (_jsx("div", { className: "a2ui-surface", children: renderComponentById(surface.rootId) }));
55
51
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { MessageProcessor } from '../runtime/messageProcessor.js';
3
- import type { ActionDefinition, Component, Theme } from '../types.js';
3
+ import type { ActionDefinition, Component, ComponentDataMap, ComponentType, Theme } from '../types.js';
4
4
  /**
5
5
  * Props passed to each catalog renderer when rendering a component.
6
6
  * Same contract as Lit/Angular: dataModel, callbacks, and renderChild for recursion.
@@ -13,25 +13,24 @@ export interface ComponentRenderProps {
13
13
  sourceComponentId?: string;
14
14
  onAction?: (action: ActionDefinition, sourceComponentId: string) => void;
15
15
  renderChild?: (componentId: string) => React.ReactNode;
16
- /** When set, TextField/CheckBox use processor.setData() + refreshSurfaces() on change. */
17
16
  processor?: MessageProcessor;
18
17
  surfaceId?: string;
19
18
  refreshSurfaces?: () => void;
20
- /** Optional theme for styling (className strings per component/part). */
21
19
  theme?: Theme;
22
20
  }
23
21
  /**
24
- * A catalog entry: given component data and render props, returns React node.
25
- * Aligns with Lit componentRegistry / Angular Catalog pattern.
22
+ * A typed component renderer for a specific component type K.
26
23
  */
27
- export type ComponentRenderer = (data: Record<string, unknown>, props: ComponentRenderProps) => React.ReactNode;
24
+ export type ComponentRenderer<K extends ComponentType = ComponentType> = (data: ComponentDataMap[K], props: ComponentRenderProps) => React.ReactNode;
28
25
  /**
29
- * Catalog map: component type string → renderer.
30
- * Same structure as official renderers; keep small for simplicity.
26
+ * Catalog map: each standard component type maps to its typed renderer.
31
27
  */
32
- export type ComponentCatalog = Record<string, ComponentRenderer>;
28
+ export type ComponentCatalog = {
29
+ [K in ComponentType]?: ComponentRenderer<K>;
30
+ };
33
31
  /**
34
- * Default catalog: type → renderer. Same pattern as Lit componentRegistry / Angular Catalog.
32
+ * Default catalog: type → typed renderer.
33
+ * Same pattern as Lit componentRegistry / Angular Catalog.
35
34
  */
36
35
  export declare const DEFAULT_CATALOG: ComponentCatalog;
37
36
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/rendering/catalog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAkBxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAc,SAAS,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIlF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,WAAW,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IACvD,0FAA0F;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AK,KAAK,CAAC,SAAS,CAAC;IACvD,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI,CACvE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,KAAK,EAAE,oBAAoB,KACxB,KAAK,CAAC,SAAS,CAAC;AAErB;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;KAC5B,CAAC,IAAI,aAAa,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAC5C,CAAC;AA0QF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,gBAY7B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,oBAAoB,GAC1B,KAAK,CAAC,SAAS,CASjB"}
@@ -14,6 +14,22 @@ import { Label } from '../components/Label.js';
14
14
  import { Separator } from '../components/Separator.js';
15
15
  import { getPathFromBoundValue, resolveBoundValue, } from '../runtime/bindingResolver.js';
16
16
  import { cn } from '../helpers/css.js';
17
+ /**
18
+ * Resolves child component IDs from a ChildrenDef.
19
+ * Handles both explicitList (fixed children) and template (data-driven children).
20
+ */
21
+ function resolveChildIds(childrenDef, dataModel) {
22
+ if (childrenDef.explicitList) {
23
+ return childrenDef.explicitList;
24
+ }
25
+ if (childrenDef.template?.dataBinding) {
26
+ const bound = resolveBoundValue({ path: childrenDef.template.dataBinding }, dataModel);
27
+ if (bound && typeof bound === 'object' && !Array.isArray(bound)) {
28
+ return Object.keys(bound);
29
+ }
30
+ }
31
+ return [];
32
+ }
17
33
  function renderText(data, props) {
18
34
  const usageHint = data.usageHint ?? 'body';
19
35
  const textTheme = props.theme?.components?.Text;
@@ -23,42 +39,51 @@ function renderText(data, props) {
23
39
  return (_jsx(A2UIText, { text: String(resolveBoundValue(data.text, props.dataModel) ?? ''), usageHint: usageHint, className: className }));
24
40
  }
25
41
  function renderButton(data, props) {
26
- const variant = data.destructive
27
- ? 'destructive'
28
- : data.primary
29
- ? 'primary'
30
- : 'outline';
42
+ let variant = 'outline';
43
+ if (data.destructive) {
44
+ variant = 'destructive';
45
+ }
46
+ else if (data.primary) {
47
+ variant = 'primary';
48
+ }
31
49
  const buttonClassName = props.theme?.components?.Button;
32
50
  return (_jsx(Button, { variant: variant, className: buttonClassName, onClick: () => {
33
- if (!data.action) {
34
- return;
35
- }
36
51
  if (!props.sourceComponentId) {
37
52
  console.warn('renderButton: sourceComponentId is required for interactive components; action dispatch skipped.', { action: data.action });
38
53
  return;
39
54
  }
40
55
  props.onAction?.(data.action, props.sourceComponentId);
41
- }, children: data.child ? props.renderChild?.(data.child) : null }));
56
+ }, children: props.renderChild?.(data.child) }));
42
57
  }
43
58
  function renderCard(data, props) {
44
59
  const cardClassName = props.theme?.components?.Card;
45
60
  return (_jsx(Card, { className: cardClassName, children: _jsx(CardContent, { children: props.renderChild?.(data.child) }) }));
46
61
  }
47
62
  function renderRow(data, props) {
48
- const children = data.children ?? [];
63
+ const children = resolveChildIds(data.children, props.dataModel);
49
64
  const className = props.theme?.components?.Row;
50
65
  return (_jsx(A2UIRow, { distribution: data.distribution, alignment: data.alignment, className: className, children: children.map((childId) => (_jsx(Fragment, { children: props.renderChild?.(childId) }, childId))) }));
51
66
  }
52
67
  function renderColumn(data, props) {
53
- const children = data.children ?? [];
68
+ const children = resolveChildIds(data.children, props.dataModel);
54
69
  const className = props.theme?.components?.Column;
55
70
  return (_jsx(A2UIColumn, { distribution: data.distribution, alignment: data.alignment, className: className, children: children.map((childId) => (_jsx(Fragment, { children: props.renderChild?.(childId) }, childId))) }));
56
71
  }
72
+ const listAlignmentClasses = {
73
+ start: 'a2ui-list--items-start',
74
+ center: 'a2ui-list--items-center',
75
+ end: 'a2ui-list--items-end',
76
+ stretch: 'a2ui-list--items-stretch',
77
+ };
78
+ function renderList(data, props) {
79
+ const children = resolveChildIds(data.children, props.dataModel);
80
+ const direction = data.direction ?? 'vertical';
81
+ const alignment = data.alignment ?? 'stretch';
82
+ return (_jsx("div", { className: cn('a2ui-list', direction === 'horizontal' ? 'a2ui-list--horizontal' : 'a2ui-list--vertical', listAlignmentClasses[alignment]), children: children.map((childId) => (_jsx(Fragment, { children: props.renderChild?.(childId) }, childId))) }));
83
+ }
57
84
  function renderTextField(data, props) {
58
- const label = data.label != null
59
- ? resolveBoundValue(data.label, props.dataModel)
60
- : undefined;
61
- const textPath = getPathFromBoundValue(data.text);
85
+ const label = resolveBoundValue(data.label, props.dataModel);
86
+ const textPath = data.text ? getPathFromBoundValue(data.text) : undefined;
62
87
  const handleChange = (value) => {
63
88
  if (!textPath)
64
89
  return;
@@ -68,14 +93,12 @@ function renderTextField(data, props) {
68
93
  }
69
94
  };
70
95
  const tfTheme = props.theme?.components?.TextField;
71
- return (_jsx(A2UITextField, { label: label != null ? String(label) : undefined, value: resolveBoundValue(data.text, props.dataModel) ?? '', textFieldType: data.textFieldType, validationRegexp: data.validationRegexp, onChange: handleChange, className: tfTheme?.container, labelClassName: tfTheme?.label, elementClassName: tfTheme?.element }));
96
+ return (_jsx(A2UITextField, { label: label != null ? String(label) : undefined, value: data.text ? String(resolveBoundValue(data.text, props.dataModel) ?? '') : '', textFieldType: data.textFieldType, validationRegexp: data.validationRegexp, onChange: handleChange, className: tfTheme?.container, labelClassName: tfTheme?.label, elementClassName: tfTheme?.element }));
72
97
  }
73
98
  function renderCheckBox(data, props) {
74
- const label = data.label != null
75
- ? resolveBoundValue(data.label, props.dataModel)
76
- : undefined;
77
- const checked = resolveBoundValue(data.checked, props.dataModel);
78
- const checkedPath = getPathFromBoundValue(data.checked);
99
+ const label = resolveBoundValue(data.label, props.dataModel);
100
+ const checked = resolveBoundValue(data.value, props.dataModel);
101
+ const checkedPath = getPathFromBoundValue(data.value);
79
102
  const handleChange = (checkedValue) => {
80
103
  if (!checkedPath)
81
104
  return;
@@ -99,13 +122,14 @@ function renderDivider(data, props) {
99
122
  return (_jsx(Separator, { orientation: axis, className: dividerTheme }));
100
123
  }
101
124
  function renderTimeout(data, props) {
102
- const targetTimeUtc = resolveBoundValue(data.targetTimeUtc, props.dataModel);
103
- const target = typeof targetTimeUtc === 'string' ? targetTimeUtc : '';
125
+ const targetValue = resolveBoundValue(data.targetTimeUtc, props.dataModel);
126
+ const target = typeof targetValue === 'string' ? targetValue : '';
104
127
  const timeoutTheme = props.theme?.components?.Timeout;
105
- return (_jsx(A2UITimeout, { targetTimeUtc: target, usageHint: data.usageHint ?? 'body', className: timeoutTheme }));
128
+ return (_jsx(A2UITimeout, { targetTimeUtc: target, usageHint: data.usageHint, className: timeoutTheme }));
106
129
  }
107
130
  /**
108
- * Default catalog: type → renderer. Same pattern as Lit componentRegistry / Angular Catalog.
131
+ * Default catalog: type → typed renderer.
132
+ * Same pattern as Lit componentRegistry / Angular Catalog.
109
133
  */
110
134
  export const DEFAULT_CATALOG = {
111
135
  Text: renderText,
@@ -113,6 +137,7 @@ export const DEFAULT_CATALOG = {
113
137
  Card: renderCard,
114
138
  Row: renderRow,
115
139
  Column: renderColumn,
140
+ List: renderList,
116
141
  TextField: renderTextField,
117
142
  CheckBox: renderCheckBox,
118
143
  Image: renderImage,
@@ -125,8 +150,7 @@ export const DEFAULT_CATALOG = {
125
150
  */
126
151
  export function renderComponentFromCatalog(catalog, component, props) {
127
152
  const componentType = Object.keys(component)[0];
128
- const componentRecord = component;
129
- const data = componentRecord[componentType];
153
+ const data = component[componentType];
130
154
  const renderer = catalog[componentType];
131
155
  if (renderer) {
132
156
  return renderer(data, props);
@@ -1,9 +1,9 @@
1
- import type { ActionContextInput, BoundValue, DataModelContent } from '../types.js';
1
+ import type { ActionDefinition, DataModelContent, ResolvableValue } from '../types.js';
2
2
  /**
3
- * Returns the binding path from a BoundValue if it has one (writable binding).
3
+ * Returns the binding path from a bound value if it has one (writable binding).
4
4
  * Literal-only bindings have no path and cannot be updated from the UI.
5
5
  */
6
- export declare function getPathFromBoundValue(boundValue: BoundValue): string | undefined;
6
+ export declare function getPathFromBoundValue(boundValue: ResolvableValue | null | undefined): string | undefined;
7
7
  /**
8
8
  * Sets a value at a path in the data model (immutable update).
9
9
  * Path format: slash-separated only (e.g. "user/name" or "/user/name").
@@ -12,16 +12,17 @@ export declare function getPathFromBoundValue(boundValue: BoundValue): string |
12
12
  export declare function setPathValue(dataModel: Record<string, any>, path: string, value: unknown): Record<string, any>;
13
13
  /**
14
14
  * Resolves action context against the data model for user action payload.
15
- * Accepts context as Record<string, BoundValue> or Array<{ key, value: BoundValue }>.
15
+ * Per spec, context is an array of { key, value } entries.
16
16
  * Returns a plain object with resolved values (used when sending UserAction).
17
17
  */
18
- export declare function resolveActionContext(context: ActionContextInput | undefined, dataModel: Record<string, any>): Record<string, any>;
18
+ export declare function resolveActionContext(context: ActionDefinition['context'], dataModel: Record<string, any>): Record<string, any>;
19
19
  /**
20
- * Resolves a BoundValue against a data model.
20
+ * Resolves a bound value against a data model.
21
21
  * Returns the resolved value (string, number, boolean, or undefined).
22
+ * Accepts any bound value shape (StringOrPathValue, BooleanOrPathValue, BoundValue, etc.).
22
23
  * Safe against malformed input: returns undefined if boundValue is not a non-null object.
23
24
  */
24
- export declare function resolveBoundValue(boundValue: BoundValue, dataModel: Record<string, any>): any;
25
+ export declare function resolveBoundValue(boundValue: ResolvableValue, dataModel: Record<string, any>): any;
25
26
  /**
26
27
  * Updates the data model with new content
27
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"bindingResolver.d.ts","sourceRoot":"","sources":["../../../src/runtime/bindingResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,wBAAg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H,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,EACpC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAWrB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,GAAG,CAqBL;AA8BD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjC,QAAQ,EAAE,gBAAgB,EAAE,GAC3B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAWrB"}
@@ -1,12 +1,9 @@
1
1
  /**
2
- * Returns the binding path from a BoundValue if it has one (writable binding).
2
+ * Returns the binding path from a bound value if it has one (writable binding).
3
3
  * Literal-only bindings have no path and cannot be updated from the UI.
4
4
  */
5
5
  export function getPathFromBoundValue(boundValue) {
6
- if (boundValue && typeof boundValue === 'object' && 'path' in boundValue) {
7
- return boundValue.path;
8
- }
9
- return undefined;
6
+ return boundValue?.path;
10
7
  }
11
8
  /**
12
9
  * Sets a value at a path in the data model (immutable update).
@@ -35,45 +32,41 @@ export function setPathValue(dataModel, path, value) {
35
32
  }
36
33
  /**
37
34
  * Resolves action context against the data model for user action payload.
38
- * Accepts context as Record<string, BoundValue> or Array<{ key, value: BoundValue }>.
35
+ * Per spec, context is an array of { key, value } entries.
39
36
  * Returns a plain object with resolved values (used when sending UserAction).
40
37
  */
41
38
  export function resolveActionContext(context, dataModel) {
42
39
  if (!context)
43
40
  return {};
44
- const entries = Array.isArray(context)
45
- ? context.map((item) => [item.key, item.value])
46
- : Object.entries(context);
47
41
  const result = {};
48
- for (const [key, boundValue] of entries) {
49
- const value = resolveBoundValue(boundValue, dataModel);
50
- if (value !== undefined) {
51
- result[key] = value;
42
+ for (const { key, value: boundValue } of context) {
43
+ const resolved = resolveBoundValue(boundValue, dataModel);
44
+ if (resolved !== undefined) {
45
+ result[key] = resolved;
52
46
  }
53
47
  }
54
48
  return result;
55
49
  }
56
50
  /**
57
- * Resolves a BoundValue against a data model.
51
+ * Resolves a bound value against a data model.
58
52
  * Returns the resolved value (string, number, boolean, or undefined).
53
+ * Accepts any bound value shape (StringOrPathValue, BooleanOrPathValue, BoundValue, etc.).
59
54
  * Safe against malformed input: returns undefined if boundValue is not a non-null object.
60
55
  */
61
56
  export function resolveBoundValue(boundValue, dataModel) {
62
- if (boundValue == null || typeof boundValue !== 'object') {
57
+ if (boundValue == null)
63
58
  return undefined;
59
+ const literal = boundValue.literalString
60
+ ?? boundValue.literalNumber
61
+ ?? boundValue.literalBoolean
62
+ ?? boundValue.literalArray;
63
+ if (literal !== undefined && boundValue.path) {
64
+ const pathValue = getPathValue(dataModel, boundValue.path);
65
+ return pathValue === undefined ? literal : pathValue;
64
66
  }
65
- const literalKeys = ['literalString', 'literalNumber', 'literalBoolean'];
66
- for (const key of literalKeys) {
67
- if (key in boundValue) {
68
- const literal = boundValue[key];
69
- if ('path' in boundValue) {
70
- const pathValue = getPathValue(dataModel, boundValue.path);
71
- return pathValue === undefined ? literal : pathValue;
72
- }
73
- return literal;
74
- }
75
- }
76
- if ('path' in boundValue) {
67
+ if (literal !== undefined)
68
+ return literal;
69
+ if (boundValue.path) {
77
70
  return getPathValue(dataModel, boundValue.path);
78
71
  }
79
72
  return undefined;
@@ -118,26 +111,19 @@ export function updateDataModel(currentModel, contents) {
118
111
  }
119
112
  function resolveContentValue(content) {
120
113
  if (content.valueMap) {
121
- return buildNestedValueMap(content.valueMap);
122
- }
123
- if (content.valueList) {
124
- return content.valueList.map(resolveItemValue);
114
+ return buildValueMap(content.valueMap);
125
115
  }
126
- return content.valueString ?? content.valueInt ?? content.valueBool;
116
+ return content.valueString ?? content.valueNumber ?? content.valueBoolean;
127
117
  }
128
- function buildNestedValueMap(valueMap) {
118
+ function buildValueMap(valueMap) {
129
119
  const result = {};
130
120
  for (const item of valueMap) {
131
- const value = resolveItemValue(item);
132
- if (value !== undefined) {
133
- result[item.key] = value;
121
+ if (item.valueMap) {
122
+ result[item.key] = buildValueMap(item.valueMap);
123
+ }
124
+ else {
125
+ result[item.key] = item.valueString ?? item.valueNumber ?? item.valueBoolean;
134
126
  }
135
127
  }
136
128
  return result;
137
129
  }
138
- function resolveItemValue(item) {
139
- if (item.valueMap) {
140
- return buildNestedValueMap(item.valueMap);
141
- }
142
- return item.valueString ?? item.valueInt ?? item.valueBool;
143
- }
@@ -6,6 +6,7 @@ export interface A2UIMessage {
6
6
  }
7
7
  export interface BeginRenderingMessage {
8
8
  surfaceId: string;
9
+ catalogId?: string;
9
10
  root: string;
10
11
  styles?: Record<string, string>;
11
12
  }
@@ -23,53 +24,153 @@ export interface DeleteSurfaceMessage {
23
24
  }
24
25
  export interface ComponentDefinition {
25
26
  id: string;
27
+ weight?: number;
26
28
  component: Component;
27
29
  }
28
- export type Component = TextComponent | ButtonComponent | TextFieldComponent | CardComponent | RowComponent | ColumnComponent | ListComponent | CheckBoxComponent | DateTimeInputComponent | MultipleChoiceComponent | SliderComponent | ImageComponent | IconComponent | DividerComponent | TabsComponent | ModalComponent | TimeoutComponent;
30
+ export type Component = TextComponent | ImageComponent | IconComponent | VideoComponent | AudioPlayerComponent | RowComponent | ColumnComponent | ListComponent | CardComponent | TabsComponent | DividerComponent | ModalComponent | ButtonComponent | CheckBoxComponent | TextFieldComponent | DateTimeInputComponent | MultipleChoiceComponent | SliderComponent | TimeoutComponent;
31
+ /**
32
+ * Maps each component type name to its inner data shape.
33
+ * Used by the catalog to strongly type each renderer's data parameter.
34
+ */
35
+ export type ComponentDataMap = {
36
+ Text: TextComponent['Text'];
37
+ Image: ImageComponent['Image'];
38
+ Icon: IconComponent['Icon'];
39
+ Video: VideoComponent['Video'];
40
+ AudioPlayer: AudioPlayerComponent['AudioPlayer'];
41
+ Row: RowComponent['Row'];
42
+ Column: ColumnComponent['Column'];
43
+ List: ListComponent['List'];
44
+ Card: CardComponent['Card'];
45
+ Tabs: TabsComponent['Tabs'];
46
+ Divider: DividerComponent['Divider'];
47
+ Modal: ModalComponent['Modal'];
48
+ Button: ButtonComponent['Button'];
49
+ CheckBox: CheckBoxComponent['CheckBox'];
50
+ TextField: TextFieldComponent['TextField'];
51
+ DateTimeInput: DateTimeInputComponent['DateTimeInput'];
52
+ MultipleChoice: MultipleChoiceComponent['MultipleChoice'];
53
+ Slider: SliderComponent['Slider'];
54
+ Timeout: TimeoutComponent['Timeout'];
55
+ };
56
+ export type ComponentType = keyof ComponentDataMap;
57
+ export interface StringOrPathValue {
58
+ literalString?: string;
59
+ path?: string;
60
+ }
61
+ export interface BooleanOrPathValue {
62
+ literalBoolean?: boolean;
63
+ path?: string;
64
+ }
65
+ export interface NumberOrPathValue {
66
+ literalNumber?: number;
67
+ path?: string;
68
+ }
69
+ export interface ArrayOrPathValue {
70
+ literalArray?: string[];
71
+ path?: string;
72
+ }
73
+ export interface ActionContextValue {
74
+ path?: string;
75
+ literalString?: string;
76
+ literalNumber?: number;
77
+ literalBoolean?: boolean;
78
+ }
79
+ /**
80
+ * General BoundValue covering all literal+path combinations.
81
+ * Used by runtime resolvers that handle any bound value shape.
82
+ */
83
+ export type BoundValue = {
84
+ literalString: string;
85
+ } | {
86
+ literalNumber: number;
87
+ } | {
88
+ literalBoolean: boolean;
89
+ } | {
90
+ literalArray: string[];
91
+ } | {
92
+ path: string;
93
+ };
94
+ /**
95
+ * Broadest bound-value shape accepted by runtime resolvers.
96
+ * All specific bound value types (StringOrPathValue, BooleanOrPathValue, etc.)
97
+ * and BoundValue itself are assignable to this interface.
98
+ */
99
+ export interface ResolvableValue {
100
+ literalString?: string;
101
+ literalNumber?: number;
102
+ literalBoolean?: boolean;
103
+ literalArray?: string[];
104
+ path?: string;
105
+ }
106
+ export type IconName = "accountCircle" | "add" | "arrowBack" | "arrowForward" | "attachFile" | "calendarToday" | "call" | "camera" | "check" | "close" | "delete" | "download" | "edit" | "event" | "error" | "favorite" | "favoriteOff" | "folder" | "help" | "home" | "info" | "locationOn" | "lock" | "lockOpen" | "mail" | "menu" | "moreVert" | "moreHoriz" | "notificationsOff" | "notifications" | "payment" | "person" | "phone" | "photo" | "print" | "refresh" | "search" | "send" | "settings" | "share" | "shoppingCart" | "star" | "starHalf" | "starOff" | "upload" | "visibility" | "visibilityOff" | "warning";
107
+ export interface IconNameValue {
108
+ literalString?: IconName;
109
+ path?: string;
110
+ }
111
+ export interface ChildrenDef {
112
+ explicitList?: string[];
113
+ template?: {
114
+ componentId: string;
115
+ dataBinding: string;
116
+ };
117
+ }
118
+ /**
119
+ * Distribution values for flex layouts.
120
+ */
121
+ export type Distribution = 'start' | 'center' | 'end' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly';
122
+ /**
123
+ * Alignment values for flex layouts.
124
+ */
125
+ export type Alignment = 'start' | 'center' | 'end' | 'stretch';
29
126
  export interface TextComponent {
30
127
  Text: {
31
- text: BoundValue;
32
- usageHint?: "h1" | "h2" | "h3" | "h4" | "h5" | "body" | "caption";
128
+ text: StringOrPathValue;
129
+ usageHint?: "h1" | "h2" | "h3" | "h4" | "h5" | "caption" | "body";
33
130
  };
34
131
  }
35
132
  export interface ImageComponent {
36
133
  Image: {
37
- url: BoundValue;
38
- fit?: "cover" | "contain" | "fill" | "none" | "scaleDown";
39
- usageHint?: "avatar" | "hero" | "thumbnail";
134
+ url: StringOrPathValue;
135
+ fit?: "contain" | "cover" | "fill" | "none" | "scale-down";
136
+ usageHint?: "icon" | "avatar" | "smallFeature" | "mediumFeature" | "largeFeature" | "header";
40
137
  };
41
138
  }
42
139
  export interface IconComponent {
43
140
  Icon: {
44
- name: string;
45
- size?: number;
141
+ name: IconNameValue;
46
142
  };
47
143
  }
48
- export interface DividerComponent {
49
- Divider: {
50
- axis?: "horizontal" | "vertical";
144
+ export interface VideoComponent {
145
+ Video: {
146
+ url: StringOrPathValue;
147
+ };
148
+ }
149
+ export interface AudioPlayerComponent {
150
+ AudioPlayer: {
151
+ url: StringOrPathValue;
152
+ description?: StringOrPathValue;
51
153
  };
52
154
  }
53
155
  export interface RowComponent {
54
156
  Row: {
55
- children: string[];
56
- distribution?: "start" | "end" | "center" | "spaceBetween" | "spaceAround" | "spaceEvenly";
57
- alignment?: "start" | "end" | "center" | "stretch";
157
+ children: ChildrenDef;
158
+ distribution?: Distribution;
159
+ alignment?: Alignment;
58
160
  };
59
161
  }
60
162
  export interface ColumnComponent {
61
163
  Column: {
62
- children: string[];
63
- distribution?: "start" | "end" | "center" | "spaceBetween" | "spaceAround" | "spaceEvenly";
64
- alignment?: "start" | "end" | "center" | "stretch";
164
+ children: ChildrenDef;
165
+ distribution?: Distribution;
166
+ alignment?: Alignment;
65
167
  };
66
168
  }
67
169
  export interface ListComponent {
68
170
  List: {
69
- template: string;
70
- dataBinding: string;
71
- direction?: "horizontal" | "vertical";
72
- alignment?: "start" | "end" | "center" | "stretch";
171
+ children: ChildrenDef;
172
+ direction?: "vertical" | "horizontal";
173
+ alignment?: Alignment;
73
174
  };
74
175
  }
75
176
  export interface CardComponent {
@@ -80,11 +181,16 @@ export interface CardComponent {
80
181
  export interface TabsComponent {
81
182
  Tabs: {
82
183
  tabItems: Array<{
83
- title: string;
184
+ title: StringOrPathValue;
84
185
  child: string;
85
186
  }>;
86
187
  };
87
188
  }
189
+ export interface DividerComponent {
190
+ Divider: {
191
+ axis?: "horizontal" | "vertical";
192
+ };
193
+ }
88
194
  export interface ModalComponent {
89
195
  Modal: {
90
196
  entryPointChild: string;
@@ -93,99 +199,78 @@ export interface ModalComponent {
93
199
  }
94
200
  export interface ButtonComponent {
95
201
  Button: {
96
- child?: string;
97
- action?: ActionDefinition;
202
+ child: string;
98
203
  primary?: boolean;
204
+ destructive?: boolean;
205
+ action: ActionDefinition;
206
+ };
207
+ }
208
+ export interface CheckBoxComponent {
209
+ CheckBox: {
210
+ label: StringOrPathValue;
211
+ value: BooleanOrPathValue;
99
212
  };
100
213
  }
101
214
  export interface TextFieldComponent {
102
215
  TextField: {
103
- label?: BoundValue;
104
- text: BoundValue;
105
- textFieldType?: "shortText" | "longText" | "number" | "obscured" | "date";
216
+ label: StringOrPathValue;
217
+ text?: StringOrPathValue;
218
+ textFieldType?: "date" | "longText" | "number" | "shortText" | "obscured";
106
219
  validationRegexp?: string;
107
220
  };
108
221
  }
109
- export interface CheckBoxComponent {
110
- CheckBox: {
111
- label?: BoundValue;
112
- checked: BoundValue;
113
- };
114
- }
115
222
  export interface DateTimeInputComponent {
116
223
  DateTimeInput: {
117
- label?: BoundValue;
118
- value: BoundValue;
224
+ value: StringOrPathValue;
119
225
  enableDate?: boolean;
120
226
  enableTime?: boolean;
121
227
  };
122
228
  }
123
229
  export interface MultipleChoiceComponent {
124
230
  MultipleChoice: {
125
- label?: BoundValue;
231
+ selections: ArrayOrPathValue;
126
232
  options: Array<{
127
- id: string;
128
- label: BoundValue;
233
+ label: StringOrPathValue;
234
+ value: string;
129
235
  }>;
130
- selections: BoundValue;
131
236
  maxAllowedSelections?: number;
237
+ variant?: "checkbox" | "chips";
238
+ filterable?: boolean;
132
239
  };
133
240
  }
134
241
  export interface SliderComponent {
135
242
  Slider: {
136
- label?: BoundValue;
137
- value: BoundValue;
138
- minValue: number;
139
- maxValue: number;
243
+ value: NumberOrPathValue;
244
+ minValue?: number;
245
+ maxValue?: number;
140
246
  };
141
247
  }
142
248
  export interface TimeoutComponent {
143
249
  Timeout: {
144
- targetTimeUtc: BoundValue;
250
+ targetTimeUtc: StringOrPathValue;
145
251
  usageHint?: "body" | "caption" | "h3" | "h4" | "h5";
146
252
  };
147
253
  }
148
- export type BoundValue = {
149
- literalString: string;
150
- } | {
151
- literalNumber: number;
152
- } | {
153
- literalBoolean: boolean;
154
- } | {
155
- path: string;
156
- } | {
157
- literalString: string;
158
- path: string;
159
- } | {
160
- literalNumber: number;
161
- path: string;
162
- } | {
163
- literalBoolean: boolean;
164
- path: string;
165
- };
166
- /** Context can be a record (key -> BoundValue) or an array of { key, value: BoundValue } for submission payload */
167
- export type ActionContextInput = Record<string, BoundValue> | Array<{
168
- key: string;
169
- value: BoundValue;
170
- }>;
171
254
  export interface ActionDefinition {
172
255
  name: string;
173
- context?: ActionContextInput;
256
+ context?: Array<{
257
+ key: string;
258
+ value: ActionContextValue;
259
+ }>;
174
260
  }
175
261
  export interface ValueMapItem {
176
262
  key: string;
177
263
  valueString?: string;
178
- valueInt?: number;
179
- valueBool?: boolean;
264
+ valueNumber?: number;
265
+ valueBoolean?: boolean;
180
266
  valueMap?: ValueMapItem[];
181
267
  }
182
268
  export interface DataModelContent {
183
269
  key: string;
184
- valueMap?: ValueMapItem[];
185
270
  valueString?: string;
186
- valueInt?: number;
187
- valueBool?: boolean;
188
- valueList?: Array<DataModelContent>;
271
+ valueNumber?: number;
272
+ valueBoolean?: boolean;
273
+ valueMap?: ValueMapItem[];
189
274
  }
190
275
  export interface SurfaceState {
191
276
  surfaceId: string;
@@ -194,57 +279,28 @@ export interface SurfaceState {
194
279
  ready: boolean;
195
280
  rootId?: string;
196
281
  }
197
- /**
198
- * User-initiated action sent from the client to the server.
199
- * Same shape as @a2ui/web_core ClientToServerMessage UserAction (Lit/Angular).
200
- */
201
282
  export interface UserAction {
202
- /** The name of the action. */
203
283
  name: string;
204
- /** The ID of the surface. */
205
284
  surfaceId: string;
206
- /** The ID of the component that triggered the event. */
207
285
  sourceComponentId: string;
208
- /** An ISO 8601 timestamp of when the event occurred. */
209
286
  timestamp: string;
210
- /** Resolved action context (key-value pairs from the component's action.context). */
211
287
  context?: {
212
288
  [k: string]: unknown;
213
289
  };
214
290
  }
215
- /**
216
- * Client error report (e.g. during UI rendering).
217
- * Same shape as @a2ui/web_core (Lit/Angular).
218
- */
219
291
  export interface ClientError {
220
292
  [k: string]: unknown;
221
293
  }
222
- /**
223
- * Message sent from the client to the server. Exactly one property is typically set.
224
- * Same shape as @a2ui/web_core ClientToServerMessage (Lit/Angular).
225
- */
226
294
  export interface ClientToServerMessage {
227
295
  userAction?: UserAction;
228
296
  clientUiCapabilities?: unknown;
229
297
  error?: ClientError;
230
298
  request?: unknown;
231
299
  }
232
- /**
233
- * Event pushed to processor.events when the user triggers an action (e.g. button click).
234
- * Same pattern as Angular: message is the full client message; completion completes the round-trip.
235
- * Client subscribes to processor.events; on each event, send event.message to backend,
236
- * then after processMessages(response) call event.completion(messages).
237
- */
238
300
  export interface DispatchedEvent {
239
- /** The client-to-server message to send to the backend (e.g. { userAction }). */
240
301
  message: ClientToServerMessage;
241
- /** Call with the A2UI messages from the backend response (resolves dispatch() promise). */
242
302
  completion: (messages: A2UIMessage[]) => void;
243
303
  }
244
- /**
245
- * Theme for styling built-in components (React: className strings).
246
- * Aligns conceptually with Lit/Angular theme; uses strings for className.
247
- */
248
304
  export interface Theme {
249
305
  components?: {
250
306
  Text?: {
@@ -280,6 +336,5 @@ export interface Theme {
280
336
  TextField?: Record<string, string>;
281
337
  };
282
338
  }
283
- /** Empty theme; renderer works without a theme. */
284
339
  export declare const defaultTheme: Theme;
285
340
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,eAAe,CAAC,EAAE,sBAAsB,CAAC;IACzC,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACtC;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,mBAAmB,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,sBAAs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renderer works without a theme. */
2
+ // Based on A2UI Specification v0.8 Standard Catalog Definition
4
3
  export const defaultTheme = {};
package/dist/styles.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Use: import 'glchat-a2ui-react-renderer/styles.css' in your app.
2
+ * Use: import 'glchat-a2ui-react-renderer/styles.css' in client app.
3
3
  * Variables use HSL format (H S% L%) — override via :root or .a2ui-surface.
4
4
  * Colors aligned with glchat-ui default theme.
5
5
  */
@@ -92,6 +92,7 @@
92
92
  .a2ui-row {
93
93
  display: flex;
94
94
  flex-direction: row;
95
+ flex-wrap: wrap;
95
96
  gap: 8px;
96
97
  }
97
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glchat-a2ui-react-renderer",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
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",