@floless/app 0.160.0 → 0.162.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.
Files changed (40) hide show
  1. package/aware-version-pin.mjs +43 -0
  2. package/dist/floless-server.cjs +126990 -120010
  3. package/dist/schemas/steel.model.v2.schema.json +23 -0
  4. package/dist/skills/floless-app-knowledge/SKILL.md +6 -5
  5. package/dist/skills/floless-app-rfi/SKILL.md +18 -5
  6. package/dist/skills/floless-app-steel-model/SKILL.md +28 -6
  7. package/dist/skills/floless-app-steel-takeoff/SKILL.md +579 -282
  8. package/dist/templates/floless-workspace-read.flo +9 -1
  9. package/dist/templates/steel-model.flo +6 -2
  10. package/dist/templates/viewer-3d-demo.flo +8 -2
  11. package/dist/web/app.css +198 -17
  12. package/dist/web/app.js +23 -0
  13. package/dist/web/aware.js +303 -54
  14. package/dist/web/chat-question-card.js +10 -3
  15. package/dist/web/chat.css +79 -5
  16. package/dist/web/chat.js +1513 -243
  17. package/dist/web/commands-drawing-check.js +1 -0
  18. package/dist/web/commands-filter.js +11 -0
  19. package/dist/web/commands-shell.js +467 -29
  20. package/dist/web/commands-steel.js +40 -38
  21. package/dist/web/drawing-check-editor.js +76 -3
  22. package/dist/web/index.html +46 -2
  23. package/dist/web/instructor.js +5 -3
  24. package/dist/web/leave-guard.js +12 -2
  25. package/dist/web/pages.js +43 -12
  26. package/dist/web/project-history.js +349 -0
  27. package/dist/web/project-reconciliation.js +1 -0
  28. package/dist/web/project-rfis.js +260 -21
  29. package/dist/web/startup-admission.js +53 -7
  30. package/dist/web/steel-3d-core.js +115 -6
  31. package/dist/web/steel-3d-view.js +61 -5
  32. package/dist/web/steel-editor.html +439 -118
  33. package/dist/web/steel-filter.html +139 -0
  34. package/dist/web/steel-model-v2-commands.js +3 -3
  35. package/dist/web/steel-model-v2-projection.js +132 -4
  36. package/dist/web/steel-plan-transform.js +78 -0
  37. package/dist/web/tool-updates.js +59 -3
  38. package/dist/web/workspaces.js +1553 -196
  39. package/launch.mjs +36 -5
  40. package/package.json +6 -4
@@ -274,8 +274,8 @@
274
274
  const line = el('div', 'ai-chat-ask-other-line');
275
275
  const input = control('input', key('other-input'), question.header || 'your answer', 'ai-chat-ask-other-input');
276
276
  input.type = 'text'; input.autocomplete = 'off'; input.maxLength = 1000; input.spellcheck = true;
277
- input.placeholder = 'Type your answer';
278
- input.setAttribute('aria-label', `Your own answer to: ${question.question}`);
277
+ input.placeholder = question.otherPlaceholder || 'Type your answer';
278
+ input.setAttribute('aria-label', question.otherInputLabel || `Your own answer to: ${question.question}`);
279
279
  input.value = row.other;
280
280
  if (busy) input.readOnly = true;
281
281
  block(input, busy);
@@ -297,7 +297,11 @@
297
297
  draft.cursor = 0;
298
298
  opts.repaint();
299
299
  });
300
- line.append(input);
300
+ if (question.otherInputLabel) {
301
+ const label = el('label', 'ai-chat-ask-other-field');
302
+ label.append(el('span', 'ai-chat-ask-desc', question.otherInputLabel), input);
303
+ line.append(label);
304
+ } else line.append(input);
301
305
  if (files && !opts.source) {
302
306
  const clip = control('button', key('attach'), question.header || 'your answer', 'ai-chat-answer-clip ai-chat-ask-clip');
303
307
  clip.setAttribute('aria-label', 'Attach a screenshot or PDF to your answer');
@@ -419,6 +423,9 @@
419
423
  if (question.layout === 'grid') list.classList.add('ai-chat-ask-grid');
420
424
  card.append(head, text);
421
425
  for (const context of question.context || []) card.append(el('p', 'ai-chat-filter-note ai-chat-ask-context', context));
426
+ // #2777: a picture of what the question is about (the height card's place on the drawings), above the answers.
427
+ // It is told which answer is selected, and the card repaints on every choice, so the picture follows the choice.
428
+ if (typeof question.figure === 'function') { const figure = question.figure(row.choices[0]); if (figure) card.append(figure); }
422
429
  card.append(list);
423
430
  if (selected()?.statement) { const statement = el('p', 'ai-chat-setup-statement ai-chat-ask-statement', selected().statement); statement.setAttribute('role', 'status'); card.append(statement); }
424
431
  if (selected()?.requiresNote) {
package/dist/web/chat.css CHANGED
@@ -887,8 +887,9 @@
887
887
  .ai-chat-height-card[data-state="closed"] { border-left-color: var(--border-strong); }
888
888
  [data-theme="light"] .ai-chat-height-card[data-state="answered"] { --text-muted: #475569; }
889
889
  .ai-chat-height-count { margin: 6px 0 0; color: var(--text-dim); font: 600 9px/1.3 var(--mono); letter-spacing: .04em; }
890
+ /* overflow-anchor: the list's place is kept as its scroll offset (#2770); anchoring would move it while AI Chat opens narrow. */
890
891
  .ai-chat-height-rows { display: flex; flex-direction: column; gap: 6px; max-height: min(320px, 50vh); margin: 6px 0 0; padding: 0 2px 0 0; overflow-y: auto; list-style: none;
891
- scrollbar-width: thin; scrollbar-color: var(--text-dim) var(--surface-2); }
892
+ overflow-anchor: none; scrollbar-width: thin; scrollbar-color: var(--text-dim) var(--surface-2); }
892
893
  .ai-chat-height-rows::-webkit-scrollbar { width: 8px; }
893
894
  .ai-chat-height-rows::-webkit-scrollbar-thumb { border-radius: 4px; background: var(--text-dim); }
894
895
  .ai-chat-height-rows::-webkit-scrollbar-track { background: var(--surface-2); }
@@ -956,6 +957,13 @@
956
957
  .ai-chat-answer-picture button.ai-chat-answer-open:hover { background: transparent; color: var(--accent); }
957
958
  .ai-chat-answer-missing { color: var(--text-dim); font: 9px/1.25 var(--ui); }
958
959
  .ai-chat-answered-source { padding-left: calc(1em + 6px); }
960
+ .ai-chat-answered-source .ai-chat-answer-lead { white-space: pre-wrap; }
961
+ .ai-chat-inherited-clarification { white-space: pre-wrap; overflow-wrap: anywhere; }
962
+ .ai-chat-answer-clarification .ai-chat-answer-note { min-height: 80px; height: auto; resize: vertical; max-height: 40vh; font: 11px/1.5 var(--ui); white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: thin; scrollbar-color: var(--text-dim) var(--surface-2); }
963
+ .ai-chat-answer-clarification .ai-chat-answer-note::-webkit-scrollbar { width: 8px; height: 8px; }
964
+ .ai-chat-answer-clarification .ai-chat-answer-note::-webkit-scrollbar-track { background: var(--surface-2); }
965
+ .ai-chat-answer-clarification .ai-chat-answer-note::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 4px; }
966
+ .ai-chat-ask-other-field { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
959
967
  .ai-chat-answer-source button.ai-chat-answer-picture-only { align-self: flex-start; }
960
968
 
961
969
  /* #1906 — the read setup card: three stacked sections in ONE scroller, header and footer outside it. */
@@ -1043,7 +1051,50 @@
1043
1051
  /* The page is laid on paper in a frame shaped like the crop; the picture inside is positioned so only the crop shows. */
1044
1052
  .ai-chat-evidence-frame { position: relative; overflow: hidden; width: 100%; margin: 8px auto 0; border: 1px solid var(--border-strong); border-radius: 4px; background: #fff; }
1045
1053
  .ai-chat-evidence-frame:empty { min-height: 160px; }
1054
+ .ai-chat-evidence-viewer .ai-chat-evidence-frame[aria-busy="true"] { background: var(--surface-2); cursor: progress; }
1055
+ /* #2777: the drawing can be zoomed and moved, so it says so to the pointer and keeps a visible focus ring. */
1056
+ .ai-chat-evidence-viewer .ai-chat-evidence-frame { cursor: grab; touch-action: none; user-select: none; }
1057
+ .ai-chat-evidence-viewer .ai-chat-evidence-frame.dragging { cursor: grabbing; }
1058
+ .ai-chat-evidence-viewer .ai-chat-evidence-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
1059
+ .ai-chat-evidence-viewer .ai-chat-evidence-frame img { pointer-events: none; }
1060
+ .ai-chat-evidence-zoom { display: flex; gap: 0; }
1061
+ .ai-chat-evidence-viewer .ai-chat-evidence-zoom button { min-width: 30px; padding: 6px 9px; border-radius: 0; font-weight: 600; }
1062
+ .ai-chat-evidence-viewer .ai-chat-evidence-zoom button:first-child { border-radius: 5px 0 0 5px; }
1063
+ .ai-chat-evidence-viewer .ai-chat-evidence-zoom button:last-child { border-radius: 0 5px 5px 0; border-left-width: 0; }
1064
+ .ai-chat-evidence-viewer .ai-chat-evidence-zoom button:disabled { color: var(--text-dim); cursor: default; }
1046
1065
  .ai-chat-evidence-viewer .ai-chat-evidence-frame img { position: absolute; max-width: none; height: auto; margin: 0; border: 0; border-radius: 0; }
1066
+ /* #2777: where on the drawings a height question means. The picture is the button: the same paper-on-frame as the viewer,
1067
+ held short (110px) so the answers stay in sight, with a plain caption saying what opens and who drew the outline. */
1068
+ .ai-chat-drawing-step button.ai-chat-height-place { appearance: none; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; margin: 6px 0 2px; padding: 6px;
1069
+ border: 1px solid var(--border); border-radius: 5px; background: transparent; color: var(--text); font: 10.5px/1.4 var(--ui); text-align: left; cursor: pointer; }
1070
+ .ai-chat-drawing-step button.ai-chat-height-place:hover { background: var(--surface-2); border-color: var(--border-strong); }
1071
+ .ai-chat-drawing-step button.ai-chat-height-place:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
1072
+ .ai-chat-height-place-frame { position: relative; display: block; overflow: hidden; max-height: 110px; border: 1px solid var(--border-strong); border-radius: 4px; background: #fff; }
1073
+ .ai-chat-height-place-frame[data-state="loading"] { background: var(--surface-2); }
1074
+ .ai-chat-height-place-frame[data-state="error"] { display: flex; align-items: center; justify-content: center; min-height: 48px; background: var(--surface-2); }
1075
+ .ai-chat-height-place-frame img { position: absolute; max-width: none; height: auto; margin: 0; border: 0; border-radius: 0; }
1076
+ .ai-chat-height-place-missing { padding: 6px 8px; color: var(--text-dim); font: 10px/1.4 var(--ui); text-align: center; }
1077
+ .ai-chat-height-place-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; color: var(--text-muted); }
1078
+ .ai-chat-height-place-caption strong { color: var(--text); font-weight: 600; }
1079
+ .ai-chat-height-unplaced, .ai-chat-height-unproposed { color: var(--text-dim); }
1080
+ /* A row's sheet in the card's list: a small outlined mono tag at the row's end, no picture. */
1081
+ .ai-chat-height-card button.ai-chat-height-sheet, .ai-chat-drawing-step button.ai-chat-height-sheet, .ai-chat-place-strip button.ai-chat-height-sheet { appearance: none; flex: none; margin-left: auto; padding: 0 5px; min-height: 18px; border: 1px solid var(--border); border-radius: 3px;
1082
+ background: transparent; color: var(--accent); font: 600 9.5px/1.6 var(--mono); cursor: pointer; }
1083
+ .ai-chat-height-card button.ai-chat-height-sheet:hover, .ai-chat-drawing-step button.ai-chat-height-sheet:hover, .ai-chat-place-strip button.ai-chat-height-sheet:hover { background: var(--surface-2); border-color: var(--border-strong); }
1084
+ .ai-chat-height-card button.ai-chat-height-sheet:focus-visible, .ai-chat-drawing-step button.ai-chat-height-sheet:focus-visible, .ai-chat-place-strip button.ai-chat-height-sheet:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
1085
+ /* #2777: a level's other places, beside its picture: chips that wrap, never a scrolling row. */
1086
+ .ai-chat-setup-places { display: flex; flex-direction: column; gap: 4px; }
1087
+ .ai-chat-evidence-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px 0; }
1088
+ .ai-chat-evidence-bar .ai-chat-evidence-views { padding: 0; }
1089
+ /* A sheet with no marked area offers only "Whole sheet": one button, rounded on both sides. */
1090
+ .ai-chat-evidence-viewer .ai-chat-evidence-views button:only-child { border-radius: 5px; border-left-width: 1px; }
1091
+ .ai-chat-evidence-viewer button.ai-chat-evidence-filter { border-radius: 5px; color: var(--text); }
1092
+ .ai-chat-evidence-viewer button.ai-chat-evidence-filter[aria-busy="true"] { cursor: progress; color: var(--text-muted); }
1093
+ /* #2777 slice D: why the Drawing Filter could not show the place, beside the button that was pressed. */
1094
+ .ai-chat-evidence-filter-note { margin: 0; padding: 6px 8px; border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--border)); border-radius: 4px; background: var(--surface-2); color: var(--text); font: 11px/1.4 var(--ui); }
1095
+ .ai-chat-evidence-filter-note[hidden] { display: none; }
1096
+ .ai-chat-setup-place-chips { display: flex; flex-wrap: wrap; gap: 4px; }
1097
+ .ai-chat-setup-place-chips button.ai-chat-height-sheet { margin-left: 0; }
1047
1098
  .ai-chat-readiness-review { margin: 0; color: var(--text-muted); font: 10.5px/1.4 var(--ui); }
1048
1099
  .ai-chat-readiness-actions { display: flex; flex-wrap: wrap; gap: 5px; }
1049
1100
  .ai-chat-readiness-actions button.ai-chat-source-action { appearance: none; min-height: 22px; padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: 5px;
@@ -1094,6 +1145,14 @@
1094
1145
  .ai-chat-sources { display: flex; flex-direction: column; gap: 5px; padding: 6px 8px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border)); border-radius: 5px; background: color-mix(in srgb, var(--surface-2) 72%, transparent); }
1095
1146
  .ai-chat-sources-head { align-self: flex-start; color: var(--text-dim); font: 9px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
1096
1147
  .ai-chat-sources-list { display: flex; flex-wrap: wrap; gap: 5px; }
1148
+ /* #2777: a place the AI showed on the drawings: its label, then its sheet as the same mono tag the height card uses. */
1149
+ .ai-chat-place-strip button.ai-chat-place-chip { display: inline-flex; align-items: baseline; gap: 6px; width: auto; height: auto; min-height: 20px; max-width: 100%; padding: 2px 7px;
1150
+ border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text); font: 10.5px/1.3 var(--ui); cursor: pointer; text-align: left; }
1151
+ .ai-chat-place-strip button.ai-chat-place-chip:hover { background: var(--surface-2); border-color: var(--accent); }
1152
+ .ai-chat-place-strip button.ai-chat-place-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
1153
+ .ai-chat-place-strip .ai-chat-place-chip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1154
+ .ai-chat-place-strip .ai-chat-place-chip .ai-chat-readiness-place-sheet { flex: none; color: var(--accent); font: 600 9.5px/1.3 var(--mono); }
1155
+ .ai-chat-place-strip .ai-chat-height-unplaced { margin: 0; font: 10px/1.4 var(--ui); }
1097
1156
  .ai-chat-source { max-width: 100%; }
1098
1157
  .ai-chat-source.answer-jump { outline: 2px solid var(--accent); outline-offset: 2px; background: var(--accent-soft); }
1099
1158
  .ai-chat-source .ai-chat-source-n { flex: none; min-width: 14px; padding: 0 3px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface-3); color: var(--text); text-align: center; }
@@ -1116,8 +1175,10 @@
1116
1175
  .ai-chat-source-picker { position: fixed; z-index: 40; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border-strong);
1117
1176
  border-radius: 6px; background: var(--surface-2); color: var(--text); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
1118
1177
  .ai-chat-source-picker-head { margin: 0; color: var(--text); font: 600 11px/1.35 var(--ui); }
1119
- .ai-chat-source-picker-projects { display: flex; flex-wrap: wrap; gap: 4px; }
1120
- .ai-chat-source-picker-projects[hidden] { display: none; }
1178
+ .ai-chat-source-picker-projects, .ai-chat-source-picker-kinds { display: flex; flex-wrap: wrap; gap: 4px; }
1179
+ .ai-chat-source-picker-projects[hidden], .ai-chat-source-picker-kinds[hidden] { display: none; }
1180
+ /* #2692: what to choose from — one even row of three; the project row under it is its refinement. */
1181
+ .ai-chat-source-picker-kinds .ai-chat-source-picker-project { flex: 1 1 auto; }
1121
1182
  .ai-chat-source-picker-project { appearance: none; min-height: 22px; padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: 5px;
1122
1183
  background: var(--surface); color: var(--text-muted); font: 10px/1.3 var(--ui); cursor: pointer; }
1123
1184
  .ai-chat-source-picker-project[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
@@ -1217,6 +1278,17 @@
1217
1278
  .ai-chat-fold.is-open .ai-chat-fold-chevron { transform: rotate(90deg); }
1218
1279
  .ai-chat-fold-body { display: flex; flex-direction: column; gap: 5px; align-self: stretch; margin: 2px 0 2px 3px; padding-left: 10px; border-left: 1px solid var(--border); }
1219
1280
  .ai-chat-fold-body[hidden] { display: none; }
1281
+ /* Auto approval is a passive receipt. Its technical record is available without filling the feed. */
1282
+ .ai-chat-auto-review-receipt { align-self: stretch; }
1283
+ .ai-chat-auto-review-receipt .ai-chat-fold-toggle { width: 100%; white-space: nowrap; overflow-wrap: normal; overflow: hidden; }
1284
+ .ai-chat-auto-review-receipt .ai-chat-fold-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1285
+ .ai-chat-auto-review-record { box-sizing: border-box; width: 100%; max-height: 240px; min-width: 0; margin: 0; padding: 8px;
1286
+ background: var(--surface-2); color: var(--text-muted); border-radius: 4px; font: 11px/1.5 var(--mono);
1287
+ white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--text-dim) transparent; }
1288
+ .ai-chat-auto-review-record::-webkit-scrollbar { width: 8px; height: 8px; }
1289
+ .ai-chat-auto-review-record::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 8px; }
1290
+ .ai-chat-auto-review-record::-webkit-scrollbar-track { background: transparent; }
1291
+ .ai-chat-auto-review-record:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
1220
1292
  [data-theme="light"] .ai-chat-fold-toggle, [data-theme="light"] .ai-chat-fold-chevron { color: #475569; }
1221
1293
  [data-theme="light"] .ai-chat-fold-toggle:hover { color: var(--text); }
1222
1294
  @media (prefers-reduced-motion: reduce) { .ai-chat-fold-chevron { transition: none; } }
@@ -1227,12 +1299,14 @@
1227
1299
  box-sizing: border-box;
1228
1300
  height: 22px;
1229
1301
  min-height: 22px;
1230
- gap: 0;
1302
+ gap: 6px;
1231
1303
  max-width: 92%;
1232
1304
  margin: -2px 0 0;
1233
1305
  padding: 0;
1234
1306
  }
1235
- .ai-chat-live-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1307
+ .ai-chat-live-status { min-width: 0; color: var(--text-muted); font: 12px/1.4 var(--ui); }
1308
+ .ai-chat-live-status > canvas { flex: none; }
1309
+ .ai-chat-live-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1236
1310
  .ai-chat-live-dots { display: inline-flex; gap: 3px; }
1237
1311
  .ai-chat-live-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: ai-chat-dot 1.1s ease-in-out infinite; }
1238
1312
  .ai-chat-live-dots i:nth-child(2) { animation-delay: .16s; }