@becket-ui/mcp 0.4.0 → 0.5.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/README.md +18 -0
- package/dist/chunk-UWMYE5IA.js +780 -0
- package/dist/chunk-UWMYE5IA.js.map +1 -0
- package/dist/data/catalog.json +1 -1
- package/dist/extractPDF-GMTNLU27.js +155 -0
- package/dist/extractPDF-GMTNLU27.js.map +1 -0
- package/dist/server.js +555 -3
- package/dist/server.js.map +1 -1
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -23,6 +23,8 @@ It ships with the same version number as `@becket-ui/react`: `@becket-ui/mcp@0.4
|
|
|
23
23
|
| `get_theme` | Tokens with dark and light values: colors, spacing, radii, sizes, font-sizes, shadows |
|
|
24
24
|
| `get_guidelines` | The app-code guide, whole or one section (`component`, `tokens`, `accessibility`, `example`, `checklist`, …) |
|
|
25
25
|
| `review_usage` | Checks code for raw layout, text and controls, literal colors, pixel spacing, recipe classes, Chakra imports and unknown exports, each with the Becket fix |
|
|
26
|
+
| `suggest_theme` | Reads a logo (PNG, JPEG, SVG) or brand manual (PDF) from a path, https URL or base64 and suggests brand tokens, with a step-by-step script for the agent |
|
|
27
|
+
| `set_theme` | Turns brand colors and tokens into theme CSS and `defineBecketTheme()` code, with a WCAG 2.2 AA report for dark and light. Writes nothing |
|
|
26
28
|
|
|
27
29
|
## Connect
|
|
28
30
|
|
|
@@ -68,6 +70,22 @@ your app's `CLAUDE.md` (or Cursor rules) to make that the habit:
|
|
|
68
70
|
> UI uses Becket UI. Before writing UI, call the becket-ui MCP's `get_guidelines`; before finishing,
|
|
69
71
|
> run `review_usage` on the changed files.
|
|
70
72
|
|
|
73
|
+
## Brand themes
|
|
74
|
+
|
|
75
|
+
Ask your agent "theme Becket from our logo" and give it the file path, a URL or the brand manual
|
|
76
|
+
PDF. It calls `suggest_theme`, then asks you one thing at a time: which brand colors, then the font
|
|
77
|
+
and the corner radius and text size if the manual states them. Then it calls `set_theme` and
|
|
78
|
+
writes the CSS file. Already know your colors? Ask for `set_theme` with them directly.
|
|
79
|
+
|
|
80
|
+
- Every theme is checked against WCAG 2.2 AA in dark and light. A brand color too dark for a
|
|
81
|
+
button label is lightened for the button and kept as is where it passes (light-theme links, for
|
|
82
|
+
example), and the reply says why.
|
|
83
|
+
- `set_theme` returns code; your agent writes the file. Neither tool changes anything on disk.
|
|
84
|
+
- `suggest_theme` reads local files and fetches public `https` URLs only (25 MB, 15 s, no private
|
|
85
|
+
or local addresses). SVG is read as text: nothing in it runs or loads.
|
|
86
|
+
- WebP and GIF aren't read yet; export the logo as SVG or PNG. For an image pasted in chat, the agent
|
|
87
|
+
passes the colors it sees.
|
|
88
|
+
|
|
71
89
|
## Develop
|
|
72
90
|
|
|
73
91
|
From the repo root:
|