@hackbuild/agents-views 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -76,7 +76,7 @@ bars.update({ behavior: "fetch", why: "play is high", utilities: { idle: 0.1, fe
76
76
 
77
77
  ### Yard is the whole dog simulator
78
78
 
79
- `mountYard(host, options)` fills `host` with the yard and returns `{ root, ready, dispose }`. It loads nothing on its own: `physics` returns the rapier3d-compat module, `dog` and `human` are binary glTF files (a URL, bytes, a Blob or a function), `anims` is the person's clip pack, `voice` his wav reference, and `hub` a model hub in place of Hugging Face for the cortex models. Pass `bar`, such as your header, and the readout chips, the setup button and the command button go there; without it the two buttons end the verb row. One yard runs per page, since its parts find each other by id, and its stylesheet is scoped to `.hb-yard`. `params` carries the lockstep and seed switches, read from the page hash when you pass neither it nor `reseed`.
79
+ `mountYard(host, options)` fills `host` with the yard and returns `{ root, ready, dispose }`. It loads nothing on its own: `physics` returns the rapier3d-compat module, `dog` and `human` are binary glTF files (a URL, bytes, a Blob or a function), `anims` is the person's clip pack, `voice` his wav reference, and `hub` a model hub in place of Hugging Face for the cortex models. Pass `bar`, such as your header, and the readout chips, the setup button and the command button go there; without it the two buttons float in the stage's top right corner, apart from the verbs. One yard runs per page, since its parts find each other by id, and its stylesheet is scoped to `.hb-yard`. `params` carries the lockstep and seed switches, read from the page hash when you pass neither it nor `reseed`.
80
80
 
81
81
  ```ts
82
82
  import * as RAPIER from "@dimforge/rapier3d-compat";
@@ -10,7 +10,7 @@ import * as HDRIVE from '@hackbuild/drives';
10
10
  import * as HCAM from '@hackbuild/cameras';
11
11
  import * as HWEIGHT from '@hackbuild/weights';
12
12
  import * as HBV from '@virgilvox/hackbuild-ui/vanilla';
13
- export const YARD_CSS = "/*\nYard, the stage and rack of the original yard (hackle), light paper: the dog is the picture; every\npanel is a probe. Stage left (fills), a rack of seven tabs at a fixed 380 px on the right; under\n900 px the rack stacks under a stage of 62 percent of the viewport height and the host scrolls as\none. The hack.build class layer (hackbuild-ui) carries the light VT323 tabs, the light buttons with\none pink (.hb-btn-go), the panels and the 380 px rack token; the host page loads it. The stage\noverlays, the yard hint, the behaviour name, the verb row and the bars are this view's own.\n*/\n.hb-yard{height:100%;min-height:0;font-family:var(--hb-mono,'IBM Plex Mono',monospace);font-size:14px;color:var(--hb-ink)}\n.hb-yard>#work{height:100%}\n\n.hb-yard [hidden],:where(.hb-yard,.hb-yard-bar) .hchips[hidden]{display:none!important}\n.hb-yard,.hb-yard *,.hb-yard *::before,.hb-yard *::after{box-sizing:border-box}\n.hb-yard :is(button,:where(.hb-yard,.hb-yard-bar) input,:where(.hb-yard,.hb-yard-bar) select,:where(.hb-yard,.hb-yard-bar) textarea){font:inherit;color:inherit}\n/* the mark at the original's 26 px; the tagline sits beside it, the readout chips push right */\n:where(.hb-yard,.hb-yard-bar) .hchips{margin-left:auto;display:flex;gap:6px;flex-wrap:nowrap;overflow:hidden;flex:0 1 auto;min-width:0}\n:where(.hb-yard,.hb-yard-bar) .chip{font-family:var(--hb-readout);font-size:17px;line-height:1;padding:4px 7px;border:1.5px solid var(--hb-ink);background:var(--hb-paper);white-space:nowrap;text-transform:uppercase}\n:where(.hb-yard,.hb-yard-bar) .chip.on,:where(.hb-yard,.hb-yard-bar) .chip.is-ok{background:var(--hb-ink);color:var(--hb-paper)}\n:where(.hb-yard,.hb-yard-bar) .chip.is-warn{border-color:var(--hb-warn);color:var(--hb-warn-ink)}\n:where(.hb-yard,.hb-yard-bar) #work{display:grid;grid-template-columns:minmax(0,1fr) var(--hb-rack,380px);min-height:0}\n/* the stage and its overlays, as the original drew them */\n:where(.hb-yard,.hb-yard-bar) #stage{position:relative;overflow:hidden;background:#eef2ef;outline:none;container-type:inline-size}\n:where(.hb-yard,.hb-yard-bar) #stage:focus-visible{box-shadow:inset 0 0 0 3px var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) #stage canvas.gl{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}\n:where(.hb-yard,.hb-yard-bar) #load{position:absolute;inset:0;display:grid;place-items:center;background:var(--hb-paper);z-index:9;text-align:center}\n:where(.hb-yard,.hb-yard-bar) #load .big{font-size:34px}\n:where(.hb-yard,.hb-yard-bar) #load .big b{color:var(--hb-pink);font-weight:400}\n:where(.hb-yard,.hb-yard-bar) #load.is-err .note{color:var(--hb-err)}\n:where(.hb-yard,.hb-yard-bar) #eyecard{position:absolute;left:12px;top:12px;width:min(320px,46%);background:var(--hb-paper-raised);border:1.5px solid var(--hb-ink);box-shadow:4px 4px 0 var(--hb-ink);z-index:5}\n:where(.hb-yard,.hb-yard-bar) .bh{background:var(--hb-ink);color:var(--hb-paper);font-family:var(--hb-readout);font-size:19px;display:flex;justify-content:space-between;gap:8px}\n:where(.hb-yard,.hb-yard-bar) #eyecard .bh{font-size:17px;align-items:center;padding:0 0 0 9px}\n:where(.hb-yard,.hb-yard-bar) .eyewho{display:flex;gap:2px;flex:none}\n:where(.hb-yard,.hb-yard-bar) .eyewho button,:where(.hb-yard,.hb-yard-bar) #eyeFold{white-space:nowrap;font:inherit;font-size:15px;background:none;border:0;color:inherit;opacity:.55;padding:0 6px 0 0;cursor:pointer;min-height:28px;text-transform:uppercase}\n:where(.hb-yard,.hb-yard-bar) .eyewho button.on{opacity:1;text-decoration:underline;text-underline-offset:3px}\n:where(.hb-yard,.hb-yard-bar) #eyeFold{opacity:1;padding:0 9px;margin-left:auto}\n:where(.hb-yard,.hb-yard-bar) .eyewho button:focus-visible,:where(.hb-yard,.hb-yard-bar) #eyeFold:focus-visible{outline:2px solid var(--hb-pink);outline-offset:-2px}\n:where(.hb-yard,.hb-yard-bar) #eyeMode{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;font-size:14px;color:#ffd1e8}\n:where(.hb-yard,.hb-yard-bar) #eyewrap{position:relative;aspect-ratio:2/1}\n:where(.hb-yard,.hb-yard-bar) #eyewrap canvas{position:absolute;inset:0;width:100%;height:100%}\n:where(.hb-yard,.hb-yard-bar) #eyecard.is-folded #eyewrap{display:none}\n:where(.hb-yard,.hb-yard-bar) #eyeSal{pointer-events:none}\n:where(.hb-yard,.hb-yard-bar) #tool{position:absolute;left:12px;right:12px;bottom:12px;display:flex;gap:6px;flex-wrap:wrap;align-items:flex-end;pointer-events:none;z-index:7}\n:where(.hb-yard,.hb-yard-bar) #tool>*{pointer-events:auto}\n:where(.hb-yard,.hb-yard-bar) #tool .hb-btn svg{width:16px;height:16px;flex:none}\n:where(.hb-yard,.hb-yard-bar) #camLab,:where(.hb-yard,.hb-yard-bar) #micLab{display:inline-block}\n:where(.hb-yard,.hb-yard-bar) #camLab::first-letter,:where(.hb-yard,.hb-yard-bar) #micLab::first-letter{text-transform:uppercase}\n:where(.hb-yard,.hb-yard-bar) #bubble{position:absolute;pointer-events:none;transform:translate(-50%,-100%);background:var(--hb-paper-raised);border:1.5px solid var(--hb-ink);padding:4px 9px;font-family:var(--hb-note);font-size:14px;white-space:nowrap;box-shadow:3px 3px 0 var(--hb-ink);max-width:260px;overflow:hidden;text-overflow:ellipsis;z-index:6}\n:where(.hb-yard,.hb-yard-bar) #bubble:after{content:\"\";position:absolute;left:50%;bottom:-8px;width:10px;height:10px;background:var(--hb-paper-raised);border-right:1.5px solid var(--hb-ink);border-bottom:1.5px solid var(--hb-ink);transform:translateX(-50%) rotate(45deg)}\n:where(.hb-yard,.hb-yard-bar) #hbubble{position:absolute;pointer-events:none;transform:translate(-50%,-100%);background:#fff;border:1.5px solid var(--hb-pink);color:var(--hb-ink);padding:4px 9px;font-family:var(--hb-note);font-size:14px;max-width:280px;box-shadow:3px 3px 0 var(--hb-pink);white-space:normal;text-align:center;z-index:6}\n:where(.hb-yard,.hb-yard-bar) #hint{position:absolute;right:12px;top:12px;font-family:var(--hb-note);font-size:12.5px;line-height:1.4;background:rgba(255,253,247,.88);border:1px solid var(--hb-paper-edge);padding:5px 8px;max-width:280px;color:var(--hb-ink-2);z-index:5}\n:where(.hb-yard,.hb-yard-bar) #toast{position:absolute;left:50%;top:14px;transform:translateX(-50%);background:var(--hb-ink);color:var(--hb-paper);padding:6px 12px;font-family:var(--hb-readout);font-size:19px;opacity:0;transition:opacity .25s;pointer-events:none;z-index:8;white-space:nowrap;max-width:calc(100% - 24px);overflow:hidden;text-overflow:ellipsis}\n:where(.hb-yard,.hb-yard-bar) #toast.is-on{opacity:1}\n:where(.hb-yard,.hb-yard-bar) #drop{position:absolute;inset:0;border:4px dashed var(--hb-pink);display:none;place-items:center;background:rgba(245,240,230,.7);z-index:8;font-family:var(--hb-display);font-size:30px}\n:where(.hb-yard,.hb-yard-bar) #drop.is-over{display:grid}\n:where(.hb-yard,.hb-yard-bar) #padRow{position:absolute;right:12px;bottom:110px;z-index:6}\n/* the rack */\n:where(.hb-yard,.hb-yard-bar) #side{border-left:2px solid var(--hb-ink);background:var(--hb-paper);display:flex;flex-direction:column;min-height:0;min-width:0}\n/* seven tabs share the 380 px rack evenly, in caps as the original */\n:where(.hb-yard,.hb-yard-bar) #side>.hb-tabs{flex:none;border-bottom-width:2px;overflow:hidden}\n:where(.hb-yard,.hb-yard-bar) #side>.hb-tabs>.hb-tab{flex:1 1 0;min-width:0;padding:10px 0;text-transform:uppercase;text-align:center;min-height:44px}\n:where(.hb-yard,.hb-yard-bar) #panes{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}\n:where(.hb-yard,.hb-yard-bar) .pane{display:none;padding:12px 12px max(12px,env(safe-area-inset-bottom))}\n:where(.hb-yard,.hb-yard-bar) .pane.on{display:block}\n:where(.hb-yard,.hb-yard-bar) .pane:focus{outline:none}\n/* blocks: the original's raised card with an ink head */\n:where(.hb-yard,.hb-yard-bar) .pane>.hb-panel{margin:0 4px 16px 0;padding:9px 10px;box-shadow:4px 4px 0 var(--hb-ink);border-width:1.5px}\n:where(.hb-yard,.hb-yard-bar) .hb .pane h3.hb-panel-hd-inst{text-transform:uppercase;display:flex;justify-content:space-between;gap:8px;font-size:19px;letter-spacing:0;margin:-9px -10px 9px;padding:3px 9px}\n:where(.hb-yard,.hb-yard-bar) .hb .pane h3.hb-panel-hd-inst .hb-hd-aux{color:#ffd1e8;text-transform:none;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}\n/* the original's compact buttons: 7 px by 10 px, 3 px shadow; a pressed toggle fills ink */\n:where(.hb-yard,.hb-yard-bar) .pane .hb-btn,:where(.hb-yard,.hb-yard-bar) #tool .hb-btn{padding:7px 10px;gap:6px;box-shadow:3px 3px 0 var(--hb-ink);font-size:13px;text-transform:none;letter-spacing:0}\n:where(.hb-yard,.hb-yard-bar) .hb-btn[aria-pressed=\"true\"]{background:var(--hb-ink);color:var(--hb-paper)}\n:where(.hb-yard,.hb-yard-bar) .big{font-family:var(--hb-display);font-size:28px;line-height:1.05;margin:0}\n:where(.hb-yard,.hb-yard-bar) .note{font-family:var(--hb-note);font-size:13px;line-height:1.4;color:var(--hb-ink-3);margin:6px 0 0}\n:where(.hb-yard,.hb-yard-bar) .note:first-child{margin-top:0}\n:where(.hb-yard,.hb-yard-bar) .sub{font-size:12px;line-height:1.45;color:var(--hb-ink-2);margin:4px 0 0;overflow-wrap:anywhere}\n:where(.hb-yard,.hb-yard-bar) .sub:empty,:where(.hb-yard,.hb-yard-bar) .note:empty{display:none}\n:where(.hb-yard,.hb-yard-bar) .row{display:grid;grid-template-columns:84px minmax(0,1fr) 42px;align-items:center;gap:8px;margin:4px 0;font-size:12.5px}\n:where(.hb-yard,.hb-yard-bar) .row .lab{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n:where(.hb-yard,.hb-yard-bar) .row .v{font-family:var(--hb-readout);font-size:16px;text-align:right}\n:where(.hb-yard,.hb-yard-bar) .row.cur .lab{color:var(--hb-pink);font-weight:600}\n:where(.hb-yard,.hb-yard-bar) .row.one{grid-template-columns:84px minmax(0,1fr)}\n:where(.hb-yard,.hb-yard-bar) .bar{height:11px;background:var(--hb-paper-sunk);border:1px solid var(--hb-ink);position:relative}\n:where(.hb-yard,.hb-yard-bar) .bar i{position:absolute;left:0;top:0;bottom:0;background:var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .bar.p i,:where(.hb-yard,.hb-yard-bar) .row.cur .bar i{background:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .btns{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:6px}\n:where(.hb-yard,.hb-yard-bar) .tog,:where(.hb-yard,.hb-yard-bar) .hb-check{display:flex;align-items:center;gap:8px;margin:5px 0;font-size:13px;line-height:1.35;cursor:pointer}\n:where(.hb-yard,.hb-yard-bar) .tog input,:where(.hb-yard,.hb-yard-bar) .hb-check input{flex:none;width:18px;height:18px;accent-color:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .hb-check.is-disabled{cursor:not-allowed;opacity:.6}\n:where(.hb-yard,.hb-yard-bar) .reason{font-family:var(--hb-note);font-size:12.5px;line-height:1.4;color:var(--hb-warn-ink,#8a5300);margin:4px 0 0}\n:where(.hb-yard,.hb-yard-bar) .reason:empty{display:none}\n:where(.hb-yard,.hb-yard-bar) .licence{font-family:var(--hb-note);font-size:12.5px;line-height:1.4;color:var(--hb-ink-2);margin:6px 0 0;padding:4px 6px;border-left:3px solid var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .linkbtn{background:none;border:0;padding:0;font:inherit;color:var(--hb-ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer}\n:where(.hb-yard,.hb-yard-bar) .kv{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;font-size:12.5px;margin-top:6px}\n:where(.hb-yard,.hb-yard-bar) .kv b{font-weight:400;color:var(--hb-ink-3)}\n:where(.hb-yard,.hb-yard-bar) .kv span{font-family:var(--hb-readout);font-size:17px;line-height:1.1;overflow-wrap:anywhere}\n:where(.hb-yard,.hb-yard-bar) .hb-kv{font-size:12.5px;color:var(--hb-ink-3);padding:2px 0}\n:where(.hb-yard,.hb-yard-bar) .hb-kv>span:last-child{font-family:var(--hb-readout);font-size:17px;line-height:1.1;color:var(--hb-ink);text-align:right;overflow-wrap:anywhere;min-width:0}\n:where(.hb-yard,.hb-yard-bar) canvas.inst{width:100%;height:auto;display:block;background:var(--hb-paper);border:1px solid var(--hb-paper-edge)}\n:where(.hb-yard,.hb-yard-bar) .heard,:where(.hb-yard,.hb-yard-bar) .hb-heard{font-family:var(--hb-readout);font-size:19px;line-height:1.2;min-height:24px;padding:3px 6px;background:var(--hb-paper-sunk);border:1px solid var(--hb-paper-edge);margin-top:6px;white-space:pre-wrap;overflow-wrap:anywhere}\n:where(.hb-yard,.hb-yard-bar) .hb-heard:empty::before{content:attr(data-empty);color:var(--hb-ink-3)}\n:where(.hb-yard,.hb-yard-bar) .field{display:grid;grid-template-columns:84px minmax(0,1fr);align-items:center;gap:8px;margin:6px 0 0;font-size:12.5px}\n:where(.hb-yard,.hb-yard-bar) .field .hb-input,:where(.hb-yard,.hb-yard-bar) .field .hb-select,:where(.hb-yard,.hb-yard-bar) .field select,:where(.hb-yard,.hb-yard-bar) .field input{width:100%;border:1.5px solid var(--hb-ink);background:var(--hb-paper-raised);padding:6px 8px;font-size:16px;min-height:38px}\n:where(.hb-yard,.hb-yard-bar) .field input:disabled{opacity:.55}\n:where(.hb-yard,.hb-yard-bar) input[type=range]{width:100%;accent-color:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .lst{font-size:12.5px;display:grid;gap:2px}\n:where(.hb-yard,.hb-yard-bar) .lst>div{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}\n:where(.hb-yard,.hb-yard-bar) .lst .vis{color:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .lines{margin:0;padding:0;list-style:none;font-size:12px;line-height:1.5}\n:where(.hb-yard,.hb-yard-bar) .lines>li{padding:3px 0;border-bottom:1px dashed rgba(26,26,26,.15);overflow-wrap:anywhere}\n:where(.hb-yard,.hb-yard-bar) .lines>li:last-child{border-bottom:0}\n:where(.hb-yard,.hb-yard-bar) .lines .k{display:inline-block;min-width:4.5em;color:var(--hb-ink-3)}\n:where(.hb-yard,.hb-yard-bar) .chiprow,:where(.hb-yard,.hb-yard-bar) .pane .chips{display:flex;flex-wrap:wrap;gap:6px}\n:where(.hb-yard,.hb-yard-bar) .chiprow .hb-chip,:where(.hb-yard,.hb-yard-bar) .pane .chips .hb-chip{box-shadow:none;text-transform:none;letter-spacing:0;font-size:13px;min-height:38px;padding:4px 10px}\n:where(.hb-yard,.hb-yard-bar) .rangerow{display:grid;grid-template-columns:150px minmax(0,1fr) 46px;align-items:center;gap:8px;margin:4px 0;font-size:12px}\n:where(.hb-yard,.hb-yard-bar) .rangerow output{font-family:var(--hb-readout);font-size:16px;text-align:right}\n/* the associations table, cues by acts, as in the original */\n:where(.hb-yard,.hb-yard-bar) table.heat{border-collapse:collapse;font-size:11px;width:100%}\n:where(.hb-yard,.hb-yard-bar) table.heat caption{caption-side:top;text-align:left;color:var(--hb-ink-3);padding:0 0 4px}\n:where(.hb-yard,.hb-yard-bar) table.heat th{font-weight:400;color:var(--hb-ink-3);padding:2px;text-align:center;white-space:nowrap}\n:where(.hb-yard,.hb-yard-bar) table.heat tbody th{text-align:right;padding-right:6px;max-width:90px;overflow:hidden;text-overflow:ellipsis}\n:where(.hb-yard,.hb-yard-bar) table.heat td{width:26px;height:20px;border:1px solid var(--hb-paper-edge);text-align:center;font-family:var(--hb-readout);font-size:14px}\n:where(.hb-yard,.hb-yard-bar) table.heat td{background:color-mix(in srgb,var(--hb-pink) calc(var(--v,0) * 100%),transparent)}\n:where(.hb-yard,.hb-yard-bar) table.heat td.is-hi{color:#fff}\n:where(.hb-yard,.hb-yard-bar) .scrollx{overflow-x:auto}\n:where(.hb-yard,.hb-yard-bar) .hb-fold{margin:6px 0 0;border:1px solid var(--hb-paper-edge)}\n:where(.hb-yard,.hb-yard-bar) .hb-fold>summary{display:flex;align-items:center;gap:8px;padding:6px 8px;font-size:12px;cursor:pointer;list-style:none;min-height:32px}\n:where(.hb-yard,.hb-yard-bar) .hb-fold>summary::-webkit-details-marker{display:none}\n:where(.hb-yard,.hb-yard-bar) .hb-fold>summary::before{content:\"+\";font-family:var(--hb-readout);font-size:17px;width:10px}\n:where(.hb-yard,.hb-yard-bar) .hb-fold[open]>summary::before{content:\"-\"}\n:where(.hb-yard,.hb-yard-bar) .hb-fold>summary .aux{margin-left:auto;font-family:var(--hb-readout);font-size:15px;color:var(--hb-ink-3)}\n:where(.hb-yard,.hb-yard-bar) .hb-fold>div{padding:0 8px 8px}\n:where(.hb-yard,.hb-yard-bar) .meterrow{display:grid;grid-template-columns:84px minmax(0,1fr) 42px;align-items:center;gap:8px;font-size:12.5px;margin:4px 0}\n:where(.hb-yard,.hb-yard-bar) .meterrow .hb-meter{background:var(--hb-paper-sunk);height:11px}\n:where(.hb-yard,.hb-yard-bar) .meterrow .hb-meter>i{background:var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .meterrow b{font-family:var(--hb-readout);font-size:16px;font-weight:400;text-align:right}\n:where(.hb-yard,.hb-yard-bar) .calls{margin:0;padding:0;list-style:none;border:1px solid var(--hb-ink);background:var(--hb-paper-raised);max-height:320px;overflow:auto}\n:where(.hb-yard,.hb-yard-bar) .calls>li{padding:6px;border-bottom:1px dashed rgba(26,26,26,.2);font-size:11.5px}\n:where(.hb-yard,.hb-yard-bar) .calls .t{font-family:var(--hb-readout);font-size:15px;color:var(--hb-ink-3);margin-right:6px}\n:where(.hb-yard,.hb-yard-bar) .calls pre{white-space:pre-wrap;font-size:11px;padding:6px;margin:4px 0 0;max-height:180px}\n:where(.hb-yard,.hb-yard-bar) .calls:empty::before{content:attr(data-empty);display:block;padding:6px;font-family:var(--hb-note);font-size:13px;color:var(--hb-ink-3)}\n:where(.hb-yard,.hb-yard-bar) .hb-console{max-height:260px;overflow:auto}\n:where(.hb-yard,.hb-yard-bar) #photoView{display:none;margin-top:8px}\n:where(.hb-yard,.hb-yard-bar) #photoView canvas{width:100%;display:block;border:1px solid var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) #cam{width:100%;display:none;border:1px solid var(--hb-ink);margin-top:8px;transform:scaleX(-1)}\n:where(.hb-yard,.hb-yard-bar) .about p{font-family:var(--hb-note);font-size:13px;line-height:1.5;color:var(--hb-ink-2);margin:0 0 9px}\n:where(.hb-yard,.hb-yard-bar) .about code{font-size:11.5px}\n/* capability drawer, opened from tune */\n:where(.hb-yard,.hb-yard-bar) #caps>.hb-drawer-panel{width:100vw;padding:0;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom)}\n:where(.hb-yard,.hb-yard-bar) #caps .caps-hd{display:flex;align-items:center;gap:8px;background:var(--hb-paper-raised);border-bottom:2px solid var(--hb-ink);padding:6px 6px 6px 12px;position:sticky;top:0;z-index:2}\n:where(.hb-yard,.hb-yard-bar) #caps .caps-hd h2{font-family:var(--hb-readout);font-size:20px;text-transform:uppercase;margin:0;flex:1}\n:where(.hb-yard,.hb-yard-bar) #capsBody{padding:12px}\n:where(.hb-yard,.hb-yard-bar) .hb-cap .hb-select{min-height:44px;font-size:16px}\n@media (min-width:641px){:where(.hb-yard,.hb-yard-bar) #caps>.hb-drawer-panel{width:min(520px,92vw)}}\n/* under 900 px: the rack stacks under a 62vh stage and the page scrolls as one, as the original */\n@media (max-width:900px){\n .hb-yard,.hb-yard>#work{height:auto}\n :where(.hb-yard,.hb-yard-bar) #work{grid-template-columns:minmax(0,1fr);grid-template-rows:62vh auto}\n :where(.hb-yard,.hb-yard-bar) #side{border-left:0;border-top:2px solid var(--hb-ink)}\n :where(.hb-yard,.hb-yard-bar) #panes{overflow:visible}\n}\n@media (max-width:600px){\n :where(.hb-yard,.hb-yard-bar) #eyecard{width:56%}:where(.hb-yard,.hb-yard-bar) #eyeMode{display:none}:where(.hb-yard,.hb-yard-bar) #hint{display:none}\n :where(.hb-yard,.hb-yard-bar) .hchips .chip:nth-child(n+3){display:none}\n :where(.hb-yard,.hb-yard-bar) #tool{gap:4px;left:8px;right:8px;bottom:8px}\n :where(.hb-yard,.hb-yard-bar) #tool .hb-btn{min-height:34px;padding:4px 7px;font-size:12px;box-shadow:2px 2px 0 var(--hb-ink)}\n :where(.hb-yard,.hb-yard-bar) #padRow{bottom:96px}\n}\n@media (max-width:600px) and (pointer:coarse){:where(.hb-yard,.hb-yard-bar) #tool .hb-btn{min-height:44px}}\n/* a phone held sideways: the stage beside the rack */\n@media (orientation:landscape) and (max-height:560px) and (min-width:560px){\n :where(.hb-yard,.hb-yard-bar) #work{grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr) 46vw}\n :where(.hb-yard,.hb-yard-bar) #side{border-top:0;border-left:2px solid var(--hb-ink)}\n}\n/* the setup panel: ferrule's gate card over the live yard */\n:where(.hb-yard,.hb-yard-bar) .setup-scrim{position:fixed;inset:0;z-index:900;display:grid;place-items:center;padding:16px;background:rgba(245,240,230,.55)}\n:where(.hb-yard,.hb-yard-bar) .setup-card{width:min(640px,100%);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);display:flex;flex-direction:column;border:2px solid var(--hb-ink);background:var(--hb-paper-raised);box-shadow:8px 8px 0 var(--hb-pink);outline:none}\n:where(.hb-yard,.hb-yard-bar) .setup-head{flex:none;display:flex;justify-content:space-between;align-items:center;background:var(--hb-ink);color:var(--hb-paper);padding:0 0 0 14px;font-family:var(--hb-readout);font-size:22px;line-height:1}\n:where(.hb-yard,.hb-yard-bar) .setup-head button{background:none;border:0;color:inherit;font:inherit;min-width:44px;min-height:38px;cursor:pointer}\n:where(.hb-yard,.hb-yard-bar) .setup-head button:focus-visible{outline:2px solid var(--hb-pink);outline-offset:-2px}\n:where(.hb-yard,.hb-yard-bar) .setup-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:8px;padding:12px 16px 8px}\n:where(.hb-yard,.hb-yard-bar) .setup-top{display:flex;align-items:center;gap:14px;flex-wrap:wrap}\n:where(.hb-yard,.hb-yard-bar) .setup-top h2{font-family:var(--hb-display);font-size:36px;line-height:1;margin:0;font-weight:400;flex:0 1 auto;min-width:0;overflow-wrap:anywhere}\n:where(.hb-yard,.hb-yard-bar) .setup-top h2 b{color:var(--hb-pink);font-weight:400}\n:where(.hb-yard,.hb-yard-bar) .setup-top .field{margin:0;flex:1 1 200px;grid-template-columns:auto minmax(0,1fr)}\n:where(.hb-yard,.hb-yard-bar) .setup-line{margin:0;font-family:var(--hb-note);font-size:13.5px;line-height:1.4;color:var(--hb-ink-2)}\n:where(.hb-yard,.hb-yard-bar) .setup-gpu{margin:0;font-size:12.5px;color:var(--hb-warn-ink,#8a5300)}\n:where(.hb-yard,.hb-yard-bar) .setup-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}\n:where(.hb-yard,.hb-yard-bar) .setup-modes[hidden]{display:none}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;align-content:start;text-align:left;padding:7px 9px;border:1.5px solid var(--hb-ink);background:var(--hb-paper);box-shadow:3px 3px 0 var(--hb-ink);cursor:pointer;min-height:44px}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button b{grid-column:1/-1;font-family:var(--hb-readout);font-size:19px;font-weight:400;line-height:1;text-transform:uppercase}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button em{grid-column:1/-1;font-style:normal;font-family:var(--hb-readout);font-size:16px;line-height:1;color:var(--hb-ink-2)}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button span{grid-column:1/-1;font-size:11.5px;line-height:1.3;color:var(--hb-ink-2)}\n:where(.hb-yard,.hb-yard-bar) .setup-modes .badge{grid-column:1/-1;font-style:normal;font-family:var(--hb-readout);font-size:14px;line-height:1;justify-self:start;border:1px solid currentColor;padding:1px 5px}\n:where(.hb-yard,.hb-yard-bar) .setup-modes .badge:empty{display:none}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button[aria-checked=\"true\"]{background:var(--hb-ink);color:var(--hb-paper)}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button[aria-checked=\"true\"] span,:where(.hb-yard,.hb-yard-bar) .setup-modes button[aria-checked=\"true\"] em{color:#ffd1e8}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button:focus-visible{outline:3px solid var(--hb-pink);outline-offset:2px}\n:where(.hb-yard,.hb-yard-bar) .setup-list{flex:1 1 auto;min-height:96px;overflow:auto;margin:0;padding:0 8px 4px;list-style:none;border:1.5px solid var(--hb-ink);background:var(--hb-paper);overscroll-behavior:contain}\n:where(.hb-yard,.hb-yard-bar) .sgroup>h3{margin:0 -8px;padding:2px 8px;background:var(--hb-paper-sunk);font-family:var(--hb-readout);font-size:15px;font-weight:400;line-height:1.2;text-transform:uppercase;color:var(--hb-ink-2)}\n:where(.hb-yard,.hb-yard-bar) .sgroup>ul{list-style:none;margin:0;padding:0}\n:where(.hb-yard,.hb-yard-bar) .setup-list li{margin:0}\n:where(.hb-yard,.hb-yard-bar) .srow{display:grid;grid-template-columns:20px minmax(0,1fr) auto auto;gap:0 8px;align-items:center;padding:2px 0;line-height:1.25}\n:where(.hb-yard,.hb-yard-bar) .setup-list .srow>*,:where(.hb-yard,.hb-yard-bar) .setup-list .srow-note{margin:0}\n:where(.hb-yard,.hb-yard-bar) .srow input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .srow-name{font-size:13px;line-height:1.3;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n:where(.hb-yard,.hb-yard-bar) .srow-name label{cursor:pointer}\n:where(.hb-yard,.hb-yard-bar) .srow-sel{font:inherit;font-size:12px;border:1px solid var(--hb-ink);background:var(--hb-paper-raised);padding:0 2px;max-width:100%}\n:where(.hb-yard,.hb-yard-bar) .srow-size{font-family:var(--hb-readout);font-size:15px;color:var(--hb-ink-2);white-space:nowrap}\n:where(.hb-yard,.hb-yard-bar) .srow-mark{font-family:var(--hb-readout);font-size:13px;border:1px solid var(--hb-ink);padding:0 4px;white-space:nowrap}\n:where(.hb-yard,.hb-yard-bar) .srow-note{grid-column:2/-1;margin:0;font-size:11.5px;line-height:1.2;color:var(--hb-ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n:where(.hb-yard,.hb-yard-bar) .srow.is-off{opacity:.55}\n:where(.hb-yard,.hb-yard-bar) .slic{padding:4px 0 0;font-size:12px}\n:where(.hb-yard,.hb-yard-bar) .slic summary{cursor:pointer;color:var(--hb-ink-2);min-height:28px;display:flex;align-items:center}\n:where(.hb-yard,.hb-yard-bar) .slic ul{margin:0;padding:0 0 4px;list-style:none;font-family:var(--hb-note);font-size:12px;line-height:1.4;color:var(--hb-ink-2)}\n:where(.hb-yard,.hb-yard-bar) .slic b{font-weight:400;color:var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .setup-list.is-checks{padding:8px 10px;display:flex;flex-direction:column;gap:8px}\n:where(.hb-yard,.hb-yard-bar) .chk{display:grid;grid-template-columns:90px minmax(0,1fr) auto;gap:4px 10px;align-items:center;font-size:12px}\n:where(.hb-yard,.hb-yard-bar) .chk>b{font-family:var(--hb-readout);font-size:19px;font-weight:400;line-height:1;text-transform:uppercase}\n:where(.hb-yard,.hb-yard-bar) .chk .bar2{height:12px;border:1.5px solid var(--hb-ink);background:var(--hb-paper-sunk);position:relative}\n:where(.hb-yard,.hb-yard-bar) .chk .bar2 i{position:absolute;inset:0 auto 0 0;background:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .chk .bar2.ok i{background:var(--hb-ok)}\n:where(.hb-yard,.hb-yard-bar) .chk .bar2.err i{background:var(--hb-err)}\n:where(.hb-yard,.hb-yard-bar) .chk-note{font-family:var(--hb-note);color:var(--hb-ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}\n:where(.hb-yard,.hb-yard-bar) .chk.is-failed .chk-note{color:var(--hb-err);white-space:normal}\n:where(.hb-yard,.hb-yard-bar) .chk-retry{grid-column:2/-1;justify-self:start;min-height:32px;padding:3px 10px;font-size:13px}\n:where(.hb-yard,.hb-yard-bar) .setup-foot{flex:none;display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center;padding:10px 16px 12px;border-top:1.5px solid var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .setup-foot .hb-btn{font-size:14px;padding:9px 14px;box-shadow:3px 3px 0 var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .setup-foot .hb-btn-go{font-family:var(--hb-readout);font-size:22px;line-height:1;padding:8px 16px}\n:where(.hb-yard,.hb-yard-bar) #bSetup{min-height:32px;padding:4px 10px;font-size:13px;box-shadow:2px 2px 0 var(--hb-ink);flex:none}\n@media (max-width:600px){\n :where(.hb-yard,.hb-yard-bar) .setup-scrim{padding:8px;align-items:start}\n :where(.hb-yard,.hb-yard-bar) .setup-card{max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);box-shadow:4px 4px 0 var(--hb-pink)}\n :where(.hb-yard,.hb-yard-bar) .setup-body{padding:8px 10px 6px;gap:6px}\n :where(.hb-yard,.hb-yard-bar) .setup-top{gap:6px}\n :where(.hb-yard,.hb-yard-bar) .setup-top h2{font-size:28px}\n :where(.hb-yard,.hb-yard-bar) .setup-top .field{flex-basis:100%}\n :where(.hb-yard,.hb-yard-bar) .setup-top .field input{min-height:34px;padding:3px 8px}\n :where(.hb-yard,.hb-yard-bar) .setup-line{font-size:12.5px}\n :where(.hb-yard,.hb-yard-bar) .setup-modes{gap:6px}\n :where(.hb-yard,.hb-yard-bar) .setup-modes button{padding:5px 6px;gap:3px}\n :where(.hb-yard,.hb-yard-bar) .setup-modes button b{font-size:16px}\n :where(.hb-yard,.hb-yard-bar) .setup-modes button em{font-size:14px}\n :where(.hb-yard,.hb-yard-bar) .setup-modes button span{display:none}\n :where(.hb-yard,.hb-yard-bar) .setup-modes .badge{font-size:12px}\n :where(.hb-yard,.hb-yard-bar) .chk{grid-template-columns:70px minmax(0,1fr) auto}\n :where(.hb-yard,.hb-yard-bar) .chk-note{max-width:120px}\n :where(.hb-yard,.hb-yard-bar) .setup-foot{padding:8px 10px 10px}\n :where(.hb-yard,.hb-yard-bar) .hchips .chip:nth-child(n+2){display:none}\n}\n@media (prefers-reduced-motion:reduce){.hb-yard *{transition:none!important;animation:none!important}}\n";
13
+ export const YARD_CSS = "/*\nYard, the stage and rack of the original yard (hackle), light paper: the dog is the picture; every\npanel is a probe. Stage left (fills), a rack of seven tabs at a fixed 380 px on the right; under\n900 px the rack stacks under a stage of 62 percent of the viewport height and the host scrolls as\none. The hack.build class layer (hackbuild-ui) carries the light VT323 tabs, the light buttons with\none pink (.hb-btn-go), the panels and the 380 px rack token; the host page loads it. The stage\noverlays, the yard hint, the behaviour name, the verb row and the bars are this view's own.\n*/\n.hb-yard{height:100%;min-height:0;font-family:var(--hb-mono,'IBM Plex Mono',monospace);font-size:14px;color:var(--hb-ink)}\n.hb-yard>#work{height:100%}\n\n.hb-yard [hidden],:where(.hb-yard,.hb-yard-bar) .hchips[hidden]{display:none!important}\n.hb-yard,.hb-yard *,.hb-yard *::before,.hb-yard *::after{box-sizing:border-box}\n.hb-yard :is(button,:where(.hb-yard,.hb-yard-bar) input,:where(.hb-yard,.hb-yard-bar) select,:where(.hb-yard,.hb-yard-bar) textarea):not(.hb-tab){font:inherit;color:inherit}\n/* the mark at the original's 26 px; the tagline sits beside it, the readout chips push right */\n:where(.hb-yard,.hb-yard-bar) .hchips{margin-left:auto;display:flex;gap:6px;flex-wrap:nowrap;overflow:hidden;flex:0 1 auto;min-width:0}\n:where(.hb-yard,.hb-yard-bar) .chip{font-family:var(--hb-readout);font-size:17px;line-height:1;padding:4px 7px;border:1.5px solid var(--hb-ink);background:var(--hb-paper);white-space:nowrap;text-transform:uppercase}\n:where(.hb-yard,.hb-yard-bar) .chip.on,:where(.hb-yard,.hb-yard-bar) .chip.is-ok{background:var(--hb-ink);color:var(--hb-paper)}\n:where(.hb-yard,.hb-yard-bar) .chip.is-warn{border-color:var(--hb-warn);color:var(--hb-warn-ink)}\n:where(.hb-yard,.hb-yard-bar) #work{display:grid;grid-template-columns:minmax(0,1fr) var(--hb-rack,380px);min-height:0}\n/* the stage and its overlays, as the original drew them */\n:where(.hb-yard,.hb-yard-bar) #stage{position:relative;overflow:hidden;background:#eef2ef;outline:none;container-type:inline-size}\n:where(.hb-yard,.hb-yard-bar) #stage:focus-visible{box-shadow:inset 0 0 0 3px var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) #stage canvas.gl{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}\n:where(.hb-yard,.hb-yard-bar) #load{position:absolute;inset:0;display:grid;place-items:center;background:var(--hb-paper);z-index:9;text-align:center}\n:where(.hb-yard,.hb-yard-bar) #load .big{font-size:34px}\n:where(.hb-yard,.hb-yard-bar) #load .big b{color:var(--hb-pink);font-weight:400}\n:where(.hb-yard,.hb-yard-bar) #load.is-err .note{color:var(--hb-err)}\n:where(.hb-yard,.hb-yard-bar) #eyecard{position:absolute;left:12px;top:12px;width:min(320px,46%);background:var(--hb-paper-raised);border:1.5px solid var(--hb-ink);box-shadow:4px 4px 0 var(--hb-ink);z-index:5}\n:where(.hb-yard,.hb-yard-bar) .bh{background:var(--hb-ink);color:var(--hb-paper);font-family:var(--hb-readout);font-size:19px;display:flex;justify-content:space-between;gap:8px}\n:where(.hb-yard,.hb-yard-bar) #eyecard .bh{font-size:17px;align-items:center;padding:0 0 0 9px}\n:where(.hb-yard,.hb-yard-bar) .eyewho{display:flex;gap:2px;flex:none}\n:where(.hb-yard,.hb-yard-bar) .eyewho button,:where(.hb-yard,.hb-yard-bar) #eyeFold{white-space:nowrap;font:inherit;font-size:15px;background:none;border:0;color:inherit;opacity:.55;padding:0 6px 0 0;cursor:pointer;min-height:28px;text-transform:uppercase}\n:where(.hb-yard,.hb-yard-bar) .eyewho button.on{opacity:1;text-decoration:underline;text-underline-offset:3px}\n:where(.hb-yard,.hb-yard-bar) #eyeFold{opacity:1;padding:0 9px;margin-left:auto}\n:where(.hb-yard,.hb-yard-bar) .eyewho button:focus-visible,:where(.hb-yard,.hb-yard-bar) #eyeFold:focus-visible{outline:2px solid var(--hb-pink);outline-offset:-2px}\n:where(.hb-yard,.hb-yard-bar) #eyeMode{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;font-size:14px;color:#ffd1e8}\n:where(.hb-yard,.hb-yard-bar) #eyewrap{position:relative;aspect-ratio:2/1}\n:where(.hb-yard,.hb-yard-bar) #eyewrap canvas{position:absolute;inset:0;width:100%;height:100%}\n:where(.hb-yard,.hb-yard-bar) #eyecard.is-folded #eyewrap{display:none}\n:where(.hb-yard,.hb-yard-bar) #eyeSal{pointer-events:none}\n:where(.hb-yard,.hb-yard-bar) #tool{position:absolute;left:12px;right:12px;bottom:12px;display:flex;gap:6px;flex-wrap:wrap;align-items:flex-end;pointer-events:none;z-index:7}\n:where(.hb-yard,.hb-yard-bar) #tool>*{pointer-events:auto}\n/* no host bar: setup and commands as a small group in the stage's top right corner */\n:where(.hb-yard,.hb-yard-bar) #corner{position:absolute;right:12px;top:12px;display:flex;gap:6px;align-items:center;z-index:7}\n:where(.hb-yard,.hb-yard-bar) #corner .hb-btn{padding:7px 10px;box-shadow:3px 3px 0 var(--hb-ink);font-size:13px;text-transform:none;letter-spacing:0}\n:where(.hb-yard,.hb-yard-bar) #corner~#hint{top:62px}\n:where(.hb-yard,.hb-yard-bar) #tool .hb-btn svg{width:16px;height:16px;flex:none}\n:where(.hb-yard,.hb-yard-bar) #camLab,:where(.hb-yard,.hb-yard-bar) #micLab{display:inline-block}\n:where(.hb-yard,.hb-yard-bar) #camLab::first-letter,:where(.hb-yard,.hb-yard-bar) #micLab::first-letter{text-transform:uppercase}\n:where(.hb-yard,.hb-yard-bar) #bubble{position:absolute;pointer-events:none;transform:translate(-50%,-100%);background:var(--hb-paper-raised);border:1.5px solid var(--hb-ink);padding:4px 9px;font-family:var(--hb-note);font-size:14px;white-space:nowrap;box-shadow:3px 3px 0 var(--hb-ink);max-width:260px;overflow:hidden;text-overflow:ellipsis;z-index:6}\n:where(.hb-yard,.hb-yard-bar) #bubble:after{content:\"\";position:absolute;left:50%;bottom:-8px;width:10px;height:10px;background:var(--hb-paper-raised);border-right:1.5px solid var(--hb-ink);border-bottom:1.5px solid var(--hb-ink);transform:translateX(-50%) rotate(45deg)}\n:where(.hb-yard,.hb-yard-bar) #hbubble{position:absolute;pointer-events:none;transform:translate(-50%,-100%);background:#fff;border:1.5px solid var(--hb-pink);color:var(--hb-ink);padding:4px 9px;font-family:var(--hb-note);font-size:14px;max-width:280px;box-shadow:3px 3px 0 var(--hb-pink);white-space:normal;text-align:center;z-index:6}\n:where(.hb-yard,.hb-yard-bar) #hint{position:absolute;right:12px;top:12px;font-family:var(--hb-note);font-size:12.5px;line-height:1.4;background:rgba(255,253,247,.88);border:1px solid var(--hb-paper-edge);padding:5px 8px;max-width:280px;color:var(--hb-ink-2);z-index:5}\n:where(.hb-yard,.hb-yard-bar) #toast{position:absolute;left:50%;top:14px;transform:translateX(-50%);background:var(--hb-ink);color:var(--hb-paper);padding:6px 12px;font-family:var(--hb-readout);font-size:19px;opacity:0;transition:opacity .25s;pointer-events:none;z-index:8;white-space:nowrap;max-width:calc(100% - 24px);overflow:hidden;text-overflow:ellipsis}\n:where(.hb-yard,.hb-yard-bar) #toast.is-on{opacity:1}\n:where(.hb-yard,.hb-yard-bar) #drop{position:absolute;inset:0;border:4px dashed var(--hb-pink);display:none;place-items:center;background:rgba(245,240,230,.7);z-index:8;font-family:var(--hb-display);font-size:30px}\n:where(.hb-yard,.hb-yard-bar) #drop.is-over{display:grid}\n:where(.hb-yard,.hb-yard-bar) #padRow{position:absolute;right:12px;bottom:110px;z-index:6}\n/* the rack */\n:where(.hb-yard,.hb-yard-bar) #side{border-left:2px solid var(--hb-ink);background:var(--hb-paper);display:flex;flex-direction:column;min-height:0;min-width:0}\n/* seven tabs share the 380 px rack evenly, in caps as the original */\n:where(.hb-yard,.hb-yard-bar) #side>.hb-tabs{flex:none;border-bottom-width:2px;overflow:hidden}\n:where(.hb-yard,.hb-yard-bar) #side>.hb-tabs>.hb-tab{flex:1 1 0;min-width:0;padding:10px 0;text-transform:uppercase;text-align:center;min-height:44px}\n:where(.hb-yard,.hb-yard-bar) #panes{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}\n:where(.hb-yard,.hb-yard-bar) .pane{display:none;padding:12px 12px max(12px,env(safe-area-inset-bottom))}\n:where(.hb-yard,.hb-yard-bar) .pane.on{display:block}\n:where(.hb-yard,.hb-yard-bar) .pane:focus{outline:none}\n/* blocks: the original's raised card with an ink head */\n:where(.hb-yard,.hb-yard-bar) .pane>.hb-panel{margin:0 4px 16px 0;padding:9px 10px;box-shadow:4px 4px 0 var(--hb-ink);border-width:1.5px}\n.hb-yard .pane h3.hb-panel-hd-inst{text-transform:uppercase;display:flex;justify-content:space-between;gap:8px;font-size:19px;letter-spacing:0;margin:-9px -10px 9px;padding:3px 9px}\n.hb-yard .pane h3.hb-panel-hd-inst .hb-hd-aux{color:#ffd1e8;text-transform:none;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}\n/* the original's compact buttons: 7 px by 10 px, 3 px shadow; a pressed toggle fills ink */\n:where(.hb-yard,.hb-yard-bar) .pane .hb-btn,:where(.hb-yard,.hb-yard-bar) #tool .hb-btn{padding:7px 10px;gap:6px;box-shadow:3px 3px 0 var(--hb-ink);font-size:13px;text-transform:none;letter-spacing:0}\n:where(.hb-yard,.hb-yard-bar) .hb-btn[aria-pressed=\"true\"]{background:var(--hb-ink);color:var(--hb-paper)}\n:where(.hb-yard,.hb-yard-bar) .big{font-family:var(--hb-display);font-size:28px;line-height:1.05;margin:0}\n:where(.hb-yard,.hb-yard-bar) .note{font-family:var(--hb-note);font-size:13px;line-height:1.4;color:var(--hb-ink-3);margin:6px 0 0}\n:where(.hb-yard,.hb-yard-bar) .note:first-child{margin-top:0}\n:where(.hb-yard,.hb-yard-bar) .sub{font-size:12px;line-height:1.45;color:var(--hb-ink-2);margin:4px 0 0;overflow-wrap:anywhere}\n:where(.hb-yard,.hb-yard-bar) .sub:empty,:where(.hb-yard,.hb-yard-bar) .note:empty{display:none}\n:where(.hb-yard,.hb-yard-bar) .row{display:grid;grid-template-columns:84px minmax(0,1fr) 42px;align-items:center;gap:8px;margin:4px 0;font-size:12.5px}\n:where(.hb-yard,.hb-yard-bar) .row .lab{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n:where(.hb-yard,.hb-yard-bar) .row .v{font-family:var(--hb-readout);font-size:16px;text-align:right}\n:where(.hb-yard,.hb-yard-bar) .row.cur .lab{color:var(--hb-pink);font-weight:600}\n:where(.hb-yard,.hb-yard-bar) .row.one{grid-template-columns:84px minmax(0,1fr)}\n:where(.hb-yard,.hb-yard-bar) .bar{height:11px;background:var(--hb-paper-sunk);border:1px solid var(--hb-ink);position:relative}\n:where(.hb-yard,.hb-yard-bar) .bar i{position:absolute;left:0;top:0;bottom:0;background:var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .bar.p i,:where(.hb-yard,.hb-yard-bar) .row.cur .bar i{background:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .btns{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:6px}\n:where(.hb-yard,.hb-yard-bar) .tog,:where(.hb-yard,.hb-yard-bar) .hb-check{display:flex;align-items:center;gap:8px;margin:5px 0;font-size:13px;line-height:1.35;cursor:pointer}\n:where(.hb-yard,.hb-yard-bar) .tog input,:where(.hb-yard,.hb-yard-bar) .hb-check input{flex:none;width:18px;height:18px;accent-color:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .hb-check.is-disabled{cursor:not-allowed;opacity:.6}\n:where(.hb-yard,.hb-yard-bar) .reason{font-family:var(--hb-note);font-size:12.5px;line-height:1.4;color:var(--hb-warn-ink,#8a5300);margin:4px 0 0}\n:where(.hb-yard,.hb-yard-bar) .reason:empty{display:none}\n:where(.hb-yard,.hb-yard-bar) .licence{font-family:var(--hb-note);font-size:12.5px;line-height:1.4;color:var(--hb-ink-2);margin:6px 0 0;padding:4px 6px;border-left:3px solid var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .linkbtn{background:none;border:0;padding:0;font:inherit;color:var(--hb-ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer}\n:where(.hb-yard,.hb-yard-bar) .kv{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;font-size:12.5px;margin-top:6px}\n:where(.hb-yard,.hb-yard-bar) .kv b{font-weight:400;color:var(--hb-ink-3)}\n:where(.hb-yard,.hb-yard-bar) .kv span{font-family:var(--hb-readout);font-size:17px;line-height:1.1;overflow-wrap:anywhere}\n:where(.hb-yard,.hb-yard-bar) .hb-kv{font-size:12.5px;color:var(--hb-ink-3);padding:2px 0}\n:where(.hb-yard,.hb-yard-bar) .hb-kv>span:last-child{font-family:var(--hb-readout);font-size:17px;line-height:1.1;color:var(--hb-ink);text-align:right;overflow-wrap:anywhere;min-width:0}\n:where(.hb-yard,.hb-yard-bar) canvas.inst{width:100%;height:auto;display:block;background:var(--hb-paper);border:1px solid var(--hb-paper-edge)}\n:where(.hb-yard,.hb-yard-bar) .heard,:where(.hb-yard,.hb-yard-bar) .hb-heard{font-family:var(--hb-readout);font-size:19px;line-height:1.2;min-height:24px;padding:3px 6px;background:var(--hb-paper-sunk);border:1px solid var(--hb-paper-edge);margin-top:6px;white-space:pre-wrap;overflow-wrap:anywhere}\n:where(.hb-yard,.hb-yard-bar) .hb-heard:empty::before{content:attr(data-empty);color:var(--hb-ink-3)}\n:where(.hb-yard,.hb-yard-bar) .field{display:grid;grid-template-columns:84px minmax(0,1fr);align-items:center;gap:8px;margin:6px 0 0;font-size:12.5px}\n:where(.hb-yard,.hb-yard-bar) .field .hb-input,:where(.hb-yard,.hb-yard-bar) .field .hb-select,:where(.hb-yard,.hb-yard-bar) .field select,:where(.hb-yard,.hb-yard-bar) .field input{width:100%;border:1.5px solid var(--hb-ink);background:var(--hb-paper-raised);padding:6px 8px;font-size:16px;min-height:38px}\n:where(.hb-yard,.hb-yard-bar) .field input:disabled{opacity:.55}\n:where(.hb-yard,.hb-yard-bar) input[type=range]{width:100%;accent-color:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .lst{font-size:12.5px;display:grid;gap:2px}\n:where(.hb-yard,.hb-yard-bar) .lst>div{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}\n:where(.hb-yard,.hb-yard-bar) .lst .vis{color:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .lines{margin:0;padding:0;list-style:none;font-size:12px;line-height:1.5}\n:where(.hb-yard,.hb-yard-bar) .lines>li{padding:3px 0;border-bottom:1px dashed rgba(26,26,26,.15);overflow-wrap:anywhere}\n:where(.hb-yard,.hb-yard-bar) .lines>li:last-child{border-bottom:0}\n:where(.hb-yard,.hb-yard-bar) .lines .k{display:inline-block;min-width:4.5em;color:var(--hb-ink-3)}\n:where(.hb-yard,.hb-yard-bar) .chiprow,:where(.hb-yard,.hb-yard-bar) .pane .chips{display:flex;flex-wrap:wrap;gap:6px}\n:where(.hb-yard,.hb-yard-bar) .chiprow .hb-chip,:where(.hb-yard,.hb-yard-bar) .pane .chips .hb-chip{box-shadow:none;text-transform:none;letter-spacing:0;font-size:13px;min-height:38px;padding:4px 10px}\n:where(.hb-yard,.hb-yard-bar) .rangerow{display:grid;grid-template-columns:150px minmax(0,1fr) 46px;align-items:center;gap:8px;margin:4px 0;font-size:12px}\n:where(.hb-yard,.hb-yard-bar) .rangerow output{font-family:var(--hb-readout);font-size:16px;text-align:right}\n/* the associations table, cues by acts, as in the original */\n:where(.hb-yard,.hb-yard-bar) table.heat{border-collapse:collapse;font-size:11px;width:100%}\n:where(.hb-yard,.hb-yard-bar) table.heat caption{caption-side:top;text-align:left;color:var(--hb-ink-3);padding:0 0 4px}\n:where(.hb-yard,.hb-yard-bar) table.heat th{font-weight:400;color:var(--hb-ink-3);padding:2px;text-align:center;white-space:nowrap}\n:where(.hb-yard,.hb-yard-bar) table.heat tbody th{text-align:right;padding-right:6px;max-width:90px;overflow:hidden;text-overflow:ellipsis}\n:where(.hb-yard,.hb-yard-bar) table.heat td{width:26px;height:20px;border:1px solid var(--hb-paper-edge);text-align:center;font-family:var(--hb-readout);font-size:14px}\n:where(.hb-yard,.hb-yard-bar) table.heat td{background:color-mix(in srgb,var(--hb-pink) calc(var(--v,0) * 100%),transparent)}\n:where(.hb-yard,.hb-yard-bar) table.heat td.is-hi{color:#fff}\n:where(.hb-yard,.hb-yard-bar) .scrollx{overflow-x:auto}\n:where(.hb-yard,.hb-yard-bar) .hb-fold{margin:6px 0 0;border:1px solid var(--hb-paper-edge)}\n:where(.hb-yard,.hb-yard-bar) .hb-fold>summary{display:flex;align-items:center;gap:8px;padding:6px 8px;font-size:12px;cursor:pointer;list-style:none;min-height:32px}\n:where(.hb-yard,.hb-yard-bar) .hb-fold>summary::-webkit-details-marker{display:none}\n:where(.hb-yard,.hb-yard-bar) .hb-fold>summary::before{content:\"+\";font-family:var(--hb-readout);font-size:17px;width:10px}\n:where(.hb-yard,.hb-yard-bar) .hb-fold[open]>summary::before{content:\"-\"}\n:where(.hb-yard,.hb-yard-bar) .hb-fold>summary .aux{margin-left:auto;font-family:var(--hb-readout);font-size:15px;color:var(--hb-ink-3)}\n:where(.hb-yard,.hb-yard-bar) .hb-fold>div{padding:0 8px 8px}\n:where(.hb-yard,.hb-yard-bar) .meterrow{display:grid;grid-template-columns:84px minmax(0,1fr) 42px;align-items:center;gap:8px;font-size:12.5px;margin:4px 0}\n:where(.hb-yard,.hb-yard-bar) .meterrow .hb-meter{background:var(--hb-paper-sunk);height:11px}\n:where(.hb-yard,.hb-yard-bar) .meterrow .hb-meter>i{background:var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .meterrow b{font-family:var(--hb-readout);font-size:16px;font-weight:400;text-align:right}\n:where(.hb-yard,.hb-yard-bar) .calls{margin:0;padding:0;list-style:none;border:1px solid var(--hb-ink);background:var(--hb-paper-raised);max-height:320px;overflow:auto}\n:where(.hb-yard,.hb-yard-bar) .calls>li{padding:6px;border-bottom:1px dashed rgba(26,26,26,.2);font-size:11.5px}\n:where(.hb-yard,.hb-yard-bar) .calls .t{font-family:var(--hb-readout);font-size:15px;color:var(--hb-ink-3);margin-right:6px}\n:where(.hb-yard,.hb-yard-bar) .calls pre{white-space:pre-wrap;font-size:11px;padding:6px;margin:4px 0 0;max-height:180px}\n:where(.hb-yard,.hb-yard-bar) .calls:empty::before{content:attr(data-empty);display:block;padding:6px;font-family:var(--hb-note);font-size:13px;color:var(--hb-ink-3)}\n:where(.hb-yard,.hb-yard-bar) .hb-console{max-height:260px;overflow:auto}\n:where(.hb-yard,.hb-yard-bar) #photoView{display:none;margin-top:8px}\n:where(.hb-yard,.hb-yard-bar) #photoView canvas{width:100%;display:block;border:1px solid var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) #cam{width:100%;display:none;border:1px solid var(--hb-ink);margin-top:8px;transform:scaleX(-1)}\n:where(.hb-yard,.hb-yard-bar) .about p{font-family:var(--hb-note);font-size:13px;line-height:1.5;color:var(--hb-ink-2);margin:0 0 9px}\n:where(.hb-yard,.hb-yard-bar) .about code{font-size:11.5px}\n/* capability drawer, opened from tune */\n:where(.hb-yard,.hb-yard-bar) #caps>.hb-drawer-panel{width:100vw;padding:0;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom)}\n:where(.hb-yard,.hb-yard-bar) #caps .caps-hd{display:flex;align-items:center;gap:8px;background:var(--hb-paper-raised);border-bottom:2px solid var(--hb-ink);padding:6px 6px 6px 12px;position:sticky;top:0;z-index:2}\n:where(.hb-yard,.hb-yard-bar) #caps .caps-hd h2{font-family:var(--hb-readout);font-size:20px;text-transform:uppercase;margin:0;flex:1}\n:where(.hb-yard,.hb-yard-bar) #capsBody{padding:12px}\n:where(.hb-yard,.hb-yard-bar) .hb-cap .hb-select{min-height:44px;font-size:16px}\n@media (min-width:641px){:where(.hb-yard,.hb-yard-bar) #caps>.hb-drawer-panel{width:min(520px,92vw)}}\n/* under 900 px: the rack stacks under a 62vh stage and the page scrolls as one, as the original */\n@media (max-width:900px){\n .hb-yard,.hb-yard>#work{height:auto}\n :where(.hb-yard,.hb-yard-bar) #work{grid-template-columns:minmax(0,1fr);grid-template-rows:62vh auto}\n :where(.hb-yard,.hb-yard-bar) #side{border-left:0;border-top:2px solid var(--hb-ink)}\n :where(.hb-yard,.hb-yard-bar) #panes{overflow:visible}\n}\n@media (max-width:600px){\n :where(.hb-yard,.hb-yard-bar) #eyecard{width:56%}:where(.hb-yard,.hb-yard-bar) #eyeMode{display:none}:where(.hb-yard,.hb-yard-bar) #hint{display:none}\n :where(.hb-yard,.hb-yard-bar) .hchips .chip:nth-child(n+3){display:none}\n :where(.hb-yard,.hb-yard-bar) #tool{gap:4px;left:8px;right:8px;bottom:8px}\n :where(.hb-yard,.hb-yard-bar) #tool .hb-btn{min-height:34px;padding:4px 7px;font-size:12px;box-shadow:2px 2px 0 var(--hb-ink)}\n :where(.hb-yard,.hb-yard-bar) #padRow{bottom:96px}\n :where(.hb-yard,.hb-yard-bar) #corner{right:8px;top:8px;gap:4px}\n :where(.hb-yard,.hb-yard-bar) #corner .hb-btn{min-height:34px;padding:4px 7px;font-size:12px;box-shadow:2px 2px 0 var(--hb-ink)}\n}\n@media (max-width:600px) and (pointer:coarse){:where(.hb-yard,.hb-yard-bar) #tool .hb-btn,:where(.hb-yard,.hb-yard-bar) #corner .hb-btn{min-height:44px}}\n/* a phone held sideways: the stage beside the rack */\n@media (orientation:landscape) and (max-height:560px) and (min-width:560px){\n :where(.hb-yard,.hb-yard-bar) #work{grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr) 46vw}\n :where(.hb-yard,.hb-yard-bar) #side{border-top:0;border-left:2px solid var(--hb-ink)}\n}\n/* the setup panel: ferrule's gate card over the live yard */\n:where(.hb-yard,.hb-yard-bar) .setup-scrim{position:fixed;inset:0;z-index:900;display:grid;place-items:center;padding:16px;background:rgba(245,240,230,.55)}\n:where(.hb-yard,.hb-yard-bar) .setup-card{width:min(640px,100%);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);display:flex;flex-direction:column;border:2px solid var(--hb-ink);background:var(--hb-paper-raised);box-shadow:8px 8px 0 var(--hb-pink);outline:none}\n:where(.hb-yard,.hb-yard-bar) .setup-head{flex:none;display:flex;justify-content:space-between;align-items:center;background:var(--hb-ink);color:var(--hb-paper);padding:0 0 0 14px;font-family:var(--hb-readout);font-size:22px;line-height:1}\n:where(.hb-yard,.hb-yard-bar) .setup-head button{background:none;border:0;color:inherit;font:inherit;min-width:44px;min-height:38px;cursor:pointer}\n:where(.hb-yard,.hb-yard-bar) .setup-head button:focus-visible{outline:2px solid var(--hb-pink);outline-offset:-2px}\n:where(.hb-yard,.hb-yard-bar) .setup-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:8px;padding:12px 16px 8px}\n:where(.hb-yard,.hb-yard-bar) .setup-top{display:flex;align-items:center;gap:14px;flex-wrap:wrap}\n:where(.hb-yard,.hb-yard-bar) .setup-top h2{font-family:var(--hb-display);font-size:36px;line-height:1;margin:0;font-weight:400;flex:0 1 auto;min-width:0;overflow-wrap:anywhere}\n:where(.hb-yard,.hb-yard-bar) .setup-top h2 b{color:var(--hb-pink);font-weight:400}\n:where(.hb-yard,.hb-yard-bar) .setup-top .field{margin:0;flex:1 1 200px;grid-template-columns:auto minmax(0,1fr)}\n:where(.hb-yard,.hb-yard-bar) .setup-line{margin:0;font-family:var(--hb-note);font-size:13.5px;line-height:1.4;color:var(--hb-ink-2)}\n:where(.hb-yard,.hb-yard-bar) .setup-gpu{margin:0;font-size:12.5px;color:var(--hb-warn-ink,#8a5300)}\n:where(.hb-yard,.hb-yard-bar) .setup-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}\n:where(.hb-yard,.hb-yard-bar) .setup-modes[hidden]{display:none}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;align-content:start;text-align:left;padding:7px 9px;border:1.5px solid var(--hb-ink);background:var(--hb-paper);box-shadow:3px 3px 0 var(--hb-ink);cursor:pointer;min-height:44px}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button b{grid-column:1/-1;font-family:var(--hb-readout);font-size:19px;font-weight:400;line-height:1;text-transform:uppercase}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button em{grid-column:1/-1;font-style:normal;font-family:var(--hb-readout);font-size:16px;line-height:1;color:var(--hb-ink-2)}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button span{grid-column:1/-1;font-size:11.5px;line-height:1.3;color:var(--hb-ink-2)}\n:where(.hb-yard,.hb-yard-bar) .setup-modes .badge{grid-column:1/-1;font-style:normal;font-family:var(--hb-readout);font-size:14px;line-height:1;justify-self:start;border:1px solid currentColor;padding:1px 5px}\n:where(.hb-yard,.hb-yard-bar) .setup-modes .badge:empty{display:none}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button[aria-checked=\"true\"]{background:var(--hb-ink);color:var(--hb-paper)}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button[aria-checked=\"true\"] span,:where(.hb-yard,.hb-yard-bar) .setup-modes button[aria-checked=\"true\"] em{color:#ffd1e8}\n:where(.hb-yard,.hb-yard-bar) .setup-modes button:focus-visible{outline:3px solid var(--hb-pink);outline-offset:2px}\n:where(.hb-yard,.hb-yard-bar) .setup-list{flex:1 1 auto;min-height:96px;overflow:auto;margin:0;padding:0 8px 4px;list-style:none;border:1.5px solid var(--hb-ink);background:var(--hb-paper);overscroll-behavior:contain}\n:where(.hb-yard,.hb-yard-bar) .sgroup>h3{margin:0 -8px;padding:2px 8px;background:var(--hb-paper-sunk);font-family:var(--hb-readout);font-size:15px;font-weight:400;line-height:1.2;text-transform:uppercase;color:var(--hb-ink-2)}\n:where(.hb-yard,.hb-yard-bar) .sgroup>ul{list-style:none;margin:0;padding:0}\n:where(.hb-yard,.hb-yard-bar) .setup-list li{margin:0}\n:where(.hb-yard,.hb-yard-bar) .srow{display:grid;grid-template-columns:20px minmax(0,1fr) auto auto;gap:0 8px;align-items:center;padding:2px 0;line-height:1.25}\n:where(.hb-yard,.hb-yard-bar) .setup-list .srow>*,:where(.hb-yard,.hb-yard-bar) .setup-list .srow-note{margin:0}\n:where(.hb-yard,.hb-yard-bar) .srow input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .srow-name{font-size:13px;line-height:1.3;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n:where(.hb-yard,.hb-yard-bar) .srow-name label{cursor:pointer}\n:where(.hb-yard,.hb-yard-bar) .srow-sel{font:inherit;font-size:12px;border:1px solid var(--hb-ink);background:var(--hb-paper-raised);padding:0 2px;max-width:100%}\n:where(.hb-yard,.hb-yard-bar) .srow-size{font-family:var(--hb-readout);font-size:15px;color:var(--hb-ink-2);white-space:nowrap}\n:where(.hb-yard,.hb-yard-bar) .srow-mark{font-family:var(--hb-readout);font-size:13px;border:1px solid var(--hb-ink);padding:0 4px;white-space:nowrap}\n:where(.hb-yard,.hb-yard-bar) .srow-note{grid-column:2/-1;margin:0;font-size:11.5px;line-height:1.2;color:var(--hb-ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n:where(.hb-yard,.hb-yard-bar) .srow.is-off{opacity:.55}\n:where(.hb-yard,.hb-yard-bar) .slic{padding:4px 0 0;font-size:12px}\n:where(.hb-yard,.hb-yard-bar) .slic summary{cursor:pointer;color:var(--hb-ink-2);min-height:28px;display:flex;align-items:center}\n:where(.hb-yard,.hb-yard-bar) .slic ul{margin:0;padding:0 0 4px;list-style:none;font-family:var(--hb-note);font-size:12px;line-height:1.4;color:var(--hb-ink-2)}\n:where(.hb-yard,.hb-yard-bar) .slic b{font-weight:400;color:var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .setup-list.is-checks{padding:8px 10px;display:flex;flex-direction:column;gap:8px}\n:where(.hb-yard,.hb-yard-bar) .chk{display:grid;grid-template-columns:90px minmax(0,1fr) auto;gap:4px 10px;align-items:center;font-size:12px}\n:where(.hb-yard,.hb-yard-bar) .chk>b{font-family:var(--hb-readout);font-size:19px;font-weight:400;line-height:1;text-transform:uppercase}\n:where(.hb-yard,.hb-yard-bar) .chk .bar2{height:12px;border:1.5px solid var(--hb-ink);background:var(--hb-paper-sunk);position:relative}\n:where(.hb-yard,.hb-yard-bar) .chk .bar2 i{position:absolute;inset:0 auto 0 0;background:var(--hb-pink)}\n:where(.hb-yard,.hb-yard-bar) .chk .bar2.ok i{background:var(--hb-ok)}\n:where(.hb-yard,.hb-yard-bar) .chk .bar2.err i{background:var(--hb-err)}\n:where(.hb-yard,.hb-yard-bar) .chk-note{font-family:var(--hb-note);color:var(--hb-ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}\n:where(.hb-yard,.hb-yard-bar) .chk.is-failed .chk-note{color:var(--hb-err);white-space:normal}\n:where(.hb-yard,.hb-yard-bar) .chk-retry{grid-column:2/-1;justify-self:start;min-height:32px;padding:3px 10px;font-size:13px}\n:where(.hb-yard,.hb-yard-bar) .setup-foot{flex:none;display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center;padding:10px 16px 12px;border-top:1.5px solid var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .setup-foot .hb-btn{font-size:14px;padding:9px 14px;box-shadow:3px 3px 0 var(--hb-ink)}\n:where(.hb-yard,.hb-yard-bar) .setup-foot .hb-btn-go{font-family:var(--hb-readout);font-size:22px;line-height:1;padding:8px 16px}\n:where(.hb-yard,.hb-yard-bar) #bSetup{min-height:32px;padding:4px 10px;font-size:13px;box-shadow:2px 2px 0 var(--hb-ink);flex:none}\n@media (max-width:600px){\n :where(.hb-yard,.hb-yard-bar) .setup-scrim{padding:8px;align-items:start}\n :where(.hb-yard,.hb-yard-bar) .setup-card{max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);box-shadow:4px 4px 0 var(--hb-pink)}\n :where(.hb-yard,.hb-yard-bar) .setup-body{padding:8px 10px 6px;gap:6px}\n :where(.hb-yard,.hb-yard-bar) .setup-top{gap:6px}\n :where(.hb-yard,.hb-yard-bar) .setup-top h2{font-size:28px}\n :where(.hb-yard,.hb-yard-bar) .setup-top .field{flex-basis:100%}\n :where(.hb-yard,.hb-yard-bar) .setup-top .field input{min-height:34px;padding:3px 8px}\n :where(.hb-yard,.hb-yard-bar) .setup-line{font-size:12.5px}\n :where(.hb-yard,.hb-yard-bar) .setup-modes{gap:6px}\n :where(.hb-yard,.hb-yard-bar) .setup-modes button{padding:5px 6px;gap:3px}\n :where(.hb-yard,.hb-yard-bar) .setup-modes button b{font-size:16px}\n :where(.hb-yard,.hb-yard-bar) .setup-modes button em{font-size:14px}\n :where(.hb-yard,.hb-yard-bar) .setup-modes button span{display:none}\n :where(.hb-yard,.hb-yard-bar) .setup-modes .badge{font-size:12px}\n :where(.hb-yard,.hb-yard-bar) .chk{grid-template-columns:70px minmax(0,1fr) auto}\n :where(.hb-yard,.hb-yard-bar) .chk-note{max-width:120px}\n :where(.hb-yard,.hb-yard-bar) .setup-foot{padding:8px 10px 10px}\n :where(.hb-yard,.hb-yard-bar) .hchips .chip:nth-child(n+2){display:none}\n}\n@media (prefers-reduced-motion:reduce){.hb-yard *{transition:none!important;animation:none!important}}\n";
14
14
  export const YARD_HTML = "<div id=\"work\">\n<section id=\"stage\" class=\"hb-ctx-area\" data-ux=\"subject\" aria-haspopup=\"menu\" aria-label=\"3d yard. tap the dog to pet it, tap the ground to point. hold, right click or the menu key for more.\" tabindex=\"0\">\n <div id=\"load\"><div><p class=\"big\">waking the dog<b>...</b></p><p class=\"note\" id=\"loadNote\">loading model</p></div></div>\n <figure id=\"eyecard\" data-ux=\"inset\" style=\"margin:0\">\n <div class=\"bh\"><span class=\"eyewho\"><button type=\"button\" id=\"eyeWhoDog\" class=\"on\" title=\"what the dog sees\">dog eye</button><button type=\"button\" id=\"eyeWhoHis\" title=\"what moheeb sees\">his eyes</button></span><span id=\"eyeMode\">dichromat</span><button type=\"button\" id=\"eyeFold\" aria-expanded=\"true\" aria-controls=\"eyewrap\" aria-label=\"fold the eye view\">-</button></div>\n <div id=\"eyewrap\"><canvas id=\"eye\" width=\"320\" height=\"160\" role=\"img\" aria-label=\"what the dog sees\"></canvas><canvas id=\"eyeBoxes\" width=\"320\" height=\"160\" aria-hidden=\"true\"></canvas><canvas id=\"eyeSal\" width=\"320\" height=\"160\" aria-hidden=\"true\"></canvas></div>\n </figure>\n <div id=\"hint\">click the ground to point. shift and click: he throws there. click the dog to pet it. drag to orbit; right drag, two fingers or w a s d move the camera, q and e for height, f follows the dog again.</div>\n <div id=\"bubble\" aria-hidden=\"true\">...</div>\n <div id=\"hbubble\" style=\"display:none\" aria-hidden=\"true\"></div>\n <div id=\"toast\" role=\"status\" aria-live=\"polite\"></div>\n <div id=\"drop\">show the dog this photo</div>\n <div class=\"hb-ctx\" id=\"yardMenu\" aria-label=\"yard actions\" hidden><div class=\"hb-ctx-title\" id=\"yardMenuT\" aria-hidden=\"true\">yard</div></div>\n <div class=\"hb-ov-pad\" id=\"padRow\" hidden>\n <div class=\"hb-pad\">\n <div class=\"hb-pad-base\" id=\"pad\" role=\"group\" tabindex=\"0\" aria-label=\"drive the dog: drag, or hold the arrow keys\"><span class=\"hb-pad-arrow hb-pad-n\" aria-hidden=\"true\"></span><span class=\"hb-pad-arrow hb-pad-s\" aria-hidden=\"true\"></span><span class=\"hb-pad-arrow hb-pad-w\" aria-hidden=\"true\"></span><span class=\"hb-pad-arrow hb-pad-e\" aria-hidden=\"true\"></span><span class=\"hb-pad-knob\" aria-hidden=\"true\"></span></div>\n <button type=\"button\" class=\"hb-pad-act\" id=\"padRun\" aria-pressed=\"false\">run</button>\n </div>\n </div>\n <div id=\"tool\" data-ux=\"verbs\">\n <button class=\"hb-btn hb-btn-go\" id=\"bThrow\" type=\"button\"><svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><circle cx=\"8\" cy=\"8\" r=\"6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\"/><path d=\"M3 5c3 1 7 1 10 0M3 11c3-1 7-1 10 0\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\"/></svg>Throw ball</button>\n <button class=\"hb-btn\" id=\"bTreat\" type=\"button\"><svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><rect x=\"3\" y=\"5\" width=\"10\" height=\"6\" rx=\"1\" fill=\"currentColor\"/></svg>Treat</button>\n <button class=\"hb-btn\" id=\"bGood\" type=\"button\"><svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"M2 9l4 4 8-10\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"/></svg>Good dog</button>\n <button class=\"hb-btn\" id=\"bNo\" type=\"button\"><svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"M3 3l10 10M13 3L3 13\" stroke=\"currentColor\" stroke-width=\"2\"/></svg>No</button>\n <button class=\"hb-btn\" id=\"bFill\" type=\"button\"><svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"M2 8h12l-2 5H4z\" fill=\"currentColor\"/></svg>Fill bowl</button>\n <button class=\"hb-btn\" id=\"bSquirrel\" type=\"button\"><svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><circle cx=\"6\" cy=\"10\" r=\"3\" fill=\"currentColor\"/><path d=\"M9 11c4 0 5-4 3-7-2-2-5 0-3 3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\"/></svg>Squirrel</button>\n <button class=\"hb-btn\" id=\"bCam\" type=\"button\" aria-label=\"camera: follow. press for the next view\" title=\"follow, free, dog eye, side, his eyes\"><svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"M1 5h4l1-2h4l1 2h4v8H1z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"/><circle cx=\"8\" cy=\"9\" r=\"2.4\" fill=\"currentColor\"/></svg><span id=\"camLab\">follow</span></button>\n <button class=\"hb-btn\" id=\"bMic\" type=\"button\" aria-pressed=\"false\" aria-describedby=\"micNote\"><svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><rect x=\"6\" y=\"1\" width=\"4\" height=\"9\" rx=\"2\" fill=\"currentColor\"/><path d=\"M3 8a5 5 0 0010 0M8 13v2\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"/></svg><span id=\"micLab\">talk</span></button>\n </div>\n</section>\n<aside id=\"side\" data-ux=\"rack\">\n <div class=\"hb-tabs\" role=\"tablist\" aria-label=\"panels\" id=\"tabs\">\n <button class=\"hb-tab\" role=\"tab\" type=\"button\" id=\"tab-brain\" aria-controls=\"pBrain\" aria-selected=\"true\" tabindex=\"0\" data-p=\"pBrain\">brain</button>\n <button class=\"hb-tab\" role=\"tab\" type=\"button\" id=\"tab-body\" aria-controls=\"pBody\" aria-selected=\"false\" tabindex=\"-1\" data-p=\"pBody\">body</button>\n <button class=\"hb-tab\" role=\"tab\" type=\"button\" id=\"tab-sense\" aria-controls=\"pSense\" aria-selected=\"false\" tabindex=\"-1\" data-p=\"pSense\">sense</button>\n <button class=\"hb-tab\" role=\"tab\" type=\"button\" id=\"tab-train\" aria-controls=\"pTrain\" aria-selected=\"false\" tabindex=\"-1\" data-p=\"pTrain\">train</button>\n <button class=\"hb-tab\" role=\"tab\" type=\"button\" id=\"tab-human\" aria-controls=\"pHuman\" aria-selected=\"false\" tabindex=\"-1\" data-p=\"pHuman\">human</button>\n <button class=\"hb-tab\" role=\"tab\" type=\"button\" id=\"tab-tune\" aria-controls=\"pTune\" aria-selected=\"false\" tabindex=\"-1\" data-p=\"pTune\">tune</button>\n <button class=\"hb-tab\" role=\"tab\" type=\"button\" id=\"tab-how\" aria-controls=\"pAbout\" aria-selected=\"false\" tabindex=\"-1\" data-p=\"pAbout\">how</button>\n </div>\n <div id=\"panes\">\n\n <section class=\"pane on\" id=\"pBrain\" role=\"tabpanel\" aria-labelledby=\"tab-brain\" tabindex=\"0\">\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>behavior</span><span class=\"hb-hd-aux\" id=\"behT\">0.0 s</span></h3>\n <p class=\"big\" id=\"behName\">idle</p>\n <p class=\"note\" id=\"behWhy\">standing around</p>\n <p class=\"sub\" id=\"behKind\"></p>\n <p class=\"sub\" id=\"goalNote\"></p>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>utility</span><span class=\"hb-hd-aux\" id=\"utilMode\">sampled</span></h3>\n <div id=\"utilRows\" aria-label=\"what each act is worth to the dog now\"></div>\n <p class=\"note\" id=\"pendNote\">each act scores by how much it would ease what the dog needs. it usually picks the best one and sticks with what it is doing.</p>\n <details class=\"hb-fold\" data-ux=\"detail\"><summary>how it chooses</summary><div><p class=\"sub\" id=\"choiceMeta\"></p><ul class=\"lines\" id=\"choiceFeed\"></ul>\n <p class=\"note\">drive reduction: each act scores by how much it would lower the dog's needs (keramati and gutkin 2011). the dog acts on the best option most of the time (softmax with a commitment bonus, temperature in tune).</p></div></details>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>drives</span><span class=\"hb-hd-aux\">need 0 to 1</span></h3>\n <div id=\"driveRows\" aria-label=\"the dog's drives\"></div>\n <div class=\"row\"><label class=\"lab\" for=\"tempo\">tempo</label><input type=\"range\" id=\"tempo\" min=\"0.25\" max=\"8\" step=\"0.25\" value=\"1\"><output class=\"v\" id=\"tempoV\" for=\"tempo\">1x</output></div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>affect</span><span class=\"hb-hd-aux\" id=\"affectAux\">valence x arousal</span></h3>\n <canvas class=\"inst\" id=\"affect\" width=\"340\" height=\"120\" role=\"img\" aria-label=\"affect\"></canvas>\n <p class=\"sub\" id=\"affectTxt\"></p>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>sleep and clock</span><span class=\"hb-hd-aux\" id=\"slpStage\">awake</span></h3>\n <canvas class=\"inst\" id=\"hyp\" width=\"340\" height=\"64\" role=\"img\" aria-label=\"sleep stages over the last 80 s\"></canvas>\n <div class=\"kv\"><b>time</b><span id=\"kClock\">10:00</span><b>sleep pressure</b><span id=\"kSp\">0</span><b>body clock</b><span id=\"kCirc\">0</span><b>bond</b><span id=\"kBond\">0.5</span><b>wag mode</b><span id=\"kWag\">-</span></div>\n <p class=\"note\">sleep pressure builds while awake and drains asleep; the body clock peaks near 7 and 19 with a midday dip. sleep runs onset, nrem, short rem with paddling paws, and often a wake after rem. pet dogs sleep about 11 hours a day.</p>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>cortex</span><span class=\"hb-hd-aux\" id=\"cortexSt\">off</span></h3>\n <p class=\"note\">a vision language model on your gpu looks through the dog eye, reads its drives and memories, and returns what it saw, a thought and a goal. nothing leaves the browser; the weights download once and stay stored.</p>\n <div class=\"field\"><label for=\"vlmSel\">model</label><select class=\"hb-select\" id=\"vlmSel\"><option value=\"lfm\">lfm2-vl 450m, about 320 mb</option><option value=\"gemma\">gemma 4 e2b, about 3.3 gb</option></select></div>\n <p class=\"licence\" id=\"vlmLic\">weights lfm open license 1.0, commercial use limited.</p>\n <div class=\"btns\"><button class=\"hb-btn\" id=\"bVlmLoad\" type=\"button\">Load, about 320 MB</button><button class=\"hb-btn\" id=\"bThink\" type=\"button\" hidden>Look and think</button></div>\n <p class=\"reason\" id=\"cortexWhy\"></p>\n <p class=\"sub\" id=\"cortexSched\"></p>\n <label class=\"hb-check is-disabled\" id=\"autoThinkL\" hidden><input type=\"checkbox\" id=\"autoThink\" disabled>think on its own when something happens, at most every 25 s</label>\n <div class=\"field\" id=\"askRow\" hidden><label for=\"askIn\">ask the dog</label><input class=\"hb-input\" type=\"text\" id=\"askIn\" disabled placeholder=\"what do you see? enter\" enterkeyhint=\"send\" autocomplete=\"off\"></div>\n <div class=\"hb-heard\" id=\"cortexOut\" data-empty=\"no thoughts yet\"></div>\n <details class=\"hb-fold\" data-ux=\"detail\"><summary>model calls <span class=\"aux\" id=\"dogCallsN\">0</span></summary><div><ol class=\"calls\" id=\"dogCalls\" data-empty=\"no calls yet\"></ol></div></details>\n <details class=\"hb-fold\" id=\"pinspFold\" data-ux=\"detail\"><summary>prompt inspector <span class=\"aux\" id=\"pinspN\">no calls</span></summary>\n <div class=\"hb-pinsp\" id=\"pinsp\">\n <section class=\"hb-pinsp-card\"><h3 class=\"hb-pinsp-hd\">cost <small id=\"pinspWho\">this session</small></h3><dl class=\"hb-pinsp-kv\" id=\"pinspKv\" hidden></dl><p class=\"hb-pinsp-empty\" id=\"pinspKvEmpty\">no calls yet</p></section>\n <section class=\"hb-pinsp-card\"><h3 class=\"hb-pinsp-hd\">tools it sees <small id=\"pinspToolsN\"></small></h3><ul class=\"hb-pinsp-tools is-empty\" id=\"pinspTools\" aria-label=\"tools it sees\"><li class=\"hb-pinsp-tool-none\">none yet</li></ul></section>\n <section class=\"hb-pinsp-card\"><h3 class=\"hb-pinsp-hd\">last plan</h3><pre class=\"hb-pinsp-pre is-empty\" id=\"pinspPlan\">none yet</pre></section>\n <section class=\"hb-pinsp-card\"><h3 class=\"hb-pinsp-hd\">last prompt and reply <button type=\"button\" class=\"hb-pinsp-copy\" id=\"pinspCopy\" hidden>copy</button></h3><pre class=\"hb-pinsp-pre is-empty\" id=\"pinspRaw\" aria-label=\"last prompt and reply\">no language model has been asked yet</pre></section>\n </div>\n </details>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>memory</span><span class=\"hb-hd-aux\" id=\"memN\">0 memories</span></h3>\n <div class=\"meterrow\"><span>importance</span><div class=\"hb-meter\" role=\"progressbar\" aria-label=\"importance toward the next cortex thought\" aria-valuemin=\"0\" aria-valuemax=\"100\" id=\"impMeter\"><i style=\"width:0%\"></i></div><b id=\"impV\">0</b></div>\n <details class=\"hb-fold\" id=\"memFold\" data-ux=\"detail\"><summary>memory stream <span class=\"aux\">newest first</span></summary><div>\n <section class=\"hb-mempanel\" aria-label=\"the dog's memory\">\n <div class=\"hb-mempanel-sec\"><p class=\"hb-mempanel-counts\" id=\"memCounts\">0 memories</p><div class=\"hb-mempanel-store\"><p class=\"hb-mempanel-line\">kept in this tab only. a reload starts a new day; export keeps a copy.</p></div></div>\n <div class=\"hb-mempanel-sec\"><h3 class=\"hb-mempanel-hd\" id=\"memSearchH\">search</h3><input class=\"hb-input\" type=\"search\" id=\"memSearch\" placeholder=\"try ball or human\" aria-labelledby=\"memSearchH\" aria-describedby=\"memSearchM\" autocomplete=\"off\"><p class=\"hb-mempanel-line\" id=\"memSearchM\">search: keyword overlap. with no words the order is the cortex ranking.</p></div>\n <div class=\"hb-mempanel-sec\"><h3 class=\"hb-mempanel-hd\" id=\"memAddH\">add a memory</h3><textarea class=\"hb-textarea\" id=\"memNote\" rows=\"2\" placeholder=\"the ball went over the fence\" aria-labelledby=\"memAddH\"></textarea><div class=\"hb-mempanel-row\"><button type=\"button\" class=\"hb-btn hb-btn-sm\" id=\"memAdd\" disabled>Add</button></div></div>\n <div class=\"hb-mempanel-sec\"><h3 class=\"hb-mempanel-hd\" id=\"memListH\">memories (0)</h3><p class=\"hb-mempanel-empty\" id=\"memEmpty\">nothing remembered yet. play with the dog and it fills.</p><div class=\"hb-mempanel-list\" id=\"memList\" aria-labelledby=\"memListH\"></div></div>\n <div class=\"hb-mempanel-foot\"><button type=\"button\" class=\"hb-btn hb-btn-sm\" id=\"memExport\">Export</button><button type=\"button\" class=\"hb-btn hb-btn-sm hb-mempanel-wipe\" id=\"memWipe\">Erase all</button></div>\n </section>\n <p class=\"note\">scored as the cortex ranks them: recency 0.995 per game hour, importance over 6, plus 0.5 when it names what is in view (park 2023). marked rows went into the last thought.</p></div></details>\n </div>\n <div class=\"hb-panel\" id=\"timelinePanel\">\n <h3 class=\"hb-panel-hd-inst\"><span>timeline</span><span class=\"hb-hd-aux\">the dog and moheeb</span></h3>\n <details class=\"hb-fold\" data-ux=\"detail\"><summary>sense, choice and act, newest first</summary><div>\n <div class=\"hb-causal\">\n <div class=\"hb-causal-filters\" role=\"group\" aria-label=\"show agents\" id=\"tlAgents\"><span class=\"hb-causal-flabel\" aria-hidden=\"true\">who</span><button class=\"hb-chip is-toggle is-on\" type=\"button\" aria-pressed=\"true\" data-agent=\"dog\">dog</button><button class=\"hb-chip is-toggle is-on\" type=\"button\" aria-pressed=\"true\" data-agent=\"human\">moheeb</button></div>\n <div class=\"hb-causal-filters\" role=\"group\" aria-label=\"show kinds\" id=\"tlKinds\"><span class=\"hb-causal-flabel\" aria-hidden=\"true\">kinds</span><button class=\"hb-chip is-toggle is-on\" type=\"button\" aria-pressed=\"true\" data-kind=\"sense\">sense</button><button class=\"hb-chip is-toggle is-on\" type=\"button\" aria-pressed=\"true\" data-kind=\"choice\">choice</button><button class=\"hb-chip is-toggle is-on\" type=\"button\" aria-pressed=\"true\" data-kind=\"act\">act</button><button class=\"hb-chip is-toggle is-on\" type=\"button\" aria-pressed=\"true\" data-kind=\"cue\">cue</button><button class=\"hb-chip is-toggle is-on\" type=\"button\" aria-pressed=\"true\" data-kind=\"reward\">reward</button><button class=\"hb-chip is-toggle is-on\" type=\"button\" aria-pressed=\"true\" data-kind=\"model\">model</button></div>\n <div class=\"hb-causal-list\" role=\"region\" aria-label=\"cause timeline, newest first\" tabindex=\"0\" id=\"tlList\"><ol id=\"tlEvents\"></ol></div>\n </div></div></details>\n </div>\n </section>\n\n <section class=\"pane\" id=\"pBody\" role=\"tabpanel\" aria-labelledby=\"tab-body\" tabindex=\"0\">\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>gait</span><span class=\"hb-hd-aux\" id=\"gaitName\">stand</span></h3>\n <div class=\"hb-seg is-toggle\" id=\"gaitSeg\" role=\"group\" aria-label=\"what drives the legs\" style=\"display:flex;box-shadow:none;margin-bottom:8px\"><button type=\"button\" class=\"is-on\" aria-pressed=\"true\" data-gait=\"cpg\" style=\"flex:1\">pattern generator</button><button type=\"button\" aria-pressed=\"false\" data-gait=\"nn\" style=\"flex:1\">neural gait</button></div>\n <canvas class=\"inst\" id=\"cpg\" width=\"340\" height=\"150\" role=\"img\" aria-label=\"leg phases and gait mix\"></canvas>\n <div class=\"kv\"><b>speed</b><span id=\"kSpeed\">0</span><b>stride frequency</b><span id=\"kFreq\">0</span><b>duty</b><span id=\"kDuty\">0</span><b>turn rate</b><span id=\"kTurn\">0</span><b>posture</b><span id=\"kPost\">stand</span><b>froude</b><span id=\"kFr\">0</span><b>body source</b><span id=\"kSrc\">cpg</span></div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>neural gait</span><span class=\"hb-hd-aux\" id=\"nnSt\">off</span></h3>\n <p class=\"note\">a codebook matching network trained on real dog motion capture (ai4animationpy, paul and sebastian starke) predicts the next half second of a 27 bone dog: walk, pace, trot, canter, sit, lie. it runs in a worker, on webgpu when there is an adapter, retargeted onto this rig. bows, paw lifts and shakes hand back to the pattern generator with an inertialized blend.</p>\n <div class=\"btns\"><button class=\"hb-btn\" id=\"bNnLoad\" type=\"button\">Load neural gait, 17.7 MB</button></div>\n <p class=\"licence\">model and mocap cc by-nc 4.0, no commercial use. fetched when you press load from github, sweriko/ai4anim-webgpu at b539455, checked by sha-256, never bundled.</p>\n <div class=\"kv\"><b>guidance</b><span id=\"kGuide\">-</span><b>inference</b><span id=\"kNnMs\">-</span><b>contacts</b><span id=\"kCont\">-</span></div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>footfalls</span><span class=\"hb-hd-aux\">lf rf lh rh</span></h3>\n <canvas class=\"inst\" id=\"foot\" width=\"340\" height=\"96\" role=\"img\" aria-label=\"footfall plot of the last 4 s\"></canvas>\n <p class=\"note\">hildebrand plot of the last 4 s: dark is stance. a walk shows a four beat lateral sequence, a trot pairs the diagonals, a gallop goes rotary.</p>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>control</span><span class=\"hb-hd-aux\">drive it</span></h3>\n <label class=\"tog\"><input type=\"checkbox\" id=\"manual\">manual drive: w a s d or arrows with the yard focused, shift to run</label>\n <label class=\"tog\"><input type=\"checkbox\" id=\"xray\">x-ray: skeleton, ik targets, contacts</label>\n <label class=\"tog\"><input type=\"checkbox\" id=\"prints\" checked>footprints</label>\n <label class=\"tog\"><input type=\"checkbox\" id=\"ikOn\" checked>leg ik and terrain adaptation</label>\n <label class=\"tog\"><input type=\"checkbox\" id=\"sound\" checked>sound</label>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>model</span><span class=\"hb-hd-aux\" id=\"mdlName\">dog.glb</span></h3>\n <div id=\"mdlInfo\"></div>\n <p class=\"note\">drop another quadruped glb on the yard to swap bodies.</p>\n </div>\n </section>\n\n <section class=\"pane\" id=\"pSense\" role=\"tabpanel\" aria-labelledby=\"tab-sense\" tabindex=\"0\">\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>vision</span><span class=\"hb-hd-aux\" id=\"netSt\">detector off</span></h3>\n <label class=\"tog\"><input type=\"checkbox\" id=\"dogColor\" checked>dichromat color and 20/75 acuity</label>\n <label class=\"tog\"><input type=\"checkbox\" id=\"netOn\" aria-describedby=\"netNote\">yolov8n on the eye feed, 12.8 mb</label>\n <p class=\"licence\" id=\"netNote\">weights agpl 3.0 (ultralytics). fetched when you turn it on from github, hyuto/yolov8-onnxruntime-web at fc4a52c, checked by sha-256, never bundled.</p>\n <label class=\"tog\"><input type=\"checkbox\" id=\"showSal\">show saliency and the current fixation on the eye</label>\n <div class=\"kv\"><b>looking at</b><span id=\"kFocus\">-</span></div>\n <div class=\"lst\" id=\"detList\"></div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>in mind</span><span class=\"hb-hd-aux\" id=\"kFocusMind\">-</span></h3>\n <ul class=\"lines\" id=\"dogSenses\"></ul>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>percepts</span><span class=\"hb-hd-aux\">field of view 240</span></h3>\n <div class=\"lst\" id=\"perList\"></div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>show it</span><span class=\"hb-hd-aux\">photo or webcam</span></h3>\n <div class=\"btns\"><label class=\"hb-btn\" for=\"photoIn\" tabindex=\"0\" id=\"photoPick\">Pick a photo</label><input type=\"file\" id=\"photoIn\" accept=\"image/*\" hidden><button class=\"hb-btn\" id=\"bWebcam\" type=\"button\" aria-pressed=\"false\">Webcam</button><button class=\"hb-btn\" id=\"bClap\" type=\"button\" aria-pressed=\"false\">Clap detection</button></div>\n <p class=\"note\">the dog runs the same detector on whatever you show it: cats get barked at, food gets begged for, balls get a play bow. the webcam asks for the camera and downloads two gesture and face models, 27.3 mb, apache 2.0. clap detection asks for the microphone. with a cortex model loaded the dog also says what it thinks of a photo.</p>\n <div class=\"hb-callout is-warn\" id=\"photoAsk\" hidden role=\"alert\"><p class=\"sub\" style=\"margin:0\">to label photos the dog needs the object detector: 12.8 mb, weights agpl 3.0. load it?</p><div class=\"btns\"><button class=\"hb-btn\" type=\"button\" id=\"bPhotoYes\">Load it and label the photo</button><button class=\"hb-btn\" type=\"button\" id=\"bPhotoNo\">Not now</button></div></div>\n <div id=\"photoView\"><canvas id=\"photo\" width=\"320\" height=\"240\" role=\"img\" aria-label=\"the photo you showed it\"></canvas></div>\n <video id=\"cam\" playsinline muted aria-label=\"your webcam\"></video>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>nose and ears</span><span class=\"hb-hd-aux\" id=\"sniffSt\">-</span></h3>\n <label class=\"tog\"><input type=\"checkbox\" id=\"showPuffs\">show scent puffs in the yard</label>\n <div class=\"kv\"><b>wind</b><span id=\"kWind\">-</span><b>puffs</b><span id=\"kPuffs\">0</span><b>left / right</b><span id=\"kLR\">-</span></div>\n <div class=\"row\"><span class=\"lab\">scent</span><div class=\"bar p\"><i id=\"scentBar\"></i></div><span class=\"v\" id=\"scentV\">0</span></div>\n <div class=\"row\"><span class=\"lab\">sound</span><div class=\"bar\"><i id=\"hearBar\"></i></div><span class=\"v\" id=\"hearV\">0</span></div>\n </div>\n </section>\n\n <section class=\"pane\" id=\"pTrain\" role=\"tabpanel\" aria-labelledby=\"tab-train\" tabindex=\"0\">\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>cues</span><span class=\"hb-hd-aux\">say or click</span></h3>\n <div class=\"chiprow\" id=\"cueBtns\"></div>\n <div class=\"hb-heard\" id=\"heard\" aria-live=\"polite\" data-empty=\"say sit, spin or any new word\"></div>\n <div class=\"field\"><label for=\"dogName\">dog name</label><input class=\"hb-input\" type=\"text\" id=\"dogName\" value=\"Pixel\" autocomplete=\"off\"></div>\n <div class=\"field\"><label for=\"cueIn\">type a cue</label><input class=\"hb-input\" type=\"text\" id=\"cueIn\" placeholder=\"then enter\" enterkeyhint=\"send\" autocomplete=\"off\" autocapitalize=\"none\"></div>\n <p class=\"note\" id=\"micNote\">talk is on the yard. in chrome your voice goes to the browser's speech service to become text; nothing else leaves the page. to teach a new word, say it, wait for whatever the dog does, then praise it.</p>\n </div>\n <div class=\"hb-panel\" id=\"assocPanel\">\n <h3 class=\"hb-panel-hd-inst\"><span>associations</span><span class=\"hb-hd-aux\">rw + pearce kaye hall</span></h3>\n <div class=\"scrollx\"><table class=\"heat\" id=\"heat\"></table></div>\n <p class=\"sub\" id=\"lastTrial\"></p>\n <p class=\"note\">rows are cues, columns are acts. cells show net strength, excitation minus a separate inhibition that fades faster, so an extinguished cue partly comes back after a break. the attn column is each cue's associability: it rises after surprises and falls as the outcome becomes predictable. credit fades with delay, so a slow treat can reward whatever the dog is doing when it lands. if nothing is strong the dog offers tricks it was rewarded for before; teach a new word by praising whatever it does.</p>\n <div class=\"btns\"><button class=\"hb-btn\" id=\"bReset\" type=\"button\">Reset learning</button><button class=\"hb-btn\" id=\"bResetKeep\" type=\"button\" hidden>Keep them</button></div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>what it knows</span><span class=\"hb-hd-aux\" id=\"knownN\">0 words</span></h3>\n <ul class=\"lines\" id=\"knownList\"></ul>\n </div>\n </section>\n\n <section class=\"pane\" id=\"pHuman\" role=\"tabpanel\" aria-labelledby=\"tab-human\" tabindex=\"0\">\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>moheeb</span><span class=\"hb-hd-aux\" id=\"humMode\">runs his day</span></h3>\n <p class=\"big\" id=\"humTask\">idle</p>\n <p class=\"note\" id=\"humWhy\">standing on the porch</p>\n <p class=\"sub\" id=\"humSrc\"></p><p class=\"sub\" id=\"humT\"></p>\n <label class=\"tog\"><input type=\"checkbox\" id=\"humAI\" checked>he runs his own day. off: you drive him with these buttons.</label>\n <label class=\"hb-check is-disabled\" id=\"humMindOnL\"><input type=\"checkbox\" id=\"humMindOn\" disabled>the cortex model picks what he does, at most every 25 s</label>\n <p class=\"reason\" id=\"humMindWhy\"></p>\n <div class=\"btns\"><button class=\"hb-btn\" id=\"bCall\" type=\"button\">Call the dog</button><button class=\"hb-btn\" id=\"bPet\" type=\"button\">Pet the dog</button><button class=\"hb-btn\" id=\"bTrainNow\" type=\"button\">Train a new word</button></div>\n <div class=\"hb-heard\" id=\"humMind\" data-empty=\"his own mind is off\"></div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>voice</span><span class=\"hb-hd-aux\">pocket tts</span></h3>\n <p class=\"note\" id=\"voiceNote\">starts with the browser voice. load pocket tts to speak in his cloned voice, from the clip in this page; the engine downloads once from hugging face.</p>\n <div class=\"btns\"><button class=\"hb-btn\" id=\"bVoiceLoad\" type=\"button\">Load his voice</button><label class=\"tog\"><input type=\"checkbox\" id=\"humVoiceOn\" checked>speak out loud</label></div>\n <p class=\"licence\">engine apache 2.0, models cc by-nc 4.0, no commercial use. kevinahm/pocket-tts-web on hugging face, pinned to one commit.</p>\n <div class=\"hb-heard\" id=\"voiceSt\">browser voice</div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>training</span><span class=\"hb-hd-aux\">he teaches</span></h3>\n <div id=\"humTrain\"></div>\n <p class=\"note\">he says a cue, waits for what the dog does, then praises a match (sometimes with a treat) or says no. those are the same rewards train learns from, so the dog picks up his words too, made up ones like boop included.</p>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>said</span><span class=\"hb-hd-aux\">latest first</span></h3>\n <div class=\"lst\" id=\"humSaid\"></div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>needs</span><span class=\"hb-hd-aux\">last 2 minutes</span></h3>\n <ul class=\"hb-sparks\" id=\"humSparks\" aria-label=\"moheeb's needs\"></ul>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>plan</span><span class=\"hb-hd-aux\" id=\"humPlanAux\">routine</span></h3>\n <div class=\"hb-choice is-quiet\" id=\"humChoice\">\n <p class=\"hb-choice-why\" id=\"humPlanWhy\"></p>\n <ol class=\"hb-choice-list\" id=\"humPlan\" aria-label=\"moheeb's options\"></ol>\n <p class=\"hb-choice-meta\" id=\"humPlanMeta\"></p>\n </div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>mood and senses</span><span class=\"hb-hd-aux\" id=\"humMindSt\">off</span></h3>\n <div id=\"humMood\"></div>\n <details class=\"hb-fold\" data-ux=\"detail\"><summary>model calls <span class=\"aux\" id=\"humCallsN\">0</span></summary><div><ol class=\"calls\" id=\"humCalls\" data-empty=\"no calls yet\"></ol></div></details>\n </div>\n </section>\n\n <section class=\"pane\" id=\"pTune\" role=\"tabpanel\" aria-labelledby=\"tab-tune\" tabindex=\"0\">\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>turn on more</span><span class=\"hb-hd-aux\" id=\"capsCount\">checking</span></h3>\n <p class=\"note\">every optional model, download and permission in one list, with its size, licence and what it needs.</p>\n <div class=\"btns\"><button class=\"hb-btn\" type=\"button\" id=\"bCaps\" data-caps=\"\">Open the list</button></div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>layers and personality</span><span class=\"hb-hd-aux\">every number</span></h3>\n <p class=\"note\">turn parts of the model off to compare, or move any number. changes save in this browser.</p>\n <div id=\"pTuneBody\"></div>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>seeds and scenarios</span></h3>\n <p class=\"note\">open the yard with a fixed seed: the same seed and settings give the same day, frame for frame in lockstep.</p>\n <div class=\"field\"><label for=\"seedIn\">seed</label><input class=\"hb-input\" type=\"number\" inputmode=\"numeric\" id=\"seedIn\" min=\"1\" step=\"1\" value=\"7\"></div>\n <div class=\"field\"><label for=\"speedIn\">sim speed</label><select class=\"hb-select\" id=\"speedIn\"><option value=\"1\">1x</option><option value=\"2\">2x</option><option value=\"4\">4x</option></select></div>\n <label class=\"tog\"><input type=\"checkbox\" id=\"seedNn\">start with the neural gait on</label>\n <div class=\"btns\"><button class=\"hb-btn\" type=\"button\" id=\"bSeedGo\">Reopen with this seed</button></div>\n <p class=\"sub\" id=\"seedNow\"></p>\n <p class=\"note\">the hash takes <code>#seed=7&amp;speed=1&amp;on=L.neural&amp;off=L.day</code>. lockstep runs use <code>#test&amp;seed=7</code>. the scenario runner: <code>node scenarios/run.mjs compare</code>, see scenarios/README.md.</p>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>events</span><span class=\"hb-hd-aux\">notes, loads, failures</span></h3>\n <section class=\"hb-evlog\" id=\"evlog\">\n <div class=\"hb-evlog-head\"><span class=\"hb-evlog-label\">events</span><span class=\"hb-evlog-count\" id=\"evlogN\" aria-label=\"rows\">0</span></div>\n <div class=\"hb-evlog-box\"><div class=\"hb-evlog-rows\" role=\"log\" aria-label=\"events\" tabindex=\"0\" id=\"evlogRows\"><p class=\"hb-evlog-empty\" id=\"evlogEmpty\">nothing logged yet</p></div></div>\n </section>\n </div>\n </section>\n\n <section class=\"pane about\" id=\"pAbout\" role=\"tabpanel\" aria-labelledby=\"tab-how\" tabindex=\"0\">\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>stack</span><span class=\"hb-hd-aux\">all local</span></h3>\n <p>body: the owner's dog model, drawn by three.js on webgpu with a webgl2 fallback. two motion sources share the rig, a central pattern generator (walk, pace, trot, canter, gallop picked by froude number, raibert foot placement, two bone ik) and the neural gait (paws pinned by predicted contacts, retargeted as paw targets). switches between them are inertialized so nothing snaps. springs drive posture, gaze, ears and a tail with eight wag modes.</p>\n <p>brain: each act scores by how much it would reduce the dog's needs (keramati and gutkin 2011). the choice is sampled from a softmax with a commitment bonus; urgent acts start after a short heavy tailed latency while the head turns first. sleep pressure and a two peak body clock run onset, nrem, rem and wake. learning is rescorla wagner with pearce kaye hall associability, a faster fading inhibition and eligibility traces.</p>\n <p>senses: itti koch saliency on the dog eye frame with top down drive bias and inhibition of return, looming startle from time to contact, per dog sound direction error, a scent plume sampled in sniff bouts and tracked upwind. yolov8n labels the eye feed when you turn it on.</p>\n <p>human: moheeb with retargeted quaternius clips (cc0), a gaze model, velocity springs, planted feet and a phased throw. his day runs on needs and an hourly routine; the top three options are drawn at random, weighted.</p>\n <p>cortex: gemma 4 e2b or lfm2-vl 450m on webgpu sets goals on events, from a memory stream ranked by recency, importance and relevance (park 2023). reflexes and timing stay in code.</p>\n <p>packages: <code>@hackbuild/gait</code>, <code>@hackbuild/motion-net</code>, <code>@hackbuild/senses</code>, <code>@hackbuild/drives</code>, <code>@hackbuild/cameras</code>, <code>@hackbuild/tunables</code>, all mit. physics is rapier.</p>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>licences</span><span class=\"hb-hd-aux\">in this page</span></h3>\n <p>app code mit. the dog, his model and his voice clip are the owner's own. three.js mit, rapier apache 2.0, fonts apache 2.0 and ofl 1.1, animation clips cc0. fetched only when you ask: the neural gait model and mocap cc by-nc 4.0, yolov8n agpl 3.0, pocket tts engine apache 2.0 with cc by-nc 4.0 models, the cortex and mediapipe models under their own licences. LICENCES.md in the repository has the full list.</p>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>elsewhere</span><span class=\"hb-hd-aux\">the parts on their own</span></h3>\n <p>each package has a page with a small live stage: <a class=\"hb-link\" href=\"https://hackbuild.github.io/hackbuild-motion/gait/\">gait</a>, <a class=\"hb-link\" href=\"https://hackbuild.github.io/hackbuild-motion/motion-net/\">motion-net</a>, <a class=\"hb-link\" href=\"https://hackbuild.github.io/hackbuild-agents/senses/\">senses</a>, <a class=\"hb-link\" href=\"https://hackbuild.github.io/hackbuild-agents/drives/\">drives</a>, <a class=\"hb-link\" href=\"https://hackbuild.github.io/hackbuild-agents/cameras/\">cameras</a>, <a class=\"hb-link\" href=\"https://hackbuild.github.io/hackbuild-agents/tunables/\">tunables</a>, <a class=\"hb-link\" href=\"https://hackbuild.github.io/hackbuild-browser-ai/weights/\">weights</a>.</p>\n <p data-suite-only hidden>the suite has each as a tool: <a class=\"hb-link\" data-suite=\"#/motion/gait\">gait</a>, <a class=\"hb-link\" data-suite=\"#/motion/motion-net\">motion-net</a>, <a class=\"hb-link\" data-suite=\"#/agents/senses\">senses</a>, <a class=\"hb-link\" data-suite=\"#/agents/drives\">drives</a>, <a class=\"hb-link\" data-suite=\"#/voice/speak\">speech</a>, <a class=\"hb-link\" data-suite=\"#/rooms\">rooms</a>. a model fetched there is stored for this page too, and the other way round.</p>\n </div>\n <div class=\"hb-panel\">\n <h3 class=\"hb-panel-hd-inst\"><span>keys</span></h3>\n <p>with the yard focused: w a s d or arrows move the free camera, q and e lower and raise it, f follows the dog again. ctrl k or / opens every command by name. tab moves between controls; the arrow keys move between tabs.</p>\n </div>\n </section>\n </div>\n</aside>\n</div>\n<p class=\"hb-sr\" id=\"live\" role=\"status\" aria-live=\"polite\"></p>\n<div class=\"hb-drawer\" id=\"caps\" hidden>\n <div class=\"hb-drawer-panel\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"capsTitle\">\n <div class=\"caps-hd\"><h2 id=\"capsTitle\">turn on more</h2><button class=\"hb-btn hb-btn-sm\" type=\"button\" id=\"capsClose\">close</button></div>\n <div id=\"capsBody\"></div>\n </div>\n</div>\n\n<div class=\"setup-scrim\" id=\"setup\" hidden>\n <div class=\"setup-card\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"setupH\" data-ux=\"setup\" tabindex=\"-1\">\n <div class=\"setup-head\"><span>HACKLE // setup</span><button type=\"button\" id=\"setupClose\" aria-label=\"close setup\">x</button></div>\n <div class=\"setup-body\">\n <div class=\"setup-top\"><h2 id=\"setupH\">this is <span id=\"setupName\">pixel</span><b>.</b></h2>\n <div class=\"field\"><label for=\"setupNameIn\">name</label><input class=\"hb-input\" type=\"text\" id=\"setupNameIn\" autocomplete=\"off\"></div></div>\n <p class=\"setup-line\">a dog and its person in a yard. everything runs in this tab; nothing downloads until you pick it.</p>\n <div class=\"setup-modes\" id=\"setupModes\" role=\"radiogroup\" aria-label=\"how to start\">\n <button type=\"button\" role=\"radio\" aria-checked=\"true\" data-mode=\"play\"><b>just play</b><em>nothing to download</em><span>yard, ball, treats, training, both minds by rule</span><i class=\"badge\"></i></button>\n <button type=\"button\" role=\"radio\" aria-checked=\"false\" data-mode=\"eyes\"><b>eyes and legs</b><em></em><span>a neural gait from dog motion capture and a detector on the dog eye</span><i class=\"badge\"></i></button>\n <button type=\"button\" role=\"radio\" aria-checked=\"false\" data-mode=\"think\"><b>thinking dog</b><em></em><span>both, plus a cortex model that sets goals, and his voice</span><i class=\"badge\"></i></button>\n </div>\n <p class=\"setup-gpu\" id=\"setupGpu\" hidden>no webgpu here, the yard draws on webgl2</p>\n <ul class=\"setup-list\" id=\"setupList\" data-ux=\"detail\" aria-label=\"everything you can turn on\"></ul>\n </div>\n <div class=\"setup-foot\"><button class=\"hb-btn hb-btn-go\" type=\"button\" id=\"setupStart\">start, nothing to download</button><button class=\"hb-btn\" type=\"button\" id=\"setupLook\">just look around</button></div>\n </div>\n</div>\n\n<div class=\"hb-modal hb-palette\" id=\"palette\" role=\"dialog\" aria-modal=\"true\" aria-label=\"commands\" hidden>\n <div class=\"hb-panel\" tabindex=\"-1\">\n <div class=\"hb-palette-field\"><span class=\"hb-palette-prompt\" aria-hidden=\"true\">&gt;</span><input class=\"hb-palette-input\" type=\"text\" placeholder=\"type what to do: throw, minds, camera\" aria-label=\"commands\"></div>\n <div class=\"hb-palette-list\" id=\"paletteList\" role=\"listbox\" aria-label=\"commands\"></div>\n <p class=\"hb-palette-empty\" hidden>nothing matches that.</p>\n <p class=\"hb-palette-foot\">up and down move, enter runs, esc closes.</p>\n </div>\n</div>\n";
15
15
  export const YARD_BAR_HTML = " <div class=\"hchips\">\n <span class=\"chip\" id=\"chipGpu\" title=\"the renderer this browser gave the yard\">gpu ...</span>\n <span class=\"chip\" id=\"chipPhys\" title=\"the physics engine\">phys ...</span>\n <span class=\"chip\" id=\"chipNet\" title=\"the object detector on the dog eye\">eye net off</span>\n <span class=\"chip\" id=\"chipClock\" title=\"the time of day in the yard\">10:00</span>\n <span class=\"chip\" id=\"chipFps\" title=\"frames per second\">--</span>\n </div>\n <button class=\"hb-btn\" id=\"bSetup\" type=\"button\" aria-haspopup=\"dialog\" aria-controls=\"setup\">setup</button>\n <button class=\"hb-iconbtn\" id=\"bPalette\" type=\"button\" aria-haspopup=\"dialog\" aria-controls=\"palette\" aria-label=\"commands: every action by name\" title=\"commands (ctrl k or /)\"></button>\n";
16
16
  const CORTEX_WORKER = "// body of the cortex runner: run inside a module worker, or on the main thread if workers fail; post() sends results back\nconst TJS = 'https://cdn.jsdelivr.net/npm/@huggingface/transformers@4.3.2/dist/transformers.min.js';\nlet T = null, proc = null, model = null, kind = null, cid = 0;\nconst pend = new Map();\nconst files = {};\nfunction prog(p) {\n if (p.status !== 'progress' || !p.total) return;\n files[p.file] = [p.loaded, p.total];\n let a = 0, b = 0; for (const k in files) { a += files[k][0]; b += files[k][1]; }\n post({ t: 'progress', loaded: a, total: b });\n}\nreturn async m => {\n try {\n if (m.t === 'cache') { const r = pend.get(m.cid); pend.delete(m.cid); if (r) r(m.blob ? new Response(m.blob) : undefined); return; }\n if (m.t === 'load') {\n T = await import(TJS); kind = m.kind;\n // a model hub in place of hugging face, when the host names one\n if (m.hub) T.env.remoteHost = m.hub;\n // files are looked up in and saved to the page's shared weight store, so a model fetched\n // by another hack.build page on this origin is not fetched again\n T.env.useBrowserCache = false; T.env.useCustomCache = true;\n T.env.customCache = {\n match: r => new Promise(res => { const id = ++cid; pend.set(id, res); post({ t: 'cache-match', cid: id, url: String(r && r.url || r) }); }),\n put: async (r, resp) => { post({ t: 'cache-put', url: String(r && r.url || r), blob: await resp.blob() }); }\n };\n const Cls = kind === 'gemma' ? T.Gemma4ForConditionalGeneration : T.Lfm2VlForConditionalGeneration;\n proc = await T.AutoProcessor.from_pretrained(m.id, { revision: m.rev, progress_callback: prog });\n model = await Cls.from_pretrained(m.id, { revision: m.rev, dtype: 'q4f16', device: 'webgpu', progress_callback: prog });\n post({ t: 'ready' });\n } else if (m.t === 'ask') {\n const img = new T.RawImage(new Uint8ClampedArray(m.rgba), m.w, m.h, 4).rgb();\n const messages = [{ role: 'user', content: [{ type: 'image' }, { type: 'text', text: m.prompt }] }];\n const prompt = proc.apply_chat_template(messages, { add_generation_prompt: true, enable_thinking: false });\n const inputs = kind === 'gemma' ? await proc(prompt, img, null, { add_special_tokens: false }) : await proc(img, prompt, { add_special_tokens: false });\n const t0 = performance.now();\n const out = await model.generate({ ...inputs, max_new_tokens: m.max || 80, do_sample: false });\n const n = inputs.input_ids.dims.at(-1);\n const text = proc.batch_decode(out.slice(null, [n, null]), { skip_special_tokens: true })[0];\n post({ t: 'answer', id: m.id, text, ms: performance.now() - t0, tokens: out.dims.at(-1) - n, inTokens: n });\n }\n } catch (err) { post({ t: 'error', id: m.t === 'load' ? null : m.id, msg: String((err && err.message) || err) }); }\n};\n";
package/dist/yard.d.ts CHANGED
@@ -23,7 +23,8 @@ export interface YardOptions {
23
23
  hub?: string;
24
24
  /**
25
25
  * Where the readout chips, the setup button and the command button go, such as the host's
26
- * header. Left out, the two buttons join the verb row and the chips are not shown.
26
+ * header. Left out, the two buttons float in the stage's top right corner, apart from the verbs,
27
+ * and the chips are not shown.
27
28
  */
28
29
  bar?: HTMLElement | null;
29
30
  /**
package/dist/yard.js CHANGED
@@ -58,11 +58,15 @@ export async function mountYard(host, o) {
58
58
  o.bar.append(...barParts);
59
59
  }
60
60
  else {
61
- // no bar: setup and commands sit at the end of the verb row; the chips stay off the page
62
- const tool = root.querySelector("#tool");
61
+ // no bar: setup and commands float in the stage corner, apart from the verbs; no chips
62
+ const corner = doc.createElement("div");
63
+ corner.id = "corner";
64
+ corner.setAttribute("aria-label", "setup and commands");
65
+ corner.setAttribute("role", "group");
63
66
  for (const p of barParts)
64
67
  if (p.tagName === "BUTTON")
65
- tool?.append(p);
68
+ corner.append(p);
69
+ root.querySelector("#stage")?.prepend(corner);
66
70
  }
67
71
  host.replaceChildren(root);
68
72
  const cleanups = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hackbuild/agents-views",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Views that bind the agents packages to the hackbuild-ui class layer: the behaviour, utility and drive bars, the cues by acts associations table, the eye inset, and Yard, the dog simulator's stage and rack as one view. Each small view ships as a Vue component and as a custom element.",
5
5
  "type": "module",
6
6
  "license": "MIT",