glchat-a2ui-react-renderer 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAM7D,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,SAAS,GACV,EAAE,QAAQ,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,2CAwC1C"}
|
|
@@ -4,8 +4,7 @@ import { useMemo } from 'react';
|
|
|
4
4
|
import { getGlchatButtonVariantStyles } from './theme';
|
|
5
5
|
export function CustomButtonComponent({ node, surfaceId, }) {
|
|
6
6
|
const { sendAction, theme } = useA2UIComponent(node, surfaceId);
|
|
7
|
-
const
|
|
8
|
-
const { child, action, primary, destructive } = nodeProps;
|
|
7
|
+
const { child, action, primary, destructive } = node.properties;
|
|
9
8
|
const variant = useMemo(() => {
|
|
10
9
|
if (primary)
|
|
11
10
|
return 'primary';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glchat-a2ui-react-renderer",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "A2UI (Agent-to-UI) React renderer for GLChat — render declarative UI from AI agent messages",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "GDP Labs",
|
|
@@ -34,12 +34,14 @@
|
|
|
34
34
|
"README.md",
|
|
35
35
|
"LICENSE",
|
|
36
36
|
"tailwind.config.cjs",
|
|
37
|
-
"styles"
|
|
37
|
+
"styles",
|
|
38
|
+
"patches"
|
|
38
39
|
],
|
|
39
40
|
"scripts": {
|
|
40
41
|
"build": "npm run build:ts",
|
|
41
42
|
"build:ts": "tsc -p tsconfig.build.json",
|
|
42
43
|
"prepare": "npm run build",
|
|
44
|
+
"postinstall": "patch-package",
|
|
43
45
|
"lint": "eslint . && npx publint",
|
|
44
46
|
"lint:pub": "npx publint",
|
|
45
47
|
"format": "prettier --write .",
|
|
@@ -53,6 +55,8 @@
|
|
|
53
55
|
},
|
|
54
56
|
"dependencies": {
|
|
55
57
|
"@a2ui/react": "^0.10.0",
|
|
58
|
+
"patch-package": "^8.0.1",
|
|
59
|
+
"@a2ui/web_core": "^0.10.0",
|
|
56
60
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
57
61
|
"@radix-ui/react-label": "^2.1.8",
|
|
58
62
|
"@radix-ui/react-separator": "^1.1.8",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
diff --git a/node_modules/@a2ui/web_core/src/v0_8/schema/common-types.d.ts b/node_modules/@a2ui/web_core/src/v0_8/schema/common-types.d.ts
|
|
2
|
+
index 9c7381f..bdc89a0 100644
|
|
3
|
+
--- a/node_modules/@a2ui/web_core/src/v0_8/schema/common-types.d.ts
|
|
4
|
+
+++ b/node_modules/@a2ui/web_core/src/v0_8/schema/common-types.d.ts
|
|
5
|
+
@@ -596,6 +596,7 @@ export declare const ButtonSchema: z.ZodObject<{
|
|
6
|
+
}[] | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
primary: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
+ destructive: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
child: string;
|
|
12
|
+
action: {
|
|
13
|
+
@@ -611,6 +612,7 @@ export declare const ButtonSchema: z.ZodObject<{
|
|
14
|
+
}[] | undefined;
|
|
15
|
+
};
|
|
16
|
+
primary?: boolean | undefined;
|
|
17
|
+
+ destructive?: boolean | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
child: string;
|
|
20
|
+
action: {
|
|
21
|
+
@@ -626,6 +628,7 @@ export declare const ButtonSchema: z.ZodObject<{
|
|
22
|
+
}[] | undefined;
|
|
23
|
+
};
|
|
24
|
+
primary?: boolean | undefined;
|
|
25
|
+
+ destructive?: boolean | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const CheckboxSchema: z.ZodObject<{
|
|
28
|
+
label: z.ZodEffects<z.ZodObject<{
|
|
29
|
+
diff --git a/node_modules/@a2ui/web_core/src/v0_8/schema/common-types.js b/node_modules/@a2ui/web_core/src/v0_8/schema/common-types.js
|
|
30
|
+
index 2dd98d4..54ebcef 100644
|
|
31
|
+
--- a/node_modules/@a2ui/web_core/src/v0_8/schema/common-types.js
|
|
32
|
+
+++ b/node_modules/@a2ui/web_core/src/v0_8/schema/common-types.js
|
|
33
|
+
@@ -223,6 +223,10 @@ export const ButtonSchema = z.object({
|
|
34
|
+
.boolean()
|
|
35
|
+
.optional()
|
|
36
|
+
.describe('Indicates if this button should be styled as the primary action.'),
|
|
37
|
+
+ destructive: z
|
|
38
|
+
+ .boolean()
|
|
39
|
+
+ .optional()
|
|
40
|
+
+ .describe('Indicates if this button should be styled as a destructive action.'),
|
|
41
|
+
});
|
|
42
|
+
export const CheckboxSchema = z.object({
|
|
43
|
+
label: StringValueSchema,
|
|
44
|
+
diff --git a/node_modules/@a2ui/web_core/src/v0_8/types/types.d.ts b/node_modules/@a2ui/web_core/src/v0_8/types/types.d.ts
|
|
45
|
+
index d5df150..ca74153 100644
|
|
46
|
+
--- a/node_modules/@a2ui/web_core/src/v0_8/types/types.d.ts
|
|
47
|
+
+++ b/node_modules/@a2ui/web_core/src/v0_8/types/types.d.ts
|
|
48
|
+
@@ -376,6 +376,7 @@ export declare interface ResolvedButton {
|
|
49
|
+
child: AnyComponentNode;
|
|
50
|
+
action: Button['action'];
|
|
51
|
+
primary?: boolean;
|
|
52
|
+
+ destructive?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export declare interface ResolvedList {
|
|
55
|
+
children: AnyComponentNode[];
|