glchat-a2ui-react-renderer 0.2.5 → 0.2.6

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.
@@ -1,9 +1,10 @@
1
1
  import type { ReactNode } from 'react';
2
- import { ComponentRegistry, type A2UIActionEvent, type ServerToClientMessage } from '@a2ui/react';
2
+ import { ComponentRegistry, type ServerToClientMessage } from '@a2ui/react';
3
+ import type { UserAction } from '@a2ui/web_core/types/client-event';
3
4
  import type { Theme } from '@a2ui/web_core/types/types';
4
5
  export type A2UIMessage = ServerToClientMessage;
5
- export type ActionPayload = A2UIActionEvent;
6
- export type ActionHandler = (action: ActionPayload) => void | Promise<void>;
6
+ export type ActionPayload = UserAction;
7
+ export type ActionHandler = (action: UserAction) => void | Promise<void>;
7
8
  export type MessageErrorHandler = (error: unknown) => void;
8
9
  export type ProviderProps = {
9
10
  messages?: A2UIMessage[];
@@ -1 +1 @@
1
- {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../src/Provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAEL,iBAAiB,EAGjB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAKxD,MAAM,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG,eAAe,CAAC;AAC5C,MAAM,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5E,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK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CAsCtD;AAED,wBAAgB,eAAe,IAAI,iBAAiB,CAInD"}
@@ -38,12 +38,7 @@ export function Provider(props) {
38
38
  const handler = providerOnActionRef.current;
39
39
  if (!handler)
40
40
  return;
41
- handler({
42
- actionName: userAction.name,
43
- sourceComponentId: userAction.sourceComponentId,
44
- timestamp: userAction.timestamp,
45
- context: userAction.context ?? {},
46
- });
41
+ handler(userAction);
47
42
  }, []);
48
43
  // Register (or override) components after `@a2ui/react` has initialized its defaults.
49
44
  // This avoids the official default catalog overwriting our custom component registrations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glchat-a2ui-react-renderer",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
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",