@floless/app 0.89.0 → 0.89.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.
@@ -53106,7 +53106,7 @@ function appVersion() {
53106
53106
  return resolveVersion({
53107
53107
  isSea: isSea2(),
53108
53108
  sqVersionXml: readSqVersionXml(),
53109
- define: true ? "0.89.0" : void 0,
53109
+ define: true ? "0.89.2" : void 0,
53110
53110
  pkgVersion: readPkgVersion()
53111
53111
  });
53112
53112
  }
@@ -53116,7 +53116,7 @@ function resolveChannel(s) {
53116
53116
  return "dev";
53117
53117
  }
53118
53118
  function appChannel() {
53119
- return resolveChannel({ isSea: isSea2(), define: true ? "0.89.0" : void 0 });
53119
+ return resolveChannel({ isSea: isSea2(), define: true ? "0.89.2" : void 0 });
53120
53120
  }
53121
53121
 
53122
53122
  // workflow-update.ts
@@ -45,6 +45,9 @@
45
45
  select,input{background:#0f172a;color:var(--text);border:1px solid #475569;border-radius:6px;padding:6px;width:100%;font:13px system-ui}
46
46
  .row{margin:8px 0} .danger{background:#7f1d1d;border-color:#991b1b} .danger:hover{background:#991b1b}
47
47
  .pill{display:inline-block;padding:1px 6px;border-radius:4px;font-size:11px}
48
+ .pill-clickable{cursor:pointer;text-decoration:underline dotted rgba(254,202,202,.55);text-underline-offset:2px}
49
+ .pill-clickable:hover{filter:brightness(1.18)}
50
+ .pill-clickable:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
48
51
  line.member{cursor:pointer;stroke-width:6;stroke-linecap:round} /* default (drag-move OFF): a click selects → the pointer cursor tells the truth */
49
52
  body.dragmove line.member{cursor:move} /* drag-move ON: the move cursor signals a drag will translate — a per-hover second signal beside the toolbar pill */
50
53
  line.member.sel{stroke-width:7} line.member.rfi{stroke-dasharray:10 6}
@@ -221,6 +224,7 @@
221
224
  .ftab th{text-align:left;color:var(--mut);font-size:11px;text-transform:uppercase;letter-spacing:.04em;padding:7px 10px;border-bottom:1px solid var(--line)}
222
225
  .ftab td{padding:7px 10px;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}
223
226
  .ftab tbody tr:hover{background:#0b1220} .ftab .gcell{font-weight:600;color:var(--brand)}
227
+ tr.rfi-row-focused{background:rgba(127,29,29,.28);transition:background-color .6s ease} tr.rfi-row-focused td:first-child{box-shadow:inset 3px 0 0 #fecaca}
224
228
  #comboPop{position:fixed;z-index:30;background:var(--panel);border:1px solid #475569;border-radius:6px;max-height:240px;overflow:auto;box-shadow:0 8px 24px rgba(0,0,0,.5);display:none}
225
229
  #comboPop .opt{padding:6px 10px;cursor:pointer;font-size:13px;color:var(--text);white-space:nowrap}
226
230
  #comboPop .opt:hover,#comboPop .opt.active{background:#334155}
@@ -2597,7 +2601,7 @@ function panel(){
2597
2601
  <div class=row><label>Profile</label><div style="display:flex;gap:6px"><input id=pf class=combo data-src=profiles value="${esc(m.profile)}" style="flex:1" autocomplete=off><button id=pickProf class="ghost${(picking&&pickKind==='profile')?' on':''}" data-tip="Pick profile by clicking a label in the drawing">⌖ pick</button></div>${(picking&&pickKind==='profile')?'<div class="hint" style="margin-top:4px;font-style:italic;color:var(--brand)">Click a profile label in the drawing…</div>':(picking&&pickKind==='detail')?'<div class="hint" style="margin-top:4px;font-style:italic;color:#a855f7">Click a detail callout in the drawing…</div>':''}</div>
2598
2602
  ${memberTypeField('mTypeS',[m])}
2599
2603
  ${braceSect}
2600
- <div class="row hint">Length <b>${L} ft</b> · ${wpf==null?'<span class=pill style="background:#7f1d1d">RFI — size unresolved</span>':'Weight <b>'+(_lenFt(m)*wpf).toFixed(0)+' lb</b> · '+wpf+' lb/ft'}</div>
2604
+ <div class="row hint">Length <b>${L} ft</b> · ${wpf==null?'<span id=rfiPill class="pill pill-clickable" role=button tabindex=0 data-tip="Open the RFI list, focused on this member" style="background:#7f1d1d">RFI — size unresolved</span>':'Weight <b>'+(_lenFt(m)*wpf).toFixed(0)+' lb</b> · '+wpf+' lb/ft'}</div>
2601
2605
  <div class=row><button class=ghostw id=verifyBtn${m.verified?' style="border-color:#166534;color:#86efac"':''} data-tip="Mark this member human-confirmed → 100% in the confidence report">${m.verified?'✓ Verified — human-confirmed':'Mark verified'}</button></div>
2602
2606
  ${mfSug.length?`<div class="row" style="border:1px solid #a855f7;border-radius:6px;padding:7px 8px;background:rgba(168,85,247,.07)"><div class=elab style="color:#c4b5fd;margin:0">Moment-frame girder · ${_lvl==='roof'?'roof':'2nd floor'} (from Frames)</div><div style="display:flex;flex-wrap:wrap;gap:5px;margin-top:5px">${mfSug.map(s=>`<button class="ghost mfsug${s===m.profile?' on':''}" data-s="${esc(s)}">${esc(s)}</button>`).join('')}</div></div>`:''}
2603
2607
  ${elev}
@@ -2613,6 +2617,7 @@ function panel(){
2613
2617
  <div class=row><button class=ghostw id=swapEnds data-tip="Reverse the member: swap the start (${col?'bottom':'yellow'}) and end (${col?'top':'magenta'}) handles · Shortcut: P">⇄ Swap start ↔ end <span style="opacity:.55">(P)</span></button></div>`}
2614
2618
  <div class="row f"><button class=danger id=del>Delete member</button></div>`;
2615
2619
  document.getElementById('pf').onchange=e=>edit(()=>{const v=e.target.value.toUpperCase().replace(/ /g,'');m.profile=v;m.rfi=(_wt(v)==null);if(v&&!profs.includes(v)){profs.push(v);profs.sort();}});
2620
+ {const rp=document.getElementById('rfiPill');if(rp){const go=()=>openRFI(m.id);rp.onclick=go;rp.onkeydown=e=>{if(e.key==='Enter'||e.key===' '){e.preventDefault();e.stopPropagation();go();}};}} // F12: the RFI pill opens the list focused on THIS member (role=button span → keydown for Enter/Space). stopPropagation so idle Space/Enter doesn't ALSO hit the global repeat-last handler (:3804) — matches the editor's local-keydown convention (:1738,:4212)
2616
2621
  document.getElementById('pickProf').onclick=()=>{if(picking&&pickKind==='profile'){picking=false;}else{picking=true;pickKind='profile';pickEnd=null;}render();};
2617
2622
  document.getElementById('mTypeS').onchange=e=>{const v=e.target.value;if(!normMemberTypeKey(v)){e.target.value=memberTypeLabel(memberTypeOf(m));return;}edit(()=>{const k=memberTypeFromInput(v);if(k&&memberTypeOf(m)!==k)applyMemberType([m],k);});}; // retype → role + legend recategorize (edit() → sync3D → build3DLegend); undoable
2618
2623
  document.querySelectorAll('.mfsug').forEach(b=>b.onclick=()=>edit(()=>{m.profile=b.dataset.s;m.mf=true;m.rfi=(_wt(m.profile)==null);if(!profs.includes(m.profile)){profs.push(m.profile);profs.sort();}})); // record the moment-frame provenance (drives the confidence "schedule-resolved" factor)
@@ -5194,9 +5199,19 @@ function applyViewState(on){ // flip the toggle + swap the canvases (
5194
5199
  }
5195
5200
  async function setView(on){
5196
5201
  drawDraft=null;drawPrevClear(); // any view switch drops an in-progress 2D Add-member start — it's a plan-pixel point, meaningless after the switch (else a stale point finishes a member on return)
5202
+ // B6: cancel the 2D-only panel-takeover / armed-pick tools on any view switch. They have no 3D counterpart, so if
5203
+ // left armed they take over the panel while you're in 3D or silently resume on return to 2D (the "active command
5204
+ // survives a 2D↔3D switch" bug). Cross-view tools stay armed by design and setView only drops their in-progress
5205
+ // pick/draft (above/below): Move/Copy (cmTool, cmClear3d), Add-member (mode==='add', drEscape) AND Extend/Trim/
5206
+ // Split (geoMode — the 3D view arms it via E/S and drives it through view3dApi.onTrimExtend/onSplit).
5207
+ let disarmed2d=gridMode||csaxisMode||picking; // captured BEFORE disarming; we repaint ONCE after EVERY 2D-only cancel below (incl. the dim/dim-style ones)
5208
+ if(gridMode)setGridMode(false); // tears down the grid panel + clears gridPick/gridLinePick + snapClear
5209
+ if(csaxisMode){csaxisMode=false;setCsMode();} // drops the in-progress origin (csDraft) + the set-axes panel
5210
+ if(picking){picking=false;pickKind='profile';pickEnd=null;} // an armed inspector ⌖ pick
5197
5211
  if(on){
5198
- if(dimMode||dimChain||dimSplitMode){dimMode=dimChain=dimSplitMode=false;selDimIds.clear();setDimMode();document.body.classList.remove('dimsplit');} // entering 3D disarms the 2D dim/chain/split tools so their X/Y/F/S/Esc keys don't double-fire with the 3D tool
5199
- dimStyleMode=false; // …and closes the 2D Dimension style pane (it styles the 2D overlay only)
5212
+ if(dimMode||dimChain||dimSplitMode){disarmed2d=true;dimMode=dimChain=dimSplitMode=false;selDimIds.clear();setDimMode();document.body.classList.remove('dimsplit');} // entering 3D disarms the 2D dim/chain/split tools so their X/Y/F/S/Esc keys don't double-fire with the 3D tool
5213
+ if(dimStyleMode){disarmed2d=true;dimStyleMode=false;} // …and closes the 2D Dimension style pane (it styles the 2D overlay only)
5214
+ if(disarmed2d)render(); // repaint the 2D SVG + inspector ONCE, now that EVERY 2D-only tool is disarmed and view3d is still false (2D render path): they suppress callouts / draw pick hotspots (:2061,:2069) and take over #panel, and the return-to-2D path never render()s — so a render here (like the Esc paths) un-stales the canvas + panel. Deferred past the dim/dim-style disarm so it can't paint a still-armed Dimension panel (dimMode can coexist with grid/pick) that then goes stale.
5200
5215
  if(cmTool){cmDraft=null;cmPrevClear();cmHudClose();} // Move/Copy stays armed across the view switch — only the in-progress 2D pick is dropped (it's in plan px)
5201
5216
  if(selIds.size)sel3dDimIds.clear(); // a member selected in 2D wins over a stale 3D-dim selection
5202
5217
  if(!window.Steel3DView){toast('3D view unavailable (renderer failed to load)');return;} // stay in 2D
@@ -5213,8 +5228,10 @@ async function setView(on){
5213
5228
  toast('Could not open 3D view: '+((e&&e.message)||e));
5214
5229
  }
5215
5230
  }else{if(cmTool&&window.Steel3DView&&window.Steel3DView.cmClear3d)window.Steel3DView.cmClear3d(); // 3D→2D: drop the mm-space pick the same way (tool stays armed)
5216
- applyViewState(false);if(window.Steel3DView)window.Steel3DView.hide();}
5231
+ applyViewState(false);if(window.Steel3DView)window.Steel3DView.hide();
5232
+ if(disarmed2d)render();} // grid/set-axes/pick can be armed while IN 3D too (csSetB/gridEditB/pickProf carry no view3d guard, and set-axes/pick render() on arm → they suppress callouts / draw hotspots into the hidden 2D SVG). We disarmed them at the top; repaint here — now that applyViewState set view3d false — else the 2D UI comes back stale.
5217
5233
  if(propPopOpen()){if(propPopPinned){dockPropPop();renderPropPop();}else closePropPop(true);} // the popup is anchored to one canvas — re-dock if pinned (renderPropPop re-syncs its "Show in this view" checkbox to the now-live view), else dismiss on the view switch
5234
+ panel(); // repaint the inspector for the NOW-current view (view3d is final here): a cross-view tool stays armed but its in-progress draft was dropped above — Add-member's drawHint (:2288) and Move/Copy's cmHint are view-specific, so without this the panel keeps the stale 2D "Click 2: end" (drawDraft already null) instead of the 3D working-plane hint (and vice-versa on return)
5218
5235
  refreshPropLabels3d();updatePropHint(); // push the label set to whichever view is now live (3D shows them; 2D hides the 3D host) + refresh the corner note
5219
5236
  }
5220
5237
  document.getElementById('vt2d').onclick=()=>{if(view3d)setView(false);};
@@ -5459,7 +5476,8 @@ function zoomToMembers(arr){if(!arr.length){fitToWindow();return;}
5459
5476
  applyZoom(Math.min(stage.clientWidth/(w*1.35),stage.clientHeight/(h*1.35)));
5460
5477
  const cx=(x0+x1)/2,cy=(y0+y1)/2;stage.scrollLeft=(cx-X0)*zoom-stage.clientWidth/2;stage.scrollTop=(cy-Y0)*zoom-stage.clientHeight/2;}
5461
5478
  function zoomToSelection(){zoomToMembers(sel2d());}
5462
- function openRFI(){const g=document.getElementById('rfiGrid');const list=rfiList();
5479
+ function openRFI(focusId){focusId=(typeof focusId==='string')?focusId:null; // #rfiStat binds openRFI directly (arg = MouseEvent) and the post-edit refresh passes nothing — only a real id string focuses a row
5480
+ const g=document.getElementById('rfiGrid');const list=rfiList();
5463
5481
  g.innerHTML=list.length?('<div class=hint style="margin-bottom:10px">'+list.length+' member'+(list.length>1?'s':'')+' have no resolved AISC size, so their weight is excluded from the BOM. Assign a profile to clear it — for <b>MF/BF</b> marks use the <b>Frames</b> schedule. Edits here update the contract.</div><table class=ftab><thead><tr><th>#</th><th>Profile / mark</th><th>Role</th><th>Length</th><th>Why it’s flagged</th><th></th></tr></thead><tbody>'+
5464
5482
  list.map((m,i)=>{ensureMeta(m);const L=_lenFt(m).toFixed(1);
5465
5483
  return `<tr><td><span class=rfichip>${i+1}</span></td>
@@ -5470,7 +5488,9 @@ function openRFI(){const g=document.getElementById('rfiGrid');const list=rfiList
5470
5488
  g.querySelectorAll('input.combo[data-mid]').forEach(inp=>inp.onchange=e=>{const m=byId(inp.dataset.mid);if(!m)return;
5471
5489
  const v=e.target.value.toUpperCase().replace(/ /g,'');edit(()=>{m.profile=v;m.rfi=(_wt(v)==null);if(v&&!profs.includes(v)){profs.push(v);profs.sort();}});openRFI();});
5472
5490
  g.querySelectorAll('button[data-loc]').forEach(b=>b.onclick=()=>{const m=byId(b.dataset.loc);if(!m)return;selDimIds.clear();selIds=new Set([m.id]);geoMode=null;setGeo();closeRFI();render();zoomToMember(m);});
5473
- document.getElementById('rfiModal').style.display='flex';}
5491
+ document.getElementById('rfiModal').style.display='flex';
5492
+ if(focusId){const inp=[...g.querySelectorAll('input.combo[data-mid]')].find(i=>i.dataset.mid===focusId);const row=inp&&inp.closest('tr'); // find via the row's profile input — avoids CSS-escaping the id
5493
+ if(row){row.classList.add('rfi-row-focused');row.scrollIntoView({block:'center'});inp.focus({preventScroll:true});}}} // move keyboard focus INTO the modal (the pill is keyboard-reachable) — the row is already scrolled+highlighted so landing in its input is coherent, not a blind jump; preventScroll keeps the row centered. No cleanup: innerHTML is rebuilt every open, so the class can't go stale
5474
5494
  function closeRFI(){document.getElementById('rfiModal').style.display='none';}
5475
5495
  function rfiOpen(){return document.getElementById('rfiModal').style.display==='flex';}
5476
5496
  document.getElementById('rfiStat').onclick=openRFI;
@@ -5701,7 +5721,7 @@ comboPop.addEventListener('mousedown',e=>{const o=e.target.closest('.opt');if(!o
5701
5721
  document.addEventListener('focusin',e=>{if(e.target.classList&&e.target.classList.contains('combo')){if(e.target.dataset.src==='membertypes')e.target.dataset.orig=e.target.value;showCombo(e.target);}});
5702
5722
  document.addEventListener('input',e=>{if(e.target===comboInput)showCombo(e.target);});
5703
5723
  document.addEventListener('focusout',e=>{if(e.target===comboInput)setTimeout(hideCombo,150);});
5704
- document.addEventListener('keydown',e=>{if(!comboInput||comboPop.style.display==='none')return;
5724
+ document.addEventListener('keydown',e=>{if(!comboInput||comboPop.style.display==='none'||document.activeElement!==comboInput)return; // only steer combo keys while its input is STILL focused — focusout defers hideCombo() 150ms, so Tab→another control→Enter within that window must reach the new control (e.g. the F12 RFI pill), not get eaten here
5705
5725
  const opts=[...comboPop.querySelectorAll('.opt')];if(!opts.length)return;
5706
5726
  if(e.key==='ArrowDown')comboIdx=Math.min(opts.length-1,comboIdx+1);
5707
5727
  else if(e.key==='ArrowUp')comboIdx=Math.max(0,comboIdx-1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floless/app",
3
- "version": "0.89.0",
3
+ "version": "0.89.2",
4
4
  "type": "module",
5
5
  "description": "Thin localhost host for floless.app — serves web/ and shells the aware CLI. No engine, no LLM.",
6
6
  "bin": {