@floless/app 0.117.0 → 0.118.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1176,9 +1176,10 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
1176
1176
  <aside id=panel></aside>
1177
1177
  <button type=button id=panelToggle aria-label="Collapse properties panel" aria-controls=panel aria-expanded=true data-tip="Collapse properties panel">›</button>
1178
1178
  </main>
1179
- <datalist id=conntypes><option>moment</option><option>drag</option><option>shear</option><option>braced</option><option>pinned</option><option>fixed</option></datalist>
1180
- <datalist id=profiles></datalist>
1181
- <datalist id=details></datalist>
1179
+ <!-- (The conntypes / profiles / details <datalist>s that used to sit here are gone: every input that
1180
+ bound to them moved to the themed dark combobox below (COMBO_SRC / showCombo), which is what a
1181
+ native datalist popup cannot be — it is drawn white by the OS. They had already lost their last
1182
+ `list=` binding and were rendering nothing.) -->
1182
1183
  <div id=viewGenModal role=dialog aria-modal=true aria-labelledby=vgTitle>
1183
1184
  <div class=mbackdrop id=vgBackdrop></div>
1184
1185
  <div class=mpanel>
@@ -1277,8 +1278,10 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
1277
1278
  <div class=elab>Kind</div>
1278
1279
  <div class=favkindfield role=group aria-label=Kind><span id=favKind class=chip></span></div>
1279
1280
  <label class=elab for=favCat>Category</label>
1280
- <input id=favCat placeholder="Uncategorized" autocomplete=off list=favCatSuggest>
1281
- <datalist id=favCatSuggest></datalist>
1281
+ <!-- Category suggestions come from the themed combobox (data-src=favcats), not a native
1282
+ <datalist>: the datalist popup is OS-drawn and white, which is the whole reason every other
1283
+ suggesting input on this page already uses .combo. -->
1284
+ <input id=favCat class=combo data-src=favcats placeholder="Uncategorized" autocomplete=off>
1282
1285
  <div id=favHint class=hint style="margin-top:6px"></div>
1283
1286
  <div style="display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:6px">
1284
1287
  <button id=favCancel class=ghost>Cancel</button>
@@ -3362,11 +3365,59 @@ const _polyStr=pts=>pts.map(p=>p[0].toFixed(1)+','+p[1].toFixed(1)).join(' ');
3362
3365
  // the blurry raster JPEG. Vector PDFs expose filterElsForPlan(); a genuinely scanned sheet (no vectors)
3363
3366
  // falls back to the RB64 raster. ponytail: all line d's are merged into ONE <path> so the browser parses
3364
3367
  // one node, not thousands — fast to re-render on pan/zoom.
3365
- function hasOverlay(){return !!(filterElsForPlan()||RB64);} // F13: the active plan carries a reference sheet — vector linework or a scanned raster
3368
+ function hasOverlay(){const d=drawablePlan();return d?d.renders:!!RB64;} // F13: the active plan carries a reference sheet — vector linework or a scanned raster. Keyed on whether anything DRAWABLE actually paints, so a vector sheet whose every layer is hidden (or whose survivors are all text) greys the toggle out instead of offering to show a blank page; only a sheet with NO vectors falls through to the raster (#507)
3369
+ // #507: `filter.layers[].drawable === false` means "listed but not drawn (e.g. a text/title-block
3370
+ // layer)" — the schema's own words. Only the Steel Filter's row styling ever honoured it; the plan drew
3371
+ // every element regardless, so a reader that marked its noise non-drawable exactly as instructed still
3372
+ // got the noise. On a faithfully-read sheet that is ~27 backdrop strokes per steel stroke, and the only
3373
+ // escape was to DELETE those elements from the contract — which throws away the user's ability to switch
3374
+ // the layer back on, the very thing the filter exists for.
3375
+ // The layer stays LISTED with its true count (that panel is steel-filter's and is untouched); this skips
3376
+ // the draw alone. Layers are global — one list applies to every sheet — per the takeoff schema.
3377
+ function nonDrawableLayers(){const f=C&&C.filter,out=new Set();
3378
+ for(const l of (f&&f.layers)||[]) if(l&&l.drawable===false&&typeof l.name==='string') out.add(l.name);
3379
+ return out;}
3380
+ // The sheet's linework MINUS every non-drawable layer — the one set all three overlay consumers share
3381
+ // (draw, snap, has-a-sheet), so what you can see, what you can snap to, and whether the toggle is even
3382
+ // enabled can never disagree. null and [] mean DIFFERENT things and callers must keep them apart:
3383
+ // null = this plan carries no vector overlay at all (a scanned sheet, so the raster IS the reference
3384
+ // sheet); [] = it carries one but every layer of it is hidden, and the raster must NOT stand in for it
3385
+ // — that bitmap is a picture of the whole sheet, so it would put the very text and title block the user
3386
+ // suppressed straight back on screen.
3387
+ // NOT folded into filterElsForPlan(): gridReadFromDrawing() reads the RAW set to detect the printed
3388
+ // grid, and the bubbles it hunts routinely sit on an annotation layer a reader would mark non-drawable.
3389
+ // Hiding them from the canvas must not blind the detector.
3390
+ // Memoised on the source array's identity AND the hidden-layer set, because overlaySnapGeom() caches
3391
+ // its parse by identity: handing it a fresh array each call would re-parse ~25k elements every snap.
3392
+ // The memo holds the ANSWER, not loose parallel variables: the filtered elements, how many layers were
3393
+ // hidden to get them, and whether any of them will actually paint. Keeping the count beside the array
3394
+ // is not tidiness — a count stored separately went stale on a cache HIT (sheet A hidden, switch to a
3395
+ // vectorless sheet B, switch back: B zeroed the count, A's early return handed back its cached array
3396
+ // without restoring it, and the tooltip then claimed nothing was excluded). Found by review.
3397
+ let _draw=null,_drawSrc=null,_drawKey=null;
3398
+ function drawablePlan(){
3399
+ const els=filterElsForPlan();
3400
+ if(!els){_draw=null;_drawSrc=null;_drawKey=null;return null;} // no vector overlay at all — every memo slot invalidated together, so nothing can survive into the next sheet
3401
+ const nd=nonDrawableLayers(),key=nd.size?JSON.stringify(Array.from(nd).sort()):''; // JSON, not a join: it escapes any separator character a CAD layer name might itself contain, so two different sets cannot produce one key — and unlike a NUL separator it leaves no control byte in this file (a raw one makes the browser's script tokenizer read U+FFFD where the node harness reads U+0000, and turns the file binary to grep)
3402
+ if(els===_drawSrc&&key===_drawKey&&_draw)return _draw;
3403
+ let out=els,hidden=0; // no hidden layer: the SAME array, so overlaySnapGeom's identity cache still hits
3404
+ if(nd.size){const seen=new Set();out=[];
3405
+ for(const e of els){if(e&&nd.has(e.layer)){seen.add(e.layer);continue;}out.push(e);}
3406
+ hidden=seen.size;} // counted from the ELEMENTS, so a layer marked non-drawable but absent from this sheet is never reported as hidden here
3407
+ let renders=false; // …and does anything LEFT actually paint? Raw length is not the question: a sheet of nothing but text spans, or of lines with no usable geometry, is length>0 and draws a blank white backdrop that reads as a failed read
3408
+ for(const e of out){if(!e)continue;
3409
+ if(e.kind==='line'&&((typeof e.d==='string'&&e.d)||(e.x1!=null&&e.x2!=null))){renders=true;break;}
3410
+ if(e.kind==='circle'&&e.r>0){renders=true;break;}}
3411
+ _drawSrc=els;_drawKey=key;_draw={els:out,hidden,renders};
3412
+ return _draw;}
3413
+ function drawableElsForPlan(){const d=drawablePlan();return d?d.els:null;}
3414
+ function hiddenLayerCount(){const d=drawablePlan();return d?d.hidden:0;}
3366
3415
  function overlaySvg(){
3367
3416
  if(!refSheetOn)return ''; // F13: reference sheet hidden → draw neither the raster/vector linework NOR the white pdfsheet backdrop
3368
- const els=filterElsForPlan();
3369
- if(!els)return RB64?`<image href="data:image/jpeg;base64,${RB64}" x="${X0}" y="${Y0}" width="${X1-X0}" height="${Y1-Y0}"/>`:'';
3417
+ const d0=drawablePlan();
3418
+ if(!d0)return RB64?`<image href="data:image/jpeg;base64,${RB64}" x="${X0}" y="${Y0}" width="${X1-X0}" height="${Y1-Y0}"/>`:''; // no vectors at all: the scanned raster IS the reference sheet
3419
+ if(!d0.renders)return ''; // vectors exist but nothing left will paint: draw NOTHING. Not the white backdrop (that reads as a failed read), and emphatically not RB64 — the raster pictures the WHOLE sheet, so it would put the suppressed text and title block straight back on screen
3420
+ const els=d0.els;
3370
3421
  let d='',circ='';
3371
3422
  for(const e of els){if(!e)continue;
3372
3423
  if(e.kind==='line'){if(typeof e.d==='string'&&e.d)d+=e.d+' ';else if(e.x1!=null&&e.x2!=null)d+=`M${e.x1} ${e.y1}L${e.x2} ${e.y2}`;}
@@ -4301,9 +4352,12 @@ function render(){
4301
4352
  s+=renderPropLabels(); // right-click property-label chips (2D); 3D labels ride the div-overlay pool
4302
4353
  s+=renderSelLenLabels(); // on-select member-length chips (2D), gated by the ⋯ Display "Show member length" toggle
4303
4354
  if(P.frame)s+=axisGlyphSvg(P.frame.o,P.frame.u,false); // local-axes glyph at the origin (only when a frame is set; removed on reset)
4304
- // the detail datalist shows the SAME list as the combobox and the Details modal (#397), built as DOM
4305
- // nodes rather than markup so a detail name coming off the drawing is never parsed as HTML
4306
- svg.innerHTML=s; document.getElementById('profiles').innerHTML=profs.map(p=>`<option value="${esc(p)}">`).join(''); {const dl=document.getElementById('details');dl.replaceChildren(...detTexts().map(t=>{const o=document.createElement('option');o.value=t;return o;}));} stats(); panel(); updUR(); updDup(); updConf(); updCS(); updConnBtn(); updBpBtn(); updSpBtn(); syncDisplayRows();
4355
+ // No datalist population here any more. The #profiles and #details <datalist>s went with the rest of
4356
+ // them (an OS-drawn white popup has no themed mode), and COMBO_SRC.profiles/.details already read
4357
+ // `profs` and `detTexts()` live — so the combobox offers the same list with no mirror to keep filled.
4358
+ // Deleting the elements while these two writes stayed made render() throw on null here, which also
4359
+ // killed every call after it on this line (stats/panel/upd*/syncDisplayRows). Measured in Chromium.
4360
+ svg.innerHTML=s; stats(); panel(); updUR(); updDup(); updConf(); updCS(); updConnBtn(); updBpBtn(); updSpBtn(); syncDisplayRows();
4307
4361
  if(selFilterReady)reflectSelFilter(); // keep the Select-bar Members/Connections buttons in sync with the model — a new/removed connection kind (e.g. the first auto-detailed base plate) flips their on/off without a manual toggle. Gated on selFilterReady so it doesn't run until the deferred first reflect has armed it (that reflect needs BASE_MEMBER_TYPES, initialised later in main()).
4308
4362
  if(view3d&&window.Steel3DView){window.Steel3DView.setSelection(selIds);if(window.Steel3DView.setGridSelection)window.Steel3DView.setGridSelection(selGridIds);updateIsolateBtn();if((selIds.size||selGridIds.size)&&window.Steel3DView.selectedClips&&window.Steel3DView.selectedClips().length)window.Steel3DView.setSelectedClips([]);refreshLegendSel();} // keep the 3D member + grid highlight in sync; selecting geometry clears any clip selection (exclusive)
4309
4363
  try{updateConnCrumb();}catch(_){} // Connection Component breadcrumb follows the selection (3D-only; hidden at root)
@@ -5291,8 +5345,8 @@ function _segX(a,b,c,d){const rx=b[0]-a[0],ry=b[1]-a[1],sx=d[0]-c[0],sy=d[1]-c[1
5291
5345
  let _ovSnap=null,_ovSnapEls=null;
5292
5346
  function overlaySnapGeom(){
5293
5347
  if(!refSheetOn){_ovSnap=null;_ovSnapEls=null;return null;} // F13: hidden reference sheet contributes no snap candidates (don't snap to invisible linework — buildSnap :3062 + snapPerpTargets :3085)
5294
- const els=filterElsForPlan();
5295
- if(!els){_ovSnap=null;_ovSnapEls=null;return null;} // scanned raster / empty → nothing traced to snap to
5348
+ const els=drawableElsForPlan(); // …and a non-drawable LAYER is invisible for the same reason, so it owes the same silence (#507). The toggle's own tooltip promises hiding stops snap points; a layer the user cannot see must not capture an endpoint, midpoint or perpendicular either.
5349
+ if(!els||!els.length){_ovSnap=null;_ovSnapEls=null;return null;} // scanned raster / empty / every layer hidden → nothing traced to snap to
5296
5350
  if(els===_ovSnapEls&&_ovSnap)return _ovSnap; // same sheet's vectors → reuse the parse
5297
5351
  const pts=[],segs=[],mids=[];
5298
5352
  const add=(a,b)=>{if(!(isFinite(a[0])&&isFinite(a[1])&&isFinite(b[0])&&isFinite(b[1])))return;
@@ -6702,7 +6756,13 @@ document.getElementById('plToggleB').onclick=e=>{e.stopPropagation();if(!canWrit
6702
6756
  // hasOverlay() answers true — leaving this row live over a canvas that draws nothing. Worse than inert:
6703
6757
  // the handler persists to `steel:refSheet:v1`, which is not project-scoped, so a click here would follow
6704
6758
  // the user into their next v1 project and hide the traced sheet there.
6705
- function updRefToggle(){const b=document.getElementById('refToggleB');if(!b)return;const on=!MODEL_RO&&refSheetOn;b.disabled=MODEL_RO||!hasOverlay();b.classList.toggle('on',on);b.setAttribute('aria-checked',String(on));} // F13: grey the row out on a plan with no reference sheet (mirrors updGridToggle's no-grid disable)
6759
+ const REF_TIP='Show or hide the traced reference sheet (the PDF/SVG drawing under the model). Hidden, it also stops contributing snap points.';
6760
+ function updRefToggle(){const b=document.getElementById('refToggleB');if(!b)return;const on=!MODEL_RO&&refSheetOn;b.disabled=MODEL_RO||!hasOverlay();b.classList.toggle('on',on);b.setAttribute('aria-checked',String(on)); // F13: grey the row out on a plan with no reference sheet (mirrors updGridToggle's no-grid disable)
6761
+ // #507: a non-drawable layer is excluded whatever this toggle says, and NOTHING in the editor sets
6762
+ // that flag — the reader writes it and Steel Filter only dims the row. So say it here, on the one
6763
+ // control a user consults to reason about the backdrop, instead of leaving the omission silent.
6764
+ const n=hiddenLayerCount();
6765
+ b.setAttribute('data-tip',REF_TIP+(n?(' '+n+' layer'+(n===1?'':'s')+' marked “listed but not drawn” '+(n===1?'is':'are')+' always excluded — review them in Steel Filter.'):''));}
6706
6766
  document.getElementById('refToggleB').onclick=e=>{e.stopPropagation();if(MODEL_RO)return;refSheetOn=!refSheetOn;try{localStorage.setItem('steel:refSheet:v1',refSheetOn?'1':'0');}catch(_){}updRefToggle();render();}; // render() rebuilds the SVG (overlaySvg gone/back) and buildSnap re-reads overlaySnapGeom (snap candidates gone/back)
6707
6767
  document.getElementById('gridEditB').onclick=()=>{setGridMode(!gridMode);render();};
6708
6768
  {const ghb=document.getElementById('gridHdrB');if(ghb)ghb.onclick=()=>{setGridMode(!gridMode);render();};} // the header twin (read-only mode only) — same one action, not a second implementation
@@ -8302,6 +8362,9 @@ let armedFavId=null; // the favourite whose placement crosshair is arm
8302
8362
  const FAV_KIND_LABEL={'base-plate':'Base plate','shear-plate':'Shear plate','brace-gusset':'Gusset plate','custom':'Custom (imported)'};
8303
8363
  const FAV_KIND_COLOR={'base-plate':'#6b7a8d','shear-plate':'#7d8ba0','brace-gusset':'#94a2b7','custom':'#8a97a8'}; // mirror steel-joints.ts GROUPS
8304
8364
  const FAV_CAT_SUGGEST={'base-plate':['Base plates','Columns'],'shear-plate':['Shear plates','Beams'],'brace-gusset':['Gusset plates','Braces'],'custom':['Imported','Details']};
8365
+ // The connection kind the ★ modal is currently showing — decides which categories its Category combo
8366
+ // suggests. Held here rather than read off the DOM because the chip shows a LABEL, not the kind key.
8367
+ let favCatKind='';
8305
8368
  function favHostNoun(k){return k==='base-plate'?'column':k==='brace-gusset'?'brace':'beam';}
8306
8369
  function favIsPortable(f){return !!f&&(f.kind==='base-plate'||f.kind==='shear-plate'||f.kind==='brace-gusset');}
8307
8370
  // The saved-recipe payload captured from a selected whole connection: recipe scalars, or an opaque custom mesh.
@@ -8332,7 +8395,7 @@ function favFillModal({title,kind,name,category,portable,hint}){
8332
8395
  kf.style.borderColor=portable?'var(--brand)':'var(--line)';kf.style.color=portable?'#bfdbfe':'var(--mut)';
8333
8396
  document.getElementById('favName').value=name||'';
8334
8397
  document.getElementById('favCat').value=category||'';
8335
- const dl=document.getElementById('favCatSuggest');dl.replaceChildren();for(const s of (FAV_CAT_SUGGEST[kind]||[]))dl.appendChild(Object.assign(document.createElement('option'),{value:s}));
8398
+ favCatKind=kind; // what COMBO_SRC.favcats offers — set before the field can be focused
8336
8399
  document.getElementById('favHint').textContent=hint;
8337
8400
  document.getElementById('favSave').textContent=favModalEditId?'Save changes':'Save to Favourites';
8338
8401
  document.getElementById('favConnModal').style.display='flex';
@@ -9643,7 +9706,8 @@ const COMBO_SRC={
9643
9706
  profiles:()=>profs,
9644
9707
  membertypes:()=>memberTypeRecords().map(t=>t.label),
9645
9708
  conntypes:()=>['moment','drag','shear','braced','pinned','fixed'],
9646
- details:()=>detTexts(), // the SAME list the Details modal and the datalist show — see detTexts (#397)
9709
+ details:()=>detTexts(), // the SAME list the Details modal shows — see detTexts (#397)
9710
+ favcats:()=>FAV_CAT_SUGGEST[favCatKind]||[],
9647
9711
  connrows:()=>['— none —',...(C.connections||[]).map(r=>connLabel(r))]
9648
9712
  };
9649
9713
  // A connection-library row's one-line label for the per-end picker. The id is the prefix (parsed
@@ -17,7 +17,7 @@
17
17
  */
18
18
 
19
19
  /** Canonical dimension order for a mode string — keeps legacy 'thickness+layer'/'thickness+color'. */
20
- export const MODE_ORDER = ['thickness', 'layer', 'color'];
20
+ const MODE_ORDER = ['thickness', 'layer', 'color'];
21
21
 
22
22
  /** The dimensions a mode activates, order-agnostic: 'thickness+layer' -> ['thickness','layer']. */
23
23
  export function modeDims(mode) {
@@ -59,6 +59,11 @@
59
59
  .srow:hover{background:var(--line)}
60
60
  .srow .sid{color:#f59e0b;flex:none;font-variant-numeric:tabular-nums}
61
61
  .srow .rsn{color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
62
+ /* Themed tooltip — replaces native title= so no OS-default tooltip leaks the dark theme.
63
+ Same element, tokens and geometry as the sibling editors' #tooltip (vector-editor.html,
64
+ steel-filter.html, steel-editor.html) so the four surfaces read as one family. */
65
+ #tooltip{position:fixed;z-index:80;background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:5px 8px;font-size:11.5px;line-height:1.35;color:var(--text);pointer-events:none;max-width:260px;box-shadow:0 8px 22px rgba(0,0,0,.5);opacity:0;transition:opacity .12s}
66
+ #tooltip.show{opacity:1}
62
67
  </style>
63
68
  </head>
64
69
  <body>
@@ -73,15 +78,15 @@
73
78
  <canvas id="stage3d"></canvas>
74
79
  <div id="bar" hidden>
75
80
  <div class="seg-group" id="projSeg">
76
- <button data-proj="persp" class="on" title="Perspective view — natural depth">Persp</button>
77
- <button data-proj="ortho" title="Orthographic — true scale, no perspective">Ortho</button>
81
+ <button data-proj="persp" class="on" data-tip="Perspective view — natural depth">Persp</button>
82
+ <button data-proj="ortho" data-tip="Orthographic — true scale, no perspective">Ortho</button>
78
83
  </div>
79
- <button id="fitBtn" title="Fit all to view">Fit</button>
84
+ <button id="fitBtn" data-tip="Fit all to view">Fit</button>
80
85
  <span class="tb-sep"></span>
81
86
  <div class="seg-group" id="modeSeg">
82
- <button data-mode="solid" class="on" title="Solid shaded model">Solid</button>
83
- <button data-mode="wire" title="Wireframe — edges only">Wire</button>
84
- <button data-mode="xray" title="See-through — reveal hidden parts">X-ray</button>
87
+ <button data-mode="solid" class="on" data-tip="Solid shaded model">Solid</button>
88
+ <button data-mode="wire" data-tip="Wireframe — edges only">Wire</button>
89
+ <button data-mode="xray" data-tip="See-through — reveal hidden parts">X-ray</button>
85
90
  </div>
86
91
  <span class="tb-sep"></span>
87
92
  <span id="groupToggles"></span>
@@ -171,7 +176,10 @@ function boot(v3d) {
171
176
  for (const s of skipped) {
172
177
  const row = document.createElement('div'); row.className = 'srow';
173
178
  const sid = document.createElement('span'); sid.className = 'sid'; sid.textContent = s.id;
174
- const rsn = document.createElement('span'); rsn.className = 'rsn'; rsn.textContent = s.reason; rsn.title = s.reason;
179
+ // The row clips its reason with an ellipsis, so the full text lives in a tooltip. `dataset.tip`
180
+ // (not `.title`) — the shared handler below reads data-tip, and a native title here would be the
181
+ // one light OS tooltip left on this surface.
182
+ const rsn = document.createElement('span'); rsn.className = 'rsn'; rsn.textContent = s.reason; rsn.dataset.tip = s.reason;
175
183
  row.append(sid, rsn); list.appendChild(row);
176
184
  }
177
185
  }
@@ -237,6 +245,24 @@ function boot(v3d) {
237
245
  hideState();
238
246
  })();
239
247
  }
248
+
249
+ // Themed tooltips (replaces native title=) — one shared element, shown on data-tip hover after a
250
+ // short delay, positioned below the control and clamped to the viewport (same handler as the vector
251
+ // editor and the steel editor's 3D toolbar). Reads data-tip via getAttribute, so JS-set
252
+ // el.dataset.tip works too. Installed at module top level, NOT inside boot(): the toolbar is hidden
253
+ // until the scene loads, but the skip panel's rows carry tips and render on the failure paths where
254
+ // boot() returns early — a handler that only existed after a successful 3D build would leave those
255
+ // dead.
256
+ (function(){ const tip=document.createElement('div'); tip.id='tooltip'; document.body.appendChild(tip); let t=null;
257
+ function show(el){ const txt=el.getAttribute('data-tip'); if(!txt) return; tip.textContent=txt; tip.classList.add('show');
258
+ const r=el.getBoundingClientRect(), tw=tip.offsetWidth, th=tip.offsetHeight;
259
+ let x=Math.max(6,Math.min(r.left+r.width/2-tw/2, innerWidth-tw-6)), y=r.bottom+6; if(y+th>innerHeight-6) y=r.top-th-6;
260
+ tip.style.left=x+'px'; tip.style.top=y+'px'; }
261
+ function hide(){ clearTimeout(t); tip.classList.remove('show'); }
262
+ document.addEventListener('pointerover', e=>{ const el=e.target.closest('[data-tip]'); if(!el) return; clearTimeout(t); t=setTimeout(()=>show(el),400); });
263
+ document.addEventListener('pointerout', e=>{ if(e.target.closest('[data-tip]')) hide(); });
264
+ document.addEventListener('pointerdown', hide, true); // a click hides the tip immediately
265
+ })();
240
266
  </script>
241
267
  </body>
242
268
  </html>
@@ -540,10 +540,34 @@
540
540
  // The zero-weak wording must match HOW the drawing was read: after a vision read the honest
541
541
  // message is "scored above the bar, still spot-check", never the exact-extraction claim
542
542
  // (the extractor field is the provenance; absent/non-vision = the no-AI deterministic path).
543
- const visionRead = /^vision/.test((C && C.source && C.source.extractor) || '');
543
+ // Three ways a drawing gets read, and the note must name the one that happened. Testing
544
+ // only for /^vision/ made every OTHER extractor claim the vector-PDF wording — so a scan
545
+ // measured by the CV tracer told the user "traced exactly from the vector PDF (no AI
546
+ // involved)", which is false twice over. Reproduced before this was changed.
547
+ // The vector-PDF claim is the STRONGEST of the four, so it must be earned by a positive
548
+ // match, never reached by falling through. Narrowing /^vision/ to a three-way test still
549
+ // left every unknown or absent extractor asserting "traced exactly from the vector PDF" —
550
+ // the same defect, just rarer. Unknown provenance now gets a neutral note instead.
551
+ const ex = (C && C.source && C.source.extractor) || '';
552
+ const pdfRead = /^pymupdf/.test(ex) || ex === ''; // '' = the bundled hard-coded example
553
+ const visionRead = /^vision/.test(ex);
554
+ const inkRead = /^opencv/.test(ex); // geometry measured from a scan's ink
555
+ const hybrid = inkRead && /vision/.test(ex); // ...with the text read by the model
556
+ // "text", not "labels" — the Show panel two rows above already calls this category Text, and
557
+ // a second word for one concept inside a 244px aside reads as a different feature. Every
558
+ // note also ends on the same "against the original" so none looks like an abbreviation.
559
+ const cleanNote = hybrid
560
+ ? 'No weak traces — geometry measured from the scan’s ink; text read by AI. Spot-check the text against the original.'
561
+ : inkRead
562
+ ? 'No weak traces — geometry measured from the scan’s ink (no AI involved). Spot-check against the original.'
563
+ : visionRead
564
+ ? 'No weak traces — every element scored above ' + WEAK + '. Spot-check against the original.'
565
+ : pdfRead
566
+ ? 'No weak traces — traced exactly from the vector PDF (no AI involved).'
567
+ : 'No weak traces. Spot-check against the original.';
544
568
  $('weakNote').textContent = c.weak
545
569
  ? (c.weak + ' trace' + (c.weak === 1 ? '' : 's') + ' scored below ' + WEAK + ' confidence.')
546
- : (visionRead ? 'No weak traces — every element scored above ' + WEAK + '. Spot-check against the original.' : 'No weak traces — traced exactly from the vector PDF (no AI involved).');
570
+ : cleanNote;
547
571
  $('weakRow').hidden = c.weak === 0; // hide the filter when there's nothing to filter (not disabled)
548
572
  if (c.weak === 0) $('weakOnly').checked = false; // nothing left to isolate — release the filter
549
573
  // Reviewed N/M — M is the weak count at load; Accept and Delete both count as reviewed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floless/app",
3
- "version": "0.117.0",
3
+ "version": "0.118.0",
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": {
@@ -29,6 +29,7 @@
29
29
  "verify:flo": "node build/verify-flo-descriptions.mjs",
30
30
  "verify:flo-naming": "node build/verify-flo-naming.mjs",
31
31
  "verify:no-title": "node build/verify-no-title.mjs",
32
+ "verify:no-native-select": "node build/verify-no-native-select.mjs",
32
33
  "verify:display-sync": "node build/verify-display-sync.mjs",
33
34
  "verify:view-modes": "node build/verify-view-modes.mjs",
34
35
  "verify:gateway": "node build/verify-contract-gateway.mjs",
@@ -36,7 +37,8 @@
36
37
  "verify:boundary": "node build/verify-model-boundary.mjs",
37
38
  "verify:change-reasons": "node build/verify-change-reasons.mjs",
38
39
  "typecheck": "tsc --noEmit",
39
- "prepack": "npm run build"
40
+ "prepack": "npm run build",
41
+ "verify:skill-scripts": "node build/verify-skill-scripts.mjs"
40
42
  },
41
43
  "devDependencies": {
42
44
  "@fastify/static": "^8.0.0",