(host)
| 312 | ]; |
| 313 | |
| 314 | function initFailureMuseum(host) { |
| 315 | if (!host) return; |
| 316 | host.innerHTML = ""; |
| 317 | host.classList.add("lc-failures"); |
| 318 | |
| 319 | host.appendChild(htmlEl("div", { class: "lc-failures__head" }, |
| 320 | htmlEl("span", { class: "lc-mono lc-muted" }, "common failure modes · and the rubric that catches each"))); |
| 321 | |
| 322 | const grid = htmlEl("div", { class: "lc-failures__grid" }); |
| 323 | FAILURES.forEach((f, i) => { |
| 324 | const card = htmlEl("div", { class: "lc-failures__card", "data-i": i }); |
| 325 | card.style.opacity = "0"; |
| 326 | card.style.transform = "translateY(8px)"; |
| 327 | card.style.transition = "opacity 300ms ease-out, transform 300ms ease-out"; |
| 328 | card.appendChild(htmlEl("p", { class: "lc-failures__eyebrow" }, "failure mode")); |
| 329 | card.appendChild(htmlEl("h4", { class: "lc-failures__name" }, f.name)); |
| 330 | card.appendChild(htmlEl("p", { class: "lc-failures__what" }, f.what)); |
| 331 | card.appendChild(htmlEl("p", { class: "lc-failures__caught" }, [ |
| 332 | htmlEl("span", { class: "lc-failures__caughtLabel" }, "caught by: "), |
| 333 | f.caught, |
| 334 | ])); |
| 335 | grid.appendChild(card); |
| 336 | }); |
| 337 | host.appendChild(grid); |
| 338 | |
| 339 | function reveal() { |
| 340 | grid.querySelectorAll(".lc-failures__card").forEach((card, i) => { |
| 341 | setTimeout(() => { |
| 342 | card.style.opacity = "1"; |
| 343 | card.style.transform = "translateY(0)"; |
| 344 | }, 90 * i); |
| 345 | }); |
| 346 | } |
| 347 | whenInView(host, reveal); |
| 348 | } |
| 349 | |
| 350 | // ─────────────────────────────────────────── 3. SCAFFOLD WIZARD ───────── |
| 351 |
no test coverage detected