@floless/app 0.117.1 → 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>
@@ -4349,9 +4352,12 @@ function render(){
4349
4352
  s+=renderPropLabels(); // right-click property-label chips (2D); 3D labels ride the div-overlay pool
4350
4353
  s+=renderSelLenLabels(); // on-select member-length chips (2D), gated by the ⋯ Display "Show member length" toggle
4351
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)
4352
- // the detail datalist shows the SAME list as the combobox and the Details modal (#397), built as DOM
4353
- // nodes rather than markup so a detail name coming off the drawing is never parsed as HTML
4354
- 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();
4355
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()).
4356
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)
4357
4363
  try{updateConnCrumb();}catch(_){} // Connection Component breadcrumb follows the selection (3D-only; hidden at root)
@@ -8356,6 +8362,9 @@ let armedFavId=null; // the favourite whose placement crosshair is arm
8356
8362
  const FAV_KIND_LABEL={'base-plate':'Base plate','shear-plate':'Shear plate','brace-gusset':'Gusset plate','custom':'Custom (imported)'};
8357
8363
  const FAV_KIND_COLOR={'base-plate':'#6b7a8d','shear-plate':'#7d8ba0','brace-gusset':'#94a2b7','custom':'#8a97a8'}; // mirror steel-joints.ts GROUPS
8358
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='';
8359
8368
  function favHostNoun(k){return k==='base-plate'?'column':k==='brace-gusset'?'brace':'beam';}
8360
8369
  function favIsPortable(f){return !!f&&(f.kind==='base-plate'||f.kind==='shear-plate'||f.kind==='brace-gusset');}
8361
8370
  // The saved-recipe payload captured from a selected whole connection: recipe scalars, or an opaque custom mesh.
@@ -8386,7 +8395,7 @@ function favFillModal({title,kind,name,category,portable,hint}){
8386
8395
  kf.style.borderColor=portable?'var(--brand)':'var(--line)';kf.style.color=portable?'#bfdbfe':'var(--mut)';
8387
8396
  document.getElementById('favName').value=name||'';
8388
8397
  document.getElementById('favCat').value=category||'';
8389
- 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
8390
8399
  document.getElementById('favHint').textContent=hint;
8391
8400
  document.getElementById('favSave').textContent=favModalEditId?'Save changes':'Save to Favourites';
8392
8401
  document.getElementById('favConnModal').style.display='flex';
@@ -9697,7 +9706,8 @@ const COMBO_SRC={
9697
9706
  profiles:()=>profs,
9698
9707
  membertypes:()=>memberTypeRecords().map(t=>t.label),
9699
9708
  conntypes:()=>['moment','drag','shear','braced','pinned','fixed'],
9700
- 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]||[],
9701
9711
  connrows:()=>['— none —',...(C.connections||[]).map(r=>connLabel(r))]
9702
9712
  };
9703
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.1",
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",