Merge pull request 'Resync the vendored design system (dash-free) and check it too' (#55) from resync-web-template into main
CI / Test (jest) (push) Successful in 25s
CI / Lint (eslint) (push) Successful in 27s
CI / Security (npm audit) (push) Successful in 13s
CI / Integration (api) (push) Successful in 1m28s
CI / Scan (secrets, workflows, shell) (push) Successful in 1m47s
CI / UI (playwright) (push) Successful in 1m37s
CI / Deploy (push) Successful in 13s
CI / Deploy worker (push) Successful in 4s
CI / Notify (push) Successful in 3s

This commit was merged in pull request #55.
This commit is contained in:
jared committed 2026-11-22 19:39:41 -05:00
commit ad2e5313ea
6 files changed
+173 -153

No files matched your search

+2 -2
View File
@@ -36,9 +36,9 @@ jobs:
run: npm run lint
- name: No em or en dashes (house style)
run: |
# Pulse-owned files only: the vendored design system is fixed upstream.
# Includes the vendored design system: it has been dash-free upstream since web_template#3.
if git grep -nP '[\x{2013}\x{2014}]|&[mn]dash;|\\u201[34]|&#821[12];|&#x201[34];' \
-- . ':!public/web_template' ':!package-lock.json'; then
-- . ':!package-lock.json'; then
echo "::error::Em or en dashes found (listed above). Use a hyphen, colon, comma or 'to'."
exit 1
fi
+1 -1
View File
@@ -586,7 +586,7 @@ Everything runs from `.gitea/workflows/ci.yml`:
| Job | What it does | When |
|---|---|---|
| `Lint (eslint)` | `npm run lint`, plus a check that fails on em or en dashes in Pulse-owned files | Every push and PR |
| `Lint (eslint)` | `npm run lint`, plus a check that fails on em or en dashes anywhere in the repo, including the vendored design system | Every push and PR |
| `Test (jest)` | `npm test`: unit tests for `lib/` and the worker, and the deploy-script sandbox tests. Fails if coverage drops below the floors in `package.json` (`lib/` 90% lines, `worker/` 40%) | Every push and PR |
| `Security (npm audit)` | `npm audit --audit-level=high`, plus a CycloneDX SBOM of production dependencies (kept 90 days as the `sbom-cyclonedx` artifact of each `main` build) | Every push and PR, and weekly (Monday 06:00) |
| `Scan (secrets, workflows, shell)` | gitleaks over the whole git history, actionlint on the workflow files (with shellcheck on their scripts), shellcheck on every `*.sh`, and semgrep (JavaScript, Node.js, Express, secrets and security-audit rule packs). Suppress a reviewed false positive on its line with `nosemgrep: <rule id>` and a comment saying why | Every push and PR |
+1 -1
View File
@@ -1 +1 @@
v1.2 bbec859 2026-09-09T01:34:49Z
v1.2 8286bb2 2026-11-23T00:21:08Z
+109 -109
View File
@@ -1,6 +1,6 @@
/* ================================================================
LOTUSGUILD TERMINAL DESIGN SYSTEM v1.2 — base.css
Aesthetic: Anduril x Hacker Terminal — dark military-tech,
LOTUSGUILD TERMINAL DESIGN SYSTEM v1.2 - base.css
Aesthetic: Anduril x Hacker Terminal - dark military-tech,
multi-accent neon, angular frames, glitch effects.
Apps: Tinker Tickets (PHP), PULSE (Node.js), GANDALF (Flask)
@@ -80,7 +80,7 @@
--accent-purple: #BF5FFF;
--accent-purple-dim: rgba(191,95,255,0.10);
/* Legacy aliases — keeps all existing component HTML working */
/* Legacy aliases - keeps all existing component HTML working */
--terminal-green: var(--accent-green);
--terminal-green-dim: var(--accent-green-dim);
--terminal-green-dark: #00cc66;
@@ -177,7 +177,7 @@
--z-popover: 10012;
--z-tooltip: 10013;
--z-toast: 10014;
--z-panel: 10020; /* notification / generic dropdown panels — above everything */
--z-panel: 10020; /* notification / generic dropdown panels - above everything */
--z-overlay: 9999; /* scanlines / CRT effects */
/* --- Corner cuts (clip-path polygon notches) --- */
@@ -245,7 +245,7 @@ button { cursor: pointer; font-family: var(--font-mono); }
03. CRT / GRID / SCANLINE EFFECTS
---------------------------------------------------------------- */
/* Horizontal scanlines — fixed, non-interactive overlay */
/* Horizontal scanlines - fixed, non-interactive overlay */
body::before {
content: '';
position: fixed;
@@ -734,7 +734,7 @@ hr {
);
}
/* Corner accent — top-right triangle */
/* Corner accent - top-right triangle */
.lt-card::before {
content: '';
position: absolute;
@@ -813,7 +813,7 @@ hr {
box-shadow: none;
}
/* Primary — orange */
/* Primary - orange */
.lt-btn-primary {
color: var(--accent-orange);
border-color: var(--accent-orange-border);
@@ -826,7 +826,7 @@ hr {
text-shadow: var(--glow-orange);
}
/* Danger — red */
/* Danger - red */
.lt-btn-danger {
color: var(--accent-red);
border-color: rgba(255,45,85,0.32);
@@ -838,7 +838,7 @@ hr {
text-shadow: var(--glow-red);
}
/* Ghost — minimal */
/* Ghost - minimal */
.lt-btn-ghost {
color: var(--text-muted);
border-color: var(--border-color-dim);
@@ -925,7 +925,7 @@ hr {
border-color: var(--border-dim);
}
/* Display-only fields — readable, non-editable, not "broken" */
/* Display-only fields - readable, non-editable, not "broken" */
.lt-display-field,
.lt-input.lt-display-field,
.lt-select.lt-display-field,
@@ -951,7 +951,7 @@ hr {
color-scheme: dark;
}
/* Style the native option list — works on Chrome/Firefox/Edge on Windows & Linux.
/* Style the native option list - works on Chrome/Firefox/Edge on Windows & Linux.
macOS always uses OS-native rendering and ignores these. */
.lt-select option,
select option {
@@ -1819,12 +1819,12 @@ select option:checked {
Breakpoint system (desktop-first with mobile-first enhancements):
xs: ≤ 479px tiny phones (iPhone SE 1st gen, Galaxy A)
sm: 480–767px phones (iPhone 14, Pixel 7, Galaxy S)
md: 768–1023px tablets (iPad mini/Air portrait)
lg: 1024–1279px laptops (iPad Pro landscape, MacBook Air 11")
xl: 1280–1535px desktops (MacBook Pro 13", 1080p portrait)
2xl: 1536–1919px large (27" iMac, 1440p)
3xl: 1920–2559px full HD (1080p monitor, 24")
sm: 480-767px phones (iPhone 14, Pixel 7, Galaxy S)
md: 768-1023px tablets (iPad mini/Air portrait)
lg: 1024-1279px laptops (iPad Pro landscape, MacBook Air 11")
xl: 1280-1535px desktops (MacBook Pro 13", 1080p portrait)
2xl: 1536-1919px large (27" iMac, 1440p)
3xl: 1920-2559px full HD (1080p monitor, 24")
4k: ≥ 2560px 4K/ultrawide (4K, 1440p ultrawide)
================================================================ */
@@ -1956,7 +1956,7 @@ select option:checked {
padding-left: max(var(--space-xl), env(safe-area-inset-left));
padding-right: max(var(--space-xl), env(safe-area-inset-right));
}
/* Main content: header-height already includes safe-area-top via header height —
/* Main content: header-height already includes safe-area-top via header height -
only add safe-area-top once to avoid double-counting */
.lt-main {
padding-top: calc(var(--header-height) + env(safe-area-inset-top) + var(--space-lg));
@@ -2003,14 +2003,14 @@ select option:checked {
/* Suppress hover-only decorations on touch */
[data-tooltip]::before,
[data-tooltip]::after { display: none; }
/* Glitch causes expensive repaints on mobile — disable */
/* Glitch causes expensive repaints on mobile - disable */
.lt-glitch::before,
.lt-glitch::after { display: none; }
/* Suppress padding-left shift on touch (causes layout jank on tap) */
.lt-nav-drawer-link:hover { padding-left: var(--space-lg); }
}
/* ── Coarse pointer — additional touch performance tweaks ── */
/* ── Coarse pointer - additional touch performance tweaks ── */
@media (pointer: coarse) {
/* Disable infinite animations that drain battery on mobile */
.lt-dot-up, .lt-dot-warn { animation: none; }
@@ -2044,14 +2044,14 @@ select option:checked {
}
/* ── LG — laptops 1024–1279px ── */
/* ── LG - laptops 1024-1279px ── */
@media (max-width: 1279px) {
.lt-grid-4 { grid-template-columns: repeat(2, 1fr); }
.lt-container { padding: var(--space-lg); }
}
/* ── MD — tablets portrait 768–1023px ── */
/* ── MD - tablets portrait 768-1023px ── */
@media (max-width: 1023px) {
.lt-menu-btn { display: flex; }
.lt-nav { display: none; }
@@ -2079,7 +2079,7 @@ select option:checked {
}
/* ── SM — phones 480–767px ── */
/* ── SM - phones 480-767px ── */
@media (max-width: 767px) {
:root { --header-height: 50px; }
.lt-main, .lt-main.lt-container { padding-top: calc(50px + var(--space-md)); }
@@ -2146,7 +2146,7 @@ select option:checked {
.lt-kv-key { border-right: none; border-bottom: 1px solid var(--border-dim); padding: var(--space-xs) 0 2px; }
.lt-kv-val { padding: 2px 0 var(--space-sm); }
/* Pagination compact — show fewer buttons via CSS */
/* Pagination compact - show fewer buttons via CSS */
.lt-page-btn:not(.active):not(:first-child):not(:last-child):not([disabled]) {
display: none;
}
@@ -2179,7 +2179,7 @@ select option:checked {
}
/* ── XS — tiny phones ≤ 479px ── */
/* ── XS - tiny phones ≤ 479px ── */
@media (max-width: 479px) {
:root { --header-height: 46px; }
.lt-main, .lt-main.lt-container { padding-top: calc(46px + var(--space-sm)); }
@@ -2267,7 +2267,7 @@ select option:checked {
}
/* ── 2XL — large desktops 1536–1919px ── */
/* ── 2XL - large desktops 1536-1919px ── */
@media (min-width: 1536px) {
:root { --container-max: 1800px; }
.lt-header { padding: 0 var(--space-2xl); }
@@ -2275,7 +2275,7 @@ select option:checked {
}
/* ── 3XL — full HD 1920–2559px ── */
/* ── 3XL - full HD 1920-2559px ── */
@media (min-width: 1920px) {
:root { --container-max: 2000px; }
.lt-stats-grid { grid-template-columns: repeat(6, 1fr); }
@@ -2289,8 +2289,8 @@ select option:checked {
html { font-size: 18px; } /* scales all rem-based values ~12% larger */
:root {
--container-max: 2400px;
--header-height: 4rem; /* 72px at 18px base — was 64px hardcoded */
--sidebar-width: 17.5rem; /* 315px at 18px base — was 280px hardcoded */
--header-height: 4rem; /* 72px at 18px base - was 64px hardcoded */
--sidebar-width: 17.5rem; /* 315px at 18px base - was 280px hardcoded */
}
/* Clip-path corners scale proportionally */
.lt-frame {
@@ -2357,7 +2357,7 @@ select option:checked {
.lt-hidden { display: none !important; }
/* Skip navigation link — visible only on focus */
/* Skip navigation link - visible only on focus */
.lt-skip-link {
position: absolute;
top: -100%;
@@ -3071,7 +3071,7 @@ input[type="range"].lt-range::-moz-range-thumb {
39. NOTIFICATION BADGES
---------------------------------------------------------------- */
.lt-badge-wrap { position: relative; display: inline-flex; }
/* Notification counter badge — only absolute when inside .lt-badge-wrap */
/* Notification counter badge - only absolute when inside .lt-badge-wrap */
.lt-badge-wrap .lt-badge {
display: inline-flex;
align-items: center;
@@ -3219,7 +3219,7 @@ input[type="range"].lt-range::-moz-range-thumb {
.lt-kv-val--green { color: var(--accent-green); }
.lt-kv-val--red { color: var(--accent-red); }
/* lt-kv-row / lt-kv-label / lt-kv-value — alternate KV row pattern using
/* lt-kv-row / lt-kv-label / lt-kv-value - alternate KV row pattern using
CSS `display: contents` so children become direct grid items of lt-kv-grid */
.lt-kv-row {
display: contents;
@@ -3608,12 +3608,12 @@ input[type="range"].lt-range::-moz-range-thumb {
51. LIGHT THEME
---------------------------------------------------------------- */
/* ================================================================
LIGHT MODE — complete token overrides
LIGHT MODE - complete token overrides
Design intent: "military intelligence dashboard, daylight reading"
Clean off-white surfaces, desaturated accents, no neon.
================================================================ */
html[data-theme="light"] {
/* — Surfaces — */
/* - Surfaces - */
--bg-primary: #edf0f5;
--bg-secondary: #e2e7ef;
--bg-tertiary: #d4dae6;
@@ -3622,19 +3622,19 @@ html[data-theme="light"] {
--bg-overlay: rgba(237,240,245,0.97);
--bg-input: #ffffff;
/* — Typography — */
/* - Typography - */
--text-primary: #111827; /* near-black, high contrast */
--text-secondary: #2d3d56;
--text-muted: #5a6e8c;
--text-dim: #8a9ab8;
/* — Borders — */
/* - Borders - */
--border-color: rgba(50,80,130,0.18);
--border-color-hi: #0062b8;
--border-color-dim: rgba(50,80,130,0.09);
--border-dim: rgba(50,80,130,0.09);
/* — Accent colors: desaturated for readability on white — */
/* - Accent colors: desaturated for readability on white - */
--accent-orange: #c44e00;
--accent-cyan: #0062b8;
--accent-green: #006d35;
@@ -3642,7 +3642,7 @@ html[data-theme="light"] {
--accent-amber: #8a5a00;
--accent-purple: #6b2fb8;
/* — Accent tints — */
/* - Accent tints - */
--accent-orange-dim: rgba(196,78,0,0.10);
--accent-cyan-dim: rgba(0,98,184,0.10);
--accent-green-dim: rgba(0,109,53,0.10);
@@ -3652,7 +3652,7 @@ html[data-theme="light"] {
--accent-green-border: rgba(0,109,53,0.28);
--shadow-color: rgba(50,80,130,0.18);
/* — Glows become subtle drop shadows in light mode — */
/* - Glows become subtle drop shadows in light mode - */
--glow-orange: 0 0 0 1px rgba(196,78,0,0.25), 0 1px 6px rgba(196,78,0,0.18);
--glow-cyan: 0 0 0 1px rgba(0,98,184,0.25), 0 1px 6px rgba(0,98,184,0.18);
--glow-green: 0 0 0 1px rgba(0,109,53,0.25), 0 1px 6px rgba(0,109,53,0.18);
@@ -3663,30 +3663,30 @@ html[data-theme="light"] {
--glow-green-intense: 0 0 0 2px rgba(0,109,53,0.35), 0 2px 10px rgba(0,109,53,0.25);
--glow-amber-intense: 0 0 0 2px rgba(138,90,0,0.35), 0 2px 10px rgba(138,90,0,0.25);
/* — Box glows (card/input focus rings) — */
/* - Box glows (card/input focus rings) - */
--box-glow-orange: 0 0 0 2px rgba(196,78,0,0.22), 0 2px 8px rgba(196,78,0,0.12);
--box-glow-cyan: 0 0 0 2px rgba(0,98,184,0.22), 0 2px 8px rgba(0,98,184,0.12);
--box-glow-green: 0 0 0 2px rgba(0,109,53,0.22), 0 2px 8px rgba(0,109,53,0.12);
--box-glow-red: 0 0 0 2px rgba(181,0,31,0.22), 0 2px 8px rgba(181,0,31,0.12);
--box-glow-amber: 0 0 0 2px rgba(138,90,0,0.22), 0 2px 8px rgba(138,90,0,0.12);
/* — Syntax highlight — */
/* - Syntax highlight - */
--color-tok-cmt: #2e6540;
color-scheme: light;
}
/* — CRT / vignette / scanlines — off in light mode — */
/* - CRT / vignette / scanlines - off in light mode - */
html[data-theme="light"] body::before,
html[data-theme="light"] body::after { display: none; }
/* — Dot-grid: neutral gray, not blue — */
/* - Dot-grid: neutral gray, not blue - */
html[data-theme="light"] {
background-image: radial-gradient(circle, rgba(90,110,150,0.14) 1px, transparent 1px);
background-color: var(--bg-primary);
}
/* — Layout chrome — */
/* - Layout chrome - */
html[data-theme="light"] .lt-header {
background: rgba(237,240,245,0.97);
border-bottom-color: var(--border-color);
@@ -3704,7 +3704,7 @@ html[data-theme="light"] .lt-nav-drawer {
}
html[data-theme="light"] .lt-nav-drawer-overlay { background: rgba(0,0,0,0.25); }
/* — Nav links — */
/* - Nav links - */
html[data-theme="light"] .lt-nav-link,
html[data-theme="light"] .lt-nav-link:hover { color: var(--text-secondary); }
html[data-theme="light"] .lt-nav-link.active { color: var(--accent-orange); }
@@ -3716,7 +3716,7 @@ html[data-theme="light"] .lt-sidebar-nav-link { color: var(--text-seconda
html[data-theme="light"] .lt-sidebar-nav-link:hover { background: var(--accent-cyan-dim); }
html[data-theme="light"] .lt-sidebar-nav-link.active { background: var(--accent-orange-dim); color: var(--accent-orange); }
/* — Surfaces: cards, frames, sections — */
/* - Surfaces: cards, frames, sections - */
html[data-theme="light"] .lt-card,
html[data-theme="light"] .lt-frame {
background: var(--bg-card);
@@ -3733,7 +3733,7 @@ html[data-theme="light"] .lt-frame::before { color: var(--accent-orange); opacit
html[data-theme="light"] .lt-frame-bl,
html[data-theme="light"] .lt-frame-br { color: var(--accent-cyan); opacity: 0.5; }
/* — Form controls — */
/* - Form controls - */
html[data-theme="light"] .lt-input,
html[data-theme="light"] .lt-select,
html[data-theme="light"] .lt-textarea {
@@ -3769,7 +3769,7 @@ html[data-theme="light"] select option:checked {
}
html[data-theme="light"] .lt-label { color: var(--text-muted); }
/* — Buttons — */
/* - Buttons - */
html[data-theme="light"] .lt-btn {
background: var(--bg-secondary);
border-color: var(--border-color);
@@ -3785,13 +3785,13 @@ html[data-theme="light"] .lt-btn-danger { background: var(--accent-red); color
html[data-theme="light"] .lt-btn-ghost { background: transparent; border-color: var(--border-color); color: var(--text-secondary); }
html[data-theme="light"] .lt-btn-ghost:hover { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
/* — Tables — */
/* - Tables - */
html[data-theme="light"] .lt-table th { background: var(--bg-secondary); color: var(--text-muted); border-color: var(--border-color); }
html[data-theme="light"] .lt-table td { border-color: var(--border-dim); color: var(--text-secondary); }
html[data-theme="light"] .lt-table tr:hover td { background: rgba(0,98,184,0.04); }
html[data-theme="light"] .lt-table-wrap { border-color: var(--border-color); }
/* — Badges & status — */
/* - Badges & status - */
html[data-theme="light"] .lt-badge { background: var(--bg-tertiary); color: var(--text-secondary); }
html[data-theme="light"] .lt-badge-open { background: rgba(0,109,53,0.12); color: #006d35; }
html[data-theme="light"] .lt-badge-closed { background: rgba(90,110,150,0.12); color: #5a6e8c; }
@@ -3804,7 +3804,7 @@ html[data-theme="light"] .lt-badge-p3 { background: rgba(138,90,0,0.12)
html[data-theme="light"] .lt-badge-p4 { background: rgba(50,80,130,0.10); color: #2d3d56; }
html[data-theme="light"] .lt-badge-admin { background: rgba(107,47,184,0.12); color: #6b2fb8; }
/* — Toast — */
/* - Toast - */
html[data-theme="light"] .lt-toast {
background: #ffffff;
border-color: var(--border-color);
@@ -3816,7 +3816,7 @@ html[data-theme="light"] .lt-toast {
html[data-theme="light"] .lt-toast-icon { opacity: 0.9; }
html[data-theme="light"] .lt-toast-msg { color: var(--text-primary); }
/* — Modals — */
/* - Modals - */
html[data-theme="light"] .lt-modal-overlay { background: rgba(30,40,70,0.45); }
html[data-theme="light"] .lt-modal {
background: var(--bg-card);
@@ -3832,7 +3832,7 @@ html[data-theme="light"] .lt-modal-footer {
border-top-color: var(--border-color);
}
/* — Command palette — */
/* - Command palette - */
html[data-theme="light"] .lt-cmd-overlay { background: rgba(30,40,70,0.45); }
html[data-theme="light"] .lt-cmd-palette { background: var(--bg-card); border-color: var(--border-color); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
html[data-theme="light"] .lt-cmd-input { background: var(--bg-input); color: var(--text-primary); border-color: var(--border-color); }
@@ -3842,13 +3842,13 @@ html[data-theme="light"] .lt-cmd-item:hover,
html[data-theme="light"] .lt-cmd-item.is-active { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
html[data-theme="light"] .lt-cmd-group-label { color: var(--text-dim); background: var(--bg-secondary); }
/* — Context menu — */
/* - Context menu - */
html[data-theme="light"] .lt-context-menu { background: var(--bg-card); border-color: var(--border-color); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
html[data-theme="light"] .lt-context-menu-item { color: var(--text-secondary); }
html[data-theme="light"] .lt-context-menu-item:hover { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
html[data-theme="light"] .lt-context-menu-divider { background: var(--border-dim); }
/* — Right drawer — */
/* - Right drawer - */
html[data-theme="light"] .lt-drawer-right {
background: var(--bg-card);
border-left-color: var(--border-color);
@@ -3858,7 +3858,7 @@ html[data-theme="light"] .lt-drawer-right-header { background: var(--bg-seconda
html[data-theme="light"] .lt-drawer-right-footer { background: var(--bg-secondary); border-top-color: var(--border-color); }
html[data-theme="light"] .lt-drawer-right-overlay { background: rgba(30,40,70,0.35); }
/* — Nav dropdown menu — */
/* - Nav dropdown menu - */
html[data-theme="light"] .lt-nav-dropdown-menu {
background: var(--bg-card);
border-color: var(--border-color);
@@ -3873,7 +3873,7 @@ html[data-theme="light"] .lt-nav-dropdown-menu li a:hover {
background: var(--accent-orange-dim);
}
/* — Dropdowns & notification panel — */
/* - Dropdowns & notification panel - */
html[data-theme="light"] .lt-dropdown-panel {
background: var(--bg-card);
border-color: var(--border-color);
@@ -3893,98 +3893,98 @@ html[data-theme="light"] .lt-notif-item:hover { background: var(--bg-seconda
html[data-theme="light"] .lt-notif-item--unread { background: rgba(0,98,184,0.05); }
html[data-theme="light"] .lt-notif-panel-footer { border-top-color: var(--border-dim); }
/* — Sidebar / accordion — */
/* - Sidebar / accordion - */
html[data-theme="light"] .lt-accordion-header { background: var(--bg-secondary); color: var(--text-primary); border-color: var(--border-color); }
html[data-theme="light"] .lt-accordion-header:hover { background: var(--bg-tertiary); }
html[data-theme="light"] .lt-accordion-body { border-color: var(--border-color); background: var(--bg-card); }
/* — Code / terminal — */
/* - Code / terminal - */
html[data-theme="light"] code,
html[data-theme="light"] .lt-code-block { background: var(--bg-terminal); color: var(--text-primary); border-color: var(--border-color); }
html[data-theme="light"] .lt-code-block .comment { color: #6c7e99; }
/* — Stat cards — */
/* - Stat cards - */
html[data-theme="light"] .lt-stat-card { background: var(--bg-card); border-color: var(--border-color); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
html[data-theme="light"] .lt-stat-card:hover { box-shadow: var(--box-glow-cyan); border-color: var(--accent-cyan); }
/* — Timeline — */
/* - Timeline - */
html[data-theme="light"] .lt-timeline-item::before { background: var(--border-color); }
html[data-theme="light"] .lt-timeline-actor { color: var(--accent-cyan); }
html[data-theme="light"] .lt-timeline-body { color: var(--text-secondary); }
/* — Dividers — */
/* - Dividers - */
html[data-theme="light"] .lt-divider::before,
html[data-theme="light"] .lt-divider::after { background: var(--border-color); }
html[data-theme="light"] .lt-divider-label { color: var(--text-dim); }
/* — Tags / chips — */
/* - Tags / chips - */
html[data-theme="light"] .lt-tag { background: var(--bg-tertiary); border-color: var(--border-color); color: var(--text-secondary); }
/* — Tooltips — */
/* - Tooltips - */
html[data-theme="light"] [data-tooltip]::before { background: var(--bg-terminal); color: var(--text-primary); }
html[data-theme="light"] [data-tooltip]::after { border-top-color: var(--bg-terminal); }
/* — Pagination — */
/* - Pagination - */
html[data-theme="light"] .lt-page-btn { background: var(--bg-card); border-color: var(--border-color); color: var(--text-secondary); }
html[data-theme="light"] .lt-page-btn:hover { background: var(--accent-cyan-dim); border-color: var(--accent-cyan); color: var(--accent-cyan); }
html[data-theme="light"] .lt-page-btn.active { background: var(--accent-cyan); color: #fff; border-color: var(--accent-cyan); }
html[data-theme="light"] .lt-page-btn[disabled] { opacity: 0.4; }
/* — Tabs — */
/* - Tabs - */
html[data-theme="light"] .lt-tab { color: var(--text-muted); border-bottom-color: transparent; }
html[data-theme="light"] .lt-tab:hover { color: var(--text-primary); }
html[data-theme="light"] .lt-tab.active { color: var(--accent-orange); border-bottom-color: var(--accent-orange); }
html[data-theme="light"] .lt-tabs { border-bottom-color: var(--border-color); }
/* — Offline banner — */
/* - Offline banner - */
html[data-theme="light"] .lt-offline-banner { background: rgba(138,90,0,0.12); color: var(--accent-amber); border-color: rgba(138,90,0,0.25); }
/* — WS status indicator — */
/* - WS status indicator - */
html[data-theme="light"] .lt-ws-status { color: var(--text-muted); background: var(--bg-tertiary); border-color: var(--border-color); }
/* — Boot overlay — */
/* - Boot overlay - */
html[data-theme="light"] .lt-boot-overlay { background: var(--bg-primary); }
html[data-theme="light"] .lt-boot-text { color: var(--accent-cyan); }
/* — Section header accent arrow — */
/* - Section header accent arrow - */
html[data-theme="light"] .lt-section-title::before { color: var(--accent-orange); opacity: 0.8; }
/* — Breadcrumbs — */
/* - Breadcrumbs - */
html[data-theme="light"] .lt-breadcrumb-item a { color: var(--text-muted); }
html[data-theme="light"] .lt-breadcrumb-item.active { color: var(--text-primary); }
html[data-theme="light"] .lt-breadcrumb-sep { color: var(--text-dim); }
/* — Progress bars — */
/* - Progress bars - */
html[data-theme="light"] .lt-progress { background: var(--bg-tertiary); }
html[data-theme="light"] .lt-progress-bar { background: var(--accent-cyan); }
/* — Skeleton loader — */
/* - Skeleton loader - */
html[data-theme="light"] .lt-skeleton { background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%); }
/* — Dropzone — */
/* - Dropzone - */
html[data-theme="light"] .lt-dropzone { background: var(--bg-terminal); border-color: var(--border-color); }
html[data-theme="light"] .lt-dropzone.is-over { border-color: var(--accent-cyan); background: var(--accent-cyan-dim); }
/* — Wizard steps — */
/* - Wizard steps - */
html[data-theme="light"] .lt-wizard-step-num { background: var(--bg-tertiary); color: var(--text-muted); border-color: var(--border-color); }
html[data-theme="light"] .lt-wizard-step.active .lt-wizard-step-num { background: var(--accent-cyan); color: #fff; border-color: var(--accent-cyan); }
html[data-theme="light"] .lt-wizard-step.done .lt-wizard-step-num { background: var(--accent-green); color: #fff; border-color: var(--accent-green); }
html[data-theme="light"] .lt-wizard-connector { background: var(--border-color); }
/* — Avatar — */
/* - Avatar - */
html[data-theme="light"] .lt-avatar { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-color); }
/* — Lightbox — */
/* - Lightbox - */
html[data-theme="light"] .lt-lightbox-overlay { background: rgba(15,20,40,0.92); }
/* — Split pane divider — */
/* - Split pane divider - */
html[data-theme="light"] .lt-split-divider { background: var(--border-color); }
html[data-theme="light"] .lt-split-divider:hover { background: var(--accent-cyan); }
/* — Theme button (active state in light mode) — */
/* - Theme button (active state in light mode) - */
html[data-theme="light"] .lt-theme-btn { color: var(--accent-orange); }
/* — Text glow utilities: replace neon with ink shadow in light mode — */
/* - Text glow utilities: replace neon with ink shadow in light mode - */
html[data-theme="light"] .lt-text-orange { text-shadow: none; color: var(--accent-orange); }
html[data-theme="light"] .lt-text-cyan { text-shadow: none; color: var(--accent-cyan); }
html[data-theme="light"] .lt-text-green { text-shadow: none; color: var(--accent-green); }
@@ -3992,19 +3992,19 @@ html[data-theme="light"] .lt-text-red { text-shadow: none; color: var(--acce
html[data-theme="light"] .lt-text-amber { text-shadow: none; color: var(--accent-amber); }
html[data-theme="light"] .lt-text-muted { color: var(--text-muted); }
/* — Markdown — */
/* - Markdown - */
html[data-theme="light"] .lt-markdown code { background: var(--bg-secondary); color: var(--accent-cyan); }
html[data-theme="light"] .lt-markdown blockquote { border-left-color: var(--accent-cyan); background: var(--accent-cyan-dim); }
/* — KV grid — */
/* - KV grid - */
html[data-theme="light"] .lt-kv-row { border-bottom-color: var(--border-dim); }
html[data-theme="light"] .lt-kv-label { color: var(--text-dim); }
/* — Empty state — */
/* - Empty state - */
html[data-theme="light"] .lt-empty-state-icon { color: var(--text-dim); }
html[data-theme="light"] .lt-empty-state-title { color: var(--text-secondary); }
/* — Combobox / typeahead — */
/* - Combobox / typeahead - */
html[data-theme="light"] .lt-combobox-dropdown,
html[data-theme="light"] .lt-typeahead-dropdown { background: var(--bg-card); border-color: var(--border-color); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
html[data-theme="light"] .lt-combobox-option:hover,
@@ -4013,16 +4013,16 @@ html[data-theme="light"] .lt-typeahead-item.is-focused,
html[data-theme="light"] .lt-typeahead-item:focus-visible { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
html[data-theme="light"] .lt-combobox-tag { background: var(--accent-cyan-dim); color: var(--accent-cyan); border-color: var(--accent-cyan-border); }
/* — Sortable ghost — */
/* - Sortable ghost - */
html[data-theme="light"] .lt-sortable-placeholder { background: var(--accent-cyan-dim); border-color: var(--accent-cyan); }
/* — P-level row accents — softer in light mode — */
/* - P-level row accents - softer in light mode - */
html[data-theme="light"] .lt-row-p1 { border-left-color: var(--accent-red); }
html[data-theme="light"] .lt-row-p2 { border-left-color: var(--accent-orange); }
html[data-theme="light"] .lt-row-p3 { border-left-color: var(--accent-amber); }
html[data-theme="light"] .lt-row-p4 { border-left-color: rgba(50,80,130,0.25); }
/* — Scrollbar light theme — */
/* - Scrollbar light theme - */
html[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-secondary); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--bg-tertiary); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }
@@ -4218,7 +4218,7 @@ html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: var(--acc
clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
transform: translateX(100%);
transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
z-index: calc(var(--z-overlay) + 2); /* 10001 — same level as nav overlay */
z-index: calc(var(--z-overlay) + 2); /* 10001 - same level as nav overlay */
display: flex;
flex-direction: column;
overflow: hidden;
@@ -4504,8 +4504,8 @@ body.lt-is-offline .lt-main { margin-top: 2rem; transition: margin-top 0.25s eas
/* ----------------------------------------------------------------
61. SLA BANNER
----------------------------------------------------------------
lt-sla-p1 — pulsing red banner for critical SLA breach
lt-sla-p2 — static amber banner for high-priority SLA warning
lt-sla-p1 - pulsing red banner for critical SLA breach
lt-sla-p2 - static amber banner for high-priority SLA warning
---------------------------------------------------------------- */
.lt-sla-p1,
.lt-sla-p2 {
@@ -4643,7 +4643,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
user-select: none;
position: relative; /* needed so img can overlay initials absolutely */
}
/* Image overlays initials — hidden by JS (.lt-avatar-img-err) when broken */
/* Image overlays initials - hidden by JS (.lt-avatar-img-err) when broken */
.lt-avatar img {
position: absolute;
inset: 0;
@@ -4712,7 +4712,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
}
.lt-split-divider {
flex: 0 0 5px;
background: var(--border-color); /* 16% opacity — clearly visible */
background: var(--border-color); /* 16% opacity - clearly visible */
cursor: col-resize;
transition: background 0.15s;
position: relative;
@@ -4796,7 +4796,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
position: relative;
width: 100%;
}
/* Sparkline — inline mini chart */
/* Sparkline - inline mini chart */
.lt-sparkline {
display: inline-block;
vertical-align: middle;
@@ -4829,7 +4829,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
---------------------------------------------------------------- */
/* Toast container already exists in section 14; these are addons */
#lt-toast-container {
/* Stack from bottom — newest on top */
/* Stack from bottom - newest on top */
display: flex;
flex-direction: column-reverse;
gap: 0.5rem;
@@ -4962,7 +4962,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
/* ----------------------------------------------------------------
70. WIZARD / MULTI-STEP FORM
---------------------------------------------------------------- */
/* Step container — hide non-active steps */
/* Step container - hide non-active steps */
[data-wizard-step] { display: none; }
[data-wizard-step].is-active { display: block; }
@@ -5510,12 +5510,12 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
Targeted overrides addressing audit findings.
---------------------------------------------------------------- */
/* — Modal max-width cap (prevents 4K-wide modals) — */
/* - Modal max-width cap (prevents 4K-wide modals) - */
.lt-modal { max-width: 640px; }
@media (max-width: 767px) { .lt-modal { max-width: 96vw; } }
@media (max-width: 479px) { .lt-modal { max-width: 100vw; } }
/* — Landscape phone: better modal + nav spacing — */
/* - Landscape phone: better modal + nav spacing - */
@media (max-height: 500px) and (orientation: landscape) {
.lt-modal { max-height: calc(100vh - 48px); overflow-y: auto; }
.lt-modal-body { max-height: calc(100vh - 130px); overflow-y: auto; }
@@ -5525,7 +5525,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
.lt-boot-overlay { display: none !important; }
}
/* — Dropdown panels: stay within viewport on SM/XS — */
/* - Dropdown panels: stay within viewport on SM/XS - */
@media (max-width: 767px) {
.lt-dropdown-panel { max-width: 90vw; font-size: 0.8rem; }
.lt-dropdown-panel--right { left: auto; right: 0; }
@@ -5566,7 +5566,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
.lt-split-pane { flex: none; width: 100% !important; }
}
/* — XS font-size floors (nothing below 0.72rem = ~11.5px) — */
/* - XS font-size floors (nothing below 0.72rem = ~11.5px) - */
@media (max-width: 479px) {
.lt-cmd-group-label { font-size: 0.72rem; }
.lt-cmd-item-label { font-size: 0.78rem; }
@@ -5585,7 +5585,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
.lt-badge-admin { display: none; }
}
/* — Safe-area insets for notched devices (header-right) — */
/* - Safe-area insets for notched devices (header-right) - */
@supports (padding: max(0px)) {
.lt-header-right {
padding-right: max(var(--space-md), env(safe-area-inset-right));
@@ -5600,7 +5600,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
}
}
/* — Header: tighter brand on XS to prevent overflow — */
/* - Header: tighter brand on XS to prevent overflow - */
@media (max-width: 479px) {
.lt-header { padding: 0 var(--space-sm); gap: var(--space-xs); }
.lt-header-left { gap: var(--space-xs); flex-shrink: 1; min-width: 0; }
@@ -5615,14 +5615,14 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
.lt-header-right { gap: var(--space-xs); flex-shrink: 0; }
}
/* — Stats grid: never below 2-col, but use auto-fit for flexibility — */
/* - Stats grid: never below 2-col, but use auto-fit for flexibility - */
@media (max-width: 767px) {
.lt-stats-grid {
grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
}
/* — Lightbox: full-screen on any phone — */
/* - Lightbox: full-screen on any phone - */
@media (max-width: 767px) {
.lt-lightbox-overlay {
padding: 0;
@@ -5644,7 +5644,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
.lt-lightbox-nav-next { right: 1rem; }
}
/* — Wizard steps: compact on XS — */
/* - Wizard steps: compact on XS - */
@media (max-width: 479px) {
.lt-wizard-steps {
overflow-x: auto;
@@ -5656,7 +5656,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
.lt-wizard-step.active .lt-wizard-step-label { display: block; }
}
/* — Timeline: tighter on XS — */
/* - Timeline: tighter on XS - */
@media (max-width: 479px) {
.lt-timeline-item { padding: var(--space-xs) 0 var(--space-xs) var(--space-md); }
.lt-timeline-item::before { left: 0; }
@@ -5664,13 +5664,13 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
.lt-timeline-body { font-size: 0.75rem; }
}
/* — Code blocks: prevent overflow and fix font on mobile — */
/* - Code blocks: prevent overflow and fix font on mobile - */
@media (max-width: 767px) {
.lt-code-block { font-size: 0.75rem; overflow-x: auto; }
.lt-code-block pre { white-space: pre; word-break: normal; }
}
/* — Pagination: 44px touch targets on coarse pointer — */
/* - Pagination: 44px touch targets on coarse pointer - */
@media (pointer: coarse) {
.lt-page-btn {
min-height: 44px;
@@ -5679,7 +5679,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
}
}
/* — 4K: cap stats grid at 8 columns but use auto-fit — */
/* - 4K: cap stats grid at 8 columns but use auto-fit - */
@media (min-width: 2560px) {
.lt-stats-grid { grid-template-columns: repeat(8, 1fr); max-width: 100%; }
.lt-modal { max-width: 800px; }
@@ -5706,7 +5706,7 @@ html[data-theme="light"] .lt-sla-p2 { background: rgba(138,90,0,0.06); border-c
.lt-footer { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}
/* Footer keyboard hint strip — a row of clickable key+label hints */
/* Footer keyboard hint strip - a row of clickable key+label hints */
.lt-footer-hints { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; }
.lt-footer-hint {
+40 -40
View File
@@ -1,5 +1,5 @@
/**
* LOTUSGUILD TERMINAL DESIGN SYSTEM v1.2 — base.js
* LOTUSGUILD TERMINAL DESIGN SYSTEM v1.2 - base.js
* Core JavaScript utilities shared across all LotusGuild applications
*
* Apps: Tinker Tickets (PHP), PULSE (Node.js), GANDALF (Flask)
@@ -243,7 +243,7 @@
}
// Announce the close so whoever opened the modal can undo optimistic UI or
// clean up a dynamically-inserted overlay. A modal can be dismissed four
// ways — the ✕ button, a Cancel button, a backdrop click, and Escape — and
// ways - the ✕ button, a Cancel button, a backdrop click, and Escape - and
// the last two are handled globally here, so button-only listeners miss them.
el.dispatchEvent(new CustomEvent('lt:modalclose', { bubbles: true }));
}
@@ -319,7 +319,7 @@
---------------------------------------------------------------- */
let _bootFired = false; // in-memory guard: survives within a JS context, resets on true page reload
function runBoot(appName, force) {
if (!force && _bootFired) return; // Fastest guard — blocks any same-page double-call
if (!force && _bootFired) return; // Fastest guard - blocks any same-page double-call
const storageKey = 'lt_booted_' + (appName || 'app');
if (!force && sessionStorage.getItem(storageKey)) return;
_bootFired = true;
@@ -352,7 +352,7 @@
'[ OK ] Scheduled tasks registered',
'[ OK ] Terminal interface rendered',
'',
'> ALL SYSTEMS NOMINAL — ' + name,
'> ALL SYSTEMS NOMINAL: ' + name,
'',
];
@@ -491,7 +491,7 @@
---------------------------------------------------------------- */
function timeAgo(value) {
const date = value instanceof Date ? value : new Date(value);
if (isNaN(date)) return '—';
if (isNaN(date)) return '-';
const diff = Math.floor((Date.now() - date.getTime()) / 1000);
if (diff < 60) return diff + 's ago';
if (diff < 3600) return Math.floor(diff / 60) + 'm ago';
@@ -510,7 +510,7 @@
function formatDate(value) {
const date = value instanceof Date ? value : new Date(value);
if (isNaN(date)) return '—';
if (isNaN(date)) return '-';
try {
return date.toLocaleString(undefined, {
timeZone: global.APP_TIMEZONE || undefined,
@@ -527,7 +527,7 @@
lt.bytes.format(n)
---------------------------------------------------------------- */
function formatBytes(bytes) {
if (bytes == null) return '—';
if (bytes == null) return '-';
const units = ['B','KB','MB','GB','TB']; let i = 0;
while (bytes >= 1024 && i < units.length - 1) { bytes /= 1024; i++; }
return bytes.toFixed(i === 0 ? 0 : 2) + ' ' + units[i];
@@ -1142,9 +1142,9 @@
lt.num.format / compact / percent / pad / clamp / lerp
---------------------------------------------------------------- */
const num = {
format(n, d) { if (n == null || isNaN(n)) return '—'; return Number(n).toLocaleString(undefined, { minimumFractionDigits: d || 0, maximumFractionDigits: d != null ? d : 2 }); },
format(n, d) { if (n == null || isNaN(n)) return '-'; return Number(n).toLocaleString(undefined, { minimumFractionDigits: d || 0, maximumFractionDigits: d != null ? d : 2 }); },
compact(n) { if (Math.abs(n) >= 1e9) return (n/1e9).toFixed(1)+'B'; if (Math.abs(n) >= 1e6) return (n/1e6).toFixed(1)+'M'; if (Math.abs(n) >= 1e3) return (n/1e3).toFixed(1)+'K'; return String(n); },
percent(n, total) { return total ? ((n/total)*100).toFixed(1)+'%' : '—'; },
percent(n, total) { return total ? ((n/total)*100).toFixed(1)+'%' : '-'; },
pad(n, w) { return String(Math.floor(n)).padStart(w, '0'); },
clamp(n, a, b) { return Math.min(b, Math.max(a, n)); },
lerp(a, b, t) { return a + (b - a) * t; },
@@ -1354,7 +1354,7 @@
/* ================================================================
MODULE 35 — VIEWPORT
MODULE 35 - VIEWPORT
Tracks current breakpoint, fires callbacks on change.
lt.viewport.bp() → 'xs'|'sm'|'md'|'lg'|'xl'|'2xl'|'3xl'|'4k'
lt.viewport.is('md') → true if current bp >= md
@@ -1415,7 +1415,7 @@
/* ================================================================
MODULE 36 — MOBILE NAV
MODULE 36 - MOBILE NAV
Hamburger-driven off-canvas navigation drawer with swipe support.
lt.mobileNav.open() / .close() / .toggle()
Auto-inits on [id="lt-menu-btn"] + [id="lt-nav-drawer"]
@@ -1482,7 +1482,7 @@
});
}
// Swipe gesture — open from left edge, close by swiping left
// Swipe gesture - open from left edge, close by swiping left
let _touchStartX = 0;
let _touchStartY = 0;
let _isSwiping = false;
@@ -1540,7 +1540,7 @@
/* ================================================================
MODULE 37 — THEME TOGGLE
MODULE 37 - THEME TOGGLE
lt.theme.toggle()
lt.theme.set('light'|'dark')
lt.theme.get()
@@ -1581,7 +1581,7 @@
};
/* ================================================================
MODULE 38 — NOTIFICATION BADGE
MODULE 38 - NOTIFICATION BADGE
lt.notif.set(el, count)
lt.notif.inc(el)
lt.notif.clear(el)
@@ -1618,7 +1618,7 @@
};
/* ================================================================
MODULE 39 — RIGHT-SIDE DRAWER
MODULE 39 - RIGHT-SIDE DRAWER
lt.rightDrawer.open(id)
lt.rightDrawer.close(id)
lt.rightDrawer.toggle(id)
@@ -1682,7 +1682,7 @@
});
/* ================================================================
MODULE 40 — CONTEXT MENU
MODULE 40 - CONTEXT MENU
lt.contextMenu.register(selector, items)
items = [{ label, icon, kbd, danger, divider, action }]
================================================================ */
@@ -1718,7 +1718,7 @@
_ctxMenu.appendChild(el);
});
_ctxMenu.classList.add('is-open');
// Position — keep on screen
// Position - keep on screen
const vw = window.innerWidth, vh = window.innerHeight;
const mw = _ctxMenu.offsetWidth || 180, mh = _ctxMenu.offsetHeight || 200;
_ctxMenu.style.left = Math.max(8, Math.min(x, vw - mw - 8)) + 'px';
@@ -1749,7 +1749,7 @@
};
/* ================================================================
MODULE 41 — OFFLINE DETECTION
MODULE 41 - OFFLINE DETECTION
lt.offline.onOnline(fn)
lt.offline.onOffline(fn)
lt.offline.isOnline()
@@ -1764,7 +1764,7 @@
_offlineBanner.className = 'lt-offline-banner';
_offlineBanner.setAttribute('role', 'alert');
_offlineBanner.setAttribute('aria-live', 'assertive');
_offlineBanner.innerHTML = '<span class="lt-dot lt-dot--red"></span> NO NETWORK CONNECTION — RECONNECTING...';
_offlineBanner.innerHTML = '<span class="lt-dot lt-dot--red"></span> NO NETWORK CONNECTION: RECONNECTING...';
document.body.appendChild(_offlineBanner);
}
}
@@ -1775,7 +1775,7 @@
window.addEventListener('offline', () => {
document.body.classList.add('lt-is-offline');
_offlineGetBanner().classList.add('is-visible');
toast.warning('Connection lost — working offline');
toast.warning('Connection lost, working offline');
_offlineHandlers.forEach(fn => fn());
});
window.addEventListener('online', () => {
@@ -1791,7 +1791,7 @@
};
/* ================================================================
MODULE 42 — WEBSOCKET MANAGER
MODULE 42 - WEBSOCKET MANAGER
lt.ws.connect(url, opts)
opts: { protocols, onOpen, onMessage, onClose, onError,
reconnect: true, reconnectDelay: 2000, maxRetries: 10 }
@@ -1877,7 +1877,7 @@
};
/* ================================================================
MODULE 43 — MULTI-SELECT COMBOBOX
MODULE 43 - MULTI-SELECT COMBOBOX
lt.combobox.init(inputEl, options, opts)
options = [{ value, label, icon? }]
opts: { max, placeholder, onChange }
@@ -1991,7 +1991,7 @@
};
/* ================================================================
MODULE 44 — AUTOCOMPLETE / TYPEAHEAD
MODULE 44 - AUTOCOMPLETE / TYPEAHEAD
lt.typeahead.init(inputEl, source, opts)
source: array or async fn(query) => [{value, label, icon?, meta?}]
opts: { minChars, debounceMs, onSelect, maxResults }
@@ -2082,7 +2082,7 @@
};
/* ================================================================
MODULE 45 — COOKIE UTILITY
MODULE 45 - COOKIE UTILITY
lt.cookie.set(name, value, days?, opts?)
lt.cookie.get(name)
lt.cookie.del(name)
@@ -2113,7 +2113,7 @@
};
/* ================================================================
MODULE 46 — SPLIT PANE
MODULE 46 - SPLIT PANE
lt.splitPane.init(containerEl, opts)
opts: { minA, minB, initial (0-1), vertical, onResize }
================================================================ */
@@ -2187,7 +2187,7 @@
};
/* ================================================================
MODULE 48 — SIDEBAR SUBMENUS
MODULE 48 - SIDEBAR SUBMENUS
Auto-inits .lt-sidebar-group elements.
Click label → toggle .is-open + animate submenu.
================================================================ */
@@ -2218,7 +2218,7 @@
}
/* ================================================================
MODULE 49 — INFINITE SCROLL
MODULE 49 - INFINITE SCROLL
lt.infiniteScroll.init(containerEl, loadFn, opts)
loadFn: async fn() → { items: [], done: bool }
opts: { threshold (px from bottom), loadingClass, sentinelClass }
@@ -2284,7 +2284,7 @@
};
/* ================================================================
MODULE 49 — WIZARD / MULTI-STEP FORM
MODULE 49 - WIZARD / MULTI-STEP FORM
lt.wizard.init(containerEl, opts)
opts: { onStep(n, total), onComplete(data), validate(n) }
HTML: [data-wizard-step="1"] ... [data-wizard-nav]
@@ -2377,7 +2377,7 @@
};
/* ================================================================
MODULE 50 — SORTABLE (drag-to-reorder lists/kanban)
MODULE 50 - SORTABLE (drag-to-reorder lists/kanban)
lt.sortable.init(listEl, opts)
opts: { handle (selector), onSort(newOrder, movedEl), group }
Supports cross-list dragging when group matches.
@@ -2466,7 +2466,7 @@
};
/* ================================================================
MODULE 51 — COUNTDOWN / TIMER
MODULE 51 - COUNTDOWN / TIMER
lt.timer.countdown(el, targetDate, opts)
lt.timer.stopwatch(el, opts)
el = DOM element or selector; updates .textContent
@@ -2523,7 +2523,7 @@
};
/* ================================================================
MODULE 52 — IMAGE LIGHTBOX
MODULE 52 - IMAGE LIGHTBOX
lt.lightbox.init(selector, opts)
Clicking any matched image opens a full-screen overlay with
prev/next, keyboard nav, zoom.
@@ -2625,12 +2625,12 @@
};
/* ================================================================
MODULE 53 — AUTH / JWT HELPERS
MODULE 53 - AUTH / JWT HELPERS
Extends lt.api with token refresh support.
lt.auth.setToken(accessToken, refreshToken, expiresIn)
lt.auth.getToken()
lt.auth.refresh() — explicit refresh
lt.auth.onExpire(fn) — callback when token expires & refresh fails
lt.auth.refresh() - explicit refresh
lt.auth.onExpire(fn) - callback when token expires & refresh fails
lt.auth.clear()
Auto-intercepts lt.api calls to inject Bearer header
and silently refreshes when token is within 60s of expiry.
@@ -2688,7 +2688,7 @@
isExpiringSoon: (secs = 60) => _authExpiry > 0 && Date.now() >= _authExpiry - secs * 1000,
};
// Patch lt.api — auth-aware wrapper (renamed to avoid strict-mode duplicate declaration)
// Patch lt.api - auth-aware wrapper (renamed to avoid strict-mode duplicate declaration)
async function _apiFetchAuth(method, url, body) {
if (_authAccess && auth.isExpiringSoon()) await auth.refresh();
const opts = { method, headers: Object.assign({ 'Content-Type': 'application/json' }, csrfHeaders()) };
@@ -2716,7 +2716,7 @@
api.delete = (u, b) => _apiFetchAuth('DELETE', u, b);
/* ================================================================
MODULE 54 — MARKDOWN RENDERER
MODULE 54 - MARKDOWN RENDERER
lt.markdown.render(mdString) → HTML string (sanitized)
lt.markdown.init(selector) → renders all matching el's .textContent
Uses a built-in micro-renderer (no deps) for common syntax.
@@ -2746,12 +2746,12 @@
.replace(/\*(.+?)\*/g, '<em>$1</em>')
.replace(/__(.+?)__/g, '<strong>$1</strong>')
.replace(/_(.+?)_/g, '<em>$1</em>')
// Links — block javascript: and data: URIs
// Links - block javascript: and data: URIs
.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (_, text, url) => {
const safeUrl = /^(https?:\/\/|\/|#|\.\.?\/)/i.test(url) ? url : '#';
return `<a href="${safeUrl}" target="_blank" rel="noopener noreferrer">${escHtml(text)}</a>`;
})
// Images — block javascript: and data: URIs
// Images - block javascript: and data: URIs
.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, (_, alt, src) => {
const safeSrc = /^(https?:\/\/|\/|\.\.?\/)/i.test(src) ? src : '';
return `<img src="${safeSrc}" alt="${escHtml(alt)}" style="max-width:100%">`;
@@ -2783,7 +2783,7 @@
};
/* ================================================================
MODULE 55 — PAGINATION
MODULE 55 - PAGINATION
lt.pagination.init(navEl, opts)
opts: { total, perPage, page, onChange(page) }
Renders page buttons inside navEl; re-renders on page change.
@@ -2875,7 +2875,7 @@
if (o.boot) {
const bootEl = document.getElementById('lt-boot');
if (bootEl) {
const name = o.bootName || bootEl.dataset.appName || document.title.split('—')[0].trim();
const name = o.bootName || bootEl.dataset.appName || document.title.split(' | ')[0].trim();
boot.run(name);
}
}
+20
View File
@@ -43,3 +43,23 @@ test('quick command offers every online worker', async ({ page }) => {
await page.goto('/quick');
await expect(page.locator('#qc-worker option', { hasText: 'online' })).toHaveCount(3);
});
test('no page shows an em or en dash (house style)', async ({ page }) => {
for (const p of PAGES) {
await page.goto(p.path);
await page.waitForLoadState('networkidle');
const text = await page.evaluate(() => document.title + '\n' + document.body.innerText);
// En and em dash, built from char codes so this file itself stays dash-free.
const dash = new RegExp('[' + String.fromCharCode(0x2013, 0x2014) + ']');
const hits = text.split('\n').filter(l => dash.test(l));
expect(hits, `${p.path} shows dashes`).toEqual([]);
}
});
test.describe('first visit in a session', () => {
test('the boot screen names the app without a dash', async ({ page }) => {
await page.addInitScript(() => { try { sessionStorage.removeItem('lt_boot'); } catch (e) { /* ignore */ } });
await page.goto('/');
await expect(page.locator('#lt-boot-text')).toContainText('ALL SYSTEMS NOMINAL: PULSE', { timeout: 15_000 });
});
});