glchat-a2ui-react-renderer 0.3.6 → 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/README.md +200 -267
- package/dist/index.d.ts +13 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/src/Provider.d.ts +33 -8
- package/dist/src/Provider.d.ts.map +1 -1
- package/dist/src/Provider.js +12 -10
- package/dist/src/SurfaceRenderer.d.ts +7 -1
- package/dist/src/SurfaceRenderer.d.ts.map +1 -1
- package/dist/src/SurfaceRenderer.js +2 -2
- package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.d.ts +1 -5
- package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.js +2 -12
- package/dist/src/components/a2ui/v0_9/Button/Button.d.ts +73 -239
- package/dist/src/components/a2ui/v0_9/Button/Button.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/Button/Button.js +2 -13
- package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.d.ts +1 -8
- package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.js +2 -51
- package/dist/src/components/a2ui/v0_9/TagInput/TagInput.d.ts +40 -196
- package/dist/src/components/a2ui/v0_9/TagInput/TagInput.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/TagInput/TagInput.js +3 -10
- package/dist/src/components/a2ui/v0_9/Timeout/Timeout.d.ts +24 -100
- package/dist/src/components/a2ui/v0_9/Timeout/Timeout.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/Timeout/Timeout.js +3 -23
- package/dist/src/components/a2ui/v0_9/common.d.ts +11 -57
- package/dist/src/components/a2ui/v0_9/common.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/common.js +0 -9
- package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.d.ts +3 -0
- package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.js +6 -0
- package/dist/src/components/a2ui/v1_0/Button/Button.d.ts +223 -0
- package/dist/src/components/a2ui/v1_0/Button/Button.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/Button/Button.js +26 -0
- package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.d.ts +3 -0
- package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.js +6 -0
- package/dist/src/components/a2ui/v1_0/TagInput/TagInput.d.ts +214 -0
- package/dist/src/components/a2ui/v1_0/TagInput/TagInput.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/TagInput/TagInput.js +34 -0
- package/dist/src/components/a2ui/v1_0/Timeout/Timeout.d.ts +58 -0
- package/dist/src/components/a2ui/v1_0/Timeout/Timeout.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/Timeout/Timeout.js +25 -0
- package/dist/src/components/a2ui/v1_0/common.d.ts +15 -0
- package/dist/src/components/a2ui/v1_0/common.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/common.js +16 -0
- package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.d.ts +14 -0
- package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.js +10 -0
- package/dist/src/components/a2ui/views/Button/Button.d.ts +18 -0
- package/dist/src/components/a2ui/views/Button/Button.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/Button/Button.js +22 -0
- package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.d.ts +25 -0
- package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.js +46 -0
- package/dist/src/components/a2ui/views/ChoicePicker/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/TagInput/TagInput.d.ts +16 -0
- package/dist/src/components/a2ui/views/TagInput/TagInput.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/TagInput/TagInput.js +12 -0
- package/dist/src/components/a2ui/views/Timeout/Timeout.d.ts +9 -0
- package/dist/src/components/a2ui/views/Timeout/Timeout.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/Timeout/Timeout.js +27 -0
- package/dist/src/components/a2ui/views/weight.d.ts +7 -0
- package/dist/src/components/a2ui/views/weight.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/weight.js +9 -0
- package/dist/src/core/SurfaceErrorBoundary.d.ts +27 -0
- package/dist/src/core/SurfaceErrorBoundary.d.ts.map +1 -0
- package/dist/src/core/SurfaceErrorBoundary.js +24 -0
- package/dist/src/core/SurfaceGroupProvider.d.ts +40 -0
- package/dist/src/core/SurfaceGroupProvider.d.ts.map +1 -0
- package/dist/src/core/SurfaceGroupProvider.js +142 -0
- package/dist/src/core/SurfaceRenderer.d.ts +4 -0
- package/dist/src/core/SurfaceRenderer.d.ts.map +1 -0
- package/dist/src/core/SurfaceRenderer.js +64 -0
- package/dist/src/core/errors.d.ts +44 -0
- package/dist/src/core/errors.d.ts.map +1 -0
- package/dist/src/core/errors.js +42 -0
- package/dist/src/core/types.d.ts +11 -0
- package/dist/src/core/types.d.ts.map +1 -0
- package/dist/src/core/types.js +1 -0
- package/dist/src/core/unknownComponent.d.ts +28 -0
- package/dist/src/core/unknownComponent.d.ts.map +1 -0
- package/dist/src/core/unknownComponent.js +41 -0
- package/dist/src/{v0_9 → core}/useSurfaces.d.ts +3 -3
- package/dist/src/core/useSurfaces.d.ts.map +1 -0
- package/dist/src/utils/detectVersion.d.ts +4 -2
- package/dist/src/utils/detectVersion.d.ts.map +1 -1
- package/dist/src/utils/detectVersion.js +5 -1
- package/dist/src/v0_8/Provider.d.ts +2 -1
- package/dist/src/v0_8/Provider.d.ts.map +1 -1
- package/dist/src/v0_8/Provider.js +3 -8
- package/dist/src/v0_9/Provider.d.ts +13 -13
- package/dist/src/v0_9/Provider.d.ts.map +1 -1
- package/dist/src/v0_9/Provider.js +14 -61
- package/dist/src/v0_9/catalog.d.ts +2 -8
- package/dist/src/v0_9/catalog.d.ts.map +1 -1
- package/dist/src/v0_9/catalog.js +3 -17
- package/dist/src/v1_0/Provider.d.ts +27 -0
- package/dist/src/v1_0/Provider.d.ts.map +1 -0
- package/dist/src/v1_0/Provider.js +35 -0
- package/dist/src/v1_0/catalog.d.ts +52 -0
- package/dist/src/v1_0/catalog.d.ts.map +1 -0
- package/dist/src/v1_0/catalog.js +118 -0
- package/dist/src/v1_0/types.d.ts +13 -0
- package/dist/src/v1_0/types.d.ts.map +1 -0
- package/dist/src/v1_0/types.js +1 -0
- package/json/README.md +27 -30
- package/json/v0_9/glchat_standard_catalog_definition.json +5 -5
- package/json/v1_0/a2ui-sample-messages-extension.json +150 -0
- package/json/v1_0/a2ui-sample-messages.json +144 -0
- package/json/v1_0/glchat_extension_catalog_definition.json +794 -0
- package/json/v1_0/glchat_standard_catalog_definition.json +1487 -0
- package/package.json +4 -4
- package/styles/globals.css +136 -67
- package/dist/src/components/a2ui/v0_9/ChoicePicker/theme.d.ts.map +0 -1
- package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.d.ts +0 -231
- package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.d.ts.map +0 -1
- package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.js +0 -24
- package/dist/src/v0_9/SurfaceErrorBoundary.d.ts +0 -18
- package/dist/src/v0_9/SurfaceErrorBoundary.d.ts.map +0 -1
- package/dist/src/v0_9/SurfaceErrorBoundary.js +0 -24
- package/dist/src/v0_9/SurfaceRenderer.d.ts +0 -3
- package/dist/src/v0_9/SurfaceRenderer.d.ts.map +0 -1
- package/dist/src/v0_9/SurfaceRenderer.js +0 -47
- package/dist/src/v0_9/useSurfaces.d.ts.map +0 -1
- /package/dist/src/components/a2ui/{v0_9 → views}/ChoicePicker/theme.d.ts +0 -0
- /package/dist/src/components/a2ui/{v0_9 → views}/ChoicePicker/theme.js +0 -0
- /package/dist/src/{v0_9 → core}/useSurfaces.js +0 -0
package/dist/index.js
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
export { Provider, useSurfaceGroup, useA2UIRegistry, useA2UIVersion, } from './src/Provider.js';
|
|
2
2
|
export { SurfaceRenderer } from './src/SurfaceRenderer.js';
|
|
3
|
-
export { useSurfaces } from './src/
|
|
3
|
+
export { useSurfaces } from './src/core/useSurfaces.js';
|
|
4
4
|
export { createGlchatCatalog, GLCHAT_CATALOG_ID } from './src/v0_9/catalog.js';
|
|
5
|
-
export { createGlchatRegistry, GLCHAT_CATALOG_ID_V08, ensureGlchatComponentsRegistered } from './src/v0_8/registry.js';
|
|
5
|
+
export { createGlchatRegistry, GLCHAT_CATALOG_ID_V08, ensureGlchatComponentsRegistered, } from './src/v0_8/registry.js';
|
|
6
6
|
// GLChat custom component implementations and their schemas (v0.9)
|
|
7
7
|
export { GlchatAudioPlayerComponent } from './src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.js';
|
|
8
|
-
export { GlchatButtonComponent, GlchatButtonApi } from './src/components/a2ui/v0_9/Button/Button.js';
|
|
8
|
+
export { GlchatButtonComponent, GlchatButtonApi, } from './src/components/a2ui/v0_9/Button/Button.js';
|
|
9
9
|
export { GlchatChoicePickerComponent } from './src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.js';
|
|
10
|
-
export { GlchatTagInputComponent, TagInputApi } from './src/components/a2ui/v0_9/TagInput/TagInput.js';
|
|
10
|
+
export { GlchatTagInputComponent, TagInputApi, } from './src/components/a2ui/v0_9/TagInput/TagInput.js';
|
|
11
11
|
export { GlchatTimeoutComponent, TimeoutApi } from './src/components/a2ui/v0_9/Timeout/Timeout.js';
|
|
12
|
+
// GLChat A2UI v1.0 catalogs (full and GLChat-only) and their components.
|
|
13
|
+
export { createGlchatCatalogV1, createGlchatExtensionCatalogV1, createGlchatRuntimeCatalogsV1, GLCHAT_CATALOG_ID_V1, GLCHAT_EXTENSION_CATALOG_ID_V1, A2UI_BASIC_CATALOG_ID_V1, GLCHAT_V1_OVERRIDES, GLCHAT_V1_EXTENSIONS, COMPONENT_CATALOG_ID_KEY, } from './src/v1_0/catalog.js';
|
|
14
|
+
export { GlchatButtonComponentV1, GlchatButtonApiV1, } from './src/components/a2ui/v1_0/Button/Button.js';
|
|
15
|
+
export { GlchatChoicePickerComponentV1 } from './src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.js';
|
|
16
|
+
export { GlchatAudioPlayerComponentV1 } from './src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.js';
|
|
17
|
+
export { GlchatTagInputComponentV1, TagInputApiV1, } from './src/components/a2ui/v1_0/TagInput/TagInput.js';
|
|
18
|
+
export { GlchatTimeoutComponentV1, TimeoutApiV1, } from './src/components/a2ui/v1_0/Timeout/Timeout.js';
|
|
12
19
|
// Re-exports from the official `@a2ui/react` (v0.9), for authoring components.
|
|
13
20
|
export { A2uiSurface, createComponentImplementation, createBinderlessComponentImplementation, MarkdownContext, useMarkdownRenderer, } from '@a2ui/react/v0_9';
|
|
14
21
|
// Re-exports from `@a2ui/web_core` (v0.9)
|
|
15
22
|
export { Catalog, MessageProcessor, SurfaceModel, SurfaceGroupModel, ComponentIdSchema, ChildListSchema, ActionSchema, DynamicStringSchema, DynamicNumberSchema, DynamicBooleanSchema, DynamicStringListSchema, DynamicValueSchema, CheckableSchema, AccessibilityAttributesSchema, } from '@a2ui/web_core/v0_9';
|
|
23
|
+
// Re-exports from `@a2ui/web_core` (v1.0), for authoring v1.0 components. The
|
|
24
|
+
// v1.0 dynamic types use `@path` / `@call`, so they differ from the v0.9 ones.
|
|
25
|
+
export { ComponentIdSchema as ComponentIdSchemaV1, ChildListSchema as ChildListSchemaV1, ActionSchema as ActionSchemaV1, DynamicStringSchema as DynamicStringSchemaV1, DynamicNumberSchema as DynamicNumberSchemaV1, DynamicBooleanSchema as DynamicBooleanSchemaV1, DynamicStringListSchema as DynamicStringListSchemaV1, DynamicValueSchema as DynamicValueSchemaV1, } from '@a2ui/web_core/v1_0';
|
package/dist/src/Provider.d.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { ComponentRegistry } from '@a2ui/react/v0_8';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ReactCatalogComponent } from '@a2ui/react/v0_9';
|
|
4
4
|
import type { Theme } from '@a2ui/web_core/v0_8';
|
|
5
5
|
import type { A2uiClientAction, Catalog } from '@a2ui/web_core/v0_9';
|
|
6
6
|
import { type A2UIMessage, type A2UIVersion } from './utils/detectVersion.js';
|
|
7
|
+
import { type A2UIError } from './core/errors.js';
|
|
8
|
+
import type { ActionOptions } from './core/types.js';
|
|
7
9
|
import type { V08ActionPayload } from './v0_8/Provider.js';
|
|
10
|
+
import type { AgentMessageHandler, V1ActionPayload } from './v1_0/types.js';
|
|
8
11
|
export type { A2UIMessage } from './utils/detectVersion.js';
|
|
9
|
-
export type ActionPayload = A2uiClientAction | V08ActionPayload;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
export type ActionPayload = A2uiClientAction | V1ActionPayload | V08ActionPayload;
|
|
13
|
+
/**
|
|
14
|
+
* `options.dataModel` (v0.9 and v1.0) carries the data models of surfaces
|
|
15
|
+
* created with `sendDataModel: true`; it is omitted when no surface opted in.
|
|
16
|
+
*/
|
|
17
|
+
export type ActionHandler = (action: ActionPayload, options?: ActionOptions) => void | Promise<void>;
|
|
18
|
+
/** Receives every renderer error (see `A2UIError`). */
|
|
19
|
+
export type MessageErrorHandler = (error: A2UIError) => void;
|
|
12
20
|
export type ProviderProps = {
|
|
13
21
|
/**
|
|
14
22
|
* A2UI messages to process. Only **new** messages appended since the last
|
|
@@ -20,20 +28,37 @@ export type ProviderProps = {
|
|
|
20
28
|
* A2UI protocol version. When omitted, renders as `v0.9` provisionally until
|
|
21
29
|
* messages arrive, then auto-detects and locks from the first detectable
|
|
22
30
|
* message. The provisional default is not locked, so streaming can start
|
|
23
|
-
* empty and still settle on `v0.8` or `
|
|
31
|
+
* empty and still settle on `v0.8`, `v0.9` or `v1.0`.
|
|
24
32
|
*/
|
|
25
33
|
version?: A2UIVersion;
|
|
26
34
|
onAction?: ActionHandler;
|
|
27
35
|
onError?: MessageErrorHandler;
|
|
36
|
+
/**
|
|
37
|
+
* v1.0 only — messages the renderer emits for the agent:
|
|
38
|
+
* - function results
|
|
39
|
+
* - renderer to agent function calls
|
|
40
|
+
* - structured processing errors.
|
|
41
|
+
* Send them to the agent; its replies go into `messages`.
|
|
42
|
+
*/
|
|
43
|
+
onAgentMessage?: AgentMessageHandler;
|
|
28
44
|
/** v0.9 only — optional catalog override. */
|
|
29
|
-
catalog?: Catalog<
|
|
45
|
+
catalog?: Catalog<ReactCatalogComponent>;
|
|
46
|
+
/**
|
|
47
|
+
* v1.0 only — custom catalogs, added next to the built-in ones (A2UI basic,
|
|
48
|
+
* GLChat full, GLChat-only). A catalog with a built-in ID replaces it.
|
|
49
|
+
* Read once on mount.
|
|
50
|
+
*/
|
|
51
|
+
catalogsV1?: Catalog<ReactCatalogComponent>[];
|
|
30
52
|
/** v0.8 only — theme override merged into the GLChat default theme. */
|
|
31
53
|
theme?: Theme;
|
|
32
54
|
/** v0.8 only — optional component registry override. */
|
|
33
55
|
registry?: ComponentRegistry;
|
|
34
56
|
};
|
|
35
|
-
export declare function Provider({ messages, version: versionProp, onAction, onError, theme, catalog, registry, children, }: Readonly<PropsWithChildren<ProviderProps>>): import("react").JSX.Element;
|
|
57
|
+
export declare function Provider({ messages, version: versionProp, onAction, onError, onAgentMessage, theme, catalog, catalogsV1, registry, children, }: Readonly<PropsWithChildren<ProviderProps>>): import("react").JSX.Element;
|
|
36
58
|
export declare function useA2UIVersion(): A2UIVersion;
|
|
37
|
-
export { useSurfaceGroup } from './
|
|
59
|
+
export { useSurfaceGroup } from './core/SurfaceGroupProvider.js';
|
|
60
|
+
export type { ActionOptions, RendererDataModel } from './core/types.js';
|
|
61
|
+
export type { A2UIError, A2UIErrorSource } from './core/errors.js';
|
|
62
|
+
export type { A2UIAgentMessage, AgentMessageHandler, V1ActionPayload } from './v1_0/types.js';
|
|
38
63
|
export { useA2UIRegistry } from './v0_8/Provider.js';
|
|
39
64
|
//# sourceMappingURL=Provider.d.ts.map
|
|
@@ -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,
|
|
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,EAIjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE5E,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAClF;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,aAAa,KACpB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAC1B,uDAAuD;AACvD,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;AAE7D,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,6CAA6C;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACzC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,EAAE,CAAC;IAC9C,uEAAuE;IACvE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,wDAAwD;IACxD,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAoBF,wBAAgB,QAAQ,CAAC,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"}
|
package/dist/src/Provider.js
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { detectMessagesVersion, } from './utils/detectVersion.js';
|
|
5
|
+
import { createError, reportError } from './core/errors.js';
|
|
5
6
|
import { V08Provider } from './v0_8/Provider.js';
|
|
6
7
|
import { V09Provider } from './v0_9/Provider.js';
|
|
8
|
+
import { V1Provider } from './v1_0/Provider.js';
|
|
7
9
|
const A2UIVersionContext = createContext('v0.9');
|
|
8
10
|
/**
|
|
9
11
|
* Returns a definitive version when the caller set `version`, or when messages
|
|
@@ -18,7 +20,7 @@ function resolveKnownVersion(versionProp, messages) {
|
|
|
18
20
|
}
|
|
19
21
|
return null;
|
|
20
22
|
}
|
|
21
|
-
export function Provider({ messages, version: versionProp, onAction, onError, theme, catalog, registry, children, }) {
|
|
23
|
+
export function Provider({ messages, version: versionProp, onAction, onError, onAgentMessage, theme, catalog, catalogsV1, registry, children, }) {
|
|
22
24
|
const onErrorRef = useRef(onError);
|
|
23
25
|
const lockedVersionRef = useRef(null);
|
|
24
26
|
useEffect(() => {
|
|
@@ -36,14 +38,8 @@ export function Provider({ messages, version: versionProp, onAction, onError, th
|
|
|
36
38
|
return;
|
|
37
39
|
}
|
|
38
40
|
if (knownVersion !== lockedVersionRef.current) {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
onErrorRef.current(error);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
// eslint-disable-next-line no-console
|
|
45
|
-
console.error('[glchat-a2ui]', error);
|
|
46
|
-
}
|
|
41
|
+
const cause = new Error(`A2UI version mismatch: Provider is locked to ${lockedVersionRef.current}, but messages indicate ${knownVersion}.`);
|
|
42
|
+
reportError(createError('VERSION_MISMATCH', 'version', cause), onErrorRef.current);
|
|
47
43
|
return;
|
|
48
44
|
}
|
|
49
45
|
setActiveVersion(knownVersion);
|
|
@@ -51,10 +47,16 @@ export function Provider({ messages, version: versionProp, onAction, onError, th
|
|
|
51
47
|
if (activeVersion === 'v0.8') {
|
|
52
48
|
return (_jsx(A2UIVersionContext.Provider, { value: "v0.8", children: _jsx(V08Provider, { messages: messages, theme: theme, onAction: onAction, onError: onError, registry: registry, children: children }) }));
|
|
53
49
|
}
|
|
50
|
+
// v0.9 and v1.0 share the core pipeline; each version provider builds its
|
|
51
|
+
// own processor on mount. Settling from the provisional v0.9 on v1.0 swaps
|
|
52
|
+
// the provider type, which remounts it.
|
|
53
|
+
if (activeVersion === 'v1.0') {
|
|
54
|
+
return (_jsx(A2UIVersionContext.Provider, { value: "v1.0", children: _jsx(V1Provider, { messages: messages, onAction: onAction, onError: onError, onAgentMessage: onAgentMessage, catalogsV1: catalogsV1, children: children }) }));
|
|
55
|
+
}
|
|
54
56
|
return (_jsx(A2UIVersionContext.Provider, { value: "v0.9", children: _jsx(V09Provider, { messages: messages, onAction: onAction, onError: onError, catalog: catalog, children: children }) }));
|
|
55
57
|
}
|
|
56
58
|
export function useA2UIVersion() {
|
|
57
59
|
return useContext(A2UIVersionContext);
|
|
58
60
|
}
|
|
59
|
-
export { useSurfaceGroup } from './
|
|
61
|
+
export { useSurfaceGroup } from './core/SurfaceGroupProvider.js';
|
|
60
62
|
export { useA2UIRegistry } from './v0_8/Provider.js';
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { A2UIError } from './core/errors.js';
|
|
2
3
|
export type SurfaceRendererProps = {
|
|
3
4
|
/** When set, render only this surface. When omitted, render all active surfaces. */
|
|
4
5
|
surfaceId?: string;
|
|
5
6
|
className?: string;
|
|
6
|
-
/** Shown while no surface(s) are available to render. */
|
|
7
|
+
/** Shown while no surface(s) are available to render, or a surface has no root yet. */
|
|
7
8
|
fallback?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* v0.9 / v1.0 — shown in place of a surface that failed to process or render.
|
|
11
|
+
* Defaults to an inline alert: "Unable to display this content. (CODE)".
|
|
12
|
+
*/
|
|
13
|
+
errorFallback?: ReactNode | ((error: A2UIError) => ReactNode);
|
|
8
14
|
/** v0.8 only — loading fallback for lazy-loaded components. */
|
|
9
15
|
loadingFallback?: ReactNode;
|
|
10
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SurfaceRenderer.d.ts","sourceRoot":"","sources":["../../src/SurfaceRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SurfaceRenderer.d.ts","sourceRoot":"","sources":["../../src/SurfaceRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,MAAM,oBAAoB,GAAG;IACjC,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC;IAC9D,+DAA+D;IAC/D,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,+BAQpE"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useA2UIVersion } from './Provider.js';
|
|
4
4
|
import { V08SurfaceRenderer } from './v0_8/SurfaceRenderer.js';
|
|
5
|
-
import {
|
|
5
|
+
import { CoreSurfaceRenderer } from './core/SurfaceRenderer.js';
|
|
6
6
|
/**
|
|
7
7
|
* Renders one or all active A2UI surfaces from the nearest `Provider`.
|
|
8
8
|
*/
|
|
@@ -11,5 +11,5 @@ export function SurfaceRenderer(props) {
|
|
|
11
11
|
if (version === 'v0.8') {
|
|
12
12
|
return _jsx(V08SurfaceRenderer, { ...props });
|
|
13
13
|
}
|
|
14
|
-
return _jsx(
|
|
14
|
+
return _jsx(CoreSurfaceRenderer, { ...props });
|
|
15
15
|
}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* GLChat-styled AudioPlayer. Overrides the basic catalog native `<audio controls>`
|
|
3
|
-
* with the custom player UI (play/pause, scrubber, download).
|
|
4
|
-
*/
|
|
5
|
-
export declare const GlchatAudioPlayerComponent: import("@a2ui/react/v0_9").ReactComponentImplementation;
|
|
1
|
+
export declare const GlchatAudioPlayerComponent: import("@a2ui/react").ReactComponentImplementation<import("zod").ZodTypeAny>;
|
|
6
2
|
//# sourceMappingURL=AudioPlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioPlayer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AudioPlayer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,0BAA0B,8EAGtC,CAAC"}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
2
|
import { createComponentImplementation } from '@a2ui/react/v0_9';
|
|
4
3
|
import { AudioPlayerApi } from '@a2ui/web_core/v0_9/basic_catalog';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* GLChat-styled AudioPlayer. Overrides the basic catalog native `<audio controls>`
|
|
9
|
-
* with the custom player UI (play/pause, scrubber, download).
|
|
10
|
-
*/
|
|
11
|
-
export const GlchatAudioPlayerComponent = createComponentImplementation(AudioPlayerApi, ({ props }) => {
|
|
12
|
-
if (!props.url)
|
|
13
|
-
return null;
|
|
14
|
-
return (_jsx("div", { className: "a2ui-audioplayer", style: getWeightStyle(props.weight), children: _jsx(AudioPlayer, { src: props.url, title: props.description }) }));
|
|
15
|
-
});
|
|
4
|
+
import { GlchatAudioPlayerView } from '../../views/AudioPlayer/AudioPlayer.js';
|
|
5
|
+
export const GlchatAudioPlayerComponent = createComponentImplementation(AudioPlayerApi, GlchatAudioPlayerView);
|
|
@@ -5,207 +5,85 @@ import { z } from 'zod';
|
|
|
5
5
|
export declare const GlchatButtonApi: {
|
|
6
6
|
name: string;
|
|
7
7
|
schema: z.ZodObject<{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
path: z.ZodString;
|
|
14
|
-
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
path: string;
|
|
16
|
-
}, {
|
|
17
|
-
path: string;
|
|
18
|
-
}>, z.ZodObject<{
|
|
19
|
-
call: z.ZodString;
|
|
20
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
21
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
22
|
-
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
call: string;
|
|
24
|
-
args: Record<string, any>;
|
|
25
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
26
|
-
}, {
|
|
27
|
-
call: string;
|
|
28
|
-
args: Record<string, any>;
|
|
29
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
30
|
-
}>]>>>;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
name: string;
|
|
33
|
-
context?: Record<string, string | number | boolean | any[] | {
|
|
34
|
-
path: string;
|
|
35
|
-
} | {
|
|
36
|
-
call: string;
|
|
37
|
-
args: Record<string, any>;
|
|
38
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
39
|
-
}> | undefined;
|
|
8
|
+
accessibility: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
10
|
+
path: z.ZodString;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
path: string;
|
|
40
13
|
}, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
48
|
-
}> | undefined;
|
|
49
|
-
}>;
|
|
50
|
-
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
event: {
|
|
52
|
-
name: string;
|
|
53
|
-
context?: Record<string, string | number | boolean | any[] | {
|
|
54
|
-
path: string;
|
|
55
|
-
} | {
|
|
56
|
-
call: string;
|
|
57
|
-
args: Record<string, any>;
|
|
58
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
59
|
-
}> | undefined;
|
|
60
|
-
};
|
|
61
|
-
}, {
|
|
62
|
-
event: {
|
|
63
|
-
name: string;
|
|
64
|
-
context?: Record<string, string | number | boolean | any[] | {
|
|
65
|
-
path: string;
|
|
66
|
-
} | {
|
|
67
|
-
call: string;
|
|
68
|
-
args: Record<string, any>;
|
|
69
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
70
|
-
}> | undefined;
|
|
71
|
-
};
|
|
72
|
-
}>, z.ZodObject<{
|
|
73
|
-
functionCall: z.ZodObject<{
|
|
74
|
-
call: z.ZodString;
|
|
75
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
76
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
77
|
-
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
call: string;
|
|
79
|
-
args: Record<string, any>;
|
|
80
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
14
|
+
path: string;
|
|
15
|
+
}>, z.ZodType<import("@a2ui/web_core/v0_9").FunctionCall, z.ZodTypeDef, import("@a2ui/web_core/v0_9").FunctionCall>]>>;
|
|
16
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
17
|
+
path: z.ZodString;
|
|
18
|
+
}, "strict", z.ZodTypeAny, {
|
|
19
|
+
path: string;
|
|
81
20
|
}, {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
85
|
-
}>;
|
|
21
|
+
path: string;
|
|
22
|
+
}>, z.ZodType<import("@a2ui/web_core/v0_9").FunctionCall, z.ZodTypeDef, import("@a2ui/web_core/v0_9").FunctionCall>]>>;
|
|
86
23
|
}, "strip", z.ZodTypeAny, {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
24
|
+
label?: string | {
|
|
25
|
+
path: string;
|
|
26
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
27
|
+
description?: string | {
|
|
28
|
+
path: string;
|
|
29
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
92
30
|
}, {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
31
|
+
label?: string | {
|
|
32
|
+
path: string;
|
|
33
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
34
|
+
description?: string | {
|
|
35
|
+
path: string;
|
|
36
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
37
|
+
}>>;
|
|
99
38
|
checks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
39
|
condition: z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
101
40
|
path: z.ZodString;
|
|
102
|
-
}, "
|
|
41
|
+
}, "strict", z.ZodTypeAny, {
|
|
103
42
|
path: string;
|
|
104
43
|
}, {
|
|
105
44
|
path: string;
|
|
106
|
-
}>, z.
|
|
107
|
-
call: z.ZodString;
|
|
108
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
109
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
110
|
-
}, "strip", z.ZodTypeAny, {
|
|
111
|
-
call: string;
|
|
112
|
-
args: Record<string, any>;
|
|
113
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
114
|
-
}, {
|
|
115
|
-
call: string;
|
|
116
|
-
args: Record<string, any>;
|
|
117
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
118
|
-
}>]>;
|
|
45
|
+
}>, z.ZodType<import("@a2ui/web_core/v0_9").FunctionCall, z.ZodTypeDef, import("@a2ui/web_core/v0_9").FunctionCall>]>;
|
|
119
46
|
message: z.ZodString;
|
|
120
|
-
}, "
|
|
47
|
+
}, "strict", z.ZodTypeAny, {
|
|
121
48
|
message: string;
|
|
122
49
|
condition: boolean | {
|
|
123
50
|
path: string;
|
|
124
|
-
} |
|
|
125
|
-
call: string;
|
|
126
|
-
args: Record<string, any>;
|
|
127
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
128
|
-
};
|
|
51
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall;
|
|
129
52
|
}, {
|
|
130
53
|
message: string;
|
|
131
54
|
condition: boolean | {
|
|
132
55
|
path: string;
|
|
133
|
-
} |
|
|
134
|
-
call: string;
|
|
135
|
-
args: Record<string, any>;
|
|
136
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
137
|
-
};
|
|
56
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall;
|
|
138
57
|
}>, "many">>;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}, {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
call: z.ZodString;
|
|
148
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
149
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
150
|
-
}, "strip", z.ZodTypeAny, {
|
|
151
|
-
call: string;
|
|
152
|
-
args: Record<string, any>;
|
|
153
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
154
|
-
}, {
|
|
155
|
-
call: string;
|
|
156
|
-
args: Record<string, any>;
|
|
157
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
158
|
-
}>]>>;
|
|
159
|
-
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
160
|
-
path: z.ZodString;
|
|
161
|
-
}, "strip", z.ZodTypeAny, {
|
|
162
|
-
path: string;
|
|
163
|
-
}, {
|
|
164
|
-
path: string;
|
|
165
|
-
}>, z.ZodObject<{
|
|
166
|
-
call: z.ZodString;
|
|
167
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
168
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
169
|
-
}, "strip", z.ZodTypeAny, {
|
|
170
|
-
call: string;
|
|
171
|
-
args: Record<string, any>;
|
|
172
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
58
|
+
child: z.ZodString;
|
|
59
|
+
action: z.ZodUnion<[z.ZodObject<{
|
|
60
|
+
event: z.ZodObject<{
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("@a2ui/web_core/v0_9").DynamicValue, z.ZodTypeDef, import("@a2ui/web_core/v0_9").DynamicValue>>>;
|
|
63
|
+
}, "strict", z.ZodTypeAny, {
|
|
64
|
+
name: string;
|
|
65
|
+
context?: Record<string, import("@a2ui/web_core/v0_9").DynamicValue> | undefined;
|
|
173
66
|
}, {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
call: string;
|
|
183
|
-
args: Record<string, any>;
|
|
184
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
185
|
-
} | undefined;
|
|
186
|
-
label?: string | {
|
|
187
|
-
path: string;
|
|
188
|
-
} | {
|
|
189
|
-
call: string;
|
|
190
|
-
args: Record<string, any>;
|
|
191
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
192
|
-
} | undefined;
|
|
67
|
+
name: string;
|
|
68
|
+
context?: Record<string, import("@a2ui/web_core/v0_9").DynamicValue> | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
}, "strict", z.ZodTypeAny, {
|
|
71
|
+
event: {
|
|
72
|
+
name: string;
|
|
73
|
+
context?: Record<string, import("@a2ui/web_core/v0_9").DynamicValue> | undefined;
|
|
74
|
+
};
|
|
193
75
|
}, {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
args: Record<string, any>;
|
|
206
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
207
|
-
} | undefined;
|
|
208
|
-
}>>;
|
|
76
|
+
event: {
|
|
77
|
+
name: string;
|
|
78
|
+
context?: Record<string, import("@a2ui/web_core/v0_9").DynamicValue> | undefined;
|
|
79
|
+
};
|
|
80
|
+
}>, z.ZodObject<{
|
|
81
|
+
functionCall: z.ZodType<import("@a2ui/web_core/v0_9").FunctionCall, z.ZodTypeDef, import("@a2ui/web_core/v0_9").FunctionCall>;
|
|
82
|
+
}, "strict", z.ZodTypeAny, {
|
|
83
|
+
functionCall: import("@a2ui/web_core/v0_9").FunctionCall;
|
|
84
|
+
}, {
|
|
85
|
+
functionCall: import("@a2ui/web_core/v0_9").FunctionCall;
|
|
86
|
+
}>]>;
|
|
209
87
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
210
88
|
} & {
|
|
211
89
|
variant: z.ZodOptional<z.ZodDefault<z.ZodEnum<["default", "primary", "borderless", "destructive"]>>>;
|
|
@@ -214,101 +92,57 @@ export declare const GlchatButtonApi: {
|
|
|
214
92
|
action: {
|
|
215
93
|
event: {
|
|
216
94
|
name: string;
|
|
217
|
-
context?: Record<string,
|
|
218
|
-
path: string;
|
|
219
|
-
} | {
|
|
220
|
-
call: string;
|
|
221
|
-
args: Record<string, any>;
|
|
222
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
223
|
-
}> | undefined;
|
|
95
|
+
context?: Record<string, import("@a2ui/web_core/v0_9").DynamicValue> | undefined;
|
|
224
96
|
};
|
|
225
97
|
} | {
|
|
226
|
-
functionCall:
|
|
227
|
-
call: string;
|
|
228
|
-
args: Record<string, any>;
|
|
229
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
230
|
-
};
|
|
98
|
+
functionCall: import("@a2ui/web_core/v0_9").FunctionCall;
|
|
231
99
|
};
|
|
232
100
|
weight?: number | undefined;
|
|
233
101
|
variant?: "primary" | "destructive" | "borderless" | "default" | undefined;
|
|
234
102
|
accessibility?: {
|
|
235
|
-
description?: string | {
|
|
236
|
-
path: string;
|
|
237
|
-
} | {
|
|
238
|
-
call: string;
|
|
239
|
-
args: Record<string, any>;
|
|
240
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
241
|
-
} | undefined;
|
|
242
103
|
label?: string | {
|
|
243
104
|
path: string;
|
|
244
|
-
} |
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
} | undefined;
|
|
105
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
106
|
+
description?: string | {
|
|
107
|
+
path: string;
|
|
108
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
249
109
|
} | undefined;
|
|
250
110
|
checks?: {
|
|
251
111
|
message: string;
|
|
252
112
|
condition: boolean | {
|
|
253
113
|
path: string;
|
|
254
|
-
} |
|
|
255
|
-
call: string;
|
|
256
|
-
args: Record<string, any>;
|
|
257
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
258
|
-
};
|
|
114
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall;
|
|
259
115
|
}[] | undefined;
|
|
260
116
|
}, {
|
|
261
117
|
child: string;
|
|
262
118
|
action: {
|
|
263
119
|
event: {
|
|
264
120
|
name: string;
|
|
265
|
-
context?: Record<string,
|
|
266
|
-
path: string;
|
|
267
|
-
} | {
|
|
268
|
-
call: string;
|
|
269
|
-
args: Record<string, any>;
|
|
270
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
271
|
-
}> | undefined;
|
|
121
|
+
context?: Record<string, import("@a2ui/web_core/v0_9").DynamicValue> | undefined;
|
|
272
122
|
};
|
|
273
123
|
} | {
|
|
274
|
-
functionCall:
|
|
275
|
-
call: string;
|
|
276
|
-
args: Record<string, any>;
|
|
277
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
278
|
-
};
|
|
124
|
+
functionCall: import("@a2ui/web_core/v0_9").FunctionCall;
|
|
279
125
|
};
|
|
280
126
|
weight?: number | undefined;
|
|
281
127
|
variant?: "primary" | "destructive" | "borderless" | "default" | undefined;
|
|
282
128
|
accessibility?: {
|
|
283
|
-
description?: string | {
|
|
284
|
-
path: string;
|
|
285
|
-
} | {
|
|
286
|
-
call: string;
|
|
287
|
-
args: Record<string, any>;
|
|
288
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
289
|
-
} | undefined;
|
|
290
129
|
label?: string | {
|
|
291
130
|
path: string;
|
|
292
|
-
} |
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
} | undefined;
|
|
131
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
132
|
+
description?: string | {
|
|
133
|
+
path: string;
|
|
134
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
297
135
|
} | undefined;
|
|
298
136
|
checks?: {
|
|
299
137
|
message: string;
|
|
300
138
|
condition: boolean | {
|
|
301
139
|
path: string;
|
|
302
|
-
} |
|
|
303
|
-
call: string;
|
|
304
|
-
args: Record<string, any>;
|
|
305
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
306
|
-
};
|
|
140
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall;
|
|
307
141
|
}[] | undefined;
|
|
308
142
|
}>;
|
|
309
143
|
};
|
|
310
144
|
/**
|
|
311
145
|
* GLChat-styled Button. Overrides the basic catalog `Button` with extended variants.
|
|
312
146
|
*/
|
|
313
|
-
export declare const GlchatButtonComponent: import("@a2ui/react
|
|
147
|
+
export declare const GlchatButtonComponent: import("@a2ui/react").ReactComponentImplementation<z.ZodTypeAny>;
|
|
314
148
|
//# sourceMappingURL=Button.d.ts.map
|