austere-axi 0.9.0 → 0.10.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 +19 -12
- package/dist/austere.js +2 -2
- package/dist/catalog.json +1 -1
- package/dist/chrome/chrome.js +26 -26
- package/dist/cli.mjs +34407 -32903
- package/dist/packs/shadcn/catalog.json +3 -3
- package/dist/packs/shadcn/pack.js +1 -1
- package/dist/sync.mjs +1 -1
- package/package.json +1 -1
- package/types/sync.d.ts +10 -0
package/README.md
CHANGED
|
@@ -185,7 +185,8 @@ austere-axi export <file> one self-contained HTML file, works offline (~1
|
|
|
185
185
|
austere-axi hub on|off|status|list|notes|open home page with every page and note
|
|
186
186
|
austere-axi share <file> --as "<name>" invite link for a teammate on your tailnet [--auto]
|
|
187
187
|
austere-axi share list|revoke see invites, cut one off
|
|
188
|
-
austere-axi publish <file> hosted copy of the page on austere.kasat.xyz [--auto] [--no-presence] [--new]
|
|
188
|
+
austere-axi publish <file> hosted copy of the page on austere.kasat.xyz [--invite <name>]... [--expires <dur>] [--unlisted] [--auto] [--no-presence] [--new]
|
|
189
|
+
austere-axi publish invites|revoke <file> [name] see a page's invites, cut one off
|
|
189
190
|
austere-axi publish list|rm <file|id> your hosted pages; delete one now
|
|
190
191
|
austere-axi stop stop the background server
|
|
191
192
|
austere-axi server --persist run the server in the foreground and never idle out
|
|
@@ -351,22 +352,27 @@ Send the link to the teammate. It needs Tailscale (or `AUSTERE_AXI_HOST`); witho
|
|
|
351
352
|
|
|
352
353
|
## Hosted pages
|
|
353
354
|
|
|
354
|
-
`publish` uploads a page to [austere-cloud](https://github.com/MandalorianBatman/austere-cloud) and prints
|
|
355
|
+
`publish` uploads a page to [austere-cloud](https://github.com/MandalorianBatman/austere-cloud) and prints one link per invited reviewer. Nothing is sent until you run it; after that, the local server keeps your published pages in sync (below).
|
|
355
356
|
|
|
356
357
|
```sh
|
|
357
|
-
austere-axi publish plan.html
|
|
358
|
-
austere-axi publish plan.html
|
|
359
|
-
austere-axi publish plan.html --
|
|
360
|
-
austere-axi publish
|
|
361
|
-
austere-axi publish
|
|
358
|
+
austere-axi publish plan.html --invite Ana --invite Ben # prints https://austere.kasat.xyz/p/<id>#i=<token> for each
|
|
359
|
+
austere-axi publish plan.html # again: same page, new version; Ana's and Ben's links keep working
|
|
360
|
+
austere-axi publish plan.html --invite Cy --expires 7d # one more reviewer, for a week
|
|
361
|
+
austere-axi publish invites plan.html # who is invited (live, expired, revoked), with their links
|
|
362
|
+
austere-axi publish revoke plan.html Ben # Ben's link stops working; his open page is disconnected
|
|
363
|
+
austere-axi publish plan.html --unlisted # opt-in open link: anyone with the plain URL may review
|
|
364
|
+
austere-axi publish plan.html --new # a fresh page
|
|
365
|
+
austere-axi publish list # your pages, expiry, note counts
|
|
366
|
+
austere-axi publish rm plan.html # or the page id; every link stops working at once
|
|
362
367
|
```
|
|
363
368
|
|
|
364
369
|
- **What is uploaded:** the file with its runtime tag pointed at the service's copy of this CLI version, the installed packs it declares, and the images beside it, inlined by the same rules as `export`. A declared pack that is not installed at that version, or an image that cannot be inlined, is an error. Each upload is limited to 1 MB after gzip.
|
|
365
|
-
- **Who can see it:** pages are invite-only.
|
|
366
|
-
- **Notes:** reviewers' notes
|
|
367
|
-
- **
|
|
370
|
+
- **Who can see it:** pages are invite-only. Each `--invite <name>` gets its own link; the token is in the URL fragment (`#i=…`), which browsers never send to the server, and the reviewer's notes carry that name. Send each person only their link. `--unlisted` opts a page into an open link where reviewers name themselves.
|
|
371
|
+
- **Notes:** reviewers' notes reach `poll` and `feedback` like any other, from the reviewer's name and with `remote: true`. They are held for you by default: press Send (or Discard) in the review page. With `--auto` on the publish they go straight to the agent. The local server picks them up while a `poll` listens, when it starts, and when you run `feedback`; offline, it keeps retrying (up to every 60 s) and local review goes on.
|
|
372
|
+
- **Replies:** `reply` (and `poll --agent-reply`) on a published file also posts the reply to the hosted page. If the service cannot be reached, `reply` warns and the reply is sent when it can.
|
|
373
|
+
- **Presence:** everyone on the page sees who else is there (a chip per viewer: viewing, away or writing) and the part each one last clicked in Annotate mode, outlined with their name. You are on the page too while your local review page is open: hosted viewers show as chips there, and your clicks show as an outline for them. Nothing about it is stored. `--no-presence` on a publish turns it off for that page.
|
|
368
374
|
- **Expiry:** 30 days after the last publish.
|
|
369
|
-
- **Owner token:** created on the first `publish`, stored in `~/.austere-axi/cloud.json` (mode 0600). It only controls your pages. Copying the file to another machine
|
|
375
|
+
- **Owner token:** created on the first `publish`, stored in `~/.austere-axi/cloud.json` (mode 0600). It only controls your pages. Copying the file to another machine makes that machine a peer: it gets the same notes, and a note you send on one machine arrives sent on the other. `cloud.json` maps pages by absolute path, so the file must sit at the same path on both machines.
|
|
370
376
|
|
|
371
377
|
The protocol is in [docs/hosted-share-links.md](docs/hosted-share-links.md).
|
|
372
378
|
|
|
@@ -429,6 +435,7 @@ Outputs: `ok` (`true` when every page passed) and `artifact-url`.
|
|
|
429
435
|
| `AUSTERE_AXI_PERSIST` | | `1`: never idle out, as `server --persist` |
|
|
430
436
|
| `AUSTERE_AXI_NPM_REGISTRY` | `npm_config_registry`, else npmjs | where `components add` gets packs and `components search` finds them, except scopes mapped with `registry add` |
|
|
431
437
|
| `AUSTERE_AXI_CLOUD_URL` | `https://austere.kasat.xyz` | the service `publish` talks to (self-hosting, tests) |
|
|
438
|
+
| `AUSTERE_AXI_SYNC_RETRY_MS` | `1000` | first wait before the local server reconnects to a hosted page; it doubles up to 60 s |
|
|
432
439
|
| `CHROME_PATH` | an installed Chrome, Chromium or Edge | the browser `check --render` uses |
|
|
433
440
|
|
|
434
441
|
## Security
|
|
@@ -462,7 +469,7 @@ The server binds to loopback, plus the Tailscale IP when Tailscale is up. Never
|
|
|
462
469
|
- Image attachments in feedback.
|
|
463
470
|
- Live data: `Query` and `Mutation` are off, so pages are static.
|
|
464
471
|
- Themes: one dark theme only.
|
|
465
|
-
|
|
472
|
+
|
|
466
473
|
|
|
467
474
|
## Development
|
|
468
475
|
|
package/dist/austere.js
CHANGED
|
@@ -1648,12 +1648,12 @@ dataLane = Group("DATA STORES WITH A HEADING LONGER THAN THE COLUMN IS WIDE", [c
|
|
|
1648
1648
|
<button type="button" data-act="queue" class="primary">Queue</button>
|
|
1649
1649
|
</span>
|
|
1650
1650
|
</div>
|
|
1651
|
-
</div>`,document.body.appendChild(o);let r=o.querySelector(".austere-hover"),n=o.querySelector(".austere-hover-label"),i=o.querySelector(".austere-selbtn"),s=o.querySelector(".austere-pop"),l=o.querySelector(".austere-pop-path"),u=o.querySelector(".austere-pop-quote"),d=o.querySelector("textarea");d.addEventListener("focus",()=>e({type:"writing",on:!0})),d.addEventListener("blur",()=>e({type:"writing",on:!1}));let p=null,f=null,m=0,x=null,v=Z=>Z instanceof Element&&!!Z.closest(`[${gv}]`),w=Z=>Z instanceof Element&&Z.closest("[data-oui-id]")||null;function b(Z,ne,ie=4){Z.style.left=`${ne.left-ie}px`,Z.style.top=`${ne.top-ie}px`,Z.style.width=`${ne.width+ie*2}px`,Z.style.height=`${ne.height+ie*2}px`}let k=null;function S(Z){if(k=Z,!Z){r.hidden=!0;return}b(r,w9(Z)),n.textContent=`${Z.getAttribute("data-oui-id")} \xB7 ${Z.getAttribute("data-oui-c")}`,r.hidden=!1}function I(Z){a!=="annotate"||!s.hidden||(x=Z.target,!m&&(m=requestAnimationFrame(()=>{m=0,!v(x)&&S(w(x))})))}function C(){let Z=window.getSelection();return!!Z&&!Z.isCollapsed&&Z.toString().trim().length>0}function M(Z){if(a!=="annotate"||v(Z.target))return;if(!s.hidden){Z.preventDefault(),Z.stopPropagation();return}if(C())return;let ne=Z.target;if(!(ne instanceof Element)||!Z.altKey&&ne.closest(WDa))return;let ie=w(ne);ie&&(Z.preventDefault(),Z.stopPropagation(),O({target:ie,el:ne,point:{x:Z.clientX,y:Z.clientY}}))}function A(){if(a!=="annotate"||!s.hidden)return;let Z=window.getSelection();if(!Z||Z.isCollapsed||!Z.rangeCount){i.hidden=!0,f=null;return}let ne=Z.toString().trim(),ie=Z.getRangeAt(0),be=ie.commonAncestorContainer,me=be instanceof Element?be:be.parentElement,ge=w(me);if(!ne||!me||!ge||v(me)){i.hidden=!0,f=null;return}let Xe=ie.getBoundingClientRect();f={target:ge,el:me,selection:yv(ne,600),point:{x:Xe.left,y:Xe.bottom}},i.hidden=!1;let He=i.offsetWidth||140;i.style.left=`${Math.max(8,Math.min(window.innerWidth-He-8,Xe.left+Xe.width/2-He/2))}px`,i.style.top=`${Math.max(8,Math.min(window.innerHeight-40,Xe.bottom+8))}px`}let D=0;function E(){clearTimeout(D),D=window.setTimeout(A,120)}i.addEventListener("mousedown",Z=>Z.preventDefault()),i.addEventListener("click",Z=>{Z.preventDefault(),Z.stopPropagation(),f&&O(f),i.hidden=!0});function T(){let Z=p;Z&&(l.textContent="",Z.path.forEach((ne,ie)=>{let be=document.createElement("button");if(be.type="button",be.className="austere-chip"+(ne.id===Z.targetId?" active":""),be.textContent=ne.id,be.title=ne.component,be.addEventListener("click",()=>{Z.targetId=ne.id,Z.component=ne.component,T(),d.focus()}),l.appendChild(be),ie<Z.path.length-1){let me=document.createElement("span");me.className="austere-chip-sep",me.textContent="\u203A",l.appendChild(me)}}))}function O({target:Z,el:ne,selection:ie,point:be}){let me=ZDa(Z),ge=XDa(Z,ne),Xe=yzt(Z,ne),He;if(!ie){let zt=Xe||ne;He=yv((zt instanceof HTMLElement?zt.innerText:void 0)||zt.textContent,200)||void 0,Xe&&He===ge?.part&&(He=void 0)}let at=gzt(Z);e({type:"focus",id:at.id}),p={targetId:at.id,component:at.component,path:me,selection:ie||void 0,excerpt:He,detail:ge},T();let bt=ie||He||ge?.part||"";u.textContent=yv(bt,220),u.hidden=!bt,d.value="",r.hidden=!0,i.hidden=!0,S(Z),r.classList.add("locked"),s.hidden=!1,B(be),d.focus()}function B(Z){if(window.innerWidth<640){s.classList.add("sheet"),s.style.left=s.style.top="";return}s.classList.remove("sheet");let ne=s.offsetWidth||360,ie=s.offsetHeight||200,be=Z.x+12,me=Z.y+12;be+ne>window.innerWidth-8&&(be=Math.max(8,Z.x-ne-12)),me+ie>window.innerHeight-8&&(me=Math.max(8,Z.y-ie-12)),s.style.left=`${be}px`,s.style.top=`${me}px`}function P(){document.activeElement===d&&d.blur(),s.hidden=!0,r.classList.remove("locked"),r.hidden=!0,p=null}function H(){let Z=d.value.trim();if(!p)return;if(!Z&&!p.selection){d.focus(),d.classList.add("shake"),setTimeout(()=>d.classList.remove("shake"),400);return}let ne={kind:"annotation",target:p.targetId,component:p.component,path:p.path.map(be=>be.id),note:Z};p.selection&&(ne.selection=p.selection),p.excerpt&&!p.selection&&(ne.excerpt=p.excerpt),p.detail&&p.targetId===p.path[p.path.length-1].id&&(ne.detail=p.detail),e({type:"annotate",item:ne});let ie=p.targetId;P(),window.getSelection()?.removeAllRanges(),q([ie],"queued")}s.addEventListener("click",Z=>{let ne=Z.target instanceof Element?Z.target.closest("[data-act]")?.getAttribute("data-act"):void 0;ne==="cancel"&&P(),ne==="queue"&&H()}),d.addEventListener("keydown",Z=>{Z.key==="Enter"&&!Z.shiftKey&&!Z.isComposing?(Z.preventDefault(),H()):Z.key==="Escape"&&(Z.preventDefault(),d.value.trim()||P())}),document.addEventListener("mousemove",I,{passive:!0}),document.addEventListener("click",M,!0),document.addEventListener("mouseup",E),document.addEventListener("keyup",Z=>{(Z.shiftKey||Z.key.startsWith("Arrow"))&&E()}),document.addEventListener("selectionchange",()=>{"ontouchstart"in window&&E()}),document.addEventListener("keydown",Z=>{(Z.metaKey||Z.ctrlKey)&&(Z.key==="i"||Z.key==="I")&&(Z.preventDefault(),e({type:"toggle-mode"}))}),window.addEventListener("scroll",()=>{if(!s.hidden)return Ae();r.hidden=!0,i.hidden=!0},{passive:!0}),document.addEventListener("mouseleave",()=>{s.hidden&&(r.hidden=!0)});function V(Z,ne,ie,be=new Set){if(be.has(Z))return[];be.add(Z);let me=document.querySelectorAll(`[data-oui-id="${CSS.escape(Z)}"]`);return me.length?Array.from(me):!ne||!ie?[]:ie(ne,Z).flatMap(ge=>V(ge,ne,ie,be))}function W(Z,ne,ie){let be=new Set;for(let me of Z)for(let ge of V(me,ne,ie))be.add(ge);return Array.from(be).filter(me=>!Array.from(be).some(ge=>ge!==me&&ge.contains(me)))}function X(Z,ne){let ie=document.createElement("div");return ie.setAttribute(gv,""),ie.className=ne,ie.style.left=`${Z.left+window.scrollX-4}px`,ie.style.top=`${Z.top+window.scrollY-4}px`,ie.style.width=`${Z.width+8}px`,ie.style.height=`${Z.height+8}px`,ie}function ee(Z){if(getComputedStyle(Z).display!=="contents")return Z.getBoundingClientRect();let[ne,ie,be,me]=[1/0,1/0,-1/0,-1/0],ge=He=>{!He.width&&!He.height||([ne,ie,be,me]=[Math.min(ne,He.left),Math.min(ie,He.top),Math.max(be,He.right),Math.max(me,He.bottom)])},Xe=He=>{for(let at of He.childNodes)if(at instanceof Element)getComputedStyle(at).display==="contents"?Xe(at):ge(at.getBoundingClientRect());else if(at.nodeType===Node.TEXT_NODE&&at.textContent?.trim()){let bt=document.createRange();bt.selectNodeContents(at),ge(bt.getBoundingClientRect())}};return Xe(Z),{left:ne,top:ie,right:be,bottom:me}}function te(Z){let{left:ne,top:ie,right:be,bottom:me}=ee(Z);for(let ge=Z.parentElement;ge&&ge!==document.body;ge=ge.parentElement){let Xe=getComputedStyle(ge),He=Xe.overflowX!=="visible",at=Xe.overflowY!=="visible";if(!He&&!at||Xe.display==="contents")continue;let bt=ge.getBoundingClientRect();He&&([ne,be]=[Math.max(ne,bt.left),Math.min(be,bt.right)]),at&&([ie,me]=[Math.max(ie,bt.top),Math.min(me,bt.bottom)])}return be>ne&&me>ie?{left:ne,top:ie,width:be-ne,height:me-ie}:null}function q(Z,ne="changed",ie,be){let me=W(Z,ie,be);for(let ge of me){let Xe=te(ge);if(!Xe)continue;let He=X(Xe,`austere-flash ${ne}`);document.body.appendChild(He),setTimeout(()=>He.remove(),2400)}return me}function se(Z,ne,ie){let be=V(Z,ne,ie);if(!be.length)return!1;let me=w9(be[0]),ge=me.top+window.scrollY-Math.max(24,(window.innerHeight-me.height)/3);return window.scrollTo({top:Math.max(0,ge),behavior:"smooth"}),setTimeout(()=>q([Z],"changed",ne,ie),350),!0}let de=document.createElement("div");de.setAttribute(gv,""),o.appendChild(de);let U=null,De=0,qe=document.createElement("div");qe.setAttribute(gv,""),o.appendChild(qe);let Re=[];function ze(){let[Z,ne]=U&&t?t():[],ie=[],be=[];for(let me of U?W(U,Z,ne):[]){let ge=te(me);ge&&(ie.push(me),be.push(ge))}return de.replaceChildren(...be.map(me=>X(me,"austere-mark"))),ie}function Ue(){if(!(r.hidden||!k)){if(!k.isConnected){let Z=k.getAttribute("data-oui-id");k=document.querySelector(`[data-oui-id="${CSS.escape(Z)}"]`)}k?b(r,w9(k)):r.hidden=!0}}function Ae(){De||!U&&r.hidden&&!Re.length||(De=requestAnimationFrame(()=>{De=0,U&&ze(),Re.length&&Q(),Ue()}))}window.addEventListener("resize",Ae,{passive:!0}),new ResizeObserver(Ae).observe(document.body),new MutationObserver(Z=>{Z.some(ne=>!v(ne.target.nodeType===1?ne.target:ne.target.parentElement))&&Ae()}).observe(document.body,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["class","style","hidden","open","x","y","width","height","d","transform","viewBox"]}),document.addEventListener("scroll",Z=>{Z.target!==document&&Ae()},{capture:!0,passive:!0});function re(Z,ne=!1){U=Z.length?Z:null;let ie=ze();if(ne&&ie.length){let be=ie.map(w9);if(!be.some(me=>me.bottom>0&&me.top<window.innerHeight)){let me=be[0],ge=me.top+window.scrollY-Math.max(24,(window.innerHeight-me.height)/3);window.scrollTo({top:Math.max(0,ge),behavior:"smooth"})}}return ie.length}function Q(){let[Z,ne]=Re.length&&t?t():[],ie=new Map;for(let me of Re)ie.set(me.statement,[...ie.get(me.statement)??[],me]);let be=[];for(let[me,ge]of ie){let Xe=!1;for(let He of W([me],Z,ne)){let at=te(He);if(!at)continue;let bt=X(at,"austere-focus");if(bt.style.setProperty("--austere-viewer",ge[0].colour),!Xe){Xe=!0;let zt=document.createElement("div");zt.className="austere-focus-names";for(let sa of ge){let Ut=document.createElement("span");Ut.textContent=sa.name,Ut.style.background=sa.colour,zt.appendChild(Ut)}bt.appendChild(zt)}be.push(bt)}}qe.replaceChildren(...be)}function le(Z){Re=Z,Q()}return{setMode(Z){a=Z==="annotate"?"annotate":"explore",document.documentElement.classList.toggle("austere-annotating",a==="annotate"),a!=="annotate"&&(P(),i.hidden=!0,r.hidden=!0)},flash:q,reveal:se,highlight:re,focus:le}}var vzt={shadcn:{name:"@austere-axi/pack-shadcn",version:"0.9.0",components:["Progress","Avatar","AvatarGroup","Tooltip","HoverCard","Breadcrumb","BreadcrumbItem","Kbd","Skeleton","Calendar","Timeline","TimelineItem"]}};function YDa(e){let t=e.lastIndexOf("@");return t<=0?{name:e,version:""}:{name:e.slice(0,t),version:e.slice(t+1)}}var KDa=/^(@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,QDa=/^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/;function bzt(e){let t=[];for(let a of String(e||"").split(",")){let[o,r]=a.trim().split(/\s+/);if(!o)continue;let{name:n,version:i}=YDa(o);!KDa.test(n)||!QDa.test(i)||t.some(s=>s.name===n)||t.push(r&&/^sha(256|384|512)-[A-Za-z0-9+/=]+$/.test(r)?{name:n,version:i,integrity:r}:{name:n,version:i})}return t}var kzt="https://cdn.jsdelivr.net/npm";function wzt(e=document){let t=e.querySelector('meta[name="austere-packs"]');return t?bzt(t.getAttribute("content")||""):[]}function Szt(e,t){let a=[...t];for(let[o,r]of Object.entries(vzt))a.some(n=>n.name===r.name)||r.components.some(n=>new RegExp(`\\b${n}\\s*\\(`).test(e))&&a.push({name:r.name,version:r.version,bundled:o});return a}function wX(){return/\/__austere\/$/.test(b2)}function JDa(e){if(e.bundled)return{src:B4(`packs/${e.bundled}/pack.js`)||`${kzt}/austere-axi@${e.version}/dist/packs/${e.bundled}/pack.js`};if(wX()){let t=e.integrity?`?integrity=${encodeURIComponent(e.integrity)}`:"";return{src:`${b2}installed-packs/${encodeURIComponent(`${e.name}@${e.version}`)}/pack.js${t}`}}return{src:`${kzt}/${e.name}@${e.version}/dist/pack.js`,integrity:e.integrity}}function eOa(e,t){return new Promise((a,o)=>{let r=document.createElement("script");r.src=e,r.async=!0,t&&(r.integrity=t,r.crossOrigin="anonymous"),r.onload=()=>a(),r.onerror=()=>o(new Error(`could not load ${e}`)),document.head.appendChild(r)})}async function Lzt(e,{onError:t}={}){let a=e.filter(o=>!hl().some(r=>r.name===o.name));return await Promise.all(a.map(o=>{let{src:r,integrity:n}=JDa(o);return eOa(r,n).then(()=>{hl().some(i=>i.name===o.name)||t?.(o,new Error(`${r} loaded but did not register pack ${o.name}`))},i=>t?.(o,i))})),hl()}function Izt(e){for(let t of e){if(!t.css)continue;let a=`austere-pack-css-${t.name.replace(/[^a-z0-9]/gi,"-")}`;if(document.getElementById(a))continue;let o=document.createElement("style");o.id=a,o.textContent=t.css,document.head.appendChild(o)}}var tOa=/[A-Za-z_$]/;function aOa(e){let t=[],a=String(e??""),o=0,r=1,n=a.length;for(;o<n;){let i=a[o];if(i===`
|
|
1651
|
+
</div>`,document.body.appendChild(o);let r=o.querySelector(".austere-hover"),n=o.querySelector(".austere-hover-label"),i=o.querySelector(".austere-selbtn"),s=o.querySelector(".austere-pop"),l=o.querySelector(".austere-pop-path"),u=o.querySelector(".austere-pop-quote"),d=o.querySelector("textarea");d.addEventListener("focus",()=>e({type:"writing",on:!0})),d.addEventListener("blur",()=>e({type:"writing",on:!1}));let p=null,f=null,m=0,x=null,v=Z=>Z instanceof Element&&!!Z.closest(`[${gv}]`),w=Z=>Z instanceof Element&&Z.closest("[data-oui-id]")||null;function b(Z,ne,ie=4){Z.style.left=`${ne.left-ie}px`,Z.style.top=`${ne.top-ie}px`,Z.style.width=`${ne.width+ie*2}px`,Z.style.height=`${ne.height+ie*2}px`}let k=null;function S(Z){if(k=Z,!Z){r.hidden=!0;return}b(r,w9(Z)),n.textContent=`${Z.getAttribute("data-oui-id")} \xB7 ${Z.getAttribute("data-oui-c")}`,r.hidden=!1}function I(Z){a!=="annotate"||!s.hidden||(x=Z.target,!m&&(m=requestAnimationFrame(()=>{m=0,!v(x)&&S(w(x))})))}function C(){let Z=window.getSelection();return!!Z&&!Z.isCollapsed&&Z.toString().trim().length>0}function M(Z){if(a!=="annotate"||v(Z.target))return;if(!s.hidden){Z.preventDefault(),Z.stopPropagation();return}if(C())return;let ne=Z.target;if(!(ne instanceof Element)||!Z.altKey&&ne.closest(WDa))return;let ie=w(ne);ie&&(Z.preventDefault(),Z.stopPropagation(),O({target:ie,el:ne,point:{x:Z.clientX,y:Z.clientY}}))}function A(){if(a!=="annotate"||!s.hidden)return;let Z=window.getSelection();if(!Z||Z.isCollapsed||!Z.rangeCount){i.hidden=!0,f=null;return}let ne=Z.toString().trim(),ie=Z.getRangeAt(0),be=ie.commonAncestorContainer,me=be instanceof Element?be:be.parentElement,ge=w(me);if(!ne||!me||!ge||v(me)){i.hidden=!0,f=null;return}let Xe=ie.getBoundingClientRect();f={target:ge,el:me,selection:yv(ne,600),point:{x:Xe.left,y:Xe.bottom}},i.hidden=!1;let He=i.offsetWidth||140;i.style.left=`${Math.max(8,Math.min(window.innerWidth-He-8,Xe.left+Xe.width/2-He/2))}px`,i.style.top=`${Math.max(8,Math.min(window.innerHeight-40,Xe.bottom+8))}px`}let D=0;function E(){clearTimeout(D),D=window.setTimeout(A,120)}i.addEventListener("mousedown",Z=>Z.preventDefault()),i.addEventListener("click",Z=>{Z.preventDefault(),Z.stopPropagation(),f&&O(f),i.hidden=!0});function T(){let Z=p;Z&&(l.textContent="",Z.path.forEach((ne,ie)=>{let be=document.createElement("button");if(be.type="button",be.className="austere-chip"+(ne.id===Z.targetId?" active":""),be.textContent=ne.id,be.title=ne.component,be.addEventListener("click",()=>{Z.targetId=ne.id,Z.component=ne.component,T(),d.focus()}),l.appendChild(be),ie<Z.path.length-1){let me=document.createElement("span");me.className="austere-chip-sep",me.textContent="\u203A",l.appendChild(me)}}))}function O({target:Z,el:ne,selection:ie,point:be}){let me=ZDa(Z),ge=XDa(Z,ne),Xe=yzt(Z,ne),He;if(!ie){let zt=Xe||ne;He=yv((zt instanceof HTMLElement?zt.innerText:void 0)||zt.textContent,200)||void 0,Xe&&He===ge?.part&&(He=void 0)}let at=gzt(Z);e({type:"focus",id:at.id}),p={targetId:at.id,component:at.component,path:me,selection:ie||void 0,excerpt:He,detail:ge},T();let bt=ie||He||ge?.part||"";u.textContent=yv(bt,220),u.hidden=!bt,d.value="",r.hidden=!0,i.hidden=!0,S(Z),r.classList.add("locked"),s.hidden=!1,B(be),d.focus()}function B(Z){if(window.innerWidth<640){s.classList.add("sheet"),s.style.left=s.style.top="";return}s.classList.remove("sheet");let ne=s.offsetWidth||360,ie=s.offsetHeight||200,be=Z.x+12,me=Z.y+12;be+ne>window.innerWidth-8&&(be=Math.max(8,Z.x-ne-12)),me+ie>window.innerHeight-8&&(me=Math.max(8,Z.y-ie-12)),s.style.left=`${be}px`,s.style.top=`${me}px`}function P(){document.activeElement===d&&d.blur(),s.hidden=!0,r.classList.remove("locked"),r.hidden=!0,p=null}function H(){let Z=d.value.trim();if(!p)return;if(!Z&&!p.selection){d.focus(),d.classList.add("shake"),setTimeout(()=>d.classList.remove("shake"),400);return}let ne={kind:"annotation",target:p.targetId,component:p.component,path:p.path.map(be=>be.id),note:Z};p.selection&&(ne.selection=p.selection),p.excerpt&&!p.selection&&(ne.excerpt=p.excerpt),p.detail&&p.targetId===p.path[p.path.length-1].id&&(ne.detail=p.detail),e({type:"annotate",item:ne});let ie=p.targetId;P(),window.getSelection()?.removeAllRanges(),q([ie],"queued")}s.addEventListener("click",Z=>{let ne=Z.target instanceof Element?Z.target.closest("[data-act]")?.getAttribute("data-act"):void 0;ne==="cancel"&&P(),ne==="queue"&&H()}),d.addEventListener("keydown",Z=>{Z.key==="Enter"&&!Z.shiftKey&&!Z.isComposing?(Z.preventDefault(),H()):Z.key==="Escape"&&(Z.preventDefault(),d.value.trim()||P())}),document.addEventListener("mousemove",I,{passive:!0}),document.addEventListener("click",M,!0),document.addEventListener("mouseup",E),document.addEventListener("keyup",Z=>{(Z.shiftKey||Z.key.startsWith("Arrow"))&&E()}),document.addEventListener("selectionchange",()=>{"ontouchstart"in window&&E()}),document.addEventListener("keydown",Z=>{(Z.metaKey||Z.ctrlKey)&&(Z.key==="i"||Z.key==="I")&&(Z.preventDefault(),e({type:"toggle-mode"}))}),window.addEventListener("scroll",()=>{if(!s.hidden)return Ae();r.hidden=!0,i.hidden=!0},{passive:!0}),document.addEventListener("mouseleave",()=>{s.hidden&&(r.hidden=!0)});function V(Z,ne,ie,be=new Set){if(be.has(Z))return[];be.add(Z);let me=document.querySelectorAll(`[data-oui-id="${CSS.escape(Z)}"]`);return me.length?Array.from(me):!ne||!ie?[]:ie(ne,Z).flatMap(ge=>V(ge,ne,ie,be))}function W(Z,ne,ie){let be=new Set;for(let me of Z)for(let ge of V(me,ne,ie))be.add(ge);return Array.from(be).filter(me=>!Array.from(be).some(ge=>ge!==me&&ge.contains(me)))}function X(Z,ne){let ie=document.createElement("div");return ie.setAttribute(gv,""),ie.className=ne,ie.style.left=`${Z.left+window.scrollX-4}px`,ie.style.top=`${Z.top+window.scrollY-4}px`,ie.style.width=`${Z.width+8}px`,ie.style.height=`${Z.height+8}px`,ie}function ee(Z){if(getComputedStyle(Z).display!=="contents")return Z.getBoundingClientRect();let[ne,ie,be,me]=[1/0,1/0,-1/0,-1/0],ge=He=>{!He.width&&!He.height||([ne,ie,be,me]=[Math.min(ne,He.left),Math.min(ie,He.top),Math.max(be,He.right),Math.max(me,He.bottom)])},Xe=He=>{for(let at of He.childNodes)if(at instanceof Element)getComputedStyle(at).display==="contents"?Xe(at):ge(at.getBoundingClientRect());else if(at.nodeType===Node.TEXT_NODE&&at.textContent?.trim()){let bt=document.createRange();bt.selectNodeContents(at),ge(bt.getBoundingClientRect())}};return Xe(Z),{left:ne,top:ie,right:be,bottom:me}}function te(Z){let{left:ne,top:ie,right:be,bottom:me}=ee(Z);for(let ge=Z.parentElement;ge&&ge!==document.body;ge=ge.parentElement){let Xe=getComputedStyle(ge),He=Xe.overflowX!=="visible",at=Xe.overflowY!=="visible";if(!He&&!at||Xe.display==="contents")continue;let bt=ge.getBoundingClientRect();He&&([ne,be]=[Math.max(ne,bt.left),Math.min(be,bt.right)]),at&&([ie,me]=[Math.max(ie,bt.top),Math.min(me,bt.bottom)])}return be>ne&&me>ie?{left:ne,top:ie,width:be-ne,height:me-ie}:null}function q(Z,ne="changed",ie,be){let me=W(Z,ie,be);for(let ge of me){let Xe=te(ge);if(!Xe)continue;let He=X(Xe,`austere-flash ${ne}`);document.body.appendChild(He),setTimeout(()=>He.remove(),2400)}return me}function se(Z,ne,ie){let be=V(Z,ne,ie);if(!be.length)return!1;let me=w9(be[0]),ge=me.top+window.scrollY-Math.max(24,(window.innerHeight-me.height)/3);return window.scrollTo({top:Math.max(0,ge),behavior:"smooth"}),setTimeout(()=>q([Z],"changed",ne,ie),350),!0}let de=document.createElement("div");de.setAttribute(gv,""),o.appendChild(de);let U=null,De=0,qe=document.createElement("div");qe.setAttribute(gv,""),o.appendChild(qe);let Re=[];function ze(){let[Z,ne]=U&&t?t():[],ie=[],be=[];for(let me of U?W(U,Z,ne):[]){let ge=te(me);ge&&(ie.push(me),be.push(ge))}return de.replaceChildren(...be.map(me=>X(me,"austere-mark"))),ie}function Ue(){if(!(r.hidden||!k)){if(!k.isConnected){let Z=k.getAttribute("data-oui-id");k=document.querySelector(`[data-oui-id="${CSS.escape(Z)}"]`)}k?b(r,w9(k)):r.hidden=!0}}function Ae(){De||!U&&r.hidden&&!Re.length||(De=requestAnimationFrame(()=>{De=0,U&&ze(),Re.length&&Q(),Ue()}))}window.addEventListener("resize",Ae,{passive:!0}),new ResizeObserver(Ae).observe(document.body),new MutationObserver(Z=>{Z.some(ne=>!v(ne.target.nodeType===1?ne.target:ne.target.parentElement))&&Ae()}).observe(document.body,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["class","style","hidden","open","x","y","width","height","d","transform","viewBox"]}),document.addEventListener("scroll",Z=>{Z.target!==document&&Ae()},{capture:!0,passive:!0});function re(Z,ne=!1){U=Z.length?Z:null;let ie=ze();if(ne&&ie.length){let be=ie.map(w9);if(!be.some(me=>me.bottom>0&&me.top<window.innerHeight)){let me=be[0],ge=me.top+window.scrollY-Math.max(24,(window.innerHeight-me.height)/3);window.scrollTo({top:Math.max(0,ge),behavior:"smooth"})}}return ie.length}function Q(){let[Z,ne]=Re.length&&t?t():[],ie=new Map;for(let me of Re)ie.set(me.statement,[...ie.get(me.statement)??[],me]);let be=[];for(let[me,ge]of ie){let Xe=!1;for(let He of W([me],Z,ne)){let at=te(He);if(!at)continue;let bt=X(at,"austere-focus");if(bt.style.setProperty("--austere-viewer",ge[0].colour),!Xe){Xe=!0;let zt=document.createElement("div");zt.className="austere-focus-names";for(let sa of ge){let Ut=document.createElement("span");Ut.textContent=sa.name,Ut.style.background=sa.colour,zt.appendChild(Ut)}bt.appendChild(zt)}be.push(bt)}}qe.replaceChildren(...be)}function le(Z){Re=Z,Q()}return{setMode(Z){a=Z==="annotate"?"annotate":"explore",document.documentElement.classList.toggle("austere-annotating",a==="annotate"),a!=="annotate"&&(P(),i.hidden=!0,r.hidden=!0)},flash:q,reveal:se,highlight:re,focus:le}}var vzt={shadcn:{name:"@austere-axi/pack-shadcn",version:"0.10.0",components:["Progress","Avatar","AvatarGroup","Tooltip","HoverCard","Breadcrumb","BreadcrumbItem","Kbd","Skeleton","Calendar","Timeline","TimelineItem"]}};function YDa(e){let t=e.lastIndexOf("@");return t<=0?{name:e,version:""}:{name:e.slice(0,t),version:e.slice(t+1)}}var KDa=/^(@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,QDa=/^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/;function bzt(e){let t=[];for(let a of String(e||"").split(",")){let[o,r]=a.trim().split(/\s+/);if(!o)continue;let{name:n,version:i}=YDa(o);!KDa.test(n)||!QDa.test(i)||t.some(s=>s.name===n)||t.push(r&&/^sha(256|384|512)-[A-Za-z0-9+/=]+$/.test(r)?{name:n,version:i,integrity:r}:{name:n,version:i})}return t}var kzt="https://cdn.jsdelivr.net/npm";function wzt(e=document){let t=e.querySelector('meta[name="austere-packs"]');return t?bzt(t.getAttribute("content")||""):[]}function Szt(e,t){let a=[...t];for(let[o,r]of Object.entries(vzt))a.some(n=>n.name===r.name)||r.components.some(n=>new RegExp(`\\b${n}\\s*\\(`).test(e))&&a.push({name:r.name,version:r.version,bundled:o});return a}function wX(){return/\/__austere\/$/.test(b2)}function JDa(e){if(e.bundled)return{src:B4(`packs/${e.bundled}/pack.js`)||`${kzt}/austere-axi@${e.version}/dist/packs/${e.bundled}/pack.js`};if(wX()){let t=e.integrity?`?integrity=${encodeURIComponent(e.integrity)}`:"";return{src:`${b2}installed-packs/${encodeURIComponent(`${e.name}@${e.version}`)}/pack.js${t}`}}return{src:`${kzt}/${e.name}@${e.version}/dist/pack.js`,integrity:e.integrity}}function eOa(e,t){return new Promise((a,o)=>{let r=document.createElement("script");r.src=e,r.async=!0,t&&(r.integrity=t,r.crossOrigin="anonymous"),r.onload=()=>a(),r.onerror=()=>o(new Error(`could not load ${e}`)),document.head.appendChild(r)})}async function Lzt(e,{onError:t}={}){let a=e.filter(o=>!hl().some(r=>r.name===o.name));return await Promise.all(a.map(o=>{let{src:r,integrity:n}=JDa(o);return eOa(r,n).then(()=>{hl().some(i=>i.name===o.name)||t?.(o,new Error(`${r} loaded but did not register pack ${o.name}`))},i=>t?.(o,i))})),hl()}function Izt(e){for(let t of e){if(!t.css)continue;let a=`austere-pack-css-${t.name.replace(/[^a-z0-9]/gi,"-")}`;if(document.getElementById(a))continue;let o=document.createElement("style");o.id=a,o.textContent=t.css,document.head.appendChild(o)}}var tOa=/[A-Za-z_$]/;function aOa(e){let t=[],a=String(e??""),o=0,r=1,n=a.length;for(;o<n;){let i=a[o];if(i===`
|
|
1652
1652
|
`){r++,o++;continue}if(i===" "||i===" "||i==="\r"){o++;continue}if(i==="#"||i==="/"&&a[o+1]==="/"){for(;o<n&&a[o]!==`
|
|
1653
1653
|
`;)o++;continue}let s=o,l=r,u=0,d=null,p=!1;for(;o<n;){let x=a[o];if(d){p?p=!1:x==="\\"?p=!0:x===d&&(d=null),x===`
|
|
1654
1654
|
`&&r++,o++;continue}if(x==='"'||x==="'"){d=x,o++;continue}if(x==="#"||x==="/"&&a[o+1]==="/"){for(;o<n&&a[o]!==`
|
|
1655
1655
|
`;)o++;continue}if(x==="("||x==="["||x==="{")u++;else if(x===")"||x==="]"||x==="}")u=Math.max(0,u-1);else if(x===`
|
|
1656
|
-
`){if(u===0&&!oOa(a,o+1))break;r++}o++}let f=a.slice(s,o).replace(/\s+$/,""),m=/^\s*([A-Za-z_$][\w$]*)\s*=/.exec(f);m&&tOa.test(m[1][0])&&t.push({id:m[1],text:f,line:l,endLine:r})}return t}function oOa(e,t){let a=t;for(;a<e.length&&(e[a]===" "||e[a]===" ");)a++;return e[a]==="?"||e[a]===":"}function Qm(e){let t=new Map;for(let a of aOa(e))t.set(a.id,a);return t}function Czt(e,t){let a=Qm(e),o=Qm(t),r=[];for(let[n,i]of o){let s=a.get(n);(!s||Mzt(s.text)!==Mzt(i.text))&&r.push(n)}return r}function S9(e,t){let a=new RegExp(`(^|[^\\w$])${nOa(t)}(?![\\w$])`),o=[];for(let[r,n]of e){if(r===t)continue;let i=n.text.slice(n.text.indexOf("=")+1);a.test(rOa(i))&&o.push(r)}return o}function rOa(e){return e.replace(/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/gs,'""')}function Mzt(e){return e.replace(/\s+/g," ").trim()}function nOa(e){return e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&")}var vv=ae(vt(),1),IX="0.
|
|
1656
|
+
`){if(u===0&&!oOa(a,o+1))break;r++}o++}let f=a.slice(s,o).replace(/\s+$/,""),m=/^\s*([A-Za-z_$][\w$]*)\s*=/.exec(f);m&&tOa.test(m[1][0])&&t.push({id:m[1],text:f,line:l,endLine:r})}return t}function oOa(e,t){let a=t;for(;a<e.length&&(e[a]===" "||e[a]===" ");)a++;return e[a]==="?"||e[a]===":"}function Qm(e){let t=new Map;for(let a of aOa(e))t.set(a.id,a);return t}function Czt(e,t){let a=Qm(e),o=Qm(t),r=[];for(let[n,i]of o){let s=a.get(n);(!s||Mzt(s.text)!==Mzt(i.text))&&r.push(n)}return r}function S9(e,t){let a=new RegExp(`(^|[^\\w$])${nOa(t)}(?![\\w$])`),o=[];for(let[r,n]of e){if(r===t)continue;let i=n.text.slice(n.text.indexOf("=")+1);a.test(rOa(i))&&o.push(r)}return o}function rOa(e){return e.replace(/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/gs,'""')}function Mzt(e){return e.replace(/\s+/g," ").trim()}function nOa(e){return e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&")}var vv=ae(vt(),1),IX="0.10.0",iOa='script[type="text/openui"], script[type="text/openui-lang"]';function sOa(){if(document.getElementById("austere-styles"))return;let e=document.createElement("style");if(e.id="austere-styles",e.textContent=[gre,fre,mre,hre].join(`
|
|
1657
1657
|
`),document.head.appendChild(e),!document.querySelector('meta[name="viewport"]')){let t=document.createElement("meta");t.name="viewport",t.content="width=device-width, initial-scale=1",document.head.appendChild(t)}document.documentElement.classList.add("austere"),document.documentElement.style.colorScheme="dark"}function Tzt(e){if(!e||typeof e!="object")return;let t={},a=Object.entries(e);for(let[o,r]of a)if(!o.startsWith("$"))if(r&&typeof r=="object"&&!Array.isArray(r))if("value"in r&&Object.keys(r).length<=3)t[o]=r.value;else{let n=Tzt(r);n&&Object.keys(n).length&&(t[o]=n)}else t[o]=r;return Object.keys(t).length?t:void 0}function lOa(e){return!!e&&typeof e=="object"&&"austere"in e&&e.austere===1&&"type"in e&&typeof e.type=="string"}function cOa(){let e=window.parent&&window.parent!==window,t=new Map,a=o=>{e&&window.parent.postMessage({austere:1,...o},"*")};return window.addEventListener("message",o=>{if(o.source!==window.parent)return;let r=o.data;lOa(r)&&t.get(r.type)?.forEach(n=>n(r))}),{framed:e,connected:!1,send:a,on(o,r){let n=r,i=t.get(o)??new Set;return t.set(o,i),i.add(n),()=>{i.delete(n)}}}}function Rzt(e,t){e.framed?e.send({type:"open-url",url:t}):window.open(t,"_blank","noopener")}function SX(e){let t=document.createElement("div");t.className="austere-toast",t.setAttribute("data-austere-ui",""),t.textContent=e,document.body.appendChild(t),setTimeout(()=>t.classList.add("out"),2600),setTimeout(()=>t.remove(),3100)}function uOa(e){let t=[e.message];return e.form&&t.push(`form: ${JSON.stringify(e.form)}`),e.context!==void 0&&t.push(`context: ${JSON.stringify(e.context)}`),t.join(`
|
|
1658
1658
|
`)}var LX=null,zzt=new Set,xv=hv,_zt="";function dOa(e,t){zzt.add(e.name);let a=!e.bundled&&wX()?" (`austere-axi check <file>` says why)":"";Tc({source:"pack",component:e.name,message:`pack ${e.name}@${e.version}: ${t.message}${a}`})}function pOa(){let e=hl(),t=e.map(a=>`${a.name}@${a.version}`).join(",");if(t===_zt)return xv;_zt=t,Izt(e);try{xv=e.length?kX(e.flatMap(a=>a.components),{onSkip:(a,o)=>Tc({source:"pack",component:a.name,message:o})}):hv}catch(a){Tc({source:"pack",message:`packs could not be added (${a.message}); rendering without them`}),xv=hv}return window.__austere.library=xv,xv}async function Ezt(e){LX||(LX=wzt());let t=Szt(e,LX).filter(a=>!zzt.has(a.name));return t.some(a=>!hl().some(o=>o.name===a.name))&&await Lzt(t,{onError:dOa}),pOa()}function fOa({programRef:e,initialLibrary:t,bridge:a,annotator:o,initialState:r}){let[n,i]=(0,Di.useState)({program:e.current,library:t}),s=n.program,l=(0,Di.useRef)(null);(0,Di.useEffect)(()=>a.on("source",async({program:f})=>{if(typeof f!="string"||f===e.current)return;let m=Czt(e.current,f);e.current=f,o?.highlight([]);let x=await Ezt(f);e.current===f&&(l.current=m,i({program:f,library:x}))}),[a]),(0,Di.useEffect)(()=>a.on("reveal",({id:f})=>{o?.reveal(f,Qm(e.current),S9)}),[a,o]),(0,Di.useEffect)(()=>{let f=l.current;if(!f)return;l.current=null;let m=setTimeout(()=>{let x=Qm(e.current),v=f.filter(w=>w!=="root");o?.flash(v,"changed",x,S9),a.send({type:"changes",ids:v})},120);return()=>clearTimeout(m)},[s,o,a]);let u=(0,Di.useCallback)(f=>{if(f.type==="open_url"){let v=f.params?.url;typeof v=="string"&&/^(https?:|mailto:)/i.test(v)&&Rzt(a,v);return}if(f.type!=="continue_conversation")return;let m={kind:"action",message:f.humanFriendlyMessage||"(button)"},x=Tzt(f.formState);if(x&&(m.form=x),f.params?.context!==void 0&&(m.context=f.params.context),a.connected)a.send({type:"action",item:m}),SX("Queued for the agent \u2014 press Send when ready");else{let v=uOa(m);navigator.clipboard?.writeText(v).then(()=>SX("Copied \u2014 paste it to your agent"),()=>SX(v))}},[a]),d=(0,Di.useCallback)(f=>{a.send({type:"errors",errors:(f||[]).map(m=>({source:m.source,code:m.code,statementId:m.statementId,message:m.message,hint:m.hint}))})},[a]),p=(0,Di.useCallback)(f=>a.send({type:"state",state:f}),[a]);return(0,vv.jsx)(pre,{mode:"dark",children:(0,vv.jsx)("main",{className:"austere-page",children:(0,vv.jsx)(y2,{response:s,library:n.library,isStreaming:!1,onAction:u,onError:d,onStateUpdate:p,initialState:r})})})}function Azt(){sOa();let t=document.querySelector(iOa)?.textContent??"",a=document.createElement("div");a.id="austere-root",document.body.appendChild(a);let o=cOa(),r={current:t},n=null,i=null,s=Ezt(t),l=f=>i||(i=s.then(m=>(0,Nzt.createRoot)(a).render((0,vv.jsx)(fOa,{programRef:r,initialLibrary:m,bridge:o,annotator:n,initialState:f}))));if(!o.framed){l(void 0);return}let u={program:null,map:new Map},p=xzt({post:f=>o.send(f),lookup:()=>(u.program!==r.current&&(u={program:r.current,map:Qm(r.current)}),[u.map,S9])});n=p,o.on("highlight",({ids:f,scroll:m})=>{p.highlight(Array.isArray(f)?f.filter(x=>typeof x=="string"):[],!!m)}),o.on("presence",({marks:f})=>{let m=x=>{let v=x;return!!v&&typeof v.statement=="string"&&typeof v.name=="string"&&typeof v.colour=="string"&&/^#[0-9a-f]{6}$/i.test(v.colour)};p.focus(Array.isArray(f)?f.filter(m).slice(0,50):[])}),document.addEventListener("click",f=>{if(f.defaultPrevented||f.button!==0)return;let m=f.target instanceof Element?f.target.closest("a[href]"):null;if(!(m instanceof HTMLAnchorElement)||!/^(https?|mailto):/i.test(m.href)||m.protocol===location.protocol&&m.host===location.host)return;let x=(m.getAttribute("target")||"").toLowerCase();!x||x==="_self"||(f.preventDefault(),Rzt(o,m.href))}),GQ(f=>o.send({type:"runtime-error",error:f})),o.on("init",async f=>{if(o.connected=!0,p.setMode(f.mode),await l(f.state||void 0),f.scrollY>0){let m=0,x=()=>{window.scrollTo(0,f.scrollY),Math.abs(window.scrollY-f.scrollY)>2&&++m<20&&setTimeout(x,50)};setTimeout(x,30)}o.send({type:"ready",title:document.title,version:IX})}),o.on("mode",f=>p.setMode(f.mode)),window.addEventListener("scroll",()=>o.send({type:"scroll",y:window.scrollY}),{passive:!0}),o.send({type:"hello",title:document.title,version:IX}),setTimeout(()=>l(void 0),600)}window.__austere={version:IX,library:hv,packs:hl};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Azt,{once:!0}):setTimeout(Azt,0);})();
|
|
1659
1659
|
}
|
package/dist/catalog.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"format":1,"pack":"core","version":"0.9.0","groups":[{"name":"Layout","notes":["- A page is root = Stack([...sections], \"column\", \"l\"). Each section is a Card([CardHeader(title, subtitle), ...content]).","- Side by side: Stack([a, b], \"row\", \"m\", \"stretch\", \"start\", true). Cards in a row share the width.","- Tabs for alternative views, Accordion for detail the reader may skip, Steps for ordered procedures. Several blocks in one Card: label each with InlineHeader.","- Card children must match its list; anything else (Accordion, Tag, a Callout row) can sit in a Stack inside the Card, or directly in root's Stack."]},{"name":"Content","notes":["- MarkDownRenderer for prose, bullet lists and inline code; one statement per paragraph group so each is annotatable.","- Callout for the one thing the reader must not miss: a risk, a decision needed, a caveat.","- CodeBlock for a whole snippet. Image src may be a path relative to the artifact file.","- Architecture for systems: services, stores, queues, trust boundaries. Name every Node, Edge and Group. Over ~15 nodes, use lanes or split the diagram.","- lanes: for systems split by owner, repo or tier. Groups are the columns, left to right as listed; put every node in one, in reading order (plain groups for a heading without a frame). About 4 columns fit a laptop; wider ones scroll (check warns). Phones get the lanes stacked as bands. Pin row only to put boxes side by side or line them up.","- Diff for code changes: show the hunks that matter, not whole files. Hunk counts are recomputed, so only start lines matter."]},{"name":"Data","notes":["- Table is COLUMN-oriented: Table([Col(\"Option\", names), Col(\"Effort\", efforts), Col(\"Risk\", risks)]). Col data may mix strings and components, e.g. [\"n/a\", Tag(\"high\", null, \"sm\", \"danger\")]. Cells are plain text (no markdown) and wrap; Col type \"number\" for figures.","- EntityList for key/value facts; OverviewCardBlock + OverviewCardItem + MetricIndicatorInline for a KPI row.","- EditableTable when the reviewer should correct or fill in values; edits arrive with the next @ToAssistant from its Form.","- Icon names are lucide kebab-case (circle-check, triangle-alert, git-branch)."]},{"name":"Charts","notes":["- Charts take column arrays: BarChart(labels, [Series(\"p50\", [..]), Series(\"p99\", [..])], \"grouped\", \"Week\", \"ms\").","- PieChart(labels, values) with plain number arrays."]},{"name":"Forms","notes":["- Form(name, buttons, fields). Define each FormControl as its own statement. Never nest a Form in a Form.","- To ask the reviewer to decide: OptionCards or RadioGroup inside a Form whose button is Button(\"Send decision\", @ToAssistant(\"Decision: rollout strategy\"), \"primary\"). The values arrive with that message as form: {<formName>: {<fieldName>: value}}; no context needed. Reviewers can always annotate and message, so add a notes field only when it belongs with the decision.","- OptionCards(\"pick\", \"single\", [OptionCard(\"a\", \"Option A\", \"why\", Icon(\"zap\")), OptionCard(\"b\", \"Option B\")], {required: true}, \"a\") — the last argument pre-selects.","- rules: {required: true, minLength: 10, ...}; the renderer shows the messages."]},{"name":"Buttons","notes":["- @ToAssistant(message, context?) queues a message to the agent; @OpenUrl(url) opens a link. A Button with no action sends its label.","- Use buttons for follow-ups the reviewer can pick in one click: \"Go with option B\", \"Split this into two PRs\"."]}],"components":[{"name":"Card","group":"Layout","signature":"Card(children: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Tabs | Stack | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[], variant?: \"card\" | \"sunk\" | \"clear\", direction?: \"row\" | \"column\", gap?: \"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"2xl\", align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\", justify?: \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\", wrap?: boolean)","description":"Styled container. variant: \"card\" (default, elevated) | \"sunk\" (recessed) | \"clear\" (transparent). Always full width. Accepts all Stack flex params (default: direction \"column\"). Cards flex to share space in row/wrap layouts.","tier":"core","pack":"core","examples":[]},{"name":"CardHeader","group":"Layout","signature":"CardHeader(title?: string, subtitle?: string)","description":"Header with optional title and subtitle","tier":"core","pack":"core","examples":[]},{"name":"TextContent","group":"Content","signature":"TextContent(text: string, size?: \"small\" | \"default\" | \"large\" | \"small-heavy\" | \"large-heavy\")","description":"Text block. Supports markdown. Optional size: \"small\" | \"default\" | \"large\" | \"small-heavy\" | \"large-heavy\".","tier":"core","pack":"core","examples":[]},{"name":"MarkDownRenderer","group":"Content","signature":"MarkDownRenderer(textMarkdown: string, variant?: \"clear\" | \"card\" | \"sunk\")","description":"Renders markdown text with optional container variant","tier":"core","pack":"core","examples":[]},{"name":"Callout","group":"Content","signature":"Callout(variant: \"info\" | \"warning\" | \"error\" | \"success\" | \"neutral\", title: string, description: string, visible?: $binding<boolean>)","description":"Callout banner. Optional visible is a reactive $boolean — auto-dismisses after 3s by setting $visible to false.","tier":"core","pack":"core","examples":[]},{"name":"Image","group":"Content","signature":"Image(alt: string, src?: string)","description":"Image with alt text and optional URL","tier":"core","pack":"core","examples":[]},{"name":"CodeBlock","group":"Content","signature":"CodeBlock(language: string, codeString: string)","description":"Syntax-highlighted code block","tier":"core","pack":"core","examples":[]},{"name":"InlineHeader","group":"Layout","signature":"InlineHeader(heading: string, description?: string)","description":"Compact section heading with an optional one-line description, for use inside cards.","tier":"core","pack":"core","examples":[]},{"name":"Table","group":"Data","signature":"Table(columns: Col[])","description":"Data table — column-oriented. Each Col holds its own data array.","tier":"core","pack":"core","examples":[]},{"name":"Col","group":"Data","signature":"Col(label: string, data: any, type?: \"string\" | \"number\" | \"action\")","description":"Column definition — holds label + data array","tier":"core","pack":"core","examples":[]},{"name":"EditableTable","group":"Data","signature":"EditableTable(name?: string, columns?: {type: \"text\" | \"number\" | \"date-single\" | \"select\" | \"url\", key?: string, header?: string, width?: number, options?: {value: string, label: string}[]}[], data?: {id: string, values: (string | number)[]}[])","description":"Spreadsheet-like table whose cells the user can edit inline (text, number, url, date, select columns); edits are saved back as a form field","tier":"extended","pack":"core","examples":[]},{"name":"BarChart","group":"Charts","signature":"BarChart(labels: string[], series: Series[], variant?: \"grouped\" | \"stacked\", xLabel?: string, yLabel?: string, height?: number)","description":"Vertical bars; use for comparing values across categories with one or more series","tier":"core","pack":"core","examples":[]},{"name":"LineChart","group":"Charts","signature":"LineChart(labels: string[], series: Series[], variant?: \"linear\" | \"natural\" | \"step\", xLabel?: string, yLabel?: string, height?: number)","description":"Lines over categories; use for trends and continuous data over time","tier":"core","pack":"core","examples":[]},{"name":"AreaChart","group":"Charts","signature":"AreaChart(labels: string[], series: Series[], variant?: \"linear\" | \"natural\" | \"step\", xLabel?: string, yLabel?: string, height?: number)","description":"Filled area under lines; use for cumulative totals or volume trends over time","tier":"extended","pack":"core","examples":[]},{"name":"HorizontalBarChart","group":"Charts","signature":"HorizontalBarChart(labels: string[], series: Series[], variant?: \"grouped\" | \"stacked\", xLabel?: string, yLabel?: string)","description":"Horizontal bars; prefer when category labels are long or for ranked lists","tier":"extended","pack":"core","examples":[]},{"name":"Series","group":"Charts","signature":"Series(category: string, values: number[])","description":"One data series","tier":"core","pack":"core","examples":[]},{"name":"PieChart","group":"Charts","signature":"PieChart(labels: string[], values: number[], variant?: \"pie\" | \"donut\", appearance?: \"circular\" | \"semiCircular\")","description":"Circular slices; use plucked arrays: PieChart(data.categories, data.values)","tier":"core","pack":"core","examples":[]},{"name":"ScatterChart","group":"Charts","signature":"ScatterChart(datasets: ScatterSeries[], xLabel?: string, yLabel?: string)","description":"X/Y scatter plot; use for correlations, distributions, and clustering","tier":"extended","pack":"core","examples":[]},{"name":"ScatterSeries","group":"Charts","signature":"ScatterSeries(name: string, points: Point[])","description":"Named dataset","tier":"extended","pack":"core","examples":[]},{"name":"Point","group":"Charts","signature":"Point(x: number, y: number, z?: number)","description":"Data point with numeric coordinates","tier":"extended","pack":"core","examples":[]},{"name":"Form","group":"Forms","signature":"Form(name: string, buttons: Buttons, fields?: FormControl[])","description":"Form container with fields and explicit action buttons","tier":"core","pack":"core","examples":[]},{"name":"FormControl","group":"Forms","signature":"FormControl(label: string, input: Input | TextArea | Select | Slider | CheckBoxGroup | RadioGroup | Chips | OptionCards, hint?: string)","description":"Field with label, input component, and optional hint text","tier":"core","pack":"core","examples":[]},{"name":"Label","group":"Forms","signature":"Label(text: string)","description":"Text label","tier":"extended","pack":"core","examples":[]},{"name":"Input","group":"Forms","signature":"Input(name: string, placeholder?: string, type?: \"text\" | \"email\" | \"password\" | \"number\" | \"url\", rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"TextArea","group":"Forms","signature":"TextArea(name: string, placeholder?: string, rows?: number, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"Select","group":"Forms","signature":"Select(name: string, items: SelectItem[], placeholder?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>, size?: \"small\" | \"medium\" | \"large\")","description":"","tier":"core","pack":"core","examples":[]},{"name":"SelectItem","group":"Forms","signature":"SelectItem(value: string, label: string)","description":"Option for Select","tier":"core","pack":"core","examples":[]},{"name":"Slider","group":"Forms","signature":"Slider(name: string, variant: \"continuous\" | \"discrete\", min: number, max: number, step?: number, defaultValue?: number[], label?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<number[]>)","description":"Numeric slider input; supports continuous and discrete (stepped) variants","tier":"extended","pack":"core","examples":[]},{"name":"CheckBoxGroup","group":"Forms","signature":"CheckBoxGroup(name: string, items: CheckBoxItem[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<Record<string, boolean>>)","description":"","tier":"extended","pack":"core","examples":[]},{"name":"CheckBoxItem","group":"Forms","signature":"CheckBoxItem(label: string, description: string, name: string, defaultChecked?: boolean)","description":"","tier":"extended","pack":"core","examples":[]},{"name":"RadioGroup","group":"Forms","signature":"RadioGroup(name: string, items: RadioItem[], defaultValue?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"RadioItem","group":"Forms","signature":"RadioItem(label: string, description: string, value: string)","description":"","tier":"core","pack":"core","examples":[]},{"name":"SwitchGroup","group":"Forms","signature":"SwitchGroup(name: string, items: SwitchItem[], variant?: \"clear\" | \"card\" | \"sunk\", value?: $binding<Record<string, boolean>>)","description":"Group of switch toggles","tier":"extended","pack":"core","examples":[]},{"name":"SwitchItem","group":"Forms","signature":"SwitchItem(label?: string, description?: string, name: string, defaultChecked?: boolean)","description":"Individual switch toggle","tier":"extended","pack":"core","examples":[]},{"name":"ChipItem","group":"Forms","signature":"ChipItem(value: string, label: string, icon?: Icon, disabled?: boolean)","description":"A single selectable chip inside a Chips group, with a value, label and optional icon.","tier":"extended","pack":"core","examples":[]},{"name":"Chips","group":"Forms","signature":"Chips(name: string, type?: \"single\" | \"multiple\", items?: ChipItem[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, defaultValue?: string | string[])","description":"A form field of compact selectable chips for choosing one or many short options; the selection is stored under `name`.","tier":"extended","pack":"core","examples":[]},{"name":"OptionCard","group":"Forms","signature":"OptionCard(value: string, title: string, subtitle?: string, topContent?: Icon | Image, disabled?: boolean)","description":"A single selectable card inside an OptionCards group, with a value, title, optional subtitle and an optional Icon or Image on top.","tier":"core","pack":"core","examples":[]},{"name":"OptionCards","group":"Forms","signature":"OptionCards(name: string, type?: \"single\" | \"multiple\", items?: OptionCard[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, defaultValue?: string | string[])","description":"A form field of selectable cards (title, optional subtitle, optional icon or image) laid out in a responsive grid for choosing one or many options; the selection is stored under `name`.","tier":"core","pack":"core","examples":[]},{"name":"Button","group":"Buttons","signature":"Button(label: string, action?: ActionExpression, variant?: \"primary\" | \"secondary\" | \"tertiary\", type?: \"normal\" | \"destructive\", size?: \"extra-small\" | \"small\" | \"medium\" | \"large\")","description":"Clickable button","tier":"core","pack":"core","examples":[]},{"name":"Buttons","group":"Buttons","signature":"Buttons(buttons: Button[], direction?: \"row\" | \"column\")","description":"Group of Button components. direction: \"row\" (default) | \"column\".","tier":"core","pack":"core","examples":[]},{"name":"Stack","group":"Layout","signature":"Stack(children: any[], direction?: \"row\" | \"column\", gap?: \"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"2xl\", align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\", justify?: \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\", wrap?: boolean)","description":"Flex container. direction: \"row\"|\"column\" (default \"column\"). gap: \"none\"|\"xs\"|\"s\"|\"m\"|\"l\"|\"xl\"|\"2xl\" (default \"m\"). align: \"start\"|\"center\"|\"end\"|\"stretch\"|\"baseline\". justify: \"start\"|\"center\"|\"end\"|\"between\"|\"around\"|\"evenly\".","tier":"core","pack":"core","examples":[]},{"name":"Tabs","group":"Layout","signature":"Tabs(items: TabItem[])","description":"Tabbed container","tier":"core","pack":"core","examples":[]},{"name":"TabItem","group":"Layout","signature":"TabItem(value: string, trigger: string, content: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[])","description":"value is unique id, trigger is tab label, content is array of components","tier":"core","pack":"core","examples":[]},{"name":"Accordion","group":"Layout","signature":"Accordion(items: AccordionItem[])","description":"Collapsible sections","tier":"core","pack":"core","examples":[]},{"name":"AccordionItem","group":"Layout","signature":"AccordionItem(value: string, trigger: string, content: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[])","description":"value is unique id, trigger is section title","tier":"core","pack":"core","examples":[]},{"name":"Steps","group":"Layout","signature":"Steps(items: StepsItem[])","description":"Step-by-step guide","tier":"core","pack":"core","examples":[]},{"name":"StepsItem","group":"Layout","signature":"StepsItem(title: string, details: string)","description":"title and details text for one step","tier":"core","pack":"core","examples":[]},{"name":"Separator","group":"Layout","signature":"Separator(orientation?: \"horizontal\" | \"vertical\", decorative?: boolean)","description":"Visual divider between content sections","tier":"core","pack":"core","examples":[]},{"name":"TagBlock","group":"Data","signature":"TagBlock(tags: string[], size?: \"sm\" | \"md\" | \"lg\")","description":"tags is an array of strings; optional size sm | md | lg","tier":"extended","pack":"core","examples":[]},{"name":"Tag","group":"Data","signature":"Tag(text: string, icon?: Icon, size?: \"sm\" | \"md\" | \"lg\", variant?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\")","description":"Styled tag/badge with optional Icon and variant","tier":"core","pack":"core","examples":[]},{"name":"Icon","group":"Data","signature":"Icon(name: string, category?: string)","description":"A lucide icon by kebab-case name (e.g. 'circle-check'). Optional category picks a topical fallback when the name doesn't resolve.","tier":"core","pack":"core","examples":[]},{"name":"EntityList","group":"Data","signature":"EntityList(rows?: {left: string, right: string, rightVariant?: \"text\" | \"number\"}[], size?: \"small\" | \"default\", header?: {left: string, right: string, rightVariant?: \"text\" | \"number\"}, footer?: {left: string, right: string, rightVariant?: \"text\" | \"number\"})","description":"Two-column key/value rows (left label, right value). size 'default' supports optional header and footer rows; rightVariant 'number' uses tabular numbers.","tier":"core","pack":"core","examples":[]},{"name":"Text","group":"Data","signature":"Text(variant?: \"text\" | \"number\", value: string, subtext?: string, subtextVariant?: \"text\" | \"number\" | \"metric\", size?: \"xs\" | \"sm\" | \"md\" | \"lg\")","description":"Plain text line with optional subtext. variant 'number' uses tabular number styling; subtextVariant 'metric' colors a leading +/- subtext green/red.","tier":"core","pack":"core","examples":[]},{"name":"BoldText","group":"Data","signature":"BoldText(variant?: \"text\" | \"number\", value: string, subtext?: string, subtextVariant?: \"text\" | \"number\" | \"metric\", size?: \"xs\" | \"sm\" | \"md\" | \"lg\")","description":"Emphasized (bold) text line with optional subtext. variant 'number' uses tabular number styling; subtextVariant 'metric' colors a leading +/- subtext green/red.","tier":"extended","pack":"core","examples":[]},{"name":"IconText","group":"Data","signature":"IconText(icon: Icon, iconVariant?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"inverted\" | \"filled\" | \"soft\", iconSize?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"sm\" | \"md\" | \"lg\", title: string, subtitle?: string, bold?: boolean, layout?: \"horizontal\" | \"vertical\")","description":"An icon badge with a title and optional subtitle, laid out horizontally or vertically. iconVariant sets the badge color.","tier":"extended","pack":"core","examples":[]},{"name":"MetricIndicatorInline","group":"Data","signature":"MetricIndicatorInline(value: string, subtext?: string, trend?: {direction: \"up\" | \"down\", value: number})","description":"Headline metric value with an optional +/- percentage trend and subtext, all on one line.","tier":"core","pack":"core","examples":[]},{"name":"OverviewCardItem","group":"Data","signature":"OverviewCardItem(id?: string, top: IconText | Text, bottom?: MetricIndicatorInline)","description":"One overview card: a heading slot at the top (IconText, ImageText or Text) and an optional MetricIndicatorInline at the bottom.","tier":"core","pack":"core","examples":[]},{"name":"OverviewCardBlock","group":"Data","signature":"OverviewCardBlock(items: OverviewCardItem[], layout?: \"grid\" | \"carousel\", responsive?: boolean, action?: ActionExpression, gap?: number | string)","description":"A grid or horizontal carousel of compact overview cards, each with a heading (icon/image/text) on top and an inline metric below; optionally clickable with a shared action.","tier":"core","pack":"core","examples":[]},{"name":"Architecture","group":"Content","signature":"Architecture(nodes: Node[], edges: Edge[], groups?: Group[], direction?: \"auto\" | \"right\" | \"down\" | \"lanes\")","description":"System diagram laid out automatically: write no coordinates. Every Node, Edge and Group is its own statement and click target. direction auto (default) runs right when that fits the page legibly, else down; lanes makes each top-level Group a column.","tier":"core","pack":"core","examples":["platformMap = Architecture([browser, edge, api, sessions, cache], [toEdge, toApi, readSessions, readCache], [vpc])\nbrowser = Node(\"Browser\", \"external\")\nedge = Node(\"Edge worker\", \"cloud\", \"Cloudflare\")\napi = Node(\"API\", \"backend\", \"Node :8080\")\nsessions = Node(\"Sessions\", \"database\", \"Postgres\", \"new\")\ncache = Node(\"Redis\", \"database\", \"read-through\")\ntoEdge = Edge(browser, edge, \"HTTPS\", \"emphasis\")\ntoApi = Edge(edge, api)\nreadSessions = Edge(api, sessions, \"SQL\")\nreadCache = Edge(api, cache, \"cache\", \"dashed\")\nvpc = Group(\"Platform VPC\", [api, sessions, cache])","ownership = Architecture([web, ordersApi, ledger, ordersDb, billingJob], [placeOrder, writeOrder, readOrders, postLedger], [clients, ordersRepo, billingRepo], \"lanes\")\nweb = Node(\"Web app\", \"frontend\")\nordersApi = Node(\"Orders API\", \"backend\", \"Node :8080\")\nordersDb = Node(\"orders table\", \"database\", \"Postgres\", null, \"success\")\nbillingJob = Node(\"Nightly billing\", \"backend\", \"cron 02:00\")\nledger = Node(\"Ledger\", \"database\", \"append-only\", null, \"info\")\nplaceOrder = Edge(web, ordersApi, \"POST /orders\")\nwriteOrder = Edge(ordersApi, ordersDb, \"insert\")\nreadOrders = Edge(billingJob, ordersDb, \"read unbilled\", null, \"danger\")\npostLedger = Edge(billingJob, ledger, \"post\")\nclients = Group(\"CLIENTS\", [web], \"plain\")\nordersRepo = Group(\"orders-service\", [ordersApi, ordersDb])\nbillingRepo = Group(\"billing\", [billingJob, ledger])"]},{"name":"Node","group":"Content","signature":"Node(label: string, kind?: \"frontend\" | \"backend\" | \"database\" | \"messagebus\" | \"cloud\" | \"security\" | \"external\", detail?: string, tag?: string, tone?: \"info\" | \"success\" | \"warning\" | \"danger\" | \"strong\", row?: number)","description":"A box in an Architecture. kind sets icon and color (default backend); detail is monospace, up to 2 lines (\\n breaks); tag is a small chip such as \"new\"; tone tints it (danger = risk, strong = where it ends); row pins it to a row (1, 2, ...) in lanes.","tier":"core","pack":"core","examples":[]},{"name":"Edge","group":"Content","signature":"Edge(from: Node, to: Node, label?: string, style?: \"solid\" | \"dashed\" | \"emphasis\" | \"security\", tone?: \"info\" | \"success\" | \"warning\" | \"danger\")","description":"An arrow between two Node statements (pass their names, not strings). style: dashed for async, emphasis for the main path, security for auth or trust flows. tone colors it, e.g. danger for a risky write, success for a read.","tier":"core","pack":"core","examples":[]},{"name":"Group","group":"Content","signature":"Group(label: string, members: Node[], kind?: \"region\" | \"security\" | \"plain\")","description":"A boundary around Node statements (a VPC, a cluster, a trust zone); members still sit where their edges put them. A group whose members are a subset of another's is drawn inside it; kind security draws it red, plain draws only its name.","tier":"core","pack":"core","examples":[]},{"name":"Diff","group":"Content","signature":"Diff(patch: string, title?: string)","description":"Unified diff (git diff output, one or more files) with line numbers. patch is a raw multi-line string. Clicked lines reach the agent as file:+line.","tier":"core","pack":"core","examples":["retryPatch = Diff(\"diff --git a/src/retry.ts b/src/retry.ts\n--- a/src/retry.ts\n+++ b/src/retry.ts\n@@ -10,2 +10,3 @@\n- for (let i = 0; i < 3; i++) {\n+ for (let i = 0; i < MAX_ATTEMPTS; i++) {\n+ if (i > 0) await sleep(backoff(i));\")"]},{"name":"FileTree","group":"Data","signature":"FileTree(entries: string[])","description":"File tree, one path per entry, optionally prefixed with a git status code (A new, M modified, D deleted, R old -> new) and suffixed with \" # note\". Folders are inferred. Clicked files and folders reach the agent by path.","tier":"core","pack":"core","examples":["changedFiles = FileTree([\"M src/session/store.ts # read-through to Postgres\", \"A src/session/pg-store.ts\", \"A migrations/0042_sessions.sql # table + expiry index\", \"R src/session/redis.ts -> src/session/redis-cache.ts\", \"D src/session/legacy.ts\", \"M src/config.ts # SESSIONS_PG flag\"])"]},{"name":"Progress","group":"Data","signature":"Progress(value: number, label?: string, max?: number)","description":"Progress bar. value counts toward max (default 100); label names what is progressing. Shows a percentage.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["migration = Progress(64, \"Rows migrated\")"]},{"name":"Avatar","group":"Data","signature":"Avatar(name: string, src?: string, size?: \"md\" | \"lg\")","description":"Round avatar for a person. Shows the initials of name; src is an optional https image URL.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["owner = Avatar(\"Ada Lovelace\")"]},{"name":"AvatarGroup","group":"Data","signature":"AvatarGroup(avatars: Avatar[], max?: number)","description":"Overlapping Avatars, for reviewers or owners. max (default 4) shows the rest as +N.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["team = AvatarGroup([ada, grace, linus], 2)\nada = Avatar(\"Ada Lovelace\")\ngrace = Avatar(\"Grace Hopper\")\nlinus = Avatar(\"Linus Torvalds\")"]},{"name":"Tooltip","group":"Content","signature":"Tooltip(text: string, tip: string)","description":"Inline text with a short hint on hover or focus (a term and its definition). Keep tip to one line.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["term = Tooltip(\"idempotent\", \"Safe to run twice with the same result.\")"]},{"name":"HoverCard","group":"Content","signature":"HoverCard(text: string, title: string, body?: string)","description":"Inline text that shows a small card (title and a line or two of body) on hover or focus, e.g. a person or a service.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["svc = HoverCard(\"billing-api\", \"billing-api\", \"Owns invoices and refunds. On call: payments team.\")"]},{"name":"Breadcrumb","group":"Content","signature":"Breadcrumb(items: BreadcrumbItem[])","description":"Path trail such as Repo / Package / File, from BreadcrumbItems. Each item is a click target.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["trail = Breadcrumb([repo, pkg, file])\nrepo = BreadcrumbItem(\"austere-axi\")\npkg = BreadcrumbItem(\"packs\")\nfile = BreadcrumbItem(\"shadcn\")"]},{"name":"BreadcrumbItem","group":"Content","signature":"BreadcrumbItem(label: string, href?: string)","description":"One step of a Breadcrumb. href is optional; the last item is the current page.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":[]},{"name":"Kbd","group":"Content","signature":"Kbd(keys: string)","description":"Keyboard shortcut. keys joins keys with \"+\", e.g. \"Ctrl+K\"; each key is drawn as a key cap.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["shortcut = Kbd(\"Ctrl+Shift+P\")"]},{"name":"Skeleton","group":"Content","signature":"Skeleton(lines?: number, shape?: \"lines\" | \"avatar\")","description":"Grey placeholder block for content not yet written or loaded (default 3 lines). shape avatar adds a round head.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["pending = Skeleton(3, \"avatar\")"]},{"name":"Calendar","group":"Data","signature":"Calendar(month: string, highlights?: string[])","description":"Read-only month grid (not a date picker). month is \"YYYY-MM\"; highlights lists \"YYYY-MM-DD\" or \"YYYY-MM-DD label\" entries to mark, e.g. a freeze or a release. Marked days are click targets.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["window = Calendar(\"2026-11\", [\"2026-11-04 Code freeze\", \"2026-11-12 Release\", \"2026-11-13\"])"]},{"name":"Timeline","group":"Content","signature":"Timeline(items: TimelineItem[])","description":"Vertical history or schedule of TimelineItems, oldest first. Each item is a click target.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["history = Timeline([found, fixed, rollout])\nfound = TimelineItem(\"Bug found\", \"Oct 28\", \"Retries double-charge on timeout.\")\nfixed = TimelineItem(\"Fix merged\", \"Oct 29\", \"Idempotency key added.\", \"current\")\nrollout = TimelineItem(\"Rollout\", \"Nov 3\", \"\", \"upcoming\")"]},{"name":"TimelineItem","group":"Content","signature":"TimelineItem(title: string, date?: string, detail?: string, state?: \"done\" | \"current\" | \"upcoming\")","description":"One event in a Timeline. state: done (default), current or upcoming.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":[]}]}
|
|
1
|
+
{"format":1,"pack":"core","version":"0.10.0","groups":[{"name":"Layout","notes":["- A page is root = Stack([...sections], \"column\", \"l\"). Each section is a Card([CardHeader(title, subtitle), ...content]).","- Side by side: Stack([a, b], \"row\", \"m\", \"stretch\", \"start\", true). Cards in a row share the width.","- Tabs for alternative views, Accordion for detail the reader may skip, Steps for ordered procedures. Several blocks in one Card: label each with InlineHeader.","- Card children must match its list; anything else (Accordion, Tag, a Callout row) can sit in a Stack inside the Card, or directly in root's Stack."]},{"name":"Content","notes":["- MarkDownRenderer for prose, bullet lists and inline code; one statement per paragraph group so each is annotatable.","- Callout for the one thing the reader must not miss: a risk, a decision needed, a caveat.","- CodeBlock for a whole snippet. Image src may be a path relative to the artifact file.","- Architecture for systems: services, stores, queues, trust boundaries. Name every Node, Edge and Group. Over ~15 nodes, use lanes or split the diagram.","- lanes: for systems split by owner, repo or tier. Groups are the columns, left to right as listed; put every node in one, in reading order (plain groups for a heading without a frame). About 4 columns fit a laptop; wider ones scroll (check warns). Phones get the lanes stacked as bands. Pin row only to put boxes side by side or line them up.","- Diff for code changes: show the hunks that matter, not whole files. Hunk counts are recomputed, so only start lines matter."]},{"name":"Data","notes":["- Table is COLUMN-oriented: Table([Col(\"Option\", names), Col(\"Effort\", efforts), Col(\"Risk\", risks)]). Col data may mix strings and components, e.g. [\"n/a\", Tag(\"high\", null, \"sm\", \"danger\")]. Cells are plain text (no markdown) and wrap; Col type \"number\" for figures.","- EntityList for key/value facts; OverviewCardBlock + OverviewCardItem + MetricIndicatorInline for a KPI row.","- EditableTable when the reviewer should correct or fill in values; edits arrive with the next @ToAssistant from its Form.","- Icon names are lucide kebab-case (circle-check, triangle-alert, git-branch)."]},{"name":"Charts","notes":["- Charts take column arrays: BarChart(labels, [Series(\"p50\", [..]), Series(\"p99\", [..])], \"grouped\", \"Week\", \"ms\").","- PieChart(labels, values) with plain number arrays."]},{"name":"Forms","notes":["- Form(name, buttons, fields). Define each FormControl as its own statement. Never nest a Form in a Form.","- To ask the reviewer to decide: OptionCards or RadioGroup inside a Form whose button is Button(\"Send decision\", @ToAssistant(\"Decision: rollout strategy\"), \"primary\"). The values arrive with that message as form: {<formName>: {<fieldName>: value}}; no context needed. Reviewers can always annotate and message, so add a notes field only when it belongs with the decision.","- OptionCards(\"pick\", \"single\", [OptionCard(\"a\", \"Option A\", \"why\", Icon(\"zap\")), OptionCard(\"b\", \"Option B\")], {required: true}, \"a\") — the last argument pre-selects.","- rules: {required: true, minLength: 10, ...}; the renderer shows the messages."]},{"name":"Buttons","notes":["- @ToAssistant(message, context?) queues a message to the agent; @OpenUrl(url) opens a link. A Button with no action sends its label.","- Use buttons for follow-ups the reviewer can pick in one click: \"Go with option B\", \"Split this into two PRs\"."]}],"components":[{"name":"Card","group":"Layout","signature":"Card(children: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Tabs | Stack | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[], variant?: \"card\" | \"sunk\" | \"clear\", direction?: \"row\" | \"column\", gap?: \"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"2xl\", align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\", justify?: \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\", wrap?: boolean)","description":"Styled container. variant: \"card\" (default, elevated) | \"sunk\" (recessed) | \"clear\" (transparent). Always full width. Accepts all Stack flex params (default: direction \"column\"). Cards flex to share space in row/wrap layouts.","tier":"core","pack":"core","examples":[]},{"name":"CardHeader","group":"Layout","signature":"CardHeader(title?: string, subtitle?: string)","description":"Header with optional title and subtitle","tier":"core","pack":"core","examples":[]},{"name":"TextContent","group":"Content","signature":"TextContent(text: string, size?: \"small\" | \"default\" | \"large\" | \"small-heavy\" | \"large-heavy\")","description":"Text block. Supports markdown. Optional size: \"small\" | \"default\" | \"large\" | \"small-heavy\" | \"large-heavy\".","tier":"core","pack":"core","examples":[]},{"name":"MarkDownRenderer","group":"Content","signature":"MarkDownRenderer(textMarkdown: string, variant?: \"clear\" | \"card\" | \"sunk\")","description":"Renders markdown text with optional container variant","tier":"core","pack":"core","examples":[]},{"name":"Callout","group":"Content","signature":"Callout(variant: \"info\" | \"warning\" | \"error\" | \"success\" | \"neutral\", title: string, description: string, visible?: $binding<boolean>)","description":"Callout banner. Optional visible is a reactive $boolean — auto-dismisses after 3s by setting $visible to false.","tier":"core","pack":"core","examples":[]},{"name":"Image","group":"Content","signature":"Image(alt: string, src?: string)","description":"Image with alt text and optional URL","tier":"core","pack":"core","examples":[]},{"name":"CodeBlock","group":"Content","signature":"CodeBlock(language: string, codeString: string)","description":"Syntax-highlighted code block","tier":"core","pack":"core","examples":[]},{"name":"InlineHeader","group":"Layout","signature":"InlineHeader(heading: string, description?: string)","description":"Compact section heading with an optional one-line description, for use inside cards.","tier":"core","pack":"core","examples":[]},{"name":"Table","group":"Data","signature":"Table(columns: Col[])","description":"Data table — column-oriented. Each Col holds its own data array.","tier":"core","pack":"core","examples":[]},{"name":"Col","group":"Data","signature":"Col(label: string, data: any, type?: \"string\" | \"number\" | \"action\")","description":"Column definition — holds label + data array","tier":"core","pack":"core","examples":[]},{"name":"EditableTable","group":"Data","signature":"EditableTable(name?: string, columns?: {type: \"text\" | \"number\" | \"date-single\" | \"select\" | \"url\", key?: string, header?: string, width?: number, options?: {value: string, label: string}[]}[], data?: {id: string, values: (string | number)[]}[])","description":"Spreadsheet-like table whose cells the user can edit inline (text, number, url, date, select columns); edits are saved back as a form field","tier":"extended","pack":"core","examples":[]},{"name":"BarChart","group":"Charts","signature":"BarChart(labels: string[], series: Series[], variant?: \"grouped\" | \"stacked\", xLabel?: string, yLabel?: string, height?: number)","description":"Vertical bars; use for comparing values across categories with one or more series","tier":"core","pack":"core","examples":[]},{"name":"LineChart","group":"Charts","signature":"LineChart(labels: string[], series: Series[], variant?: \"linear\" | \"natural\" | \"step\", xLabel?: string, yLabel?: string, height?: number)","description":"Lines over categories; use for trends and continuous data over time","tier":"core","pack":"core","examples":[]},{"name":"AreaChart","group":"Charts","signature":"AreaChart(labels: string[], series: Series[], variant?: \"linear\" | \"natural\" | \"step\", xLabel?: string, yLabel?: string, height?: number)","description":"Filled area under lines; use for cumulative totals or volume trends over time","tier":"extended","pack":"core","examples":[]},{"name":"HorizontalBarChart","group":"Charts","signature":"HorizontalBarChart(labels: string[], series: Series[], variant?: \"grouped\" | \"stacked\", xLabel?: string, yLabel?: string)","description":"Horizontal bars; prefer when category labels are long or for ranked lists","tier":"extended","pack":"core","examples":[]},{"name":"Series","group":"Charts","signature":"Series(category: string, values: number[])","description":"One data series","tier":"core","pack":"core","examples":[]},{"name":"PieChart","group":"Charts","signature":"PieChart(labels: string[], values: number[], variant?: \"pie\" | \"donut\", appearance?: \"circular\" | \"semiCircular\")","description":"Circular slices; use plucked arrays: PieChart(data.categories, data.values)","tier":"core","pack":"core","examples":[]},{"name":"ScatterChart","group":"Charts","signature":"ScatterChart(datasets: ScatterSeries[], xLabel?: string, yLabel?: string)","description":"X/Y scatter plot; use for correlations, distributions, and clustering","tier":"extended","pack":"core","examples":[]},{"name":"ScatterSeries","group":"Charts","signature":"ScatterSeries(name: string, points: Point[])","description":"Named dataset","tier":"extended","pack":"core","examples":[]},{"name":"Point","group":"Charts","signature":"Point(x: number, y: number, z?: number)","description":"Data point with numeric coordinates","tier":"extended","pack":"core","examples":[]},{"name":"Form","group":"Forms","signature":"Form(name: string, buttons: Buttons, fields?: FormControl[])","description":"Form container with fields and explicit action buttons","tier":"core","pack":"core","examples":[]},{"name":"FormControl","group":"Forms","signature":"FormControl(label: string, input: Input | TextArea | Select | Slider | CheckBoxGroup | RadioGroup | Chips | OptionCards, hint?: string)","description":"Field with label, input component, and optional hint text","tier":"core","pack":"core","examples":[]},{"name":"Label","group":"Forms","signature":"Label(text: string)","description":"Text label","tier":"extended","pack":"core","examples":[]},{"name":"Input","group":"Forms","signature":"Input(name: string, placeholder?: string, type?: \"text\" | \"email\" | \"password\" | \"number\" | \"url\", rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"TextArea","group":"Forms","signature":"TextArea(name: string, placeholder?: string, rows?: number, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"Select","group":"Forms","signature":"Select(name: string, items: SelectItem[], placeholder?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>, size?: \"small\" | \"medium\" | \"large\")","description":"","tier":"core","pack":"core","examples":[]},{"name":"SelectItem","group":"Forms","signature":"SelectItem(value: string, label: string)","description":"Option for Select","tier":"core","pack":"core","examples":[]},{"name":"Slider","group":"Forms","signature":"Slider(name: string, variant: \"continuous\" | \"discrete\", min: number, max: number, step?: number, defaultValue?: number[], label?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<number[]>)","description":"Numeric slider input; supports continuous and discrete (stepped) variants","tier":"extended","pack":"core","examples":[]},{"name":"CheckBoxGroup","group":"Forms","signature":"CheckBoxGroup(name: string, items: CheckBoxItem[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<Record<string, boolean>>)","description":"","tier":"extended","pack":"core","examples":[]},{"name":"CheckBoxItem","group":"Forms","signature":"CheckBoxItem(label: string, description: string, name: string, defaultChecked?: boolean)","description":"","tier":"extended","pack":"core","examples":[]},{"name":"RadioGroup","group":"Forms","signature":"RadioGroup(name: string, items: RadioItem[], defaultValue?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"RadioItem","group":"Forms","signature":"RadioItem(label: string, description: string, value: string)","description":"","tier":"core","pack":"core","examples":[]},{"name":"SwitchGroup","group":"Forms","signature":"SwitchGroup(name: string, items: SwitchItem[], variant?: \"clear\" | \"card\" | \"sunk\", value?: $binding<Record<string, boolean>>)","description":"Group of switch toggles","tier":"extended","pack":"core","examples":[]},{"name":"SwitchItem","group":"Forms","signature":"SwitchItem(label?: string, description?: string, name: string, defaultChecked?: boolean)","description":"Individual switch toggle","tier":"extended","pack":"core","examples":[]},{"name":"ChipItem","group":"Forms","signature":"ChipItem(value: string, label: string, icon?: Icon, disabled?: boolean)","description":"A single selectable chip inside a Chips group, with a value, label and optional icon.","tier":"extended","pack":"core","examples":[]},{"name":"Chips","group":"Forms","signature":"Chips(name: string, type?: \"single\" | \"multiple\", items?: ChipItem[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, defaultValue?: string | string[])","description":"A form field of compact selectable chips for choosing one or many short options; the selection is stored under `name`.","tier":"extended","pack":"core","examples":[]},{"name":"OptionCard","group":"Forms","signature":"OptionCard(value: string, title: string, subtitle?: string, topContent?: Icon | Image, disabled?: boolean)","description":"A single selectable card inside an OptionCards group, with a value, title, optional subtitle and an optional Icon or Image on top.","tier":"core","pack":"core","examples":[]},{"name":"OptionCards","group":"Forms","signature":"OptionCards(name: string, type?: \"single\" | \"multiple\", items?: OptionCard[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, defaultValue?: string | string[])","description":"A form field of selectable cards (title, optional subtitle, optional icon or image) laid out in a responsive grid for choosing one or many options; the selection is stored under `name`.","tier":"core","pack":"core","examples":[]},{"name":"Button","group":"Buttons","signature":"Button(label: string, action?: ActionExpression, variant?: \"primary\" | \"secondary\" | \"tertiary\", type?: \"normal\" | \"destructive\", size?: \"extra-small\" | \"small\" | \"medium\" | \"large\")","description":"Clickable button","tier":"core","pack":"core","examples":[]},{"name":"Buttons","group":"Buttons","signature":"Buttons(buttons: Button[], direction?: \"row\" | \"column\")","description":"Group of Button components. direction: \"row\" (default) | \"column\".","tier":"core","pack":"core","examples":[]},{"name":"Stack","group":"Layout","signature":"Stack(children: any[], direction?: \"row\" | \"column\", gap?: \"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"2xl\", align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\", justify?: \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\", wrap?: boolean)","description":"Flex container. direction: \"row\"|\"column\" (default \"column\"). gap: \"none\"|\"xs\"|\"s\"|\"m\"|\"l\"|\"xl\"|\"2xl\" (default \"m\"). align: \"start\"|\"center\"|\"end\"|\"stretch\"|\"baseline\". justify: \"start\"|\"center\"|\"end\"|\"between\"|\"around\"|\"evenly\".","tier":"core","pack":"core","examples":[]},{"name":"Tabs","group":"Layout","signature":"Tabs(items: TabItem[])","description":"Tabbed container","tier":"core","pack":"core","examples":[]},{"name":"TabItem","group":"Layout","signature":"TabItem(value: string, trigger: string, content: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[])","description":"value is unique id, trigger is tab label, content is array of components","tier":"core","pack":"core","examples":[]},{"name":"Accordion","group":"Layout","signature":"Accordion(items: AccordionItem[])","description":"Collapsible sections","tier":"core","pack":"core","examples":[]},{"name":"AccordionItem","group":"Layout","signature":"AccordionItem(value: string, trigger: string, content: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[])","description":"value is unique id, trigger is section title","tier":"core","pack":"core","examples":[]},{"name":"Steps","group":"Layout","signature":"Steps(items: StepsItem[])","description":"Step-by-step guide","tier":"core","pack":"core","examples":[]},{"name":"StepsItem","group":"Layout","signature":"StepsItem(title: string, details: string)","description":"title and details text for one step","tier":"core","pack":"core","examples":[]},{"name":"Separator","group":"Layout","signature":"Separator(orientation?: \"horizontal\" | \"vertical\", decorative?: boolean)","description":"Visual divider between content sections","tier":"core","pack":"core","examples":[]},{"name":"TagBlock","group":"Data","signature":"TagBlock(tags: string[], size?: \"sm\" | \"md\" | \"lg\")","description":"tags is an array of strings; optional size sm | md | lg","tier":"extended","pack":"core","examples":[]},{"name":"Tag","group":"Data","signature":"Tag(text: string, icon?: Icon, size?: \"sm\" | \"md\" | \"lg\", variant?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\")","description":"Styled tag/badge with optional Icon and variant","tier":"core","pack":"core","examples":[]},{"name":"Icon","group":"Data","signature":"Icon(name: string, category?: string)","description":"A lucide icon by kebab-case name (e.g. 'circle-check'). Optional category picks a topical fallback when the name doesn't resolve.","tier":"core","pack":"core","examples":[]},{"name":"EntityList","group":"Data","signature":"EntityList(rows?: {left: string, right: string, rightVariant?: \"text\" | \"number\"}[], size?: \"small\" | \"default\", header?: {left: string, right: string, rightVariant?: \"text\" | \"number\"}, footer?: {left: string, right: string, rightVariant?: \"text\" | \"number\"})","description":"Two-column key/value rows (left label, right value). size 'default' supports optional header and footer rows; rightVariant 'number' uses tabular numbers.","tier":"core","pack":"core","examples":[]},{"name":"Text","group":"Data","signature":"Text(variant?: \"text\" | \"number\", value: string, subtext?: string, subtextVariant?: \"text\" | \"number\" | \"metric\", size?: \"xs\" | \"sm\" | \"md\" | \"lg\")","description":"Plain text line with optional subtext. variant 'number' uses tabular number styling; subtextVariant 'metric' colors a leading +/- subtext green/red.","tier":"core","pack":"core","examples":[]},{"name":"BoldText","group":"Data","signature":"BoldText(variant?: \"text\" | \"number\", value: string, subtext?: string, subtextVariant?: \"text\" | \"number\" | \"metric\", size?: \"xs\" | \"sm\" | \"md\" | \"lg\")","description":"Emphasized (bold) text line with optional subtext. variant 'number' uses tabular number styling; subtextVariant 'metric' colors a leading +/- subtext green/red.","tier":"extended","pack":"core","examples":[]},{"name":"IconText","group":"Data","signature":"IconText(icon: Icon, iconVariant?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"inverted\" | \"filled\" | \"soft\", iconSize?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"sm\" | \"md\" | \"lg\", title: string, subtitle?: string, bold?: boolean, layout?: \"horizontal\" | \"vertical\")","description":"An icon badge with a title and optional subtitle, laid out horizontally or vertically. iconVariant sets the badge color.","tier":"extended","pack":"core","examples":[]},{"name":"MetricIndicatorInline","group":"Data","signature":"MetricIndicatorInline(value: string, subtext?: string, trend?: {direction: \"up\" | \"down\", value: number})","description":"Headline metric value with an optional +/- percentage trend and subtext, all on one line.","tier":"core","pack":"core","examples":[]},{"name":"OverviewCardItem","group":"Data","signature":"OverviewCardItem(id?: string, top: IconText | Text, bottom?: MetricIndicatorInline)","description":"One overview card: a heading slot at the top (IconText, ImageText or Text) and an optional MetricIndicatorInline at the bottom.","tier":"core","pack":"core","examples":[]},{"name":"OverviewCardBlock","group":"Data","signature":"OverviewCardBlock(items: OverviewCardItem[], layout?: \"grid\" | \"carousel\", responsive?: boolean, action?: ActionExpression, gap?: number | string)","description":"A grid or horizontal carousel of compact overview cards, each with a heading (icon/image/text) on top and an inline metric below; optionally clickable with a shared action.","tier":"core","pack":"core","examples":[]},{"name":"Architecture","group":"Content","signature":"Architecture(nodes: Node[], edges: Edge[], groups?: Group[], direction?: \"auto\" | \"right\" | \"down\" | \"lanes\")","description":"System diagram laid out automatically: write no coordinates. Every Node, Edge and Group is its own statement and click target. direction auto (default) runs right when that fits the page legibly, else down; lanes makes each top-level Group a column.","tier":"core","pack":"core","examples":["platformMap = Architecture([browser, edge, api, sessions, cache], [toEdge, toApi, readSessions, readCache], [vpc])\nbrowser = Node(\"Browser\", \"external\")\nedge = Node(\"Edge worker\", \"cloud\", \"Cloudflare\")\napi = Node(\"API\", \"backend\", \"Node :8080\")\nsessions = Node(\"Sessions\", \"database\", \"Postgres\", \"new\")\ncache = Node(\"Redis\", \"database\", \"read-through\")\ntoEdge = Edge(browser, edge, \"HTTPS\", \"emphasis\")\ntoApi = Edge(edge, api)\nreadSessions = Edge(api, sessions, \"SQL\")\nreadCache = Edge(api, cache, \"cache\", \"dashed\")\nvpc = Group(\"Platform VPC\", [api, sessions, cache])","ownership = Architecture([web, ordersApi, ledger, ordersDb, billingJob], [placeOrder, writeOrder, readOrders, postLedger], [clients, ordersRepo, billingRepo], \"lanes\")\nweb = Node(\"Web app\", \"frontend\")\nordersApi = Node(\"Orders API\", \"backend\", \"Node :8080\")\nordersDb = Node(\"orders table\", \"database\", \"Postgres\", null, \"success\")\nbillingJob = Node(\"Nightly billing\", \"backend\", \"cron 02:00\")\nledger = Node(\"Ledger\", \"database\", \"append-only\", null, \"info\")\nplaceOrder = Edge(web, ordersApi, \"POST /orders\")\nwriteOrder = Edge(ordersApi, ordersDb, \"insert\")\nreadOrders = Edge(billingJob, ordersDb, \"read unbilled\", null, \"danger\")\npostLedger = Edge(billingJob, ledger, \"post\")\nclients = Group(\"CLIENTS\", [web], \"plain\")\nordersRepo = Group(\"orders-service\", [ordersApi, ordersDb])\nbillingRepo = Group(\"billing\", [billingJob, ledger])"]},{"name":"Node","group":"Content","signature":"Node(label: string, kind?: \"frontend\" | \"backend\" | \"database\" | \"messagebus\" | \"cloud\" | \"security\" | \"external\", detail?: string, tag?: string, tone?: \"info\" | \"success\" | \"warning\" | \"danger\" | \"strong\", row?: number)","description":"A box in an Architecture. kind sets icon and color (default backend); detail is monospace, up to 2 lines (\\n breaks); tag is a small chip such as \"new\"; tone tints it (danger = risk, strong = where it ends); row pins it to a row (1, 2, ...) in lanes.","tier":"core","pack":"core","examples":[]},{"name":"Edge","group":"Content","signature":"Edge(from: Node, to: Node, label?: string, style?: \"solid\" | \"dashed\" | \"emphasis\" | \"security\", tone?: \"info\" | \"success\" | \"warning\" | \"danger\")","description":"An arrow between two Node statements (pass their names, not strings). style: dashed for async, emphasis for the main path, security for auth or trust flows. tone colors it, e.g. danger for a risky write, success for a read.","tier":"core","pack":"core","examples":[]},{"name":"Group","group":"Content","signature":"Group(label: string, members: Node[], kind?: \"region\" | \"security\" | \"plain\")","description":"A boundary around Node statements (a VPC, a cluster, a trust zone); members still sit where their edges put them. A group whose members are a subset of another's is drawn inside it; kind security draws it red, plain draws only its name.","tier":"core","pack":"core","examples":[]},{"name":"Diff","group":"Content","signature":"Diff(patch: string, title?: string)","description":"Unified diff (git diff output, one or more files) with line numbers. patch is a raw multi-line string. Clicked lines reach the agent as file:+line.","tier":"core","pack":"core","examples":["retryPatch = Diff(\"diff --git a/src/retry.ts b/src/retry.ts\n--- a/src/retry.ts\n+++ b/src/retry.ts\n@@ -10,2 +10,3 @@\n- for (let i = 0; i < 3; i++) {\n+ for (let i = 0; i < MAX_ATTEMPTS; i++) {\n+ if (i > 0) await sleep(backoff(i));\")"]},{"name":"FileTree","group":"Data","signature":"FileTree(entries: string[])","description":"File tree, one path per entry, optionally prefixed with a git status code (A new, M modified, D deleted, R old -> new) and suffixed with \" # note\". Folders are inferred. Clicked files and folders reach the agent by path.","tier":"core","pack":"core","examples":["changedFiles = FileTree([\"M src/session/store.ts # read-through to Postgres\", \"A src/session/pg-store.ts\", \"A migrations/0042_sessions.sql # table + expiry index\", \"R src/session/redis.ts -> src/session/redis-cache.ts\", \"D src/session/legacy.ts\", \"M src/config.ts # SESSIONS_PG flag\"])"]},{"name":"Progress","group":"Data","signature":"Progress(value: number, label?: string, max?: number)","description":"Progress bar. value counts toward max (default 100); label names what is progressing. Shows a percentage.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["migration = Progress(64, \"Rows migrated\")"]},{"name":"Avatar","group":"Data","signature":"Avatar(name: string, src?: string, size?: \"md\" | \"lg\")","description":"Round avatar for a person. Shows the initials of name; src is an optional https image URL.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["owner = Avatar(\"Ada Lovelace\")"]},{"name":"AvatarGroup","group":"Data","signature":"AvatarGroup(avatars: Avatar[], max?: number)","description":"Overlapping Avatars, for reviewers or owners. max (default 4) shows the rest as +N.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["team = AvatarGroup([ada, grace, linus], 2)\nada = Avatar(\"Ada Lovelace\")\ngrace = Avatar(\"Grace Hopper\")\nlinus = Avatar(\"Linus Torvalds\")"]},{"name":"Tooltip","group":"Content","signature":"Tooltip(text: string, tip: string)","description":"Inline text with a short hint on hover or focus (a term and its definition). Keep tip to one line.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["term = Tooltip(\"idempotent\", \"Safe to run twice with the same result.\")"]},{"name":"HoverCard","group":"Content","signature":"HoverCard(text: string, title: string, body?: string)","description":"Inline text that shows a small card (title and a line or two of body) on hover or focus, e.g. a person or a service.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["svc = HoverCard(\"billing-api\", \"billing-api\", \"Owns invoices and refunds. On call: payments team.\")"]},{"name":"Breadcrumb","group":"Content","signature":"Breadcrumb(items: BreadcrumbItem[])","description":"Path trail such as Repo / Package / File, from BreadcrumbItems. Each item is a click target.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["trail = Breadcrumb([repo, pkg, file])\nrepo = BreadcrumbItem(\"austere-axi\")\npkg = BreadcrumbItem(\"packs\")\nfile = BreadcrumbItem(\"shadcn\")"]},{"name":"BreadcrumbItem","group":"Content","signature":"BreadcrumbItem(label: string, href?: string)","description":"One step of a Breadcrumb. href is optional; the last item is the current page.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":[]},{"name":"Kbd","group":"Content","signature":"Kbd(keys: string)","description":"Keyboard shortcut. keys joins keys with \"+\", e.g. \"Ctrl+K\"; each key is drawn as a key cap.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["shortcut = Kbd(\"Ctrl+Shift+P\")"]},{"name":"Skeleton","group":"Content","signature":"Skeleton(lines?: number, shape?: \"lines\" | \"avatar\")","description":"Grey placeholder block for content not yet written or loaded (default 3 lines). shape avatar adds a round head.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["pending = Skeleton(3, \"avatar\")"]},{"name":"Calendar","group":"Data","signature":"Calendar(month: string, highlights?: string[])","description":"Read-only month grid (not a date picker). month is \"YYYY-MM\"; highlights lists \"YYYY-MM-DD\" or \"YYYY-MM-DD label\" entries to mark, e.g. a freeze or a release. Marked days are click targets.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["window = Calendar(\"2026-11\", [\"2026-11-04 Code freeze\", \"2026-11-12 Release\", \"2026-11-13\"])"]},{"name":"Timeline","group":"Content","signature":"Timeline(items: TimelineItem[])","description":"Vertical history or schedule of TimelineItems, oldest first. Each item is a click target.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["history = Timeline([found, fixed, rollout])\nfound = TimelineItem(\"Bug found\", \"Oct 28\", \"Retries double-charge on timeout.\")\nfixed = TimelineItem(\"Fix merged\", \"Oct 29\", \"Idempotency key added.\", \"current\")\nrollout = TimelineItem(\"Rollout\", \"Nov 3\", \"\", \"upcoming\")"]},{"name":"TimelineItem","group":"Content","signature":"TimelineItem(title: string, date?: string, detail?: string, state?: \"done\" | \"current\" | \"upcoming\")","description":"One event in a Timeline. state: done (default), current or upcoming.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":[]}]}
|