@floless/app 0.159.0 → 0.160.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.
- package/dist/floless-server.cjs +29576 -23804
- package/dist/schemas/steel.model.v2.schema.json +1 -0
- package/dist/skills/floless-app-onboarding/SKILL.md +4 -3
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +1 -2
- package/dist/skills/floless-app-rfi/SKILL.md +29 -1
- package/dist/skills/floless-app-steel-model/SKILL.md +2 -2
- package/dist/web/app.css +184 -151
- package/dist/web/app.js +17 -51
- package/dist/web/aware.js +504 -542
- package/dist/web/chat-question-card.js +24 -1
- package/dist/web/chat.css +131 -29
- package/dist/web/chat.js +1225 -178
- package/dist/web/commands-shell.js +676 -50
- package/dist/web/commands-steel.js +1 -0
- package/dist/web/guide.js +8 -0
- package/dist/web/index.html +23 -41
- package/dist/web/instructor.js +14 -5
- package/dist/web/pages.js +115 -18
- package/dist/web/panels.js +19 -1
- package/dist/web/project-rfis.js +715 -0
- package/dist/web/project-workflows.js +236 -4
- package/dist/web/run-history.js +198 -0
- package/dist/web/run-page-view.js +12 -2
- package/dist/web/steel-3d-core.js +29 -1
- package/dist/web/steel-editor.html +71 -10
- package/dist/web/steel-model-v2-projection.js +7 -0
- package/dist/web/workspaces.js +136 -48
- package/package.json +2 -1
|
@@ -1880,6 +1880,11 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
1880
1880
|
inline-block for max-width to apply at all, and vertical-align:bottom to hold its baseline with the
|
|
1881
1881
|
sibling chips (overflow:hidden makes an inline-block's bottom edge its own baseline). */
|
|
1882
1882
|
#srcStat{white-space:nowrap}
|
|
1883
|
+
/* #2521 row 5: the Quick model chip. Amber (= needs review, never an error), as last saved; dashed when unknown. */
|
|
1884
|
+
#quickStat{white-space:nowrap;color:var(--warn)}
|
|
1885
|
+
#quickStat.is-unknown{text-decoration:underline dashed;text-underline-offset:3px}
|
|
1886
|
+
.conf-quick{margin:0 0 8px;padding:6px 10px;border:1px solid var(--warn-edge);border-radius:6px;color:var(--mut);font-size:12px;line-height:1.45}
|
|
1887
|
+
.conf-quick b{color:var(--warn)}
|
|
1883
1888
|
#srcStat b{display:inline-block;max-width:130px;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}
|
|
1884
1889
|
#detailNewForm input#dnName{margin:2px 0 10px}
|
|
1885
1890
|
#dnDrop{border:1px dashed var(--ctrl-border);border-radius:8px;background:var(--sunken);min-height:88px;display:flex;align-items:center;justify-content:center;gap:12px;text-align:center;color:var(--mut);cursor:pointer;padding:12px;font-size:12px}
|
|
@@ -2998,6 +3003,7 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
2998
3003
|
<button data-command-id="steel.confidence-report" class=stat id=confStat data-tip="Confidence report — review recorded drawing evidence." style="display:none" aria-haspopup=dialog aria-controls=confModal><span id=confLabel>Confidence</span> <b id=confPct>—</b><span id=confTgt></span></button>
|
|
2999
3004
|
<span class=stat id=saveStat data-tip="Edits auto-save in this browser (localStorage)">Saved</span>
|
|
3000
3005
|
<span class=stat id=srcStat style="display:none"></span>
|
|
3006
|
+
<span class=stat id=quickStat data-command-id="steel.quick-model-chip" tabindex=0 style="display:none"></span>
|
|
3001
3007
|
<span class=tb-sep></span>
|
|
3002
3008
|
<button data-command-id="steel.undo" id=undoB data-tip="Undo (Ctrl+Z)">↶</button>
|
|
3003
3009
|
<button data-command-id="steel.redo" id=redoB data-tip="Redo (Ctrl+Y / Ctrl+Shift+Z)">↷</button>
|
|
@@ -3484,6 +3490,7 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
3484
3490
|
</div></div>
|
|
3485
3491
|
<div id=confModal role=dialog aria-modal=true aria-labelledby=confTitle><div class=mbackdrop id=confBackdrop></div>
|
|
3486
3492
|
<div class=mpanel><div class=mhead><b id=confTitle>Confidence report</b><label class=conf-tgt data-tip="Confidence target for this read (%). Overrides the workflow default; saved with the contract.">Target <input data-command-id="steel.confidence-target" id=confTarget type=number min=0 max=100 step=1 placeholder="—"> % <span id=confTargetState></span></label><button data-command-id="steel.dialog-close#the confidence report" id=confClose aria-label="Close confidence report">✕</button></div>
|
|
3493
|
+
<div id=confQuick class=conf-quick role=note hidden></div>
|
|
3487
3494
|
<div id=confCats class=conf-cats></div>
|
|
3488
3495
|
<div id=confFilter class=conf-filter></div>
|
|
3489
3496
|
<div id=confBody class=conf-body></div></div></div>
|
|
@@ -4373,6 +4380,32 @@ function handleReviewChanged(m){
|
|
|
4373
4380
|
applying it to a sign-off would throw away the user's unsaved edits because another tab clicked a
|
|
4374
4381
|
button. A review generation moving is not a reason to lose work. */
|
|
4375
4382
|
markReviewDirty({storeRevision:reviewAt.storeRevision,reviewRevision:m.reviewRevision});}
|
|
4383
|
+
/* #2521 row 5: paint the Quick model chip from the server's `quick` (the snapshot served, or what a save stored). The
|
|
4384
|
+
server sends the words; a precise model, or no field, hides the chip. It describes the model AS LAST SAVED. */
|
|
4385
|
+
let lastSavedQuick=null;
|
|
4386
|
+
function paintQuickStat(q){
|
|
4387
|
+
if(q===undefined)return; // a reply whose body could not be read leaves the last label in place; null = precise
|
|
4388
|
+
lastSavedQuick=q&&(q.state==='quick'||q.state==='unknown')&&typeof q.short==='string'?q:null;
|
|
4389
|
+
const el=document.getElementById('quickStat');if(!el)return;
|
|
4390
|
+
// Precise: hide the chip AND clear an open confidence report's line, so both describe the same saved document.
|
|
4391
|
+
if(!lastSavedQuick){el.style.display='none';el.textContent='';el.removeAttribute('data-tip');if(typeof renderConfQuick==='function')renderConfQuick();return;}
|
|
4392
|
+
el.textContent=lastSavedQuick.short;
|
|
4393
|
+
el.classList.toggle('is-unknown',lastSavedQuick.state==='unknown');
|
|
4394
|
+
el.setAttribute('data-tip',(lastSavedQuick.label||'')+'. '+(lastSavedQuick.tip||'')+' Shown as last saved.');
|
|
4395
|
+
el.style.display='';
|
|
4396
|
+
if(typeof renderConfQuick==='function')renderConfQuick();
|
|
4397
|
+
}
|
|
4398
|
+
/* The confidence report's line: scoped to the last saved model, and it says so when the report shows unsaved edits. */
|
|
4399
|
+
function renderConfQuick(){
|
|
4400
|
+
const el=document.getElementById('confQuick');if(!el)return;
|
|
4401
|
+
if(!lastSavedQuick){el.hidden=true;el.textContent='';return;}
|
|
4402
|
+
el.textContent='';
|
|
4403
|
+
const b=document.createElement('b');b.textContent='As last saved: '+(lastSavedQuick.label||lastSavedQuick.short)+'.';
|
|
4404
|
+
el.appendChild(b);
|
|
4405
|
+
el.appendChild(document.createTextNode(' '+(lastSavedQuick.tip||'')
|
|
4406
|
+
+(editorHasUnsavedWork()?' This report includes changes not saved yet; the label is the last saved model’s.':'')));
|
|
4407
|
+
el.hidden=false;
|
|
4408
|
+
}
|
|
4376
4409
|
async function rebootstrapContractEvents(epoch,attempt=0){
|
|
4377
4410
|
if(epoch!==contractEventEpoch)return;contractEventReady=false;
|
|
4378
4411
|
try{
|
|
@@ -4749,6 +4782,7 @@ async function boot() {
|
|
|
4749
4782
|
// assigning before the type is validated would publish a document this editor cannot render — briefly
|
|
4750
4783
|
// live, and observable to anything that runs in between. Validate, then publish.
|
|
4751
4784
|
const snapshotPayload = await res.json();
|
|
4785
|
+
paintQuickStat(snapshotPayload && typeof snapshotPayload === 'object' ? (snapshotPayload.quick ?? null) : undefined);
|
|
4752
4786
|
const loaded = snapshotPayload && snapshotPayload.contract;
|
|
4753
4787
|
// Shape first, then type. A body that is null, an array or a scalar has no `type` to test, so a
|
|
4754
4788
|
// type-only gate waved it through and the failure surfaced as a raw red `boot().catch` — "Cannot read
|
|
@@ -5228,6 +5262,11 @@ function openChangeList(ctx) {
|
|
|
5228
5262
|
const headline = el('b', null, String(r.headline || '')); summary.appendChild(headline);
|
|
5229
5263
|
if (typeof r.weight === 'string' && r.weight) summary.appendChild(el('span', 'clweight', r.weight));
|
|
5230
5264
|
for (const n of (Array.isArray(r.notes) ? r.notes : [])) body.appendChild(el('div', 'clnote warn', String(n && n.text || '')));
|
|
5265
|
+
// #2521 row 5: each side says what IT rests on, above the changes, so a Quick side never reads as precise.
|
|
5266
|
+
const q = r.quick && typeof r.quick === 'object' ? r.quick : null;
|
|
5267
|
+
for (const [side, scope] of q ? [[q.base, 'Before'], [q.current, 'Now']] : []) {
|
|
5268
|
+
if (side && (side.state === 'quick' || side.state === 'unknown') && typeof side.label === 'string') body.appendChild(el('div', 'clnote warn', scope + ': ' + side.label + '.'));
|
|
5269
|
+
}
|
|
5231
5270
|
if (ctx && ctx.situation === 'A' && typeof r.targetEtag === 'string' && r.targetEtag !== serverEtag) body.appendChild(el('div', 'clnote', CHANGE_LIST_TEXT.changedAgain));
|
|
5232
5271
|
if (r.nothingChanged && typeof r.emptyBody === 'string') body.appendChild(el('p', 'clmsg quiet', r.emptyBody));
|
|
5233
5272
|
for (const g of (Array.isArray(r.groups) ? r.groups : [])) {
|
|
@@ -5541,7 +5580,8 @@ async function memberEndRequest(path,body){
|
|
|
5541
5580
|
if(!PROJECT)throw new Error('Member-end review is available inside a project.');
|
|
5542
5581
|
const mutating=path!=='scan',mid=mutating?newMutationId():null,headers={'content-type':'application/json'};if(mutating){headers['x-floless-mutation-id']=mid;if(serverEtag)headers['if-match']=serverEtag;claimMutation(mid);}
|
|
5543
5582
|
let res;try{res=await fetch('/api/projects/'+encodeURIComponent(PROJECT)+'/member-ends/'+path,{method:'POST',headers,body:JSON.stringify(body)});}catch(e){if(mid)releaseMutation(mid);throw e;}
|
|
5544
|
-
const d=await res.json().catch(()=>({}));if(!res.ok){if(mid)releaseMutation(mid);const error=new Error(d.error||('Member-end request failed ('+res.status+')'));error.code=d.code;error.status=res.status;throw error;}
|
|
5583
|
+
const d=await res.json().catch(()=>({}));if(!res.ok){if(mid)releaseMutation(mid);const error=new Error(d.error||('Member-end request failed ('+res.status+')'));error.code=d.code;error.status=res.status;throw error;}if(d&&d.contract)paintQuickStat(d.quick??null); /* #2521 row 5: a reply carrying the model repaints its label; none means precise */
|
|
5584
|
+
return d;
|
|
5545
5585
|
}
|
|
5546
5586
|
async function scanMemberEnds(liveMessage,pinnedScope){ // pinnedScope: re-check the scope an open review was scanned with (Undo/Redo, a stale apply) instead of the view you are on; only the explicit "Check this sheet/3D model" rescan omits it
|
|
5547
5587
|
closeMore();if((memberEndScan&&memberEndScan.busy)||(memberEndReview&&memberEndReview.busy))return;if(!PROJECT){toast('Open this model from a project to check member ends.');return;}
|
|
@@ -6673,7 +6713,16 @@ function openMaterialPicker({ids=[],current=null,scope='',invoker,onApply}={}){
|
|
|
6673
6713
|
source:`${materialCatalog?.provider?.label||'Material catalog'} · ${env}`,onApply:onApply||((value)=>applyMaterialChoice(targets,value))});
|
|
6674
6714
|
}
|
|
6675
6715
|
let basePickColId=null; // Mode B: the column whose base an armed 3D level-pick retargets
|
|
6676
|
-
|
|
6716
|
+
// Never trim a column below a minimum stub (keeps bos < tos). A FUNCTION, not a constant, because
|
|
6717
|
+
// the number is a drafting convention and a metric project's is a round 300 mm rather than the
|
|
6718
|
+
// 304.8 a converted foot lands on (owner ruling, Pawel, 2026-10-23). Keyed on the project's
|
|
6719
|
+
// ENVIRONMENT — immutable, and a property of the project — never on `displayUnits`, which is a
|
|
6720
|
+
// view preference a person flips at will; a geometry clamp that moved with a display toggle would
|
|
6721
|
+
// make the same model trim differently depending on who was looking at it.
|
|
6722
|
+
// Read off the CONTRACT's own environment, the same field `columnBelowReachOf` reads, so the clamp
|
|
6723
|
+
// the editor applies and the reach a sheet draws can never resolve to different standards. The
|
|
6724
|
+
// server stamps it on write (`stampSteelEnvironment`), so a UK contract always carries it.
|
|
6725
|
+
const minColStubMm=()=>SteelCore.defaultColumnBelowReach(C&&C.environment);
|
|
6677
6726
|
// Mode B: arm the 3D column-base pick on `colId` (a level-snapped elevation → col.bosMm). 3D-view only.
|
|
6678
6727
|
function armBaseTrim(colId){
|
|
6679
6728
|
if(!view3d){toast('Open the 3D view to pick the column base point');return;}
|
|
@@ -7147,7 +7196,7 @@ async function persistServer(force,token){const seq=saveSeq;
|
|
|
7147
7196
|
// write is usually still in flight — the server broadcasts before it replies — so releasing here would
|
|
7148
7197
|
// make the tab read its OWN echo as external and reload itself mid-edit. The id is released when the
|
|
7149
7198
|
// echo consumes it, when the write fails, or when the SSE channel closes (nothing can echo after that).
|
|
7150
|
-
if(res.ok){let d={},bodyReadable=true;try{d=await res.json();}catch(_){bodyReadable=false;}const t=d.etag||res.headers.get('ETag');if(d.contract&&t&&Number.isSafeInteger(d.storeRevision))adoptSaveReply(d.contract,t,d.storeRevision,seq);else{if(t){const pv=serverEtag;serverEtag=t;restampDraftBase(pv,t);}if(Number.isSafeInteger(d.storeRevision))serverRevision=Math.max(serverRevision,d.storeRevision);serverDecided=sentDecided;if(seq!==saveSeq)reconcileDecisions();}conflicted=false;lastSeenCommitOwnSave(t,d,bodyReadable,sentCopy);
|
|
7199
|
+
if(res.ok){let d={},bodyReadable=true;try{d=await res.json();}catch(_){bodyReadable=false;}paintQuickStat(bodyReadable?(d.quick??null):undefined);const t=d.etag||res.headers.get('ETag');if(d.contract&&t&&Number.isSafeInteger(d.storeRevision))adoptSaveReply(d.contract,t,d.storeRevision,seq);else{if(t){const pv=serverEtag;serverEtag=t;restampDraftBase(pv,t);}if(Number.isSafeInteger(d.storeRevision))serverRevision=Math.max(serverRevision,d.storeRevision);serverDecided=sentDecided;if(seq!==saveSeq)reconcileDecisions();}conflicted=false;lastSeenCommitOwnSave(t,d,bodyReadable,sentCopy);
|
|
7151
7200
|
// The write COMMITTED. Apply its revalidation report ONLY when we can prove it describes the live `C`:
|
|
7152
7201
|
// the body was readable AND `seq===saveSeq` (no newer edit landed while this PUT was in flight). Otherwise
|
|
7153
7202
|
// do NOTHING — no merge, no bookkeeping. That is safe because a joint whose removal we then miss is
|
|
@@ -7247,7 +7296,7 @@ async function flushContractWith(token, signal) {
|
|
|
7247
7296
|
showConflictBanner();
|
|
7248
7297
|
throw new Error('save conflict');
|
|
7249
7298
|
}
|
|
7250
|
-
if (res.ok) { let d = {}, bodyReadable = true; try { d = await res.json(); } catch (_) { bodyReadable = false; } if(signal&&signal.aborted)quarantineMutation(mid, seq); const t = d.etag || res.headers.get('ETag'); adoptedTag = t || null; if (d.contract && t && Number.isSafeInteger(d.storeRevision)) { const generationBefore = modelEditGeneration; adoptSaveReply(d.contract, t, d.storeRevision, seq); /* #1936 - installing the reply re-bumps the generation although nothing the person looked at changed; report the post-install generation, but ONLY when nothing visible moved between the PUT and the install (a genuine concurrent edit still shows as a mismatch) */ if (generationBefore === publishedGeneration && modelEditGeneration === generationBefore + 1) publishedGeneration = modelEditGeneration; } else { if (t) { const pv = serverEtag; serverEtag = t; restampDraftBase(pv, t); } if (Number.isSafeInteger(d.storeRevision)) serverRevision = Math.max(serverRevision, d.storeRevision); serverDecided = sentDecided; if (seq !== saveSeq) reconcileDecisions(); } conflicted = false; lastSeenCommitOwnSave(t, d, bodyReadable, sentCopy);
|
|
7299
|
+
if (res.ok) { let d = {}, bodyReadable = true; try { d = await res.json(); } catch (_) { bodyReadable = false; } paintQuickStat(bodyReadable ? (d.quick ?? null) : undefined); if(signal&&signal.aborted)quarantineMutation(mid, seq); const t = d.etag || res.headers.get('ETag'); adoptedTag = t || null; if (d.contract && t && Number.isSafeInteger(d.storeRevision)) { const generationBefore = modelEditGeneration; adoptSaveReply(d.contract, t, d.storeRevision, seq); /* #1936 - installing the reply re-bumps the generation although nothing the person looked at changed; report the post-install generation, but ONLY when nothing visible moved between the PUT and the install (a genuine concurrent edit still shows as a mismatch) */ if (generationBefore === publishedGeneration && modelEditGeneration === generationBefore + 1) publishedGeneration = modelEditGeneration; } else { if (t) { const pv = serverEtag; serverEtag = t; restampDraftBase(pv, t); } if (Number.isSafeInteger(d.storeRevision)) serverRevision = Math.max(serverRevision, d.storeRevision); serverDecided = sentDecided; if (seq !== saveSeq) reconcileDecisions(); } conflicted = false; lastSeenCommitOwnSave(t, d, bodyReadable, sentCopy);
|
|
7251
7300
|
// The flush committed. Same rule as persistServer: apply the report only when the body was readable and
|
|
7252
7301
|
// `seq===saveSeq` (Approve awaits this flush, so the user CAN edit meanwhile and make it stale). Otherwise
|
|
7253
7302
|
// do nothing — the next save re-introduces any joint whose removal we missed, and the server re-decides it.
|
|
@@ -12115,7 +12164,7 @@ function panel(){
|
|
|
12115
12164
|
${memberTypeField('mTypeS',[m])}
|
|
12116
12165
|
<div class="f"><div class=elab>Profile</div><div style="display:flex;gap:6px"><input data-command-id="steel.member-profile" aria-label="Profile" id=pf class=combo data-src=profiles value="${esc(m.profile)}" style="flex:1" autocomplete=off><button data-command-id="steel.browse-profile-catalog" id=profileBrowseS class=ghost aria-label="Search the profile catalog" data-tip="Search the profile catalog — 4,516 profiles, by designation or alias"><svg viewBox="0 0 16 16" aria-hidden=true width=13 height=13 fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round><circle cx="6.9" cy="6.9" r="4.3"/><path d="M10.1 10.1 13.7 13.7"/></svg></button><button data-command-id="steel.pick-profile" id=pickProf class="ghost${(picking&&pickKind==='profile')?' on':''}" aria-pressed="${(picking&&pickKind==='profile')?'true':'false'}" aria-label="Pick profile from a drawing label" data-tip="Pick profile from drawing labels by click, Enter, or Space">⌖</button></div>${(picking&&pickKind==='profile')?'<div class="hint" data-profile-pick-status role=status aria-live=polite style="margin-top:4px;font-style:italic;color:var(--brand)">'+esc(profilePickGuidance())+'</div>':''}</div>
|
|
12117
12166
|
<div class="f"><div class=elab>Material grade</div><div style="display:flex;gap:6px"><input data-command-id="steel.member-material" aria-label="Material grade" id=mat class=combo data-src=materials value="${esc(m.material||'')}" placeholder="Profile default · ${esc(profileDefaultMaterial(m.profile))}" style="flex:1" autocomplete=off data-tip="${m.material?'This member carries its own grade, so it will not follow a profile change':'Empty — follows the profile’s default grade. Type or browse to give this member its own.'}"><button data-command-id="steel.browse-material-catalog" id=materialBrowseS class=ghost aria-label="Search material grades" data-tip="Search the material catalog by name or alias"><svg viewBox="0 0 16 16" aria-hidden=true width=13 height=13 fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round><circle cx="6.9" cy="6.9" r="4.3"/><path d="M10.1 10.1 13.7 13.7"/></svg></button><span class=pslot aria-hidden=true></span></div></div>
|
|
12118
|
-
<div class="row hint">Length <b>${L}</b> · ${wpf==null?'<span id=rfiPill class="pill pill-clickable" role=button tabindex=0 data-tip="Open the RFI list, focused on this member" style="background:var(--err-bg)">RFI — size unresolved</span>':
|
|
12167
|
+
<div class="row hint">Length <b>${L}</b> · ${wpf==null?'<span id=rfiPill class="pill pill-clickable" role=button tabindex=0 data-tip="Open the RFI list, focused on this member" style="background:var(--err-bg)">RFI — size unresolved</span>':_memberWeightHint(m,wpf)}</div>
|
|
12119
12168
|
<div class=elab>Verified</div><span class=vwrap data-panel-control><button data-command-id="steel.member-verified" id=verifyBtn class="vbtn${m.verified?' on':''}" aria-pressed="${m.verified?'true':'false'}" data-tip="Mark this member human-confirmed">${m.verified?'✓ Human-confirmed':'Mark verified'}</button></span>
|
|
12120
12169
|
${mfSect}
|
|
12121
12170
|
${appearanceSect}
|
|
@@ -14400,6 +14449,10 @@ document.getElementById('csArm3dB').onclick=()=>{const d3=window.Steel3DView;if(
|
|
|
14400
14449
|
below zero, over 100 ft) says what is wrong and KEEPS the old one: nothing refuses, and nothing throws. */
|
|
14401
14450
|
function reachEls(){const $=id=>document.getElementById(id);return {inp:$('reachInput'),def:$('reachDef'),reset:$('reachReset'),echo:$('reachEcho'),stat:$('reachStatus')};}
|
|
14402
14451
|
function reachNow(){return SteelCore.columnBelowReachOf(C);}
|
|
14452
|
+
/* THIS project's default reach, which is 300 mm on a metric standard and 304.8 (1'-0") on an imperial one
|
|
14453
|
+
(owner ruling, 2026-10-23). Read through the same resolver the sheets use, so "is this the default?",
|
|
14454
|
+
the Reset tooltip and the toast cannot name a different number from the one Reset actually restores. */
|
|
14455
|
+
function reachDefault(){return SteelCore.defaultColumnBelowReach(C&&C.environment);}
|
|
14403
14456
|
function reachExample(){return displayUnits()===DisplayUnits.MM?'150 · 0.3 m · 6"':'6" · 2\'-0" · 150 mm';}
|
|
14404
14457
|
/** What a typed distance reads as: {ok, mm} or {ok:false, text} (the sentence that says what is wrong, ending with the value kept). */
|
|
14405
14458
|
function reachRead(typed){
|
|
@@ -14436,11 +14489,11 @@ function syncReachRow(){
|
|
|
14436
14489
|
const ready=!!C&&!!SteelCore; // boot() resolves the units before the first render; with no project and none stored, ft-in is the documented default
|
|
14437
14490
|
e.inp.disabled=!ready;
|
|
14438
14491
|
if(!ready)return; // the markup's "Loading…" placeholder stands: never a plausible guess
|
|
14439
|
-
const mm=reachNow(),isDefault=mm===
|
|
14492
|
+
const mm=reachNow(),isDefault=mm===reachDefault();
|
|
14440
14493
|
if(document.activeElement!==e.inp){e.inp.value=fmtDisp(mm);e.echo.textContent='';e.inp.removeAttribute('aria-invalid');}
|
|
14441
14494
|
e.inp.placeholder=reachExample().split(' · ')[0];
|
|
14442
14495
|
e.def.hidden=!isDefault;e.reset.hidden=isDefault;
|
|
14443
|
-
e.reset.dataset.tip='Back to the default, '+underFloorText(
|
|
14496
|
+
e.reset.dataset.tip='Back to the default, '+underFloorText(reachDefault())+'.';}
|
|
14444
14497
|
/** Enter or blur: apply what is typed. A bad value keeps the old one and says why; the same value writes nothing. */
|
|
14445
14498
|
function commitReach(){
|
|
14446
14499
|
const e=reachEls();if(!e.inp||e.inp.disabled)return false;
|
|
@@ -14457,7 +14510,7 @@ function resetReach(){
|
|
|
14457
14510
|
reachTouched=true;
|
|
14458
14511
|
if(!edit(()=>V2_SESSION.setColumnBelowReach(null)))return false;
|
|
14459
14512
|
reachSay('');
|
|
14460
|
-
toast('Columns ending below a floor are back to the default of '+underFloorText(
|
|
14513
|
+
toast('Columns ending below a floor are back to the default of '+underFloorText(reachDefault())+'. Ctrl+Z undoes it.');
|
|
14461
14514
|
syncReachRow();const e=reachEls();if(e.inp)e.inp.focus(); // the Reset button hides itself, so focus goes to the field
|
|
14462
14515
|
return true;}
|
|
14463
14516
|
{const e=reachEls();
|
|
@@ -15964,7 +16017,7 @@ const view3dApi={
|
|
|
15964
16017
|
const m=byId(basePickColId); if(!m||m.role!=='column'||!m.col){toast('No column to trim');return;}
|
|
15965
16018
|
const tos=(m.col.tosMm!=null?m.col.tosMm:defaultTosMm); // WORLD MM, like the pick itself — there is no conversion on this axis any more
|
|
15966
16019
|
if(tos==null){toast('Set the column top (TOS) first');return;}
|
|
15967
|
-
const want=p.z, cap=tos-
|
|
16020
|
+
const want=p.z, cap=tos-minColStubMm();
|
|
15968
16021
|
const bosMm=Math.min(want, cap); // clamp so the column keeps a min stub (bos<tos)
|
|
15969
16022
|
const clamped=want>cap+0.5; // the pick was above the min-stub cap → we seated at the cap, not the picked level
|
|
15970
16023
|
const cur=(m.col.bosMm!=null?m.col.bosMm:0);
|
|
@@ -27701,6 +27754,10 @@ function _wtBill(profile){const kgm=_wtKgM(profile);
|
|
|
27701
27754
|
const UNIT_WORDS={'ft-in':{weight:'lb',tonnage:'tons'},
|
|
27702
27755
|
mm:{weight:'kg',tonnage:'t'}};
|
|
27703
27756
|
const _uw=()=>UNIT_WORDS[displayUnits()]||UNIT_WORDS['ft-in'];
|
|
27757
|
+
// The word after a UNIT weight, per system: `bom-units.ts` `labels.unitWeight`, kept beside `UNIT_WORDS` so
|
|
27758
|
+
// the Inspect panel and the bill spell kg/m and lb/ft the same way (#2674).
|
|
27759
|
+
const UNIT_WEIGHT_LABELS={'ft-in':'lb/ft',mm:'kg/m'};
|
|
27760
|
+
const _uwPer=()=>UNIT_WEIGHT_LABELS[displayUnits()]||UNIT_WEIGHT_LABELS['ft-in'];
|
|
27704
27761
|
/*
|
|
27705
27762
|
* A MEMBER'S DISPLAYED MASS, from the member itself and the unit weight `_wtBill` returned.
|
|
27706
27763
|
*
|
|
@@ -27721,6 +27778,10 @@ const _propMass=(m,unitWeight)=>
|
|
|
27721
27778
|
// printed as 26.000000000000004 — and `bom-format` rounds its own column for exactly this reason.
|
|
27722
27779
|
// The ARITHMETIC keeps full precision: only what is rendered is rounded.
|
|
27723
27780
|
const _plf2=(plf)=>plf==null?null:Math.round(plf*100)/100;
|
|
27781
|
+
// The Inspect panel's member weight, in the project's own units. #2674: this was inlined as feet x the unit
|
|
27782
|
+
// weight, labelled lb and lb/ft, so a metric member printed feet x kg/m as pounds (81 lb beside a bill's
|
|
27783
|
+
// 25 kg). Mass comes from `_propMass` and both words from the server's tables, like every other surface.
|
|
27784
|
+
const _memberWeightHint=(m,wpf)=>'Weight <b>'+Math.round(_propMass(m,wpf)).toLocaleString('en-US')+' '+_uw().weight+'</b> · '+_plf2(wpf)+' '+_uwPer();
|
|
27724
27785
|
// The same weight for the EXPORTED FILE, where two decimals would be a lie rather than a rounding.
|
|
27725
27786
|
// `_plf2` is right for a label — the catalogue tabulates unit weight to 2 dp — but `contract_edited`
|
|
27726
27787
|
// is machine-readable and round-trips, and not every weight is a catalogue weight: a document's own
|
|
@@ -27783,7 +27844,7 @@ function rememberConfControl(control,kind){confRestoreControl={kind,value:contro
|
|
|
27783
27844
|
function restoreConfControl(){if(!confRestoreControl)return false;const pending=confRestoreControl;confRestoreControl=null;
|
|
27784
27845
|
const selectors={readBand:'#confFilter [data-read-band]',readCat:'#confFilter [data-read-cat]'};
|
|
27785
27846
|
const selector=selectors[pending.kind];if(!selector)return false;const next=[...document.querySelectorAll(selector)].find(control=>control.dataset[pending.kind]===pending.value);if(!next)return false;next.focus();return true;}
|
|
27786
|
-
function renderConf(){const projection=readConfidenceProjection(),target=effectiveTarget(),summary=ReadConfidence.summarizeReadConfidence(projection,target);
|
|
27847
|
+
function renderConf(){const projection=readConfidenceProjection(),target=effectiveTarget(),summary=ReadConfidence.summarizeReadConfidence(projection,target);renderConfQuick();
|
|
27787
27848
|
if(!['all','beams','columns'].includes(confCat))confCat='all';if(target==null)confReadBand='all';readTargetControl();
|
|
27788
27849
|
const metric=(label,value,note)=>'<div class=ccard><div class=cc-label>'+label+'</div><div class=cc-score>'+value+'</div><div class=cc-counts><span>'+note+'</span></div></div>';
|
|
27789
27850
|
document.getElementById('confCats').innerHTML=metric('Recorded fields',summary.totalFields,'immutable drawing values')+metric('Below target',target==null?'—':summary.belowFields,target==null?'No target set':('strictly below '+target+'%'))+metric('Members affected',target==null?'—':summary.affectedMembers,'review destinations')+metric('Not recorded',summary.notRecordedMembers,'members without field confidence');
|
|
@@ -255,6 +255,13 @@ export function projectMember(member, plan, session = null) {
|
|
|
255
255
|
`patchMembers` path re-projects a row without asking presence at all, so a flag that came from the caller
|
|
256
256
|
would be lost on the first drag. Set only when true, so every other row keeps exactly the shape it had. */
|
|
257
257
|
if (member.role === 'column') {
|
|
258
|
+
// NO `reach` ARGUMENT ON PURPOSE, and it must stay that way or be fixed properly. `below` and
|
|
259
|
+
// `far-below` both set the same flag here, so which side of the reach a column falls on cannot
|
|
260
|
+
// change this outcome — the default is not load-bearing. The moment anyone distinguishes the two,
|
|
261
|
+
// this call starts silently using the imperial 304.8 and ignoring BOTH the project's stored reach
|
|
262
|
+
// and its metric default, which is the split-brain `memberPresence` avoids by passing
|
|
263
|
+
// `columnBelowReachOf(model)`. Threading the model in here needs a signature change this change
|
|
264
|
+
// did not warrant: #2670.
|
|
258
265
|
const relation = columnCutRelation(member.from?.z, member.to?.z, plan.elevation_mm);
|
|
259
266
|
if (relation === 'below' || relation === 'far-below') projected.belowCut = true;
|
|
260
267
|
}
|