glchat-a2ui-react-renderer 0.3.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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_8/UnknownComponent/UnknownComponent.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_8/UnknownComponent/UnknownComponent.js +1 -1
- 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 +75 -241
- 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 +26 -102
- 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/components/ui/InlineAlert/InlineAlert.d.ts +60 -9
- package/dist/src/components/ui/InlineAlert/InlineAlert.d.ts.map +1 -1
- package/dist/src/components/ui/InlineAlert/InlineAlert.js +4 -3
- 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 +38 -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 +1 -1
- 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 +4 -9
- 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 +180 -86
- 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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'react';
|
|
2
1
|
import { z, type ZodTypeAny } from 'zod';
|
|
3
2
|
/**
|
|
4
3
|
* Catalog-level common properties shared by every component, mirroring the
|
|
@@ -8,80 +7,35 @@ export declare const CommonProps: {
|
|
|
8
7
|
accessibility: z.ZodOptional<z.ZodObject<{
|
|
9
8
|
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
10
9
|
path: z.ZodString;
|
|
11
|
-
}, "
|
|
10
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
11
|
path: string;
|
|
13
12
|
}, {
|
|
14
13
|
path: string;
|
|
15
|
-
}>, z.
|
|
16
|
-
call: z.ZodString;
|
|
17
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
18
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
call: string;
|
|
21
|
-
args: Record<string, any>;
|
|
22
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
23
|
-
}, {
|
|
24
|
-
call: string;
|
|
25
|
-
args: Record<string, any>;
|
|
26
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
27
|
-
}>]>>;
|
|
14
|
+
}>, z.ZodType<import("@a2ui/web_core/v0_9").FunctionCall, z.ZodTypeDef, import("@a2ui/web_core/v0_9").FunctionCall>]>>;
|
|
28
15
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
29
16
|
path: z.ZodString;
|
|
30
|
-
}, "
|
|
17
|
+
}, "strict", z.ZodTypeAny, {
|
|
31
18
|
path: string;
|
|
32
19
|
}, {
|
|
33
20
|
path: string;
|
|
34
|
-
}>, z.
|
|
35
|
-
call: z.ZodString;
|
|
36
|
-
args: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
37
|
-
returnType: z.ZodDefault<z.ZodEnum<["string", "number", "boolean", "array", "object", "any", "void"]>>;
|
|
38
|
-
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
call: string;
|
|
40
|
-
args: Record<string, any>;
|
|
41
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
42
|
-
}, {
|
|
43
|
-
call: string;
|
|
44
|
-
args: Record<string, any>;
|
|
45
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
46
|
-
}>]>>;
|
|
21
|
+
}>, z.ZodType<import("@a2ui/web_core/v0_9").FunctionCall, z.ZodTypeDef, import("@a2ui/web_core/v0_9").FunctionCall>]>>;
|
|
47
22
|
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
description?: string | {
|
|
49
|
-
path: string;
|
|
50
|
-
} | {
|
|
51
|
-
call: string;
|
|
52
|
-
args: Record<string, any>;
|
|
53
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
54
|
-
} | undefined;
|
|
55
23
|
label?: string | {
|
|
56
24
|
path: string;
|
|
57
|
-
} |
|
|
58
|
-
call: string;
|
|
59
|
-
args: Record<string, any>;
|
|
60
|
-
returnType: "string" | "number" | "boolean" | "object" | "array" | "void" | "any";
|
|
61
|
-
} | undefined;
|
|
62
|
-
}, {
|
|
25
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
63
26
|
description?: string | {
|
|
64
27
|
path: string;
|
|
65
|
-
} |
|
|
66
|
-
|
|
67
|
-
args: Record<string, any>;
|
|
68
|
-
returnType?: "string" | "number" | "boolean" | "object" | "array" | "void" | "any" | undefined;
|
|
69
|
-
} | undefined;
|
|
28
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
29
|
+
}, {
|
|
70
30
|
label?: string | {
|
|
71
31
|
path: string;
|
|
72
|
-
} |
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
} | undefined;
|
|
32
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
33
|
+
description?: string | {
|
|
34
|
+
path: string;
|
|
35
|
+
} | import("@a2ui/web_core/v0_9").FunctionCall | undefined;
|
|
77
36
|
}>>;
|
|
78
37
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
79
38
|
};
|
|
80
|
-
/**
|
|
81
|
-
* Maps the A2UI `weight` property to a flex style, matching the basic catalog.
|
|
82
|
-
* Only meaningful when the component is a direct child of a Row/Column.
|
|
83
|
-
*/
|
|
84
|
-
export declare function getWeightStyle(weight: number | undefined): CSSProperties | undefined;
|
|
85
39
|
/** Preserves A2UI `REF:` tags when adding a field description for catalog JSON generation. */
|
|
86
40
|
export declare function describeDynamic<T extends ZodTypeAny>(schema: T, def: string, description: string): T;
|
|
87
41
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/components/a2ui/v0_9/common.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/components/a2ui/v0_9/common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,KAAK,UAAU,EAAE,MAAM,KAAK,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGvB,CAAC;AAEF,8FAA8F;AAC9F,wBAAgB,eAAe,CAAC,CAAC,SAAS,UAAU,EAClD,MAAM,EAAE,CAAC,EACT,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,CAEH"}
|
|
@@ -8,15 +8,6 @@ export const CommonProps = {
|
|
|
8
8
|
accessibility: AccessibilityAttributesSchema.optional(),
|
|
9
9
|
weight: z.number().optional(),
|
|
10
10
|
};
|
|
11
|
-
/**
|
|
12
|
-
* Maps the A2UI `weight` property to a flex style, matching the basic catalog.
|
|
13
|
-
* Only meaningful when the component is a direct child of a Row/Column.
|
|
14
|
-
*/
|
|
15
|
-
export function getWeightStyle(weight) {
|
|
16
|
-
if (typeof weight !== 'number')
|
|
17
|
-
return undefined;
|
|
18
|
-
return { flex: `${weight}`, minWidth: 0, minHeight: 0 };
|
|
19
|
-
}
|
|
20
11
|
/** Preserves A2UI `REF:` tags when adding a field description for catalog JSON generation. */
|
|
21
12
|
export function describeDynamic(schema, def, description) {
|
|
22
13
|
return schema.describe(`REF:common_types.json#/$defs/${def}|${description}`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioPlayer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.tsx"],"names":[],"mappings":"AAOA,qFAAqF;AACrF,eAAO,MAAM,4BAA4B,8EAGxC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createComponentImplementation } from '@a2ui/react';
|
|
3
|
+
import { AudioPlayerApi } from '@a2ui/web_core/catalogs/basic/v1';
|
|
4
|
+
import { GlchatAudioPlayerView } from '../../views/AudioPlayer/AudioPlayer.js';
|
|
5
|
+
/** GLChat-styled AudioPlayer for v1.0 catalogs (upstream v1 schema, GLChat view). */
|
|
6
|
+
export const GlchatAudioPlayerComponentV1 = createComponentImplementation(AudioPlayerApi, GlchatAudioPlayerView);
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* GLChat Button schema (A2UI v1.0) — upstream v1 `ButtonApi` with an extra
|
|
4
|
+
* `destructive` variant.
|
|
5
|
+
*
|
|
6
|
+
* `.extend()` drops upstream's `spec()` annotation, so it is re-applied with the
|
|
7
|
+
* same mixins as the v1 basic `ButtonApi`. `Catalog.toJson()` then emits the
|
|
8
|
+
* Button in the same `allOf` shape as the basic catalog.
|
|
9
|
+
*/
|
|
10
|
+
export declare const GlchatButtonApiV1: {
|
|
11
|
+
name: string;
|
|
12
|
+
schema: z.ZodObject<{
|
|
13
|
+
checks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
14
|
+
condition: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
15
|
+
"@path": z.ZodOptional<z.ZodString>;
|
|
16
|
+
path: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
path?: string | undefined;
|
|
19
|
+
"@path"?: string | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
path?: string | undefined;
|
|
22
|
+
"@path"?: string | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
path?: string | undefined;
|
|
25
|
+
"@path"?: string | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
path?: string | undefined;
|
|
28
|
+
"@path"?: string | undefined;
|
|
29
|
+
}>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
30
|
+
"@call": z.ZodOptional<z.ZodString>;
|
|
31
|
+
call: z.ZodOptional<z.ZodString>;
|
|
32
|
+
catalogId: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
call?: string | undefined;
|
|
35
|
+
"@call"?: string | undefined;
|
|
36
|
+
catalogId?: string | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
call?: string | undefined;
|
|
39
|
+
"@call"?: string | undefined;
|
|
40
|
+
catalogId?: string | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
call?: string | undefined;
|
|
43
|
+
"@call"?: string | undefined;
|
|
44
|
+
catalogId?: string | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
call?: string | undefined;
|
|
47
|
+
"@call"?: string | undefined;
|
|
48
|
+
catalogId?: string | undefined;
|
|
49
|
+
}>, z.ZodAny>>]>;
|
|
50
|
+
message: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, "strict", z.ZodTypeAny, {
|
|
52
|
+
message?: string | undefined;
|
|
53
|
+
condition?: any;
|
|
54
|
+
}, {
|
|
55
|
+
message?: string | undefined;
|
|
56
|
+
condition?: any;
|
|
57
|
+
}>, "many">>;
|
|
58
|
+
child: z.ZodString;
|
|
59
|
+
action: z.ZodUnion<[z.ZodObject<{
|
|
60
|
+
event: z.ZodObject<{
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
userMessage: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
63
|
+
"@path": z.ZodOptional<z.ZodString>;
|
|
64
|
+
path: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
path?: string | undefined;
|
|
67
|
+
"@path"?: string | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
path?: string | undefined;
|
|
70
|
+
"@path"?: string | undefined;
|
|
71
|
+
}>, {
|
|
72
|
+
path?: string | undefined;
|
|
73
|
+
"@path"?: string | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
path?: string | undefined;
|
|
76
|
+
"@path"?: string | undefined;
|
|
77
|
+
}>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
78
|
+
"@call": z.ZodOptional<z.ZodString>;
|
|
79
|
+
call: z.ZodOptional<z.ZodString>;
|
|
80
|
+
catalogId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
call?: string | undefined;
|
|
83
|
+
"@call"?: string | undefined;
|
|
84
|
+
catalogId?: string | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
call?: string | undefined;
|
|
87
|
+
"@call"?: string | undefined;
|
|
88
|
+
catalogId?: string | undefined;
|
|
89
|
+
}>, {
|
|
90
|
+
call?: string | undefined;
|
|
91
|
+
"@call"?: string | undefined;
|
|
92
|
+
catalogId?: string | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
call?: string | undefined;
|
|
95
|
+
"@call"?: string | undefined;
|
|
96
|
+
catalogId?: string | undefined;
|
|
97
|
+
}>, z.ZodAny>>]>>;
|
|
98
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodAny, "many">, z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>, z.ZodEffects<z.ZodObject<{
|
|
99
|
+
"@path": z.ZodOptional<z.ZodString>;
|
|
100
|
+
path: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
path?: string | undefined;
|
|
103
|
+
"@path"?: string | undefined;
|
|
104
|
+
}, {
|
|
105
|
+
path?: string | undefined;
|
|
106
|
+
"@path"?: string | undefined;
|
|
107
|
+
}>, {
|
|
108
|
+
path?: string | undefined;
|
|
109
|
+
"@path"?: string | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
path?: string | undefined;
|
|
112
|
+
"@path"?: string | undefined;
|
|
113
|
+
}>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
114
|
+
"@call": z.ZodOptional<z.ZodString>;
|
|
115
|
+
call: z.ZodOptional<z.ZodString>;
|
|
116
|
+
catalogId: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, "strip", z.ZodTypeAny, {
|
|
118
|
+
call?: string | undefined;
|
|
119
|
+
"@call"?: string | undefined;
|
|
120
|
+
catalogId?: string | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
call?: string | undefined;
|
|
123
|
+
"@call"?: string | undefined;
|
|
124
|
+
catalogId?: string | undefined;
|
|
125
|
+
}>, {
|
|
126
|
+
call?: string | undefined;
|
|
127
|
+
"@call"?: string | undefined;
|
|
128
|
+
catalogId?: string | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
call?: string | undefined;
|
|
131
|
+
"@call"?: string | undefined;
|
|
132
|
+
catalogId?: string | undefined;
|
|
133
|
+
}>, z.ZodAny>>]>>>;
|
|
134
|
+
}, "strict", z.ZodTypeAny, {
|
|
135
|
+
name: string;
|
|
136
|
+
context?: Record<string, any> | undefined;
|
|
137
|
+
userMessage?: any;
|
|
138
|
+
}, {
|
|
139
|
+
name: string;
|
|
140
|
+
context?: Record<string, any> | undefined;
|
|
141
|
+
userMessage?: any;
|
|
142
|
+
}>;
|
|
143
|
+
}, "strict", z.ZodTypeAny, {
|
|
144
|
+
event: {
|
|
145
|
+
name: string;
|
|
146
|
+
context?: Record<string, any> | undefined;
|
|
147
|
+
userMessage?: any;
|
|
148
|
+
};
|
|
149
|
+
}, {
|
|
150
|
+
event: {
|
|
151
|
+
name: string;
|
|
152
|
+
context?: Record<string, any> | undefined;
|
|
153
|
+
userMessage?: any;
|
|
154
|
+
};
|
|
155
|
+
}>, z.ZodObject<{
|
|
156
|
+
functionCall: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
157
|
+
"@call": z.ZodOptional<z.ZodString>;
|
|
158
|
+
call: z.ZodOptional<z.ZodString>;
|
|
159
|
+
catalogId: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, "strip", z.ZodTypeAny, {
|
|
161
|
+
call?: string | undefined;
|
|
162
|
+
"@call"?: string | undefined;
|
|
163
|
+
catalogId?: string | undefined;
|
|
164
|
+
}, {
|
|
165
|
+
call?: string | undefined;
|
|
166
|
+
"@call"?: string | undefined;
|
|
167
|
+
catalogId?: string | undefined;
|
|
168
|
+
}>, {
|
|
169
|
+
call?: string | undefined;
|
|
170
|
+
"@call"?: string | undefined;
|
|
171
|
+
catalogId?: string | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
call?: string | undefined;
|
|
174
|
+
"@call"?: string | undefined;
|
|
175
|
+
catalogId?: string | undefined;
|
|
176
|
+
}>, z.ZodAny>>;
|
|
177
|
+
}, "strict", z.ZodTypeAny, {
|
|
178
|
+
functionCall?: any;
|
|
179
|
+
}, {
|
|
180
|
+
functionCall?: any;
|
|
181
|
+
}>]>;
|
|
182
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
} & {
|
|
184
|
+
variant: z.ZodOptional<z.ZodDefault<z.ZodEnum<["default", "primary", "borderless", "destructive"]>>>;
|
|
185
|
+
}, "strict", z.ZodTypeAny, {
|
|
186
|
+
child: string;
|
|
187
|
+
action: {
|
|
188
|
+
event: {
|
|
189
|
+
name: string;
|
|
190
|
+
context?: Record<string, any> | undefined;
|
|
191
|
+
userMessage?: any;
|
|
192
|
+
};
|
|
193
|
+
} | {
|
|
194
|
+
functionCall?: any;
|
|
195
|
+
};
|
|
196
|
+
weight?: number | undefined;
|
|
197
|
+
variant?: "primary" | "destructive" | "borderless" | "default" | undefined;
|
|
198
|
+
checks?: {
|
|
199
|
+
message?: string | undefined;
|
|
200
|
+
condition?: any;
|
|
201
|
+
}[] | undefined;
|
|
202
|
+
}, {
|
|
203
|
+
child: string;
|
|
204
|
+
action: {
|
|
205
|
+
event: {
|
|
206
|
+
name: string;
|
|
207
|
+
context?: Record<string, any> | undefined;
|
|
208
|
+
userMessage?: any;
|
|
209
|
+
};
|
|
210
|
+
} | {
|
|
211
|
+
functionCall?: any;
|
|
212
|
+
};
|
|
213
|
+
weight?: number | undefined;
|
|
214
|
+
variant?: "primary" | "destructive" | "borderless" | "default" | undefined;
|
|
215
|
+
checks?: {
|
|
216
|
+
message?: string | undefined;
|
|
217
|
+
condition?: any;
|
|
218
|
+
}[] | undefined;
|
|
219
|
+
}>;
|
|
220
|
+
};
|
|
221
|
+
/** GLChat-styled Button for v1.0 catalogs (same view as v0.9). */
|
|
222
|
+
export declare const GlchatButtonComponentV1: import("@a2ui/react").ReactComponentImplementation<z.ZodTypeAny>;
|
|
223
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v1_0/Button/Button.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;oBAqB06tB,CAAC;uBAA6C,CAAC;;oBAA2D,CAAC;uBAA6C,CAAC;;oBAA4D,CAAC;uBAA6C,CAAC;;oBAA2D,CAAC;uBAA6C,CAAC;;;;;;oBAAmW,CAAC;uBAA6C,CAAC;yBAA+C,CAAC;;oBAA2D,CAAC;uBAA6C,CAAC;yBAA+C,CAAC;;oBAA4D,CAAC;uBAA6C,CAAC;yBAA+C,CAAC;;oBAA2D,CAAC;uBAA6C,CAAC;yBAA+C,CAAC;;;;mBAA6J,CAAC;qBAA2C,CAAC;;mBAAuC,CAAC;qBAA2C,CAAC;;;;;;;;;;wBAAwhB,CAAC;2BAAiD,CAAC;;wBAAmE,CAAC;2BAAiD,CAAC;;wBAAoE,CAAC;2BAAiD,CAAC;;wBAAmE,CAAC;2BAAiD,CAAC;;;;;;wBAA2X,CAAC;2BAAiD,CAAC;6BAAmD,CAAC;;wBAAmE,CAAC;2BAAiD,CAAC;6BAAmD,CAAC;;wBAAoE,CAAC;2BAAiD,CAAC;6BAAmD,CAAC;;wBAAmE,CAAC;2BAAiD,CAAC;6BAAmD,CAAC;;;;;;wBAAigB,CAAC;2BAAiD,CAAC;;wBAAmE,CAAC;2BAAiD,CAAC;;wBAAoE,CAAC;2BAAiD,CAAC;;wBAAmE,CAAC;2BAAiD,CAAC;;;;;;wBAA2X,CAAC;2BAAiD,CAAC;6BAAmD,CAAC;;wBAAmE,CAAC;2BAAiD,CAAC;6BAAmD,CAAC;;wBAAoE,CAAC;2BAAiD,CAAC;6BAAmD,CAAC;;wBAAmE,CAAC;2BAAiD,CAAC;6BAAmD,CAAC;;;;uBAAwJ,CAAC;2BAA8D,CAAC;;;uBAA6E,CAAC;2BAA8D,CAAC;;;;;uBAAsI,CAAC;2BAA8D,CAAC;;;;;uBAA6G,CAAC;2BAA8D,CAAC;;;;;;;;oBAAuY,CAAC;uBAA6C,CAAC;yBAA+C,CAAC;;oBAA2D,CAAC;uBAA6C,CAAC;yBAA+C,CAAC;;oBAA4D,CAAC;uBAA6C,CAAC;yBAA+C,CAAC;;oBAA2D,CAAC;uBAA6C,CAAC;yBAA+C,CAAC;;;wBAA+G,CAAC;;wBAA4C,CAAC;;;;;;;;;;uBAA/zC,CAAC;2BAA8D,CAAC;;;;;;;;;;;;;;;;uBAA6G,CAAC;2BAA8D,CAAC;;;;;;;;;;;;CAPn85B,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,uBAAuB,kEAGnC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createComponentImplementation } from '@a2ui/react';
|
|
3
|
+
import { ButtonApi } from '@a2ui/web_core/catalogs/basic/v1';
|
|
4
|
+
import { spec } from '@a2ui/web_core/v1_0';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { GlchatButtonView } from '../../views/Button/Button.js';
|
|
7
|
+
/**
|
|
8
|
+
* GLChat Button schema (A2UI v1.0) — upstream v1 `ButtonApi` with an extra
|
|
9
|
+
* `destructive` variant.
|
|
10
|
+
*
|
|
11
|
+
* `.extend()` drops upstream's `spec()` annotation, so it is re-applied with the
|
|
12
|
+
* same mixins as the v1 basic `ButtonApi`. `Catalog.toJson()` then emits the
|
|
13
|
+
* Button in the same `allOf` shape as the basic catalog.
|
|
14
|
+
*/
|
|
15
|
+
export const GlchatButtonApiV1 = {
|
|
16
|
+
name: 'Button',
|
|
17
|
+
schema: spec(ButtonApi.schema.extend({
|
|
18
|
+
variant: z
|
|
19
|
+
.enum(['default', 'primary', 'borderless', 'destructive'])
|
|
20
|
+
.default('default')
|
|
21
|
+
.describe("A hint for the button style. If omitted, a default button style is used. 'primary' indicates this is the main call-to-action button. 'borderless' means the button has no visual border or background, making its child content appear like a clickable link. 'destructive' indicates a dangerous or irreversible action.")
|
|
22
|
+
.optional(),
|
|
23
|
+
}), { mixins: ['Checkable'] }),
|
|
24
|
+
};
|
|
25
|
+
/** GLChat-styled Button for v1.0 catalogs (same view as v0.9). */
|
|
26
|
+
export const GlchatButtonComponentV1 = createComponentImplementation(GlchatButtonApiV1, GlchatButtonView);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChoicePicker.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.tsx"],"names":[],"mappings":"AAOA,sFAAsF;AACtF,eAAO,MAAM,6BAA6B,8EAGzC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createComponentImplementation } from '@a2ui/react';
|
|
3
|
+
import { ChoicePickerApi } from '@a2ui/web_core/catalogs/basic/v1';
|
|
4
|
+
import { GlchatChoicePickerView } from '../../views/ChoicePicker/ChoicePicker.js';
|
|
5
|
+
/** GLChat-styled ChoicePicker for v1.0 catalogs (upstream v1 schema, GLChat view). */
|
|
6
|
+
export const GlchatChoicePickerComponentV1 = createComponentImplementation(ChoicePickerApi, GlchatChoicePickerView);
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Tag input field for adding and removing string tags (GLChat extension, v1.0).
|
|
4
|
+
* `validationRegexp` validates each tag before it is added; this is a per-tag
|
|
5
|
+
* rule, distinct from field-level `@checks`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TagInputApiV1: {
|
|
8
|
+
name: string;
|
|
9
|
+
schema: z.ZodObject<{
|
|
10
|
+
label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
11
|
+
'@path': z.ZodOptional<z.ZodString>;
|
|
12
|
+
path: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
path?: string | undefined;
|
|
15
|
+
'@path'?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
path?: string | undefined;
|
|
18
|
+
'@path'?: string | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
path?: string | undefined;
|
|
21
|
+
'@path'?: string | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
path?: string | undefined;
|
|
24
|
+
'@path'?: string | undefined;
|
|
25
|
+
}>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
26
|
+
'@call': z.ZodOptional<z.ZodString>;
|
|
27
|
+
call: z.ZodOptional<z.ZodString>;
|
|
28
|
+
catalogId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
call?: string | undefined;
|
|
31
|
+
'@call'?: string | undefined;
|
|
32
|
+
catalogId?: string | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
call?: string | undefined;
|
|
35
|
+
'@call'?: string | undefined;
|
|
36
|
+
catalogId?: string | undefined;
|
|
37
|
+
}>, {
|
|
38
|
+
call?: string | undefined;
|
|
39
|
+
'@call'?: string | undefined;
|
|
40
|
+
catalogId?: string | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
call?: string | undefined;
|
|
43
|
+
'@call'?: string | undefined;
|
|
44
|
+
catalogId?: string | undefined;
|
|
45
|
+
}>, z.ZodAny>>]>>;
|
|
46
|
+
value: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodEffects<z.ZodObject<{
|
|
47
|
+
'@path': z.ZodOptional<z.ZodString>;
|
|
48
|
+
path: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
path?: string | undefined;
|
|
51
|
+
'@path'?: string | undefined;
|
|
52
|
+
}, {
|
|
53
|
+
path?: string | undefined;
|
|
54
|
+
'@path'?: string | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
path?: string | undefined;
|
|
57
|
+
'@path'?: string | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
path?: string | undefined;
|
|
60
|
+
'@path'?: string | undefined;
|
|
61
|
+
}>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
62
|
+
'@call': z.ZodOptional<z.ZodString>;
|
|
63
|
+
call: z.ZodOptional<z.ZodString>;
|
|
64
|
+
catalogId: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
call?: string | undefined;
|
|
67
|
+
'@call'?: string | undefined;
|
|
68
|
+
catalogId?: string | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
call?: string | undefined;
|
|
71
|
+
'@call'?: string | undefined;
|
|
72
|
+
catalogId?: string | undefined;
|
|
73
|
+
}>, {
|
|
74
|
+
call?: string | undefined;
|
|
75
|
+
'@call'?: string | undefined;
|
|
76
|
+
catalogId?: string | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
call?: string | undefined;
|
|
79
|
+
'@call'?: string | undefined;
|
|
80
|
+
catalogId?: string | undefined;
|
|
81
|
+
}>, z.ZodAny>>]>;
|
|
82
|
+
placeholder: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
83
|
+
'@path': z.ZodOptional<z.ZodString>;
|
|
84
|
+
path: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
path?: string | undefined;
|
|
87
|
+
'@path'?: string | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
path?: string | undefined;
|
|
90
|
+
'@path'?: string | undefined;
|
|
91
|
+
}>, {
|
|
92
|
+
path?: string | undefined;
|
|
93
|
+
'@path'?: string | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
path?: string | undefined;
|
|
96
|
+
'@path'?: string | undefined;
|
|
97
|
+
}>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
98
|
+
'@call': z.ZodOptional<z.ZodString>;
|
|
99
|
+
call: z.ZodOptional<z.ZodString>;
|
|
100
|
+
catalogId: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
call?: string | undefined;
|
|
103
|
+
'@call'?: string | undefined;
|
|
104
|
+
catalogId?: string | undefined;
|
|
105
|
+
}, {
|
|
106
|
+
call?: string | undefined;
|
|
107
|
+
'@call'?: string | undefined;
|
|
108
|
+
catalogId?: string | undefined;
|
|
109
|
+
}>, {
|
|
110
|
+
call?: string | undefined;
|
|
111
|
+
'@call'?: string | undefined;
|
|
112
|
+
catalogId?: string | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
call?: string | undefined;
|
|
115
|
+
'@call'?: string | undefined;
|
|
116
|
+
catalogId?: string | undefined;
|
|
117
|
+
}>, z.ZodAny>>]>>;
|
|
118
|
+
disabled: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodEffects<z.ZodObject<{
|
|
119
|
+
'@path': z.ZodOptional<z.ZodString>;
|
|
120
|
+
path: z.ZodOptional<z.ZodString>;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
path?: string | undefined;
|
|
123
|
+
'@path'?: string | undefined;
|
|
124
|
+
}, {
|
|
125
|
+
path?: string | undefined;
|
|
126
|
+
'@path'?: string | undefined;
|
|
127
|
+
}>, {
|
|
128
|
+
path?: string | undefined;
|
|
129
|
+
'@path'?: string | undefined;
|
|
130
|
+
}, {
|
|
131
|
+
path?: string | undefined;
|
|
132
|
+
'@path'?: string | undefined;
|
|
133
|
+
}>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
134
|
+
'@call': z.ZodOptional<z.ZodString>;
|
|
135
|
+
call: z.ZodOptional<z.ZodString>;
|
|
136
|
+
catalogId: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
call?: string | undefined;
|
|
139
|
+
'@call'?: string | undefined;
|
|
140
|
+
catalogId?: string | undefined;
|
|
141
|
+
}, {
|
|
142
|
+
call?: string | undefined;
|
|
143
|
+
'@call'?: string | undefined;
|
|
144
|
+
catalogId?: string | undefined;
|
|
145
|
+
}>, {
|
|
146
|
+
call?: string | undefined;
|
|
147
|
+
'@call'?: string | undefined;
|
|
148
|
+
catalogId?: string | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
call?: string | undefined;
|
|
151
|
+
'@call'?: string | undefined;
|
|
152
|
+
catalogId?: string | undefined;
|
|
153
|
+
}>, z.ZodAny>>]>>;
|
|
154
|
+
disableTextInput: z.ZodOptional<z.ZodBoolean>;
|
|
155
|
+
validationRegexp: z.ZodOptional<z.ZodString>;
|
|
156
|
+
validationErrorMessage: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
157
|
+
'@path': z.ZodOptional<z.ZodString>;
|
|
158
|
+
path: z.ZodOptional<z.ZodString>;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
path?: string | undefined;
|
|
161
|
+
'@path'?: string | undefined;
|
|
162
|
+
}, {
|
|
163
|
+
path?: string | undefined;
|
|
164
|
+
'@path'?: string | undefined;
|
|
165
|
+
}>, {
|
|
166
|
+
path?: string | undefined;
|
|
167
|
+
'@path'?: string | undefined;
|
|
168
|
+
}, {
|
|
169
|
+
path?: string | undefined;
|
|
170
|
+
'@path'?: string | undefined;
|
|
171
|
+
}>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodIntersection<z.ZodEffects<z.ZodObject<{
|
|
172
|
+
'@call': z.ZodOptional<z.ZodString>;
|
|
173
|
+
call: z.ZodOptional<z.ZodString>;
|
|
174
|
+
catalogId: z.ZodOptional<z.ZodString>;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
call?: string | undefined;
|
|
177
|
+
'@call'?: string | undefined;
|
|
178
|
+
catalogId?: string | undefined;
|
|
179
|
+
}, {
|
|
180
|
+
call?: string | undefined;
|
|
181
|
+
'@call'?: string | undefined;
|
|
182
|
+
catalogId?: string | undefined;
|
|
183
|
+
}>, {
|
|
184
|
+
call?: string | undefined;
|
|
185
|
+
'@call'?: string | undefined;
|
|
186
|
+
catalogId?: string | undefined;
|
|
187
|
+
}, {
|
|
188
|
+
call?: string | undefined;
|
|
189
|
+
'@call'?: string | undefined;
|
|
190
|
+
catalogId?: string | undefined;
|
|
191
|
+
}>, z.ZodAny>>]>>;
|
|
192
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
}, "strict", z.ZodTypeAny, {
|
|
194
|
+
disabled?: any;
|
|
195
|
+
value?: any;
|
|
196
|
+
weight?: number | undefined;
|
|
197
|
+
placeholder?: any;
|
|
198
|
+
label?: any;
|
|
199
|
+
disableTextInput?: boolean | undefined;
|
|
200
|
+
validationRegexp?: string | undefined;
|
|
201
|
+
validationErrorMessage?: any;
|
|
202
|
+
}, {
|
|
203
|
+
disabled?: any;
|
|
204
|
+
value?: any;
|
|
205
|
+
weight?: number | undefined;
|
|
206
|
+
placeholder?: any;
|
|
207
|
+
label?: any;
|
|
208
|
+
disableTextInput?: boolean | undefined;
|
|
209
|
+
validationRegexp?: string | undefined;
|
|
210
|
+
validationErrorMessage?: any;
|
|
211
|
+
}>;
|
|
212
|
+
};
|
|
213
|
+
export declare const GlchatTagInputComponentV1: import("@a2ui/react").ReactComponentImplementation<z.ZodTypeAny>;
|
|
214
|
+
//# sourceMappingURL=TagInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v1_0/TagInput/TagInput.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCzB,CAAC;AAEF,eAAO,MAAM,yBAAyB,kEAGrC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createComponentImplementation } from '@a2ui/react';
|
|
3
|
+
import { DynamicBooleanSchema, DynamicStringListSchema, DynamicStringSchema, } from '@a2ui/web_core/v1_0';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { GlchatTagInputView } from '../../views/TagInput/TagInput.js';
|
|
6
|
+
import { CommonProps, describeDynamic } from '../common.js';
|
|
7
|
+
/**
|
|
8
|
+
* Tag input field for adding and removing string tags (GLChat extension, v1.0).
|
|
9
|
+
* `validationRegexp` validates each tag before it is added; this is a per-tag
|
|
10
|
+
* rule, distinct from field-level `@checks`.
|
|
11
|
+
*/
|
|
12
|
+
export const TagInputApiV1 = {
|
|
13
|
+
name: 'TagInput',
|
|
14
|
+
schema: z
|
|
15
|
+
.object({
|
|
16
|
+
...CommonProps,
|
|
17
|
+
label: describeDynamic(DynamicStringSchema, 'DynamicString', 'The text label for the field.').optional(),
|
|
18
|
+
value: describeDynamic(DynamicStringListSchema, 'DynamicStringList', 'The list of current tags. Should be bound to a string array in the data model.'),
|
|
19
|
+
placeholder: describeDynamic(DynamicStringSchema, 'DynamicString', 'Placeholder text shown when there are no tags.').optional(),
|
|
20
|
+
disabled: describeDynamic(DynamicBooleanSchema, 'DynamicBoolean', 'If true, the input is disabled.').optional(),
|
|
21
|
+
disableTextInput: z
|
|
22
|
+
.boolean()
|
|
23
|
+
.describe('If true, hides the text input and only displays existing tags.')
|
|
24
|
+
.optional(),
|
|
25
|
+
validationRegexp: z
|
|
26
|
+
.string()
|
|
27
|
+
.describe('A regular expression used to validate each tag before it is added.')
|
|
28
|
+
.optional(),
|
|
29
|
+
validationErrorMessage: describeDynamic(DynamicStringSchema, 'DynamicString', 'The error message shown when a tag fails validation.').optional(),
|
|
30
|
+
})
|
|
31
|
+
.strict()
|
|
32
|
+
.describe('A tag input field for adding and removing string tags.'),
|
|
33
|
+
};
|
|
34
|
+
export const GlchatTagInputComponentV1 = createComponentImplementation(TagInputApiV1, GlchatTagInputView);
|