@21st-sdk/react 0.1.2 → 0.1.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.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
- # @an-sdk/react
1
+ # @21st-sdk/react
2
2
 
3
- React components for building AI agent chat UIs powered by [AN](https://an.dev). Drop-in chat interface with tool renderers, theming, and full customization.
3
+ React components for building AI agent chat UIs powered by [An](https://21st.dev/agents). Drop-in chat interface with tool renderers, theming, and full customization.
4
4
 
5
5
  Built on [Vercel AI SDK v5](https://sdk.vercel.ai) — no custom hooks or state management. Just components.
6
6
 
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install @an-sdk/react ai @ai-sdk/react
10
+ npm install @21st-sdk/react ai @ai-sdk/react
11
11
  ```
12
12
 
13
13
  ## Quick Start
@@ -16,8 +16,8 @@ npm install @an-sdk/react ai @ai-sdk/react
16
16
  "use client";
17
17
 
18
18
  import { useChat } from "@ai-sdk/react";
19
- import { AnAgentChat, createAnChat } from "@an-sdk/react";
20
- import "@an-sdk/react/styles.css";
19
+ import { AnAgentChat, createAnChat } from "@21st-sdk/react";
20
+ import "@21st-sdk/react/styles.css";
21
21
  import { useMemo } from "react";
22
22
 
23
23
  export default function Chat() {
@@ -48,7 +48,7 @@ export default function Chat() {
48
48
  }
49
49
  ```
50
50
 
51
- That's it. You get a full chat UI with message rendering, tool visualization, auto-scroll, and streaming — all wired to your AN agent.
51
+ That's it. You get a full chat UI with message rendering, tool visualization, auto-scroll, and streaming — all wired to your An agent.
52
52
 
53
53
  ## Customization
54
54
 
@@ -56,7 +56,7 @@ Four levels of customization, from simple to full control:
56
56
 
57
57
  ### 1. Theme tokens
58
58
 
59
- Apply a theme JSON from the [AN Playground](https://an.dev/an/playground):
59
+ Apply a theme JSON from the [An Playground](https://21st.dev/agents/playground):
60
60
 
61
61
  ```tsx
62
62
  <AnAgentChat theme={playgroundTheme} colorMode="dark" />
@@ -96,7 +96,7 @@ Swap sub-components entirely:
96
96
  Build from scratch with individual imports:
97
97
 
98
98
  ```tsx
99
- import { MessageList, InputBar, ToolRenderer } from "@an-sdk/react";
99
+ import { MessageList, InputBar, ToolRenderer } from "@21st-sdk/react";
100
100
  ```
101
101
 
102
102
  ## CSS
@@ -104,7 +104,7 @@ import { MessageList, InputBar, ToolRenderer } from "@an-sdk/react";
104
104
  Import the stylesheet once in your app:
105
105
 
106
106
  ```tsx
107
- import "@an-sdk/react/styles.css";
107
+ import "@21st-sdk/react/styles.css";
108
108
  ```
109
109
 
110
110
  No Tailwind peer dependency required — CSS is pre-compiled. All elements have stable `an-*` class names for custom styling:
@@ -125,7 +125,7 @@ No Tailwind peer dependency required — CSS is pre-compiled. All elements have
125
125
 
126
126
  ### `createAnChat(options)`
127
127
 
128
- Creates an AI SDK `Chat` instance pointed at the AN Relay API.
128
+ Creates an AI SDK `Chat` instance pointed at the An relay API.
129
129
 
130
130
  ```ts
131
131
  createAnChat({
@@ -206,11 +206,11 @@ interface AnTheme {
206
206
  The SDK exports pre-defined model constants for convenience:
207
207
 
208
208
  ```ts
209
- import { AN_CLAUDE_MODELS, AN_DEFAULT_MODEL_ID } from "@an-sdk/react"
210
- import type { AnModelOption, AnClaudeModelId } from "@an-sdk/react"
209
+ import { AN_CLAUDE_MODELS, AN_DEFAULT_MODEL_ID } from "@21st-sdk/react"
210
+ import type { AnModelOption, AnClaudeModelId } from "@21st-sdk/react"
211
211
  ```
212
212
 
213
- > **Note:** When using `createAnChat()` with the AN Relay, the model is set server-side in the agent config. The `modelSelector` prop is for building UIs with custom backends.
213
+ > **Note:** When using `createAnChat()` with the An relay, the model is set server-side in the agent config. The `modelSelector` prop is for building UIs with custom backends.
214
214
 
215
215
  ## License
216
216
 
@@ -8,7 +8,7 @@ AN is a platform for building, deploying, and embedding AI agents. You define an
8
8
  Your Code (agent.ts)
9
9
  |
10
10
  v
11
- @an-sdk/cli deploy (CLI)
11
+ @21st-sdk/cli deploy (CLI)
12
12
  |
13
13
  v
14
14
  AN Platform
@@ -30,11 +30,11 @@ AN Platform
30
30
 
31
31
  | Package | Purpose |
32
32
  |---------|---------|
33
- | `@an-sdk/agent` | Define agents and tools with type inference |
34
- | `@an-sdk/cli` | Deploy agents from your terminal |
35
- | `@an-sdk/react` | Chat UI components (theming, tool renderers) |
36
- | `@an-sdk/nextjs` | Next.js server-side token handler |
37
- | `@an-sdk/node` | Server-side SDK (sandboxes, threads, tokens) |
33
+ | `@21st-sdk/agent` | Define agents and tools with type inference |
34
+ | `@21st-sdk/cli` | Deploy agents from your terminal |
35
+ | `@21st-sdk/react` | Chat UI components (theming, tool renderers) |
36
+ | `@21st-sdk/nextjs` | Next.js server-side token handler |
37
+ | `@21st-sdk/node` | Server-side SDK (sandboxes, threads, tokens) |
38
38
 
39
39
  ## Key Concepts
40
40
 
@@ -58,4 +58,4 @@ Two layers of authentication:
58
58
  1. **Client -> Relay**: API key (`an_sk_...`) or short-lived JWT (via token exchange)
59
59
  2. **Sandbox -> AI Provider**: Handled internally by the platform (Claude Proxy)
60
60
 
61
- For web apps, use `@an-sdk/nextjs` to exchange your API key for a short-lived JWT on the server, so the key never reaches the browser.
61
+ For web apps, use `@21st-sdk/nextjs` to exchange your API key for a short-lived JWT on the server, so the key never reaches the browser.
@@ -2,12 +2,12 @@
2
2
 
3
3
  ## 1. Get an API Key
4
4
 
5
- Sign up at [an.dev](https://an.dev) and get your API key from [an.dev/agents/dashboard/api](https://an.dev/agents/dashboard/api).
5
+ Sign up at [21st.dev/agents](https://21st.dev/agents) and get your API key from [the dashboard](https://21st.dev/agents/dashboard/api).
6
6
 
7
7
  ## 2. Install
8
8
 
9
9
  ```bash
10
- npm install @an-sdk/agent zod
10
+ npm install @21st-sdk/agent zod
11
11
  ```
12
12
 
13
13
  ## 3. Define Your Agent
@@ -15,7 +15,7 @@ npm install @an-sdk/agent zod
15
15
  Create `src/agent.ts`:
16
16
 
17
17
  ```ts
18
- import { agent, tool } from "@an-sdk/agent"
18
+ import { agent, tool } from "@21st-sdk/agent"
19
19
  import { z } from "zod"
20
20
 
21
21
  export default agent({
@@ -36,10 +36,10 @@ export default agent({
36
36
  ## 4. Login & Deploy
37
37
 
38
38
  ```bash
39
- npx @an-sdk/cli login
39
+ npx @21st-sdk/cli login
40
40
  # Enter your API key: an_sk_...
41
41
 
42
- npx @an-sdk/cli deploy
42
+ npx @21st-sdk/cli deploy
43
43
  # Bundling src/agent.ts...
44
44
  # Deploying my-agent...
45
45
  # https://api.an.dev/v1/chat/my-agent
@@ -50,14 +50,14 @@ Your agent is live.
50
50
  ## 5. Embed in a React App
51
51
 
52
52
  ```bash
53
- npm install @an-sdk/nextjs @an-sdk/react ai @ai-sdk/react
53
+ npm install @21st-sdk/nextjs @21st-sdk/react ai @ai-sdk/react
54
54
  ```
55
55
 
56
56
  Create a token route (keeps your API key on the server):
57
57
 
58
58
  ```ts
59
59
  // app/api/an/token/route.ts
60
- import { createAnTokenHandler } from "@an-sdk/nextjs/server"
60
+ import { createAnTokenHandler } from "@21st-sdk/nextjs/server"
61
61
 
62
62
  export const POST = createAnTokenHandler({
63
63
  apiKey: process.env.AN_API_KEY!,
@@ -71,8 +71,8 @@ Add the chat UI:
71
71
  "use client"
72
72
 
73
73
  import { useChat } from "@ai-sdk/react"
74
- import { AnAgentChat, createAnChat } from "@an-sdk/nextjs"
75
- import "@an-sdk/react/styles.css"
74
+ import { AnAgentChat, createAnChat } from "@21st-sdk/nextjs"
75
+ import "@21st-sdk/react/styles.css"
76
76
  import { useMemo } from "react"
77
77
 
78
78
  export default function Chat() {
@@ -1,11 +1,11 @@
1
1
  # Defining Agents
2
2
 
3
- Agents are defined with the `agent()` and `tool()` functions from `@an-sdk/agent`. These are config-only — they return exactly what you pass in, with type inference added. The actual execution happens in the AN runtime (E2B sandbox).
3
+ Agents are defined with the `agent()` and `tool()` functions from `@21st-sdk/agent`. These are config-only — they return exactly what you pass in, with type inference added. The actual execution happens in the AN runtime (E2B sandbox).
4
4
 
5
5
  ## `agent(config)`
6
6
 
7
7
  ```ts
8
- import { agent } from "@an-sdk/agent"
8
+ import { agent } from "@21st-sdk/agent"
9
9
 
10
10
  export default agent({
11
11
  // Model (default: "claude-sonnet-4-6")
@@ -52,7 +52,7 @@ export default agent({
52
52
  ## `tool(definition)`
53
53
 
54
54
  ```ts
55
- import { tool } from "@an-sdk/agent"
55
+ import { tool } from "@21st-sdk/agent"
56
56
  import { z } from "zod"
57
57
 
58
58
  const myTool = tool({
@@ -1,11 +1,11 @@
1
1
  # React UI
2
2
 
3
- `@an-sdk/react` provides a full chat UI for AN agents. Built on [Vercel AI SDK v5](https://sdk.vercel.ai) — uses standard `useChat()` from `@ai-sdk/react`.
3
+ `@21st-sdk/react` provides a full chat UI for AN agents. Built on [Vercel AI SDK v5](https://sdk.vercel.ai) — uses standard `useChat()` from `@ai-sdk/react`.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- npm install @an-sdk/react ai @ai-sdk/react
8
+ npm install @21st-sdk/react ai @ai-sdk/react
9
9
  ```
10
10
 
11
11
  ## Basic Usage
@@ -14,8 +14,8 @@ npm install @an-sdk/react ai @ai-sdk/react
14
14
  "use client"
15
15
 
16
16
  import { useChat } from "@ai-sdk/react"
17
- import { AnAgentChat, createAnChat } from "@an-sdk/react"
18
- import "@an-sdk/react/styles.css"
17
+ import { AnAgentChat, createAnChat } from "@21st-sdk/react"
18
+ import "@21st-sdk/react/styles.css"
19
19
  import { useMemo } from "react"
20
20
 
21
21
  export default function Chat() {
@@ -82,7 +82,7 @@ Four levels, from simple to full control:
82
82
 
83
83
  ### 1. Theme tokens
84
84
 
85
- Apply a theme JSON from the [AN Playground](https://an.dev/an/playground):
85
+ Apply a theme JSON from the [AN Playground](https://21st.dev/agents/playground):
86
86
 
87
87
  ```tsx
88
88
  <AnAgentChat theme={playgroundTheme} colorMode="dark" />
@@ -118,7 +118,7 @@ Swap sub-components:
118
118
  ### 4. Individual component imports
119
119
 
120
120
  ```tsx
121
- import { MessageList, InputBar, ToolRenderer } from "@an-sdk/react"
121
+ import { MessageList, InputBar, ToolRenderer } from "@21st-sdk/react"
122
122
  ```
123
123
 
124
124
  ## CSS
@@ -126,7 +126,7 @@ import { MessageList, InputBar, ToolRenderer } from "@an-sdk/react"
126
126
  Import once in your app:
127
127
 
128
128
  ```tsx
129
- import "@an-sdk/react/styles.css"
129
+ import "@21st-sdk/react/styles.css"
130
130
  ```
131
131
 
132
132
  No Tailwind peer dependency — CSS is pre-compiled. All elements have stable `an-*` class names:
package/docs/05-nextjs.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Next.js Integration
2
2
 
3
- `@an-sdk/nextjs` provides a server-side token handler so your `an_sk_` API key never reaches the browser. It also re-exports everything from `@an-sdk/react` for convenience.
3
+ `@21st-sdk/nextjs` provides a server-side token handler so your `an_sk_` API key never reaches the browser. It also re-exports everything from `@21st-sdk/react` for convenience.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- npm install @an-sdk/nextjs @an-sdk/react ai @ai-sdk/react
8
+ npm install @21st-sdk/nextjs @21st-sdk/react ai @ai-sdk/react
9
9
  ```
10
10
 
11
11
  ## Setup
@@ -17,13 +17,13 @@ npm install @an-sdk/nextjs @an-sdk/react ai @ai-sdk/react
17
17
  AN_API_KEY=an_sk_your_key_here
18
18
  ```
19
19
 
20
- Get your API key from [an.dev/agents/dashboard/api](https://an.dev/agents/dashboard/api).
20
+ Get your API key from [the dashboard](https://21st.dev/agents/dashboard/api).
21
21
 
22
22
  ### 2. Create the token route
23
23
 
24
24
  ```ts
25
25
  // app/api/an/token/route.ts
26
- import { createAnTokenHandler } from "@an-sdk/nextjs/server"
26
+ import { createAnTokenHandler } from "@21st-sdk/nextjs/server"
27
27
 
28
28
  export const POST = createAnTokenHandler({
29
29
  apiKey: process.env.AN_API_KEY!,
@@ -37,8 +37,8 @@ export const POST = createAnTokenHandler({
37
37
  "use client"
38
38
 
39
39
  import { useChat } from "@ai-sdk/react"
40
- import { AnAgentChat, createAnChat } from "@an-sdk/nextjs"
41
- import "@an-sdk/react/styles.css"
40
+ import { AnAgentChat, createAnChat } from "@21st-sdk/nextjs"
41
+ import "@21st-sdk/react/styles.css"
42
42
  import { useMemo } from "react"
43
43
 
44
44
  export default function Chat() {
@@ -102,7 +102,7 @@ createAnTokenHandler({
102
102
  Lower-level function for custom token exchange logic.
103
103
 
104
104
  ```ts
105
- import { exchangeToken } from "@an-sdk/nextjs/server"
105
+ import { exchangeToken } from "@21st-sdk/nextjs/server"
106
106
 
107
107
  const { token, expiresAt } = await exchangeToken({
108
108
  apiKey: process.env.AN_API_KEY!,
@@ -113,5 +113,5 @@ const { token, expiresAt } = await exchangeToken({
113
113
 
114
114
  ## Entry Points
115
115
 
116
- - `@an-sdk/nextjs` — Re-exports everything from `@an-sdk/react` (components, types, `createAnChat`)
117
- - `@an-sdk/nextjs/server` — Server-only: `createAnTokenHandler`, `exchangeToken`
116
+ - `@21st-sdk/nextjs` — Re-exports everything from `@21st-sdk/react` (components, types, `createAnChat`)
117
+ - `@21st-sdk/nextjs/server` — Server-only: `createAnTokenHandler`, `exchangeToken`
@@ -1,17 +1,17 @@
1
1
  # Node SDK
2
2
 
3
- `@an-sdk/node` is a server-side client for the AN API. Use it to manage sandboxes, threads, and tokens programmatically.
3
+ `@21st-sdk/node` is a server-side client for the AN API. Use it to manage sandboxes, threads, and tokens programmatically.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- npm install @an-sdk/node
8
+ npm install @21st-sdk/node
9
9
  ```
10
10
 
11
11
  ## Quick Start
12
12
 
13
13
  ```ts
14
- import { AnClient } from "@an-sdk/node"
14
+ import { AnClient } from "@21st-sdk/node"
15
15
 
16
16
  const an = new AnClient({
17
17
  apiKey: process.env.AN_API_KEY!, // an_sk_...
package/docs/07-cli.md CHANGED
@@ -1,35 +1,35 @@
1
1
  # CLI Reference
2
2
 
3
- `@an-sdk/cli` provides the `an` command for deploying agents.
3
+ `@21st-sdk/cli` provides the `an` command for deploying agents.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- npm install -g @an-sdk/cli
8
+ npm install -g @21st-sdk/cli
9
9
  # or use npx
10
- npx @an-sdk/cli <command>
10
+ npx @21st-sdk/cli <command>
11
11
  ```
12
12
 
13
13
  ## Commands
14
14
 
15
- ### `@an-sdk/cli login`
15
+ ### `@21st-sdk/cli login`
16
16
 
17
17
  Authenticate with the AN platform.
18
18
 
19
19
  ```bash
20
- npx @an-sdk/cli login
20
+ npx @21st-sdk/cli login
21
21
  # Enter your API key: an_sk_...
22
22
  # Authenticated as John (team: my-team)
23
23
  ```
24
24
 
25
25
  Your key is saved to `~/.an/credentials`.
26
26
 
27
- ### `@an-sdk/cli deploy`
27
+ ### `@21st-sdk/cli deploy`
28
28
 
29
29
  Bundle and deploy your agent.
30
30
 
31
31
  ```bash
32
- npx @an-sdk/cli deploy
32
+ npx @21st-sdk/cli deploy
33
33
  # Bundling src/agent.ts...
34
34
  # Bundled (12.3kb)
35
35
  # Deploying my-agent...
@@ -71,7 +71,7 @@ Subsequent deploys update the existing agent.
71
71
  The CLI uses esbuild to bundle your agent code:
72
72
 
73
73
  - Target: Node 22, ESM
74
- - `@an-sdk/agent` is externalized (provided by the sandbox runtime)
74
+ - `@21st-sdk/agent` is externalized (provided by the sandbox runtime)
75
75
  - All other dependencies are bundled into a single file
76
76
 
77
77
  ## Configuration Files
@@ -1,6 +1,6 @@
1
1
  # Custom Tool Renderers
2
2
 
3
- The `@an-sdk/react` chat UI automatically renders tool calls from your agent. It includes built-in renderers for all standard Claude tools and supports custom renderers for your own tools.
3
+ The `@21st-sdk/react` chat UI automatically renders tool calls from your agent. It includes built-in renderers for all standard Claude tools and supports custom renderers for your own tools.
4
4
 
5
5
  ## Built-in Tool Renderers
6
6
 
@@ -24,8 +24,8 @@ These are rendered automatically when your agent uses standard tools:
24
24
  To render your custom tools differently, use the `slots.ToolRenderer` prop:
25
25
 
26
26
  ```tsx
27
- import { AnAgentChat, ToolRenderer } from "@an-sdk/react"
28
- import type { ToolPart } from "@an-sdk/react"
27
+ import { AnAgentChat, ToolRenderer } from "@21st-sdk/react"
28
+ import type { ToolPart } from "@21st-sdk/react"
29
29
 
30
30
  function MyToolRenderer(props: { part: ToolPart; status: string }) {
31
31
  const { part, status } = props
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@21st-sdk/react",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "license": "MIT",
5
- "description": "React components for AN AI agent chat UIs — drop-in chat, tool renderers, and theming",
6
- "homepage": "https://an.dev",
5
+ "description": "React components for An AI agent chat UIs",
6
+ "homepage": "https://21st.dev/agents",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -28,6 +28,7 @@
28
28
  "files": [
29
29
  "dist",
30
30
  "docs/**/*",
31
+ "styles",
31
32
  "src",
32
33
  "!src/**/*.test.ts",
33
34
  "AGENTS.md",
@@ -0,0 +1,161 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ /*
6
+ * AN Agent Chat - CSS Custom Properties
7
+ * These are the default values. Consumers override via <AnAgentChat theme={...} />
8
+ * which calls applyTheme() to set these vars on the root element.
9
+ */
10
+ :root, .an-root {
11
+ /* Typography */
12
+ --an-font-family: system-ui, sans-serif;
13
+ --an-text-size: 14px;
14
+ --an-text-size-sm: 13px;
15
+ --an-text-size-xs: 11px;
16
+ --an-line-height: 1.6;
17
+ --an-font-weight: 400;
18
+ --an-font-weight-medium: 500;
19
+ --an-font-weight-semibold: 600;
20
+
21
+ /* Geometry — all radii derive from --an-border-radius */
22
+ --an-border-radius: 16px;
23
+ --an-message-border-radius: var(--an-border-radius);
24
+ --an-input-border-radius: var(--an-border-radius);
25
+ --an-tool-border-radius: var(--an-border-radius);
26
+ --an-code-border-radius: var(--an-border-radius);
27
+
28
+ /* Layout — --an-message-gap is intentionally unset; density config provides the default */
29
+ --an-user-message-padding: 10px 14px;
30
+ --an-input-padding: 12px 16px;
31
+
32
+ /* Sizes */
33
+ --an-send-button-size: 32px;
34
+ --an-stop-button-size: 32px;
35
+ --an-send-button-border-radius: 9999px;
36
+
37
+ /* Colors - Light mode defaults */
38
+ --an-background: #ffffff;
39
+ --an-background-secondary: #f5f5f5;
40
+ --an-background-tertiary: #fafafa;
41
+ --an-foreground: #1a1a1a;
42
+ --an-foreground-muted: #737373;
43
+ --an-foreground-subtle: #a3a3a3;
44
+ --an-border-color: #e5e5e5;
45
+ --an-border-color-light: #f0f0f0;
46
+ --an-primary-color: #3b82f6;
47
+
48
+ /* User Messages */
49
+ --an-user-message-bg: #f5f5f5;
50
+ --an-user-message-text: #1a1a1a;
51
+
52
+ /* Input */
53
+ --an-input-background: #ffffff;
54
+ --an-input-border-color: #e5e5e5;
55
+ --an-input-color: #1a1a1a;
56
+ --an-input-placeholder-color: #a3a3a3;
57
+
58
+ /* Send/Stop Buttons */
59
+ --an-send-button-bg: #3b82f6;
60
+ --an-send-button-color: #ffffff;
61
+ --an-stop-button-bg: #1a1a1a;
62
+ --an-stop-button-color: #ffffff;
63
+
64
+ /* Tools */
65
+ --an-tool-background: #fafafa;
66
+ --an-tool-border-color: #e5e5e5;
67
+ --an-tool-color: #1a1a1a;
68
+ --an-tool-color-muted: #737373;
69
+
70
+ /* Code */
71
+ --an-code-background: #1e1e1e;
72
+ --an-code-color: #d4d4d4;
73
+ --an-code-font-family: ui-monospace, monospace;
74
+ --an-code-font-size: 13px;
75
+
76
+ /* Diff colors */
77
+ --an-diff-added-bg: rgba(34, 197, 94, 0.1);
78
+ --an-diff-added-border: rgba(34, 197, 94, 0.5);
79
+ --an-diff-added-text: #15803d;
80
+ --an-diff-removed-bg: rgba(239, 68, 68, 0.1);
81
+ --an-diff-removed-border: rgba(239, 68, 68, 0.5);
82
+ --an-diff-removed-text: #dc2626;
83
+ }
84
+
85
+ /* Dark mode defaults */
86
+ .dark, .an-root.dark, .dark .an-root {
87
+ --an-background: #0a0a0a;
88
+ --an-background-secondary: #1a1a1a;
89
+ --an-background-tertiary: #141414;
90
+ --an-foreground: #fafafa;
91
+ --an-foreground-muted: #a3a3a3;
92
+ --an-foreground-subtle: #71717a;
93
+ --an-border-color: #2a2a2a;
94
+ --an-border-color-light: #1f1f1f;
95
+ --an-primary-color: #60a5fa;
96
+
97
+ --an-user-message-bg: #1a1a1a;
98
+ --an-user-message-text: #fafafa;
99
+
100
+ --an-input-background: #0a0a0a;
101
+ --an-input-border-color: #2a2a2a;
102
+ --an-input-color: #fafafa;
103
+ --an-input-placeholder-color: #71717a;
104
+
105
+ --an-send-button-bg: #60a5fa;
106
+ --an-send-button-color: #ffffff;
107
+ --an-stop-button-bg: #fafafa;
108
+ --an-stop-button-color: #0a0a0a;
109
+
110
+ --an-tool-background: #141414;
111
+ --an-tool-border-color: #2a2a2a;
112
+ --an-tool-color: #fafafa;
113
+ --an-tool-color-muted: #a3a3a3;
114
+
115
+ --an-code-background: #0a0a0a;
116
+ --an-code-color: #d4d4d4;
117
+
118
+ --an-diff-added-bg: rgba(34, 197, 94, 0.15);
119
+ --an-diff-added-border: rgba(34, 197, 94, 0.4);
120
+ --an-diff-added-text: #4ade80;
121
+ --an-diff-removed-bg: rgba(239, 68, 68, 0.15);
122
+ --an-diff-removed-border: rgba(239, 68, 68, 0.4);
123
+ --an-diff-removed-text: #f87171;
124
+ }
125
+
126
+ /* TextShimmer animation */
127
+ @keyframes an-shimmer {
128
+ from { background-position: 100% center; }
129
+ to { background-position: 0% center; }
130
+ }
131
+
132
+ .an-text-shimmer {
133
+ display: inline-block;
134
+ background-size: 250% 100%;
135
+ background-clip: text;
136
+ -webkit-background-clip: text;
137
+ color: transparent;
138
+ background-image:
139
+ linear-gradient(90deg, transparent calc(50% - var(--an-shimmer-spread, 100px)), var(--an-foreground-muted, #737373), transparent calc(50% + var(--an-shimmer-spread, 100px))),
140
+ linear-gradient(var(--an-foreground-subtle, #a3a3a3), var(--an-foreground-subtle, #a3a3a3));
141
+ background-repeat: no-repeat, padding-box;
142
+ }
143
+
144
+ .an-text-shimmer--active {
145
+ animation: an-shimmer var(--an-shimmer-duration, 2s) linear infinite;
146
+ }
147
+
148
+ /* Scrollbar hide utility */
149
+ .scrollbar-hide {
150
+ -ms-overflow-style: none;
151
+ scrollbar-width: none;
152
+ }
153
+ .scrollbar-hide::-webkit-scrollbar {
154
+ display: none;
155
+ }
156
+
157
+ /* Spinner animation */
158
+ @keyframes an-spinner-rotate {
159
+ from { transform: rotate(0deg); }
160
+ to { transform: rotate(360deg); }
161
+ }