@floless/app 0.131.1 → 0.132.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 +2374 -1901
- package/dist/schemas/steel.model.v2.schema.json +3 -1
- package/dist/skills/floless-app-onboarding/SKILL.md +12 -2
- package/dist/skills/floless-app-queue/SKILL.md +2 -2
- package/dist/web/app.css +359 -0
- package/dist/web/app.js +22 -0
- package/dist/web/aware.js +121 -13
- package/dist/web/commands-filter.js +157 -0
- package/dist/web/commands-shell.js +1316 -0
- package/dist/web/commands-steel.js +1829 -0
- package/dist/web/commands-vector.js +154 -0
- package/dist/web/commands-vector3d.js +96 -0
- package/dist/web/commands.js +316 -0
- package/dist/web/grid-core.js +124 -23
- package/dist/web/index.html +269 -164
- package/dist/web/instructor-reporter.js +201 -0
- package/dist/web/instructor.js +1178 -0
- package/dist/web/reference-geometry-worker.js +194 -0
- package/dist/web/steel-3d-core.js +486 -107
- package/dist/web/steel-3d-view.js +847 -204
- package/dist/web/steel-canvas-guidance.js +7 -4
- package/dist/web/steel-editor.html +1620 -1799
- package/dist/web/steel-filter-core.js +13 -5
- package/dist/web/steel-filter.html +36 -22
- package/dist/web/steel-model-adapter.js +17 -22
- package/dist/web/steel-model-commands.js +23 -10
- package/dist/web/steel-model-v2-client-validation.js +20 -3
- package/dist/web/steel-model-v2-commands.js +91 -3
- package/dist/web/steel-model-v2-projection.js +4 -5
- package/dist/web/steel-plan-transform.js +4 -8
- package/dist/web/steel-split-view.js +33 -0
- package/dist/web/vector-3d.html +19 -7
- package/dist/web/vector-editor.html +21 -8
- package/dist/web/workspaces.js +12 -25
- package/package.json +10 -1
package/dist/web/aware.js
CHANGED
|
@@ -541,6 +541,23 @@
|
|
|
541
541
|
'Cancelling…': 'The current run is being cancelled.',
|
|
542
542
|
};
|
|
543
543
|
$runState.dataset.tip = activeTips[status.label] || gateTips[app.runState] || '';
|
|
544
|
+
|
|
545
|
+
// Push a snapshot to the Instructor band. One-way: the band renders what it
|
|
546
|
+
// is handed and never reaches back into workflow state.
|
|
547
|
+
if (window.Instructor) {
|
|
548
|
+
const inputs = Array.isArray(app.inputs) ? app.inputs : [];
|
|
549
|
+
const values = typeof currentInputs === 'function' ? currentInputs() || {} : {};
|
|
550
|
+
window.Instructor.setWorkflow({
|
|
551
|
+
name: app.name || app.id,
|
|
552
|
+
runState: app.runState,
|
|
553
|
+
statusLabel: status.label,
|
|
554
|
+
totalInputs: inputs.length,
|
|
555
|
+
inputsSet: inputs.filter((i) => {
|
|
556
|
+
const v = values[i.name];
|
|
557
|
+
return v !== undefined && v !== null && String(v).trim() !== '';
|
|
558
|
+
}).length,
|
|
559
|
+
});
|
|
560
|
+
}
|
|
544
561
|
}
|
|
545
562
|
|
|
546
563
|
function paintGate(app) {
|
|
@@ -947,6 +964,45 @@
|
|
|
947
964
|
} catch (e) { reportErr(e); }
|
|
948
965
|
}
|
|
949
966
|
|
|
967
|
+
// The Instructor's Ask button uses the same durable reverse channel as the onboarding guide,
|
|
968
|
+
// but carries the exact structured context the strip rendered. The SERVER turns that state into
|
|
969
|
+
// prose; this browser seam only queues intent, attempts the convenience copy, and reports delivery.
|
|
970
|
+
async function requestInstructorHelp(instructorContext) {
|
|
971
|
+
const body = { instructorContext };
|
|
972
|
+
// Workspaces is a replacement surface but deliberately leaves the last workflow selected
|
|
973
|
+
// underneath it. Scope from the visible surface, never from that hidden selection: an open
|
|
974
|
+
// project carries its own project/app identity, while the landing carries neither.
|
|
975
|
+
if (wsRequestScope) {
|
|
976
|
+
if (wsRequestScope.kind === 'project') {
|
|
977
|
+
body.project = wsRequestScope.project;
|
|
978
|
+
body.projectLabel = wsRequestScope.label;
|
|
979
|
+
body.appId = wsRequestScope.appId;
|
|
980
|
+
}
|
|
981
|
+
} else if (currentId) {
|
|
982
|
+
body.appId = currentId;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
let request;
|
|
986
|
+
try {
|
|
987
|
+
({ request } = await api('/api/guide', { method: 'POST', body: JSON.stringify(body) }));
|
|
988
|
+
} catch (e) {
|
|
989
|
+
console.error(e);
|
|
990
|
+
const reason = e && e.message ? ` — ${e.message}` : '';
|
|
991
|
+
showToast(`Couldn’t send this request${reason}`, 'err');
|
|
992
|
+
return false;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
// Delivery is already durable at this point. Clipboard and refresh are conveniences: neither
|
|
996
|
+
// may turn a successfully queued request into a false failure report.
|
|
997
|
+
const copied = await copyToClipboard(markedInstruction(request));
|
|
998
|
+
showToast(copied ? 'Sent to your terminal AI · copied to clipboard' : 'Sent to your terminal AI', 'ok');
|
|
999
|
+
try {
|
|
1000
|
+
appendNarration(`Asked your terminal AI about <strong>${escapeHtml(instructorContext.subject)}</strong> — watch the glowing <strong>requests</strong> pill (bottom-right), or switch to your terminal.${copied ? ' The prompt is also on your clipboard.' : ''}`);
|
|
1001
|
+
} catch (e) { console.error(e); }
|
|
1002
|
+
try { await loadRequests(); } catch (e) { console.error(e); }
|
|
1003
|
+
return true;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
950
1006
|
// ≡ menu "New workflow…" — the create-from-scratch sibling of requestGuide(). No open
|
|
951
1007
|
// workflow to target (none exists yet), so no currentId gate: relay the ask to the
|
|
952
1008
|
// terminal AI the same house way (queue a request, copy the marked prompt, toast, light
|
|
@@ -1215,6 +1271,8 @@
|
|
|
1215
1271
|
}
|
|
1216
1272
|
let wfTitleText = ''; // last workflow-combo label (may be a WF_STATUS_TEXT placeholder)
|
|
1217
1273
|
let wsTitleName = null; // open Workspaces project name, or 'Workspaces' on its landing; null = Workflows mode
|
|
1274
|
+
let wsTitleLanding = false; // explicit because a project may itself be named "Workspaces"
|
|
1275
|
+
let wsTitleProjectId = null; // identity: two projects may legitimately share a display name
|
|
1218
1276
|
const syncTabTitle = () => { document.title = tabTitle(wsTitleName, wfTitleText); };
|
|
1219
1277
|
function setComboTriggerLabel(text) {
|
|
1220
1278
|
if ($wfTriggerLabel) $wfTriggerLabel.textContent = text || 'select workflow';
|
|
@@ -1257,13 +1315,17 @@
|
|
|
1257
1315
|
// <button>s without nesting interactive elements (#85). Selection stays driven by
|
|
1258
1316
|
// the delegated $wfList click + comboMove highlight (aria-activedescendant).
|
|
1259
1317
|
const aid = escapeAttr(a.id);
|
|
1260
|
-
|
|
1318
|
+
// PHASE 0b: generated rows carry a PARAMETERIZED command id,
|
|
1319
|
+
// `<template>#<instance>`. The template is registered once (see
|
|
1320
|
+
// web/commands-shell.js); instances register nothing, so the
|
|
1321
|
+
// registry never churns with workflow data.
|
|
1322
|
+
html += `<div class="wf-option" role="option" id="wf-opt-${aid}" data-id="${aid}" data-command-id="workflow.select#${escapeAttr(aid)}" data-baked="${a.baked ? '1' : ''}" data-search="${escapeAttr((a.id + ' ' + p).toLowerCase())}" tabindex="-1" aria-selected="false">`
|
|
1261
1323
|
+ `<span class="wf-option-name">${escapeHtml(a.id)}</span><span class="wf-option-meta">${meta}</span>`
|
|
1262
1324
|
+ (a.forked ? `<span class="wf-fork-badge" data-tip="You forked this workflow — it no longer receives FloLess updates. You own its output.">yours</span>` : '')
|
|
1263
1325
|
+ `<span class="wf-option-actions">`
|
|
1264
|
-
+ `<button type="button" class="wf-act act-edit" data-wf-act="rename" data-id="${aid}" tabindex="-1" data-tip="Rename" aria-label="Rename ${aid}">✎</button>`
|
|
1265
|
-
+ `<button type="button" class="wf-act act-dup" data-wf-act="duplicate" data-id="${aid}" tabindex="-1" data-tip="Duplicate" aria-label="Duplicate ${aid}">⧉</button>`
|
|
1266
|
-
+ `<button type="button" class="wf-act act-del" data-wf-act="delete" data-id="${aid}" tabindex="-1" data-tip="Delete" aria-label="Delete ${aid}">×</button>`
|
|
1326
|
+
+ `<button type="button" class="wf-act act-edit" data-wf-act="rename" data-command-id="workflow.rename#${escapeAttr(aid)}" data-id="${aid}" tabindex="-1" data-tip="Rename" aria-label="Rename ${aid}">✎</button>`
|
|
1327
|
+
+ `<button type="button" class="wf-act act-dup" data-wf-act="duplicate" data-command-id="workflow.duplicate#${escapeAttr(aid)}" data-id="${aid}" tabindex="-1" data-tip="Duplicate" aria-label="Duplicate ${aid}">⧉</button>`
|
|
1328
|
+
+ `<button type="button" class="wf-act act-del" data-wf-act="delete" data-command-id="workflow.delete#${escapeAttr(aid)}" data-id="${aid}" tabindex="-1" data-tip="Delete" aria-label="Delete ${aid}">×</button>`
|
|
1267
1329
|
+ `</span></div>`;
|
|
1268
1330
|
}
|
|
1269
1331
|
html += '</div>';
|
|
@@ -1276,6 +1338,7 @@
|
|
|
1276
1338
|
function comboVisibleOptions() {
|
|
1277
1339
|
return [...$wfList.querySelectorAll('.wf-option')].filter((o) => !o.hidden && !o.closest('.wf-group').hidden);
|
|
1278
1340
|
}
|
|
1341
|
+
|
|
1279
1342
|
function comboClearHighlight() {
|
|
1280
1343
|
$wfList.querySelectorAll('.wf-option.highlighted').forEach((o) => o.classList.remove('highlighted'));
|
|
1281
1344
|
comboHi = -1;
|
|
@@ -2146,7 +2209,7 @@
|
|
|
2146
2209
|
// Only offer the action when a renderer is actually registered for the type — otherwise
|
|
2147
2210
|
// openContractEditor() returns false and the click would silently do nothing.
|
|
2148
2211
|
if (contractType && window.CONTRACT_RENDERERS && window.CONTRACT_RENDERERS[contractType]) {
|
|
2149
|
-
// Approving a
|
|
2212
|
+
// Approving a project publication bakes THAT PROJECT's model into this workflow's shared .flo, so
|
|
2150
2213
|
// every action below asks for a contract this workflow does not own and fails on click. Say so
|
|
2151
2214
|
// once, before the buttons, and dim them — rather than leaving five lit affordances that each
|
|
2152
2215
|
// cost a click, a wait, and a raw failure toast to discover.
|
|
@@ -8619,8 +8682,8 @@
|
|
|
8619
8682
|
// Default flow is OAuth loopback+PKCE (safer; aware opens the browser). The
|
|
8620
8683
|
// per-card toggle opts into device-code (a one-time code) for headless /
|
|
8621
8684
|
// loopback-blocked machines.
|
|
8622
|
-
const
|
|
8623
|
-
const toggle = $integrationsList.querySelector(`.int-flow-toggle[data-flow="${
|
|
8685
|
+
const selectorId = (window.CSS && CSS.escape) ? CSS.escape(id) : id;
|
|
8686
|
+
const toggle = $integrationsList.querySelector(`.int-flow-toggle[data-flow="${selectorId}"]`);
|
|
8624
8687
|
const body = toggle && toggle.checked ? JSON.stringify({ flow: 'device-code' }) : '{}';
|
|
8625
8688
|
if (slot) slot.innerHTML = 'Starting sign-in…';
|
|
8626
8689
|
try {
|
|
@@ -9394,9 +9457,16 @@
|
|
|
9394
9457
|
let riSubmitting = false;
|
|
9395
9458
|
let riAppVersion = ''; // captured from /api/health on open so the report actually carries
|
|
9396
9459
|
let riAwareVersion = ''; // the versions the modal promises ("sent automatically: …")
|
|
9460
|
+
let riReturnFocus = null;
|
|
9397
9461
|
|
|
9398
9462
|
const riSyncSend = () => { $riSend.disabled = !($riTitle.value.trim() && $riDesc.value.trim()); };
|
|
9399
|
-
|
|
9463
|
+
function riHideAndRestoreFocus() {
|
|
9464
|
+
hideModal($riModal);
|
|
9465
|
+
const returnFocus = riReturnFocus;
|
|
9466
|
+
riReturnFocus = null;
|
|
9467
|
+
if (returnFocus && returnFocus.isConnected) returnFocus.focus();
|
|
9468
|
+
}
|
|
9469
|
+
const riClose = () => { if (!riSubmitting) riHideAndRestoreFocus(); };
|
|
9400
9470
|
const riSetCategory = (cat) => {
|
|
9401
9471
|
riCategory = cat;
|
|
9402
9472
|
$riModal.querySelectorAll('#ri-category .rtn-mode-btn').forEach((b) => {
|
|
@@ -9446,6 +9516,10 @@
|
|
|
9446
9516
|
};
|
|
9447
9517
|
|
|
9448
9518
|
openReportIssue = function openReportIssueReal() {
|
|
9519
|
+
// The menu closes before its action dispatches, but its clicked item remains focused. Return
|
|
9520
|
+
// that path to the hamburger; a persistent/footer trigger returns to itself.
|
|
9521
|
+
riReturnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
9522
|
+
if ($menu.contains(riReturnFocus)) riReturnFocus = $menuBtn;
|
|
9449
9523
|
riSubmitting = false;
|
|
9450
9524
|
$riForm.hidden = false;
|
|
9451
9525
|
$riState.hidden = true;
|
|
@@ -9485,7 +9559,7 @@
|
|
|
9485
9559
|
wrap.append(icon, msg);
|
|
9486
9560
|
const actions = document.createElement('div');
|
|
9487
9561
|
actions.className = 'modal-actions';
|
|
9488
|
-
const done = riButton('ri-done', 'Done', true, () =>
|
|
9562
|
+
const done = riButton('ri-done', 'Done', true, () => riClose());
|
|
9489
9563
|
actions.append(done);
|
|
9490
9564
|
riShowState(wrap, actions);
|
|
9491
9565
|
done.focus();
|
|
@@ -9497,10 +9571,10 @@
|
|
|
9497
9571
|
sub.textContent = 'Sign in to send a report — your session has expired.';
|
|
9498
9572
|
const actions = document.createElement('div');
|
|
9499
9573
|
actions.className = 'modal-actions';
|
|
9500
|
-
const close = riButton('ri-signin-close', 'Close', false, () =>
|
|
9574
|
+
const close = riButton('ri-signin-close', 'Close', false, () => riClose());
|
|
9501
9575
|
const signin = riButton('ri-signin-btn', 'Sign in', true, async () => {
|
|
9502
9576
|
try { await api('/api/license/start', { method: 'POST' }); } catch { /* surfaced via license polling */ }
|
|
9503
|
-
|
|
9577
|
+
riClose();
|
|
9504
9578
|
});
|
|
9505
9579
|
actions.append(close, signin);
|
|
9506
9580
|
riShowState(sub, actions);
|
|
@@ -9556,7 +9630,26 @@
|
|
|
9556
9630
|
$riCancel.onclick = () => riClose();
|
|
9557
9631
|
onBackdropDismiss($riModal, () => riClose());
|
|
9558
9632
|
$riModal.querySelectorAll('#ri-category .rtn-mode-btn').forEach((b) => { b.onclick = () => riSetCategory(b.dataset.cat); });
|
|
9559
|
-
|
|
9633
|
+
const riFocusable = () => Array.from($riModal.querySelectorAll(
|
|
9634
|
+
'button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',
|
|
9635
|
+
)).filter((el) => !el.hidden && el.offsetParent !== null);
|
|
9636
|
+
document.addEventListener('keydown', (e) => {
|
|
9637
|
+
if (!$riModal.classList.contains('show')) return;
|
|
9638
|
+
if (e.key === 'Escape') { e.preventDefault(); riClose(); return; }
|
|
9639
|
+
if (e.key !== 'Tab') return;
|
|
9640
|
+
const controls = riFocusable();
|
|
9641
|
+
if (!controls.length) { e.preventDefault(); return; }
|
|
9642
|
+
const active = document.activeElement;
|
|
9643
|
+
const first = controls[0];
|
|
9644
|
+
const last = controls[controls.length - 1];
|
|
9645
|
+
if (e.shiftKey && (active === first || !$riModal.contains(active))) {
|
|
9646
|
+
e.preventDefault();
|
|
9647
|
+
last.focus();
|
|
9648
|
+
} else if (!e.shiftKey && (active === last || !$riModal.contains(active))) {
|
|
9649
|
+
e.preventDefault();
|
|
9650
|
+
first.focus();
|
|
9651
|
+
}
|
|
9652
|
+
});
|
|
9560
9653
|
|
|
9561
9654
|
// ── init (after app.js bootstrap) ────────────────────────────────────────────
|
|
9562
9655
|
// app.js already stored the ORIGINAL functions as .onclick/.oninput before we
|
|
@@ -9928,6 +10021,7 @@
|
|
|
9928
10021
|
refreshKbInformed(null);
|
|
9929
10022
|
},
|
|
9930
10023
|
copyToClipboard,
|
|
10024
|
+
requestInstructorHelp,
|
|
9931
10025
|
instructionFor,
|
|
9932
10026
|
markedInstruction, // marked (paste-safe) form for clipboard copies — panels.js uses it (#73)
|
|
9933
10027
|
copyRequest, // copy ONE request, telling "no instruction body" apart from "clipboard refused"
|
|
@@ -9941,9 +10035,23 @@
|
|
|
9941
10035
|
// Tab title: workspaces.js owns which project is open, aware.js owns document.title (one
|
|
9942
10036
|
// writer — the workflow combo keeps updating underneath in Workspaces mode). Pass the open
|
|
9943
10037
|
// project's name, 'Workspaces' on the landing, or null to hand the tab back to the workflow.
|
|
9944
|
-
setWorkspaceTitle(name) {
|
|
10038
|
+
setWorkspaceTitle(name, landing = false, projectId = null) {
|
|
9945
10039
|
wsTitleName = name || null;
|
|
10040
|
+
wsTitleLanding = !!(wsTitleName && landing);
|
|
10041
|
+
wsTitleProjectId = wsTitleName && !wsTitleLanding ? projectId || null : null;
|
|
9946
10042
|
syncTabTitle();
|
|
10043
|
+
if (window.Instructor && typeof window.Instructor.setWorkspace === 'function') {
|
|
10044
|
+
window.Instructor.setWorkspace(wsTitleName
|
|
10045
|
+
? { name: wsTitleName, landing: wsTitleLanding, projectId: wsTitleProjectId }
|
|
10046
|
+
: null);
|
|
10047
|
+
}
|
|
10048
|
+
},
|
|
10049
|
+
// Instructor loads after this bridge. Workspaces can restore its persisted mode before
|
|
10050
|
+
// Instructor mounts, so expose the last visible title for a one-time initialization replay.
|
|
10051
|
+
getWorkspaceContext() {
|
|
10052
|
+
return wsTitleName
|
|
10053
|
+
? { name: wsTitleName, landing: wsTitleLanding, projectId: wsTitleProjectId }
|
|
10054
|
+
: null;
|
|
9947
10055
|
},
|
|
9948
10056
|
// ── Workspaces guide beacon (the SAME #guide-beacon/#guide-modal, document variant) ──
|
|
9949
10057
|
// workspaces.js owns the open project + its lifecycle state; aware.js owns the beacon
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/* ──────────────────────────────────────────────────────────────────────────
|
|
2
|
+
Drawing Filter capability registrations (steel-filter.html).
|
|
3
|
+
|
|
4
|
+
Same shape as commands-steel.js, and the same two-documents rule: this file
|
|
5
|
+
loads in steel-filter.html AND in index.html, because the shell is the sole
|
|
6
|
+
guidance producer and must be able to resolve an id that arrives over the
|
|
7
|
+
reporter seam. Two copies of a list of immutable declarations are not two
|
|
8
|
+
registries — see the header of commands-steel.js for the full reasoning.
|
|
9
|
+
|
|
10
|
+
── Why NOTHING here is 'active-command' ─────────────────────────────────
|
|
11
|
+
Not an oversight, and not a shortcut. This surface arms nothing: the
|
|
12
|
+
eyedropper OPENS ON CLICK (pointerup → openEyedropper) rather than being
|
|
13
|
+
armed first and clicked second, the facets apply immediately, and pan/zoom is
|
|
14
|
+
a plain drag. `mode` in steel-filter.html is the match-on facet mode — which
|
|
15
|
+
criteria AND together — not an armed tool.
|
|
16
|
+
|
|
17
|
+
A command with no steps must not be given steps. Inventing a "click a line to
|
|
18
|
+
sample it" sequence would put a step counter on the band for a command that
|
|
19
|
+
has no sequence to count, which is the kind of confident wrongness this whole
|
|
20
|
+
design exists to avoid.
|
|
21
|
+
|
|
22
|
+
── persistence, on this surface ─────────────────────────────────────────
|
|
23
|
+
Facet and mode toggles are 'local': they change what you see and what a Save
|
|
24
|
+
would write, but nothing reaches the project until you press Save. Only
|
|
25
|
+
`filter.save` is 'working'.
|
|
26
|
+
────────────────────────────────────────────────────────────────────────── */
|
|
27
|
+
(function () {
|
|
28
|
+
'use strict';
|
|
29
|
+
|
|
30
|
+
if (!window.Commands) return;
|
|
31
|
+
var def = window.Commands.define;
|
|
32
|
+
window.Commands.surfaceScope('steel-filter');
|
|
33
|
+
|
|
34
|
+
/* ── the header ─────────────────────────────────────────────────────────── */
|
|
35
|
+
|
|
36
|
+
def('filter.sheet-switch', {
|
|
37
|
+
label: 'Switch sheet',
|
|
38
|
+
actsOn: 'Shows another framing-plan sheet from this drawing set',
|
|
39
|
+
group: 'In the Drawing Filter header',
|
|
40
|
+
persistence: 'local',
|
|
41
|
+
interaction: 'instant',
|
|
42
|
+
risk: [],
|
|
43
|
+
guidance: 'on-demand',
|
|
44
|
+
why: 'Only appears when the set has more than one sheet. Your filter is shared across sheets — switching changes what you are looking at, not what is selected.',
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
def('filter.save', {
|
|
48
|
+
label: 'Save filter',
|
|
49
|
+
actsOn: 'Writes the filter onto this app’s contract',
|
|
50
|
+
group: 'In the Drawing Filter header',
|
|
51
|
+
persistence: 'working',
|
|
52
|
+
interaction: 'instant',
|
|
53
|
+
risk: [],
|
|
54
|
+
guidance: 'on-demand',
|
|
55
|
+
why: 'Everything you tick on this screen is held in memory until you press this. It stays off until something has actually changed.',
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/* ── the left panel: which elements are shown ───────────────────────────── */
|
|
59
|
+
|
|
60
|
+
def('filter.match-on', {
|
|
61
|
+
label: 'Match on',
|
|
62
|
+
actsOn: 'Chooses which criteria have to agree',
|
|
63
|
+
group: 'In the Drawing Filter panel',
|
|
64
|
+
persistence: 'local',
|
|
65
|
+
interaction: 'instant',
|
|
66
|
+
risk: [],
|
|
67
|
+
guidance: 'on-demand',
|
|
68
|
+
why: 'Every criterion you tick must match (AND), so adding one can only narrow the result — never widen it.',
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
def('filter.facet-toggle', {
|
|
72
|
+
label: 'Include a value',
|
|
73
|
+
actsOn: 'Adds or removes one layer, thickness or colour',
|
|
74
|
+
group: 'In the Drawing Filter panel',
|
|
75
|
+
persistence: 'local',
|
|
76
|
+
interaction: 'instant',
|
|
77
|
+
risk: [],
|
|
78
|
+
guidance: 'on-demand',
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
def('filter.facet-all', {
|
|
82
|
+
label: 'Select all in a facet',
|
|
83
|
+
actsOn: 'Ticks every value in that list',
|
|
84
|
+
group: 'In the Drawing Filter panel',
|
|
85
|
+
persistence: 'local',
|
|
86
|
+
interaction: 'instant',
|
|
87
|
+
risk: [],
|
|
88
|
+
guidance: 'on-demand',
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
def('filter.facet-none', {
|
|
92
|
+
label: 'Clear a facet',
|
|
93
|
+
actsOn: 'Unticks every value in that list',
|
|
94
|
+
group: 'In the Drawing Filter panel',
|
|
95
|
+
persistence: 'local',
|
|
96
|
+
interaction: 'instant',
|
|
97
|
+
risk: [],
|
|
98
|
+
guidance: 'on-demand',
|
|
99
|
+
why: 'Clearing every value in a criterion you are matching on leaves nothing to match, so the drawing goes empty until you tick something back.',
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
/* ── the canvas ─────────────────────────────────────────────────────────── */
|
|
103
|
+
|
|
104
|
+
def('filter.fit', {
|
|
105
|
+
label: 'Fit',
|
|
106
|
+
actsOn: 'Frames the whole page',
|
|
107
|
+
group: 'On the Drawing Filter canvas',
|
|
108
|
+
persistence: 'local',
|
|
109
|
+
interaction: 'instant',
|
|
110
|
+
risk: [],
|
|
111
|
+
guidance: 'on-demand',
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
def('filter.zoom-steel', {
|
|
115
|
+
label: 'Zoom steel',
|
|
116
|
+
actsOn: 'Frames just the steel on this sheet',
|
|
117
|
+
group: 'On the Drawing Filter canvas',
|
|
118
|
+
persistence: 'local',
|
|
119
|
+
interaction: 'instant',
|
|
120
|
+
risk: [],
|
|
121
|
+
guidance: 'on-demand',
|
|
122
|
+
why: 'Falls back to fitting the whole page when the sheet has no steel identified on it yet.',
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
def('filter.eyedropper', {
|
|
126
|
+
label: 'Sample an element',
|
|
127
|
+
actsOn: 'Reads the layer, thickness and colour off one line or label',
|
|
128
|
+
group: 'On the Drawing Filter canvas',
|
|
129
|
+
persistence: 'none',
|
|
130
|
+
interaction: 'gesture',
|
|
131
|
+
risk: [],
|
|
132
|
+
guidance: 'on-demand',
|
|
133
|
+
why: 'Click a line on the drawing — no tool to arm first. Use it when you can see the elements you want but do not know which layer or colour they are on.',
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
def('filter.eyedropper-add', {
|
|
137
|
+
label: 'Add a sampled value to the filter',
|
|
138
|
+
actsOn: 'Ticks the sampled layer, thickness or colour',
|
|
139
|
+
group: 'On the Drawing Filter canvas',
|
|
140
|
+
persistence: 'local',
|
|
141
|
+
interaction: 'instant',
|
|
142
|
+
risk: [],
|
|
143
|
+
guidance: 'on-demand',
|
|
144
|
+
why: 'Add one criterion at a time, or all three at once — the fastest way to build a filter from an element you can already see.',
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
def('filter.pan-zoom', {
|
|
148
|
+
label: 'Pan and zoom the drawing',
|
|
149
|
+
actsOn: 'Moves the view only',
|
|
150
|
+
group: 'On the Drawing Filter canvas',
|
|
151
|
+
persistence: 'local',
|
|
152
|
+
interaction: 'gesture',
|
|
153
|
+
risk: [],
|
|
154
|
+
guidance: 'on-demand',
|
|
155
|
+
why: 'Drag to pan, wheel to zoom. A drag never samples an element — only a click that did not move does.',
|
|
156
|
+
});
|
|
157
|
+
})();
|