Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

chore(viewer): merge current upstream and refresh reading-address artifacts

HengYang0d74b39e5974
diff --cc archify.zip
index c7eebd55,b8c9b1ff..acb01ed4
Binary files differ
diff --cc archify/examples/class-payment-processors-rendered.html
index 94e423ca,488cec31..21a15c86
--- a/archify/examples/class-payment-processors-rendered.html
+++ b/archify/examples/class-payment-processors-rendered.html
@@@ -9192,11 -9172,13 +9192,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13126,11 -13108,26 +13125,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13782,13 -13779,28 +13780,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/class-payments-rendered.html
index e17e5084,7802891e..a6b34c98
--- a/archify/examples/class-payments-rendered.html
+++ b/archify/examples/class-payments-rendered.html
@@@ -8998,11 -8978,13 +8998,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -12932,11 -12914,26 +12931,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13588,13 -13585,28 +13586,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/dataflow-product-analytics.html
index 443c5d5d,437e87a7..17019cd8
--- a/archify/examples/dataflow-product-analytics.html
+++ b/archify/examples/dataflow-product-analytics.html
@@@ -9112,11 -9092,13 +9112,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13046,11 -13028,26 +13045,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13702,13 -13699,28 +13700,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/erd-orders-rendered.html
index fafeee21,78c7990f..4ac13329
--- a/archify/examples/erd-orders-rendered.html
+++ b/archify/examples/erd-orders-rendered.html
@@@ -9280,11 -9260,13 +9280,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13214,11 -13196,26 +13213,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13870,13 -13867,28 +13868,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/lifecycle-agent-run.html
index 3b216b5c,5b02faa9..d1ac1c12
--- a/archify/examples/lifecycle-agent-run.html
+++ b/archify/examples/lifecycle-agent-run.html
@@@ -9124,11 -9104,13 +9124,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13058,11 -13040,26 +13057,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13714,13 -13711,28 +13712,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/sequence-cache-miss-request.html
index 0aa1f5bf,4f9b0053..3916d23e
--- a/archify/examples/sequence-cache-miss-request.html
+++ b/archify/examples/sequence-cache-miss-request.html
@@@ -9127,11 -9107,13 +9127,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13061,11 -13043,26 +13060,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13717,13 -13714,28 +13715,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/subscription-billing-rendered.html
index c3c07828,cff69324..4f4eedac
--- a/archify/examples/subscription-billing-rendered.html
+++ b/archify/examples/subscription-billing-rendered.html
@@@ -9504,11 -9484,13 +9504,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13438,11 -13420,26 +13437,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -14094,13 -14091,28 +14092,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/timeline-archify-dev-activity-rendered.html
index 40f11bf7,c666106b..b530c510
--- a/archify/examples/timeline-archify-dev-activity-rendered.html
+++ b/archify/examples/timeline-archify-dev-activity-rendered.html
@@@ -9204,11 -9184,13 +9204,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13138,11 -13120,26 +13137,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13794,13 -13791,28 +13792,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/timeline-payment-incident-rendered.html
index 7624f80b,3ff01ea0..1f0203a2
--- a/archify/examples/timeline-payment-incident-rendered.html
+++ b/archify/examples/timeline-payment-incident-rendered.html
@@@ -8989,11 -8969,13 +8989,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -12923,11 -12905,26 +12922,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13579,13 -13576,28 +13577,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/tree-archify-repository-rendered.html
index 877b2bf1,62ffcda4..adcd3876
--- a/archify/examples/tree-archify-repository-rendered.html
+++ b/archify/examples/tree-archify-repository-rendered.html
@@@ -9223,11 -9203,13 +9223,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13157,11 -13139,26 +13156,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13813,13 -13810,28 +13811,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/tree-payment-platform-rendered.html
index c8950b8e,44f06a4c..0bfde931
--- a/archify/examples/tree-payment-platform-rendered.html
+++ b/archify/examples/tree-payment-platform-rendered.html
@@@ -9004,11 -8984,13 +9004,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -12938,11 -12920,26 +12937,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13594,13 -13591,28 +13592,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/waterfall-checkout-request-rendered.html
index eed940d6,6993c2c2..b3c9ebb1
--- a/archify/examples/waterfall-checkout-request-rendered.html
+++ b/archify/examples/waterfall-checkout-request-rendered.html
@@@ -8986,11 -8966,13 +8986,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -12920,11 -12902,26 +12919,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13576,13 -13573,28 +13574,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/waterfall-example-rebuild-rendered.html
index b2ec2e50,95fd0e39..8c1394a5
--- a/archify/examples/waterfall-example-rebuild-rendered.html
+++ b/archify/examples/waterfall-example-rebuild-rendered.html
@@@ -9172,11 -9152,13 +9172,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13106,11 -13088,26 +13105,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13762,13 -13759,28 +13760,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/web-app-rendered.html
index f03d3eed,36109bfb..4ba0379c
--- a/archify/examples/web-app-rendered.html
+++ b/archify/examples/web-app-rendered.html
@@@ -9100,11 -9080,13 +9100,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13034,11 -13016,26 +13033,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13690,13 -13687,28 +13688,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc archify/examples/workflow-agent-tool-call-rendered.html
index a13f2c4b,a93c4804..90bbd1a4
--- a/archify/examples/workflow-agent-tool-call-rendered.html
+++ b/archify/examples/workflow-agent-tool-call-rendered.html
@@@ -9118,11 -9098,13 +9118,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13052,11 -13034,26 +13051,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13708,13 -13705,28 +13706,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/assets/archify-live-proof.gif
index a7fdf89b,c005faa1..1dd8ef14
Binary files differ
diff --cc docs/assets/archify-live-proof.json
index 5054a08f,7b674250..cbaecc60
--- a/docs/assets/archify-live-proof.json
+++ b/docs/assets/archify-live-proof.json
@@@ -7,13 -7,13 +7,13 @@@
"fps": 10,
"frameCount": 54,
"durationSeconds": 5.4,
- "bytes": 868639,
- "sha256": "2885d8ab7045da17828dbc17850282ff5548cfeffe9b41828d4645dcf3b3d7b4",
- "bytes": 847102,
- "sha256": "af374a1d12b12ac4fbc1b29d35f9dcf966c2ac31889c76f9ca3abfdb50d4abee",
++ "bytes": 847058,
++ "sha256": "490854af3fac8495e2c2e04a6a0f58f4d04a81435f19a6f3d16de50ee453ecc3",
"scenes": [
{
"id": "signal-flow",
"artifact": "docs/gallery/artifacts/agent-tool-call.workflow.html",
- "artifactSha256": "458acc37f5550a1a7d069cfdd3877b3dbed9f2fc643fe694b9d8f929e90323c5",
- "artifactSha256": "23e174e48a9c29eb3d5e682df80fbcb6a6ebc8b6eccc7ad5dca0915124648e7b",
++ "artifactSha256": "890cde95bf3d9653f10fd2ad502c0a9c70ce9ed0cd536a6aa04d7e7f80ddc4ab",
"hash": "#focus=planner&reach=downstream",
"eyebrow": "WORKFLOW · SIGNAL FLOW",
"title": "Agent Tool Call",
@@@ -22,7 -22,7 +22,7 @@@
{
"id": "blueprint",
"artifact": "docs/gallery/artifacts/production-deployment.architecture.html",
- "artifactSha256": "4bfe4af6b202c37dc43db759bc3fd4e1d83faf404bcec77d45cdc08cbfdd4858",
- "artifactSha256": "f9b6df7f1da6f71a292ab88a7579fd7522fda80bce1bb0f756efe54e9b4acb52",
++ "artifactSha256": "2a2d8583dc0648087c12345caa06d5cc18e11e8109d8279098f4d5f509b5bdfc",
"hash": "#lens=backend~database",
"eyebrow": "ARCHITECTURE · BLUEPRINT",
"title": "Production Deployment",
@@@ -31,7 -31,7 +31,7 @@@
{
"id": "classic",
"artifact": "docs/gallery/artifacts/cache-miss.sequence.html",
- "artifactSha256": "e3ea1dc1699e88620669a65744ea84ef5adc701ca86dc8374d77f3c2b1528e3c",
- "artifactSha256": "5a3481c7ce649ab276c812fe6ad6ca9cd0ec80944cb2c7f354e02707670104b7",
++ "artifactSha256": "82dfd97037b787942c5f6647501eb8f30a55087ccdd9e1bdf5322c5a513a5add",
"hash": "#route=web~db",
"eyebrow": "SEQUENCE · CLASSIC",
"title": "Cache Miss Request",
diff --cc docs/gallery.html
index bf8a029c,ef28f67d..2077e102
--- a/docs/gallery.html
+++ b/docs/gallery.html
@@@ -302,7 -302,7 +302,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="458acc37f5550a1a7d069cfdd3877b3dbed9f2fc643fe694b9d8f929e90323c5">458acc37f555</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="23e174e48a9c29eb3d5e682df80fbcb6a6ebc8b6eccc7ad5dca0915124648e7b">23e174e48a9c</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="890cde95bf3d9653f10fd2ad502c0a9c70ce9ed0cd536a6aa04d7e7f80ddc4ab">890cde95bf3d</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/agent-tool-call.workflow.html#focus=planner" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -332,7 -332,7 +332,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="4bfe4af6b202c37dc43db759bc3fd4e1d83faf404bcec77d45cdc08cbfdd4858">4bfe4af6b202</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="f9b6df7f1da6f71a292ab88a7579fd7522fda80bce1bb0f756efe54e9b4acb52">f9b6df7f1da6</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="2a2d8583dc0648087c12345caa06d5cc18e11e8109d8279098f4d5f509b5bdfc">2a2d8583dc06</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/production-deployment.architecture.html#focus=gateway" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -361,7 -361,7 +361,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="e3ea1dc1699e88620669a65744ea84ef5adc701ca86dc8374d77f3c2b1528e3c">e3ea1dc1699e</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="5a3481c7ce649ab276c812fe6ad6ca9cd0ec80944cb2c7f354e02707670104b7">5a3481c7ce64</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="82dfd97037b787942c5f6647501eb8f30a55087ccdd9e1bdf5322c5a513a5add">82dfd97037b7</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/cache-miss.sequence.html#focus=redis" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -390,7 -390,7 +390,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="02e659c1524f28836769179bba59cf355607ad6141c20250772083a7e205ad30">02e659c1524f</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="37988d97b59899bfefcbf87d5004a4eacef5abda48298813c10aab65d1de0ead">37988d97b598</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="c8ec4bcd95244d7b8063316419a398844bb1a2abf5743f9444414dac09ee87eb">c8ec4bcd9524</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/release-delivery.workflow.html#focus=approval" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -419,7 -419,7 +419,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="bbfa1e00b9532f57086ee6421ab497e2fb276bbf35e892c50390f01e219bb6ac">bbfa1e00b953</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="a138695070035204c2f86452d28107117fba0ba282fa8e452d5e4069399974ce">a13869507003</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="b5b28e834fa9203a5184f4d329725dc5e7f7f49979876975c53eaa6a61c9bafd">b5b28e834fa9</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/incident-response.workflow.html#focus=triage" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -448,7 -448,7 +448,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="7db07557dca0b5325deb265338fca78ed6599f1129a76cbab089c71bcb95fa08">7db07557dca0</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="b34eb24c6efb95d30c553de3408d67bdaf701b5e29c8460d1743e65a524101c3">b34eb24c6efb</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="11bd8d99510da7cd9e2f15e4ff2f375db3528240744f2b0e97da7786111dccc4">11bd8d99510d</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/product-analytics.dataflow.html#focus=consent" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -477,7 -477,7 +477,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="ebee9a4ea0f423d796bade6666580a820d7a329671a32cf36c647a143fdf7646">ebee9a4ea0f4</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="deee38ce18d5c4e40f4a1a89f437e17b466f74b8e2d884d1b175dea899ea2024">deee38ce18d5</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="044a027be919d9eec6773d0632ad265d405deb25d97530651442194ac5047822">044a027be919</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/async-job-roundtrip.sequence.html#focus=queue" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -506,7 -506,7 +506,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="b9970277d577dbd0020d86c09325bb82ad9776986647fd7c3dd6852bc654ff70">b9970277d577</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="75938cbb2e17c3cde8ed2e63b2e9ad8793dc8094420076a5bc927d6b37fc0332">75938cbb2e17</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="610ab86bc45932631454f59790759412e3d058eb820bc9bf085937e3aabd0a6d">610ab86bc459</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/event-stream.dataflow.html#focus=orders" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -535,7 -535,7 +535,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 · 12E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="702ebe32c711192f6ede33157446f5a6c77f788f4338b1e1e24525ee7d5852d6">702ebe32c711</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="c752421f922941aaf84237c8389a9c614722461d56e7340205f47339a07a0d2e">c752421f9229</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="5068b0e38c53fd508d703981cb131fd64f415928f5bb25c808e3d2a9c5f0bdf0">5068b0e38c53</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/agent-run.lifecycle.html#focus=approval" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -564,7 -564,7 +564,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 · 15E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="4b4348ba4ac34fffae0f297096e63ec29a6f350b93b53db41396e2803eb86d8d">4b4348ba4ac3</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="3a8385ab976303cd612a2cd6267531f1ff884789025c8da460799989b9a1de66">3a8385ab9763</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="48db1b108d4d75582f8a53c405d7f2774004f80632ec3b012da7d8dc18b30bab">48db1b108d4d</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/deployment-release.lifecycle.html#focus=live" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -593,7 -593,7 +593,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="17c2b4247c1d55042f858782bd034804d72f7129e48bd9cd6d3b53adee2b21a0">17c2b4247c1d</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="e81cb13231b857b941f439068ca0ca200e83d068135b2c6fd4bcbcf128ec4253">e81cb13231b8</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="a9a9329f4db1dd9e113aff2b08ab6082d3eef0313eb039ef05ec9bc43c1fde03">a9a9329f4db1</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/web-app.architecture.html#focus=api" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -622,7 -622,7 +622,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">6N · 5E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="6f7c6305b8f8e8008035d44187c48e4e3ec2fb31e5602eeedb62496849ba018c">6f7c6305b8f8</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="32fb3559c4457f19f6b36cdac4c835d96e7aaa5f457d2783c62b9c7013013585">32fb3559c445</span></div>
++ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="38b55b035c26a8e45222018a19760799db6d212fc34ec68346b647ddb0540c38">38b55b035c26</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/orders.erd.html#focus=order" target="_blank" rel="noopener" data-en="Explore focus ↗" data-zh="探索聚焦路径 ↗">Explore focus ↗</a>
@@@ -701,8 -701,8 +701,8 @@@ receipt 108 checks / 12 artifacts / det
"engineeringProfile": null,
"nodeCount": 12,
"edgeCount": 11,
- "artifactBytes": 784290,
- "artifactSha256": "458acc37f5550a1a7d069cfdd3877b3dbed9f2fc643fe694b9d8f929e90323c5",
- "artifactBytes": 784775,
- "artifactSha256": "23e174e48a9c29eb3d5e682df80fbcb6a6ebc8b6eccc7ad5dca0915124648e7b",
++ "artifactBytes": 784469,
++ "artifactSha256": "890cde95bf3d9653f10fd2ad502c0a9c70ce9ed0cd536a6aa04d7e7f80ddc4ab",
"sourceBytes": 4939,
"sourceSha256": "d67965d50872c97e4ff3476271e645bf19fab6b3ab44e111bdb44b063e3aa36f",
"checks": [
@@@ -836,8 -836,8 +836,8 @@@
"engineeringProfile": "deployment-ownership",
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 787008,
- "artifactSha256": "4bfe4af6b202c37dc43db759bc3fd4e1d83faf404bcec77d45cdc08cbfdd4858",
- "artifactBytes": 787487,
- "artifactSha256": "f9b6df7f1da6f71a292ab88a7579fd7522fda80bce1bb0f756efe54e9b4acb52",
++ "artifactBytes": 787181,
++ "artifactSha256": "2a2d8583dc0648087c12345caa06d5cc18e11e8109d8279098f4d5f509b5bdfc",
"sourceBytes": 4734,
"sourceSha256": "610a5614667e8f108bdcf1769c9d7af5c3ce0fb62be3ea50550b10eb752e4bda",
"checks": [
@@@ -969,8 -969,8 +969,8 @@@
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 12,
- "artifactBytes": 778821,
- "artifactSha256": "e3ea1dc1699e88620669a65744ea84ef5adc701ca86dc8374d77f3c2b1528e3c",
- "artifactBytes": 779306,
- "artifactSha256": "5a3481c7ce649ab276c812fe6ad6ca9cd0ec80944cb2c7f354e02707670104b7",
++ "artifactBytes": 779000,
++ "artifactSha256": "82dfd97037b787942c5f6647501eb8f30a55087ccdd9e1bdf5322c5a513a5add",
"sourceBytes": 3805,
"sourceSha256": "f8486daa803fff6c295cecca4604c561fbbf9acb2e83326022b5a87639e8afe6",
"checks": [
@@@ -1103,8 -1103,8 +1103,8 @@@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 779794,
- "artifactSha256": "02e659c1524f28836769179bba59cf355607ad6141c20250772083a7e205ad30",
- "artifactBytes": 780283,
- "artifactSha256": "37988d97b59899bfefcbf87d5004a4eacef5abda48298813c10aab65d1de0ead",
++ "artifactBytes": 779977,
++ "artifactSha256": "c8ec4bcd95244d7b8063316419a398844bb1a2abf5743f9444414dac09ee87eb",
"sourceBytes": 4510,
"sourceSha256": "dbd5c174af66296caec372e7214cf4df7158b50a563508e16826b95ab8d1cd6c",
"checks": [
@@@ -1243,8 -1243,8 +1243,8 @@@
"engineeringProfile": null,
"nodeCount": 11,
"edgeCount": 10,
- "artifactBytes": 777114,
- "artifactSha256": "bbfa1e00b9532f57086ee6421ab497e2fb276bbf35e892c50390f01e219bb6ac",
- "artifactBytes": 777603,
- "artifactSha256": "a138695070035204c2f86452d28107117fba0ba282fa8e452d5e4069399974ce",
++ "artifactBytes": 777297,
++ "artifactSha256": "b5b28e834fa9203a5184f4d329725dc5e7f7f49979876975c53eaa6a61c9bafd",
"sourceBytes": 4723,
"sourceSha256": "630be98449925d2716ecb8439f404b2bff5fe65ba905b0ad0baea6d96890c526",
"checks": [
@@@ -1429,8 -1429,8 +1429,8 @@@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 781116,
- "artifactSha256": "7db07557dca0b5325deb265338fca78ed6599f1129a76cbab089c71bcb95fa08",
- "artifactBytes": 781595,
- "artifactSha256": "b34eb24c6efb95d30c553de3408d67bdaf701b5e29c8460d1743e65a524101c3",
++ "artifactBytes": 781289,
++ "artifactSha256": "11bd8d99510da7cd9e2f15e4ff2f375db3528240744f2b0e97da7786111dccc4",
"sourceBytes": 5035,
"sourceSha256": "8a635db9e51a5b1a8d2955b9d66f5b9a450e0a298432ce8f2e2f0be11f372e05",
"checks": [
@@@ -1564,8 -1564,8 +1564,8 @@@
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 14,
- "artifactBytes": 779167,
- "artifactSha256": "ebee9a4ea0f423d796bade6666580a820d7a329671a32cf36c647a143fdf7646",
- "artifactBytes": 779652,
- "artifactSha256": "deee38ce18d5c4e40f4a1a89f437e17b466f74b8e2d884d1b175dea899ea2024",
++ "artifactBytes": 779346,
++ "artifactSha256": "044a027be919d9eec6773d0632ad265d405deb25d97530651442194ac5047822",
"sourceBytes": 3766,
"sourceSha256": "b8c6c52f1763ede2933c77deb8da59b3e06917bc41d27e66df896136456b859a",
"checks": [
@@@ -1716,8 -1716,8 +1716,8 @@@
"engineeringProfile": null,
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 785036,
- "artifactSha256": "b9970277d577dbd0020d86c09325bb82ad9776986647fd7c3dd6852bc654ff70",
- "artifactBytes": 785515,
- "artifactSha256": "75938cbb2e17c3cde8ed2e63b2e9ad8793dc8094420076a5bc927d6b37fc0332",
++ "artifactBytes": 785209,
++ "artifactSha256": "610ab86bc45932631454f59790759412e3d058eb820bc9bf085937e3aabd0a6d",
"sourceBytes": 4769,
"sourceSha256": "3bdd77674282009c7c68d588cf8a3c495bc98a3be1b9c45327fd1801a6f83a23",
"checks": [
@@@ -1868,8 -1868,8 +1868,8 @@@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 12,
- "artifactBytes": 785203,
- "artifactSha256": "702ebe32c711192f6ede33157446f5a6c77f788f4338b1e1e24525ee7d5852d6",
- "artifactBytes": 785661,
- "artifactSha256": "c752421f922941aaf84237c8389a9c614722461d56e7340205f47339a07a0d2e",
++ "artifactBytes": 785355,
++ "artifactSha256": "5068b0e38c53fd508d703981cb131fd64f415928f5bb25c808e3d2a9c5f0bdf0",
"sourceBytes": 3260,
"sourceSha256": "5ba36f5ce91ed428cb48b599e275424916d82b619b9a3231cbd1bbc3966fc54b",
"checks": [
@@@ -1990,8 -1990,8 +1990,8 @@@
"engineeringProfile": null,
"nodeCount": 12,
"edgeCount": 15,
- "artifactBytes": 791979,
- "artifactSha256": "4b4348ba4ac34fffae0f297096e63ec29a6f350b93b53db41396e2803eb86d8d",
- "artifactBytes": 792430,
- "artifactSha256": "3a8385ab976303cd612a2cd6267531f1ff884789025c8da460799989b9a1de66",
++ "artifactBytes": 792124,
++ "artifactSha256": "48db1b108d4d75582f8a53c405d7f2774004f80632ec3b012da7d8dc18b30bab",
"sourceBytes": 4155,
"sourceSha256": "e3dc105d03c1c9881160006cdace23cb5d8533803e337caf0ec287c64e775275",
"checks": [
@@@ -2112,8 -2112,8 +2112,8 @@@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 9,
- "artifactBytes": 779547,
- "artifactSha256": "17c2b4247c1d55042f858782bd034804d72f7129e48bd9cd6d3b53adee2b21a0",
- "artifactBytes": 780026,
- "artifactSha256": "e81cb13231b857b941f439068ca0ca200e83d068135b2c6fd4bcbcf128ec4253",
++ "artifactBytes": 779720,
++ "artifactSha256": "a9a9329f4db1dd9e113aff2b08ab6082d3eef0313eb039ef05ec9bc43c1fde03",
"sourceBytes": 3197,
"sourceSha256": "95e051b27a9e4a3307e194c0f666fca4af51470be7e2228d400ff48aea5b353b",
"checks": [
@@@ -2258,8 -2258,8 +2258,8 @@@
"engineeringProfile": null,
"nodeCount": 6,
"edgeCount": 5,
- "artifactBytes": 793764,
- "artifactSha256": "6f7c6305b8f8e8008035d44187c48e4e3ec2fb31e5602eeedb62496849ba018c",
- "artifactBytes": 794243,
- "artifactSha256": "32fb3559c4457f19f6b36cdac4c835d96e7aaa5f457d2783c62b9c7013013585",
++ "artifactBytes": 793937,
++ "artifactSha256": "38b55b035c26a8e45222018a19760799db6d212fc34ec68346b647ddb0540c38",
"sourceBytes": 7321,
"sourceSha256": "1777a374647084466f4d7ce3a968004be6ab70ac9cf82459b96bed7c556cdfdd",
"checks": [
diff --cc docs/gallery/artifacts/agent-run.lifecycle.html
index 3b216b5c,5b02faa9..d1ac1c12
--- a/docs/gallery/artifacts/agent-run.lifecycle.html
+++ b/docs/gallery/artifacts/agent-run.lifecycle.html
@@@ -9124,11 -9104,13 +9124,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13058,11 -13040,26 +13057,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13714,13 -13711,28 +13712,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/agent-tool-call.workflow.html
index a13f2c4b,a93c4804..90bbd1a4
--- a/docs/gallery/artifacts/agent-tool-call.workflow.html
+++ b/docs/gallery/artifacts/agent-tool-call.workflow.html
@@@ -9118,11 -9098,13 +9118,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13052,11 -13034,26 +13051,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13708,13 -13705,28 +13706,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/async-job-roundtrip.sequence.html
index 3685d695,b387af92..3434b7bf
--- a/docs/gallery/artifacts/async-job-roundtrip.sequence.html
+++ b/docs/gallery/artifacts/async-job-roundtrip.sequence.html
@@@ -9139,11 -9119,13 +9139,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13073,11 -13055,26 +13072,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13729,13 -13726,28 +13727,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/cache-miss.sequence.html
index 0aa1f5bf,4f9b0053..3916d23e
--- a/docs/gallery/artifacts/cache-miss.sequence.html
+++ b/docs/gallery/artifacts/cache-miss.sequence.html
@@@ -9127,11 -9107,13 +9127,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13061,11 -13043,26 +13060,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13717,13 -13714,28 +13715,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/deployment-release.lifecycle.html
index ab10fc08,79b8f338..f44809a4
--- a/docs/gallery/artifacts/deployment-release.lifecycle.html
+++ b/docs/gallery/artifacts/deployment-release.lifecycle.html
@@@ -9188,11 -9168,13 +9188,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13122,11 -13104,26 +13121,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13778,13 -13775,28 +13776,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/event-stream.dataflow.html
index c54c0435,6cf2c2a2..ff30d332
--- a/docs/gallery/artifacts/event-stream.dataflow.html
+++ b/docs/gallery/artifacts/event-stream.dataflow.html
@@@ -9151,11 -9131,13 +9151,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13085,11 -13067,26 +13084,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13741,13 -13738,28 +13739,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/incident-response.workflow.html
index a8498508,c16316b8..f0e256fa
--- a/docs/gallery/artifacts/incident-response.workflow.html
+++ b/docs/gallery/artifacts/incident-response.workflow.html
@@@ -9078,11 -9058,13 +9078,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13012,11 -12994,26 +13011,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13668,13 -13665,28 +13666,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/orders.erd.html
index fafeee21,78c7990f..4ac13329
--- a/docs/gallery/artifacts/orders.erd.html
+++ b/docs/gallery/artifacts/orders.erd.html
@@@ -9280,11 -9260,13 +9280,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13214,11 -13196,26 +13213,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13870,13 -13867,28 +13868,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/product-analytics.dataflow.html
index 443c5d5d,437e87a7..17019cd8
--- a/docs/gallery/artifacts/product-analytics.dataflow.html
+++ b/docs/gallery/artifacts/product-analytics.dataflow.html
@@@ -9112,11 -9092,13 +9112,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13046,11 -13028,26 +13045,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13702,13 -13699,28 +13700,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/production-deployment.architecture.html
index 530df0a3,aee0fdf7..3a7fa053
--- a/docs/gallery/artifacts/production-deployment.architecture.html
+++ b/docs/gallery/artifacts/production-deployment.architecture.html
@@@ -9155,11 -9135,13 +9155,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13089,11 -13071,26 +13088,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13745,13 -13742,28 +13743,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/release-delivery.workflow.html
index baca4aef,051b42b7..31b68fba
--- a/docs/gallery/artifacts/release-delivery.workflow.html
+++ b/docs/gallery/artifacts/release-delivery.workflow.html
@@@ -9104,11 -9084,13 +9104,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13038,11 -13020,26 +13037,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13694,13 -13691,28 +13692,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/artifacts/web-app.architecture.html
index f03d3eed,36109bfb..4ba0379c
--- a/docs/gallery/artifacts/web-app.architecture.html
+++ b/docs/gallery/artifacts/web-app.architecture.html
@@@ -9100,11 -9080,13 +9100,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13034,11 -13016,26 +13033,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13690,13 -13687,28 +13688,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc docs/gallery/manifest.json
index 61ede56a,7dd3b4cf..9dffc7b0
--- a/docs/gallery/manifest.json
+++ b/docs/gallery/manifest.json
@@@ -19,8 -19,8 +19,8 @@@
"engineeringProfile": null,
"nodeCount": 12,
"edgeCount": 11,
- "artifactBytes": 784290,
- "artifactSha256": "458acc37f5550a1a7d069cfdd3877b3dbed9f2fc643fe694b9d8f929e90323c5",
- "artifactBytes": 784775,
- "artifactSha256": "23e174e48a9c29eb3d5e682df80fbcb6a6ebc8b6eccc7ad5dca0915124648e7b",
++ "artifactBytes": 784469,
++ "artifactSha256": "890cde95bf3d9653f10fd2ad502c0a9c70ce9ed0cd536a6aa04d7e7f80ddc4ab",
"sourceBytes": 4939,
"sourceSha256": "d67965d50872c97e4ff3476271e645bf19fab6b3ab44e111bdb44b063e3aa36f",
"checks": [
@@@ -154,8 -154,8 +154,8 @@@
"engineeringProfile": "deployment-ownership",
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 787008,
- "artifactSha256": "4bfe4af6b202c37dc43db759bc3fd4e1d83faf404bcec77d45cdc08cbfdd4858",
- "artifactBytes": 787487,
- "artifactSha256": "f9b6df7f1da6f71a292ab88a7579fd7522fda80bce1bb0f756efe54e9b4acb52",
++ "artifactBytes": 787181,
++ "artifactSha256": "2a2d8583dc0648087c12345caa06d5cc18e11e8109d8279098f4d5f509b5bdfc",
"sourceBytes": 4734,
"sourceSha256": "610a5614667e8f108bdcf1769c9d7af5c3ce0fb62be3ea50550b10eb752e4bda",
"checks": [
@@@ -287,8 -287,8 +287,8 @@@
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 12,
- "artifactBytes": 778821,
- "artifactSha256": "e3ea1dc1699e88620669a65744ea84ef5adc701ca86dc8374d77f3c2b1528e3c",
- "artifactBytes": 779306,
- "artifactSha256": "5a3481c7ce649ab276c812fe6ad6ca9cd0ec80944cb2c7f354e02707670104b7",
++ "artifactBytes": 779000,
++ "artifactSha256": "82dfd97037b787942c5f6647501eb8f30a55087ccdd9e1bdf5322c5a513a5add",
"sourceBytes": 3805,
"sourceSha256": "f8486daa803fff6c295cecca4604c561fbbf9acb2e83326022b5a87639e8afe6",
"checks": [
@@@ -421,8 -421,8 +421,8 @@@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 779794,
- "artifactSha256": "02e659c1524f28836769179bba59cf355607ad6141c20250772083a7e205ad30",
- "artifactBytes": 780283,
- "artifactSha256": "37988d97b59899bfefcbf87d5004a4eacef5abda48298813c10aab65d1de0ead",
++ "artifactBytes": 779977,
++ "artifactSha256": "c8ec4bcd95244d7b8063316419a398844bb1a2abf5743f9444414dac09ee87eb",
"sourceBytes": 4510,
"sourceSha256": "dbd5c174af66296caec372e7214cf4df7158b50a563508e16826b95ab8d1cd6c",
"checks": [
@@@ -561,8 -561,8 +561,8 @@@
"engineeringProfile": null,
"nodeCount": 11,
"edgeCount": 10,
- "artifactBytes": 777114,
- "artifactSha256": "bbfa1e00b9532f57086ee6421ab497e2fb276bbf35e892c50390f01e219bb6ac",
- "artifactBytes": 777603,
- "artifactSha256": "a138695070035204c2f86452d28107117fba0ba282fa8e452d5e4069399974ce",
++ "artifactBytes": 777297,
++ "artifactSha256": "b5b28e834fa9203a5184f4d329725dc5e7f7f49979876975c53eaa6a61c9bafd",
"sourceBytes": 4723,
"sourceSha256": "630be98449925d2716ecb8439f404b2bff5fe65ba905b0ad0baea6d96890c526",
"checks": [
@@@ -747,8 -747,8 +747,8 @@@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 781116,
- "artifactSha256": "7db07557dca0b5325deb265338fca78ed6599f1129a76cbab089c71bcb95fa08",
- "artifactBytes": 781595,
- "artifactSha256": "b34eb24c6efb95d30c553de3408d67bdaf701b5e29c8460d1743e65a524101c3",
++ "artifactBytes": 781289,
++ "artifactSha256": "11bd8d99510da7cd9e2f15e4ff2f375db3528240744f2b0e97da7786111dccc4",
"sourceBytes": 5035,
"sourceSha256": "8a635db9e51a5b1a8d2955b9d66f5b9a450e0a298432ce8f2e2f0be11f372e05",
"checks": [
@@@ -882,8 -882,8 +882,8 @@@
"engineeringProfile": null,
"nodeCount": 7,
"edgeCount": 14,
- "artifactBytes": 779167,
- "artifactSha256": "ebee9a4ea0f423d796bade6666580a820d7a329671a32cf36c647a143fdf7646",
- "artifactBytes": 779652,
- "artifactSha256": "deee38ce18d5c4e40f4a1a89f437e17b466f74b8e2d884d1b175dea899ea2024",
++ "artifactBytes": 779346,
++ "artifactSha256": "044a027be919d9eec6773d0632ad265d405deb25d97530651442194ac5047822",
"sourceBytes": 3766,
"sourceSha256": "b8c6c52f1763ede2933c77deb8da59b3e06917bc41d27e66df896136456b859a",
"checks": [
@@@ -1034,8 -1034,8 +1034,8 @@@
"engineeringProfile": null,
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 785036,
- "artifactSha256": "b9970277d577dbd0020d86c09325bb82ad9776986647fd7c3dd6852bc654ff70",
- "artifactBytes": 785515,
- "artifactSha256": "75938cbb2e17c3cde8ed2e63b2e9ad8793dc8094420076a5bc927d6b37fc0332",
++ "artifactBytes": 785209,
++ "artifactSha256": "610ab86bc45932631454f59790759412e3d058eb820bc9bf085937e3aabd0a6d",
"sourceBytes": 4769,
"sourceSha256": "3bdd77674282009c7c68d588cf8a3c495bc98a3be1b9c45327fd1801a6f83a23",
"checks": [
@@@ -1186,8 -1186,8 +1186,8 @@@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 12,
- "artifactBytes": 785203,
- "artifactSha256": "702ebe32c711192f6ede33157446f5a6c77f788f4338b1e1e24525ee7d5852d6",
- "artifactBytes": 785661,
- "artifactSha256": "c752421f922941aaf84237c8389a9c614722461d56e7340205f47339a07a0d2e",
++ "artifactBytes": 785355,
++ "artifactSha256": "5068b0e38c53fd508d703981cb131fd64f415928f5bb25c808e3d2a9c5f0bdf0",
"sourceBytes": 3260,
"sourceSha256": "5ba36f5ce91ed428cb48b599e275424916d82b619b9a3231cbd1bbc3966fc54b",
"checks": [
@@@ -1308,8 -1308,8 +1308,8 @@@
"engineeringProfile": null,
"nodeCount": 12,
"edgeCount": 15,
- "artifactBytes": 791979,
- "artifactSha256": "4b4348ba4ac34fffae0f297096e63ec29a6f350b93b53db41396e2803eb86d8d",
- "artifactBytes": 792430,
- "artifactSha256": "3a8385ab976303cd612a2cd6267531f1ff884789025c8da460799989b9a1de66",
++ "artifactBytes": 792124,
++ "artifactSha256": "48db1b108d4d75582f8a53c405d7f2774004f80632ec3b012da7d8dc18b30bab",
"sourceBytes": 4155,
"sourceSha256": "e3dc105d03c1c9881160006cdace23cb5d8533803e337caf0ec287c64e775275",
"checks": [
@@@ -1430,8 -1430,8 +1430,8 @@@
"engineeringProfile": null,
"nodeCount": 10,
"edgeCount": 9,
- "artifactBytes": 779547,
- "artifactSha256": "17c2b4247c1d55042f858782bd034804d72f7129e48bd9cd6d3b53adee2b21a0",
- "artifactBytes": 780026,
- "artifactSha256": "e81cb13231b857b941f439068ca0ca200e83d068135b2c6fd4bcbcf128ec4253",
++ "artifactBytes": 779720,
++ "artifactSha256": "a9a9329f4db1dd9e113aff2b08ab6082d3eef0313eb039ef05ec9bc43c1fde03",
"sourceBytes": 3197,
"sourceSha256": "95e051b27a9e4a3307e194c0f666fca4af51470be7e2228d400ff48aea5b353b",
"checks": [
@@@ -1576,8 -1576,8 +1576,8 @@@
"engineeringProfile": null,
"nodeCount": 6,
"edgeCount": 5,
- "artifactBytes": 793764,
- "artifactSha256": "6f7c6305b8f8e8008035d44187c48e4e3ec2fb31e5602eeedb62496849ba018c",
- "artifactBytes": 794243,
- "artifactSha256": "32fb3559c4457f19f6b36cdac4c835d96e7aaa5f457d2783c62b9c7013013585",
++ "artifactBytes": 793937,
++ "artifactSha256": "38b55b035c26a8e45222018a19760799db6d212fc34ec68346b647ddb0540c38",
"sourceBytes": 7321,
"sourceSha256": "1777a374647084466f4d7ce3a968004be6ab70ac9cf82459b96bed7c556cdfdd",
"checks": [
diff --cc examples/checkout-platform-delta.html
index 043340ab,e5ea3719..b663d589
--- a/examples/checkout-platform-delta.html
+++ b/examples/checkout-platform-delta.html
@@@ -9640,7 -9640,7 +9640,7 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
&lt;!-- Main Diagram --&gt;
&lt;div class=&quot;diagram-container&quot; data-detail-level=&quot;read&quot;
data-preset-badge-editorial-plate=&quot;ARCHIFY / PLATE 04&quot;&gt;
-- &lt;svg viewBox=&quot;0 0 1020 548&quot; role=&quot;img&quot; lang=&quot;en&quot; aria-labelledby=&quot;archify-diagram-title archify-diagram-description&quot; data-animation=&quot;trace&quot; data-preset=&quot;signal-flow&quot; data-quality-profile=&quot;showcase&quot; data-reader-fit=&quot;intrinsic-height&quot; data-reader-min-text=&quot;7.5&quot; data-reader-primary-text=&quot;14&quot;&gt;
++ &lt;svg viewBox=&quot;0 0 1020 548&quot; role=&quot;img&quot; lang=&quot;en&quot; aria-labelledby=&quot;archify-diagram-title archify-diagram-description&quot; data-animation=&quot;trace&quot; data-preset=&quot;signal-flow&quot; data-quality-profile=&quot;standard&quot; data-quality-gates=&quot;advisory&quot; data-reader-fit=&quot;intrinsic-height&quot; data-reader-min-text=&quot;7.5&quot; data-reader-primary-text=&quot;14&quot;&gt;
&lt;title id=&quot;archify-diagram-title&quot;&gt;Checkout Platform — Baseline&lt;/title&gt;
&lt;desc id=&quot;archify-diagram-description&quot;&gt;An architecture diagram generated by Archify.&lt;/desc&gt;
&lt;!-- Definitions --&gt;
@@@ -13717,11 -13697,13 +13717,10 @@@
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record &amp;&amp; record.id;
- var value = location.href.replace(/#.*$/, &#39;&#39;) + (relationId
- ? &#39;#relation=&#39; + encodeURIComponent(relationId)
- : &#39;#focus=&#39; + encodeURIComponent(activeIds[0]) + (reachabilityMode ? &#39;&amp;reach=&#39; + reachabilityMode : &#39;&#39;));
- var copy = navigator.clipboard &amp;&amp; typeof navigator.clipboard.writeText === &#39;function&#39;
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? &#39;relation=&#39; + encodeURIComponent(relationId)
+ : &#39;focus=&#39; + encodeURIComponent(activeIds[0]) + (reachabilityMode ? &#39;&amp;reach=&#39; + reachabilityMode : &#39;&#39;));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? &#39;viewer.common.copied&#39; : &#39;viewer.common.copyFailed&#39;);
copyBtn.setAttribute(&#39;aria-label&#39;, copied
? viewerText(relationId ? &#39;viewer.passport.copy.pinned.success&#39; : &#39;viewer.passport.copy.focused.success&#39;)
@@@ -17651,11 -17633,26 +17650,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement(&#39;textarea&#39;);
- field.value = value;
- field.setAttribute(&#39;readonly&#39;, &#39;&#39;);
- field.style.position = &#39;fixed&#39;;
- field.style.opacity = &#39;0&#39;;
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand(&#39;copy&#39;); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== &#39;result&#39;) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, &#39;&#39;) + &#39;#route=&#39; + encodeURIComponent(startId) + &#39;~&#39; + encodeURIComponent(endId);
- var copy = navigator.clipboard &amp;&amp; typeof navigator.clipboard.writeText === &#39;function&#39;
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(&#39;route=&#39; + encodeURIComponent(startId) + &#39;~&#39; + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? &#39;viewer.common.copied&#39; : &#39;viewer.common.copyFailed&#39;);
copyBtn.setAttribute(&#39;aria-label&#39;, viewerText(copied ? &#39;viewer.route.copy.success&#39; : &#39;viewer.route.copy.failed&#39;));
window.setTimeout(function () {
@@@ -18307,13 -18304,28 +18305,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement(&#39;textarea&#39;);
- field.value = value;
- field.setAttribute(&#39;readonly&#39;, &#39;&#39;);
- field.style.position = &#39;fixed&#39;;
- field.style.opacity = &#39;0&#39;;
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand(&#39;copy&#39;); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, &#39;&#39;) + &#39;#lens=&#39; + selectedKinds.map(encodeURIComponent).join(&#39;~&#39;);
- var copy = navigator.clipboard &amp;&amp; typeof navigator.clipboard.writeText === &#39;function&#39;
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(&#39;lens=&#39; + selectedKinds.map(encodeURIComponent).join(&#39;~&#39;));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? &#39;viewer.common.copied&#39; : &#39;viewer.common.copyFailed&#39;);
-- window.setTimeout(function () { copyBtn.textContent = viewerText(&#39;viewer.common.copyLink&#39;); }, 1600);
++ copyBtn.setAttribute(&#39;aria-label&#39;, viewerText(copied ? &#39;viewer.lens.copy&#39; : &#39;viewer.common.copyFailed&#39;));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText(&#39;viewer.common.copyLink&#39;);
++ copyBtn.setAttribute(&#39;aria-label&#39;, viewerText(&#39;viewer.lens.copy&#39;));
++ }, 1600);
return copied;
});
}
@@@ -18708,7 -18720,7 +18709,7 @@@
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
--"></iframe></section><section class="canvas" data-view="delta"><svg viewBox="0 0 1044 592" role="img" lang="en" aria-labelledby="delta-head-archify-diagram-title delta-head-archify-diagram-description" data-animation="trace" data-preset="signal-flow" data-quality-profile="showcase" data-reader-fit="intrinsic-height" data-reader-min-text="7.5" data-reader-primary-text="14">
++"></iframe></section><section class="canvas" data-view="delta"><svg viewBox="0 0 1044 592" role="img" lang="en" aria-labelledby="delta-head-archify-diagram-title delta-head-archify-diagram-description" data-animation="trace" data-preset="signal-flow" data-quality-profile="standard" data-quality-gates="advisory" data-reader-fit="intrinsic-height" data-reader-min-text="7.5" data-reader-primary-text="14">
<title id="delta-head-archify-diagram-title">Checkout Platform — Fraud Gate</title>
<desc id="delta-head-archify-diagram-description">An architecture diagram generated by Archify.</desc>
<!-- Definitions -->
@@@ -23977,7 -23989,7 +23978,7 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
&lt;!-- Main Diagram --&gt;
&lt;div class=&quot;diagram-container&quot; data-detail-level=&quot;read&quot;
data-preset-badge-editorial-plate=&quot;ARCHIFY / PLATE 04&quot;&gt;
-- &lt;svg viewBox=&quot;0 0 1020 568&quot; role=&quot;img&quot; lang=&quot;en&quot; aria-labelledby=&quot;archify-diagram-title archify-diagram-description&quot; data-animation=&quot;trace&quot; data-preset=&quot;signal-flow&quot; data-quality-profile=&quot;showcase&quot; data-reader-fit=&quot;intrinsic-height&quot; data-reader-min-text=&quot;7.5&quot; data-reader-primary-text=&quot;14&quot;&gt;
++ &lt;svg viewBox=&quot;0 0 1020 568&quot; role=&quot;img&quot; lang=&quot;en&quot; aria-labelledby=&quot;archify-diagram-title archify-diagram-description&quot; data-animation=&quot;trace&quot; data-preset=&quot;signal-flow&quot; data-quality-profile=&quot;standard&quot; data-quality-gates=&quot;advisory&quot; data-reader-fit=&quot;intrinsic-height&quot; data-reader-min-text=&quot;7.5&quot; data-reader-primary-text=&quot;14&quot;&gt;
&lt;title id=&quot;archify-diagram-title&quot;&gt;Checkout Platform — Fraud Gate&lt;/title&gt;
&lt;desc id=&quot;archify-diagram-description&quot;&gt;An architecture diagram generated by Archify.&lt;/desc&gt;
&lt;!-- Definitions --&gt;
@@@ -28056,11 -28048,13 +28057,10 @@@
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record &amp;&amp; record.id;
- var value = location.href.replace(/#.*$/, &#39;&#39;) + (relationId
- ? &#39;#relation=&#39; + encodeURIComponent(relationId)
- : &#39;#focus=&#39; + encodeURIComponent(activeIds[0]) + (reachabilityMode ? &#39;&amp;reach=&#39; + reachabilityMode : &#39;&#39;));
- var copy = navigator.clipboard &amp;&amp; typeof navigator.clipboard.writeText === &#39;function&#39;
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? &#39;relation=&#39; + encodeURIComponent(relationId)
+ : &#39;focus=&#39; + encodeURIComponent(activeIds[0]) + (reachabilityMode ? &#39;&amp;reach=&#39; + reachabilityMode : &#39;&#39;));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? &#39;viewer.common.copied&#39; : &#39;viewer.common.copyFailed&#39;);
copyBtn.setAttribute(&#39;aria-label&#39;, copied
? viewerText(relationId ? &#39;viewer.passport.copy.pinned.success&#39; : &#39;viewer.passport.copy.focused.success&#39;)
@@@ -31990,11 -31984,26 +31990,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement(&#39;textarea&#39;);
- field.value = value;
- field.setAttribute(&#39;readonly&#39;, &#39;&#39;);
- field.style.position = &#39;fixed&#39;;
- field.style.opacity = &#39;0&#39;;
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand(&#39;copy&#39;); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== &#39;result&#39;) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, &#39;&#39;) + &#39;#route=&#39; + encodeURIComponent(startId) + &#39;~&#39; + encodeURIComponent(endId);
- var copy = navigator.clipboard &amp;&amp; typeof navigator.clipboard.writeText === &#39;function&#39;
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(&#39;route=&#39; + encodeURIComponent(startId) + &#39;~&#39; + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? &#39;viewer.common.copied&#39; : &#39;viewer.common.copyFailed&#39;);
copyBtn.setAttribute(&#39;aria-label&#39;, viewerText(copied ? &#39;viewer.route.copy.success&#39; : &#39;viewer.route.copy.failed&#39;));
window.setTimeout(function () {
@@@ -32646,13 -32655,28 +32645,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement(&#39;textarea&#39;);
- field.value = value;
- field.setAttribute(&#39;readonly&#39;, &#39;&#39;);
- field.style.position = &#39;fixed&#39;;
- field.style.opacity = &#39;0&#39;;
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand(&#39;copy&#39;); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, &#39;&#39;) + &#39;#lens=&#39; + selectedKinds.map(encodeURIComponent).join(&#39;~&#39;);
- var copy = navigator.clipboard &amp;&amp; typeof navigator.clipboard.writeText === &#39;function&#39;
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(&#39;lens=&#39; + selectedKinds.map(encodeURIComponent).join(&#39;~&#39;));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? &#39;viewer.common.copied&#39; : &#39;viewer.common.copyFailed&#39;);
-- window.setTimeout(function () { copyBtn.textContent = viewerText(&#39;viewer.common.copyLink&#39;); }, 1600);
++ copyBtn.setAttribute(&#39;aria-label&#39;, viewerText(copied ? &#39;viewer.lens.copy&#39; : &#39;viewer.common.copyFailed&#39;));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText(&#39;viewer.common.copyLink&#39;);
++ copyBtn.setAttribute(&#39;aria-label&#39;, viewerText(&#39;viewer.lens.copy&#39;));
++ }, 1600);
return copied;
});
}
diff --cc examples/checkout-platform-delta.receipt.json
index 436f74a2,eef1aa23..3a496898
--- a/examples/checkout-platform-delta.receipt.json
+++ b/examples/checkout-platform-delta.receipt.json
@@@ -219,8 -219,8 +219,8 @@@
"Boundary identity is conservatively derived from kind + label."
],
"artifact": {
- "sha256": "8b304e48082bf9f8cb5d1b83ee4df5d651f591dd3b26369a9f14f2fe1b84efdc",
- "bytes": 2156981
- "sha256": "ffe6ee291b392151959e253bdf1aca35d4cc71e7794cb93627742bc9e77982af",
- "bytes": 2158061
++ "sha256": "047df80c2d5d17c139b26f6254a708372c4f045ba7172039cb4cb5561827dcfb",
++ "bytes": 2157517
},
"validation": {
"checksPassed": 28,
diff --cc examples/class-payment-processors-rendered.html
index 94e423ca,488cec31..21a15c86
--- a/examples/class-payment-processors-rendered.html
+++ b/examples/class-payment-processors-rendered.html
@@@ -9192,11 -9172,13 +9192,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13126,11 -13108,26 +13125,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13782,13 -13779,28 +13780,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/class-payments-rendered.html
index e17e5084,7802891e..a6b34c98
--- a/examples/class-payments-rendered.html
+++ b/examples/class-payments-rendered.html
@@@ -8998,11 -8978,13 +8998,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -12932,11 -12914,26 +12931,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13588,13 -13585,28 +13586,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/dataflow-product-analytics.html
index 443c5d5d,437e87a7..17019cd8
--- a/examples/dataflow-product-analytics.html
+++ b/examples/dataflow-product-analytics.html
@@@ -9112,11 -9092,13 +9112,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13046,11 -13028,26 +13045,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13702,13 -13699,28 +13700,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/erd-orders-rendered.html
index fafeee21,78c7990f..4ac13329
--- a/examples/erd-orders-rendered.html
+++ b/examples/erd-orders-rendered.html
@@@ -9280,11 -9260,13 +9280,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13214,11 -13196,26 +13213,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13870,13 -13867,28 +13868,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/lifecycle-agent-run.html
index 3b216b5c,5b02faa9..d1ac1c12
--- a/examples/lifecycle-agent-run.html
+++ b/examples/lifecycle-agent-run.html
@@@ -9124,11 -9104,13 +9124,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13058,11 -13040,26 +13057,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13714,13 -13711,28 +13712,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/sequence-cache-miss-request.html
index 0aa1f5bf,4f9b0053..3916d23e
--- a/examples/sequence-cache-miss-request.html
+++ b/examples/sequence-cache-miss-request.html
@@@ -9127,11 -9107,13 +9127,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13061,11 -13043,26 +13060,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13717,13 -13714,28 +13715,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/subscription-billing-rendered.html
index c3c07828,cff69324..4f4eedac
--- a/examples/subscription-billing-rendered.html
+++ b/examples/subscription-billing-rendered.html
@@@ -9504,11 -9484,13 +9504,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13438,11 -13420,26 +13437,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -14094,13 -14091,28 +14092,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/timeline-archify-dev-activity-rendered.html
index 40f11bf7,c666106b..b530c510
--- a/examples/timeline-archify-dev-activity-rendered.html
+++ b/examples/timeline-archify-dev-activity-rendered.html
@@@ -9204,11 -9184,13 +9204,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13138,11 -13120,26 +13137,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13794,13 -13791,28 +13792,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/timeline-payment-incident-rendered.html
index 7624f80b,3ff01ea0..1f0203a2
--- a/examples/timeline-payment-incident-rendered.html
+++ b/examples/timeline-payment-incident-rendered.html
@@@ -8989,11 -8969,13 +8989,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -12923,11 -12905,26 +12922,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13579,13 -13576,28 +13577,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/tree-archify-repository-rendered.html
index 877b2bf1,62ffcda4..adcd3876
--- a/examples/tree-archify-repository-rendered.html
+++ b/examples/tree-archify-repository-rendered.html
@@@ -9223,11 -9203,13 +9223,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13157,11 -13139,26 +13156,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13813,13 -13810,28 +13811,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/tree-payment-platform-rendered.html
index c8950b8e,44f06a4c..0bfde931
--- a/examples/tree-payment-platform-rendered.html
+++ b/examples/tree-payment-platform-rendered.html
@@@ -9004,11 -8984,13 +9004,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -12938,11 -12920,26 +12937,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13594,13 -13591,28 +13592,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/waterfall-checkout-request-rendered.html
index eed940d6,6993c2c2..b3c9ebb1
--- a/examples/waterfall-checkout-request-rendered.html
+++ b/examples/waterfall-checkout-request-rendered.html
@@@ -8986,11 -8966,13 +8986,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -12920,11 -12902,26 +12919,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13576,13 -13573,28 +13574,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/waterfall-example-rebuild-rendered.html
index b2ec2e50,95fd0e39..8c1394a5
--- a/examples/waterfall-example-rebuild-rendered.html
+++ b/examples/waterfall-example-rebuild-rendered.html
@@@ -9172,11 -9152,13 +9172,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13106,11 -13088,26 +13105,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13762,13 -13759,28 +13760,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/web-app-rendered.html
index f03d3eed,36109bfb..4ba0379c
--- a/examples/web-app-rendered.html
+++ b/examples/web-app-rendered.html
@@@ -9100,11 -9080,13 +9100,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13034,11 -13016,26 +13033,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13690,13 -13687,28 +13688,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/web-app.html
index f03d3eed,336c63af..ffad2944
--- a/examples/web-app.html
+++ b/examples/web-app.html
@@@ -4953,7 -4953,7 +4953,7 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
<!-- Main Diagram -->
<div class="diagram-container" data-detail-level="read"
data-preset-badge-editorial-plate="ARCHIFY / PLATE 04">
- <svg viewBox="0 0 1080 588" role="img" lang="en" aria-labelledby="archify-diagram-title archify-diagram-description" data-animation="trace" data-preset="classic" data-quality-profile="showcase" data-reader-fit="intrinsic-height" data-reader-min-text="7.5" data-reader-primary-text="14">
-<svg viewBox="0 0 1080 588" role="img" lang="en" aria-labelledby="archify-diagram-title archify-diagram-description" data-preset="classic" data-quality-profile="showcase" data-reader-fit="intrinsic-height" data-reader-min-text="7.5" data-reader-primary-text="14">
++<svg viewBox="0 0 1080 588" role="img" lang="en" aria-labelledby="archify-diagram-title archify-diagram-description" data-animation="trace" data-preset="classic" data-quality-profile="showcase" data-reader-fit="intrinsic-height" data-reader-min-text="7.5" data-reader-primary-text="14">
<title id="archify-diagram-title">Sample Web App</title>
<desc id="archify-diagram-description">An architecture diagram generated by Archify.</desc>
<!-- Definitions -->
@@@ -9100,11 -9079,13 +9099,10 @@@
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13034,11 -13015,26 +13032,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13690,13 -13686,28 +13687,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}
diff --cc examples/workflow-agent-tool-call-rendered.html
index a13f2c4b,a93c4804..90bbd1a4
--- a/examples/workflow-agent-tool-call-rendered.html
+++ b/examples/workflow-agent-tool-call-rendered.html
@@@ -9118,11 -9098,13 +9118,10 @@@ OTHER DEALINGS IN THE FONT SOFTWARE
if (activeIds.length !== 1) return Promise.resolve(false);
var record = pinnedRelationshipRecord();
var relationId = record && record.id;
- var value = location.href.replace(/#.*$/, '') + (relationId
- ? '#relation=' + encodeURIComponent(relationId)
- : '#focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink(relationId
+ ? 'relation=' + encodeURIComponent(relationId)
+ : 'focus=' + encodeURIComponent(activeIds[0]) + (reachabilityMode ? '&reach=' + reachabilityMode : ''));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', copied
? viewerText(relationId ? 'viewer.passport.copy.pinned.success' : 'viewer.passport.copy.focused.success')
@@@ -13052,11 -13034,26 +13051,10 @@@
if (!context || !Archify.finder) return false;
return Archify.finder.open({ context: context });
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (mode !== 'result') return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId);
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('route=' + encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.route.copy.success' : 'viewer.route.copy.failed'));
window.setTimeout(function () {
@@@ -13708,13 -13705,28 +13706,16 @@@
if (options.closePanel === true) close({ restoreFocus: false });
return false;
}
- function fallbackCopy(value) {
- var field = document.createElement('textarea');
- field.value = value;
- field.setAttribute('readonly', '');
- field.style.position = 'fixed';
- field.style.opacity = '0';
- document.body.appendChild(field);
- field.select();
- var copied = false;
- try { copied = document.execCommand('copy'); } catch (_) {}
- field.remove();
- return copied;
- }
function copyLink() {
if (!selectedKinds.length) return Promise.resolve(false);
- var value = location.href.replace(/#.*$/, '') + '#lens=' + selectedKinds.map(encodeURIComponent).join('~');
- var copy = navigator.clipboard && typeof navigator.clipboard.writeText === 'function'
- ? navigator.clipboard.writeText(value).then(function () { return true; }).catch(function () { return fallbackCopy(value); })
- : Promise.resolve(fallbackCopy(value));
- return copy.then(function (copied) {
+ var value = readerLink('lens=' + selectedKinds.map(encodeURIComponent).join('~'));
- if (value === null) return Promise.resolve(false);
- return copyReaderText(value).then(function (copied) {
++ return (value === null ? Promise.resolve(false) : copyReaderText(value)).then(function (copied) {
copyBtn.textContent = viewerText(copied ? 'viewer.common.copied' : 'viewer.common.copyFailed');
-- window.setTimeout(function () { copyBtn.textContent = viewerText('viewer.common.copyLink'); }, 1600);
++ copyBtn.setAttribute('aria-label', viewerText(copied ? 'viewer.lens.copy' : 'viewer.common.copyFailed'));
++ window.setTimeout(function () {
++ copyBtn.textContent = viewerText('viewer.common.copyLink');
++ copyBtn.setAttribute('aria-label', viewerText('viewer.lens.copy'));
++ }, 1600);
return copied;
});
}