@floless/app 0.89.2 → 0.89.3

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.2" : void 0,
53109
+ define: true ? "0.89.3" : 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.2" : void 0 });
53119
+ return resolveChannel({ isSea: isSea2(), define: true ? "0.89.3" : void 0 });
53120
53120
  }
53121
53121
 
53122
53122
  // workflow-update.ts
@@ -106,6 +106,15 @@
106
106
  .edec{display:block;text-align:right;color:var(--mut);font-size:11px;margin-top:2px;font-variant-numeric:tabular-nums}
107
107
  .elabrow{display:flex;align-items:center;justify-content:space-between;margin:8px 0 2px}
108
108
  .elabrow .elab{margin:0}
109
+ /* F4: select-by-type filter — one clickable chip per object type in a MIXED selection. Click a chip to
110
+ DROP that type from the selection (real narrowing). Ghost look (overrides the global filled button); a
111
+ dashed border marks the Dimensions chip as a categorically different (annotation) object. */
112
+ .tfstrip{margin:2px 0 10px}
113
+ .tfchips{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
114
+ .tfchip{background:transparent;border:1px solid var(--line);color:var(--text);font:11px/1.4 system-ui;padding:2px 9px;border-radius:999px;cursor:pointer;white-space:nowrap}
115
+ .tfchip:hover{background:transparent;border-color:var(--brand);color:var(--brand)}
116
+ .tfchip:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
117
+ .tfchip.tfdim{border-style:dashed}
109
118
  .defck{display:inline-flex;align-items:center;gap:4px;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--mut);cursor:pointer}
110
119
  .defck input{width:auto;margin:0;cursor:pointer;accent-color:var(--brand)}
111
120
  input:disabled{opacity:.55;cursor:default}
@@ -2283,10 +2292,10 @@ function panel(){
2283
2292
  if(mode==='add'){
2284
2293
  const pk=picking&&pickKind==='profile';
2285
2294
  p.innerHTML=`<span class=badge>Add member</span>
2286
- <div class=sect>Current profile</div>
2295
+ ${memberTypeField('mTypeA',[{memberType:addType}])}
2296
+ <div class=sect style="margin-top:8px">Current profile</div>
2287
2297
  <div style="display:flex;gap:6px"><input id=addProf class=combo data-src=profiles placeholder="type or pick (e.g. W16X26)" value="${esc(addProfile)}" style="flex:1" autocomplete=off><button id=addPick class="ghost${pk?' on':''}" data-tip="Pick profile by clicking a label in the drawing">⌖ pick</button></div>
2288
2298
  <div class=hint id=pickHint style="margin-top:4px;font-style:italic${pk?';color:var(--brand)':''}">${pk?'Click a profile label in the drawing…':'or click a label in the drawing'}</div>
2289
- ${memberTypeField('mTypeA',[{memberType:addType}])}
2290
2299
  <div class=divrow><hr></div>
2291
2300
  <div class=sect>Draw a member</div>
2292
2301
  <div class=hint id=drawHint>${view3d?'✏️ Click the start then the end — both land on the <b>working plane</b>. A near-vertical pick pair becomes a column. <b>Shift</b> = straight, <b>Esc</b> = exit.':drawHintText()}</div>`;
@@ -2477,10 +2486,10 @@ function panel(){
2477
2486
  const posA=!allCol?agg(beams,m=>posDefault(m)):null;
2478
2487
  const rotAgg=agg(arr,m=>((((+m.rot||0)%360)+360)%360)); // shared rotation, or VARIES
2479
2488
  p.innerHTML=`<h3>${arr.length} members selected</h3>
2489
+ ${typeFilterHTML()}
2480
2490
  <div class="row hint" style="margin-top:0">Edits apply to <b>all ${arr.length}</b> selected · a blank <b>Varies</b> field is left unchanged.</div>
2481
- <div class=row><label>Profile</label><input id=pf class=combo data-src=profiles placeholder="${VV(profAgg)?'Varies':''}" value="${VV(profAgg)?'':esc(profAgg||'')}" autocomplete=off></div>
2482
2491
  ${memberTypeField('mTypeM',arr)}
2483
- ${(!allBeam&&!allCol)?`<div class=hint style="margin-top:4px">Mixed — ${beams.length} beam${beams.length>1?'s':''}, ${cols.length} column${cols.length>1?'s':''}</div>`:''}
2492
+ <div class="f"><div class=elab>Profile</div><input id=pf class=combo data-src=profiles placeholder="${VV(profAgg)?'Varies':''}" value="${VV(profAgg)?'':esc(profAgg||'')}" autocomplete=off></div>
2484
2493
  <div class="row hint">Total length <b>${totalL} ft</b>${totalW!=null?` · <b>${totalW.toLocaleString()} lb</b>`:''}${dupSel?` · <span style="color:#fca5a5">${dupSel} duplicate${dupSel>1?'s':''}</span> (overlap a kept member — deleting these dedupes)`:''}</div>
2485
2494
  <div class=row><button class=ghostw id=verifyBtn${allVerified?' style="border-color:#166534;color:#86efac"':''}>${allVerified?'✓ All verified — click to unverify':'Mark all verified'}</button></div>
2486
2495
  ${elev}
@@ -2494,6 +2503,7 @@ function panel(){
2494
2503
  <div class=hint style="margin-top:6px">${geoMode==='el'?'Click a <b>target line</b> — the nearest end of <b>every</b> selected member snaps to where it meets that line.':'<b>Extend/Trim</b> (E) every selected member\'s nearest end to one line. <b>Esc</b> cancels.'}</div>
2495
2504
  <div class=row><button class=ghostw id=swapEnds data-tip="Reverse every selected member: swap each one's start and end (yellow ↔ magenta / bottom ↔ top) handles · Shortcut: P">⇄ Swap start ↔ end (all) <span style="opacity:.55">(P)</span></button></div>
2496
2505
  <div class="row f"><button class=danger id=del>Delete selected (${arr.length})</button></div>`;
2506
+ wireTypeFilter(p);
2497
2507
  // wiring — every commit applies to the whole selection; a blank field is a no-op (leaves each member's own value).
2498
2508
  document.getElementById('pf').onchange=e=>{const v=e.target.value.toUpperCase().replace(/ /g,'');if(!v)return;edit(()=>{for(const m of selArr()){m.profile=v;m.rfi=(_wt(v)==null);}if(!profs.includes(v)){profs.push(v);profs.sort();}});};
2499
2509
  document.getElementById('mTypeM').onchange=e=>{const v=e.target.value;if(!normMemberTypeKey(v)){e.target.value=memberTypeValueFor(selArr());return;}edit(()=>{const k=memberTypeFromInput(v);if(!k)return;applyMemberType(selArr(),k);});}; // type owns Column-vs-beam-style role and legend category
@@ -2598,8 +2608,9 @@ function panel(){
2598
2608
  <div class=hint style="margin:4px 0 0">Changes which end shows the double arrowhead. <b>Display only</b> — no geometry moves.</div></div>
2599
2609
  <div class=hint style="margin:8px 0 0">Split / Extend / Trim don't apply to a brace — drag an end handle to move a work point, or set the Offset above.</div>`;
2600
2610
  p.innerHTML=`<h3>Member ${esc(m.id)}</h3>
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>
2611
+ ${typeFilterHTML()}
2602
2612
  ${memberTypeField('mTypeS',[m])}
2613
+ <div class="f"><div class=elab>Profile</div><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>
2603
2614
  ${braceSect}
2604
2615
  <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>
2605
2616
  <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>
@@ -2616,6 +2627,7 @@ function panel(){
2616
2627
  <div class=hint style="margin-top:6px">${geoMode==='el'?'Click a <b>target line</b> — another member or a grey segment. The nearest end of this member snaps to where the two lines meet (extends if short, trims if it overshoots).':geoMode==='split'?'Click a <b>point on this member</b> to cut it into two members.':'<b>Extend/Trim</b> (E) an end to meet another line · <b>Split</b> (S) at a point. <b>Esc</b> cancels.'}</div>
2617
2628
  <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>`}
2618
2629
  <div class="row f"><button class=danger id=del>Delete member</button></div>`;
2630
+ wireTypeFilter(p);
2619
2631
  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
2632
  {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)
2621
2633
  document.getElementById('pickProf').onclick=()=>{if(picking&&pickKind==='profile'){picking=false;}else{picking=true;pickKind='profile';pickEnd=null;}render();};
@@ -4278,6 +4290,54 @@ function memberTypeField(id,ms){
4278
4290
  const v=memberTypeValueFor(ms);
4279
4291
  return `<div class="mtype-field f"><div class=elab>Member type</div><input id=${id} class="combo member-type-combo" data-src=membertypes placeholder="${v?'':'Varies'}" value="${esc(v)}" autocomplete=off></div>`;
4280
4292
  }
4293
+ // ── F4: select-by-type filter for a MIXED selection ─────────────────────────────────────────────────────────
4294
+ // A marquee can grab a mix of object types (members of several member types + dimensions, and — once grids are
4295
+ // selectable — grid lines). typeFilterGroups buckets the CURRENT selection by type; typeFilterHTML renders one
4296
+ // chip per type, but ONLY when more than one type is present (a single-type selection shows nothing).
4297
+ // Plain-clicking a chip (wireTypeFilter) DROPS that type from the selection; Alt-clicking ISOLATES it (keeps only
4298
+ // that type, deselects the rest — the "solo this layer" gesture). Both are real narrowing → render() resyncs the
4299
+ // 2D glow/badges, the 3D highlight, AND re-runs panel(), which re-derives the strip from the now-smaller selection.
4300
+ // GRIDS: grid lines aren't selectable yet (they're drag-to-move today); a parallel session is adding grid
4301
+ // selection. This assumes it will expose a global `selGridIds` (a Set of grid-line ids, sibling to selIds/
4302
+ // selDimIds) and stays INERT until then — the `typeof selGridIds` guard in gridSelSet() means no ReferenceError
4303
+ // now, and the Grids chip + its drop/isolate light up automatically once that Set exists and the marquee fills
4304
+ // it. (That session still owns the render() selection highlight + Delete for a selected grid.)
4305
+ function gridSelSet(){return (typeof selGridIds!=='undefined'&&selGridIds&&typeof selGridIds.size==='number')?selGridIds:null;}
4306
+ function typeFilterGroups(){
4307
+ const g=[],by=new Map();
4308
+ for(const m of selArr()){const k=memberTypeOf(m);if(!by.has(k))by.set(k,[]);by.get(k).push(m.id);}
4309
+ for(const rec of memberTypeRecords())if(by.has(rec.k))g.push({kind:'member',key:rec.k,label:rec.label,ids:by.get(rec.k)}); // canonical member-type order (Column, Beam, Brace, Ledger, Frame, then custom)
4310
+ for(const [k,ids] of by)if(!g.some(x=>x.key===k))g.push({kind:'member',key:k,label:memberTypeLabel(k),ids}); // any stray key not in the records list (defensive)
4311
+ if(selDimIds.size)g.push({kind:'dim',key:'__dims',label:'Dimensions',ids:[...selDimIds]});
4312
+ const G=gridSelSet();if(G&&G.size)g.push({kind:'grid',key:'__grids',label:'Grids',ids:[...G]}); // inert until grids become selectable (see header)
4313
+ return g;
4314
+ }
4315
+ function typeFilterHTML(){
4316
+ const g=typeFilterGroups();if(g.length<2)return ''; // one type only → nothing to filter → no strip (the >1-type gate)
4317
+ const chips=g.map(x=>{const tip=`Click to drop ${x.label} · Alt-click to isolate ${x.label}`;
4318
+ const aria=`${x.label}, ${x.ids.length} selected. Activate to drop, hold Alt to isolate.`; // accessible name keeps the COUNT (visible-text override would lose it) + gesture-neutral wording; data-tip carries the pointer copy
4319
+ return `<button type=button class="tfchip${x.kind!=='member'?' tfdim':''}" data-tfkind="${x.kind}" data-tfkey="${esc(x.key)}" data-tip="${esc(tip)}" aria-label="${esc(aria)}">${esc(x.label)} · ${x.ids.length}</button>`;}).join(''); // dashed = a non-member (annotation/reference) group: Dimensions, Grids
4320
+ return `<div class=tfstrip><div class=elab>Mixed selection — click a type to drop it, Alt-click to isolate it</div><div class=tfchips role=group aria-label="Filter selection by object type">${chips}</div></div>`;
4321
+ }
4322
+ function wireTypeFilter(p){
4323
+ p.querySelectorAll('.tfchip').forEach(b=>{
4324
+ // plain = DROP this type; Alt = ISOLATE it (keep only this type, drop everything else). Three buckets:
4325
+ // members (by type), dims, grids. Both narrow the real selection, then render() resyncs 2D/3D + re-runs panel().
4326
+ const act=iso=>{const kind=b.dataset.tfkind,key=b.dataset.tfkey,G=gridSelSet();
4327
+ if(iso){ // keep ONLY this type
4328
+ if(kind==='member'){for(const m of selArr())if(memberTypeOf(m)!==key)selIds.delete(m.id);}else selIds.clear();
4329
+ if(kind!=='dim')selDimIds.clear();
4330
+ if(G&&kind!=='grid')G.clear();
4331
+ }else{ // drop just this type
4332
+ if(kind==='member'){for(const m of selArr())if(memberTypeOf(m)===key)selIds.delete(m.id);}
4333
+ else if(kind==='dim')selDimIds.clear();
4334
+ else if(kind==='grid'&&G)G.clear();
4335
+ }
4336
+ render();};
4337
+ b.onclick=e=>act(e.altKey);
4338
+ b.onkeydown=e=>{if(e.key==='Enter'||e.key===' '){e.preventDefault();e.stopPropagation();act(e.altKey);}}; // native <button> Enter/Space bubbles to the global idle-repeat-last handler (:3838, !inForm) which preventDefaults activation — activate here + stopPropagation, mirroring the F12 RFI pill (:2632). Alt+Enter/Space isolates (keyboard parity).
4339
+ });
4340
+ }
4281
4341
  function profileKeyOf(m){return (m&&m.profile||'').trim().toUpperCase();} // matches the scene group key (contract-to-scene upper-cases the profile)
4282
4342
  function categoryOfProfile(profKey){for(const m of (P.members||[]))if(profileKeyOf(m)===profKey)return memberTypeOf(m);return 'beam';} // a profile-group's category = the type of its member(s)
4283
4343
  let legendMode=(localStorage.getItem('floless.legendMode')==='type')?'type':'profile';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floless/app",
3
- "version": "0.89.2",
3
+ "version": "0.89.3",
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": {