@floless/app 0.85.0 → 0.86.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.
- package/dist/floless-server.cjs +2001 -711
- package/dist/schemas/steel.takeoff.v1.schema.json +34 -4
- package/dist/skills/floless-app-knowledge/SKILL.md +206 -0
- package/dist/skills/floless-app-knowledge/references/schema.md +132 -0
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +380 -28
- package/dist/skills/floless-app-workflows/SKILL.md +33 -7
- package/dist/skills/floless-app-workflows/references/dev-server-and-run-trace.md +2 -1
- package/dist/skills/floless-app-workflows/references/exec-contract.md +1 -1
- package/dist/skills/floless-app-workflows/references/workspace-data.md +111 -0
- package/dist/skills/reading-structural-drawings/SKILL.md +102 -1
- package/dist/skills/steel-drawing-abbreviations/SKILL.md +33 -1
- package/dist/templates/floless-workspace-read.flo +161 -0
- package/dist/web/app.css +312 -14
- package/dist/web/aware.js +327 -43
- package/dist/web/grid-core.js +40 -6
- package/dist/web/index.html +49 -11
- package/dist/web/steel-3d-view.js +117 -20
- package/dist/web/steel-editor.html +1426 -296
- package/dist/web/steel-filter.html +3 -1
- package/dist/web/vector-3d.html +3 -3
- package/dist/web/vector-editor.html +12 -5
- package/dist/web/workspaces.js +1083 -100
- package/package.json +1 -1
|
@@ -131,6 +131,7 @@ const APP_ID = new URLSearchParams(location.search).get('app') || '';
|
|
|
131
131
|
// Workspaces: project-keyed contract (see steel-editor.html). Empty = legacy app-keyed URLs.
|
|
132
132
|
const PROJECT = new URLSearchParams(location.search).get('project') || '';
|
|
133
133
|
const PROJECT_QS = PROJECT ? ('?project=' + encodeURIComponent(PROJECT)) : '';
|
|
134
|
+
const CONTRACT_QS = PROJECT ? (PROJECT_QS + '&quietMissing=1') : PROJECT_QS;
|
|
134
135
|
const SVGNS = 'http://www.w3.org/2000/svg';
|
|
135
136
|
const PALETTE = ['#3b82f6','#22d3ee','#a78bfa','#f59e0b','#34d399','#f472b6','#60a5fa','#facc15'];
|
|
136
137
|
|
|
@@ -163,8 +164,9 @@ function markDirty(){ dirty = true; saveBtn.disabled = false; setSaved('dirty');
|
|
|
163
164
|
async function boot(){
|
|
164
165
|
if(!APP_ID){ showEmpty('No app specified.'); return; }
|
|
165
166
|
let res;
|
|
166
|
-
try { res = await fetch('/api/contract/' + encodeURIComponent(APP_ID) +
|
|
167
|
+
try { res = await fetch('/api/contract/' + encodeURIComponent(APP_ID) + CONTRACT_QS); }
|
|
167
168
|
catch(e){ showEmpty('Could not reach the server.'); return; }
|
|
169
|
+
if(res.status === 204){ showEmpty(); return; }
|
|
168
170
|
if(!res.ok){ showEmpty(); return; }
|
|
169
171
|
C = await res.json();
|
|
170
172
|
F = C && C.filter;
|
package/dist/web/vector-3d.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>
|
|
6
|
+
<title>Trace — 3D view</title>
|
|
7
7
|
<style>
|
|
8
8
|
/* Locked baseline: shadcn dark slate-blue (same tokens + scrollbar theming as the sibling editors). */
|
|
9
9
|
:root{--bg:#0f172a;--panel:#1e293b;--line:#334155;--text:#e2e8f0;--mut:#94a3b8;--brand:#3b82f6}
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
</head>
|
|
64
64
|
<body>
|
|
65
65
|
<header>
|
|
66
|
-
<b>
|
|
66
|
+
<b>Trace — 3D</b>
|
|
67
67
|
<span class="stat" id="title">—</span>
|
|
68
68
|
<span class="spacer"></span>
|
|
69
69
|
<span class="stat"><b id="nBoxes">0</b> members · <b id="nExtr">0</b> bodies</span>
|
|
@@ -222,7 +222,7 @@ function boot(v3d) {
|
|
|
222
222
|
skipped = Array.isArray(out.skipped) ? out.skipped : [];
|
|
223
223
|
const name = (scene.meta && scene.meta.name) || app;
|
|
224
224
|
$('title').textContent = name;
|
|
225
|
-
document.title = '
|
|
225
|
+
document.title = 'Trace — 3D · ' + name;
|
|
226
226
|
const boxes = scene.elements.filter((e) => e.kind === 'box').length;
|
|
227
227
|
const extr = scene.elements.filter((e) => e.kind === 'extrusion').length;
|
|
228
228
|
$('nBoxes').textContent = boxes; $('nExtr').textContent = extr;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>
|
|
6
|
+
<title>Traced drawing — editor</title>
|
|
7
7
|
<style>
|
|
8
8
|
/* Locked baseline: shadcn dark slate-blue (identical tokens + scrollbar theming as steel-editor.html). */
|
|
9
9
|
:root{--bg:#0f172a;--panel:#1e293b;--line:#334155;--text:#e2e8f0;--mut:#94a3b8;--brand:#3b82f6;--paper:#f8fafc}
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
</head>
|
|
76
76
|
<body>
|
|
77
77
|
<header>
|
|
78
|
-
<b>
|
|
78
|
+
<b>Trace</b>
|
|
79
79
|
<span class="stat" id="title">—</span>
|
|
80
80
|
<span class="spacer"></span>
|
|
81
81
|
<span class="stat"><b id="nEl">0</b> elements · <b id="nTx">0</b> text</span>
|
|
@@ -444,14 +444,14 @@
|
|
|
444
444
|
function afterEdit() { refreshStats(); render(); buildWeakList(); scheduleSave(); }
|
|
445
445
|
|
|
446
446
|
function load(contract) {
|
|
447
|
-
if (!contract || !Array.isArray(contract.sheets) || !contract.sheets.length) { showState('This
|
|
447
|
+
if (!contract || !Array.isArray(contract.sheets) || !contract.sheets.length) { showState('This project has no traced drawing yet. Drop a PDF and re-bake to read one.'); return; }
|
|
448
448
|
C = contract;
|
|
449
449
|
sheet = contract.sheets[contract.active || 0] || contract.sheets[0];
|
|
450
450
|
if (!sheet || !Array.isArray(sheet.elements)) { showState('The drawing has no elements.'); return; }
|
|
451
451
|
initialWeak = sheet.elements.filter(isWeak).length;
|
|
452
452
|
const name = (contract.source && contract.source.name) ? contract.source.name : (sheet.label || 'drawing');
|
|
453
453
|
$('title').textContent = name;
|
|
454
|
-
document.title = '
|
|
454
|
+
document.title = 'Trace — ' + name;
|
|
455
455
|
if (editable) setSaved('ok');
|
|
456
456
|
refreshStats();
|
|
457
457
|
buildLayers();
|
|
@@ -462,7 +462,14 @@
|
|
|
462
462
|
const ctrl = new AbortController();
|
|
463
463
|
const timer = setTimeout(() => ctrl.abort(), 15000);
|
|
464
464
|
fetch(src, { headers: { accept: 'application/json' }, signal: ctrl.signal })
|
|
465
|
-
.then((r) => {
|
|
465
|
+
.then((r) => {
|
|
466
|
+
if (!r.ok) {
|
|
467
|
+
// 404 with no contract yet is expected state for a fresh Workspaces project — show the friendly empty-state message
|
|
468
|
+
if (r.status === 404) return null;
|
|
469
|
+
throw new Error('HTTP ' + r.status);
|
|
470
|
+
}
|
|
471
|
+
return r.json();
|
|
472
|
+
})
|
|
466
473
|
.then(load)
|
|
467
474
|
.catch((e) => showState(e.name === 'AbortError' ? 'Loading timed out — is the server reachable?' : ('Could not load the drawing (' + e.message + ').')))
|
|
468
475
|
.finally(() => clearTimeout(timer));
|