@unpunnyfuns/swatchbook-mcp 0.11.6 → 0.13.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.
Files changed (2) hide show
  1. package/README.md +2 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -49,6 +49,8 @@ CLI flags:
49
49
  | `get_aliased_by` | `path`, `maxDepth?` | Backward alias tree — every token that resolves through this path. Breadth-first with cycle protection; default max depth 6. |
50
50
  | `get_consumer_output` | `path`, `tuple?` | CSS var, resolved value, compound `[data-…]` selector + HTML attrs needed to pin the tuple on `<html>`. |
51
51
  | `get_color_formats` | `path`, `theme?` | Color token rendered in `hex` / `rgb` / `hsl` / `oklch` / `raw`, each with an `outOfGamut` flag. |
52
+ | `get_color_contrast` | `foreground`, `background`, `theme?`, `algorithm?` | Pair-wise contrast between two color tokens. `wcag21` returns the 1–21 ratio + AA/AAA pass flags (normal + large text); `apca` returns the signed Lc + body / large-text / non-text pass flags. |
53
+ | `get_axis_variance` | `path` | Classify how the token's resolved value depends on each axis. Returns `kind` (`constant` / `single` / `multi`), varying vs constant axes, and a per-axis breakdown with the value seen in each context. |
52
54
  | `list_axes` | (none) | Axes + contexts + themes + presets from the project config. |
53
55
  | `get_diagnostics` | `severity?` `'error' \| 'warn' \| 'info'` | Parser / resolver / validation diagnostics. |
54
56
  | `emit_css` | (none) | Full project stylesheet — `:root` default + per-tuple compound-selector blocks. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unpunnyfuns/swatchbook-mcp",
3
- "version": "0.11.6",
3
+ "version": "0.13.0",
4
4
  "description": "Model Context Protocol server for swatchbook — exposes a DTCG project's tokens, axes, and diagnostics to AI agents without running Storybook.",
5
5
  "license": "MIT",
6
6
  "author": "unpunnyfuns <unpunnyfuns@gmail.com>",
@@ -51,7 +51,7 @@
51
51
  "colorjs.io": "0.6.1",
52
52
  "jiti": "^2.4.0",
53
53
  "zod": "^3.23.8",
54
- "@unpunnyfuns/swatchbook-core": "0.11.6"
54
+ "@unpunnyfuns/swatchbook-core": "0.13.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@modelcontextprotocol/inspector": "^0.21.2",