@floless/app 0.152.1 → 0.153.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.
@@ -1052,7 +1052,7 @@
1052
1052
  interaction: 'mode',
1053
1053
  risk: [],
1054
1054
  guidance: 'on-demand',
1055
- why: 'Diagnosis never edits. You choose the endpoints and intended support before one conditional, undoable batch extends them.',
1055
+ why: 'Diagnosis never edits. You choose the endpoints and intended support before one conditional, undoable batch extends them. In 3D the review turns on Ghost unselected so the member you are checking stands out, unless you have already isolated members; it turns it off again when you finish unless you changed what is visible yourself meanwhile (Ghost, Isolate, Hide, Show all or a saved view).',
1056
1056
  });
1057
1057
 
1058
1058
  def('steel.member-end-review-close', {
@@ -1086,9 +1086,84 @@
1086
1086
  why: 'Selection is only a pending review choice; the model changes when you apply the batch.',
1087
1087
  });
1088
1088
 
1089
+ def('steel.member-end-select-member', {
1090
+ label: 'Include both ends of a member',
1091
+ actsOn: 'Ticks or unticks both ends of this member for the pending centerline extension',
1092
+ group: 'In the Properties panel',
1093
+ persistence: 'none',
1094
+ interaction: 'instant',
1095
+ risk: [],
1096
+ guidance: 'on-demand',
1097
+ why: 'Shows a dash when only one end is ticked. Ticking never changes which members are selected in the model, and the model changes only when you apply the batch.',
1098
+ });
1099
+
1100
+ def('steel.member-end-focus', {
1101
+ label: 'Show a member in the review',
1102
+ actsOn: 'Selects this member in the model and marks its end on the drawing; Ctrl or Cmd adds or removes it, Shift selects every member down to it',
1103
+ group: 'In the Properties panel',
1104
+ persistence: 'none',
1105
+ interaction: 'instant',
1106
+ risk: [],
1107
+ guidance: 'on-demand',
1108
+ why: 'Picking a member only selects it. It never ticks an end and never edits the model.',
1109
+ });
1110
+
1111
+ def('steel.member-end-group', {
1112
+ label: 'Fold a member type',
1113
+ actsOn: 'Folds or unfolds the members of this type in the review list',
1114
+ group: 'In the Properties panel',
1115
+ persistence: 'working',
1116
+ interaction: 'instant',
1117
+ risk: [],
1118
+ guidance: 'on-demand',
1119
+ why: 'The type holding the member you are looking at stays open, and so does every type while you filter.',
1120
+ });
1121
+
1122
+ def('steel.member-end-filter', {
1123
+ label: 'Filter reviewed members',
1124
+ actsOn: 'Narrows the review list to members whose mark, type or reason matches what you type',
1125
+ group: 'In the Properties panel',
1126
+ persistence: 'none',
1127
+ interaction: 'instant',
1128
+ risk: [],
1129
+ guidance: 'on-demand',
1130
+ why: 'Ends you ticked stay ticked when the filter hides them, and the count says how many are hidden. Esc clears the filter.',
1131
+ });
1132
+
1133
+ def('steel.member-end-filter-clear', {
1134
+ label: 'Clear the member filter',
1135
+ actsOn: 'Empties the review list filter so every member shows again',
1136
+ group: 'In the Properties panel',
1137
+ persistence: 'none',
1138
+ interaction: 'instant',
1139
+ risk: [],
1140
+ guidance: 'on-demand',
1141
+ });
1142
+
1143
+ def('steel.member-end-filter-reset', {
1144
+ label: 'Clear the member filter',
1145
+ actsOn: 'Empties the review list filter when nothing matches it',
1146
+ group: 'In the Properties panel',
1147
+ persistence: 'none',
1148
+ interaction: 'instant',
1149
+ risk: [],
1150
+ guidance: 'on-demand',
1151
+ });
1152
+
1153
+ def('steel.member-end-rescan', {
1154
+ label: 'Check member ends for this view',
1155
+ actsOn: 'Runs the member-end check again for the sheet or 3D model you are looking at',
1156
+ group: 'In the Properties panel',
1157
+ persistence: 'working',
1158
+ interaction: 'instant',
1159
+ risk: [],
1160
+ guidance: 'on-demand',
1161
+ why: 'The review stays on the view it was checked on until you do this. If you have ticked ends, it asks before dropping them.',
1162
+ });
1163
+
1089
1164
  def('steel.member-end-select-all', {
1090
1165
  label: 'Select all reviewed ends',
1091
- actsOn: 'Includes every endpoint whose support centerline is already chosen in the pending extension',
1166
+ actsOn: 'Includes every shown endpoint whose support centerline is already chosen in the pending extension',
1092
1167
  group: 'In the Properties panel',
1093
1168
  persistence: 'none',
1094
1169
  interaction: 'instant',
@@ -1957,7 +2032,7 @@
1957
2032
  why: 'How sure the automatic read of the drawing has to be before an element stops being flagged for review.',
1958
2033
  });
1959
2034
  def('steel.profile-colours', { label: 'Profile colours', actsOn: 'Opens the key of section colours for the whole model, and lets you change any of them', group: 'In the 3D toolbar', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'It only changes how members are DRAWN — no geometry, no sections, nothing that reaches the lock.' });
1960
- def('steel.structure-stats', { label: 'Structure numbers', actsOn: 'Expands the members and weight for the active plan sheet', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The header states the total; opening it shows what the total is made of, and changes nothing.' });
2035
+ def('steel.structure-stats', { label: 'Structure numbers', actsOn: 'Expands the members and weight for the active plan sheet, or for the whole model while the 3D view is active', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The header states the total; opening it shows what the total is made of, and changes nothing.' });
1961
2036
  def('steel.quality-stats', { label: 'Quality numbers', actsOn: 'Expands what is unresolved on this sheet — RFI, duplicates, member ends and read confidence', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The header states how many issues there are; opening it says which kinds, and changes nothing.' });
1962
2037
  def('steel.confidence-report', { label: 'Open confidence report', actsOn: 'Opens the recorded drawing-confidence review', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Shows current field-level read evidence without changing the model.' });
1963
2038
 
@@ -158,11 +158,12 @@
158
158
  <button type="button" data-left-section-switch="narrative" data-command-id="shell.left-section#AI Chat" data-command-instance-label="AI Chat" aria-pressed="true" data-tip="Show or hide AI Chat">AI Chat <span aria-hidden="true">◉</span></button>
159
159
  <button type="button" data-left-section-switch="model" data-command-id="shell.left-section#Model" data-command-instance-label="Model" aria-pressed="false" data-tip="Show or hide Model" hidden>Model <span aria-hidden="true">◉</span></button>
160
160
  <span class="left-pane-switch-spacer"></span>
161
+ <button type="button" id="left-layout-toggle" class="left-layout-toggle" data-command-id="shell.left-layout" aria-label="Side by side" aria-pressed="false" data-tip="Place AI Chat and Model side by side" hidden><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="2" y="3" width="5" height="10" rx="1"/><rect x="9" y="3" width="5" height="10" rx="1"/></svg></button>
161
162
  </div>
162
163
  <div class="left-pane-stack" id="left-pane-stack">
163
164
  <section id="left-narrative-section" class="left-pane-section narrative-section" data-left-section="narrative" aria-labelledby="left-narrative-heading">
164
- <header class="left-section-heading">
165
- <button type="button" class="left-section-grip" draggable="true" data-left-reorder="narrative" data-command-id="shell.left-section-reorder#AI Chat" data-command-instance-label="AI Chat" aria-label="Move AI Chat panel" data-tip="Drag to reorder · Alt+Arrow Up or Down also moves this panel">⠿</button>
165
+ <header class="left-section-heading" draggable="true" data-left-drag="narrative" tabindex="-1" data-command-id="shell.left-section-drag#AI Chat" data-command-instance-label="AI Chat" aria-label="AI Chat panel header, drag to move the panel">
166
+ <button type="button" class="left-section-grip" data-left-reorder="narrative" data-command-id="shell.left-section-reorder#AI Chat" data-command-instance-label="AI Chat" aria-label="Move AI Chat panel" data-tip="Drag the header onto the other panel to stack, or beside the panel to place side by side · Alt+Arrow keys also move it">⠿</button>
166
167
  <strong id="left-narrative-heading">AI Chat</strong><span id="left-chat-context">Project conversation</span>
167
168
  <button type="button" class="left-section-close" data-left-section-close="narrative" data-command-id="shell.left-section#AI Chat" data-command-instance-label="AI Chat" aria-label="Hide AI Chat" data-tip="Hide AI Chat">×</button>
168
169
  </header>
@@ -292,8 +293,8 @@
292
293
  </section>
293
294
  <div id="left-pane-split" class="left-pane-split" data-command-id="shell.left-panel-split" role="separator" tabindex="0" aria-label="Resize AI Chat and Model panels" aria-orientation="horizontal" aria-controls="left-narrative-section left-model-section" data-tip="Drag or use arrow keys to resize · Enter or double-click to reset" hidden></div>
294
295
  <section id="left-model-section" class="left-pane-section model-section" data-left-section="model" aria-labelledby="left-model-heading" hidden>
295
- <header class="left-section-heading">
296
- <button type="button" class="left-section-grip" draggable="true" data-left-reorder="model" data-command-id="shell.left-section-reorder#Model" data-command-instance-label="Model" aria-label="Move Model panel" data-tip="Drag to reorder · Alt+Arrow Up or Down also moves this panel">⠿</button>
296
+ <header class="left-section-heading" draggable="true" data-left-drag="model" tabindex="-1" data-command-id="shell.left-section-drag#Model" data-command-instance-label="Model" aria-label="Model panel header, drag to move the panel">
297
+ <button type="button" class="left-section-grip" data-left-reorder="model" data-command-id="shell.left-section-reorder#Model" data-command-instance-label="Model" aria-label="Move Model panel" data-tip="Drag the header onto the other panel to stack, or beside the panel to place side by side · Alt+Arrow keys also move it">⠿</button>
297
298
  <strong id="left-model-heading">Model</strong><span id="left-model-context">Project model</span>
298
299
  <button type="button" class="left-section-close" data-left-section-close="model" data-command-id="shell.left-section#Model" data-command-instance-label="Model" aria-label="Hide Model" data-tip="Hide Model">×</button>
299
300
  </header>
@@ -438,8 +439,9 @@
438
439
  <div class="ws-source-placeholder" id="ws-source-placeholder" tabindex="-1" hidden>
439
440
  <div class="ws-source-inner">
440
441
  <span class="ws-source-ico" aria-hidden="true">▨</span>
441
- <!-- Shown INSTEAD of the glyph while data-importing is true (a Revit import in flight), so
442
- the wait reads as work in progress rather than a dead pane. CSS-only swap on the
442
+ <!-- Shown INSTEAD of the glyph while data-importing is true (a Revit or Tekla read in flight), so
443
+ the wait reads as work in progress rather than a dead pane: workspaces.js puts Flo, working
444
+ with its hat on, in here (a plain ring spinner without flo-avatar.js). CSS-only swap on the
443
445
  attribute; it is not aria-busy because this pane is the import's own live region. -->
444
446
  <span class="ws-source-spin" aria-hidden="true"></span>
445
447
  <div class="ws-source-title" tabindex="-1">This project's source drawing</div>
@@ -326,7 +326,8 @@
326
326
  if (!el || el === document.body) return null;
327
327
  // A semantic divider is not a control. Only focusable separators (the panel
328
328
  // resize handles) belong in Instructor's interaction stream.
329
- var target = el.closest('button, summary, [role="button"], [role="treeitem"], [role="separator"][tabindex], a[href], input, select, textarea');
329
+ // A registered drag handle that is not a button (the left pane's section headers) is a control too.
330
+ var target = el.closest('button, summary, [role="button"], [role="treeitem"], [role="separator"][tabindex], a[href], input, select, textarea, [draggable="true"][data-command-id]');
330
331
  /* A switch paints `.rtn-toggle-track` over an input that is `opacity:0; width:0;
331
332
  height:0`, so the pointer NEVER lands on the input — it lands on the track, or
332
333
  on the <label> around it, and neither is in the list above. Hovering "Start on
@@ -108,8 +108,10 @@
108
108
  function register(provider) { if (typeof provider === 'function') providers.push(provider); }
109
109
  function registerFrame(frame, key) { register(function () { return probeFrame(frame, key); }); }
110
110
 
111
- /** Everything unresolved right now: { items, running } — never throws. */
112
- async function collect() {
111
+ /** Everything unresolved right now: { items, running } — never throws. `only` (optional) narrows it to
112
+ * the items it accepts and drops the running-workflow notice: leaving a project cares about that
113
+ * project's editors, not about a workflow input or a run that stays where it is. */
114
+ async function collect(only) {
113
115
  var items = [];
114
116
  var running = null;
115
117
  for (var i = 0; i < providers.length; i++) {
@@ -122,9 +124,21 @@
122
124
  else items.push(item);
123
125
  });
124
126
  }
127
+ if (typeof only === 'function') return { items: items.filter(only), running: null };
125
128
  return { items: items, running: running };
126
129
  }
127
130
 
131
+ /** The unsaved work that belongs to the OPEN PROJECT: the Workspaces editor frames (workspaces.js
132
+ * registers them as 'workspace-model' / 'workspace-drawings'). Workflow inputs and the full-window
133
+ * editor overlay are other surfaces and must not hold the "Leave this project?" question open. */
134
+ function isProjectItem(item) { return !!item && typeof item.id === 'string' && item.id.indexOf('frame:workspace-') === 0; }
135
+
136
+ /** The item filter for a question: the caller's own, or the project filter for action 'project'. */
137
+ function onlyFor(opts) {
138
+ if (opts && typeof opts.only === 'function') return opts.only;
139
+ return opts && opts.action === 'project' ? isProjectItem : null;
140
+ }
141
+
128
142
  /* ── the dialog ────────────────────────────────────────────────────────── */
129
143
 
130
144
  var COPY = {
@@ -146,6 +160,17 @@
146
160
  working: 'Signing out…',
147
161
  failed: 'FloLess could not sign you out just now, so you are still signed in. Try again in a moment.',
148
162
  },
163
+ // Switching to another project, or back to the project list, replaces the open project's editors.
164
+ // An AI Chat read keeps going and is there when you come back, so it is not part of this question.
165
+ project: {
166
+ title: 'Leave this project?',
167
+ clean: 'Nothing here is waiting to be saved.',
168
+ unsaved: 'Some of your work in this project is not saved yet. Save it before you leave?',
169
+ running: '',
170
+ confirm: 'Leave', save: 'Save and leave', discard: 'Leave without saving',
171
+ working: 'Leaving…',
172
+ failed: 'FloLess could not leave this project just now. Try again in a moment.',
173
+ },
149
174
  };
150
175
 
151
176
  var $modal = null;
@@ -240,7 +265,8 @@
240
265
  * dialog, which stays open (nothing was discarded, nothing was left).
241
266
  */
242
267
  function confirm(opts) {
243
- var action = opts && opts.action === 'signout' ? 'signout' : 'stop';
268
+ var action = opts && opts.action === 'signout' ? 'signout' : opts && opts.action === 'project' ? 'project' : 'stop';
269
+ var only = onlyFor(opts);
244
270
  if (openPromise) return openPromise;
245
271
  $modal = $modal || el('leave-guard-modal');
246
272
  var other = el('confirm-modal');
@@ -285,7 +311,7 @@
285
311
 
286
312
  /* The last word before acting: probe again, and go back to the dialog if the picture grew. */
287
313
  async function proceed(decided, discardAll) {
288
- var fresh = await collect();
314
+ var fresh = await collect(only);
289
315
  if (settled) return;
290
316
  if (grewSince(decided, fresh)) {
291
317
  snapshot = fresh;
@@ -308,7 +334,8 @@
308
334
  }
309
335
  }
310
336
  if (discardAll) fresh.items.forEach(function (i) { if (typeof i.discard === 'function') i.discard(); });
311
- window.__flolessLeaving = true; // no browser "Leave site?" prompt on the way out
337
+ // Leaving a project stays in the page, so its later reloads keep the browser's own prompt.
338
+ if (action !== 'project') window.__flolessLeaving = true; // no browser "Leave site?" prompt on the way out
312
339
  done(true);
313
340
  }
314
341
 
@@ -322,7 +349,7 @@
322
349
  catch (_) { failed.add(item.id); }
323
350
  }
324
351
  if (settled) return;
325
- var fresh = await collect();
352
+ var fresh = await collect(only);
326
353
  if (settled) return;
327
354
  // A save that said it failed keeps us here even if its item no longer shows up (an editor
328
355
  // closed mid-save): its change is not known to be saved, so it stays on the list.
@@ -380,7 +407,7 @@
380
407
  setBusy(true);
381
408
  $modal.classList.add('show');
382
409
  focusDefault();
383
- collect().then(function (s) {
410
+ collect(only).then(function (s) {
384
411
  if (settled) return;
385
412
  snapshot = s;
386
413
  render(action, snapshot);
@@ -390,6 +417,21 @@
390
417
  return openPromise;
391
418
  }
392
419
 
420
+ /**
421
+ * Ask only when something would be lost: resolves true at once when nothing in `opts.only` is
422
+ * unsaved, otherwise shows the question and resolves like confirm(). Used when the open project is
423
+ * about to be replaced (another project, or the project list).
424
+ */
425
+ async function confirmIfUnsaved(opts) {
426
+ var only = onlyFor(opts);
427
+ var snapshot = await collect(only);
428
+ // Clean on the first look: look once more before saying "go ahead", because an editor can turn
429
+ // dirty while the first probe was awaiting its providers.
430
+ if (!snapshot.items.length) snapshot = await collect(only);
431
+ if (!snapshot.items.length) return true;
432
+ return confirm(opts);
433
+ }
434
+
393
435
  /* ── Stop FloLess ──────────────────────────────────────────────────────── */
394
436
 
395
437
  var stopping = false;
@@ -476,6 +518,8 @@
476
518
  probeFrame: probeFrame,
477
519
  collect: collect,
478
520
  confirm: confirm,
521
+ confirmIfUnsaved: confirmIfUnsaved,
522
+ isProjectItem: isProjectItem,
479
523
  stopApp: stopApp,
480
524
  };
481
525
  })();