a2ui-react 0.1.0 → 0.2.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 +10 -0
- package/dist/theme.css +101 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -18,6 +18,16 @@ npm install a2ui-react
|
|
|
18
18
|
yarn add a2ui-react
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
## Setup
|
|
22
|
+
|
|
23
|
+
Import the default theme CSS in your app entry point:
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import 'a2ui-react/theme.css'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or if using your own Tailwind setup, ensure your CSS includes the [shadcn/ui theme variables](https://ui.shadcn.com/docs/theming).
|
|
30
|
+
|
|
21
31
|
## Quick Start
|
|
22
32
|
|
|
23
33
|
```tsx
|
package/dist/theme.css
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
/* Dark mode variant for Tailwind v4 */
|
|
4
|
+
@custom-variant dark (&:is(.dark *));
|
|
5
|
+
|
|
6
|
+
/* Light theme variables - HSL format for compatibility with shadcn/ui components */
|
|
7
|
+
:root {
|
|
8
|
+
/* shadcn/ui colors - HSL values (without hsl() wrapper) */
|
|
9
|
+
--background: 0 0% 100%;
|
|
10
|
+
--foreground: 222.2 84% 4.9%;
|
|
11
|
+
--card: 0 0% 100%;
|
|
12
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
13
|
+
--popover: 0 0% 100%;
|
|
14
|
+
--popover-foreground: 222.2 84% 4.9%;
|
|
15
|
+
--primary: 221.2 83.2% 53.3%;
|
|
16
|
+
--primary-foreground: 210 40% 98%;
|
|
17
|
+
--secondary: 210 40% 96%;
|
|
18
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
19
|
+
--muted: 210 40% 92%;
|
|
20
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
21
|
+
--accent: 210 40% 96%;
|
|
22
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
23
|
+
--destructive: 0 84.2% 60.2%;
|
|
24
|
+
--destructive-foreground: 210 40% 98%;
|
|
25
|
+
--border: 214.3 31.8% 85%;
|
|
26
|
+
--input: 214.3 31.8% 75%;
|
|
27
|
+
--ring: 221.2 83.2% 53.3%;
|
|
28
|
+
--radius: 0.5rem;
|
|
29
|
+
|
|
30
|
+
/* Chart colors - HSL values */
|
|
31
|
+
--chart-1: 221 83% 53%;
|
|
32
|
+
--chart-2: 142 71% 45%;
|
|
33
|
+
--chart-3: 47 96% 53%;
|
|
34
|
+
--chart-4: 0 84% 60%;
|
|
35
|
+
--chart-5: 262 83% 58%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Dark theme variables */
|
|
39
|
+
.dark {
|
|
40
|
+
/* shadcn/ui colors - HSL values */
|
|
41
|
+
--background: 222.2 84% 4.9%;
|
|
42
|
+
--foreground: 210 40% 98%;
|
|
43
|
+
--card: 222.2 84% 4.9%;
|
|
44
|
+
--card-foreground: 210 40% 98%;
|
|
45
|
+
--popover: 222.2 84% 4.9%;
|
|
46
|
+
--popover-foreground: 210 40% 98%;
|
|
47
|
+
--primary: 217.2 91.2% 59.8%;
|
|
48
|
+
--primary-foreground: 222.2 47.4% 11.2%;
|
|
49
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
50
|
+
--secondary-foreground: 210 40% 98%;
|
|
51
|
+
--muted: 217.2 32.6% 17.5%;
|
|
52
|
+
--muted-foreground: 215 20.2% 65.1%;
|
|
53
|
+
--accent: 217.2 32.6% 17.5%;
|
|
54
|
+
--accent-foreground: 210 40% 98%;
|
|
55
|
+
--destructive: 0 62.8% 30.6%;
|
|
56
|
+
--destructive-foreground: 210 40% 98%;
|
|
57
|
+
--border: 217.2 32.6% 17.5%;
|
|
58
|
+
--input: 217.2 32.6% 17.5%;
|
|
59
|
+
--ring: 224.3 76.3% 48%;
|
|
60
|
+
|
|
61
|
+
/* Chart colors */
|
|
62
|
+
--chart-1: 217 91% 60%;
|
|
63
|
+
--chart-2: 160 84% 39%;
|
|
64
|
+
--chart-3: 43 96% 56%;
|
|
65
|
+
--chart-4: 0 72% 51%;
|
|
66
|
+
--chart-5: 270 76% 65%;
|
|
67
|
+
|
|
68
|
+
/* Native input dark mode support */
|
|
69
|
+
color-scheme: dark;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Tailwind v4 theme tokens - use inline to make available to utilities */
|
|
73
|
+
@theme inline {
|
|
74
|
+
--color-background: hsl(var(--background));
|
|
75
|
+
--color-foreground: hsl(var(--foreground));
|
|
76
|
+
--color-card: hsl(var(--card));
|
|
77
|
+
--color-card-foreground: hsl(var(--card-foreground));
|
|
78
|
+
--color-popover: hsl(var(--popover));
|
|
79
|
+
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
80
|
+
--color-primary: hsl(var(--primary));
|
|
81
|
+
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
82
|
+
--color-secondary: hsl(var(--secondary));
|
|
83
|
+
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
|
84
|
+
--color-muted: hsl(var(--muted));
|
|
85
|
+
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
86
|
+
--color-accent: hsl(var(--accent));
|
|
87
|
+
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
88
|
+
--color-destructive: hsl(var(--destructive));
|
|
89
|
+
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
90
|
+
--color-border: hsl(var(--border));
|
|
91
|
+
--color-input: hsl(var(--input));
|
|
92
|
+
--color-ring: hsl(var(--ring));
|
|
93
|
+
--radius: var(--radius);
|
|
94
|
+
|
|
95
|
+
/* Chart colors for Tailwind utilities */
|
|
96
|
+
--color-chart-1: hsl(var(--chart-1));
|
|
97
|
+
--color-chart-2: hsl(var(--chart-2));
|
|
98
|
+
--color-chart-3: hsl(var(--chart-3));
|
|
99
|
+
--color-chart-4: hsl(var(--chart-4));
|
|
100
|
+
--color-chart-5: hsl(var(--chart-5));
|
|
101
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "a2ui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Beautiful shadcn/ui components for rendering A2UI protocol messages in React",
|
|
5
5
|
"author": "burka",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"types": "./dist/index.d.ts",
|
|
35
35
|
"import": "./dist/index.mjs",
|
|
36
36
|
"require": "./dist/index.js"
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
"./theme.css": "./dist/theme.css"
|
|
38
39
|
},
|
|
39
40
|
"sideEffects": false,
|
|
40
41
|
"publishConfig": {
|