@floless/app 0.113.1 → 0.113.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.
package/dist/web/app.css CHANGED
@@ -3556,6 +3556,9 @@ body {
3556
3556
  .mode-switch button + button { border-left:1px solid var(--border-strong); }
3557
3557
  .mode-switch button:hover { color:var(--text); }
3558
3558
  .mode-switch button.active { background:var(--accent-soft); color:var(--accent-bright); }
3559
+ .mode-switch button[aria-busy="true"] { display:inline-flex; align-items:center; gap:6px; color:var(--text); cursor:wait; }
3560
+ .mode-switch button[aria-busy="true"] .rtn-spinner { width:10px; height:10px; border-width:2px; }
3561
+ .mode-switch button[aria-disabled="true"] { pointer-events:none; }
3559
3562
 
3560
3563
  /* Mode gating: Workflows chrome hides wholesale in Workspaces (hidden, never disabled).
3561
3564
  ≡ keeps only app-wide items; Dashboard is Workflows-scoped (spec §2).
package/dist/web/aware.js CHANGED
@@ -49,7 +49,8 @@
49
49
  let currentId = null;
50
50
  let teklaReadinessState = null;
51
51
  let teklaReadinessPromise = null;
52
- // appId → 'project-publication' | undefined. Server-computed, carried BESIDE the app on
52
+ // appId → one of FloLess's project-publication availability states, or undefined.
53
+ // Server-computed, carried BESIDE the app on
53
54
  // GET /api/app/:id; see `contractStateOf`. Kept out of the app object on purpose (that object is
54
55
  // AWARE's app spec, not a place for FloLess's reading of it) and cleared with it in
55
56
  // dropClientAppState, so a deleted or renamed workflow cannot leave a stale answer behind to
@@ -869,15 +870,46 @@
869
870
 
870
871
  let _wfUpdates = []; // workflow updates available, keyed by app id — polled by refreshWorkflowUpdates() below
871
872
 
873
+ let publicationAvailabilityRead = 0;
874
+ const publicationAvailabilityReads = new Map();
875
+ let publicationAvailabilityBarrier = Promise.resolve();
876
+
877
+ function setPublicationAvailabilityBarrier(task) {
878
+ // Observe rejection on a sibling branch. The shared barrier itself must remain rejecting so an
879
+ // older Workspaces transition cannot mistake a superseding failed read for success.
880
+ const barrier = task.then(() => undefined);
881
+ publicationAvailabilityBarrier = barrier;
882
+ void barrier.catch(() => {});
883
+ return barrier;
884
+ }
885
+
886
+ function beginPublicationAvailabilityRead(id, task) {
887
+ const read = ++publicationAvailabilityRead;
888
+ publicationAvailabilityReads.set(id, read);
889
+ setPublicationAvailabilityBarrier(task);
890
+ return read;
891
+ }
892
+
893
+ async function commitPublicationAvailability(id, read, contractState) {
894
+ if (publicationAvailabilityReads.get(id) === read) {
895
+ contractStates.set(id, contractState);
896
+ return true;
897
+ }
898
+ await waitForPublicationAvailabilityIdle();
899
+ return false;
900
+ }
901
+
872
902
  async function loadApp(id) {
873
903
  hideSpotlight(); // a spotlight pointing at the previous app's beacon must clear on switch
874
- const { app, contractState } = await api(`/api/app/${encodeURIComponent(id)}`);
904
+ const payload = api(`/api/app/${encodeURIComponent(id)}`);
905
+ const read = beginPublicationAvailabilityRead(id, payload);
906
+ const { app, contractState } = await payload;
875
907
  apps.set(id, app);
876
908
  // A PARALLEL map, never a key on `app`. The app object is AWARE's app spec — `transform()`,
877
909
  // `seedAppInputs()` and `paintGate()` all take it — and FloLess's reading OF that app does not
878
910
  // belong inside it. Set unconditionally (including to undefined) so a workflow that stops being a
879
911
  // publication clears, rather than keeping the previous answer forever.
880
- contractStates.set(id, contractState);
912
+ await commitPublicationAvailability(id, read, contractState);
881
913
  currentId = id;
882
914
  try { localStorage.setItem(LS_LAST_APP, id); } catch { /* private mode / quota */ }
883
915
  transform(app);
@@ -901,6 +933,36 @@
901
933
  maybeSpotlight(app); // one-time first-open spotlight pointing at the beacon (slice 2)
902
934
  }
903
935
 
936
+ async function waitForPublicationAvailabilityIdle() {
937
+ for (;;) {
938
+ const pending = publicationAvailabilityBarrier;
939
+ try {
940
+ await pending;
941
+ } catch (error) {
942
+ if (pending === publicationAvailabilityBarrier) throw error;
943
+ continue;
944
+ }
945
+ if (pending === publicationAvailabilityBarrier) return;
946
+ }
947
+ }
948
+
949
+ function refreshCurrentWorkflowAvailability() {
950
+ const id = currentId;
951
+ if (!id) return Promise.resolve();
952
+ const read = ++publicationAvailabilityRead;
953
+ publicationAvailabilityReads.set(id, read);
954
+ const task = (async () => {
955
+ const { contractState } = await api(`/api/app/${encodeURIComponent(id)}`);
956
+ // A workflow switch or newer availability read can overtake this request. Only the latest
957
+ // response for the still-open workflow may repaint its cards.
958
+ if (currentId !== id || publicationAvailabilityReads.get(id) !== read) return;
959
+ contractStates.set(id, contractState);
960
+ markSpecialNodes();
961
+ })();
962
+ setPublicationAvailabilityBarrier(task);
963
+ return waitForPublicationAvailabilityIdle();
964
+ }
965
+
904
966
  async function loadApps() {
905
967
  // …and mean it: the trigger said "loading…" but stayed CLICKABLE, so a click during the fetch
906
968
  // opened the popover onto an empty #wf-list — the exact "picker opens and stays empty, it never
@@ -1729,20 +1791,31 @@
1729
1791
  }
1730
1792
 
1731
1793
  /**
1732
- * The one line that says where a migrated project's model actually lives.
1794
+ * The one line that explains a project publication's local availability.
1733
1795
  *
1734
1796
  * Same `.node-action-state` idiom as the Tekla readiness line, and deliberately WITHOUT `blocked`
1735
- * (amber): this is a location fact, not a problem to fix. `role="status"` + `aria-live` because the
1797
+ * (amber): this is an availability fact and recovery hint, not a runtime fault. `role="status"` +
1798
+ * `aria-live` because the
1736
1799
  * buttons it explains are `disabled` — disabled controls are not focusable and announce nothing, so
1737
1800
  * this line is the accessible explanation, not merely the visible one.
1738
1801
  */
1739
- function addPublicationState(card) {
1802
+ function isProjectPublicationState(state) {
1803
+ return state === 'project-publication'
1804
+ || state === 'project-publication-missing-project'
1805
+ || state === 'project-publication-availability-unknown';
1806
+ }
1807
+
1808
+ function addPublicationState(card, state) {
1740
1809
  const wrap = document.createElement('div');
1741
1810
  wrap.className = 'node-action-state';
1742
1811
  const text = document.createElement('span');
1743
1812
  text.setAttribute('role', 'status');
1744
1813
  text.setAttribute('aria-live', 'polite');
1745
- text.textContent = 'This model lives in a project — open it from Workspaces to use these.';
1814
+ text.textContent = state === 'project-publication-missing-project'
1815
+ ? 'The project that published this model isn’t available in Workspaces. Check Archived; if you have a project archive, import it.'
1816
+ : state === 'project-publication-availability-unknown'
1817
+ ? 'Couldn’t check whether a project is available. Open Workspaces and try again.'
1818
+ : 'This model was published from a project. A project using this workflow is available in Workspaces. Open Workspaces to continue with a project.';
1746
1819
  wrap.appendChild(text);
1747
1820
  card.appendChild(wrap);
1748
1821
  return wrap;
@@ -1868,7 +1941,8 @@
1868
1941
  // cannot happen here, because both come from `currentId` synchronously. Hoisting the read next to
1869
1942
  // the app it belongs with makes that a property of the code rather than of the reader's attention:
1870
1943
  // a future edit that changes how `app` is obtained now has this line staring at it.
1871
- const publication = contractStateOf(currentId) === 'project-publication';
1944
+ const publicationState = contractStateOf(currentId);
1945
+ const publication = isProjectPublicationState(publicationState);
1872
1946
  const rebakeInput = app && app.rebakeInput ? app.rebakeInput : null;
1873
1947
  const cards = document.querySelectorAll('.agent-card');
1874
1948
  const firstId = cards.length ? cards[0].dataset.agentId : null;
@@ -1883,6 +1957,12 @@
1883
1957
  card.classList.toggle('rebake-node', isRebake);
1884
1958
  // clear anything we injected last render, so re-renders never stack
1885
1959
  card.querySelectorAll('.node-action, .node-action-sep, .node-action-state, .node-export-receipt, .node-inputs').forEach((b) => b.remove());
1960
+ // These two card tips are owned by this renderer. Clear them before recomputing state so an
1961
+ // in-place contract/project refresh cannot leave "Double-click to open…" over disabled actions.
1962
+ if (card.dataset.tip === 'Double-click to open the contract editor'
1963
+ || card.dataset.tip === 'Double-click to open the steel filter') {
1964
+ delete card.dataset.tip;
1965
+ }
1886
1966
  if (isInput) addNodeInputs(card); // current values, above the button
1887
1967
  if (isReport) {
1888
1968
  const rNode = app && app.nodes.find((n) => n.id === rid);
@@ -1905,7 +1985,7 @@
1905
1985
  // the eligibility branch on purpose — rendered before it, the line would annotate a card that
1906
1986
  // shows no action group at all.
1907
1987
  const actionsBefore = card.querySelectorAll('.node-action').length; // marker for the dimming below
1908
- if (publication) addPublicationState(card);
1988
+ if (publication) addPublicationState(card, publicationState);
1909
1989
  addNodeAction(card, 'Edit contract ▸', () => openContractEditor(currentId, contractType));
1910
1990
  // A renderer with a LOCAL 3D viewer (the drawing.vector reconstruction) gets View 3D via
1911
1991
  // that page — distinct from the steel `scene` chain below (AWARE exporter companions).
@@ -1968,8 +2048,12 @@
1968
2048
  }
1969
2049
  // Filter pre-stage node — opens the served steel-filter view (facets + eyedropper → contract.filter).
1970
2050
  if (node && node.config && node.config.surface === 'steel-filter') {
1971
- addNodeAction(card, 'Filter ▸', () => openFilterView(currentId));
1972
- if (!card.dataset.tip) card.dataset.tip = 'Double-click to open the steel filter';
2051
+ if (publication && !card.querySelector('.node-action-state')) {
2052
+ addPublicationState(card, publicationState);
2053
+ }
2054
+ const filterBtn = addNodeAction(card, 'Filter ▸', () => openFilterView(currentId));
2055
+ if (publication) filterBtn.disabled = true;
2056
+ else if (!card.dataset.tip) card.dataset.tip = 'Double-click to open the steel filter';
1973
2057
  }
1974
2058
  });
1975
2059
  if (hasTeklaAction && !teklaReadinessState) refreshTeklaReadiness();
@@ -3545,8 +3629,9 @@
3545
3629
  // click-and-fail round trip the card exists to prevent, reached through the affordance the card
3546
3630
  // used to advertise. Falling THROUGH is deliberate: this card is usually the report node too, so
3547
3631
  // the double-click lands on `showReport` below — the one action here that still works.
3548
- if (ct && contractStateOf(currentId) !== 'project-publication' && openContractEditor(currentId, ct)) return;
3549
- if (node && node.config && node.config.surface === 'steel-filter') { openFilterView(currentId); return; }
3632
+ if (ct && !isProjectPublicationState(contractStateOf(currentId)) && openContractEditor(currentId, ct)) return;
3633
+ if (node && node.config && node.config.surface === 'steel-filter'
3634
+ && !isProjectPublicationState(contractStateOf(currentId))) { openFilterView(currentId); return; }
3550
3635
  if (id === reportNodeId()) showReport(id);
3551
3636
  else if (id === inputNodeId()) openInputsDialog();
3552
3637
  });
@@ -5673,7 +5758,10 @@
5673
5758
  // `clearExportReceiptsForApp` repaints via markSpecialNodes(), so the stale map was actively
5674
5759
  // RE-APPLIED rather than merely left behind. Nothing self-healed until the user switched
5675
5760
  // workflows. Re-read the payload rather than guess at the new state.
5676
- if (m.appId === currentId) loadApp(currentId).catch(reportErr);
5761
+ if (m.appId === currentId) refreshCurrentWorkflowAvailability().catch(reportErr);
5762
+ } else if (m.type === 'projects-changed'
5763
+ && (typeof m.appId !== 'string' || m.appId === currentId)) {
5764
+ refreshCurrentWorkflowAvailability().catch(reportErr);
5677
5765
  } else if (m.type === 'trace' && m.id === currentId) {
5678
5766
  pushTrace(m.event);
5679
5767
  if (state.currentTab === 'execution') renderInspect();
@@ -7969,6 +8057,9 @@
7969
8057
  },
7970
8058
  // Refresh the footer requests counter after the Customize box queues a request.
7971
8059
  loadRequests,
8060
+ refreshCurrentWorkflow() {
8061
+ return refreshCurrentWorkflowAvailability();
8062
+ },
7972
8063
  copyToClipboard,
7973
8064
  instructionFor,
7974
8065
  markedInstruction, // marked (paste-safe) form for clipboard copies — panels.js uses it (#73)
@@ -822,6 +822,37 @@ export function memberGeometryV2(m) {
822
822
  };
823
823
  }
824
824
 
825
+ /**
826
+ * Resolve the selected-member length labels to finite world-space midpoint anchors.
827
+ *
828
+ * The editor owns each label's text while the 3D view owns projection. Keeping the format-aware
829
+ * geometry lookup injectable lets this one seam serve both v1 (`wp`) and v2 (`from`/`to`) members,
830
+ * and makes the exact production validation executable without loading Three.js in a unit test.
831
+ * The returned array stays index-aligned with `labels`; an unusable row is `null` so the DOM pool
832
+ * can hide that slot rather than accidentally pairing a later label with the wrong member.
833
+ */
834
+ export function selectedLengthLabelAnchors(labels, members, geometryOf) {
835
+ const rows = Array.isArray(labels) ? labels : [];
836
+ const byId = new Map((Array.isArray(members) ? members : [])
837
+ .filter((m) => m && typeof m.id === 'string')
838
+ .map((m) => [m.id, m]));
839
+ return rows.map((label) => {
840
+ if (!label || typeof label.id !== 'string' || typeof label.text !== 'string' || !label.text) return null;
841
+ const member = byId.get(label.id);
842
+ if (!member || typeof geometryOf !== 'function') return null;
843
+ const geometry = geometryOf(member);
844
+ const line = geometry && Array.isArray(geometry.line) ? geometry.line : null;
845
+ if (!line || line.length < 2 || !Array.isArray(line[0]) || !Array.isArray(line[1])) return null;
846
+ const a = line[0], b = line[1];
847
+ if (a.length < 3 || b.length < 3 || ![...a.slice(0, 3), ...b.slice(0, 3)].every(Number.isFinite)) return null;
848
+ return {
849
+ id: member.id,
850
+ text: label.text,
851
+ mid: [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2, (a[2] + b[2]) / 2],
852
+ };
853
+ });
854
+ }
855
+
825
856
  /**
826
857
  * Snap targets from v2 members — the v2 sibling of `snapCandidates`, emitting the identical record shapes
827
858
  * so `snapPoint`'s precedence table and `candidatePoint` need no v2 case.
@@ -19,7 +19,7 @@ import { OrbitControls } from 'three/addons/OrbitControls.js';
19
19
  import { RoomEnvironment } from 'three/addons/RoomEnvironment.js';
20
20
  import { surfaceTextures, applyTriplanar, TILE_MM, DIRECTIONAL } from './steel-materials.js';
21
21
  import { Brush, Evaluator, SUBTRACTION } from 'three-bvh-csg';
22
- import { snapPoint, planPointToWp, memberGeometry, snapElevation, dim3dGeom, dominantAxis3d, planeBasis, planeFrom3Points, vecToPlane, frameFrom3Points, frameFromAngle, worldToLocal, identityFrame, resolvePointEntry, offsetsFor, candidateOnPlane, snapGridPoint, clipSegmentToPlanes, pointSegmentDistance2d, perspectiveSegmentParameter, gridDepthWins, segmentHitsRect2d, projectedFootprintHitsRect2d, pickGridLevel } from './steel-3d-core.js';
22
+ import { snapPoint, planPointToWp, memberGeometry, snapElevation, dim3dGeom, dominantAxis3d, planeBasis, planeFrom3Points, vecToPlane, frameFrom3Points, frameFromAngle, worldToLocal, identityFrame, resolvePointEntry, offsetsFor, candidateOnPlane, snapGridPoint, clipSegmentToPlanes, pointSegmentDistance2d, perspectiveSegmentParameter, gridDepthWins, segmentHitsRect2d, projectedFootprintHitsRect2d, pickGridLevel, selectedLengthLabelAnchors } from './steel-3d-core.js';
23
23
  // `gridGeometry`, `gridCandidates3d` and `mmPerPx` moved behind the host's model read half (unit 5, P7d):
24
24
  // each takes a `ptPerFt`, which is a v1 PLAN default and meaningless on a world-mm model grid.
25
25
  import { visibleGridLevels } from './grid-core.js';
@@ -1043,14 +1043,13 @@ function syncSelLenLabels() {
1043
1043
  el.style.cssText = 'position:absolute;transform:translate(-50%,-50%);pointer-events:none;background:var(--panel,#0f172a);color:#e2e8f0;border:1px solid #22d3ee;border-radius:4px;padding:1px 6px;font:11px system-ui;white-space:nowrap;box-shadow:0 1px 4px rgba(0,0,0,.4)'; // cyan border = dimension read (matches the 2D .mlenchip)
1044
1044
  selLenLabelHost.appendChild(el); selLenLabelPool.push(el);
1045
1045
  }
1046
- const byId = new Map(members().map((m) => [m.id, m]));
1046
+ const anchors = selectedLengthLabelAnchors(labels, members(), geoOf);
1047
1047
  for (let i = 0; i < selLenLabelPool.length; i++) {
1048
- const el = selLenLabelPool[i], L = labels[i], m = L ? byId.get(L.id) : null;
1049
- if (!m || !Array.isArray(m.wp) || m.wp.length < 2 || !L.text) { el.style.display = 'none'; el._mid = null; el._memberId = null; continue; }
1050
- const g = geoOf(m), a = g.line[0], b = g.line[1];
1051
- el._mid = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2, (a[2] + b[2]) / 2];
1052
- el._memberId = m.id;
1053
- el.textContent = L.text;
1048
+ const el = selLenLabelPool[i], anchor = anchors[i];
1049
+ if (!anchor) { el.style.display = 'none'; el._mid = null; el._memberId = null; continue; }
1050
+ el._mid = anchor.mid;
1051
+ el._memberId = anchor.id;
1052
+ el.textContent = anchor.text;
1054
1053
  el.style.display = 'block';
1055
1054
  }
1056
1055
  }
@@ -3717,26 +3716,22 @@ function onDown(e) {
3717
3716
  let id = null; try { id = pickAt(e.clientX, e.clientY); } catch { id = null; }
3718
3717
  // Geometry-edit mode (Trim/Extend or Split armed in the inspector): a click does the edit, no drag.
3719
3718
  if (geoMode() && (geoMode() === 'el' ? selIds.size >= 1 : selIds.size === 1)) { e.stopPropagation(); pending = { geo: geoMode(), selId: [...selIds][0], targetId: id }; return; } // Split: single; Extend/Trim: any selection
3720
- // An end node (the yellow/magenta dot) under the cursor → grab just that endpoint to stretch the member.
3721
- let ep = null; try { ep = pickEndpoint(e.clientX, e.clientY); } catch { ep = null; }
3722
- if (ep) { e.stopPropagation(); controls.enabled = false; startEndpointGrab(ep, e); return; }
3719
+ // An editable v1 end node (the yellow/magenta dot) under the cursor → grab just that endpoint to
3720
+ // stretch the member. Canonical v2 still renders selection endpoint dots, but is read-only here:
3721
+ // let those pixels fall through to the ordinary member-selection path below.
3722
+ if (MODEL().memberEditing !== false) {
3723
+ let ep = null; try { ep = pickEndpoint(e.clientX, e.clientY); } catch { ep = null; }
3724
+ if (ep) { e.stopPropagation(); controls.enabled = false; startEndpointGrab(ep, e); return; }
3725
+ }
3723
3726
  let gridHit=null,allMeshHits=[];try{gridHit=pickGridAt(e.clientX,e.clientY);}catch(err){console.error('steel-3d: grid hit-test failed',err);}try{allMeshHits=meshHitsAt(e.clientX,e.clientY);}catch(err){console.error('steel-3d: mesh hit-test failed',err);}const gridAllowed=!api||!api.canSelectGrid||api.canSelectGrid(),gridOccluders=OPAQUE_MODES.has(displayMode)?allMeshHits.filter(occludesGrid):[],meshDepth=gridOccluders.length?gridOccluders[0].point.clone().project(camera).z:Infinity,gridInFront=gridHit&&gridDepthWins(gridHit.depth,meshDepth);if(gridHit&&!gridAllowed&&gridInFront){e.stopPropagation();controls.enabled=false;pending={filteredGrid:true};return;} // Deliberately consume the LEFT select gesture like 2D when the visible grid is frontmost: a filtered grid stays inert and preserves selection. RIGHT-drag orbit is a separate handler.
3724
3727
  const gridWins=gridAllowed&&gridHit&&gridInFront;if(gridWins){e.stopPropagation();controls.enabled=false;pending={gridId:gridHit.id,add:e.ctrlKey||e.metaKey||e.shiftKey};return;} // Compare projected depth in Solid; Wire/X-ray fills do not write depth and therefore cannot phantom-occlude a visible grid.
3725
3728
  if (!id) { pending = null; boxSel = { x: e.clientX, y: e.clientY }; return; } // empty space → box-select on drag
3726
3729
  e.stopPropagation(); controls.enabled = false; // grabbed a member → suppress orbit (enabled=false is the reliable guard)
3727
3730
  try {
3728
3731
  const m = memberById(id);
3729
- const { ptPerFt: ppf, defaultTosMm: dtos } = scaleFor(m); // the GRABBED member's sheet, not the active one
3730
- const geo = m ? memberGeometry(m, ppf, dtos) : null;
3731
- const mesh = meshById.get(id);
3732
- const planeZ = geo ? (geo.line[0][2] + geo.line[1][2]) / 2 : 0;
3733
- const ctrl = e.ctrlKey || e.metaKey, add = ctrl || e.shiftKey; // ctrl gates the copy gesture; ctrl OR shift toggles selection on a click (Tekla)
3734
- // Ctrl+Shift on a member that is already selected arms the drag-out to Tekla. Claimed ahead of
3735
- // the copy/ortho state below, because Ctrl+Shift+DRAG would otherwise mean copy-with-ortho-lock
3736
- // (the one gesture this feature costs). Arming is not yet dragging: the gesture only becomes a
3737
- // drag-out once the pointer travels (onMove), so a stationary Ctrl+Shift click still falls
3738
- // through to the toggle-select it has always been, and `pending` is still built below so an
3739
- // un-armed press behaves identically.
3732
+ const ctrl = e.ctrlKey || e.metaKey, add = ctrl || e.shiftKey;
3733
+ // Ctrl+Shift on a member that is already selected arms the drag-out to Tekla. This gesture needs
3734
+ // selection ids only, so it remains available on canonical v2 even though member editing does not.
3740
3735
  if (ctrl && e.shiftKey && selIds.has(id) && api && api.teklaSelectionIds) {
3741
3736
  const ids = api.teklaSelectionIds();
3742
3737
  // `blocked` while a send is in flight: the gesture is still CLAIMED (so it cannot fall through
@@ -3764,6 +3759,18 @@ function onDown(e) {
3764
3759
  }
3765
3760
  }
3766
3761
  }
3762
+ // A canonical v2 model is deliberately read-only here. A press still needs enough state for onUp to
3763
+ // perform the ordinary member selection, but must not ask for a v1 owning-sheet scale or build drag
3764
+ // candidates: v2 has neither. Keeping this boundary in the model read half prevents selection from
3765
+ // failing before Member length (and every other selection-driven read) can see the chosen member.
3766
+ if (MODEL().memberEditing === false) { pending = { id, add }; return; }
3767
+ const { ptPerFt: ppf, defaultTosMm: dtos } = scaleFor(m); // the GRABBED member's sheet, not the active one
3768
+ const geo = m ? memberGeometry(m, ppf, dtos) : null;
3769
+ const mesh = meshById.get(id);
3770
+ const planeZ = geo ? (geo.line[0][2] + geo.line[1][2]) / 2 : 0;
3771
+ // The drag-out arm above is claimed ahead of the copy/ortho state below, because
3772
+ // Ctrl+Shift+DRAG would otherwise mean copy-with-ortho-lock (the one gesture this feature costs).
3773
+ // A stationary Ctrl+Shift click still falls through to the toggle-select it has always been.
3767
3774
  pending = {
3768
3775
  id, ctrl, add, ppf, planeZ,
3769
3776
  copy: ctrl, copyIds: ctrl ? (selIds.has(id) ? [...selIds] : [id]) : null, // Ctrl+drag copies: the selection if this member is in it, else just it
@@ -3789,7 +3796,7 @@ function onDown(e) {
3789
3796
  // cancel (during a native drag the page never sees the key).
3790
3797
 
3791
3798
  /** Short display names for the drop targets. The badge has no room for "Tekla Structures". */
3792
- const HOST_SHORT = { tekla: 'Tekla', revit: 'Revit', sketchup: 'SketchUp' };
3799
+ const HOST_SHORT = { tekla: 'Tekla', revit: 'Revit', sketchup: 'SketchUp', rhino: 'Rhino' };
3793
3800
 
3794
3801
  /**
3795
3802
  * Which host is under this screen point, per the snapshot taken at dragstart?
@@ -4327,7 +4334,10 @@ function onHoverMove(e) {
4327
4334
  if (fh) { canvasEl.style.cursor = 'pointer'; return; }
4328
4335
  }
4329
4336
  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
4330
- let ep = null; try { ep = pickEndpoint(lastHoverXY[0], lastHoverXY[1]); } catch { ep = null; }
4337
+ let ep = null;
4338
+ if (MODEL().memberEditing !== false) {
4339
+ try { ep = pickEndpoint(lastHoverXY[0], lastHoverXY[1]); } catch { ep = null; }
4340
+ }
4331
4341
  if (ep) { // over an end node (a selected member's drag handle) → ring + move cursor
4332
4342
  hoverEp = ep; canvasEl.style.cursor = 'move';
4333
4343
  setHover(ep.id); // glow is a no-op here (ep.id is selected → selection wins), but this clears any prior member's glow
@@ -4359,7 +4369,7 @@ function updateStatusChip() {
4359
4369
  // Name the app the pointer is actually over, so the chip and the badge never disagree.
4360
4370
  txt = teklaDrag.target
4361
4371
  ? `Release to insert ${n} ${noun} into ${HOST_SHORT[teklaDrag.target]} · release here or Esc to cancel`
4362
- : `Release over Tekla, Revit or SketchUp to insert ${n} ${noun} · release here or Esc to cancel`;
4372
+ : `Release over Tekla, Revit, SketchUp or Rhino to insert ${n} ${noun} · release here or Esc to cancel`;
4363
4373
  }
4364
4374
  else if (wpMode === 'face') txt = 'Click a member face — the working plane lands on it · Esc to cancel';
4365
4375
  else if (wpMode === '3pt') txt = ['Click the plane origin (snapped) · Esc to cancel', 'Click the local-X direction point · Esc to cancel', 'Click a point on the plane’s Y side · Esc to cancel'][(wpDraft || []).length] || '';