@keystoneui/mcp 0.2.0-beta.6 → 0.2.0-beta.8
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
|
@@ -54,7 +54,7 @@ npx @keystoneui/mcp theme k1_slate_0.55_0.2_262.5_large_inter
|
|
|
54
54
|
|---|---|
|
|
55
55
|
| `init [--client <name>]` | Configure MCP client |
|
|
56
56
|
| `search <query> [--type T] [--limit N]` | Fuzzy search components, blocks, kits, named examples |
|
|
57
|
-
| `list [--type T] [--limit N] [--offset N]` | List items (`T` = `ui` \| `block` \| `example` \| `kit` \| `style` \| `theme` \| `item`) |
|
|
57
|
+
| `list [--type T] [--limit N] [--offset N]` | List items (`T` = `ui` \| `block` \| `example` \| `kit` \| `hook` \| `style` \| `theme` \| `item`) |
|
|
58
58
|
| `view <name> [<name>...]` | Show the source of components, blocks, kits or package flavours |
|
|
59
59
|
| `examples <name>` | All demo files for a component or block |
|
|
60
60
|
| `docs <name> [--type component\|block]` | Fetch the LLM-resolved MDX page (`/llms.mdx/docs/{components\|blocks}/<name>`); a kit or package flavour resolves to the section that documents it |
|
|
@@ -860,6 +860,7 @@ var ITEM_TYPES = [
|
|
|
860
860
|
"block",
|
|
861
861
|
"example",
|
|
862
862
|
"kit",
|
|
863
|
+
"hook",
|
|
863
864
|
"style",
|
|
864
865
|
"theme",
|
|
865
866
|
"item"
|
|
@@ -877,7 +878,7 @@ var listComponentsSchema = z.object({
|
|
|
877
878
|
limit: z.number().min(1).max(100).default(20).describe("Maximum number of items to return"),
|
|
878
879
|
offset: z.number().min(0).default(0).describe("Number of items to skip"),
|
|
879
880
|
type: z.enum(ITEM_TYPES).optional().describe(
|
|
880
|
-
"Filter by item type: 'ui' for components, 'block' for full-page blocks, 'example' for named demo variants like 'table-with-pagination', 'kit' for pieces taken from a block and installable on their own (such as 'sidebar' or 'filter-pills'), and 'style' | 'theme' | 'item' for those registry types"
|
|
881
|
+
"Filter by item type: 'ui' for components, 'block' for full-page blocks, 'example' for named demo variants like 'table-with-pagination', 'kit' for pieces taken from a block and installable on their own (such as 'sidebar' or 'filter-pills'), 'hook' for React hooks such as 'use-media-query', and 'style' | 'theme' | 'item' for those registry types"
|
|
881
882
|
),
|
|
882
883
|
category: z.string().optional().describe(
|
|
883
884
|
"Filter by category (e.g. 'authentication', 'login', 'signup', 'navigation', 'data', 'dashboard', 'admin', 'betting'). Blocks and kits carry categories; components and examples do not."
|
|
@@ -902,7 +903,7 @@ var searchComponentsSchema = z.object({
|
|
|
902
903
|
query: z.string().describe("Search query (name, description, or keywords)"),
|
|
903
904
|
limit: z.number().min(1).max(50).default(10).describe("Maximum number of results"),
|
|
904
905
|
type: z.enum(ITEM_TYPES).optional().describe(
|
|
905
|
-
"Filter by item type: 'ui' for components, 'block' for full-page blocks, 'example' for named demo variants, 'kit' for pieces taken from a block and installable on their own, and 'style' | 'theme' | 'item' for those registry types"
|
|
906
|
+
"Filter by item type: 'ui' for components, 'block' for full-page blocks, 'example' for named demo variants, 'kit' for pieces taken from a block and installable on their own, 'hook' for React hooks, and 'style' | 'theme' | 'item' for those registry types"
|
|
906
907
|
),
|
|
907
908
|
category: z.string().optional().describe(
|
|
908
909
|
"Filter by category (e.g. 'authentication', 'login'). Blocks and kits carry categories; components and examples do not."
|
|
@@ -1198,9 +1199,10 @@ Ratios, not pixel offsets \u2014 the scale stays proportional at any base.
|
|
|
1198
1199
|
- \`--popup-ring\`: Subtle popup container ring
|
|
1199
1200
|
- \`--border-muted\`: Lower-contrast separator inside popups, and Card's filled ring
|
|
1200
1201
|
- \`--success-foreground\` / \`--warning-foreground\`: Text on a success/warning fill. \`--warning-foreground\` is dark, not near-white \u2014 near-white on amber-500 is ~1.9:1 and fails WCAG
|
|
1202
|
+
- \`--success-text\` / \`--warning-text\`: Success/warning as text or an icon on the page, a card or a popover. The fills are under AA as text on white (3.22 and 2.15)
|
|
1201
1203
|
- \`--sidebar\` + 7 \`--sidebar-*\`: Read by the sidebar item (\`sidebar\`) and by an imported shadcn sidebar. Declared as aliases, so the sidebar follows the active keystone theme
|
|
1202
1204
|
|
|
1203
|
-
Use \`text-success\` / \`bg-warning\` rather than raw \`emerald\`/\`amber\` classes, and never add a \`dark:\` override to a status token.
|
|
1205
|
+
Use \`text-success-text\` / \`bg-warning\` rather than raw \`emerald\`/\`amber\` classes, and never add a \`dark:\` override to a status token.
|
|
1204
1206
|
|
|
1205
1207
|
## Dark Mode
|
|
1206
1208
|
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
themeInstallCommand,
|
|
23
23
|
themeInstallUrl,
|
|
24
24
|
viewComponentTool
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-H6CFVNPV.js";
|
|
26
26
|
|
|
27
27
|
// src/cli.ts
|
|
28
28
|
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
@@ -328,8 +328,14 @@ var TEXT_PAIRS = [
|
|
|
328
328
|
["destructive-foreground", "destructive"],
|
|
329
329
|
["success-foreground", "success"],
|
|
330
330
|
["warning-foreground", "warning"],
|
|
331
|
-
["info-foreground", "info"]
|
|
331
|
+
["info-foreground", "info"],
|
|
332
|
+
["success-text", "background"],
|
|
333
|
+
["warning-text", "background"]
|
|
332
334
|
];
|
|
335
|
+
var TEXT_FALLBACKS = {
|
|
336
|
+
"success-text": "success",
|
|
337
|
+
"warning-text": "warning"
|
|
338
|
+
};
|
|
333
339
|
var AA_TEXT = 4.5;
|
|
334
340
|
var DECLARATION_RE = /--([\w-]+)\s*:\s*([^;]+);/g;
|
|
335
341
|
var OKLCH_RE = /^oklch\(\s*([\d.]+)(%?)\s+([\d.]+)\s+([\d.]+)(?:deg)?\s*\)$/i;
|
|
@@ -443,13 +449,15 @@ function auditTheme(tokens) {
|
|
|
443
449
|
const results = [];
|
|
444
450
|
for (const mode of ["light", "dark"]) {
|
|
445
451
|
for (const [fg, bg] of TEXT_PAIRS) {
|
|
446
|
-
const
|
|
452
|
+
const fallback = tokens[mode][fg] === void 0 ? TEXT_FALLBACKS[fg] : void 0;
|
|
453
|
+
const fgValue = tokens[mode][fallback ?? fg];
|
|
447
454
|
const bgValue = tokens[mode][bg];
|
|
448
455
|
if (!(fgValue && bgValue)) {
|
|
449
456
|
continue;
|
|
450
457
|
}
|
|
451
458
|
const ratio = contrastRatio(fgValue, bgValue);
|
|
452
459
|
results.push({
|
|
460
|
+
...fallback && { fallback },
|
|
453
461
|
mode,
|
|
454
462
|
pair: `${fg} on ${bg}`,
|
|
455
463
|
ratio,
|
|
@@ -466,7 +474,8 @@ function formatAudit(file, results) {
|
|
|
466
474
|
const lines = results.map((r) => {
|
|
467
475
|
const mark = { fail: "\u2716", pass: "\u2714", skip: "\u2013" }[r.status];
|
|
468
476
|
const ratio = r.ratio === null ? "needs a browser" : `${r.ratio.toFixed(2)}:1`;
|
|
469
|
-
|
|
477
|
+
const note = r.fallback ? ` (not declared; measured --${r.fallback}, which paints instead)` : "";
|
|
478
|
+
return `${mark} ${r.mode.padEnd(5)} ${r.pair.padEnd(42)} ${ratio}${note}`;
|
|
470
479
|
});
|
|
471
480
|
const failed = results.filter((r) => r.status === "fail").length;
|
|
472
481
|
return [
|
|
@@ -520,6 +529,7 @@ var TYPES = [
|
|
|
520
529
|
"block",
|
|
521
530
|
"example",
|
|
522
531
|
"kit",
|
|
532
|
+
"hook",
|
|
523
533
|
"style",
|
|
524
534
|
"theme",
|
|
525
535
|
"item"
|
|
@@ -599,7 +609,7 @@ async function runSearch(args) {
|
|
|
599
609
|
const { flags, positional } = parseArgs2(args);
|
|
600
610
|
if (positional.length === 0) {
|
|
601
611
|
console.error(
|
|
602
|
-
"Usage: keystoneui search <query> [--type ui|block|example|kit|style|theme|item] [--category C] [--limit N]"
|
|
612
|
+
"Usage: keystoneui search <query> [--type ui|block|example|kit|hook|style|theme|item] [--category C] [--limit N]"
|
|
603
613
|
);
|
|
604
614
|
process.exitCode = 1;
|
|
605
615
|
return;
|
|
@@ -848,6 +858,6 @@ if (isCliVerb(verbCandidate)) {
|
|
|
848
858
|
process.exit();
|
|
849
859
|
}
|
|
850
860
|
var { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
|
|
851
|
-
var { server } = await import("./server-
|
|
861
|
+
var { server } = await import("./server-DVJRKFMC.js");
|
|
852
862
|
var transport = new StdioServerTransport();
|
|
853
863
|
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystoneui/mcp",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.8",
|
|
4
4
|
"description": "MCP server and CLI for Keystone UI — lets AI agents and shell users discover, search, view, and install components, blocks, and named examples.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|