@neuctra/ui-mcp 0.2.5 → 0.3.1
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 +26 -8
- package/data/components.json +1165 -41
- package/data/theme.json +34 -2
- package/package.json +1 -1
- package/src/server.mjs +2 -2
package/README.md
CHANGED
|
@@ -60,8 +60,10 @@ Two independently-regenerable files feed the server:
|
|
|
60
60
|
Never edit this by hand; run `npm run sync-registry` after the upstream file changes.
|
|
61
61
|
- **`data/theme.json`** — hand-curated from `neuctra-ui-cli/lib/update-css.js` (the CSS
|
|
62
62
|
the setup CLI generates for consumers). Update it manually if the token set changes —
|
|
63
|
-
it doesn't have an automated generator because it also encodes *rules
|
|
64
|
-
hardcode colors"),
|
|
63
|
+
it doesn't have an automated generator because it also encodes *rules*, not just data:
|
|
64
|
+
the color-token rules ("never hardcode colors"), the anti-AI-look rules ("no
|
|
65
|
+
gradients/shadows/blurs/glows/emoji-icons"), the recommended `@neuctra/ui-cli init`
|
|
66
|
+
setup command, and how the standalone `toast()` API works.
|
|
65
67
|
|
|
66
68
|
---
|
|
67
69
|
|
|
@@ -127,7 +129,7 @@ conversation.
|
|
|
127
129
|
{ "name": "children", "type": "React.ReactNode", "required": false, "default": null,
|
|
128
130
|
"description": "Optional so icon-only buttons are possible — pair with `aria-label`." },
|
|
129
131
|
{ "name": "loading", "type": "boolean", "required": false, "default": "false", "description": "" },
|
|
130
|
-
{ "name": "variant", "type": "\"default\" | \"outline\" | \"ghost\"", "required": false, "default": null, "description": "" }
|
|
132
|
+
{ "name": "variant", "type": "\"default\" | \"outline\" | \"ghost\" | \"secondary\" | \"destructive\" | \"success\" | \"warning\" | \"info\"", "required": false, "default": null, "description": "" }
|
|
131
133
|
// ...
|
|
132
134
|
],
|
|
133
135
|
"example": "import { Button } from '@neuctra/ui';\n\nfunction BasicExample() {\n return (\n <Button onClick={() => console.log('Button clicked')}>\n Click Me\n </Button>\n );\n}"
|
|
@@ -155,10 +157,14 @@ state", "icon button". Matches against name, category, description, and prop nam
|
|
|
155
157
|
|
|
156
158
|
### `get_theme`
|
|
157
159
|
|
|
158
|
-
Returns the semantic color token system
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
Returns the semantic color token system, the styling rules for using it, and three more
|
|
161
|
+
sections aimed squarely at making generated UI indistinguishable from a human design
|
|
162
|
+
pass: a set of **anti-AI-look rules** (no gradients, no decorative shadows/blurs/glows,
|
|
163
|
+
no emoji-as-icons — see below), a **setup** block pointing the AI at the
|
|
164
|
+
`@neuctra/ui-cli` `init` command instead of hand-writing token CSS or a theme context,
|
|
165
|
+
and a **toastNote** explaining the standalone `toast()` import. Without `get_theme`, an
|
|
166
|
+
AI would happily write `className="bg-blue-500"` or reach for a purple-to-pink gradient
|
|
167
|
+
hero, both of which ignore the consumer's actual theme and read as generic AI output.
|
|
162
168
|
|
|
163
169
|
**Response shape:**
|
|
164
170
|
```jsonc
|
|
@@ -169,12 +175,24 @@ theme the consumer's project has configured.
|
|
|
169
175
|
"Always use the semantic token classes below...",
|
|
170
176
|
// ...
|
|
171
177
|
],
|
|
178
|
+
"antiAiLookRules": [
|
|
179
|
+
"No gradients on backgrounds, buttons, or text...",
|
|
180
|
+
"No decorative box-shadows, drop-shadows, or glow effects...",
|
|
181
|
+
"No backdrop-blur / glassmorphism...",
|
|
182
|
+
// ...17 rules total — the visual tells that make UI read as AI-generated
|
|
183
|
+
],
|
|
172
184
|
"tokens": [
|
|
173
185
|
{ "token": "primary", "className": "bg-primary / text-primary / border-primary",
|
|
174
186
|
"pairsWith": "primary-foreground", "light": "#00c214", "dark": "#00c214",
|
|
175
187
|
"usage": "Brand color: primary buttons, active states, links, focus accents." },
|
|
176
188
|
// ...23 tokens total
|
|
177
|
-
]
|
|
189
|
+
],
|
|
190
|
+
"setup": {
|
|
191
|
+
"recommendedCommand": "npx @neuctra/ui-cli@latest init",
|
|
192
|
+
"whatItDoes": ["Installs @neuctra/ui.", "Checks/upgrades React and Tailwind CSS.", "..."],
|
|
193
|
+
"whenToSuggestIt": "..."
|
|
194
|
+
},
|
|
195
|
+
"toastNote": "@neuctra/ui's toast notification system is a standalone function..."
|
|
178
196
|
}
|
|
179
197
|
```
|
|
180
198
|
|