@nexub/mcp 2.1.0 → 2.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
CHANGED
|
@@ -43,13 +43,24 @@ export default {
|
|
|
43
43
|
};
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
```css
|
|
47
|
+
/* Tailwind v4: no config file. Load the theme CSS here, in the base layer, instead of from JS */
|
|
48
|
+
@layer theme, base, components, utilities;
|
|
49
|
+
@import "@nexub/themes/base" layer(base);
|
|
50
|
+
@import "@nexub/themes/light" layer(base);
|
|
51
|
+
@import "tailwindcss";
|
|
52
|
+
@import "@nexub/tokens/tailwind.css";
|
|
53
|
+
@source "../node_modules/@nexub/react/dist";
|
|
54
|
+
@source "../node_modules/@nexub/patterns/dist";
|
|
55
|
+
```
|
|
56
|
+
|
|
46
57
|
Wrap the app in `<ThemeProvider defaultTheme="system" storageKey="app-theme">` from `@nexub/react`. In server-rendered apps (Next.js), put `<ThemeScript storageKey="app-theme" />` in `<head>` and add `suppressHydrationWarning` to `<html>`. Product brands: set `data-product="leap" | "bookub" | "payub" | "founderub"` on the root. This remaps the `tertiary` role.
|
|
47
58
|
|
|
48
59
|
## 2. How to build a screen
|
|
49
60
|
|
|
50
61
|
1. **Start from a pattern.** Check the Patterns sections of `references/components.md` before you compose anything by hand.
|
|
51
62
|
2. **Then use components.** Use `@nexub/react` for every control, overlay, layout primitive and piece of typography. Never hand-roll a button, input, dialog, menu or table that the library already has.
|
|
52
|
-
3. **Then use tokens, only for the glue.** Use Tailwind utilities from the preset (`bg-surface-container-low`, `text-on-surface-variant`, `p-4`, `gap-6`, `rounded-shape-container`, `text-title-md`) or `var(--…)`.
|
|
63
|
+
3. **Then use tokens, only for the glue.** Use Tailwind utilities from the preset or v4 theme (`bg-surface-container-low`, `text-on-surface-variant`, `p-4`, `gap-6`, `rounded-shape-container`, `text-title-md`) or `var(--…)`.
|
|
53
64
|
4. **Never hardcode design values.** That means no hex or rgb colors, no Tailwind palette colors (`bg-blue-500`, `text-gray-600`), no arbitrary px values (`p-[13px]`), no ad-hoc shadows or gradients.
|
|
54
65
|
|
|
55
66
|
Starting points for typical SaaS screens:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Component index
|
|
2
2
|
|
|
3
|
-
Nexub DS v2.
|
|
3
|
+
Nexub DS v2.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
|
|
@@ -189,4 +189,4 @@ Never use a component marked deprecated.
|
|
|
189
189
|
These exist; read their TypeScript props in `node_modules/<package>/dist/index.d.ts`.
|
|
190
190
|
|
|
191
191
|
- `@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
|
|
192
|
-
- `@nexub/patterns`: AppHeader, AppLauncher, SettingsLayout
|
|
192
|
+
- `@nexub/patterns`: ActivityPage, AppHeader, AppLauncher, ChatPage, CheckoutPage, DashboardPage, PageFrame, PaywallPage, SettingsLayout, SettingsPage, SignInPage, TransactionDetailPage
|
|
@@ -77,6 +77,8 @@ Names and props match `@nexub/react` where a web twin exists.
|
|
|
77
77
|
- **Mobile:** `SwipeableRow`, `RefreshControl`, `Carousel`, `PageIndicator`, `StickyFooter`, `SensitiveValue`, `PrivacyShield`, `FAB` (Android only by default).
|
|
78
78
|
- **Navigation helpers:** `nexubStackOptions`, `nexubNavigationTheme`, `nexubTabsOptions`.
|
|
79
79
|
|
|
80
|
+
- **Motion:** `nxEnter`, `nxExit`, `nxLayout` (Reanimated layout animations) and `nxSpring` (a `withSpring` config), built from the same spring tokens as the web. `<Animated.View entering={nxEnter('up')} exiting={nxExit('down')} layout={nxLayout()} />`. Toast, Banner, `ListSection` rows, `SwipeableRow`, `Chip`, the `SegmentedControl` pill and `Amount` (`animate`) already use them. In a `FlatList`, pass `nxLayout()` as `itemLayoutAnimation`.
|
|
81
|
+
|
|
80
82
|
Icons: `import { Search } from '@nexub/icons/native'`. These are the same names as `@nexub/icons`. Colour them with `<Icon icon={Search} color="primary" />`.
|
|
81
83
|
|
|
82
84
|
## Patterns
|
|
@@ -97,7 +99,7 @@ Icons: `import { Search } from '@nexub/icons/native'`. These are the same names
|
|
|
97
99
|
- Masked values read as "hidden".
|
|
98
100
|
- Toasts are announced.
|
|
99
101
|
- **Haptics are semantic** (`selection`, `toggleOn`/`toggleOff`, `confirm`, `reject`, `warning`, `snap`), never on plain taps, and never the only feedback.
|
|
100
|
-
- **Motion:** M3 springs
|
|
102
|
+
- **Motion:** M3 springs. Enter rides the spatial spring; exit is quicker on the effects spring and never overshoots. Every preset follows the OS Reduce Motion setting.
|
|
101
103
|
- **Glass:** for the control layer only, never content. It is native Liquid Glass on iOS 26+, solid elsewhere and whenever the user turns transparency down.
|
|
102
104
|
- **Security:** `OTPInput` uses one field, so SMS autofill works. `PasswordInput` sets the platform autofill hints. `SensitiveValue` re-masks when the app backgrounds. `PrivacyShield` covers the app-switcher snapshot. The library makes no network calls and stores nothing.
|
|
103
105
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tokens
|
|
2
2
|
|
|
3
|
-
Nexub DS v2.
|
|
3
|
+
Nexub DS v2.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": "2.
|
|
3
|
+
"version": "2.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",
|