// THE FINALE (module `finale`, region `finale`): the cut's last clips with the // rail redrawn large across the top, the counter's final totals under it, // stats cards beside them and the clip in a smaller box (a clip's `layout: // "finale"`, `render.chrome.deck.finale`, finale.mjs). One full-frame window // over the run, laid LAST: its ground covers every region under it while it // is up. chrome-finale.mjs writes the page. import path from "node:path"; import { resolveDeck, snapWindow } from "../deck.mjs"; import { finaleHtml, finaleLayout } from "../chrome-finale.mjs"; import { assertRegion, defineModule } from "./contract.mjs"; import { FINALE_DEFAULTS, resolveFinale } from "../finale.mjs"; import { settingsOf } from "./settings.mjs"; export default defineModule({ id: "finale", version: 1, z: 90, kind: "overlay-window", slot: "full", title: "Finale", summary: "The cut's last clips under the rail redrawn large, the final totals and stats cards.", configKey: "render.chrome.deck.finale", defaults: FINALE_DEFAULTS, validate: settingsOf("finale").validate, resolve: resolveFinale, deps: ["counter.totals", "rail.layout"], provides: ["finale.window"], ui: [ { key: "video", type: "enum", options: ["side", "corner", "hidden"], label: "The clip", default: "side" }, { key: "motion", type: "enum", options: ["grow", "cut"], label: "Motion", default: "grow" }, { key: "totals", type: "boolean", label: "Totals", default: true }, { key: "statsTitle", type: "text", label: "Stats title" }, { key: "stats", type: "stats", label: "Stats cards", max: 8 }, { key: "railLabels", type: "enum", options: ["all", "nodes", "sections", "none"], label: "Rail labels", default: "all" }, { key: "pips", type: "boolean", label: "The finale's clips on the rail", default: true }, { key: "timelineShare", type: "number", min: 0.38, max: 0.6, step: 0.01, label: "Timeline share (auto when unset)" }, { key: "claims", type: "enum", options: ["rotate", "all"], label: "Claim checks", default: "rotate" }, { key: "dietRuns", type: "boolean", label: "Every diet on record under the rail (railLabels sections or none)", default: false }, ], docs: { heading: "Finale", intro: "The full reference is [The finale](#the-finale-the-timeline-in-primary-view). It reads the counter's totals (`counter.totals`) and the rail's layout (`rail.layout`); the counter reads its window (`finale.window`): a mark that would stamp inside it counts as it opens.", rows: [ ["`deck.finale`", "`{video, motion, totals, stats, statsTitle, railLabels, pips, timelineShare, claims, dietRuns}` -- `dietRuns`: the whole diet record under the rail ([Diet runs in the finale](#diet-runs-in-the-finale))", "`umtool look
deck.finale='{…}'`"], ["a clip's `layout`", "`finale` on one run of clips at the end", "`umtool set