uisandbox-mcp 0.5.4 → 0.5.6
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 +8 -5
- package/dist/app/assets/{AboutDialog-Br3jPf_r.js → AboutDialog-DmPOxzg6.js} +1 -1
- package/dist/app/assets/{ExportDialog-CaBWAmSz.js → ExportDialog-DPi9snZz.js} +1 -1
- package/dist/app/assets/index-B7YYEHKQ.js +454 -0
- package/dist/app/assets/{index-Ct5e-ani.css → index-DQmryurg.css} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/app/llms-full.txt +5 -4
- package/dist/app/llms.txt +2 -1
- package/dist/server.mjs +81 -27
- package/package.json +1 -1
- package/dist/app/assets/index-r8w3zdT3.js +0 -454
package/README.md
CHANGED
|
@@ -36,13 +36,16 @@ The conversation this is built for: *"Let me try some designs on this"* → the
|
|
|
36
36
|
## Without an agent
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
npx uisandbox-mcp
|
|
40
|
-
npx uisandbox-mcp open http://localhost:3000 #
|
|
41
|
-
npx uisandbox-mcp open
|
|
42
|
-
npx uisandbox-mcp
|
|
39
|
+
npx uisandbox-mcp open # the app running on this machine, live (else the build in this folder); hot reload included
|
|
40
|
+
npx uisandbox-mcp open http://localhost:3000 # that dev server, when more than one runs (a folder or zip works too)
|
|
41
|
+
npx uisandbox-mcp open --detach # opens it and returns at once (for an agent without MCP); the patch goes to a file; `stop` ends it
|
|
42
|
+
npx uisandbox-mcp start # only the helper: on uisandbox.org, "Connect a running app" lists your running apps
|
|
43
|
+
npx uisandbox-mcp # typed in a terminal: the same as start (an MCP client pipes stdin and gets the server)
|
|
43
44
|
```
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
An agent without the MCP tools runs `open --detach`: one command that finishes, and the sandbox opens in the user's own browser. An agent's built-in browser cannot reach the user's localhost from uisandbox.org (no local network permission there), so the site's Connect menu is for the user's own browser.
|
|
47
|
+
|
|
48
|
+
**The helper.** A page on uisandbox.org cannot read your localhost; the server can. It listens on `127.0.0.1:47319` (inside the MCP server whenever your client runs it, or with `start`) and answers uisandbox.org and localhost pages only: which dev servers run (`GET /apps`) and open one (`POST /open`), served from this process. Chrome asks once whether uisandbox.org may reach your local network; `http://127.0.0.1:47319/` lists the same apps in any browser with nothing to allow (Safari does not let a site ask). It looks on the usual dev ports and the runs around them (3000–3010, 4000–4010, 4200–4210, 4300–4330, 5000–5010, 5170–5180, 8000–8010, 8080–8090 and a few more) and the one your package.json names; `UISANDBOX_PORTS=4400,9000` adds your own.
|
|
46
49
|
|
|
47
50
|
## Slash commands
|
|
48
51
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,G as t,R as n,v as r,y as i,z as a}from"./index-r8w3zdT3.js";var o=t(),s=e();function c({section:e,onClose:t}){let c=(0,o.useRef)(null),[l]=(0,o.useState)(()=>typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches),[u,d]=(0,o.useState)(!!e);return(0,o.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),(0,o.useEffect)(()=>{let t=e?c.current?.querySelector(`#${CSS.escape(e)}`):null;t?t.scrollIntoView({block:`start`}):c.current?.focus()},[e]),(0,s.jsx)(`div`,{className:`privacy about-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`How UISandbox works`,onClick:e=>{e.target===e.currentTarget&&t()},children:(0,s.jsxs)(`div`,{className:`card about-dialog__card`,ref:c,tabIndex:-1,children:[(0,s.jsxs)(`div`,{className:`about-dialog__head`,children:[(0,s.jsx)(`span`,{className:`about-dialog__mark`,"aria-hidden":!0,children:(0,s.jsx)(i,{size:32})}),(0,s.jsx)(`button`,{type:`button`,className:`btn btn--ghost btn--icon about-dialog__close`,onClick:t,"aria-label":`Close`,children:(0,s.jsx)(n,{size:16})})]}),(0,s.jsxs)(`div`,{className:`landing`,children:[(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`h2`,{children:`How it works`}),(0,s.jsxs)(`ol`,{className:`steps4`,children:[(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Bring your app.`}),` Run one line next to your dev server: `,(0,s.jsx)(`code`,{children:`npx uisandbox-mcp open`}),`.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Pick a look.`}),` See your screen six ways and pick the one that fits.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Tune it.`}),` Colour, Type, Shape and Space. Hold Space to see your original.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Take it home.`}),` Copy it for your AI, or send it to your agent.`]})]}),(0,s.jsxs)(`p`,{className:`steps4__note`,children:[(0,s.jsx)(a,{size:13,strokeWidth:2,"aria-hidden":!0}),` Your files never leave this tab`]})]}),(0,s.jsxs)(`details`,{className:`about__more`,open:u,onToggle:e=>d(e.currentTarget.open),children:[(0,s.jsx)(`summary`,{children:`More about how it works`}),(0,s.jsxs)(`div`,{className:`about__body`,children:[(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`p`,{className:`landing__lead`,children:`What would your app look like in another brand colour, a bigger type scale, or dark mode? Find out on the real app in about a minute. Keep what you see as code, or close the tab and nothing happened.`}),(0,s.jsxs)(`ol`,{className:`steps4 steps4--long`,children:[(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Bring your app.`}),` The editor opens on a kit, shadcn/ui as it ships with seven more one pick away, so there is something to turn before you bring anything. Then `,(0,s.jsx)(`em`,{children:`Try it on your own app`}),`: run `,(0,s.jsx)(`code`,{children:`npx uisandbox-mcp open http://localhost:3000`}),` in your project, or tell your agent to open it, and your running app opens live, every screen, hot reload included. No terminal? Click the bookmark on any screen your browser shows, or bring a zip, a folder or a public repo. What you turned on the kit comes along if you want it to.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Pick a look.`}),` 6 over the screen shows it six ways, side by side: Classic, Compact, Soft, Sharp, Airy and Bold. They differ in corners, spacing, depth and type, never in colour, so you compare the style and not the paint. Open one full size, then `,(0,s.jsx)(`em`,{children:`Pick this one`}),`. The same six are the Preset list on the left.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Tune it.`}),` One knob moves every place a value is used: a colour used 144 times moves once. Colour, Type, Shape and Space come first, the rest is under More, and every dial has `,(0,s.jsx)(`em`,{children:`×1 = as in your code`}),` at its centre. It is your actual app and not a preview of one. Every CSS literal becomes a variable with the same value, and `,(0,s.jsx)(`em`,{children:`Check 1:1`}),` proves the page renders as it was. Hold Space to see it.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Take it home.`}),` `,(0,s.jsx)(`em`,{children:`Copy for your AI`}),` puts the design system and how to apply it in one paste. On a kit, the zip keeps the design system and a `,(0,s.jsx)(`code`,{children:`SKILL.md`}),` in your repo, in the kit's own names; on your own app, you get your files patched in place, or tokens for CSS, Tailwind, shadcn, Swift and Android. `,(0,s.jsx)(`em`,{children:`Copy link`}),` shares the same build with the same knobs. Or close the tab, and nothing happened.`]})]}),(0,s.jsxs)(`div`,{className:`cross`,"aria-label":`What crosses between your machine and this tab`,children:[(0,s.jsxs)(`div`,{className:`cross__side`,children:[(0,s.jsx)(`b`,{children:`Your folder`}),(0,s.jsx)(`span`,{children:`Where your build lives. It is read once, and never written to. UISandbox cannot change a file on your machine.`})]}),(0,s.jsxs)(`div`,{className:`cross__mid`,"aria-hidden":!0,children:[(0,s.jsxs)(`span`,{className:`cross__arrow`,children:[(0,s.jsx)(`span`,{className:`cross__label`,children:`a copy of your build`}),(0,s.jsx)(`svg`,{viewBox:`0 0 64 8`,preserveAspectRatio:`none`,children:(0,s.jsx)(`path`,{d:`M0 4h56M52 1l4 3-4 3`})})]}),(0,s.jsx)(`span`,{className:`cross__rule`,children:`nothing crosses on its own`}),(0,s.jsxs)(`span`,{className:`cross__arrow cross__arrow--back`,children:[(0,s.jsx)(`svg`,{viewBox:`0 0 64 8`,preserveAspectRatio:`none`,children:(0,s.jsx)(`path`,{d:`M64 4H8M12 1L8 4l4 3`})}),(0,s.jsx)(`span`,{className:`cross__label`,children:`only when you press Export`})]})]}),(0,s.jsxs)(`div`,{className:`cross__side`,children:[(0,s.jsx)(`b`,{children:`This browser tab`}),(0,s.jsx)(`span`,{children:`Where the copy is read, rendered and turned. Close the tab and it is gone: nothing is stored, nothing is sent to a server.`})]})]})]}),(0,s.jsxs)(`figure`,{className:`clip`,children:[(0,s.jsx)(`video`,{className:`clip__vid`,src:`/how-it-works.mp4`,poster:`/how-it-works-poster.png`,width:1280,height:720,autoPlay:!l,controls:l,muted:!0,loop:!0,playsInline:!0,preload:`metadata`,"aria-label":`The four steps on the real app: shadcn/ui's Dashboard, the same screen six ways, Soft picked, the colour turned through five and the dark mode switched, then SB Admin 2 brought in with those knobs, checked 1:1, and Take it home`}),(0,s.jsx)(`figcaption`,{children:`The four steps on a kit and on SB Admin 2, a real build from a public repo. Nothing staged.`})]}),(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`h2`,{children:`Isn't this just Inspect?`}),(0,s.jsxs)(`p`,{children:[`Same instinct, different scale. DevTools changes one declaration on one element, and forgets it when you reload. Here every literal becomes a variable first, so a colour moves everywhere it is used, and what you turn comes out as code. `,(0,s.jsx)(`b`,{children:`What Inspect does better:`}),` it is already open, and it changes the live page, scripts and all. Here you work on a copy: a build, or a snapshot of a screen.`]})]}),(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`h2`,{children:`How to check it yourself`}),(0,s.jsxs)(`p`,{children:[(0,s.jsx)(`b`,{children:`"1:1" is measured.`}),` `,(0,s.jsx)(`em`,{children:`Check 1:1`}),` renders the untouched and the tokenised page side by side and compares the computed styles of every element, shadow roots and nested frames included. Zero differences, or it names what differs. `,(0,s.jsx)(`b`,{children:`The reach meter`}),` says how much of what you see the knobs touch, and what lies outside: images, canvas, video. `,(0,s.jsx)(`b`,{children:`And it says so when it can't help:`}),` native projects, WordPress themes and source without a build get a clear message at the door.`]})]}),(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`h2`,{id:`privacy`,children:`Your files never leave your browser`}),(0,s.jsxs)(`p`,{children:[`There is no server behind the sandbox, no account, no cookies and no analytics. Your files are read in this tab and served to the frame by a service worker; exports are made here too. Check it: watch the network tab while you drop and export, or go offline and drop a zip. The one exception is a public repo URL, which goes through uisandbox.org to fetch its zip, because GitHub and GitLab do not let a browser fetch it directly. Nothing is stored. `,(0,s.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/notes/security.md`,target:`_blank`,rel:`noopener`,children:`The full security note.`})]})]}),(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`h2`,{id:`agents`,children:`From your terminal, or from your agent`}),(0,s.jsxs)(`p`,{children:[`The same engine runs as an MCP server and as a `,(0,s.jsx)(`b`,{children:`Claude Code skill`}),`, `,(0,s.jsx)(`code`,{children:`/uisandbox`}),`. Say `,(0,s.jsx)(`em`,{children:`"open this app in UISandbox"`}),` and it opens the real sandbox in your browser; `,(0,s.jsx)(`em`,{children:`Send to your agent`}),` hands what you turned back. Any MCP client (Cursor, Claude Desktop, Codex) gets the server and its `,(0,s.jsx)(`code`,{children:`/uisandbox:open`}),` prompt. Or run `,(0,s.jsx)(`code`,{children:`npx uisandbox-mcp open`}),` in your project, without an agent.`]}),(0,s.jsx)(r,{}),(0,s.jsxs)(`p`,{className:`landing__more`,children:[(0,s.jsx)(`b`,{children:`Or a link.`}),` `,(0,s.jsx)(`code`,{children:`uisandbox.org/?load=`}),` followed by a public GitHub or GitLab repo, or a `,(0,s.jsx)(`code`,{children:`.zip`}),` that allows CORS, opens straight into the sandbox: `,(0,s.jsx)(`a`,{href:`https://uisandbox.org/?load=https://github.com/edwardtufte/tufte-css`,target:`_blank`,rel:`noopener`,children:`uisandbox.org/?load=https://github.com/edwardtufte/tufte-css`}),`.`]})]}),(0,s.jsxs)(`section`,{className:`landing__sec landing__sec--quiet`,children:[(0,s.jsx)(`h2`,{children:`Who made this`}),(0,s.jsxs)(`p`,{children:[`I'm `,(0,s.jsx)(`a`,{href:`https://github.com/AlexanderKaan`,target:`_blank`,rel:`noopener`,children:`Alexander Kaan`}),`, and I build open-source tooling for user interfaces. UISandbox grew out of the design system generator I made before it: I could hand somebody a finished kit, but I could not show them their own app in it. Every decision, including the ones I had to undo, is in the repo's `,(0,s.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/notes/decisions.md`,target:`_blank`,rel:`noopener`,children:`notes`}),`. It's `,(0,s.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox`,target:`_blank`,rel:`noopener`,children:`MIT`}),`, and issues and pull requests are welcome.`]})]})]})]})]})]})})}export{c as AboutDialog};
|
|
1
|
+
import{E as e,G as t,R as n,v as r,y as i,z as a}from"./index-B7YYEHKQ.js";var o=t(),s=e();function c({section:e,onClose:t}){let c=(0,o.useRef)(null),[l]=(0,o.useState)(()=>typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches),[u,d]=(0,o.useState)(!!e);return(0,o.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),(0,o.useEffect)(()=>{let t=e?c.current?.querySelector(`#${CSS.escape(e)}`):null;t?t.scrollIntoView({block:`start`}):c.current?.focus()},[e]),(0,s.jsx)(`div`,{className:`privacy about-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`How UISandbox works`,onClick:e=>{e.target===e.currentTarget&&t()},children:(0,s.jsxs)(`div`,{className:`card about-dialog__card`,ref:c,tabIndex:-1,children:[(0,s.jsxs)(`div`,{className:`about-dialog__head`,children:[(0,s.jsx)(`span`,{className:`about-dialog__mark`,"aria-hidden":!0,children:(0,s.jsx)(i,{size:32})}),(0,s.jsx)(`button`,{type:`button`,className:`btn btn--ghost btn--icon about-dialog__close`,onClick:t,"aria-label":`Close`,children:(0,s.jsx)(n,{size:16})})]}),(0,s.jsxs)(`div`,{className:`landing`,children:[(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`h2`,{children:`How it works`}),(0,s.jsxs)(`ol`,{className:`steps4`,children:[(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Bring your app.`}),` Run one line next to your dev server: `,(0,s.jsx)(`code`,{children:`npx uisandbox-mcp open`}),`.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Pick a look.`}),` See your screen six ways and pick the one that fits.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Tune it.`}),` Colour, Type, Shape and Space. Hold Space to see your original.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Take it home.`}),` Copy it for your AI, or send it to your agent.`]})]}),(0,s.jsxs)(`p`,{className:`steps4__note`,children:[(0,s.jsx)(a,{size:13,strokeWidth:2,"aria-hidden":!0}),` Your files never leave this tab`]})]}),(0,s.jsxs)(`details`,{className:`about__more`,open:u,onToggle:e=>d(e.currentTarget.open),children:[(0,s.jsx)(`summary`,{children:`More about how it works`}),(0,s.jsxs)(`div`,{className:`about__body`,children:[(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`p`,{className:`landing__lead`,children:`What would your app look like in another brand colour, a bigger type scale, or dark mode? Find out on the real app in about a minute. Keep what you see as code, or close the tab and nothing happened.`}),(0,s.jsxs)(`ol`,{className:`steps4 steps4--long`,children:[(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Bring your app.`}),` The editor opens on a kit, shadcn/ui as it ships with seven more one pick away, so there is something to turn before you bring anything. Then `,(0,s.jsx)(`em`,{children:`Try it on your own app`}),`: run `,(0,s.jsx)(`code`,{children:`npx uisandbox-mcp open http://localhost:3000`}),` in your project, or tell your agent to open it, and your running app opens live, every screen, hot reload included. No terminal? Click the bookmark on any screen your browser shows, or bring a zip, a folder or a public repo. What you turned on the kit comes along if you want it to.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Pick a look.`}),` 6 over the screen shows it six ways, side by side: Classic, Compact, Soft, Sharp, Airy and Bold. They differ in corners, spacing, depth and type, never in colour, so you compare the style and not the paint. Open one full size, then `,(0,s.jsx)(`em`,{children:`Pick this one`}),`. The same six are the Preset list on the left.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Tune it.`}),` One knob moves every place a value is used: a colour used 144 times moves once. Colour, Type, Shape and Space come first, the rest is under More, and every dial has `,(0,s.jsx)(`em`,{children:`×1 = as in your code`}),` at its centre. It is your actual app and not a preview of one. Every CSS literal becomes a variable with the same value, and `,(0,s.jsx)(`em`,{children:`Check 1:1`}),` proves the page renders as it was. Hold Space to see it.`]}),(0,s.jsxs)(`li`,{children:[(0,s.jsx)(`b`,{children:`Take it home.`}),` `,(0,s.jsx)(`em`,{children:`Copy for your AI`}),` puts the design system and how to apply it in one paste. On a kit, the zip keeps the design system and a `,(0,s.jsx)(`code`,{children:`SKILL.md`}),` in your repo, in the kit's own names; on your own app, you get your files patched in place, or tokens for CSS, Tailwind, shadcn, Swift and Android. `,(0,s.jsx)(`em`,{children:`Copy link`}),` shares the same build with the same knobs. Or close the tab, and nothing happened.`]})]}),(0,s.jsxs)(`div`,{className:`cross`,"aria-label":`What crosses between your machine and this tab`,children:[(0,s.jsxs)(`div`,{className:`cross__side`,children:[(0,s.jsx)(`b`,{children:`Your folder`}),(0,s.jsx)(`span`,{children:`Where your build lives. It is read once, and never written to. UISandbox cannot change a file on your machine.`})]}),(0,s.jsxs)(`div`,{className:`cross__mid`,"aria-hidden":!0,children:[(0,s.jsxs)(`span`,{className:`cross__arrow`,children:[(0,s.jsx)(`span`,{className:`cross__label`,children:`a copy of your build`}),(0,s.jsx)(`svg`,{viewBox:`0 0 64 8`,preserveAspectRatio:`none`,children:(0,s.jsx)(`path`,{d:`M0 4h56M52 1l4 3-4 3`})})]}),(0,s.jsx)(`span`,{className:`cross__rule`,children:`nothing crosses on its own`}),(0,s.jsxs)(`span`,{className:`cross__arrow cross__arrow--back`,children:[(0,s.jsx)(`svg`,{viewBox:`0 0 64 8`,preserveAspectRatio:`none`,children:(0,s.jsx)(`path`,{d:`M64 4H8M12 1L8 4l4 3`})}),(0,s.jsx)(`span`,{className:`cross__label`,children:`only when you press Export`})]})]}),(0,s.jsxs)(`div`,{className:`cross__side`,children:[(0,s.jsx)(`b`,{children:`This browser tab`}),(0,s.jsx)(`span`,{children:`Where the copy is read, rendered and turned. Close the tab and it is gone: nothing is stored, nothing is sent to a server.`})]})]})]}),(0,s.jsxs)(`figure`,{className:`clip`,children:[(0,s.jsx)(`video`,{className:`clip__vid`,src:`/how-it-works.mp4`,poster:`/how-it-works-poster.png`,width:1280,height:720,autoPlay:!l,controls:l,muted:!0,loop:!0,playsInline:!0,preload:`metadata`,"aria-label":`The four steps on the real app: shadcn/ui's Dashboard, the same screen six ways, Soft picked, the colour turned through five and the dark mode switched, then SB Admin 2 brought in with those knobs, checked 1:1, and Take it home`}),(0,s.jsx)(`figcaption`,{children:`The four steps on a kit and on SB Admin 2, a real build from a public repo. Nothing staged.`})]}),(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`h2`,{children:`Isn't this just Inspect?`}),(0,s.jsxs)(`p`,{children:[`Same instinct, different scale. DevTools changes one declaration on one element, and forgets it when you reload. Here every literal becomes a variable first, so a colour moves everywhere it is used, and what you turn comes out as code. `,(0,s.jsx)(`b`,{children:`What Inspect does better:`}),` it is already open, and it changes the live page, scripts and all. Here you work on a copy: a build, or a snapshot of a screen.`]})]}),(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`h2`,{children:`How to check it yourself`}),(0,s.jsxs)(`p`,{children:[(0,s.jsx)(`b`,{children:`"1:1" is measured.`}),` `,(0,s.jsx)(`em`,{children:`Check 1:1`}),` renders the untouched and the tokenised page side by side and compares the computed styles of every element, shadow roots and nested frames included. Zero differences, or it names what differs. `,(0,s.jsx)(`b`,{children:`The reach meter`}),` says how much of what you see the knobs touch, and what lies outside: images, canvas, video. `,(0,s.jsx)(`b`,{children:`And it says so when it can't help:`}),` native projects, WordPress themes and source without a build get a clear message at the door.`]})]}),(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`h2`,{id:`privacy`,children:`Your files never leave your browser`}),(0,s.jsxs)(`p`,{children:[`There is no server behind the sandbox, no account, no cookies and no analytics. Your files are read in this tab and served to the frame by a service worker; exports are made here too. Check it: watch the network tab while you drop and export, or go offline and drop a zip. The one exception is a public repo URL, which goes through uisandbox.org to fetch its zip, because GitHub and GitLab do not let a browser fetch it directly. Nothing is stored. `,(0,s.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/notes/security.md`,target:`_blank`,rel:`noopener`,children:`The full security note.`})]})]}),(0,s.jsxs)(`section`,{className:`landing__sec`,children:[(0,s.jsx)(`h2`,{id:`agents`,children:`From your terminal, or from your agent`}),(0,s.jsxs)(`p`,{children:[`The same engine runs as an MCP server and as a `,(0,s.jsx)(`b`,{children:`Claude Code skill`}),`, `,(0,s.jsx)(`code`,{children:`/uisandbox`}),`. Say `,(0,s.jsx)(`em`,{children:`"open this app in UISandbox"`}),` and it opens the real sandbox in your browser; `,(0,s.jsx)(`em`,{children:`Send to your agent`}),` hands what you turned back. Any MCP client (Cursor, Claude Desktop, Codex) gets the server and its `,(0,s.jsx)(`code`,{children:`/uisandbox:open`}),` prompt. Or run `,(0,s.jsx)(`code`,{children:`npx uisandbox-mcp open`}),` in your project, without an agent.`]}),(0,s.jsx)(r,{}),(0,s.jsxs)(`p`,{className:`landing__more`,children:[(0,s.jsx)(`b`,{children:`Or a link.`}),` `,(0,s.jsx)(`code`,{children:`uisandbox.org/?load=`}),` followed by a public GitHub or GitLab repo, or a `,(0,s.jsx)(`code`,{children:`.zip`}),` that allows CORS, opens straight into the sandbox: `,(0,s.jsx)(`a`,{href:`https://uisandbox.org/?load=https://github.com/edwardtufte/tufte-css`,target:`_blank`,rel:`noopener`,children:`uisandbox.org/?load=https://github.com/edwardtufte/tufte-css`}),`.`]})]}),(0,s.jsxs)(`section`,{className:`landing__sec landing__sec--quiet`,children:[(0,s.jsx)(`h2`,{children:`Who made this`}),(0,s.jsxs)(`p`,{children:[`I'm `,(0,s.jsx)(`a`,{href:`https://github.com/AlexanderKaan`,target:`_blank`,rel:`noopener`,children:`Alexander Kaan`}),`, and I build open-source tooling for user interfaces. UISandbox grew out of the design system generator I made before it: I could hand somebody a finished kit, but I could not show them their own app in it. Every decision, including the ones I had to undo, is in the repo's `,(0,s.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox/blob/main/notes/decisions.md`,target:`_blank`,rel:`noopener`,children:`notes`}),`. It's `,(0,s.jsx)(`a`,{href:`https://github.com/Ideelab/uisandbox`,target:`_blank`,rel:`noopener`,children:`MIT`}),`, and issues and pull requests are welcome.`]})]})]})]})]})]})})}export{c as AboutDialog};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as e,B as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,L as l,M as u,O as d,P as f,R as p,S as m,T as h,U as ee,V as te,W as g,_ as ne,a as re,b as ie,c as ae,d as oe,f as se,g as _,h as ce,i as le,j as v,k as y,l as ue,m as de,n as fe,o as pe,p as b,r as me,s as he,t as ge,u as _e,w as x,x as S}from"./index-
|
|
1
|
+
import{A as e,B as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,L as l,M as u,O as d,P as f,R as p,S as m,T as h,U as ee,V as te,W as g,_ as ne,a as re,b as ie,c as ae,d as oe,f as se,g as _,h as ce,i as le,j as v,k as y,l as ue,m as de,n as fe,o as pe,p as b,r as me,s as he,t as ge,u as _e,w as x,x as S}from"./index-B7YYEHKQ.js";var ve=g(`apple`,[[`path`,{d:`M12 6.528V3a1 1 0 0 1 1-1h0`,key:`11qiee`}],[`path`,{d:`M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21`,key:`110c12`}]]),ye=g(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),be=g(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),xe=g(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Se=g(`diff`,[[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 10h14`,key:`elsbfy`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),Ce=g(`file-braces-corner`,[[`path`,{d:`M14 22h4a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6`,key:`14cnrg`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M5 14a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1 1 1 0 0 1 1 1v2a1 1 0 0 0 1 1`,key:`sr0ebq`}],[`path`,{d:`M9 22a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-2a1 1 0 0 0-1-1`,key:`w793db`}]]),we=g(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),Te=g(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Ee=g(`folder-tree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),De=g(`replace`,[[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Oe=g(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),ke=g(`swatch-book`,[[`path`,{d:`M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z`,key:`1ldrpk`}],[`path`,{d:`M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7`,key:`11i5po`}],[`path`,{d:`M 7 17h.01`,key:`1euzgo`}],[`path`,{d:`m11 8 2.3-2.3a2.4 2.4 0 0 1 3.404.004L18.6 7.6a2.4 2.4 0 0 1 .026 3.434L9.9 19.8`,key:`o2gii7`}]]),Ae=g(`wind`,[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`,key:`148xed`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`,key:`1u4tom`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`,key:`75valh`}]]),C=o();function w(t){if(!t)return`#000000`;if(t.startsWith(`#`))return t;if(t.startsWith(`oklch`))return e(t);let n=t.match(/hsl\(\s*([\d.]+)\s+([\d.]+)%\s+([\d.]+)%\s*\)/);if(n){let e=parseFloat(n[1]),t=parseFloat(n[2]),r=parseFloat(n[3]);return d(e,t,r)}if(/(^|[\s,])(radial|linear|conic)-gradient\(/.test(t)){let e=0,n=``,r=``;for(let i of t)i===`(`&&e++,i===`)`&&e--,i===`,`&&e===0?(r.trim()&&(n=r.trim()),r=``):r+=i;let i=(r.trim()||n).trim();if(i&&!/gradient\(/.test(i))return w(i)}let r=t.match(/color-mix\(\s*in\s+srgb\s*,\s*(.+?)\s+([\d.]+)%\s*,\s*(.+?)\s*\)\s*$/);if(r){let e=w(r[1]),t=w(r[3]),n=parseFloat(r[2])/100,i=(e,t)=>parseInt(e.slice(1+t*2,3+t*2),16);return`#${[0,1,2].map(r=>Math.round(i(e,r)*n+i(t,r)*(1-n))).map(e=>Math.max(0,Math.min(255,e)).toString(16).padStart(2,`0`)).join(``)}`}return typeof console<`u`&&console.warn(`[uicockpit] contrast audit cannot parse: ${t}`),`#ff00ff`}var T={base:0,dropdown:50,sticky:100,fixed:200,drawer:300,modal:1e3,popover:1100,toast:1200,tooltip:1300},je={compact:`600px`,medium:`840px`,expanded:`1200px`,large:`1600px`},E={fixed:`360px`,"fixed-xl":`412px`,spacer:`24px`,"margin-compact":`16px`,margin:`24px`},D={sm:`640px`,md:`768px`,lg:`1024px`,xl:`1280px`,"2xl":`1536px`},O={narrow:`640px`,regular:`1024px`,wide:`1280px`,max:`1536px`};function k(e){let t=S(e).vars,n=e=>t[e]??``,r={};for(let e=1;e<=6;e++)r[`accent-${e}`]=n(`--k-accent-${e}`),r[`accent-${e}-ink`]=n(`--k-accent-${e}-ink`),r[`accent-${e}-soft`]=n(`--k-accent-${e}-soft`),r[`accent-${e}-soft-fg`]=n(`--k-accent-${e}-soft-fg`),r[`grad-${e}`]=n(`--k-grad-${e}`),r[`chart-${e}`]=n(`--k-chart-${e}`);return r}function A(e){let t=S(e).vars,n=e=>parseFloat(t[e]??`0`),r=e=>`${Math.round(e*1e3)/1e3}rem`,i=n(`--k-type-h3`),a=n(`--k-type-body`);return{h4:r((i+a)/2),h5:r(a*1.05)}}var j=[2,4,6,8,10,12,14,16,20,24,28,32];function M(){let e={"s-0":`0`};for(let t of j)e[`s-${t}`]=`${+(t/16).toFixed(4)}rem`;return e}function Me(e){return M()}var N={"Body text on background":`Try Background: Crisp, or pick a darker neutral ramp.`,"Body text on surface":`Try Background: Crisp, or pick a darker neutral.`,"Body text on raised surface":`Try Background: Crisp — raised surfaces tint lighter than base.`,"Body text on overlay":`Try Background: Crisp — overlay surfaces tint lighter than base.`,"Muted text on background":`Try Background: Crisp — muted text is intentionally low-contrast.`,"Muted text on surface-2":`Try Background: Crisp — muted text is intentionally low-contrast.`,"Button text on primary":`Pick a darker primary, or switch to Mono.`,"Button text on primary hover":`Pick a darker primary — the hover state derives from it.`,"Secondary button text":`Pick a darker secondary-soft, or a lighter secondary-soft-fg.`,"Success text on success-soft":`Try Background: Crisp — system colors widen their gap on Crisp.`,"Warning text on warning-soft":`Try Background: Crisp — system colors widen their gap on Crisp.`,"Danger text on danger-soft":`Try Background: Crisp — system colors widen their gap on Crisp.`,"Info text on info-soft":`Try Background: Crisp — system colors widen their gap on Crisp.`,"Primary against background":`Primary as a SURFACE is fine here; for colored TEXT, use primary-soft tints.`,"Input border against background":`Common in modern UIs (Apple, Stripe both subtle here). Set Borders: Strong if you need strict WCAG, otherwise rely on labels + placeholders for affordance.`,"Input border against its fill":`The border is floored at 3:1 against the field fill at every Borders setting; if this fails, the fill token was changed by hand.`,"Focus ring against background":`Pick a higher-saturation primary, or set Background: Crisp.`};function P(e){let t=e.vars;return[[`Body text on background`,`--k-fg`,`--k-bg`,4.5],[`Body text on surface`,`--k-fg`,`--k-surface`,4.5],[`Body text on raised surface`,`--k-fg`,`--k-surface-raised`,4.5],[`Body text on overlay`,`--k-fg`,`--k-surface-overlay`,4.5],[`Muted text on background`,`--k-fg-muted`,`--k-bg`,4.5],[`Muted text on surface-2`,`--k-fg-muted`,`--k-surface-2`,4.5],[`Button text on primary`,`--k-primary-fg`,`--k-primary`,4.5],[`Button text on primary hover`,`--k-primary-fg`,`--k-primary-hover`,4.5],[`Secondary button text`,`--k-secondary-soft-fg`,`--k-secondary-soft`,4.5],[`Success text on success-soft`,`--k-success-soft-fg`,`--k-success-soft`,4.5],[`Warning text on warning-soft`,`--k-warning-soft-fg`,`--k-warning-soft`,4.5],[`Danger text on danger-soft`,`--k-danger-soft-fg`,`--k-danger-soft`,4.5],[`Info text on info-soft`,`--k-info-soft-fg`,`--k-info-soft`,4.5],[`Danger text on surface`,`--k-danger-text`,`--k-surface`,4.5],[`Link text on surface`,`--k-primary-text`,`--k-surface`,4.5],[`Link hover on surface`,`--k-primary-text-hover`,`--k-surface`,4.5],[t[`--k-primary-edge`]&&t[`--k-primary-edge`]!==`transparent`?`Primary boundary against background`:`Primary against background`,t[`--k-primary-edge`]&&t[`--k-primary-edge`]!==`transparent`?`--k-primary-edge`:`--k-primary`,`--k-bg`,3],[`Input border against background`,`--k-input-border`,`--k-bg`,3],[`Input border against its fill`,`--k-input-border`,`--k-input-bg`,3],[`Focus ring against background`,`--k-ring`,`--k-bg`,3]].map(([e,n,i,a])=>{let o=t[n],s=t[i],c=o&&s?r(w(o),w(s)):0,l=c>=a;return{label:e,fg:o||``,bg:s||``,ratio:Math.round(c*100)/100,required:a,passes:l,remedy:l?null:N[e]??null}})}function Ne(e){let t=S({...e,mode:`light`}).vars,n=S({...e,mode:`dark`}).vars,r=e=>Object.entries(e).map(([e,t])=>` ${e}: ${t};`).join(`
|
|
2
2
|
`),i=A(e),a=[`
|
|
3
3
|
/* --- Z-index stack --- */`,...Object.entries(T).map(([e,t])=>` --k-z-${e}: ${t};`),`
|
|
4
4
|
/* --- Breakpoints --- */`,...Object.entries(D).map(([e,t])=>` --k-bp-${e}: ${t};`),`
|