@nexub/mcp 3.1.0 → 3.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.
- package/dist/skill/SKILL.md +3 -1
- package/dist/skill/references/components/bar-chart.md +81 -0
- package/dist/skill/references/components/donut-chart.md +53 -0
- package/dist/skill/references/components/line-chart.md +83 -0
- package/dist/skill/references/components/sparkline.md +41 -0
- package/dist/skill/references/components.md +6 -2
- package/dist/skill/references/tokens.md +1 -1
- package/package.json +1 -1
package/dist/skill/SKILL.md
CHANGED
|
@@ -70,7 +70,8 @@ Starting points for typical SaaS screens:
|
|
|
70
70
|
| Screen | Build with |
|
|
71
71
|
| --- | --- |
|
|
72
72
|
| App frame | `AppShell` (`AppShell.Root/Header/Body/Sidebar/Main`) + `Sidebar` or `NavigationRail` + `AppHeader` or `TopNav` |
|
|
73
|
-
| Dashboard | `PageHeader` + a `Grid` of `StatCard` + `DataTable` or `Table` + `ActivityFeed` |
|
|
73
|
+
| Dashboard | `PageHeader` + a `Grid` of `StatCard` + `BarChart` / `LineChart` + `DataTable` or `Table` + `ActivityFeed` |
|
|
74
|
+
| Charts | `BarChart` (compare categories), `LineChart` (trend over time), `DonutChart` (parts of a whole, six slices at most), `Sparkline` (trend inside a stat or table cell). Pass `title`, `data`, `index` and `series`; colours come from the chart palette, never hex |
|
|
74
75
|
| List / detail | `ListDetail` + `FilterBar` + `EmptyState` |
|
|
75
76
|
| Settings | `SettingsLayout` / `SettingsRow` + `SettingsSection` + `FormField` |
|
|
76
77
|
| Sign in / sign up | `AuthCard` + `FormField` + `PasswordInput` |
|
|
@@ -78,6 +79,7 @@ Starting points for typical SaaS screens:
|
|
|
78
79
|
| Onboarding | `StepIndicator` + `CheckList` |
|
|
79
80
|
| Search / commands | `CommandPalette` + `KeyboardShortcut` |
|
|
80
81
|
| Empty, loading, error | `EmptyState`, `Skeleton`, `ErrorState`, `Toast` |
|
|
82
|
+
| White-label / customer brand | `<ThemeProvider seed="#hex">` (native: `<NexubNativeProvider seed>`), plus `createSeedStylesheet(seed)` from `@nexub/tokens/seed` rendered on the server so there is no flash. Never hand-pick brand hex for roles; try colours at nexub.design/foundations/theme-builder |
|
|
81
83
|
| Marketing / landing page | `@nexub/marketing` under `data-mode="marketing"`: `MarketingNav`, `Hero`, `LogoStrip`, `StatBand`, `FeatureSplit`, `HowItWorks`, `ProductGrid`, `TestimonialGrid`, `PricingTable`, `FAQ`, `CTABand`, `MarketingFooter` |
|
|
82
84
|
|
|
83
85
|
Money: use `Amount` and `MoneyInput`. They use tabular figures, the currency's own minor unit and a true minus sign. Icons: import from `@nexub/icons`, not `lucide-react` directly.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Bar Chart
|
|
2
|
+
|
|
3
|
+
Compare values across categories, grouped or stacked. Server-rendered SVG on the chart palette.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Data Display · Status: beta
|
|
6
|
+
- Import: `import { BarChart } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/bar-chart
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `title` (required) | `string` | | Accessible name of the chart and caption of its data table. |
|
|
14
|
+
| `data` (required) | `T[]` | | One row per category, in order. |
|
|
15
|
+
| `index` (required) | `keyof T` | | Key of the category label in each row (the x axis). |
|
|
16
|
+
| `series` (required) | `ChartSeries[]` | | `{ key, label?, color? }` per series. `color` is 1–8 from the categorical chart palette; defaults to the series position. |
|
|
17
|
+
| `valueFormat` | `(value: number) => string` | | Formats axis labels, hover text and the data table. |
|
|
18
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Plot height: 8, 12 or 16rem. |
|
|
19
|
+
| `legend` | `boolean` | | Show the legend. Defaults to on for more than one series. |
|
|
20
|
+
| `stacked` | `boolean` | `false` | One bar per category with the series stacked. |
|
|
21
|
+
|
|
22
|
+
## Example: Grouped
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { BarChart } from '@nexub/react';
|
|
26
|
+
|
|
27
|
+
const data = [
|
|
28
|
+
{ month: 'May', thisYear: 42, lastYear: 35 },
|
|
29
|
+
{ month: 'Jun', thisYear: 48, lastYear: 37 },
|
|
30
|
+
{ month: 'Jul', thisYear: 45, lastYear: 40 },
|
|
31
|
+
{ month: 'Aug', thisYear: 56, lastYear: 41 },
|
|
32
|
+
{ month: 'Sep', thisYear: 61, lastYear: 47 },
|
|
33
|
+
{ month: 'Oct', thisYear: 68, lastYear: 50 },
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
export default function Example() {
|
|
37
|
+
return (
|
|
38
|
+
<BarChart
|
|
39
|
+
className="w-full"
|
|
40
|
+
title="Revenue by month"
|
|
41
|
+
data={data}
|
|
42
|
+
index="month"
|
|
43
|
+
series={[{ key: 'thisYear', label: '2026' }, { key: 'lastYear', label: '2025' }]}
|
|
44
|
+
valueFormat={(v) => `$${v}k`}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Example: Stacked
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
import { BarChart } from '@nexub/react';
|
|
54
|
+
|
|
55
|
+
const data = [
|
|
56
|
+
{ quarter: 'Q1', web: 120, ios: 80, android: 60 },
|
|
57
|
+
{ quarter: 'Q2', web: 140, ios: 95, android: 72 },
|
|
58
|
+
{ quarter: 'Q3', web: 150, ios: 110, android: 90 },
|
|
59
|
+
{ quarter: 'Q4', web: 170, ios: 128, android: 101 },
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
export default function Example() {
|
|
63
|
+
return (
|
|
64
|
+
<BarChart
|
|
65
|
+
stacked
|
|
66
|
+
className="w-full"
|
|
67
|
+
title="Signups by platform"
|
|
68
|
+
data={data}
|
|
69
|
+
index="quarter"
|
|
70
|
+
series={[{ key: 'web', label: 'Web' }, { key: 'ios', label: 'iOS' }, { key: 'android', label: 'Android' }]}
|
|
71
|
+
/>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Accessibility
|
|
77
|
+
|
|
78
|
+
- The chart is a `figure` named by `title`. The drawing is hidden from assistive tech; a visually hidden table carries every value.
|
|
79
|
+
- Colour is never the only cue: the legend and table name each series. Past six series, label directly or group the rest as "Other".
|
|
80
|
+
|
|
81
|
+
Related: [line-chart](line-chart.md), [donut-chart](donut-chart.md), [sparkline](sparkline.md)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Donut Chart
|
|
2
|
+
|
|
3
|
+
Parts of a whole, with an optional total in the hole. Keep it to six slices or fewer.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Data Display · Status: beta
|
|
6
|
+
- Import: `import { DonutChart } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/donut-chart
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `title` (required) | `string` | | Accessible name of the chart. |
|
|
14
|
+
| `data` (required) | `{ label: string; value: number; color?: ChartColor }[]` | | One entry per slice. |
|
|
15
|
+
| `center` | `ReactNode` | | Content in the hole, such as the total. |
|
|
16
|
+
| `valueFormat` | `(value: number) => string` | | Formats the hover text and the data table. |
|
|
17
|
+
| `legend` | `boolean` | `true` | Show the legend beside the donut. |
|
|
18
|
+
|
|
19
|
+
## Example: With total
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { DonutChart } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
const plans = [
|
|
25
|
+
{ label: 'Pro', value: 540 },
|
|
26
|
+
{ label: 'Team', value: 310 },
|
|
27
|
+
{ label: 'Starter', value: 220 },
|
|
28
|
+
{ label: 'Free', value: 130 },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
export default function Example() {
|
|
32
|
+
return (
|
|
33
|
+
<DonutChart
|
|
34
|
+
title="Customers by plan"
|
|
35
|
+
data={plans}
|
|
36
|
+
center={
|
|
37
|
+
<span>
|
|
38
|
+
1,200
|
|
39
|
+
<br />
|
|
40
|
+
<span className="text-label-sm text-[var(--color-on-surface-muted)]">customers</span>
|
|
41
|
+
</span>
|
|
42
|
+
}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Accessibility
|
|
49
|
+
|
|
50
|
+
- The chart is a `figure` named by `title`. The drawing is hidden from assistive tech; a visually hidden table carries every value.
|
|
51
|
+
- Colour is never the only cue: the legend and table name each series. Past six series, label directly or group the rest as "Other".
|
|
52
|
+
|
|
53
|
+
Related: [bar-chart](bar-chart.md)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Line Chart
|
|
2
|
+
|
|
3
|
+
Show a trend over ordered categories such as time. Server-rendered SVG on the chart palette.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Data Display · Status: beta
|
|
6
|
+
- Import: `import { LineChart } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/line-chart
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `title` (required) | `string` | | Accessible name of the chart and caption of its data table. |
|
|
14
|
+
| `data` (required) | `T[]` | | One row per category, in order. |
|
|
15
|
+
| `index` (required) | `keyof T` | | Key of the category label in each row (the x axis). |
|
|
16
|
+
| `series` (required) | `ChartSeries[]` | | `{ key, label?, color? }` per series. `color` is 1–8 from the categorical chart palette; defaults to the series position. |
|
|
17
|
+
| `valueFormat` | `(value: number) => string` | | Formats axis labels, hover text and the data table. |
|
|
18
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Plot height: 8, 12 or 16rem. |
|
|
19
|
+
| `legend` | `boolean` | | Show the legend. Defaults to on for more than one series. |
|
|
20
|
+
| `area` | `boolean` | `false` | Fill the area under each line. |
|
|
21
|
+
|
|
22
|
+
## Example: Two series
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { LineChart } from '@nexub/react';
|
|
26
|
+
|
|
27
|
+
const data = [
|
|
28
|
+
{ week: 'W1', active: 820, trial: 310 },
|
|
29
|
+
{ week: 'W2', active: 870, trial: 290 },
|
|
30
|
+
{ week: 'W3', active: 905, trial: 340 },
|
|
31
|
+
{ week: 'W4', active: 960, trial: 330 },
|
|
32
|
+
{ week: 'W5', active: 1010, trial: 360 },
|
|
33
|
+
{ week: 'W6', active: 1080, trial: 355 },
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
export default function Example() {
|
|
37
|
+
return (
|
|
38
|
+
<LineChart
|
|
39
|
+
className="w-full"
|
|
40
|
+
title="Weekly users"
|
|
41
|
+
data={data}
|
|
42
|
+
index="week"
|
|
43
|
+
series={[{ key: 'active', label: 'Active' }, { key: 'trial', label: 'Trial' }]}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Example: Area
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import { LineChart } from '@nexub/react';
|
|
53
|
+
|
|
54
|
+
const data = [
|
|
55
|
+
{ day: 'Mon', p95: 210 },
|
|
56
|
+
{ day: 'Tue', p95: 190 },
|
|
57
|
+
{ day: 'Wed', p95: 240 },
|
|
58
|
+
{ day: 'Thu', p95: 205 },
|
|
59
|
+
{ day: 'Fri', p95: 180 },
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
export default function Example() {
|
|
63
|
+
return (
|
|
64
|
+
<LineChart
|
|
65
|
+
area
|
|
66
|
+
size="sm"
|
|
67
|
+
className="w-full"
|
|
68
|
+
title="API latency, p95"
|
|
69
|
+
data={data}
|
|
70
|
+
index="day"
|
|
71
|
+
series={[{ key: 'p95', label: 'p95 latency', color: 6 }]}
|
|
72
|
+
valueFormat={(v) => `${v} ms`}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Accessibility
|
|
79
|
+
|
|
80
|
+
- The chart is a `figure` named by `title`. The drawing is hidden from assistive tech; a visually hidden table carries every value.
|
|
81
|
+
- Colour is never the only cue: the legend and table name each series. Past six series, label directly or group the rest as "Other".
|
|
82
|
+
|
|
83
|
+
Related: [bar-chart](bar-chart.md), [sparkline](sparkline.md)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Sparkline
|
|
2
|
+
|
|
3
|
+
A tiny trend line with no axes, for stat cards and table cells.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Data Display · Status: beta
|
|
6
|
+
- Import: `import { Sparkline } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/sparkline
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `values` (required) | `number[]` | | The points, oldest first. |
|
|
14
|
+
| `label` | `string` | | Accessible summary, such as "Revenue, last 12 weeks, up 8%". Without it the sparkline is decorative. |
|
|
15
|
+
| `color` | `ChartColor` | `1` | Palette colour, 1–8. |
|
|
16
|
+
| `area` | `boolean` | `false` | Fill the area under the line. |
|
|
17
|
+
|
|
18
|
+
## Example: In a stat
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { Sparkline } from '@nexub/react';
|
|
22
|
+
|
|
23
|
+
export default function Example() {
|
|
24
|
+
return (
|
|
25
|
+
<div className="flex items-end gap-4 rounded-2xl border border-[var(--color-outline-variant)] p-4">
|
|
26
|
+
<div>
|
|
27
|
+
<p className="text-label-md text-[var(--color-on-surface-variant)]">Monthly revenue</p>
|
|
28
|
+
<p className="text-title-lg text-[var(--color-on-surface)]">$68,420</p>
|
|
29
|
+
</div>
|
|
30
|
+
<Sparkline area values={[42, 48, 45, 56, 61, 68]} label="Up 62% over six months" color={2} />
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Accessibility
|
|
37
|
+
|
|
38
|
+
- The chart is a `figure` named by `title`. The drawing is hidden from assistive tech; a visually hidden table carries every value.
|
|
39
|
+
- Colour is never the only cue: the legend and table name each series. Past six series, label directly or group the rest as "Other".
|
|
40
|
+
|
|
41
|
+
Related: [line-chart](line-chart.md), [stat-card](stat-card.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Component index
|
|
2
2
|
|
|
3
|
-
Nexub DS v3.
|
|
3
|
+
Nexub DS v3.3.0. Open `components/<slug>.md` for props, examples and accessibility notes.
|
|
4
4
|
Never use a component marked deprecated.
|
|
5
5
|
|
|
6
6
|
## Components — Actions
|
|
@@ -26,10 +26,14 @@ Never use a component marked deprecated.
|
|
|
26
26
|
## Components — Data Display
|
|
27
27
|
|
|
28
28
|
- [Amount](components/amount.md) `@nexub/react`: Honest money: Intl formatting, tabular numerals, the currency’s minor unit and a true minus sign.
|
|
29
|
+
- [Bar Chart](components/bar-chart.md) `@nexub/react`: Compare values across categories, grouped or stacked. Server-rendered SVG on the chart palette.
|
|
29
30
|
- [Data Table](components/data-table.md) `@nexub/react`: Feature-rich data table with sorting and row selection powered by TanStack Table.
|
|
31
|
+
- [Donut Chart](components/donut-chart.md) `@nexub/react`: Parts of a whole, with an optional total in the hole. Keep it to six slices or fewer.
|
|
30
32
|
- [Empty State](components/empty-state.md) `@nexub/react`: Placeholder UI shown when a list or page has no content.
|
|
31
33
|
- [Error State](components/error-state.md) `@nexub/react`: Full-page or section error view with retry action.
|
|
34
|
+
- [Line Chart](components/line-chart.md) `@nexub/react`: Show a trend over ordered categories such as time. Server-rendered SVG on the chart palette.
|
|
32
35
|
- [Number Ticker](components/number-ticker.md) `@nexub/react`: A number whose digits roll to new values on the spatial spring. The first render never animates.
|
|
36
|
+
- [Sparkline](components/sparkline.md) `@nexub/react`: A tiny trend line with no axes, for stat cards and table cells.
|
|
33
37
|
- [Table](components/table.md) `@nexub/react`: Semantic HTML table with styled variants.
|
|
34
38
|
|
|
35
39
|
## Components — Disclosure
|
|
@@ -203,5 +207,5 @@ Never use a component marked deprecated.
|
|
|
203
207
|
|
|
204
208
|
These exist; read their TypeScript props in `node_modules/<package>/dist/index.d.ts`.
|
|
205
209
|
|
|
206
|
-
- `@nexub/react`: AppShell, AspectRatio, CheckList, Code, CommandPalette, Container, ContextMenu, CountryBadge, DropdownMenu, FileUpload, Flag, FormError, KeyboardShortcut, Logo, Menubar, Motion, NavigationMenu, NexubProvider, PageHeader, Section, Sidebar, ThemeProvider, Toolbar, TopNav, VisuallyHidden
|
|
210
|
+
- `@nexub/react`: AppShell, AspectRatio, Chart, CheckList, Code, CommandPalette, Container, ContextMenu, CountryBadge, DropdownMenu, FileUpload, Flag, FormError, KeyboardShortcut, Logo, Menubar, Motion, NavigationMenu, NexubProvider, PageHeader, Section, Sidebar, ThemeProvider, Toolbar, TopNav, VisuallyHidden
|
|
207
211
|
- `@nexub/patterns`: ActivityPage, AppHeader, AppLauncher, ChatPage, CheckoutPage, DashboardPage, PageFrame, PaywallPage, SettingsLayout, SettingsPage, SignInPage, TransactionDetailPage
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tokens
|
|
2
2
|
|
|
3
|
-
Nexub DS v3.
|
|
3
|
+
Nexub DS v3.3.0. Every token is a CSS custom property from `@nexub/tokens/css` (loaded by `@nexub/themes/base`).
|
|
4
4
|
The Tailwind preset (`@nexub/tokens/tailwind`) maps them to utilities. Never hardcode a hex, px spacing or shadow that a token covers.
|
|
5
5
|
|
|
6
6
|
## Color roles
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexub/mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "MCP server for Nexub Design System: gives Claude, Cursor and any MCP client the components, patterns, tokens and design rules of the installed release.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|