@floless/app 0.94.0 → 0.94.1

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.94.0" : void 0,
53109
+ define: true ? "0.94.1" : 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.94.0" : void 0 });
53119
+ return resolveChannel({ isSea: isSea2(), define: true ? "0.94.1" : void 0 });
53120
53120
  }
53121
53121
 
53122
53122
  // workflow-update.ts
@@ -61,6 +61,8 @@ const meshById = new Map(); // member id -> THREE.Mesh
61
61
  const groupColor = new Map(); // group key -> THREE.Color
62
62
  const baseMat = new Map(); // group key -> MeshStandardMaterial (shared per profile)
63
63
  const SELECT_EMISSIVE = 0x3b82f6; // --brand: selected members glow blue
64
+ const HOVER_EMISSIVE = 0x38bdf8; // sky: a cooler, lighter hue than the selection blue — paired with a softer glow (HOVER_INTENSITY) so hover reads distinct from selection
65
+ const HOVER_INTENSITY = 0.3; // hover glow strength (softer than the 0.6 selection glow)
64
66
  const EP_START = 0xfacc15; // start endpoint (end 1) — yellow
65
67
  const EP_END = 0xf472b6; // end endpoint (end 2) — magenta
66
68
 
@@ -213,6 +215,7 @@ function init(canvas, theApi) {
213
215
  window.addEventListener('pointermove', onMove); // window so a drag keeps tracking off-canvas
214
216
  window.addEventListener('pointerup', onUp);
215
217
  canvas.addEventListener('pointermove', onHoverMove); // canvas-only: cursor + hover readout when idle
218
+ canvas.addEventListener('pointerleave', () => { hoverEp = null; if (hoverRAF) { cancelAnimationFrame(hoverRAF); hoverRAF = 0; } setHover(null); updateStatusChip(); }); // leaving the canvas clears the hover glow + chip; cancel any queued hover frame so it can't re-glow the last member after the cursor left
216
219
  canvas.addEventListener('dblclick', onDblClick); // "zoom to detail": dbl-click a part zooms to it (empty = no-op)
217
220
  window.addEventListener('keydown', onKey); // Tekla keyboard nav: arrows pan, Ctrl/Shift+arrows rotate
218
221
  ro = new ResizeObserver(resize); ro.observe(canvas.parentElement || canvas);
@@ -523,12 +526,14 @@ function clearRoot() {
523
526
  for (const [id, m] of meshById) {
524
527
  m.geometry.dispose();
525
528
  if (m.userData._selMat) m.userData._selMat.dispose(); // per-mesh selection clone (else it leaks per rebuild)
529
+ if (m.userData._hovMat) m.userData._hovMat.dispose(); // per-mesh hover clone — same leak-per-rebuild story as _selMat
526
530
  // A placed detail (Slice 4) owns a per-mesh MeshBasicMaterial + its image texture (NOT a shared baseMat);
527
531
  // dispose both or every rebuild — which happens on each edit — leaks the old material + GPU texture.
528
532
  if (String(id).startsWith('det:') && m.material) { if (m.material.map) m.material.map.dispose(); m.material.dispose(); }
529
533
  root.remove(m);
530
534
  }
531
535
  meshById.clear();
536
+ hoverId = null; hoverEp = null; // the meshes are gone — drop stale hover state so the next pointermove re-glows the fresh mesh
532
537
  }
533
538
 
534
539
  // Subtract each cope (a `cut` part) from a member's solid via CSG — a real coped beam end. Cut boxes are
@@ -1681,7 +1686,8 @@ function setSelection(ids) {
1681
1686
  applyDisplayMode(); // selection swapped the materials → re-apply wire/xray
1682
1687
  selIds = new Set(set);
1683
1688
  reconcileConnState(set); // any selection path (2D click, box-select, keyboard) must not leave a stale connection envelope/drill
1684
- rebuildEndpoints(); // endpoint dots follow the selection (+ any hover)
1689
+ rebuildEndpoints(); // endpoint dots follow the selection
1690
+ if (hoverId != null && !set.has(hoverId)) setHoverGlow(hoverId, true); // a still-hovered, now-unselected member keeps its glow (the material swap above cleared it)
1685
1691
  updateStatusChip();
1686
1692
  }
1687
1693
  let selIds = new Set();
@@ -1689,15 +1695,40 @@ function selectedMaterial(mesh) {
1689
1695
  if (!mesh.userData._selMat) mesh.userData._selMat = materialFor(mesh.userData.group).clone();
1690
1696
  return mesh.userData._selMat;
1691
1697
  }
1698
+ // ---- sky hover glow (replaces the on-hover endpoint dots) ----
1699
+ // A per-mesh clone so glowing one member doesn't tint its whole profile group (same trick as
1700
+ // selection). Selection always wins: a selected member keeps its blue glow and is left untouched.
1701
+ function hoverMaterial(mesh) {
1702
+ if (!mesh.userData._hovMat) mesh.userData._hovMat = materialFor(mesh.userData.group).clone();
1703
+ return mesh.userData._hovMat;
1704
+ }
1705
+ function setHoverGlow(id, on) {
1706
+ if (id == null) return;
1707
+ const mesh = meshById.get(id);
1708
+ if (!mesh || String(id).startsWith('det:')) return; // placed details use a texture, no emissive to glow
1709
+ if (selIds.has(id)) return; // selected beats hovered — don't disturb its blue glow
1710
+ mesh.material = on ? hoverMaterial(mesh) : materialFor(mesh.userData.group);
1711
+ mesh.material.emissive = new THREE.Color(on ? HOVER_EMISSIVE : 0x000000);
1712
+ mesh.material.emissiveIntensity = on ? HOVER_INTENSITY : 0;
1713
+ applyDisplayMode(); // ALWAYS re-sync after a material swap (mirrors setSelection): the swapped-in clone may have been cloned in another mode, and on clear the restored shared material can itself be stale — for a sole-profile member it stays detached while its mesh wears _hovMat, so applyDisplayMode never updated it. emissive is preserved (applyDisplayMode never touches it).
1714
+ }
1715
+ // Move the hover glow from the previous member to `id` (null = clear). One entry point so every
1716
+ // hoverId transition stays consistent.
1717
+ function setHover(id) {
1718
+ if (id === hoverId) return;
1719
+ setHoverGlow(hoverId, false);
1720
+ hoverId = id;
1721
+ setHoverGlow(hoverId, true);
1722
+ }
1692
1723
 
1693
1724
  // ---- yellow (start) / magenta (end) endpoint markers — also the drag handles ----
1694
- // Shown for every selected member, plus the hovered member. The dot at the member's `from` end
1725
+ // Shown for every SELECTED member (hover shows a sky glow instead — setHoverGlow). The dot at the member's `from` end
1695
1726
  // (start / end 1) is yellow; the `to` end (end 2 / column top) is magenta. Sizes held ~constant on
1696
1727
  // screen in the render loop (sizeEndpoints).
1697
1728
  function rebuildEndpoints() {
1698
1729
  if (!epGroup) return;
1699
1730
  for (const c of [...epGroup.children]) epGroup.remove(c); // shared geom/material → nothing to dispose
1700
- const show = new Set(selIds); if (hoverId) show.add(hoverId);
1731
+ const show = new Set(selIds); // dots follow the SELECTION only — hover now shows a glow instead (setHoverGlow)
1701
1732
  for (const id of show) {
1702
1733
  const mesh = meshById.get(id); if (mesh && !mesh.visible) continue; // a legend-hidden member shows no dots
1703
1734
  const m = memberById(id); if (!m) continue;
@@ -3419,9 +3450,9 @@ function onHoverMove(e) {
3419
3450
  }
3420
3451
  if (selectedClipIds.size) { let ch = null; try { ch = pickClipHandle(lastHoverXY[0], lastHoverXY[1]); } catch { ch = null; } if (ch) { canvasEl.style.cursor = 'move'; return; } } // over a clip handle → move cursor
3421
3452
  let ep = null; try { ep = pickEndpoint(lastHoverXY[0], lastHoverXY[1]); } catch { ep = null; }
3422
- if (ep) { // over an end node → ring + move cursor; keep its member's dots shown
3453
+ if (ep) { // over an end node (a selected member's drag handle) → ring + move cursor
3423
3454
  hoverEp = ep; canvasEl.style.cursor = 'move';
3424
- if (hoverId !== ep.id) { hoverId = ep.id; rebuildEndpoints(); }
3455
+ setHover(ep.id); // glow is a no-op here (ep.id is selected → selection wins), but this clears any prior member's glow
3425
3456
  updateStatusChip(); return;
3426
3457
  }
3427
3458
  hoverEp = null;
@@ -3429,7 +3460,7 @@ function onHoverMove(e) {
3429
3460
  const topMesh = top ? meshById.get(top) : null, isPart = !!(topMesh && topMesh.userData.derived);
3430
3461
  const canDrag = api && api.dragMoveEnabled && api.dragMoveEnabled();
3431
3462
  canvasEl.style.cursor = geoMode() ? 'crosshair' : (top ? ((isPart || !canDrag) ? 'pointer' : 'grab') : 'default'); // derived part → pointer (select-only); member → grab only when drag-move is ON, else pointer (a click just selects — the cursor tells the truth, like 2D)
3432
- if (top !== hoverId) { hoverId = top; rebuildEndpoints(); updateStatusChip(); }
3463
+ if (top !== hoverId) { setHover(top); updateStatusChip(); }
3433
3464
  });
3434
3465
  }
3435
3466
  function updateStatusChip() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floless/app",
3
- "version": "0.94.0",
3
+ "version": "0.94.1",
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": {