// THE COUNTER (module `counter`, a part of the shell): the deck's running // tally of named series, a cell per series the cut counts, each stepping as // a mark's stamp lands (report-to-video counter.mjs; factcheck.mjs // `tallyCues`; chrome-deck.mjs draws the cells). The finale reads its totals // (`counter.totals`); the claim checks name its series. import { COUNTER_LABELS, COUNTER_POSITIONS, COUNTER_SHAPES, COUNTER_SHOW_AT, resolveCounter } from "../counter.mjs"; import { settingsOf } from "./settings.mjs"; import { defineModule } from "./contract.mjs"; export default defineModule({ id: "counter", version: 1, z: 14, kind: "part", host: "shell", slot: "inline", // Its form in the stacked vertical deck (vertical-deck.mjs). vertical: { slot: "inline" }, title: "Counter", summary: "A running tally of named series in the deck, each cell stepping as a mark's stamp lands.", configKey: "render.chrome.deck.counter", defaults: { series: [], show: true, position: "right", showAt: "always", labels: "caps" }, validate: settingsOf("counter").validate, resolve: resolveCounter, provides: ["counter.totals", "counter.series"], ui: [ { key: "series", type: "series", label: "Series", item: [ { key: "id", type: "text", label: "Id" }, { key: "label", type: "text", label: "Label" }, { key: "color", type: "color", label: "Colour" }, { key: "stampLabel", type: "text", label: "Stamp word" }, { key: "tallyLabel", type: "text", label: "Cell word" }, { key: "showAt", type: "enum", options: COUNTER_SHOW_AT, label: "Show" }, { key: "shape", type: "enum", options: COUNTER_SHAPES, label: "Shape" }, { key: "unit", type: "text", label: "Unit" }, ] }, { key: "show", type: "boolean", label: "Show the cells", default: true }, { key: "position", type: "enum", options: COUNTER_POSITIONS, label: "Side", default: "right" }, { key: "showAt", type: "enum", options: COUNTER_SHOW_AT, label: "Cells appear", default: "always" }, { key: "labels", type: "enum", options: COUNTER_LABELS, label: "Cell words", default: "caps" }, ], docs: { heading: "Counter", intro: "The deck's tally as named series (`render.chrome.deck.counter`). A clip's mark names the series it counts (`claim.verdict`, or its alias `claim.counter`); a deck claim's `tally` names one by id or label. Without `counter` the series are the fact-check verdicts with `factcheck.verdicts`' relabels and `factcheck.tally`'s settings, as ever; `umtool migrate

` writes those as a `counter` (the render is the same) and the two are not set together.", rows: [ ["`deck.counter.series[]`", "1–12 `{id, label, color?, stampLabel?, tallyLabel?, showAt?, shape?, unit?}` -- an `id` a letter then letters, digits, `_` `-`; a verdict's id (`CORROBORATED` …) takes its default label, colour and shape; `label` ≤ 24 (≤ 32 as written), fitted to the cell as the verdicts' are. Up to 8 the cells are 124 px; past 8 they narrow into one row of 1040 px (9 → 108 px, 10 → 96, 12 → 79), so the title keeps a column of about 520 px, and a label wider than its cell is drawn smaller (down to 10 px), then cut with an ellipsis -- never a refused chrome; the lint names it", "`umtool look

deck.counter='{\"series\":[{\"id\":\"seizures\",\"label\":\"Seizures\",\"color\":\"#e5534b\",\"stampLabel\":\"Seizure\"}]}'`"], ["`deck.counter.labels`", "`caps` `as-written` · default `caps`: each cell's word capitalised on one line (its `tallyLabel`, else its label or the last words of it that fit). `as-written`: the label in its own case (\"close to MAGA\"), letter-spaced 0.02 em, broken between words into at most two lines, never cut to its last words -- one that does not fit is drawn smaller (down to 10 px), then a word or its second line is cut with an ellipsis; the lint names it", "`umtool look

deck.counter.labels=as-written`"], ["`deck.counter.series[].shape`", "`circle` `diamond` `square` `triangle` `ring` · default by place (a verdict's own)", "same"], ["`deck.counter.series[].unit`", "≤ 24 · the noun a count claim's number reads (default its label, lower-cased)", "same"], ["`deck.counter.show`, `.position`, `.showAt`", "bool · `right` `left` · `always` `first` (a series' own `showAt` wins) · defaults `true`, `right`, `always`. A series that SAYS `always` (its own `showAt`, else the counter's) is a cell from the first frame, dim at 0, whether or not a mark ever counts it (\"Left 0\"); one with no `showAt` said, or `first`, is a cell once it is counted, so one never counted is not drawn. The cells show once the cut counts anything", "same"], ["a mark's series", "`claim.verdict` (or `claim.counter`): one of the series' ids. A clip's mark, or a teaser's (a post shown as a text card: `at` seconds from the card's start; the deck stays up over it)", "`umtool set

mark.add=seizures@190.2` · `umtool set

mark.add=CENTER@2.15`"], ], }, });