@floless/app 0.139.0 → 0.139.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.
|
@@ -181,6 +181,11 @@ export function createSteelAdapter({ viewport, editorBridge = {} }) {
|
|
|
181
181
|
framePicking: () => !!invoke('framePicking', [], false),
|
|
182
182
|
framePickStep: () => invoke('framePickStep', [], 0),
|
|
183
183
|
repickFrame3d: () => invoke('repickFrame3d'),
|
|
184
|
+
// Arm / disarm the 3D local-frame tool through the facade. The takeover coordination (#1413) — Grid
|
|
185
|
+
// lines and the member-end review disarm it, and it disarms itself when it yields — routes here, not
|
|
186
|
+
// to the raw viewport, so the seam ratchet keeps shrinking. invoke() no-ops before the view exists.
|
|
187
|
+
armFrame3d: (on) => invoke('armFrame3d', [on]),
|
|
188
|
+
disarmFrame3d: () => invoke('disarmFrame3d'),
|
|
184
189
|
teklaDragging: () => !!invoke('teklaDragging', [], false),
|
|
185
190
|
refMeasureArmed: () => !!invoke('refMeasureState', [], {}).armed,
|
|
186
191
|
// A placed detail is Steel-owned. Keep its live opacity preview behind this adapter so the
|
|
@@ -2711,7 +2711,7 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
2711
2711
|
<button data-command-id="steel.menu-section#Coordinate system" class=msec-hdr data-sec=coords aria-expanded=false data-tip="Local vs global drawing axes (for skewed framing)">Coordinate system<span class=chev aria-hidden=true>▸</span></button>
|
|
2712
2712
|
<div class=msec-body data-reveal-by=".msec-hdr[data-sec=coords]">
|
|
2713
2713
|
<button data-command-id="steel.local-axes" id=csSetB aria-pressed=false data-tip="Define a local X axis by clicking two points (origin, then X-direction). Y follows at 90°. Orthogonal drawing and X/Y dimensions then snap to this frame — for skewed framing.">↺ Set local axes…</button>
|
|
2714
|
-
<button data-command-id="steel.local-frame" id=csArm3dB data-tip="Set the local drawing frame (3D): click 3 points — origin, X-direction, then a point on the Y side (which also sets which way Z points). Then drag the amber origin or the cyan ring to refine.">↺ Set local axes (3D)…</button>
|
|
2714
|
+
<button data-command-id="steel.local-frame" id=csArm3dB aria-pressed=false data-tip="Set the local drawing frame (3D): click 3 points — origin, X-direction, then a point on the Y side (which also sets which way Z points). Then drag the amber origin or the cyan ring to refine.">↺ Set local axes (3D)…</button>
|
|
2715
2715
|
<div id=csF3dFields>
|
|
2716
2716
|
<label class=csf3lab>Orientation</label><span id=csF3dOri class=csf3val data-tip="Set by the 3-click pick; spin it with the cyan ring. Re-pick to change the tilt.">—</span>
|
|
2717
2717
|
<label class=csf3lab>Origin X (ft)</label><input data-command-id="steel.local-origin#X" aria-label="Local frame origin X (ft)" id=csF3dX type=number step=0.1 inputmode=decimal autocomplete=off>
|
|
@@ -4612,7 +4612,7 @@ async function memberEndRequest(path,body){
|
|
|
4612
4612
|
}
|
|
4613
4613
|
async function scanMemberEnds(liveMessage){
|
|
4614
4614
|
closeMore();if((memberEndScan&&memberEndScan.busy)||(memberEndReview&&memberEndReview.busy))return;if(!PROJECT){toast('Open this model from a project to check member ends.');return;}
|
|
4615
|
-
if(gridMode)setGridMode(false);if(csaxisMode){csaxisMode=false;setCsMode();}if(dimStyleMode)setDimStyleMode(false);if(dimMode){dimMode=false;setDimMode();} // the review takes the Properties panel, so every other panel takeover lets go of it and of the canvas click (#1412)
|
|
4615
|
+
if(gridMode)setGridMode(false);if(csaxisMode){csaxisMode=false;setCsMode();}if(dimStyleMode)setDimStyleMode(false);if(dimMode){dimMode=false;setDimMode();}modelEditor.steel.disarmFrame3d(); // the review takes the Properties panel, so every other panel takeover lets go of it and of the canvas click — incl. the 3D local-frame tool, left out of #1449 because it arms through the csSyncF3d seam (#1412/#1413)
|
|
4616
4616
|
revealInspector(); // the review list this scan is about to render IS the command's output — a collapsed Inspector would swallow it, progress and findings alike (#1352)
|
|
4617
4617
|
memberEndScan={busy:true,error:false,live:'Checking member ends against drawing and model evidence…'};panel();
|
|
4618
4618
|
const b=document.getElementById('memberEndsB');if(b)b.textContent='Checking member ends…';
|
|
@@ -7779,7 +7779,7 @@ function setGridMode(on){if(!C)return;if(on&&!gridMode&&!memberEndYieldPanel('Gr
|
|
|
7779
7779
|
gridMode=!!on;reflectTakeoverButtons();
|
|
7780
7780
|
if(!gridMode){const ae=document.activeElement,pn=document.getElementById('panel');if(ae&&pn&&pn.contains(ae))ae.blur(); // commit a focused field (change fires on blur) BEFORE the panel is torn down — a canvas click's pointerdown runs before the browser's own focus change
|
|
7781
7781
|
gridPick=false;if(gridLinePick&&gridLinePick.line)gridLinePick.line.remove();gridLinePick=null;gridSetPickClass();snapClear();}
|
|
7782
|
-
else{revealInspector();if(mode==='add'){mode='sel';setMode();}if(dimMode){dimMode=false;setDimMode();}if(csaxisMode){csaxisMode=false;setCsMode();}if(cmTool)disarmCm();dimStyleMode=false;geoMode=null;setGeo();modelSelection.clearMembers();selDimIds.clear();modelSelection.clearGrids();} // arming reveals the Inspector (the grid pane IS this command's output — #1352) and disarms Move/Copy + the Dimension style pane too — grid mode, cmTool and the pane must be mutually exclusive (they own the left-click/Esc or the panel). Drop the grid selection too — editing/re-inferring the grid invalidates its index-based ids.
|
|
7782
|
+
else{revealInspector();if(mode==='add'){mode='sel';setMode();}if(dimMode){dimMode=false;setDimMode();}if(csaxisMode){csaxisMode=false;setCsMode();}if(cmTool)disarmCm();modelEditor.steel.disarmFrame3d();dimStyleMode=false;geoMode=null;setGeo();modelSelection.clearMembers();selDimIds.clear();modelSelection.clearGrids();} // arming reveals the Inspector (the grid pane IS this command's output — #1352) and disarms Move/Copy + the Dimension style pane too — grid mode, cmTool and the pane must be mutually exclusive (they own the left-click/Esc or the panel). Also the 3D local-frame tool: it's reachable in 3D and owns the 3D left-click, so Grid lines must disarm it like every other takeover (#1413 repro 2). Drop the grid selection too — editing/re-inferring the grid invalidates its index-based ids.
|
|
7783
7783
|
panel();}
|
|
7784
7784
|
// The Dimension style pane — a panel takeover like the grid panel. It edits the MODEL-GLOBAL defaults
|
|
7785
7785
|
// (C.dim_style), so every dim that doesn't carry its own style repaints as you click. Each change rides
|
|
@@ -12416,14 +12416,24 @@ function csSyncF3d(){const d3=window.Steel3DView;if(!d3||!d3.frameInfo)return;
|
|
|
12416
12416
|
const fi=d3.frameInfo(),armed=!!(modelEditor.steel.frameArmed&&modelEditor.steel.frameArmed()),armB=document.getElementById('csArm3dB'),fields=document.getElementById('csF3dFields');
|
|
12417
12417
|
const pick=(modelEditor.steel.framePicking&&modelEditor.steel.framePicking())?(modelEditor.steel.framePickStep?modelEditor.steel.framePickStep():0):null, pickChanged=pick!==csPrevPick; csPrevPick=pick;
|
|
12418
12418
|
const wasArmed=armB?armB.classList.contains('on'):false; // arm/disarm edge — take over / release #panel only on the transition (+ pick-step changes), not on every drag tick
|
|
12419
|
-
if(armB)armB.classList.toggle('on',armed);if(fields)fields.classList.toggle('on',armed);
|
|
12419
|
+
if(armB){armB.classList.toggle('on',armed);armB.setAttribute('aria-pressed',String(armed));}if(fields)fields.classList.toggle('on',armed); // an armable mode must SAY whether it is armed (aria-pressed), like every other takeover button — the class alone is invisible to a screen reader (#1392, now that other commands flip this button too — #1413)
|
|
12420
12420
|
if(armed){const FT=FT_TO_MM,set=(id,v)=>{const el=document.getElementById(id);if(el&&document.activeElement!==el)el.value=v;};
|
|
12421
12421
|
const ori=document.getElementById('csF3dOri');
|
|
12422
12422
|
if(fi.mode==='local'){
|
|
12423
12423
|
if(ori)ori.textContent=fi.horizontal?(Math.round(fi.angleDeg)+'°'+(fi.zUp?'':' · Z down')):('Tilted '+Math.round(fi.tiltDeg)+'° · Z '+(fi.zUp?'up':'down')); // read-only: set by the pick, spun by the ring; note a flipped-Z horizontal frame (Codex)
|
|
12424
12424
|
set('csF3dX',(fi.origin[0]/FT).toFixed(2));set('csF3dY',(fi.origin[1]/FT).toFixed(2));set('csF3dZ',(fi.origin[2]/FT).toFixed(2));}
|
|
12425
12425
|
else if(ori)ori.textContent='—';}
|
|
12426
|
-
if(armed&&!wasArmed)
|
|
12426
|
+
if(armed&&!wasArmed){ // ARMING edge only (never a disarm or a pick-step repaint): the 3D frame just took the panel + the 3D left-click, so every OTHER 3D-reachable panel/click owner must let go (#1413)
|
|
12427
|
+
const had2d=gridMode; // Grid lines draws into the (3D-hidden) 2D SVG too — disarming it needs a 2D repaint or it comes back stale on the return to 2D (#1413; the view-switch note at :20631/:20579 says the same)
|
|
12428
|
+
if(gridMode)setGridMode(false); // Grid lines owns #panel AHEAD of the frame pane and consumes the 3D click behind it — release it (#1413, repro 1)
|
|
12429
|
+
// The member-end review also owns #panel (the #1412 contract, panel() shows it first). Yield it exactly like the
|
|
12430
|
+
// 2D takeovers do — it closes, or ASKS when ends are ticked; in the ask case disarm the frame NOW (so its 3-click
|
|
12431
|
+
// prompt isn't buried under the question and its picks don't run unseen) and re-arm it from the callback once the
|
|
12432
|
+
// review is out of the way (owner ruling, #1413 — the frame was left out of #1449 because it arms through here).
|
|
12433
|
+
if(!memberEndYieldPanel('Set local axes (3D)',()=>modelEditor.steel.armFrame3d(true),'csArm3dB')){modelEditor.steel.disarmFrame3d();return;} // through the facade; the disarm re-enters csSyncF3d (fireFrameChange→onFrame3dChange) and repaints the button + panel — don't reveal/render over the review's question
|
|
12434
|
+
revealInspector(); // the 3D half of Set local axes… — same menu command, same takeover pane, so the same collapsed-Inspector reveal (#1352)
|
|
12435
|
+
if(had2d)render(); // un-stale the 2D SVG the disarmed grid pane left behind, so the return to 2D isn't skipped by disarmed2d being already false (#1413)
|
|
12436
|
+
}
|
|
12427
12437
|
if((wasArmed!==armed||pickChanged)&&typeof panel==='function')panel();} // arm/disarm edge OR a pick-step change → repaint #panel (drag ticks don't, so no per-move rebuild)
|
|
12428
12438
|
document.getElementById('csArm3dB').onclick=()=>{const d3=window.Steel3DView;if(!d3||!d3.armFrame3d)return;const armed=!!(modelEditor.steel.frameArmed&&modelEditor.steel.frameArmed());d3.armFrame3d(!armed);csSyncF3d();updCS();};
|
|
12429
12439
|
['csF3dX','csF3dY','csF3dZ'].forEach(id=>{const el=document.getElementById(id);if(!el)return; // Origin X/Y/Z stay editable (translate-only); orientation is read-only (pick + ring)
|
|
@@ -12901,7 +12911,19 @@ let modelShellMount=null;
|
|
|
12901
12911
|
{const root=document.querySelector('main'),viewport=document.getElementById('pane3d'),surface=document.getElementById('stage3d'),
|
|
12902
12912
|
toolbar=document.getElementById('m3dBar'),orientation=document.getElementById('m3dCube'),axes=document.getElementById('m3dAxes'),
|
|
12903
12913
|
explorer=legendBody('root'),pointerDock=document.getElementById('bottomDock'),inspector=document.getElementById('panel');
|
|
12904
|
-
if(root&&viewport&&surface&&toolbar&&orientation&&axes&&explorer&&pointerDock&&inspector)modelShellMount=EditorShell.mountModelEditorShell({root,viewport,surface,toolbar,orientation,axes,explorer,pointerDock,inspector});
|
|
12914
|
+
if(root&&viewport&&surface&&toolbar&&orientation&&axes&&explorer&&pointerDock&&inspector)modelShellMount=EditorShell.mountModelEditorShell({root,viewport,surface,toolbar,orientation,axes,explorer,pointerDock,inspector});
|
|
12915
|
+
// The model band (#m3dToolBar) docks off the view band (#m3dBar): to its RIGHT in 3D
|
|
12916
|
+
// (`left:calc(var(--m3d-view-w)…)`) and BELOW it in Split (`top:calc(…var(--m3d-view-h)…)`). The view
|
|
12917
|
+
// band wraps to a second row on a narrow pane, so both must be MEASURED, not assumed (#1455) — without
|
|
12918
|
+
// this they kept the 335px/40px CSS defaults, so on a ~430px Split pane the wrapped view band grew to
|
|
12919
|
+
// two rows while the model band stayed at the one-row offset and the two overlapped. Written on <body>
|
|
12920
|
+
// so #m3dToolBar inherits them; the observer re-measures on every wrap and view-mode change.
|
|
12921
|
+
if(toolbar&&window.ResizeObserver){
|
|
12922
|
+
const syncBand=()=>{const s=document.body.style;s.setProperty('--m3d-view-w',toolbar.offsetWidth+'px');s.setProperty('--m3d-view-h',toolbar.offsetHeight+'px');};
|
|
12923
|
+
// Measure once up front too: the observer's first callback is async, so without this the model band
|
|
12924
|
+
// would paint one frame at the 335px/40px defaults before jumping to the measured position.
|
|
12925
|
+
syncBand();new ResizeObserver(syncBand).observe(toolbar);
|
|
12926
|
+
}}
|
|
12905
12927
|
// The split divider. Deliberately the #panelResizer recipe above, gesture for gesture — drag,
|
|
12906
12928
|
// double-click to reset, arrow keys with a Shift coarse step — so the editor's two separators behave the
|
|
12907
12929
|
// same. The difference is the UNIT: this one stores a RATIO, not a width, so the split survives a window
|
|
@@ -681,9 +681,15 @@ export function createV2CommandSession(model, options = {}) {
|
|
|
681
681
|
plan.memberObservations = clone(row.memberObservations || []);
|
|
682
682
|
plan.frame = clone(row.frame || null);
|
|
683
683
|
// Registration controls, restored by PRESENCE: an absent `datum_ref` says "this control point
|
|
684
|
-
// is the model origin", so a missing key must delete rather than be skipped (#740).
|
|
684
|
+
// is the model origin", so a missing key must delete rather than be skipped (#740). An
|
|
685
|
+
// `undefined` VALUE is absent too (#1446): `memberEndSnapshot` maps `datum_ref: p.datum_ref`,
|
|
686
|
+
// so a plan with no datum control arrives as `{datum_ref: undefined}` — an own key with no
|
|
687
|
+
// value. Restoring that fabricates `datum_ref: undefined`, which the schema rejects
|
|
688
|
+
// (`expected object`), and the member-end extend that produced it then fails to load. The undo
|
|
689
|
+
// `snapshot()` has the same mapping but survives only because `JSON.stringify` drops the
|
|
690
|
+
// undefined key; treating undefined as absent here makes every producer safe.
|
|
685
691
|
for (const key of ['datum_ref', 'control2_ref']) {
|
|
686
|
-
if (Object.hasOwn(row, key)) plan[key] = clone(row[key]);
|
|
692
|
+
if (Object.hasOwn(row, key) && row[key] !== undefined) plan[key] = clone(row[key]);
|
|
687
693
|
else delete plan[key];
|
|
688
694
|
}
|
|
689
695
|
}
|