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
|
@@ -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
|
-
variant?: "primary" | "destructive" | "borderless" | "default" | undefined;
|
|
233
100
|
weight?: number | undefined;
|
|
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
|
-
variant?: "primary" | "destructive" | "borderless" | "default" | undefined;
|
|
281
126
|
weight?: number | undefined;
|
|
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v0_9/Button/Button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v0_9/Button/Button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;iBAoB6lrC,CAAC;;;uBAAqI,CAAC;;;;iBAA4I,CAAC;;;uBAAqI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAAu4C,CAAC;;;uBAA2I,CAAC;;;;;uBAAoM,CAAC;;;;;uBAA2K,CAAC;;;;;;;;;;;;;;;;;uBAA7K,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA2K,CAAC;;;;;;;;;;;;;;;;;;;;;;CATv5vC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,kEAGjC,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
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 { ButtonApi } from '@a2ui/web_core/v0_9/basic_catalog';
|
|
5
4
|
import { z } from 'zod';
|
|
6
|
-
import {
|
|
7
|
-
import { getWeightStyle } from '../common.js';
|
|
5
|
+
import { GlchatButtonView } from '../../views/Button/Button.js';
|
|
8
6
|
/**
|
|
9
7
|
* GLChat Button schema — upstream `ButtonApi` with an extra `destructive` variant.
|
|
10
8
|
*/
|
|
@@ -18,16 +16,7 @@ export const GlchatButtonApi = {
|
|
|
18
16
|
.optional(),
|
|
19
17
|
}),
|
|
20
18
|
};
|
|
21
|
-
function toButtonVariant(variant) {
|
|
22
|
-
if (variant === 'primary')
|
|
23
|
-
return 'primary';
|
|
24
|
-
if (variant === 'borderless')
|
|
25
|
-
return 'borderless';
|
|
26
|
-
if (variant === 'destructive')
|
|
27
|
-
return 'destructive';
|
|
28
|
-
return 'outline';
|
|
29
|
-
}
|
|
30
19
|
/**
|
|
31
20
|
* GLChat-styled Button. Overrides the basic catalog `Button` with extended variants.
|
|
32
21
|
*/
|
|
33
|
-
export const GlchatButtonComponent = createComponentImplementation(GlchatButtonApi,
|
|
22
|
+
export const GlchatButtonComponent = createComponentImplementation(GlchatButtonApi, GlchatButtonView);
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* GLChat-styled ChoicePicker. Overrides the basic catalog `ChoicePicker`.
|
|
3
|
-
*
|
|
4
|
-
* - `variant`: `mutuallyExclusive` (single) or `multipleSelection` (multi).
|
|
5
|
-
* - `displayStyle`: `checkbox` renders a checkbox/radio list; otherwise a
|
|
6
|
-
* GLChat select (single) or multi-select dropdown is used.
|
|
7
|
-
*/
|
|
8
|
-
export declare const GlchatChoicePickerComponent: import("@a2ui/react/v0_9").ReactComponentImplementation;
|
|
1
|
+
export declare const GlchatChoicePickerComponent: import("@a2ui/react").ReactComponentImplementation<import("zod").ZodTypeAny>;
|
|
9
2
|
//# sourceMappingURL=ChoicePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoicePicker.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChoicePicker.d.ts","sourceRoot":"","sources":["../../../../../../src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,2BAA2B,8EAGvC,CAAC"}
|
|
@@ -1,54 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { createComponentImplementation } from '@a2ui/react/v0_9';
|
|
4
3
|
import { ChoicePickerApi } from '@a2ui/web_core/v0_9/basic_catalog';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { Select, SelectContent, SelectItem, SelectTrigger } from '../../../../components/ui/Select/Select.js';
|
|
8
|
-
import { selectTriggerLabelStyles, selectTriggerPlaceholderStyles, } from '../../../../components/ui/Select/theme.js';
|
|
9
|
-
import { getWeightStyle } from '../common.js';
|
|
10
|
-
import { CheckboxList } from '../../../../components/ui/CheckboxList/CheckboxList.js';
|
|
11
|
-
import { choicePickerContainerStyles, choicePickerLabelStyles } from './theme.js';
|
|
12
|
-
function SingleSelectChips({ options, value, onValueChange, }) {
|
|
13
|
-
const selectedLabel = useMemo(() => {
|
|
14
|
-
const match = options.find((opt) => opt.value === value);
|
|
15
|
-
return match?.label ?? '';
|
|
16
|
-
}, [options, value]);
|
|
17
|
-
const triggerLabelStyle = useMemo(() => ({
|
|
18
|
-
...selectTriggerLabelStyles,
|
|
19
|
-
...(selectedLabel ? undefined : selectTriggerPlaceholderStyles),
|
|
20
|
-
}), [selectedLabel]);
|
|
21
|
-
return (_jsxs(Select, { value: value, onValueChange: onValueChange, children: [_jsx(SelectTrigger, { className: "glchat-a2ui-select-trigger", "aria-label": "Select option", children: _jsx("span", { style: triggerLabelStyle, ...(selectedLabel ? {} : { 'data-placeholder': '' }), children: selectedLabel || 'Select an item' }) }), _jsx(SelectContent, { className: "glchat-a2ui-select-content", children: options.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] }));
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* GLChat-styled ChoicePicker. Overrides the basic catalog `ChoicePicker`.
|
|
25
|
-
*
|
|
26
|
-
* - `variant`: `mutuallyExclusive` (single) or `multipleSelection` (multi).
|
|
27
|
-
* - `displayStyle`: `checkbox` renders a checkbox/radio list; otherwise a
|
|
28
|
-
* GLChat select (single) or multi-select dropdown is used.
|
|
29
|
-
*/
|
|
30
|
-
export const GlchatChoicePickerComponent = createComponentImplementation(ChoicePickerApi, ({ props }) => {
|
|
31
|
-
const singleSelect = props.variant !== 'multipleSelection';
|
|
32
|
-
const filterable = props.filterable ?? false;
|
|
33
|
-
const useCheckboxes = props.displayStyle === 'checkbox';
|
|
34
|
-
const label = typeof props.label === 'string' ? props.label : '';
|
|
35
|
-
const selectedValues = useMemo(() => (Array.isArray(props.value) ? props.value : []), [props.value]);
|
|
36
|
-
const resolvedOptions = useMemo(() => (props.options ?? []).map((option) => ({
|
|
37
|
-
value: option.value,
|
|
38
|
-
label: typeof option.label === 'string' ? option.label : option.value,
|
|
39
|
-
})), [props.options]);
|
|
40
|
-
const handleSingleValueChange = useCallback((nextValue) => {
|
|
41
|
-
props.setValue([nextValue]);
|
|
42
|
-
}, [props]);
|
|
43
|
-
const handleMultiValueChange = useCallback((values) => {
|
|
44
|
-
props.setValue(values);
|
|
45
|
-
}, [props]);
|
|
46
|
-
const wrapper = (content) => (_jsx("div", { className: "a2ui-choicepicker", style: getWeightStyle(props.weight), children: _jsxs("section", { style: choicePickerContainerStyles, children: [label ? _jsx("strong", { style: choicePickerLabelStyles, children: label }) : null, content] }) }));
|
|
47
|
-
if (useCheckboxes) {
|
|
48
|
-
return wrapper(_jsx(CheckboxList, { options: resolvedOptions, value: selectedValues, onValueChange: handleMultiValueChange, singleSelect: singleSelect, filterable: filterable }));
|
|
49
|
-
}
|
|
50
|
-
if (singleSelect) {
|
|
51
|
-
return wrapper(_jsx(SingleSelectChips, { options: resolvedOptions, value: selectedValues[0] ?? '', onValueChange: handleSingleValueChange }));
|
|
52
|
-
}
|
|
53
|
-
return wrapper(_jsx(MultiSelect, { options: resolvedOptions, value: selectedValues, onValueChange: handleMultiValueChange, placeholder: "Select options", filterable: filterable }));
|
|
54
|
-
});
|
|
4
|
+
import { GlchatChoicePickerView } from '../../views/ChoicePicker/ChoicePicker.js';
|
|
5
|
+
export const GlchatChoicePickerComponent = createComponentImplementation(ChoicePickerApi, GlchatChoicePickerView);
|