@agno-hq/chat-react 0.1.0 → 0.3.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.
@@ -0,0 +1,111 @@
1
+ /*
2
+ * @agno-hq/chat-react — design tokens.
3
+ *
4
+ * Lifted from `agno-os/src/globals.css` so the components render with the same
5
+ * palette, radii and shadows as the AgentOS chat. Import this file alone
6
+ * (`@agno-hq/chat-react/tokens.css`) to keep the palette while supplying your own
7
+ * component CSS; `styles.css` already contains it.
8
+ *
9
+ * Declared on :root as well as the embed classes, so you can retheme globally
10
+ * or per-embed:
11
+ *
12
+ * :root { --color-brand-brand: 99, 102, 241; --agno-radius-lg: 1.25rem; }
13
+ *
14
+ * Dark by default; add `agno-light` on the embed for light mode (`agno-dark`
15
+ * also works if you toggle both explicitly).
16
+ */
17
+
18
+ /* ─────────────────────────────────────────────────────────────────────────
19
+ Design tokens — Agno OS
20
+ ───────────────────────────────────────────────────────────────────────── */
21
+
22
+ :root,
23
+ .agno-root,
24
+ .agno-launcher {
25
+ /* Radii (agno-os: --radius-rounded-*) */
26
+ --agno-radius-xs: 0.25rem;
27
+ --agno-radius-sm: 0.5rem;
28
+ --agno-radius-md: 0.625rem;
29
+ --agno-radius-lg: 0.75rem;
30
+ --agno-radius-xl: 1rem;
31
+ --agno-radius-full: 9999px;
32
+
33
+ /* Brand + semantic colours are theme-independent in Agno OS */
34
+ --color-brand-brand: 255, 64, 23;
35
+ --color-brand-accent: 235, 110, 82;
36
+ --color-positive: 34, 197, 94;
37
+ --color-destructive: 229, 57, 53;
38
+
39
+ /* Dark theme (agno-os `.dark`) */
40
+ --color-primary: 255, 255, 255;
41
+ --color-primary-accent: 24, 24, 27;
42
+ --color-muted: 161, 161, 170;
43
+ --color-background: 17, 17, 19;
44
+ --color-background-secondary: 39, 39, 42;
45
+ --color-border-default: 255, 255, 255, 0.2;
46
+ --color-border-selected: 255, 255, 255, 0.75;
47
+
48
+ --agno-shadow-border: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.4),
49
+ 0 2px 4px 0 rgba(0, 0, 0, 0.3);
50
+ --agno-shadow-panel: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 12px 32px -8px rgba(0, 0, 0, 0.6);
51
+
52
+ /* Semantic aliases used throughout this stylesheet. */
53
+ --agno-primary: rgb(var(--color-primary));
54
+ --agno-accent: rgb(var(--color-primary-accent));
55
+ --agno-muted: rgb(var(--color-muted));
56
+ --agno-bg: rgb(var(--color-background));
57
+ --agno-secondary: rgb(var(--color-background-secondary));
58
+ --agno-secondary-soft: rgba(var(--color-background-secondary), 0.5);
59
+ --agno-border: rgba(var(--color-border-default));
60
+ --agno-border-selected: rgba(var(--color-border-selected));
61
+ --agno-brand: rgb(var(--color-brand-brand));
62
+ --agno-brand-soft: rgba(var(--color-brand-brand), 0.14);
63
+ --agno-positive: rgb(var(--color-positive));
64
+ --agno-destructive: rgb(var(--color-destructive));
65
+ /* Agno OS layers subtle primary tints instead of extra greys. */
66
+ --agno-tint: rgba(var(--color-primary), 0.05);
67
+ --agno-tint-strong: rgba(var(--color-primary), 0.1);
68
+
69
+ /* Back-compat aliases (previous releases exposed these names). */
70
+ --agno-text: var(--agno-primary);
71
+ --agno-surface: var(--agno-bg);
72
+ --agno-surface-2: var(--agno-secondary);
73
+ --agno-error: var(--agno-destructive);
74
+ --agno-radius: var(--agno-radius-md);
75
+ --agno-primary-bg: var(--agno-primary);
76
+ --agno-primary-fg: var(--agno-accent);
77
+
78
+ /* Typography — repoint these to self-hosted faces to skip fonts.css. */
79
+ --agno-font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
80
+ --agno-font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
81
+ }
82
+
83
+ /* Light theme (agno-os `:root`) */
84
+ .agno-light,
85
+ .agno-root.agno-light,
86
+ .agno-launcher.agno-light {
87
+ --color-primary: 24, 24, 27;
88
+ --color-primary-accent: 255, 255, 255;
89
+ --color-muted: 113, 113, 122;
90
+ --color-background: 255, 255, 255;
91
+ --color-background-secondary: 244, 244, 245;
92
+ --color-border-default: 24, 24, 27, 0.1;
93
+ --color-border-selected: 24, 24, 27, 0.5;
94
+
95
+ --agno-shadow-border: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06),
96
+ 0 2px 4px 0 rgba(0, 0, 0, 0.04);
97
+ --agno-shadow-panel: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 12px 32px -8px rgba(0, 0, 0, 0.18);
98
+ }
99
+
100
+ /* Explicit dark, for apps that toggle both classes. */
101
+ .agno-dark,
102
+ .agno-root.agno-dark,
103
+ .agno-launcher.agno-dark {
104
+ --color-primary: 255, 255, 255;
105
+ --color-primary-accent: 24, 24, 27;
106
+ --color-muted: 161, 161, 170;
107
+ --color-background: 17, 17, 19;
108
+ --color-background-secondary: 39, 39, 42;
109
+ --color-border-default: 255, 255, 255, 0.2;
110
+ --color-border-selected: 255, 255, 255, 0.75;
111
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agno-hq/chat-react",
3
- "version": "0.1.0",
4
- "description": "Headless React hook (useAgnoChat) + UI components for streaming Agno agents, teams, and workflows from an AgentOS backend.",
3
+ "version": "0.3.0",
4
+ "description": "Composable, embeddable React components for AgentOS a headless chat hook, a provider for building your own layout, and drop-in chat embeds.",
5
5
  "license": "MIT",
6
6
  "author": "Agno",
7
7
  "homepage": "https://github.com/agno-agi/agno-chat-react#readme",
@@ -30,26 +30,68 @@
30
30
  "default": "./dist/index.cjs"
31
31
  }
32
32
  },
33
- "./styles.css": "./dist/styles.css"
33
+ "./core": {
34
+ "import": {
35
+ "types": "./dist/core/index.d.ts",
36
+ "default": "./dist/core/index.js"
37
+ },
38
+ "require": {
39
+ "types": "./dist/core/index.d.cts",
40
+ "default": "./dist/core/index.cjs"
41
+ }
42
+ },
43
+ "./chat": {
44
+ "import": {
45
+ "types": "./dist/chat/index.d.ts",
46
+ "default": "./dist/chat/index.js"
47
+ },
48
+ "require": {
49
+ "types": "./dist/chat/index.d.cts",
50
+ "default": "./dist/chat/index.cjs"
51
+ }
52
+ },
53
+ "./styles.css": "./dist/styles.css",
54
+ "./tokens.css": "./dist/tokens.css",
55
+ "./fonts.css": "./dist/fonts.css"
34
56
  },
35
57
  "files": [
36
58
  "dist"
37
59
  ],
38
60
  "scripts": {
39
61
  "build": "tsup",
62
+ "test": "node --import tsx --test test/*.test.ts",
40
63
  "typecheck": "tsc --noEmit",
41
- "prepublishOnly": "npm run typecheck && npm run build"
64
+ "prepublishOnly": "npm test && npm run typecheck && npm run build",
65
+ "storybook": "storybook dev -p 6006",
66
+ "storybook:build": "storybook build -o storybook-static"
42
67
  },
43
68
  "peerDependencies": {
44
69
  "react": ">=18",
45
70
  "react-dom": ">=18"
46
71
  },
72
+ "dependencies": {
73
+ "lucide-react": "^1.39.0",
74
+ "shiki": "^3.23.0",
75
+ "streamdown": "^2.6.0"
76
+ },
47
77
  "devDependencies": {
78
+ "@storybook/addon-a11y": "^8.6.18",
79
+ "@storybook/addon-docs": "^8.6.18",
80
+ "@storybook/addon-essentials": "^8.6.14",
81
+ "@storybook/blocks": "^8.6.14",
82
+ "@storybook/react-vite": "^8.6.18",
48
83
  "@types/node": "^26.1.0",
49
84
  "@types/react": "^18.3.0",
50
85
  "@types/react-dom": "^18.3.0",
86
+ "@vitejs/plugin-react": "^4.7.0",
87
+ "react": "^18.3.1",
88
+ "react-dom": "^18.3.1",
89
+ "remark-gfm": "^4.0.1",
90
+ "storybook": "^8.6.18",
51
91
  "tsup": "^8.5.1",
52
- "typescript": "^5.4.0"
92
+ "tsx": "^4.23.12",
93
+ "typescript": "^5.4.0",
94
+ "vite": "^5.4.21"
53
95
  },
54
96
  "publishConfig": {
55
97
  "access": "public"
@@ -61,6 +103,9 @@
61
103
  "chat",
62
104
  "streaming",
63
105
  "agents",
64
- "llm"
65
- ]
106
+ "llm",
107
+ "components",
108
+ "embeddable"
109
+ ],
110
+ "packageManager": "pnpm@11.21.0+sha512.521705bce689924eac72f5a3587122f362689ef6571e55ba80076fd637c11132ecffada26fad4ea79c485bfddbfd3d5a2a5b05805a77e893de71ec8a6cca3bb1"
66
111
  }