glchat-a2ui-react-renderer 0.4.0 → 0.4.1
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/dist/src/Provider.d.ts.map +1 -1
- package/dist/src/core/SurfaceGroupProvider.d.ts +7 -5
- package/dist/src/core/SurfaceGroupProvider.d.ts.map +1 -1
- package/dist/src/utils/detectVersion.d.ts +3 -1
- package/dist/src/utils/detectVersion.d.ts.map +1 -1
- package/dist/src/v1_0/Provider.d.ts +2 -2
- package/dist/src/v1_0/Provider.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../src/Provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../src/Provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAEL,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AC,EACvB,QAAQ,EACR,OAAO,EAAE,WAAW,EACpB,QAAQ,EACR,OAAO,EACP,cAAc,EACd,KAAK,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,QAAQ,GACT,EAAE,QAAQ,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC,+BAmF5C;AAED,wBAAgB,cAAc,IAAI,WAAW,CAE5C;AAED,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACxE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import { type ReactCatalogComponent } from '@a2ui/react';
|
|
3
3
|
import type { MessageProcessor, SurfaceGroupModel } from '@a2ui/web_core';
|
|
4
|
-
import { type V09Message } from '../utils/detectVersion.js';
|
|
4
|
+
import { type V09Message, type V1Message } from '../utils/detectVersion.js';
|
|
5
5
|
import { type A2UIError, type A2UIErrorHandler } from './errors.js';
|
|
6
6
|
import type { ActionOptions } from './types.js';
|
|
7
7
|
/** Protocol versions handled by the shared (v0.9+) message pipeline. */
|
|
8
8
|
export type SurfaceGroupVersion = 'v0.9' | 'v1.0';
|
|
9
|
-
|
|
9
|
+
/** Messages handled by the shared (v0.9+) message pipeline. */
|
|
10
|
+
export type SurfaceGroupMessage = V09Message | V1Message;
|
|
11
|
+
export type SurfaceGroupProviderProps<A, M extends SurfaceGroupMessage> = {
|
|
10
12
|
/** Processor built by the version provider (catalogs, version options). */
|
|
11
13
|
processor: MessageProcessor<ReactCatalogComponent>;
|
|
12
14
|
/** Only this version's messages are processed. */
|
|
13
15
|
version: SurfaceGroupVersion;
|
|
14
16
|
/** Optional rewrite of new messages before processing (e.g. catalog ID fallback). */
|
|
15
|
-
prepareMessages?: (messages:
|
|
16
|
-
messages?:
|
|
17
|
+
prepareMessages?: (messages: M[]) => M[];
|
|
18
|
+
messages?: M[];
|
|
17
19
|
onAction?: (action: A, options?: ActionOptions) => void | Promise<void>;
|
|
18
20
|
onError?: A2UIErrorHandler;
|
|
19
21
|
};
|
|
@@ -32,7 +34,7 @@ type SurfaceGroupContextValue = {
|
|
|
32
34
|
* The version providers (`V09Provider`, `V1Provider`) build the processor;
|
|
33
35
|
* this component feeds it messages, forwards actions and reports errors.
|
|
34
36
|
*/
|
|
35
|
-
export declare function SurfaceGroupProvider<A>({ processor, version, prepareMessages, messages, onAction, onError, children, }: Readonly<PropsWithChildren<SurfaceGroupProviderProps<A>>>): import("react").JSX.Element;
|
|
37
|
+
export declare function SurfaceGroupProvider<A, M extends SurfaceGroupMessage>({ processor, version, prepareMessages, messages, onAction, onError, children, }: Readonly<PropsWithChildren<SurfaceGroupProviderProps<A, M>>>): import("react").JSX.Element;
|
|
36
38
|
export declare function useSurfaceGroup(): SurfaceGroupContextValue;
|
|
37
39
|
export {};
|
|
38
40
|
//# sourceMappingURL=SurfaceGroupProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SurfaceGroupProvider.d.ts","sourceRoot":"","sources":["../../../src/core/SurfaceGroupProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAW/C,OAAO,EAAmB,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAI1E,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"SurfaceGroupProvider.d.ts","sourceRoot":"","sources":["../../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B,CAAC,qBAAqB,CAAC,CAAC;IACnD,wFAAwF;IACxF,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC9C,yEAAyE;IACzE,MAAM,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACpC,CAAC;AAeF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,SAAS,mBAAmB,EAAE,EACrE,SAAS,EACT,OAAO,EACP,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,GACT,EAAE,QAAQ,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,+BAuI9D;AAED,wBAAgB,eAAe,IAAI,wBAAwB,CAI1D"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { A2uiMessage } from '@a2ui/web_core/v0_9';
|
|
2
2
|
import type { ServerToClientMessage } from '@a2ui/web_core/v0_8';
|
|
3
|
+
import type { AgentToRendererMessage } from '@a2ui/web_core/v1_0';
|
|
3
4
|
export type A2UIVersion = 'v0.8' | 'v0.9' | 'v1.0';
|
|
4
5
|
export type V08Message = ServerToClientMessage;
|
|
5
6
|
export type V09Message = A2uiMessage;
|
|
6
|
-
export type
|
|
7
|
+
export type V1Message = AgentToRendererMessage;
|
|
8
|
+
export type A2UIMessage = V08Message | V09Message | V1Message;
|
|
7
9
|
export declare function detectMessageVersion(message: A2UIMessage): A2UIVersion | null;
|
|
8
10
|
export declare function detectMessagesVersion(messages: A2UIMessage[]): A2UIVersion | null;
|
|
9
11
|
//# sourceMappingURL=detectVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectVersion.d.ts","sourceRoot":"","sources":["../../../src/utils/detectVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"detectVersion.d.ts","sourceRoot":"","sources":["../../../src/utils/detectVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AASnD,MAAM,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC;AACrC,MAAM,MAAM,SAAS,GAAG,sBAAsB,CAAC;AAC/C,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAE9D,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAiB7E;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,WAAW,GAAG,IAAI,CAMjF"}
|
|
@@ -3,11 +3,11 @@ import type { ReactCatalogComponent } from '@a2ui/react';
|
|
|
3
3
|
import { type Catalog } from '@a2ui/web_core/v1_0';
|
|
4
4
|
import type { A2UIErrorHandler } from '../core/errors.js';
|
|
5
5
|
import type { ActionOptions } from '../core/types.js';
|
|
6
|
-
import type {
|
|
6
|
+
import type { V1Message } from '../utils/detectVersion.js';
|
|
7
7
|
import type { AgentMessageHandler, V1ActionPayload } from './types.js';
|
|
8
8
|
export type V1ActionHandler = (action: V1ActionPayload, options?: ActionOptions) => void | Promise<void>;
|
|
9
9
|
export type V1ProviderProps = {
|
|
10
|
-
messages?:
|
|
10
|
+
messages?: V1Message[];
|
|
11
11
|
onAction?: V1ActionHandler;
|
|
12
12
|
onError?: A2UIErrorHandler;
|
|
13
13
|
/** Handler for the messages the renderer emits for the agent. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/v1_0/Provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/v1_0/Provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEvE,MAAM,MAAM,eAAe,GAAG,CAC5B,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,aAAa,KACpB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE1B,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,i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