@floless/app 0.149.1 → 0.151.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 +104263 -88361
- package/dist/schemas/drawing-check.profile.v1.schema.json +45 -2
- package/dist/schemas/steel.model.v2.schema.json +9 -0
- package/dist/skills/floless-app-approval/SKILL.md +79 -4
- package/dist/skills/floless-app-onboarding/SKILL.md +200 -87
- package/dist/skills/floless-app-onboarding/references/aware-runtime.md +27 -18
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +207 -0
- package/dist/skills/floless-app-routines/SKILL.md +4 -1
- package/dist/skills/floless-app-routines/references/routines-api.md +14 -2
- package/dist/skills/floless-app-steel-model/SKILL.md +4 -2
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +14 -9
- package/dist/skills/floless-app-workflows/SKILL.md +2 -2
- package/dist/templates/tekla-parser.flo +13 -3
- package/dist/web/agents.js +983 -0
- package/dist/web/app.css +556 -43
- package/dist/web/app.js +34 -112
- package/dist/web/aware.js +1774 -169
- package/dist/web/chat.css +62 -1
- package/dist/web/chat.js +1666 -59
- package/dist/web/commands-drawing-check.js +15 -0
- package/dist/web/commands-revit.js +5 -0
- package/dist/web/commands-shell.js +955 -53
- package/dist/web/commands-tekla-parser.js +8 -1
- package/dist/web/connections.js +57 -14
- package/dist/web/drawing-check-editor.html +10 -2
- package/dist/web/drawing-check-editor.js +569 -40
- package/dist/web/drawing-check-overlay.js +45 -2
- package/dist/web/guide.js +675 -0
- package/dist/web/index.html +162 -31
- package/dist/web/instructor.js +91 -8
- package/dist/web/leave-guard.js +1 -0
- package/dist/web/left-pane.js +20 -1
- package/dist/web/local-discovery.js +12 -2
- package/dist/web/model-editor.css +32 -32
- package/dist/web/model-panel-bridge.js +11 -3
- package/dist/web/model-viewport-lighting.js +4 -2
- package/dist/web/model-viewport-revit-adapter.js +3 -0
- package/dist/web/model-viewport-toolbar.js +6 -3
- package/dist/web/model-viewport.js +11 -1
- package/dist/web/revit-editor.css +14 -14
- package/dist/web/revit-editor.js +64 -12
- package/dist/web/steel-3d-core.js +133 -0
- package/dist/web/steel-3d-view.js +10 -0
- package/dist/web/steel-editor.html +171 -39
- package/dist/web/steel-model-v2-client-validation.js +11 -0
- package/dist/web/steel-model-v2-commands.js +80 -5
- package/dist/web/tool-updates.js +533 -0
- package/dist/web/workspaces.js +896 -123
- package/package.json +2 -2
- package/dist/skills/floless-app-onboarding/references/floless-app-tour.md +0 -156
|
@@ -2,10 +2,50 @@
|
|
|
2
2
|
// server-built run report, so the two can never draw a different markup for the same result.
|
|
3
3
|
/** @type {Readonly<Record<'pass' | 'fail' | 'dont-know', string>>} */
|
|
4
4
|
export const DEFAULT_COLOURS = Object.freeze({ pass: 'hsl(142 71% 45%)', fail: 'hsl(0 72% 56%)', 'dont-know': 'hsl(38 92% 50%)' });
|
|
5
|
-
|
|
5
|
+
// `accepted`: a finding a person accepted as drawn — wrong or couldn't tell alike — is drawn in the FAIL colour
|
|
6
|
+
// with a dash-dot line (spec §5), so it never reads as an open fail or a pass, in colour or in black and white.
|
|
7
|
+
const STYLE = { pass: { w: 1.2, dash: '' }, fail: { w: 2.4, dash: '' }, 'dont-know': { w: 1.6, dash: '3 2' }, accepted: { w: 2.4, dash: '6 2 1 2' } };
|
|
6
8
|
const esc = (s) => String(s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
|
7
9
|
const num = (v) => (Number.isFinite(v) ? Math.round(v * 10) / 10 : 0);
|
|
8
10
|
|
|
11
|
+
const boxKey = (e) => `${e.drawing || ''}|${e.page}|${(e.bbox || []).map(num).join(',')}`;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The sheet with every evidence box of an ACCEPTED finding flagged `accepted: true`, so it is drawn in the
|
|
15
|
+
* accepted style (fail colour, dash-dot). A box several findings share is flagged only when every
|
|
16
|
+
* one of them is accepted: an accepted decision never makes an open fail look settled. The result itself
|
|
17
|
+
* is never changed; this is a display-time copy.
|
|
18
|
+
* @param {*} sheet
|
|
19
|
+
* @param {Iterable<string>} acceptedIds finding ids whose latest decision is "accept as drawn"
|
|
20
|
+
*/
|
|
21
|
+
export function withAccepted(sheet, acceptedIds) {
|
|
22
|
+
const accepted = new Set(acceptedIds);
|
|
23
|
+
if (!accepted.size) return sheet;
|
|
24
|
+
// Ownership is decided across EVERY item of the sheet: two checklist items can draw the same evidence box, and
|
|
25
|
+
// accepting one must not make the box look settled while another item's finding there is still OPEN (a fail
|
|
26
|
+
// or couldn't-tell nobody accepted). A passing finding on the same box is settled already, so it does not
|
|
27
|
+
// block; and only the accepting item's own boxes take the accepted style (the passing item keeps its own).
|
|
28
|
+
const open = new Set(); // boxes an unaccepted fail / couldn't-tell finding draws
|
|
29
|
+
for (const it of sheet.items || []) {
|
|
30
|
+
for (const f of it.findings || []) {
|
|
31
|
+
if (f.status === 'pass' || accepted.has(f.id)) continue;
|
|
32
|
+
for (const e of f.evidence || []) open.add(boxKey(e));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
let any = false;
|
|
36
|
+
const items = (sheet.items || []).map((it) => {
|
|
37
|
+
const mine = new Set();
|
|
38
|
+
for (const f of it.findings || []) {
|
|
39
|
+
if (!accepted.has(f.id)) continue;
|
|
40
|
+
for (const e of f.evidence || []) if (!open.has(boxKey(e))) mine.add(boxKey(e));
|
|
41
|
+
}
|
|
42
|
+
if (!mine.size) return it;
|
|
43
|
+
any = true;
|
|
44
|
+
return { ...it, evidence: (it.evidence || []).map((e) => (mine.has(boxKey(e)) ? { ...e, accepted: true } : e)) };
|
|
45
|
+
});
|
|
46
|
+
return any ? { ...sheet, items } : sheet;
|
|
47
|
+
}
|
|
48
|
+
|
|
9
49
|
export function hatchDefs() {
|
|
10
50
|
return '<defs><pattern id="dc-hatch" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">'
|
|
11
51
|
+ '<line x1="0" y1="0" x2="0" y2="6" stroke="hsl(217 16% 45%)" stroke-width="0.8" opacity="0.5"/></pattern></defs>';
|
|
@@ -23,9 +63,12 @@ export function overlaySvg(sheet, colours = DEFAULT_COLOURS, opts = { selectedN:
|
|
|
23
63
|
out += `<rect class="dc-uncovered" x="${num(u[0])}" y="${num(u[1])}" width="${num(u[2] - u[0])}" height="${num(u[3] - u[1])}" fill="url(#dc-hatch)" stroke="hsl(217 16% 45%)" stroke-width="0.6" stroke-dasharray="2 2"/>`;
|
|
24
64
|
}
|
|
25
65
|
for (const it of sheet.items) {
|
|
26
|
-
const colour = colours[it.status] || DEFAULT_COLOURS[it.status]; const st = STYLE[it.status];
|
|
27
66
|
const sel = opts.selectedN === it.n ? ' data-selected="true"' : '';
|
|
28
67
|
for (const e of it.evidence) {
|
|
68
|
+
if (e.drawing && sheet.drawing && e.drawing !== sheet.drawing) continue; // the other half of a cross-sheet finding
|
|
69
|
+
const status = e.status || it.status;
|
|
70
|
+
const shown = e.accepted ? 'fail' : status;
|
|
71
|
+
const colour = colours[shown] || DEFAULT_COLOURS[shown]; const st = e.accepted ? STYLE.accepted : STYLE[status];
|
|
29
72
|
const [x0, y0, x1, y1] = e.bbox.map(num); const pad = 2;
|
|
30
73
|
out += `<rect data-n="${it.n}"${sel} x="${x0 - pad}" y="${y0 - pad}" width="${x1 - x0 + 2 * pad}" height="${y1 - y0 + 2 * pad}" rx="2" fill="none" stroke="${esc(colour)}" stroke-width="${st.w}"${st.dash ? ` stroke-dasharray="${st.dash}"` : ''} vector-effect="non-scaling-stroke"/>`;
|
|
31
74
|
out += `<g class="dc-tag" data-n="${it.n}"><circle cx="${x1 + pad}" cy="${y0 - pad}" r="7" fill="white" stroke="${esc(colour)}" stroke-width="1.4"/>`
|