wai/wai-ui becomes wai/wai-app, the library `wai_app`, with no binary and no `cli` feature: `wai`, built with its feature `app`, is its command line and its MCP server. Its served files are named wai-app-* (the WebAssembly package wai_app), the recordings wai-app-*.json. - export.rs gives the files of a starter project for a program and the facts its project file holds (title, summary, `wai dev`'s mode for the app's room, a watch room's file, a show's audience); `wai create --from app.oui` writes them, the project file and the licence. The export no longer writes app.json, room.toml, relay.toml, package.json, check.mjs or serve.mjs: wai.json names the room, `wai dev` runs it and `wai app check` checks the project. Its README and AGENTS.md say so, and the README its licence. - runtime.rs reads a Create runtime by its listing (create/wai-app-runtime.json), checking each file's SHA-256. - bridge.rs keeps the bridge on 127.0.0.1 a coding agent streams a program into the page through, with a stream helper; the stdio server, its tools and the binary's test go (`wai mcp --toolset app` serves them). - The page's Export hands over app.oui, the program in its canonical form, and the command that makes it a project; the ZIP writer and the page's export in WebAssembly go. The page names `wai mcp --toolset app` for the coding agent. - joule-ui/docs/create.md §4 and §5: the export as `wai create --from app.oui`, and the agent's tools app_guide, app_check, app_stream and app_export. Co-Authored-By: Claude Opus 5.5 <[email protected]>
112 lines
6.9 KiB
CSS
112 lines
6.9 KiB
CSS
/* The WAI widgets (components.js) and Create (create.js). Light and dark, from the
|
|
visitor's preference; every colour a token on the root. */
|
|
:root {
|
|
--wai-bg: #f6f7f9;
|
|
--wai-panel: #ffffff;
|
|
--wai-fg: #15171a;
|
|
--wai-muted: #5d6470;
|
|
--wai-line: #d9dde3;
|
|
--wai-accent: #1f5fd1;
|
|
--wai-accent-fg: #ffffff;
|
|
--wai-ok: #1f6f43;
|
|
--wai-bad: #a3271f;
|
|
--wai-warn: #8a4b00;
|
|
--wai-new: #fff3c4;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme="light"]) {
|
|
--wai-bg: #111317;
|
|
--wai-panel: #1a1d23;
|
|
--wai-fg: #e8eaee;
|
|
--wai-muted: #9aa2ae;
|
|
--wai-line: #2c313a;
|
|
--wai-accent: #6f9cff;
|
|
--wai-accent-fg: #0b0d10;
|
|
--wai-ok: #6fd39b;
|
|
--wai-bad: #ff8a80;
|
|
--wai-warn: #f0a957;
|
|
--wai-new: #3a3420;
|
|
}
|
|
}
|
|
:root[data-theme="dark"] {
|
|
--wai-bg: #111317; --wai-panel: #1a1d23; --wai-fg: #e8eaee; --wai-muted: #9aa2ae; --wai-line: #2c313a;
|
|
--wai-accent: #6f9cff; --wai-accent-fg: #0b0d10; --wai-ok: #6fd39b; --wai-bad: #ff8a80; --wai-warn: #f0a957; --wai-new: #3a3420;
|
|
}
|
|
|
|
.wai-app { color: var(--wai-fg); font: 15px/1.5 system-ui, sans-serif; }
|
|
body:has(> .wai-app) { margin: 0; padding: 16px; background: var(--wai-bg); }
|
|
.wai-app *, .create * { box-sizing: border-box; }
|
|
[hidden] { display: none !important; }
|
|
|
|
.wai-w { transition: background-color 1.2s ease; border-radius: 8px; }
|
|
.wai-new { background-color: var(--wai-new); }
|
|
|
|
.wai-app-shell { display: flex; flex-direction: column; gap: 12px; }
|
|
.wai-app-title { font-size: 1.4rem; margin: 0; letter-spacing: -0.01em; }
|
|
.wai-app-title:empty { display: none; }
|
|
.wai-app-children { display: flex; flex-direction: column; gap: 12px; }
|
|
.wai-text { margin: 0; color: var(--wai-muted); }
|
|
|
|
.wai-room { background: var(--wai-panel); border: 1px solid var(--wai-line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
|
|
.wai-room-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
|
|
.wai-room-title { font-size: 1.1rem; margin: 0; }
|
|
.wai-kind { font-size: 12px; color: var(--wai-muted); border: 1px solid var(--wai-line); border-radius: 999px; padding: 1px 8px; }
|
|
.wai-room-controls, .wai-watch-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
|
|
.wai-room-status { color: var(--wai-muted); font-size: 14px; }
|
|
.wai-frame { width: 100%; border: 0; display: block; min-height: 0; }
|
|
.wai-room-stage[data-view="none"] .wai-frame { min-height: 0; }
|
|
.wai-room-children { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
|
|
.wai-room-children > .wai-player, .wai-room-children > .wai-text { grid-column: 1 / -1; }
|
|
|
|
.wai-btn { font: inherit; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--wai-line); background: var(--wai-panel); color: var(--wai-fg); cursor: pointer; }
|
|
.wai-btn:disabled { opacity: 0.5; cursor: default; }
|
|
.wai-primary { background: var(--wai-accent); color: var(--wai-accent-fg); border-color: var(--wai-accent); }
|
|
.wai-input { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--wai-line); background: var(--wai-bg); color: var(--wai-fg); flex: 1; min-width: 0; }
|
|
|
|
.wai-h { font-size: 13px; margin: 0 0 6px; color: var(--wai-muted); font-weight: 600; }
|
|
.wai-note { font-size: 12px; color: var(--wai-muted); margin: 6px 0 0; }
|
|
.wai-player { font-size: 13px; color: var(--wai-muted); }
|
|
.wai-chat, .wai-poll, .wai-participants, .wai-receipts, .wai-energymeter { border: 1px solid var(--wai-line); border-radius: 8px; padding: 10px; min-width: 0; background: var(--wai-panel); }
|
|
.wai-chat-list { list-style: none; margin: 0 0 8px; padding: 0; max-height: 200px; overflow: auto; font-size: 14px; }
|
|
.wai-chat-list li { padding: 2px 0; overflow-wrap: anywhere; }
|
|
.wai-chat-form { display: flex; gap: 6px; }
|
|
.wai-poll-options { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
|
|
.wai-poll-result { margin: 6px 0 0; font-size: 14px; }
|
|
.wai-poll[data-state="closed"] .wai-poll-result { color: var(--wai-ok); }
|
|
.wai-people { margin: 0; padding-left: 18px; font-family: ui-monospace, monospace; font-size: 13px; }
|
|
.wai-verdict { margin: 0 0 6px; font-size: 13px; }
|
|
.wai-verdict[data-ok="true"] { color: var(--wai-ok); }
|
|
.wai-verdict[data-ok="false"] { color: var(--wai-bad); }
|
|
.wai-scroll { overflow-x: auto; }
|
|
.wai-log { border-collapse: collapse; font-size: 12px; width: 100%; }
|
|
.wai-log th, .wai-log td { text-align: left; padding: 2px 8px 2px 0; border-bottom: 1px solid var(--wai-line); white-space: nowrap; }
|
|
.wai-mono { font-family: ui-monospace, monospace; }
|
|
.wai-energy { margin: 0; padding-left: 18px; font-size: 13px; }
|
|
.wai-energy-total { margin: 0; font-weight: 600; }
|
|
.wai-problems { color: var(--wai-bad); white-space: pre-wrap; }
|
|
.wai-unknown { color: var(--wai-warn); font-size: 13px; }
|
|
|
|
/* Create */
|
|
.create { color: var(--wai-fg); font: 15px/1.5 system-ui, sans-serif; display: flex; flex-direction: column; gap: 14px; }
|
|
.create form { display: flex; flex-direction: column; gap: 10px; background: var(--wai-panel); border: 1px solid var(--wai-line); border-radius: 10px; padding: 12px; }
|
|
.create textarea { font: inherit; width: 100%; min-height: 4.5em; padding: 8px; border-radius: 8px; border: 1px solid var(--wai-line); background: var(--wai-bg); color: var(--wai-fg); }
|
|
.create fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 14px; flex-wrap: wrap; }
|
|
.create legend { font-size: 13px; color: var(--wai-muted); margin-bottom: 4px; }
|
|
.create .source-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
|
|
.create .source-fields label { display: flex; flex-direction: column; font-size: 13px; color: var(--wai-muted); gap: 2px; }
|
|
.create .source-fields input, .create .source-fields select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--wai-line); background: var(--wai-bg); color: var(--wai-fg); }
|
|
#model-says { margin: 0; font-size: 14px; color: var(--wai-muted); }
|
|
.create-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }
|
|
@media (max-width: 860px) { .create-grid { grid-template-columns: minmax(0, 1fr); } }
|
|
.create aside { background: var(--wai-panel); border: 1px solid var(--wai-line); border-radius: 10px; padding: 12px; min-width: 0; }
|
|
.create aside h2 { font-size: 13px; color: var(--wai-muted); margin: 10px 0 6px; font-weight: 600; }
|
|
.create aside h2:first-child { margin-top: 0; }
|
|
#program { font-family: ui-monospace, monospace; font-size: 12px; margin: 0; padding-left: 3.2em; max-height: 320px; overflow: auto; }
|
|
#program li { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
#program li.bad { color: var(--wai-bad); }
|
|
#program li.pending { color: var(--wai-muted); }
|
|
#problems { margin: 0; padding-left: 18px; font-size: 13px; }
|
|
#problems li.bad { color: var(--wai-bad); }
|
|
#problems li.warn { color: var(--wai-warn); }
|
|
#problems li.ok { color: var(--wai-ok); }
|
|
#app:empty::before { content: "The app appears here, line by line, as the model writes it."; color: var(--wai-muted); font-size: 14px; }
|