Preserve preview harness, editor, email and task improvements

Snapshot current maintainer-preview application changes and regression fixtures for integration into lab. Excludes local runtime data, evaluation outputs and source backups. Focused Python regression selection: 140 passed; full suite not certified.
This commit is contained in:
pewdiepie-archdaemon
2026-10-01 01:34:26 +00:00
parent 86f376ac3a
commit 2e8413a54a
170 changed files with 11010 additions and 1094 deletions
+26
View File
@@ -0,0 +1,26 @@
import { registerEscapeLayer } from './escMenuStack.js';
// Give every tutorial hint the same button, timeout, and Escape lifecycle.
// The global Escape arbiter closes one layer before its underlying window.
export function bindTourHintDismiss(hint, { timeout, fade = 280, onDismiss } = {}) {
let closed = false;
let timer;
const button = hint.querySelector('.tour-hint-dismiss');
const unregister = registerEscapeLayer(close, () => hint.isConnected && !closed);
function close() {
if (closed) return;
closed = true;
clearTimeout(timer);
unregister();
button?.removeEventListener('click', close);
hint.classList.add('tour-hint-out');
setTimeout(() => hint.remove(), fade);
onDismiss?.();
}
button?.addEventListener('click', close);
if (timeout > 0) timer = setTimeout(close, timeout);
hint._dismiss = close;
return close;
}