aural-ui 3.0.1 → 3.0.4

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
@@ -116,12 +116,12 @@ The **aural-ui MCP server** exposes the design system by reading from aural-ui s
116
116
 
117
117
  ### Setup in Cursor
118
118
 
119
- Add **aural-ui** in `.cursor/mcp.json` (or Cursor Settings → MCP). Start the MCP server first (e.g. `npx tsx mcp/src/index.ts` from the aural-ui repo root, or run the Docker image), then point Cursor at the streamable HTTP endpoint:
119
+ Add the server in `.cursor/mcp.json` (or Cursor Settings → MCP). Start the MCP server first (e.g. `npx tsx mcp/src/index.ts` from the aural-ui repo root, or run the Docker image), then point Cursor at the streamable HTTP endpoint:
120
120
 
121
121
  ```json
122
122
  {
123
123
  "mcpServers": {
124
- "aural-ui-mcp": {
124
+ "aural-ui": {
125
125
  "type": "streamableHttp",
126
126
  "url": "http://localhost:3000/mcp"
127
127
  }
@@ -129,23 +129,24 @@ Add **aural-ui** in `.cursor/mcp.json` (or Cursor Settings → MCP). Start the M
129
129
  }
130
130
  ```
131
131
 
132
- Use the same URL when the server runs in Docker or elsewhere (e.g. `http://your-host:3000/mcp`).
132
+ The server identifies as **aural-ui** so agents match user phrases like "add aural-ui btn". Use the same URL when the server runs in Docker or elsewhere (e.g. `http://your-host:3000/mcp`).
133
133
 
134
134
  - **Config:** All MCP server settings are in `mcp/src/lib/env.ts` (no .env). You can set `AURAL_UI_SRC` there to the aural-ui repo `src` path if the workspace is not the aural-ui repo.
135
135
 
136
136
  **HTTP / Docker:** When running the MCP server over HTTP (e.g. in Docker):
137
137
  - **GET /health** — Returns `200` and `{ "ok": true, "server": "aural-ui" }` for load balancers and orchestrators (no MCP session required).
138
138
  - **GET /metrics** — Returns Prometheus-format metrics: `mcp_sessions_active`, `mcp_sessions_max`, `mcp_tool_calls_total{tool="..."}` (no MCP session required).
139
- - **Settings** (in `mcp/src/lib/env.ts`): `PORT` (default `3000`), `MCP_MAX_SESSIONS` (default `100`; 0 = unlimited), `MCP_SESSION_IDLE_TIMEOUT_MS` (default 15 min), `MCP_ALLOWED_PROJECT_ROOTS`, `MCP_LIST_CACHE_TTL_MS` (list cache TTL).
139
+ - **Settings** (in `mcp/src/lib/env.ts`): `PORT` (default `3000`), `MCP_MAX_SESSIONS` (default `100`; 0 = unlimited), `MCP_SESSION_IDLE_TIMEOUT_MS` (default 15 min), `MCP_LIST_CACHE_TTL_MS` (list cache TTL).
140
140
 
141
- To have Cursor install Aural UI components in your project (instead of writing code manually), ask it to use **`add_aural_components`** with the component names (e.g. `["button", "card", "dialog"]`). The tool will run `npx aural-ui init --yes` if needed, then `npx aural-ui add ...`.
141
+ To have Cursor install Aural UI components in your project (instead of writing code manually), ask it to use **`add_aural_components`** with the component names (e.g. `["button", "card", "dialog"]`). The agent must run the returned CLI steps first on the user machine; use componentSources only if the CLI fails. Do not pass `--yes` to `add`; only `init` supports it.
142
142
 
143
143
  ### MCP tools
144
144
 
145
145
  | Tool | Description |
146
146
  |------|-------------|
147
- | `add_aural_components` | **Runs the CLI:** init if needed, then `npx aural-ui add <components>`. Only use component names that exist; if the user's request is unclear or doesn't match, call `list_components` first and show available names—do not guess and add a different component. |
148
- | `init_aural_ui` | **Runs the CLI:** runs `npx aural-ui init --yes` in the workspace. Use when the project has no aural-ui.json yet. |
147
+ | `add_aural_components` | **Returns instructions:** run the returned CLI steps first on the user machine (init if needed, then `npx aural-ui add <components>`); use componentSources only if CLI fails. Only use component names that exist; call `list_components` first if unclear. The MCP does not run the CLI. |
148
+ | `init_aural_ui` | **Returns instructions:** step to run `npx aural-ui init --yes` in the project root on the user machine. Use when the project has no aural-ui.json yet. The MCP does not run the CLI. |
149
+ | `ensure_aural_components` | **Returns instructions:** run the returned CLI steps first (init if needed, then add); use componentSources only if CLI fails. Only missing components are added by the CLI. The MCP does not run the CLI. |
149
150
  | `get_aural_ui_status` | Where aural-ui source is resolved (env, repo, node_modules). |
150
151
  | `get_aural_ui_version` | Returns the aural-ui design system version from the resolved source (package.json). |
151
152
  | `list_components` / `list_icons` / `list_hooks` | **Call first when unsure:** returns available component, icon, or hook names. Use when the user asks for a component/hook that might not exist so you can show the list instead of guessing. |
@@ -67,7 +67,7 @@ export const Secondary: Story = {
67
67
  variant: "secondary",
68
68
  children: "Secondary Button",
69
69
  size: "md",
70
- noise: "medium",
70
+ noise: "low",
71
71
  },
72
72
  }
73
73
 
@@ -242,9 +242,7 @@ export const AllVariants: Story = {
242
242
  <Button variant="primary" noise="medium">
243
243
  Primary
244
244
  </Button>
245
- <Button variant="secondary" noise="medium">
246
- Secondary
247
- </Button>
245
+ <Button variant="secondary">Secondary</Button>
248
246
  <Button variant="outline" noise="none">
249
247
  Outline
250
248
  </Button>
@@ -287,13 +285,12 @@ export const WithToolTip: Story = {
287
285
  </Button>
288
286
  <Button
289
287
  variant="secondary"
290
- tooltip="Secondary Variant with Low Noise"
288
+ tooltip="Secondary (default: low noise)"
291
289
  tooltipContentProps={{
292
290
  align: "center",
293
291
  side: "bottom",
294
292
  sideOffset: 10,
295
293
  }}
296
- noise="low"
297
294
  >
298
295
  Secondary
299
296
  </Button>
@@ -133,7 +133,7 @@ export const innerButtonVariants = cva(
133
133
  variant: "primary",
134
134
  disabled: "default",
135
135
  size: "md",
136
- noise: "medium",
136
+ noise: "none",
137
137
  },
138
138
  }
139
139
  )
@@ -156,7 +156,7 @@ export const RawButton = forwardRef<HTMLButtonElement, ButtonProps>(
156
156
  {
157
157
  variant = "primary",
158
158
  size = "md",
159
- noise = "medium",
159
+ noise: noiseProp,
160
160
  children,
161
161
  className = "",
162
162
  innerClassName = "",
@@ -168,6 +168,14 @@ export const RawButton = forwardRef<HTMLButtonElement, ButtonProps>(
168
168
  },
169
169
  ref
170
170
  ) => {
171
+ const noise =
172
+ noiseProp ??
173
+ (variant === "primary"
174
+ ? "medium"
175
+ : variant === "secondary"
176
+ ? "low"
177
+ : "none")
178
+
171
179
  const iconColor = isDisabled
172
180
  ? "var(--icon-fm-inactive)"
173
181
  : variant === "text"
@@ -32,7 +32,7 @@ interface InputComponent extends ForwardRefExoticComponent<
32
32
  // CVA for input variants
33
33
  export const inputVariants = cva(
34
34
  // Base styles
35
- "block w-full focus:outline-none transition-all duration-200 border-solid tracking-wide placeholder:text-fm-placeholder font-fm-text text-fm-primary",
35
+ "block w-full focus:outline-none transition-all duration-200 border-solid tracking-wide placeholder:text-fm-tertiary font-fm-text text-fm-primary",
36
36
  {
37
37
  variants: {
38
38
  variant: {
@@ -157,7 +157,7 @@ function Slider({
157
157
  key={index}
158
158
  aria-label={getThumbAriaLabel(index, _values[index])}
159
159
  className={cn(
160
- "block shrink-0 transition-[color,box-shadow] hover:ring-2 focus-visible:ring-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",
160
+ "block shrink-0 cursor-pointer transition-[color,box-shadow] hover:ring-2 focus-visible:ring-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
161
161
  sliderThumbVariants({ size, variant }),
162
162
  classes?.thumb
163
163
  )}