@keystoneui/mcp 0.2.0-beta.6 → 0.2.0-beta.7

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.
@@ -1198,9 +1198,10 @@ Ratios, not pixel offsets \u2014 the scale stays proportional at any base.
1198
1198
  - \`--popup-ring\`: Subtle popup container ring
1199
1199
  - \`--border-muted\`: Lower-contrast separator inside popups, and Card's filled ring
1200
1200
  - \`--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
1201
+ - \`--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
1202
  - \`--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
1203
 
1203
- Use \`text-success\` / \`bg-warning\` rather than raw \`emerald\`/\`amber\` classes, and never add a \`dark:\` override to a status token.
1204
+ Use \`text-success-text\` / \`bg-warning\` rather than raw \`emerald\`/\`amber\` classes, and never add a \`dark:\` override to a status token.
1204
1205
 
1205
1206
  ## Dark Mode
1206
1207
 
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  themeInstallCommand,
23
23
  themeInstallUrl,
24
24
  viewComponentTool
25
- } from "./chunk-LC22ZWZH.js";
25
+ } from "./chunk-NRQEEI2I.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 fgValue = tokens[mode][fg];
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
- return `${mark} ${r.mode.padEnd(5)} ${r.pair.padEnd(42)} ${ratio}`;
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 [
@@ -848,6 +857,6 @@ if (isCliVerb(verbCandidate)) {
848
857
  process.exit();
849
858
  }
850
859
  var { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
851
- var { server } = await import("./server-HWF3HIOR.js");
860
+ var { server } = await import("./server-PR27VI6G.js");
852
861
  var transport = new StdioServerTransport();
853
862
  await server.connect(transport);
@@ -12,7 +12,7 @@ import {
12
12
  readPackageVersion,
13
13
  searchComponentsTool,
14
14
  viewComponentTool
15
- } from "./chunk-LC22ZWZH.js";
15
+ } from "./chunk-NRQEEI2I.js";
16
16
 
17
17
  // src/server.ts
18
18
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystoneui/mcp",
3
- "version": "0.2.0-beta.6",
3
+ "version": "0.2.0-beta.7",
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",