@floless/app 0.99.2 → 0.99.3
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/floless-server.cjs +2 -2
- package/dist/web/steel-editor.html +20 -11
- package/package.json +1 -1
package/dist/floless-server.cjs
CHANGED
|
@@ -53106,7 +53106,7 @@ function appVersion() {
|
|
|
53106
53106
|
return resolveVersion({
|
|
53107
53107
|
isSea: isSea2(),
|
|
53108
53108
|
sqVersionXml: readSqVersionXml(),
|
|
53109
|
-
define: true ? "0.99.
|
|
53109
|
+
define: true ? "0.99.3" : 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.99.
|
|
53119
|
+
return resolveChannel({ isSea: isSea2(), define: true ? "0.99.3" : void 0 });
|
|
53120
53120
|
}
|
|
53121
53121
|
|
|
53122
53122
|
// workflow-update.ts
|
|
@@ -428,8 +428,8 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
428
428
|
body.dimon #svg,body.dimon line.member,body.dimon line.seg,body.dimon image,body.add #svg,body.add line.member,body.add line.seg,body.add image,body.add polygon.member,body.add rect.pdfsheet{cursor:crosshair} /* Add-member is click-to-place like the Dimension tool → the whole canvas shows the crosshair */
|
|
429
429
|
body.csaxison #svg,body.csaxison line.member,body.csaxison line.seg,body.csaxison image{cursor:crosshair}
|
|
430
430
|
g.csglyph text{user-select:none}
|
|
431
|
-
body.geo line.seg{opacity:.45;cursor:crosshair} body.geo line.member{cursor:crosshair}
|
|
432
|
-
body.geo line.seg:hover{stroke:#22d3ee;opacity:1;stroke-width:4} body.geo line.member:hover{stroke-width:8}
|
|
431
|
+
body.geo line.seg{opacity:.45;cursor:crosshair} body.geo line.member{cursor:crosshair} body.geoel line.gridhit{cursor:crosshair} /* a grid line is an extend/trim target (geoel) — crosshair only then, not in Split; leaves its drag/resize cursor everywhere else */
|
|
432
|
+
body.geo line.seg:hover{stroke:#22d3ee;opacity:1;stroke-width:4} body.geo line.member:hover{stroke-width:8} body.geoel line.gridhit:hover{stroke:#22d3ee;opacity:.55} /* target cue on the coincident transparent hit line — colour only, KEEP its 9px width (shrinking it would shrink the pointer-events:stroke hit area and flicker the hover) */
|
|
433
433
|
circle.numbg{fill:var(--brand);stroke:#fff;stroke-width:1.5;vector-effect:non-scaling-stroke;pointer-events:none}
|
|
434
434
|
text.numtx{fill:#fff;font:bold 12px system-ui;text-anchor:middle;dominant-baseline:central;pointer-events:none}
|
|
435
435
|
#dupStat.has b{color:#fca5a5} #dupB.alert{background:#7f1d1d;border-color:#991b1b} #dupB.alert:hover{background:#991b1b}
|
|
@@ -1863,15 +1863,23 @@ function renderDims(){return `<g class=dimsg>${renderDimsInner()}</g>`;}
|
|
|
1863
1863
|
const GC=()=>window.GridCore||null;
|
|
1864
1864
|
function gridOn(){return !!(typeof P!=='undefined'&&P&&P.grid&&P.grid.on!==false);}
|
|
1865
1865
|
function gridGeo(){const gc=GC();if(!gc||typeof P==='undefined'||!P||!P.grid)return null;try{return gc.gridGeometry(P.grid,(P.pt_per_ft>0)?P.pt_per_ft:1);}catch(_){return null;}}
|
|
1866
|
+
// A grid <line> element (.gridhit) → its two endpoints [[x,y],[x,y]], or null. Mirrors the axis/index decode
|
|
1867
|
+
// in the grid-drag path so a grid line can also serve as an extend/trim target.
|
|
1868
|
+
function gridLineEndpoints(el){const geo=gridGeo();if(!geo||!el||!el.dataset)return null;
|
|
1869
|
+
const free=el.dataset.gl!=null,axis=free?'l':(el.dataset.gv!=null?'v':(el.dataset.gh!=null?'h':null));if(!axis)return null;
|
|
1870
|
+
const gi=+(free?el.dataset.gl:(el.dataset.gv!=null?el.dataset.gv:el.dataset.gh));if(!isFinite(gi))return null;
|
|
1871
|
+
const line=free?(geo.lines||[])[gi]:geo[axis][gi];if(!line)return null;
|
|
1872
|
+
return free?[line.a.slice(),line.b.slice()]:(axis==='v'?[[line.x,line.lo],[line.x,line.hi]]:[[line.lo,line.y],[line.hi,line.y]]);}
|
|
1866
1873
|
function gridSvg(){
|
|
1867
1874
|
if(!gridOn())return '';
|
|
1868
1875
|
const geo=gridGeo();if(!geo||(!geo.v.length&&!geo.h.length&&!(geo.lines&&geo.lines.length)))return '';
|
|
1869
1876
|
const R=11/zoom,F=12/zoom;
|
|
1870
1877
|
let s='<g id=gridG>';
|
|
1871
1878
|
const gsel=i=>selGridIds.has(i)?' sel':''; // marquee/Ctrl+A grid selection → highlight the visible line
|
|
1872
|
-
|
|
1873
|
-
geo.
|
|
1874
|
-
|
|
1879
|
+
const gTip=geoMode==='el'?'extend/trim target':'drag to move'; // while Extend/Trim is armed, a grid line is a target (drag is disabled) — don't promise "drag to move"
|
|
1880
|
+
geo.v.forEach((l,i)=>{s+=`<line class="gridln${gsel('gv:'+i)}" data-gv="${i}" x1="${l.x}" y1="${l.lo}" x2="${l.x}" y2="${l.hi}"/><line class="gridhit gv" data-gv="${i}" x1="${l.x}" y1="${l.lo}" x2="${l.x}" y2="${l.hi}" data-tip="Grid ${esc(l.label)} — ${gTip}"></line>`;});
|
|
1881
|
+
geo.h.forEach((l,i)=>{s+=`<line class="gridln${gsel('gh:'+i)}" data-gh="${i}" x1="${l.lo}" y1="${l.y}" x2="${l.hi}" y2="${l.y}"/><line class="gridhit gh" data-gh="${i}" x1="${l.lo}" y1="${l.y}" x2="${l.hi}" y2="${l.y}" data-tip="Grid ${esc(l.label)} — ${gTip}"></line>`;});
|
|
1882
|
+
(geo.lines||[]).forEach((l,i)=>{s+=`<line class="gridln${gsel('gl:'+(l.id!=null?l.id:i))}" data-gl="${i}" x1="${l.a[0]}" y1="${l.a[1]}" x2="${l.b[0]}" y2="${l.b[1]}"/><line class="gridhit gl" data-gl="${i}" x1="${l.a[0]}" y1="${l.a[1]}" x2="${l.b[0]}" y2="${l.b[1]}" data-tip="Grid ${esc(l.label)} — ${gTip}"></line>`;});
|
|
1875
1883
|
const bub=(x,y,lb,ax,i,end)=>`<g class=gridbubg data-${ax}="${i}" data-end="${end}" data-tip="Grid ${esc(lb)} — drag to move or adjust · dbl-click to rename · click to edit the grid"><circle class=gridbub data-bx="${x}" data-by="${y}" cx="${x}" cy="${y}" r="${R}"/><text class=gridtx data-bx="${x}" data-by="${y}" x="${x}" y="${y}" style="font-size:${F}px">${esc(lb)}</text></g>`;
|
|
1876
1884
|
geo.v.forEach((l,i)=>{s+=bub(l.x,l.lo,l.label,'gv',i,0)+bub(l.x,l.hi,l.label,'gv',i,1);});
|
|
1877
1885
|
geo.h.forEach((l,i)=>{s+=bub(l.lo,l.y,l.label,'gh',i,0)+bub(l.hi,l.y,l.label,'gh',i,1);});
|
|
@@ -2117,7 +2125,7 @@ function renderGridPanel(p){
|
|
|
2117
2125
|
document.getElementById('gridRemoveB').onclick=()=>{edit(()=>{P.grid=null;});};
|
|
2118
2126
|
document.getElementById('gridDoneB').onclick=()=>{setGridMode(false);render();};
|
|
2119
2127
|
}
|
|
2120
|
-
function setGeo(){document.body.classList.toggle('geo',!!geoMode);}
|
|
2128
|
+
function setGeo(){document.body.classList.toggle('geo',!!geoMode);document.body.classList.toggle('geoel',geoMode==='el');} // geoel = Extend/Trim armed; grid lines are a target ONLY then (not in Split), so their crosshair/highlight keys off geoel, not geo
|
|
2121
2129
|
// --- repeat last command (AutoCAD/Tekla): when NO tool is active, Space/Enter re-invokes the last command ---
|
|
2122
2130
|
let lastCmd=null;
|
|
2123
2131
|
function setLastCmd(label,run){lastCmd={label,run};}
|
|
@@ -2249,7 +2257,7 @@ function esc(s){return String(s).replace(/[<>&"]/g,c=>({'<':'<','>':'>','&
|
|
|
2249
2257
|
function render(){
|
|
2250
2258
|
document.body.classList.remove('snapping'); // a wholesale svg rebuild drops any #snapMark → clear the cursor-hide flag too (the next pointermove re-adds it if still snapping)
|
|
2251
2259
|
buildColorRank(); // refresh the model-global colour rank before any colorFor() call below (B2 — keeps 2D hues stable across plans + matched to 3D)
|
|
2252
|
-
if(geoMode&&(selIds.size<1||(geoMode==='split'&&selIds.size!==1))){geoMode=null;
|
|
2260
|
+
if(geoMode&&(selIds.size<1||(geoMode==='split'&&selIds.size!==1))){geoMode=null;setGeo();} // Split needs exactly one member; Extend/Trim works on any selection. setGeo() clears BOTH geo + geoel (not a bare remove('geo')) so the grid affordance can't outlive the tool
|
|
2253
2261
|
let s=overlaySvg(); // crisp vector linework (snappable) when the sheet has vectors; raster only for scanned PDFs
|
|
2254
2262
|
s+=gridSvg(); // structural grid under the linework (members/dims stay on top)
|
|
2255
2263
|
for(const sg of P.segments) s+=`<line class=seg data-seg="${sg.id}" x1="${sg.a[0]}" y1="${sg.a[1]}" x2="${sg.b[0]}" y2="${sg.b[1]}"/>`;
|
|
@@ -2745,7 +2753,7 @@ function panel(){
|
|
|
2745
2753
|
<div class=seg2 style="margin-top:6px"><button id=rot0>0°</button><button id=rot90>90°</button><button id=rot180>180°</button><button id=rot270>270°</button></div>
|
|
2746
2754
|
<div class=divrow><hr><span class=sect style="margin:0">Modify geometry</span><hr></div>
|
|
2747
2755
|
<div class=seg2 style="margin-top:0"><button id=geoEL class="${geoMode==='el'?'on':''}">Extend / Trim all</button></div>
|
|
2748
|
-
<div class=hint style="margin-top:6px">${geoMode==='el'?'Click a <b>target line</b> — the nearest end of <b>every</b> selected member snaps to where it meets that line.':'<b>Extend/Trim</b> (E) every selected member\'s nearest end to one line. <b>Esc</b> cancels.'}</div>
|
|
2756
|
+
<div class=hint style="margin-top:6px">${geoMode==='el'?'Click a <b>target line</b> (member, segment, or grid line) — the nearest end of <b>every</b> selected member snaps to where it meets that line.':'<b>Extend/Trim</b> (E) every selected member\'s nearest end to one line. <b>Esc</b> cancels.'}</div>
|
|
2749
2757
|
<div class=row><button class=ghostw id=swapEnds data-tip="Reverse every selected member: swap each one's start and end (yellow ↔ magenta / bottom ↔ top) handles · Shortcut: P">⇄ Swap start ↔ end (all) <span style="opacity:.55">(P)</span></button></div>
|
|
2750
2758
|
<div class="row f"><button class=danger id=del>Delete selected (${arr.length})</button></div>`;
|
|
2751
2759
|
wireTypeFilter(p);
|
|
@@ -2929,7 +2937,7 @@ function panel(){
|
|
|
2929
2937
|
<div class=seg2 style="margin-top:6px"><button id=rot0 class="${rotN===0?'on':''}">0°</button><button id=rot90 class="${rotN===90?'on':''}">90°</button><button id=rot180 class="${rotN===180?'on':''}">180°</button><button id=rot270 class="${rotN===270?'on':''}">270°</button></div>
|
|
2930
2938
|
${br?'':`<div class=divrow><hr><span class=sect style="margin:0">Modify geometry</span><hr></div>
|
|
2931
2939
|
<div class=seg2 style="margin-top:0"><button id=geoEL class="${geoMode==='el'?'on':''}">Extend / Trim</button><button id=geoSplit class="${geoMode==='split'?'on':''}">Split</button></div>
|
|
2932
|
-
<div class=hint style="margin-top:6px">${geoMode==='el'?'Click a <b>target line</b> — another member or a
|
|
2940
|
+
<div class=hint style="margin-top:6px">${geoMode==='el'?'Click a <b>target line</b> — another member, a grey segment, or a grid line. The nearest end of this member snaps to where the two lines meet (extends if short, trims if it overshoots).':geoMode==='split'?'Click a <b>point on this member</b> to cut it into two members.':'<b>Extend/Trim</b> (E) an end to meet another line · <b>Split</b> (S) at a point. <b>Esc</b> cancels.'}</div>
|
|
2933
2941
|
<div class=row><button class=ghostw id=swapEnds data-tip="Reverse the member: swap the start (${col?'bottom':'yellow'}) and end (${col?'top':'magenta'}) handles · Shortcut: P">⇄ Swap start ↔ end <span style="opacity:.55">(P)</span></button></div>`}
|
|
2934
2942
|
<div class="row f"><button class=danger id=del>Delete member</button></div>`;
|
|
2935
2943
|
wireTypeFilter(p);
|
|
@@ -3998,7 +4006,8 @@ svg.addEventListener('pointerdown',e=>{if(e.button!==0)return;const t=e.target;
|
|
|
3998
4006
|
if(tm&&isBrace(tm))toast('A brace can’t be an extend/trim target — its drawn line is offset from its work points'); // clicking the VISIBLE brace body would silently target its invisible baseline
|
|
3999
4007
|
else if(tm)tgt=[tm.wp[0],tm.wp[1]];}
|
|
4000
4008
|
else if(t.classList.contains('seg')){const sg=P.segments.find(s=>s.id===t.dataset.seg);if(sg)tgt=[sg.a,sg.b];}
|
|
4001
|
-
if(
|
|
4009
|
+
else if(t.classList.contains('gridhit')){const gp=gridLineEndpoints(t);if(gp)tgt=gp;} // a grid line is a valid target — its two endpoints define the line to meet
|
|
4010
|
+
if(tgt){geoMode=null;setGeo();if(!snapEndMulti(sel2d(),tgt[0],tgt[1]))render();} // miss (empty/own line) keeps the mode armed; a 0-result target (all parallel / all braces) still needs a render() to un-arm the panel + grid affordance (snapEndMulti only renders when it moved something)
|
|
4002
4011
|
return;}
|
|
4003
4012
|
if(t.classList.contains('handle')){const id=t.dataset.mid||[...selIds][0],m=byId(id),h=+t.dataset.h;if(!m)return;buildSnap(id);
|
|
4004
4013
|
drag={type:'end',h,id,anchor:m.wp[1-h].slice(),orig:m.wp[h].slice(),pre:snapshot()};svg.setPointerCapture(e.pointerId);e.preventDefault();return;} // anchor = the fixed end (length ref); orig = where this end started (moved ref)
|
|
@@ -6395,7 +6404,7 @@ function setPlan(i){C.active=i;P=C.plans[i];
|
|
|
6395
6404
|
profs=[...new Set([...P.members.map(m=>m.profile), ...Object.keys(WT)])].sort();
|
|
6396
6405
|
// undo/redo is one GLOBAL stack (module-level, declared once) — NOT swapped per plane. A plane switch
|
|
6397
6406
|
// must not reset or re-scope undo, since snapshots are whole-model and selection/edits span sheets.
|
|
6398
|
-
selIds=new Set();findHits=new Set();selGridIds=new Set();picking=false;pickKind='profile';pickEnd=null;mode='sel';geoMode=null; // findHits + selGridIds reset per plan like selIds — a stale highlight (or, for grids, an index-based id) must not bleed onto another sheet (grids are per-plan)
|
|
6407
|
+
selIds=new Set();findHits=new Set();selGridIds=new Set();picking=false;pickKind='profile';pickEnd=null;mode='sel';geoMode=null;setGeo(); // findHits + selGridIds reset per plan like selIds — a stale highlight (or, for grids, an index-based id) must not bleed onto another sheet (grids are per-plan). setGeo() clears body.geo/geoel so an armed Extend/Trim tool doesn't leave the grid crosshair on the next sheet
|
|
6399
6408
|
dimMode=false;dimChain=false;dimSplitMode=false;selDimIds=new Set();setDimMode(); // Dimension tool resets per plan (incl. chain + split); setDimMode syncs the button/body.dimon classes + clears any draft/preview/chain (dimsVisible persists across plans)
|
|
6400
6409
|
setMode(); // Add-member likewise resets per plan: syncs body.add (crosshair) + the button off, and drops any in-progress start point (a plan-pixel draft is stale on another sheet)
|
|
6401
6410
|
if(gridMode||gridPick||gridLinePick){if(gridLinePick&&gridLinePick.line)gridLinePick.line.remove();gridMode=false;gridPick=false;gridLinePick=null;gridSetPickClass();} // grid panel/pick disarms per plan like the other takeover tools (a leaked pick would set geometry in the WRONG sheet's display space)
|