Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
HTML agent-skillsai-agentsarchitecture-diagramclaude-codeclaude-skillscodexcoding-agentsdeepseek-harnessdeveloper-toolsdiagramsdiagrams-as-codedsh-pluginflowchartllmmermaidopencodesequence-diagramsoftware-architecturesystem-designvisualization
fix: make semantic passport dismissible
tt-a1idee7089ca2d5
diff --git a/archify.zip b/archify.zipindex 03136db1..f47b0055 100644Binary files a/archify.zip and b/archify.zip differdiff --git a/archify/assets/template.html b/archify/assets/template.htmlindex 08242af6..27320fe2 100644--- a/archify/assets/template.html+++ b/archify/assets/template.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4358,9 +4373,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7396,6 +7411,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7447,6 +7465,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7580,7 +7602,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7647,6 +7669,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12608,7 +12637,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/archify/test/semantic-passport.test.mjs b/archify/test/semantic-passport.test.mjsindex df40b595..213c8fee 100644--- a/archify/test/semantic-passport.test.mjs+++ b/archify/test/semantic-passport.test.mjs@@ -65,6 +65,7 @@ test('Relationship Lens renders one Semantic Passport and copyable stable focusassert.match(html, /id="focus-context" data-passport="context" hidden/);assert.match(html, /id="focus-tag" data-passport="tag" hidden/);assert.match(html, /id="focus-id" data-passport="id"/);+ assert.match(html, /id="btn-focus-clear"[^>]+aria-label="Close semantic passport"[^>]+title="Close">×<\/button>/);assert.match(html, /id="btn-focus-copy"[^>]+aria-label="Copy link to focused node"/);assert.match(html, /id="btn-focus-relations"[^>]+aria-expanded="false"[^>]+aria-controls="relationship-lens-list"/);assert.match(html, /function renderPassport\(id, node\)/);@@ -77,6 +78,11 @@ test('Relationship Lens renders one Semantic Passport and copyable stable focusassert.match(html, /compactOnMobile = mobile && chip\.getAttribute\('data-relations-expanded'\) !== 'true'/);assert.match(html, /nodeTop - chip\.offsetHeight - gap/);assert.match(html, /focus-chip:not\(\[data-relations-expanded="true"\]\) \.relationship-lens-list \{ display: none; \}/);+ assert.match(html, /clearBtn\.addEventListener\('click', function \(\) \{ clear\(\{ restoreFocus: true \}\); \}\)/);+ assert.match(html, /chip\.hidden \|\| !target \|\| typeof target\.closest !== 'function' \|\| chip\.contains\(target\)/);+ assert.match(html, /target\.closest\('\[data-node-id\], \[data-relationship-hit-key\]'\)/);+ assert.match(html, /document\.addEventListener\('click',[\s\S]+?clear\(\);\s+\}, true\);/);+ assert.match(html, /Archify\.focus\.clear\(\{ restoreFocus: true \}\)/);});test('Node Finder searches and presents the same passport facts', () => {diff --git a/archify/test/webm-artifact.smoke.mjs b/archify/test/webm-artifact.smoke.mjsindex 99a1a630..b8a9d2f4 100644--- a/archify/test/webm-artifact.smoke.mjs+++ b/archify/test/webm-artifact.smoke.mjs@@ -295,6 +295,68 @@ try {assert.equal(ready, true, `${label} did not expose its browser export surface`);}+ async function verifySemanticPassportDismissal(file) {+ await navigateReady(file, '!!(window.Archify && Archify.focus && document.querySelector("#btn-focus-clear"))', 'Semantic Passport dismissal');+ const result = await evaluate(cdp, sessionId, `(() => {+ var chip = document.querySelector('#focus-chip');+ var close = document.querySelector('#btn-focus-clear');+ var container = document.querySelector('.diagram-container');+ var svg = container.querySelector(':scope > svg');+ var origin = svg.querySelector('[data-node-id="clients"]');+ var neighbor = svg.querySelector('[data-node-id]:not([data-node-id="clients"])');+ if (!origin || !neighbor) return { ok: false, error: 'missing smoke-test nodes' };+ function state() {+ return { hidden: chip.hidden, active: Archify.focus.active() };+ }++ Archify.focus.set('clients', { toggle: false, updateUrl: false });+ var cardRect = chip.getBoundingClientRect();+ var closeRect = close.getBoundingClientRect();+ var layout = {+ topGap: Math.round(closeRect.top - cardRect.top),+ rightGap: Math.round(cardRect.right - closeRect.right),+ label: close.getAttribute('aria-label'),+ title: close.getAttribute('title'),+ text: close.textContent.trim()+ };+ close.click();+ var afterClose = state();+ var restoredFocus = document.activeElement && document.activeElement.getAttribute('data-node-id');++ Archify.focus.set('clients', { toggle: false, updateUrl: false });+ chip.querySelector('.relationship-lens-head').dispatchEvent(new MouseEvent('click', { bubbles: true }));+ var afterInside = state();+ container.dispatchEvent(new MouseEvent('click', { bubbles: true }));+ var afterOutside = state();++ Archify.focus.set('clients', { toggle: false, updateUrl: false });+ neighbor.dispatchEvent(new MouseEvent('click', { bubbles: true }));+ var afterNode = state();+ return {+ ok: true,+ layout: layout,+ afterClose: afterClose,+ restoredFocus: restoredFocus,+ afterInside: afterInside,+ afterOutside: afterOutside,+ afterNode: afterNode,+ neighborId: neighbor.getAttribute('data-node-id')+ };+ })()`);+ assert.equal(result?.ok, true, result?.error || 'Semantic Passport smoke failed');+ assert.equal(result.layout.label, 'Close semantic passport');+ assert.equal(result.layout.title, 'Close');+ assert.equal(result.layout.text, '×');+ assert.ok(result.layout.topGap >= 0 && result.layout.topGap <= 16, `Semantic Passport close top gap ${result.layout.topGap}px`);+ assert.ok(result.layout.rightGap >= 0 && result.layout.rightGap <= 16, `Semantic Passport close right gap ${result.layout.rightGap}px`);+ assert.deepEqual(result.afterClose, { hidden: true, active: null });+ assert.equal(result.restoredFocus, 'clients');+ assert.deepEqual(result.afterInside, { hidden: false, active: 'clients' });+ assert.deepEqual(result.afterOutside, { hidden: true, active: null });+ assert.deepEqual(result.afterNode, { hidden: false, active: result.neighborId });+ console.log('ok Semantic Passport: close control, focus return, inside preservation, and outside dismissal');+ }+async function verifyArchitectureDeltaNavigator(file) {const readyCondition = '!!document.querySelector("#review-play") && !document.querySelector("#review-play").disabled';async function waitForSelected(changeKey, label) {@@ -1382,6 +1444,7 @@ try {console.log(`ok ${label} Reach Card: ${reachPayload.size} bytes, ${reachPayload.snapshot.nodeIds.length} nodes, ${reachPayload.snapshot.edges.length} authored links`);}+ await verifySemanticPassportDismissal(path.resolve(skillRoot, '../docs/gallery/artifacts/production-deployment.architecture.html'));await verifyArchitectureDeltaNavigator(path.resolve(skillRoot, '../examples/checkout-platform-delta.html'));await captureShareCard(output, 'architecture-wide');await captureShareCard(sequenceOutput, 'sequence-tall');diff --git a/docs/assets/archify-live-proof.gif b/docs/assets/archify-live-proof.gifindex c6049ca7..781e1352 100644Binary files a/docs/assets/archify-live-proof.gif and b/docs/assets/archify-live-proof.gif differdiff --git a/docs/assets/archify-live-proof.json b/docs/assets/archify-live-proof.jsonindex b2c66260..8a239d25 100644--- a/docs/assets/archify-live-proof.json+++ b/docs/assets/archify-live-proof.json@@ -7,13 +7,13 @@"fps": 10,"frameCount": 54,"durationSeconds": 5.4,- "bytes": 1708413,- "sha256": "06526e75b813681bee1a8157774f2875603f6f75e1aa9497388aa810bff4e41e",+ "bytes": 1685865,+ "sha256": "f66cfd197f9a7a609d861bcb0a168424469692766a129551db47bec452c80290","scenes": [{"id": "signal-flow","artifact": "docs/gallery/artifacts/agent-tool-call.workflow.html",- "artifactSha256": "541402cac74cad242e40efb982b3a817a4cbc00537a7eb72244aa3291b81b3af",+ "artifactSha256": "1d2c610f94a26066ec3ee88b65dabebb6c311eac77f2fd550e7ee592a418935b","view": "happy-path","eyebrow": "WORKFLOW · SIGNAL FLOW","title": "Agent Tool Call",@@ -22,7 +22,7 @@{"id": "blueprint","artifact": "docs/gallery/artifacts/production-deployment.architecture.html",- "artifactSha256": "3a8d12813da45b465f3f633a8c4341760e300d10961768274511c2203b331e0b",+ "artifactSha256": "f8a5330cdbcdf2bc1726130bb713eba2a25df0911f74fdf0afefab440b844d65","view": "request-boundary","eyebrow": "ARCHITECTURE · BLUEPRINT","title": "Production Deployment",@@ -31,7 +31,7 @@{"id": "classic","artifact": "docs/gallery/artifacts/cache-miss.sequence.html",- "artifactSha256": "89a81e1c53f374896dec38fc514719fc836a91d6ed06bde014ddb60b8bb7b6f2",+ "artifactSha256": "f962d3fade853706aa139e5d3b177cd5f6c828ca1a5adcbc73275a36558a7db6","view": "cache-fallback","eyebrow": "SEQUENCE · CLASSIC","title": "Cache Miss Request",diff --git a/docs/cases/mco-runtime.architecture.html b/docs/cases/mco-runtime.architecture.htmlindex ee11e21e..e5fdda18 100644--- a/docs/cases/mco-runtime.architecture.html+++ b/docs/cases/mco-runtime.architecture.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4481,9 +4496,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7515,6 +7530,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7566,6 +7584,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7699,7 +7721,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7766,6 +7788,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12727,7 +12756,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery.html b/docs/gallery.htmlindex ac774a26..3504eb0d 100644--- a/docs/gallery.html+++ b/docs/gallery.html@@ -327,7 +327,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">12N · 11E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="541402cac74cad242e40efb982b3a817a4cbc00537a7eb72244aa3291b81b3af">541402cac74c</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="1d2c610f94a26066ec3ee88b65dabebb6c311eac77f2fd550e7ee592a418935b">1d2c610f94a2</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/agent-tool-call.workflow.html?present=1&play=1#view=happy-path" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -356,7 +356,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">12N · 12E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="3a8d12813da45b465f3f633a8c4341760e300d10961768274511c2203b331e0b">3a8d12813da4</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="f8a5330cdbcdf2bc1726130bb713eba2a25df0911f74fdf0afefab440b844d65">f8a5330cdbcd</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/production-deployment.architecture.html?present=1&play=1#view=request-boundary" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -384,7 +384,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">7N · 12E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="89a81e1c53f374896dec38fc514719fc836a91d6ed06bde014ddb60b8bb7b6f2">89a81e1c53f3</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="f962d3fade853706aa139e5d3b177cd5f6c828ca1a5adcbc73275a36558a7db6">f962d3fade85</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/cache-miss.sequence.html?present=1&play=1#view=cache-fallback" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -412,7 +412,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 10E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="299191550368a8321aadd4fd8456c8dd20beb4a8542bfcd602a1830d8cea4e2c">299191550368</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="c1a2452bf972d419c21d73c9e52a6b11cf31f858968c9a31318fefa8968d816a">c1a2452bf972</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/release-delivery.workflow.html?present=1&play=1#view=approval-to-production" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -440,7 +440,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">11N · 10E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="53e3f088286e37edd904323bc91cc706ac7303e8abf3528f63c5f7ac32e3917f">53e3f088286e</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="8acce7ad866fb0131946597baf5a930519e9a8eeec32606dc6f4eb4de70cd45b">8acce7ad866f</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/incident-response.workflow.html?present=1&play=1#view=mitigate-and-verify" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -468,7 +468,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 10E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="75c1f57bcf2791e5839893559d47faa9fdf2369882b137204ac5895367b3e7df">75c1f57bcf27</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="4e264398550c1f93939099d7cc0bac6bb518a6726739f17afc6ebb82b50ab63d">4e264398550c</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/product-analytics.dataflow.html?present=1&play=1#view=consent-boundary" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -496,7 +496,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">7N · 14E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="2c6a5da1a2c0ca24451843a183734030e8fd25819ebedc3292034d7905983f70">2c6a5da1a2c0</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="bdf196bc9c1ea2ab7212c8d866c27c1d1459e8e2501a6f91d7f18b679d49e939">bdf196bc9c1e</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/async-job-roundtrip.sequence.html?present=1&play=1#view=work-and-retry" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -524,7 +524,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">12N · 12E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="392e31bcfa3897af68da48debc3f2cf347aa594022f24fc08327c6488c5ba975">392e31bcfa38</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="6e1d488d514c6ffc9196d571742b4fba5556736b3036f33cdcfe35bc020e7c61">6e1d488d514c</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/event-stream.dataflow.html?present=1&play=1#view=order-transit" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -552,7 +552,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 5E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="af5632d9d34bce1f5c74eb61c4077b24441f1d88d02ea4498dfcc8e48855571d">af5632d9d34b</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="fdacc3ca6015b8c91ed959506a452b13f056cb4e8663f02fbc191662d3901568">fdacc3ca6015</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/agent-run.lifecycle.html?present=1&play=1#view=main-lifecycle" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -580,7 +580,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">11N · 6E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="29eb7cdde5ff9d1bb1cb749afeba91a72fa242cc2717d4ece9ca16d2b3676ab9">29eb7cdde5ff</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="a361eb22a826aa7f68bdd5b7700937ce6d64c19cb9652d7a463ea35f046d4b26">a361eb22a826</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/deployment-release.lifecycle.html?present=1&play=1#view=rollback-outcomes" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -608,7 +608,7 @@<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div><div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div><div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 9E</span></div>- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="55200146c277dadc2507b14b92df67cfaf35329f48e01912c30e369b241b352d">55200146c277</span></div>+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="8330120204a41cbaca136d9e648927d08147364d93cc3a1436bac07e35b65349">8330120204a4</span></div></div><div class="card-actions"><a class="card-link primary" href="gallery/artifacts/web-app.architecture.html?present=1&play=1#view=request-path" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>@@ -686,8 +686,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": null,"nodeCount": 12,"edgeCount": 11,- "artifactBytes": 598332,- "artifactSha256": "541402cac74cad242e40efb982b3a817a4cbc00537a7eb72244aa3291b81b3af",+ "artifactBytes": 599563,+ "artifactSha256": "1d2c610f94a26066ec3ee88b65dabebb6c311eac77f2fd550e7ee592a418935b","sourceBytes": 6470,"sourceSha256": "a3afc6b30044eb256aa15c6195ddfbbcd1a14880d99967ed5605bc621ffb7e5f","checks": [@@ -784,8 +784,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": "deployment-ownership","nodeCount": 12,"edgeCount": 12,- "artifactBytes": 598656,- "artifactSha256": "3a8d12813da45b465f3f633a8c4341760e300d10961768274511c2203b331e0b",+ "artifactBytes": 599887,+ "artifactSha256": "f8a5330cdbcdf2bc1726130bb713eba2a25df0911f74fdf0afefab440b844d65","sourceBytes": 5546,"sourceSha256": "03e647d057eb20d99f7fb4ba4ddfdd5d58a7a813865338680e968038e6a90e0f","checks": [@@ -882,8 +882,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": null,"nodeCount": 7,"edgeCount": 12,- "artifactBytes": 591979,- "artifactSha256": "89a81e1c53f374896dec38fc514719fc836a91d6ed06bde014ddb60b8bb7b6f2",+ "artifactBytes": 593210,+ "artifactSha256": "f962d3fade853706aa139e5d3b177cd5f6c828ca1a5adcbc73275a36558a7db6","sourceBytes": 4442,"sourceSha256": "30098d81006a18813bab447da698edf74604a1463770f01dc056b0af8cb314ef","checks": [@@ -980,8 +980,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": null,"nodeCount": 10,"edgeCount": 10,- "artifactBytes": 594598,- "artifactSha256": "299191550368a8321aadd4fd8456c8dd20beb4a8542bfcd602a1830d8cea4e2c",+ "artifactBytes": 595829,+ "artifactSha256": "c1a2452bf972d419c21d73c9e52a6b11cf31f858968c9a31318fefa8968d816a","sourceBytes": 5256,"sourceSha256": "44aa56ac6ca807937dfe84a6404e8b07d6394a38ae2ac53248a1985337dfd671","checks": [@@ -1078,8 +1078,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": null,"nodeCount": 11,"edgeCount": 10,- "artifactBytes": 594456,- "artifactSha256": "53e3f088286e37edd904323bc91cc706ac7303e8abf3528f63c5f7ac32e3917f",+ "artifactBytes": 595687,+ "artifactSha256": "8acce7ad866fb0131946597baf5a930519e9a8eeec32606dc6f4eb4de70cd45b","sourceBytes": 5471,"sourceSha256": "9beb8698b275679a2fc92d4b51288cd5b5fc2115696d06b9168f3d7fef253a72","checks": [@@ -1176,8 +1176,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": null,"nodeCount": 10,"edgeCount": 10,- "artifactBytes": 595989,- "artifactSha256": "75c1f57bcf2791e5839893559d47faa9fdf2369882b137204ac5895367b3e7df",+ "artifactBytes": 597220,+ "artifactSha256": "4e264398550c1f93939099d7cc0bac6bb518a6726739f17afc6ebb82b50ab63d","sourceBytes": 5719,"sourceSha256": "f71c89288f80255bdedcdc0057bcbc155d1d8b1b7476d024b35f4e27c730c974","checks": [@@ -1274,8 +1274,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": null,"nodeCount": 7,"edgeCount": 14,- "artifactBytes": 592764,- "artifactSha256": "2c6a5da1a2c0ca24451843a183734030e8fd25819ebedc3292034d7905983f70",+ "artifactBytes": 593995,+ "artifactSha256": "bdf196bc9c1ea2ab7212c8d866c27c1d1459e8e2501a6f91d7f18b679d49e939","sourceBytes": 4483,"sourceSha256": "1b53d7c4ce7b2d8f6f40b8f33a394abe1d37fc991272b534c1ccd0255920ab52","checks": [@@ -1372,8 +1372,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": null,"nodeCount": 12,"edgeCount": 12,- "artifactBytes": 599944,- "artifactSha256": "392e31bcfa3897af68da48debc3f2cf347aa594022f24fc08327c6488c5ba975",+ "artifactBytes": 601175,+ "artifactSha256": "6e1d488d514c6ffc9196d571742b4fba5556736b3036f33cdcfe35bc020e7c61","sourceBytes": 5543,"sourceSha256": "bbfedc2f1b73bf50932490f7f56d45d5f853e970d2fab26660a04947a783969c","checks": [@@ -1470,8 +1470,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": null,"nodeCount": 10,"edgeCount": 5,- "artifactBytes": 588934,- "artifactSha256": "af5632d9d34bce1f5c74eb61c4077b24441f1d88d02ea4498dfcc8e48855571d",+ "artifactBytes": 590165,+ "artifactSha256": "fdacc3ca6015b8c91ed959506a452b13f056cb4e8663f02fbc191662d3901568","sourceBytes": 4353,"sourceSha256": "1d6b34282e014cb2730662b1993158ec67bc0ad2a40520cb441aaee1ad21e4c6","checks": [@@ -1568,8 +1568,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": null,"nodeCount": 11,"edgeCount": 6,- "artifactBytes": 590311,- "artifactSha256": "29eb7cdde5ff9d1bb1cb749afeba91a72fa242cc2717d4ece9ca16d2b3676ab9",+ "artifactBytes": 591542,+ "artifactSha256": "a361eb22a826aa7f68bdd5b7700937ce6d64c19cb9652d7a463ea35f046d4b26","sourceBytes": 4394,"sourceSha256": "aa614f0c9a82f210e301e382f362dfbd7f290bda4d5501de3c99a6cd81b4c0a4","checks": [@@ -1666,8 +1666,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>"engineeringProfile": null,"nodeCount": 10,"edgeCount": 9,- "artifactBytes": 589943,- "artifactSha256": "55200146c277dadc2507b14b92df67cfaf35329f48e01912c30e369b241b352d",+ "artifactBytes": 591174,+ "artifactSha256": "8330120204a41cbaca136d9e648927d08147364d93cc3a1436bac07e35b65349","sourceBytes": 3863,"sourceSha256": "01567b5e49cad5139baa071533a028d22f0e80fedfb49095e0d9330aee7f87db","checks": [diff --git a/docs/gallery/artifacts/agent-run.lifecycle.html b/docs/gallery/artifacts/agent-run.lifecycle.htmlindex dddd6769..f64b98f2 100644--- a/docs/gallery/artifacts/agent-run.lifecycle.html+++ b/docs/gallery/artifacts/agent-run.lifecycle.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4413,9 +4428,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7447,6 +7462,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7498,6 +7516,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7631,7 +7653,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7698,6 +7720,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12659,7 +12688,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/artifacts/agent-tool-call.workflow.html b/docs/gallery/artifacts/agent-tool-call.workflow.htmlindex d6e039b4..6c2cfaa5 100644--- a/docs/gallery/artifacts/agent-tool-call.workflow.html+++ b/docs/gallery/artifacts/agent-tool-call.workflow.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4490,9 +4505,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7527,6 +7542,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7578,6 +7596,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7711,7 +7733,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7778,6 +7800,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12739,7 +12768,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/artifacts/async-job-roundtrip.sequence.html b/docs/gallery/artifacts/async-job-roundtrip.sequence.htmlindex 87eefe7c..e0ea387d 100644--- a/docs/gallery/artifacts/async-job-roundtrip.sequence.html+++ b/docs/gallery/artifacts/async-job-roundtrip.sequence.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4480,9 +4495,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7514,6 +7529,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7565,6 +7583,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7698,7 +7720,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7765,6 +7787,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12726,7 +12755,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/artifacts/cache-miss.sequence.html b/docs/gallery/artifacts/cache-miss.sequence.htmlindex 54a90414..8870991e 100644--- a/docs/gallery/artifacts/cache-miss.sequence.html+++ b/docs/gallery/artifacts/cache-miss.sequence.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4464,9 +4479,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7498,6 +7513,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7549,6 +7567,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7682,7 +7704,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7749,6 +7771,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12710,7 +12739,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/artifacts/deployment-release.lifecycle.html b/docs/gallery/artifacts/deployment-release.lifecycle.htmlindex 94267e2d..347a7b46 100644--- a/docs/gallery/artifacts/deployment-release.lifecycle.html+++ b/docs/gallery/artifacts/deployment-release.lifecycle.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4427,9 +4442,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7461,6 +7476,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7512,6 +7530,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7645,7 +7667,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7712,6 +7734,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12673,7 +12702,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/artifacts/event-stream.dataflow.html b/docs/gallery/artifacts/event-stream.dataflow.htmlindex 3a0a9f5c..cdc01fc0 100644--- a/docs/gallery/artifacts/event-stream.dataflow.html+++ b/docs/gallery/artifacts/event-stream.dataflow.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4499,9 +4514,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7533,6 +7548,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7584,6 +7602,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7717,7 +7739,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7784,6 +7806,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12745,7 +12774,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/artifacts/incident-response.workflow.html b/docs/gallery/artifacts/incident-response.workflow.htmlindex d61af1d8..d6225c64 100644--- a/docs/gallery/artifacts/incident-response.workflow.html+++ b/docs/gallery/artifacts/incident-response.workflow.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4462,9 +4477,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7496,6 +7511,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7547,6 +7565,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7680,7 +7702,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7747,6 +7769,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12708,7 +12737,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/artifacts/product-analytics.dataflow.html b/docs/gallery/artifacts/product-analytics.dataflow.htmlindex 06d771a1..c56e196d 100644--- a/docs/gallery/artifacts/product-analytics.dataflow.html+++ b/docs/gallery/artifacts/product-analytics.dataflow.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4460,9 +4475,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7494,6 +7509,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7545,6 +7563,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7678,7 +7700,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7745,6 +7767,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12706,7 +12735,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/artifacts/production-deployment.architecture.html b/docs/gallery/artifacts/production-deployment.architecture.htmlindex 3a3f0e57..320c6510 100644--- a/docs/gallery/artifacts/production-deployment.architecture.html+++ b/docs/gallery/artifacts/production-deployment.architecture.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4488,9 +4503,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7522,6 +7537,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7573,6 +7591,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7706,7 +7728,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7773,6 +7795,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12734,7 +12763,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/artifacts/release-delivery.workflow.html b/docs/gallery/artifacts/release-delivery.workflow.htmlindex 07132d99..6024d5d2 100644--- a/docs/gallery/artifacts/release-delivery.workflow.html+++ b/docs/gallery/artifacts/release-delivery.workflow.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4462,9 +4477,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7496,6 +7511,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7547,6 +7565,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7680,7 +7702,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7747,6 +7769,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12708,7 +12737,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/artifacts/web-app.architecture.html b/docs/gallery/artifacts/web-app.architecture.htmlindex b7ff6aea..249dcf76 100644--- a/docs/gallery/artifacts/web-app.architecture.html+++ b/docs/gallery/artifacts/web-app.architecture.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4431,9 +4446,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7463,6 +7478,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7514,6 +7532,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7647,7 +7669,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7714,6 +7736,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12675,7 +12704,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/docs/gallery/manifest.json b/docs/gallery/manifest.jsonindex f1bf8bf6..081e477c 100644--- a/docs/gallery/manifest.json+++ b/docs/gallery/manifest.json@@ -27,8 +27,8 @@"engineeringProfile": null,"nodeCount": 12,"edgeCount": 11,- "artifactBytes": 598332,- "artifactSha256": "541402cac74cad242e40efb982b3a817a4cbc00537a7eb72244aa3291b81b3af",+ "artifactBytes": 599563,+ "artifactSha256": "1d2c610f94a26066ec3ee88b65dabebb6c311eac77f2fd550e7ee592a418935b","sourceBytes": 6470,"sourceSha256": "a3afc6b30044eb256aa15c6195ddfbbcd1a14880d99967ed5605bc621ffb7e5f","checks": [@@ -125,8 +125,8 @@"engineeringProfile": "deployment-ownership","nodeCount": 12,"edgeCount": 12,- "artifactBytes": 598656,- "artifactSha256": "3a8d12813da45b465f3f633a8c4341760e300d10961768274511c2203b331e0b",+ "artifactBytes": 599887,+ "artifactSha256": "f8a5330cdbcdf2bc1726130bb713eba2a25df0911f74fdf0afefab440b844d65","sourceBytes": 5546,"sourceSha256": "03e647d057eb20d99f7fb4ba4ddfdd5d58a7a813865338680e968038e6a90e0f","checks": [@@ -223,8 +223,8 @@"engineeringProfile": null,"nodeCount": 7,"edgeCount": 12,- "artifactBytes": 591979,- "artifactSha256": "89a81e1c53f374896dec38fc514719fc836a91d6ed06bde014ddb60b8bb7b6f2",+ "artifactBytes": 593210,+ "artifactSha256": "f962d3fade853706aa139e5d3b177cd5f6c828ca1a5adcbc73275a36558a7db6","sourceBytes": 4442,"sourceSha256": "30098d81006a18813bab447da698edf74604a1463770f01dc056b0af8cb314ef","checks": [@@ -321,8 +321,8 @@"engineeringProfile": null,"nodeCount": 10,"edgeCount": 10,- "artifactBytes": 594598,- "artifactSha256": "299191550368a8321aadd4fd8456c8dd20beb4a8542bfcd602a1830d8cea4e2c",+ "artifactBytes": 595829,+ "artifactSha256": "c1a2452bf972d419c21d73c9e52a6b11cf31f858968c9a31318fefa8968d816a","sourceBytes": 5256,"sourceSha256": "44aa56ac6ca807937dfe84a6404e8b07d6394a38ae2ac53248a1985337dfd671","checks": [@@ -419,8 +419,8 @@"engineeringProfile": null,"nodeCount": 11,"edgeCount": 10,- "artifactBytes": 594456,- "artifactSha256": "53e3f088286e37edd904323bc91cc706ac7303e8abf3528f63c5f7ac32e3917f",+ "artifactBytes": 595687,+ "artifactSha256": "8acce7ad866fb0131946597baf5a930519e9a8eeec32606dc6f4eb4de70cd45b","sourceBytes": 5471,"sourceSha256": "9beb8698b275679a2fc92d4b51288cd5b5fc2115696d06b9168f3d7fef253a72","checks": [@@ -517,8 +517,8 @@"engineeringProfile": null,"nodeCount": 10,"edgeCount": 10,- "artifactBytes": 595989,- "artifactSha256": "75c1f57bcf2791e5839893559d47faa9fdf2369882b137204ac5895367b3e7df",+ "artifactBytes": 597220,+ "artifactSha256": "4e264398550c1f93939099d7cc0bac6bb518a6726739f17afc6ebb82b50ab63d","sourceBytes": 5719,"sourceSha256": "f71c89288f80255bdedcdc0057bcbc155d1d8b1b7476d024b35f4e27c730c974","checks": [@@ -615,8 +615,8 @@"engineeringProfile": null,"nodeCount": 7,"edgeCount": 14,- "artifactBytes": 592764,- "artifactSha256": "2c6a5da1a2c0ca24451843a183734030e8fd25819ebedc3292034d7905983f70",+ "artifactBytes": 593995,+ "artifactSha256": "bdf196bc9c1ea2ab7212c8d866c27c1d1459e8e2501a6f91d7f18b679d49e939","sourceBytes": 4483,"sourceSha256": "1b53d7c4ce7b2d8f6f40b8f33a394abe1d37fc991272b534c1ccd0255920ab52","checks": [@@ -713,8 +713,8 @@"engineeringProfile": null,"nodeCount": 12,"edgeCount": 12,- "artifactBytes": 599944,- "artifactSha256": "392e31bcfa3897af68da48debc3f2cf347aa594022f24fc08327c6488c5ba975",+ "artifactBytes": 601175,+ "artifactSha256": "6e1d488d514c6ffc9196d571742b4fba5556736b3036f33cdcfe35bc020e7c61","sourceBytes": 5543,"sourceSha256": "bbfedc2f1b73bf50932490f7f56d45d5f853e970d2fab26660a04947a783969c","checks": [@@ -811,8 +811,8 @@"engineeringProfile": null,"nodeCount": 10,"edgeCount": 5,- "artifactBytes": 588934,- "artifactSha256": "af5632d9d34bce1f5c74eb61c4077b24441f1d88d02ea4498dfcc8e48855571d",+ "artifactBytes": 590165,+ "artifactSha256": "fdacc3ca6015b8c91ed959506a452b13f056cb4e8663f02fbc191662d3901568","sourceBytes": 4353,"sourceSha256": "1d6b34282e014cb2730662b1993158ec67bc0ad2a40520cb441aaee1ad21e4c6","checks": [@@ -909,8 +909,8 @@"engineeringProfile": null,"nodeCount": 11,"edgeCount": 6,- "artifactBytes": 590311,- "artifactSha256": "29eb7cdde5ff9d1bb1cb749afeba91a72fa242cc2717d4ece9ca16d2b3676ab9",+ "artifactBytes": 591542,+ "artifactSha256": "a361eb22a826aa7f68bdd5b7700937ce6d64c19cb9652d7a463ea35f046d4b26","sourceBytes": 4394,"sourceSha256": "aa614f0c9a82f210e301e382f362dfbd7f290bda4d5501de3c99a6cd81b4c0a4","checks": [@@ -1007,8 +1007,8 @@"engineeringProfile": null,"nodeCount": 10,"edgeCount": 9,- "artifactBytes": 589943,- "artifactSha256": "55200146c277dadc2507b14b92df67cfaf35329f48e01912c30e369b241b352d",+ "artifactBytes": 591174,+ "artifactSha256": "8330120204a41cbaca136d9e648927d08147364d93cc3a1436bac07e35b65349","sourceBytes": 3863,"sourceSha256": "01567b5e49cad5139baa071533a028d22f0e80fedfb49095e0d9330aee7f87db","checks": [diff --git a/examples/dataflow-product-analytics.html b/examples/dataflow-product-analytics.htmlindex 06d771a1..c56e196d 100644--- a/examples/dataflow-product-analytics.html+++ b/examples/dataflow-product-analytics.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4460,9 +4475,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7494,6 +7509,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7545,6 +7563,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7678,7 +7700,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7745,6 +7767,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12706,7 +12735,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/examples/lifecycle-agent-run.html b/examples/lifecycle-agent-run.htmlindex dddd6769..f64b98f2 100644--- a/examples/lifecycle-agent-run.html+++ b/examples/lifecycle-agent-run.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4413,9 +4428,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7447,6 +7462,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7498,6 +7516,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7631,7 +7653,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7698,6 +7720,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12659,7 +12688,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/examples/sequence-cache-miss-request.html b/examples/sequence-cache-miss-request.htmlindex 54a90414..8870991e 100644--- a/examples/sequence-cache-miss-request.html+++ b/examples/sequence-cache-miss-request.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4464,9 +4479,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7498,6 +7513,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7549,6 +7567,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7682,7 +7704,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7749,6 +7771,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12710,7 +12739,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/examples/web-app-rendered.html b/examples/web-app-rendered.htmlindex b7ff6aea..249dcf76 100644--- a/examples/web-app-rendered.html+++ b/examples/web-app-rendered.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4431,9 +4446,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7463,6 +7478,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7514,6 +7532,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7647,7 +7669,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7714,6 +7736,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12675,7 +12704,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/examples/web-app.html b/examples/web-app.htmlindex b7ff6aea..249dcf76 100644--- a/examples/web-app.html+++ b/examples/web-app.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4431,9 +4446,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7463,6 +7478,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7514,6 +7532,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7647,7 +7669,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7714,6 +7736,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12675,7 +12704,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();diff --git a/examples/workflow-agent-tool-call-rendered.html b/examples/workflow-agent-tool-call-rendered.htmlindex d6e039b4..6c2cfaa5 100644--- a/examples/workflow-agent-tool-call-rendered.html+++ b/examples/workflow-agent-tool-call-rendered.html@@ -1354,10 +1354,25 @@.relationship-lens-actions {display: flex;flex-direction: column;- align-items: stretch;+ align-items: flex-end;gap: 0.18rem;}.relationship-lens-actions button { white-space: nowrap; }+ .relationship-lens-actions #btn-focus-clear {+ display: grid;+ width: 1.75rem;+ height: 1.75rem;+ padding: 0;+ place-items: center;+ color: var(--text-muted);+ font-size: 1rem;+ line-height: 1;+ }+ .relationship-lens-actions #btn-focus-clear:hover,+ .relationship-lens-actions #btn-focus-clear:focus-visible {+ background: var(--toolbar-hover);+ color: var(--text);+ }.relationship-lens-actions #btn-focus-copy { color: var(--frontend-stroke); }.relationship-lens-actions #btn-focus-relations { display: none; }.relationship-lens-eyebrow {@@ -4490,9 +4505,9 @@</div></div><div class="relationship-lens-actions">+ <button id="btn-focus-clear" type="button" aria-label="Close semantic passport" title="Close">×</button><button id="btn-focus-copy" type="button" aria-label="Copy link to focused node">Copy link</button><button id="btn-focus-relations" type="button" aria-label="Show connected relationships" aria-expanded="false" aria-controls="relationship-lens-list">Relations</button>- <button id="btn-focus-clear" type="button" aria-label="Clear focused node">Clear</button></div></div><div class="relationship-lens-list" id="relationship-lens-list" aria-label="Connected relationships"></div>@@ -7527,6 +7542,9 @@}function clear(options) {options = options || {};+ var restoreNode = options.restoreFocus === true && activeIds.length === 1+ ? svg.querySelector('[data-node-id="' + activeIds[0] + '"]')+ : null;clearReachability({ updateUrl: false });if (Archify.intentTrace && typeof Archify.intentTrace.clear === 'function') {Archify.intentTrace.clear({ announce: false });@@ -7578,6 +7596,10 @@if (options.updateUrl !== false) {try { history.replaceState(null, '', location.pathname + location.search); } catch (_) {}}+ if (restoreNode) {+ try { restoreNode.focus({ preventScroll: true }); }+ catch (_) { try { restoreNode.focus(); } catch (_) {} }+ }}function setMany(ids, options) {@@ -7711,7 +7733,7 @@Archify.view.reveal([id], { includeNeighbors: true, reason: 'focus' });}});- clearBtn.addEventListener('click', function () { clear(); });+ clearBtn.addEventListener('click', function () { clear({ restoreFocus: true }); });copyBtn.addEventListener('click', copyFocusLink);upstreamBtn.addEventListener('click', function () { applyReachability('upstream'); });downstreamBtn.addEventListener('click', function () { applyReachability('downstream'); });@@ -7778,6 +7800,13 @@event.preventDefault();buttons[index].focus();});+ document.addEventListener('click', function (event) {+ var target = event.target;+ if (chip.hidden || !target || typeof target.closest !== 'function' || chip.contains(target)) return;+ if (container.getAttribute('data-just-panned') === 'true') return;+ if (target.closest('[data-node-id], [data-relationship-hit-key]')) return;+ clear();+ }, true);window.addEventListener('scroll', requestLensPlacement, { passive: true });window.addEventListener('resize', requestLensPlacement);container.addEventListener('scroll', requestLensPlacement, { passive: true });@@ -12739,7 +12768,7 @@Archify.intentTrace.clear();} else if (e.key === 'Escape' && Archify.focus.active()) {e.preventDefault();- Archify.focus.clear();+ Archify.focus.clear({ restoreFocus: true });} else if (e.key === 'Escape' && Archify.presentation.active()) {e.preventDefault();Archify.presentation.exit();