uisandbox-mcp 0.5.0 → 0.5.2

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 (57) hide show
  1. package/README.md +7 -7
  2. package/dist/app/assets/antd-DGrcVjX6.js +1 -0
  3. package/dist/app/assets/bootstrap-C0U-GlJd.js +1 -0
  4. package/dist/app/assets/daisyui-BTXUtvI7.js +1 -0
  5. package/dist/app/assets/index-CGKJ32ox.css +1 -0
  6. package/dist/app/assets/index-CXRM-5rz.js +796 -0
  7. package/dist/app/assets/mantine-DRvA5kIQ.js +1 -0
  8. package/dist/app/assets/material-CMbfpStx.js +1 -0
  9. package/dist/app/assets/openprops-BHRWR_Kl.js +1 -0
  10. package/dist/app/assets/radix-eQ1zU6Xx.js +1 -0
  11. package/dist/app/assets/shadcn-zN0_QIOF.js +1 -0
  12. package/dist/app/assets/{tailwind-DqpNPM-k.js → tailwind-0mxhn6uY.js} +1 -1
  13. package/dist/app/how-it-works-poster.png +0 -0
  14. package/dist/app/how-it-works.mp4 +0 -0
  15. package/dist/app/index.html +11 -10
  16. package/dist/app/kits/antd/index.html +1 -1
  17. package/dist/app/kits/antd.jpg +0 -0
  18. package/dist/app/kits/antd.zip +0 -0
  19. package/dist/app/kits/bootstrap/index.html +1 -1
  20. package/dist/app/kits/bootstrap.jpg +0 -0
  21. package/dist/app/kits/bootstrap.zip +0 -0
  22. package/dist/app/kits/daisyui/index.html +1 -1
  23. package/dist/app/kits/daisyui.jpg +0 -0
  24. package/dist/app/kits/daisyui.zip +0 -0
  25. package/dist/app/kits/index.html +1 -1
  26. package/dist/app/kits/mantine/index.html +1 -1
  27. package/dist/app/kits/mantine.jpg +0 -0
  28. package/dist/app/kits/mantine.zip +0 -0
  29. package/dist/app/kits/material/index.html +1 -1
  30. package/dist/app/kits/material.jpg +0 -0
  31. package/dist/app/kits/material.zip +0 -0
  32. package/dist/app/kits/radix/index.html +1 -1
  33. package/dist/app/kits/radix.jpg +0 -0
  34. package/dist/app/kits/radix.zip +0 -0
  35. package/dist/app/kits/shadcn/index.html +1 -1
  36. package/dist/app/kits/shadcn.jpg +0 -0
  37. package/dist/app/kits/shadcn.zip +0 -0
  38. package/dist/app/kits/tailwind/index.html +1 -1
  39. package/dist/app/kits/tailwind.jpg +0 -0
  40. package/dist/app/kits/tailwind.zip +0 -0
  41. package/dist/app/llms-full.txt +122 -51
  42. package/dist/app/llms.txt +7 -6
  43. package/dist/app/og.png +0 -0
  44. package/dist/app/site.webmanifest +1 -1
  45. package/dist/app/sw.js +4 -0
  46. package/dist/server.mjs +3903 -3771
  47. package/package.json +1 -1
  48. package/dist/app/assets/antd-DhIfMnKY.js +0 -1
  49. package/dist/app/assets/bootstrap-COnYSIiB.js +0 -1
  50. package/dist/app/assets/daisyui-BMsY9tCy.js +0 -1
  51. package/dist/app/assets/index-BnSGvar5.js +0 -792
  52. package/dist/app/assets/index-DT-CQEO6.css +0 -1
  53. package/dist/app/assets/mantine-_j_jRC3m.js +0 -1
  54. package/dist/app/assets/material-Dztr9pnA.js +0 -1
  55. package/dist/app/assets/openprops-8c8qkGJk.js +0 -1
  56. package/dist/app/assets/radix-XX7gl5Rg.js +0 -1
  57. package/dist/app/assets/shadcn-HwCY0maC.js +0 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # UISandbox MCP server
2
2
 
3
- The same engine the browser runs, as tools for an agent — no second implementation.
3
+ Play with your app's design, right in the browser, from your agent or your terminal. The same engine [uisandbox.org](https://uisandbox.org) runs, as tools: no second implementation. Open the real sandbox with your app in it, let the user turn the knobs, and get back what they turned and the patch.
4
4
 
5
5
  ```bash
6
6
  npx uisandbox-mcp # the published package (stdio); add it to your client as below
@@ -12,23 +12,23 @@ pnpm mcp:build && pnpm mcp:pack # bundle the engine into mcp/dist/ser
12
12
  npx tsx mcp/smoke.ts fixtures/x.zip # load → set → export → verify → screenshot (MCP_CMD to point at a build)
13
13
  ```
14
14
 
15
- `verify` and `screenshot` need Chromium: `npx playwright install chromium` once (Playwright ships with the package; only the browser is downloaded — `load`/`set`/`export`/`open` work without it).
15
+ `verify` and `screenshot` need Chromium: `npx playwright install chromium` once (Playwright ships with the package; only the browser is downloaded; `load`, `set`, `export` and `open` work without it).
16
16
 
17
17
  ## Tools
18
18
 
19
19
  | tool | input | returns |
20
20
  |---|---|---|
21
21
  | `load` | `devUrl`, or `zipUrl` / `zipPath` | `devUrl` (e.g. `http://localhost:5173`): a RUNNING dev server, in live mode, no build needed, hot reload passed through; a zip: project id, screens, values, the baseline (brand, fonts, families, palette, canvas, dark mode), or a refusal with the reason |
22
- | `open` | `id`, `screen?` | **the sandbox itself** in the user's browser — the web app ships in the package and is served from 127.0.0.1 by this process with the archive; what the user turns flows back (`state`) |
22
+ | `open` | `id`, `screen?` | **the sandbox itself** in the user's browser: the web app ships in the package and is served from 127.0.0.1 by this process with the archive; what the user turns flows back (`state`) |
23
23
  | `state` | `id` | the knobs now, including what was turned by hand in an opened sandbox |
24
24
  | `wait_for_send` | `id`, `timeoutSeconds?` | waits until the user presses **Send to your agent** in the opened sandbox, then returns what they turned (from → to), how many values moved, and the patch for their source; says `stillOpen` when the time runs out first |
25
25
  | `screens` | `id` | the screens |
26
- | `set` | `id`, `knobs` — `cPrimary`, `fontDisplay`, `fontBody`, dials (`radius`, `space`, `type`, `lineHeight`, `tracking`, `weight`, `borderWidth`, `borderTone`, `shadow`, `motion`, `hue`, `sat`, `contrast`, `gradAngle`), `cBackground`, family colours, `dark`, `reset` | what moved (count, sample) |
27
- | `export` | `id`, `format` — `sheet-css` · `sheet-json` · `patch` · `tokens-css` · `tokens-json` · `tailwind` · `shadcn` · `swift` · `android-xml` · `android-kotlin` | text |
26
+ | `set` | `id`, `knobs`: `cPrimary`, `fontDisplay`, `fontBody`, dials (`radius`, `space`, `type`, `lineHeight`, `tracking`, `weight`, `borderWidth`, `borderTone`, `shadow`, `motion`, `hue`, `sat`, `contrast`, `gradAngle`), `cBackground`, family colours, `dark`, `reset` | what moved (count, sample) |
27
+ | `export` | `id`, `format`: `sheet-css` · `sheet-json` · `patch` · `tokens-css` · `tokens-json` · `tailwind` · `shadcn` · `swift` · `android-xml` · `android-kotlin` | text |
28
28
  | `verify` | `id`, `screen?`, `width?` | the 1:1 check in headless Chromium (untouched vs. tokenised, computed styles per element) + reach |
29
29
  | `screenshot` | `id`, `screen?`, `width?` | PNG of the screen with the current knobs |
30
30
 
31
- `load`/`set`/`export`/`state` are pure Node. `open` serves the bundled app on 127.0.0.1 and opens the browser — nothing leaves the machine. `verify`/`screenshot` drive the app in headless Chromium (the bundled one on 127.0.0.1; `UISANDBOX_URL` to point elsewhere) with the archive served from a route inside the browser — the number an agent gets is the number a visitor gets.
31
+ `load`/`set`/`export`/`state` are pure Node. `open` serves the bundled app on 127.0.0.1 and opens the browser; nothing leaves the machine. `verify`/`screenshot` drive the app in headless Chromium (the bundled one on 127.0.0.1; `UISANDBOX_URL` to point elsewhere) with the archive served from a route inside the browser, so the number an agent gets is the number a visitor gets.
32
32
 
33
33
  The conversation this is built for: *"Can I look at this app in a sandbox and change the design a bit?"* → the agent builds, `load`s, `open`s and calls `wait_for_send`; you play in the real sandbox and press **Send to your agent**; the agent gets what you turned and the patch, and applies it. (Or come back and say *"export what I did"* → `state` → `export`.) Opened from the terminal with `npx uisandbox-mcp open`, the button is **Send to the terminal** and prints the same there.
34
34
 
@@ -61,6 +61,6 @@ Claude Code: `claude mcp add uisandbox -- npx -y uisandbox-mcp`
61
61
 
62
62
  ## A prompt to paste
63
63
 
64
- > Open this app in UISandbox so I can play with the design — build it first. (…later…) Export the patch for what I changed.
64
+ > Open this app in UISandbox so I can play with the design. Build it first. (Later:) Export the patch for what I changed.
65
65
 
66
66
  > Test my design: load https://github.com/me/site/archive/refs/heads/gh-pages.zip in UISandbox, set the brand to #e11d48 and radius ×1.5, verify it is still 1:1, show me a screenshot, and give me the patch.