Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 99f17204fd04d6b82b436b36e33a8334660dd11e
parent 5b4aaf5e7a4b6cca38003ab66b02fc78bb3ad762
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 20 Nov 2026 21:14:36 -0500

umtool: the gap mark's border is the deck's accent (variant B), with a border setting

The operator picked variant B. GAP_CUE_LOOK now draws the border at full
opacity over a near-black box at 0.9, text white; the border's colour is
the deck's accent (render.palette.accent, the value the deck page draws
its rule and source-line dots in), else #f5b300.

One resolver in common gapCue.mjs, gapCueBorderOf / gapCueLook: the
slice puts the colour on every mark for the module's page, the drawtext
takes the clip's look (and records the border), and Play and the bench
hand GapMarkChip the same colour.

New render.gapCue.border / a clip's gapCue.border: "accent" (default;
absent or null the same) or #rrggbb, validated. CLI: umtool look
gapCue='{"border":"#3aa0ff"}', umtool set gapCue.border=...; the Modules
panel's Border row and the bench's border field with a swatch.

Mark off or unset: nothing changes. Mark on: pages and marked segments
take new keys once (knobs.md says so). Docs regenerated; CHANGELOG.

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Mcommon/lib/report/gapCue.d.mts | 8++++++--
Mcommon/lib/report/gapCue.mjs | 79++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------
Mcommon/lib/report/gapCue.test.ts | 64+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
Meditor/CHANGELOG.md | 11+++++++++++
Mumtool/app/api/report/window/route.ts | 2+-
Mumtool/components/projects/ClipBench.tsx | 12++++++++++--
Mumtool/components/projects/bench/GapCueTools.tsx | 37++++++++++++++++++++++++++++++++++++-
Mumtool/components/projects/review/GapMarkChip.tsx | 9+++++++--
Mumtool/components/projects/review/PlayCut.tsx | 2+-
Mumtool/components/projects/review/playCore.tsx | 4++--
Mumtool/docs/cli.md | 2+-
Mumtool/docs/knobs.md | 23+++++++++++++++++------
Mumtool/lib/cli/groups.mjs | 2+-
Mumtool/lib/report/benchData.ts | 14++++++++++++++
Mumtool/lib/report/gaps-writer.test.mjs | 14++++++++++++++
Mumtool/lib/report/knobsCli.mjs | 5+++--
Mumtool/lib/report/manifest.mjs | 2+-
Mumtool/lib/report/playView.mjs | 5+++--
Mumtool/report-to-video/build-video.mjs | 9++++++---
Mumtool/report-to-video/chrome-gap-cue.mjs | 12++++++++----
Mumtool/report-to-video/gap-cue-slice.mjs | 10++++++----
Mumtool/report-to-video/gap-cue-slice.test.mjs | 56+++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mumtool/report-to-video/gap-mark-place.mjs | 6++++--
Mumtool/report-to-video/gap-mark.mjs | 5+++--
Mumtool/report-to-video/gap-mark.test.mjs | 27++++++++++++++++++++++++---
Mumtool/report-to-video/gaps-render.test.mjs | 7+++++--
Mumtool/report-to-video/modules/config-loader.test.mjs | 6+++++-
Mumtool/report-to-video/modules/gap-cue.mjs | 6++++--
28 files changed, 373 insertions(+), 66 deletions(-)

diff --git a/common/lib/report/gapCue.d.mts b/common/lib/report/gapCue.d.mts @@ -5,13 +5,15 @@ type Entry = Record<string, unknown> | null | undefined; export type GapCueCorner = "auto" | "tl" | "tr" | "bl" | "br"; export type GapCuePlace = "footage" | "deck"; -export type GapCue = { mark: boolean; min: number; corner: GapCueCorner; label: string; place: GapCuePlace }; +export type GapCue = { mark: boolean; min: number; corner: GapCueCorner; label: string; place: GapCuePlace; border: string }; export type GapCueMark = { at: number; until: number; seconds: number; count: number; why?: string; corner?: string }; export type GapJoin = { at: number; seconds: number; mark: boolean; play?: number; why?: string; corner?: string | null }; export type GapWhy = "dead-air" | "idle" | "other"; export const GAP_CUE_DEFAULTS: Readonly<GapCue>; -export const GAP_CUE_KEYS: readonly ("mark" | "min" | "corner" | "label" | "place")[]; +export const GAP_CUE_KEYS: readonly ("mark" | "min" | "corner" | "label" | "place" | "border")[]; +export const GAP_CUE_BORDER_ACCENT: "accent"; +export const GAP_CUE_BORDER_FALLBACK: string; export const GAP_CUE_PLACES: readonly GapCuePlace[]; export const GAP_CUE_CORNERS: readonly GapCueCorner[]; export const GAP_CUE_MIN: Readonly<{ min: number; max: number }>; @@ -26,6 +28,8 @@ export const GAP_CUE_LOOK: Readonly<{ font: number; pad: number; inset: number; stroke: number; strokeMin: number; fg: string; box: string; boxAlpha: number; strokeColor: string; strokeAlpha: number; }>; +export function gapCueBorderOf(render: Render, entry?: Entry): string; +export function gapCueLook(render: Render, entry?: Entry, o?: { border?: string | null }): Readonly<typeof GAP_CUE_LOOK>; export const GAP_CUE_MOTION: Readonly<{ in: number; hold: number; out: number; peak: number }>; export const GAP_CUE_LIFE: number; export type GapCueBoxStyle = { diff --git a/common/lib/report/gapCue.mjs b/common/lib/report/gapCue.mjs @@ -10,9 +10,9 @@ // // THE SETTINGS, most specific wins: // -// render.gapCue { mark?, min?, corner?, label?, place? } the project's (a look key: a preset, a -// style or a take patch carries it) -// clip.gapCue { mark?, min?, corner?, label?, place? } one clip's, over the project's +// render.gapCue { mark?, min?, corner?, label?, place?, border? } the project's (a look key: a preset, +// a style or a take patch carries it) +// clip.gapCue { mark?, min?, corner?, label?, place?, border? } one clip's, over the project's // a gap's `mark` true | false one gap's, over both // // mark draw the mark at a join (default false: OFF, so a cut that says nothing renders as it always did) @@ -22,6 +22,8 @@ // the gap has one (default "» {s}[ · {why}]": "» 27 s", or "» 26 s · dead air"; from a minute "» 1:12") // place footage | deck (default footage: over the footage at its corner; deck: in the deck's band, at the // end of the source line, left of the QR -- only where a deck is drawn: elsewhere footage) +// border accent | #rrggbb (default accent: the border in the deck's accent, `render.palette.accent`, the colour +// the deck draws its rule and dots in; a render with none, GAP_CUE_BORDER_FALLBACK) // // A gap may also carry `why` ("dead-air" | "idle" | "other"): what it was cut // for, and `reason`, a few words of its own (at most GAP_REASON_MAX). The mark @@ -34,7 +36,8 @@ // // THE LOOK (GAP_CUE_LOOK) is here too, so the build's drawtext (gap-mark.mjs), // the gap-cue module's page (chrome-gap-cue.mjs, gapCueCss) and umtool's -// element over a raw picture (GapMarkChip, gapCueBoxStyle) draw one mark. +// element over a raw picture (GapMarkChip, gapCueBoxStyle) draw one mark -- +// in the colours gapCueLook gives each clip's (its border: gapCueBorderOf). // // WHO DRAWS IT (lane gap-cue, slice 1d): wherever a deck is drawn, the gap-cue // MODULE (a HyperFrames page per mark, at its own seconds); the drawtext into @@ -53,9 +56,19 @@ const fin = (v) => typeof v === "number" && Number.isFinite(v); const EPS = 1e-6; /** The settings a cut that says nothing has: the mark off. */ -export const GAP_CUE_DEFAULTS = Object.freeze({ mark: false, min: 2, corner: "auto", label: "» {s}[ · {why}]", place: "footage" }); +export const GAP_CUE_DEFAULTS = Object.freeze({ mark: false, min: 2, corner: "auto", label: "» {s}[ · {why}]", place: "footage", border: "accent" }); /** The keys `render.gapCue` and a clip's `gapCue` take. */ -export const GAP_CUE_KEYS = Object.freeze(["mark", "min", "corner", "label", "place"]); +export const GAP_CUE_KEYS = Object.freeze(["mark", "min", "corner", "label", "place", "border"]); +/** `border`'s word for the deck's accent (`render.palette.accent`): the default. */ +export const GAP_CUE_BORDER_ACCENT = "accent"; +/** The border's colour when the render has no palette accent: the amber the operator picked (variant B, 20 Nov). */ +export const GAP_CUE_BORDER_FALLBACK = "#f5b300"; +/** A border colour a setting may name: `#rrggbb`. */ +const BORDER_HEX_RE = /^#[0-9a-fA-F]{6}$/; +/** A palette's colour as the deck reads it (`#rgb` or `#rrggbb`: chrome-deck.mjs HEX_RE). */ +const PALETTE_HEX_RE = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/; +/** Is `v` a `border` setting: "accent" or `#rrggbb`. */ +const borderOk = (v) => v === GAP_CUE_BORDER_ACCENT || (typeof v === "string" && BORDER_HEX_RE.test(v)); /** Where the mark is drawn: over the footage (at its corner), or in the deck's band (the end of the source line). */ export const GAP_CUE_PLACES = Object.freeze(["footage", "deck"]); /** Where the mark may stand: the layout's choice, or a corner of its box. */ @@ -85,20 +98,56 @@ export const GAP_REASON_RULE = `a few words, at most ${GAP_REASON_MAX} character /** Is `v` a label's text, its length and characters (its {s} and [ ] parts aside). */ const labelLineOk = (v) => v.length <= GAP_CUE_LABEL_MAX && !CONTROL.test(v); /** - * THE LOOK, once (operator, 20 Nov: "more visible and readable with a border"): sizes as fractions of the - * frame's short side -- `font` the text (0.03: 32 px at 1080), `inset` from the box it stands in, `stroke` the - * border's width (at least `strokeMin` px) -- `pad` the box round the text in ems; the text `fg` on `box` at - * `boxAlpha`, inside a `strokeColor` border at `strokeAlpha`. The whole mark fades together (GAP_CUE_MOTION). + * THE LOOK, once (operator, 20 Nov: "more visible and readable with a border"; then "Go with variant B", the + * accent border): sizes as fractions of the frame's short side -- `font` the text (0.03: 32 px at 1080), `inset` + * from the box it stands in, `stroke` the border's width (at least `strokeMin` px) -- `pad` the box round the text + * in ems; the text `fg` on `box` at `boxAlpha`, inside a `strokeColor` border at `strokeAlpha`. `strokeColor` here + * is the fallback: a mark is drawn in gapCueLook's, the deck's accent unless its `border` says. The whole mark + * fades together (GAP_CUE_MOTION). */ export const GAP_CUE_LOOK = Object.freeze({ font: 0.03, pad: 0.38, inset: 0.026, stroke: 0.0019, strokeMin: 2, - fg: "#ffffff", box: "#101010", boxAlpha: 0.86, strokeColor: "#ffffff", strokeAlpha: 0.9, + fg: "#ffffff", box: "#101010", boxAlpha: 0.9, strokeColor: GAP_CUE_BORDER_FALLBACK, strokeAlpha: 1, }); /** The mark's motion (seconds) and its opacity at full. */ export const GAP_CUE_MOTION = Object.freeze({ in: 0.15, hold: 0.6, out: 0.35, peak: 0.9 }); /** How long one mark is up: in, hold and out. */ export const GAP_CUE_LIFE = GAP_CUE_MOTION.in + GAP_CUE_MOTION.hold + GAP_CUE_MOTION.out; +/** `#rgb` as `#rrggbb` (a palette may say either; drawtext reads only the long form). */ +const longHex = (hex) => (hex.length === 4 ? `#${[...hex.slice(1)].map((c) => c + c).join("")}` : hex); + +/** + * THE BORDER'S COLOUR one clip's mark is drawn in (`#rrggbb`): its `border` setting (the clip's over the project's, + * clipGapCueOf) when it names a colour; else -- "accent", the default, or absent -- the deck's accent, the render's + * `palette.accent` (as the deck reads it: chrome-deck.mjs's rule and dots, the brand's when one is resolved); a + * render with no palette accent, GAP_CUE_BORDER_FALLBACK. The one resolver: the module's page (through the slice's + * marks), the drawtext and umtool's element all take it from here. + * + * @param {Record<string, any> | null | undefined} render + * @param {Record<string, any> | null | undefined} [entry] + * @returns {string} + */ +export function gapCueBorderOf(render, entry = null) { + const b = clipGapCueOf(render, entry).border; + if (BORDER_HEX_RE.test(b)) return b; + const accent = render?.palette?.accent; + return typeof accent === "string" && PALETTE_HEX_RE.test(accent) ? longHex(accent) : GAP_CUE_BORDER_FALLBACK; +} + +/** + * THE LOOK one clip's mark is drawn in: GAP_CUE_LOOK with its border's colour (gapCueBorderOf) -- or, with + * `border` given (a colour the slice already resolved onto a mark), that colour. + * + * @param {Record<string, any> | null | undefined} render + * @param {Record<string, any> | null | undefined} [entry] + * @param {{ border?: string | null }} [o] + */ +export function gapCueLook(render, entry = null, { border = null } = {}) { + const c = typeof border === "string" && PALETTE_HEX_RE.test(border) ? longHex(border) : gapCueBorderOf(render, entry); + return Object.freeze({ ...GAP_CUE_LOOK, strokeColor: c }); +} + /** `#rrggbb` at `a`, for CSS. */ const rgbaOf = (hex, a) => { const n = Number.parseInt(String(hex).replace(/^#/, ""), 16); @@ -156,7 +205,7 @@ const q = (v) => JSON.stringify(v); */ export function gapCueErrors(v, where = "render.gapCue") { if (v === undefined || v === null) return []; - if (!isObj(v)) return [`${where} must be { mark?, min?, corner?, label?, place? }`]; + if (!isObj(v)) return [`${where} must be { mark?, min?, corner?, label?, place?, border? }`]; const errors = []; for (const k of Object.keys(v)) if (!GAP_CUE_KEYS.includes(k)) errors.push(`${where}.${k} is not a key (${GAP_CUE_KEYS.join(", ")})`); if (v.mark !== undefined && typeof v.mark !== "boolean") errors.push(`${where}.mark is true (draw the mark at a join) or false, not ${q(v.mark)}`); @@ -167,6 +216,9 @@ export function gapCueErrors(v, where = "render.gapCue") { if (v.place !== undefined && !GAP_CUE_PLACES.includes(/** @type {string} */ (v.place))) { errors.push(`${where}.place is footage (over the footage, at its corner) or deck (in the deck's band, at the end of the source line), not ${q(v.place)}`); } + if (v.border !== undefined && !borderOk(v.border)) { + errors.push(`${where}.border is accent (the deck's accent colour) or a #rrggbb colour, not ${q(v.border)}`); + } if (v.label !== undefined) { if (typeof v.label !== "string" || !v.label.includes("{s}")) errors.push(`${where}.label is text holding {s} (the seconds skipped), e.g. "» {s}" or "{s} later"`); else if (!labelLineOk(v.label)) errors.push(`${where}.label is one line of at most ${GAP_CUE_LABEL_MAX} characters (no tab or other control character)`); @@ -218,6 +270,7 @@ function own(v) { if (fin(v.min) && v.min >= GAP_CUE_MIN.min && v.min <= GAP_CUE_MIN.max) out.min = v.min; if (GAP_CUE_CORNERS.includes(v.corner)) out.corner = v.corner; if (GAP_CUE_PLACES.includes(v.place)) out.place = v.place; + if (borderOk(v.border)) out.border = v.border; if (typeof v.label === "string" && v.label.includes("{s}") && labelLineOk(v.label) && labelPartsOk(v.label)) out.label = v.label; return out; } @@ -226,7 +279,7 @@ function own(v) { * The project's settings, the defaults filled in. * * @param {Record<string, any> | null | undefined} render - * @returns {{ mark: boolean, min: number, corner: string, label: string, place: string }} + * @returns {{ mark: boolean, min: number, corner: string, label: string, place: string, border: string }} */ export const gapCueOf = (render) => ({ ...GAP_CUE_DEFAULTS, ...own(render?.gapCue) }); diff --git a/common/lib/report/gapCue.test.ts b/common/lib/report/gapCue.test.ts @@ -20,11 +20,14 @@ import { validateGapCue, gapCueBoxStyle, gapCueCss, + GAP_CUE_BORDER_FALLBACK, + gapCueBorderOf, + gapCueLook, } from "./gapCue.mjs"; import { applyLookPatch, lookErrors } from "./look.mjs"; test("the defaults: the mark OFF, 2 s, the layout's corner, '» {s}[ · {why}]'", () => { - assert.deepEqual(gapCueOf(undefined), { mark: false, min: 2, corner: "auto", label: "» {s}[ · {why}]", place: "footage" }); + assert.deepEqual(gapCueOf(undefined), { mark: false, min: 2, corner: "auto", label: "» {s}[ · {why}]", place: "footage", border: "accent" }); assert.deepEqual(gapCueOf({}), GAP_CUE_DEFAULTS); assert.equal(gapCueWanted({}, { type: "clip", gaps: [{ from: 1, to: 9 }] }), false, "a cut that says nothing marks nothing"); }); @@ -33,7 +36,7 @@ test("precedence: a gap's mark over its clip's over the project's", () => { const render = { gapCue: { mark: true, min: 3 } }; const clip = { type: "clip", gapCue: { mark: false, corner: "tr" }, gaps: [{ from: 1, to: 9 }, { from: 12, to: 20, mark: true }] }; const cue = clipGapCueOf(render, clip); - assert.deepEqual(cue, { mark: false, min: 3, corner: "tr", label: "» {s}[ · {why}]", place: "footage" }); + assert.deepEqual(cue, { mark: false, min: 3, corner: "tr", label: "» {s}[ · {why}]", place: "footage", border: "accent" }); assert.equal(gapMarkOn(cue, clip.gaps[0]), false, "the clip's off"); assert.equal(gapMarkOn(cue, clip.gaps[1]), true, "the gap's own on"); assert.equal(gapCueWanted(render, clip), true); @@ -133,13 +136,15 @@ test("the look as CSS (slice 1d): one box for the module's page and umtool's ele const st = gapCueBoxStyle({ font: 32, stroke: 2 }); assert.equal(st.fontSize, "32px"); assert.equal(st.padding, `${GAP_CUE_LOOK.pad}em`); - assert.equal(st.border, "2px solid rgba(255, 255, 255, 0.9)"); - assert.equal(st.background, "linear-gradient(rgba(16, 16, 16, 0.86), rgba(16, 16, 16, 0.86)), rgba(255, 255, 255, 0.9)"); + // Variant B (operator, 20 Nov): the border at full opacity (here the look's fallback amber), the box at 0.9. + assert.equal(st.border, "2px solid rgba(245, 179, 0, 1)"); + assert.equal(st.background, "linear-gradient(rgba(16, 16, 16, 0.9), rgba(16, 16, 16, 0.9)), rgba(245, 179, 0, 1)"); + assert.equal(st.color, "#ffffff", "the text stays white"); assert.equal(gapCueBoxStyle({ font: "3cqmin", stroke: "max(1.5px, 0.19cqmin)" }).fontSize, "3cqmin"); const css = gapCueCss(".gm", { font: 32, stroke: 2 }); assert.match(css, /^\.gm \{ position: absolute;/); assert.match(css, /font-family: 'DeckSansBold', sans-serif;/); - assert.match(css, /border: 2px solid rgba\(255, 255, 255, 0\.9\);/); + assert.match(css, /border: 2px solid rgba\(245, 179, 0, 1\);/); assert.match(css, /background-clip: padding-box;/); assert.match(css, /white-space: nowrap;/); }); @@ -166,3 +171,52 @@ test("the look's writer: gapCue merged over what it holds, a key null drops it, assert.match(applyLookPatch(m, { gapCue: { min: 99 } }).errors.join("\n"), /render\.gapCue\.min is seconds from 0\.5 to 60/); assert.deepEqual(lookErrors({ render: { gapCue: { mark: true } } }), []); }); + +test("the border (variant B): the deck's accent, else the fallback amber; a #rrggbb setting over it, the clip's over the project's", () => { + const teal = { palette: { bg: "#0b1416", fg: "#eef6f5", accent: "#1fb5a8" } }; + // The palette's accent (render.palette.accent: the deck's rule and dots). + assert.equal(gapCueBorderOf(teal), "#1fb5a8"); + assert.equal(gapCueBorderOf({ palette: { accent: "#e8742a" } }, { gapCue: {} }), "#e8742a"); + assert.equal(gapCueBorderOf({ palette: { accent: "#1ba" } }), "#11bbaa", "a short palette hex, as drawtext reads it"); + // No palette, or no accent in it, or one that is no colour: the fallback. + assert.equal(GAP_CUE_BORDER_FALLBACK, "#f5b300"); + assert.equal(gapCueBorderOf({}), "#f5b300"); + assert.equal(gapCueBorderOf(null), "#f5b300"); + assert.equal(gapCueBorderOf({ palette: { bg: "#000000" } }), "#f5b300"); + assert.equal(gapCueBorderOf({ palette: { accent: "teal" } }), "#f5b300"); + // "accent" is the default spelled out; absent (a take's manifest drops a null key) reads the same. + assert.equal(gapCueBorderOf({ ...teal, gapCue: { border: "accent" } }), "#1fb5a8"); + assert.equal(gapCueBorderOf({ ...teal, gapCue: { mark: true } }), "#1fb5a8", "absent: the accent"); + assert.equal(gapCueBorderOf({ ...teal, gapCue: { border: null } }), "#1fb5a8", "null: the accent"); + // An explicit colour: the project's, the clip's over it, "accent" on the clip back to the deck's. + assert.equal(gapCueBorderOf({ ...teal, gapCue: { border: "#3AA0FF" } }), "#3AA0FF"); + assert.equal(gapCueBorderOf({ ...teal, gapCue: { border: "#3aa0ff" } }, { gapCue: { border: "#ff00aa" } }), "#ff00aa"); + assert.equal(gapCueBorderOf({ ...teal, gapCue: { border: "#3aa0ff" } }, { gapCue: { border: "accent" } }), "#1fb5a8"); + assert.equal(gapCueBorderOf({ gapCue: { border: "#3aa0ff" } }), "#3aa0ff", "a colour needs no palette"); + // An unreadable setting is the default (the accent), as every other key. + assert.equal(gapCueBorderOf({ ...teal, gapCue: { border: "red" } }), "#1fb5a8"); + // gapCueLook: GAP_CUE_LOOK with that colour, or with a colour already resolved (the slice's mark's). + assert.deepEqual(gapCueLook(teal), { ...GAP_CUE_LOOK, strokeColor: "#1fb5a8" }); + assert.equal(gapCueLook({}).strokeColor, "#f5b300"); + assert.equal(gapCueLook(teal, null, { border: "#e8742a" }).strokeColor, "#e8742a"); + assert.equal(gapCueLook(teal, null, { border: null }).strokeColor, "#1fb5a8"); + assert.equal(GAP_CUE_LOOK.strokeAlpha, 1); + assert.equal(GAP_CUE_LOOK.boxAlpha, 0.9); + assert.equal(GAP_CUE_LOOK.fg, "#ffffff"); + assert.equal(GAP_CUE_LOOK.box, "#101010"); + // The page's CSS carries it. + assert.match(gapCueCss(".gm", { font: 32, stroke: 2, look: gapCueLook(teal) }), /border: 2px solid rgba\(31, 181, 168, 1\);/); +}); + +test("the border's validation: accent or #rrggbb, on the project's block and a clip's; the look's writer keeps it", () => { + assert.deepEqual(validateGapCue({ render: { gapCue: { border: "accent" } } }), []); + assert.deepEqual(validateGapCue({ render: { gapCue: { border: "#3aa0ff" } }, timeline: [{ type: "clip", id: "c1", gapCue: { border: "#FF00AA" } }] }), []); + for (const bad of ["red", "#fff", "#3aa0ffcc", "3aa0ff", "", 7, true, "Accent"]) { + assert.match(validateGapCue({ render: { gapCue: { border: bad } } }).join("\n"), /render\.gapCue\.border is accent \(the deck's accent colour\) or a #rrggbb colour/, JSON.stringify(bad)); + } + assert.match(validateGapCue({ timeline: [{ type: "clip", id: "c1", gapCue: { border: "blue" } }] }).join("\n"), /\(c1\)\.gapCue\.border is accent/); + const m = applyLookPatch({ render: { gapCue: { mark: true } } }, { gapCue: { border: "#3aa0ff" } }); + assert.deepEqual(m.render.gapCue, { mark: true, border: "#3aa0ff" }); + assert.deepEqual(applyLookPatch(m, { gapCue: { border: null } }).render.gapCue, { mark: true }, "null drops it: the accent again"); + assert.match(lookErrors({ render: { gapCue: { border: "nope" } } }).join("\n"), /render\.gapCue\.border is accent/, "the look writer refuses it in the same words"); +}); diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,17 @@ # Changelog ## [Unreleased] +- **umtool: the gap mark's border is the deck's accent colour.** + - The operator picked variant B. The border is drawn in the deck's accent, the colour of the deck's accent rule + and the dots in its source line, at full opacity. The box behind the text is near-black at 90 %, and the text + stays white. A render with no palette accent gets an amber border (`#f5b300`). + - New `border` setting: `accent` (the default) or a `#rrggbb` colour, for the project or one clip. CLI: `umtool look + <p> gapCue='{"border":"#3aa0ff"}'`, `umtool set <p> <clip> gapCue.border='#3aa0ff'`. It is also in the Modules + panel and in the bench's clip row, where a swatch shows the colour that will be drawn. + - The module's page, the drawtext and umtool's preview element all get the colour from one resolver, so they draw + the same border. + - With the mark on, every mark's page and every segment drawn with a mark gets a new key once. With the mark off + or unset, nothing changes. - **umtool: a take renders when the source-status stamp holds a source with no record.** - A take of a project with a look preset failed with `sourceStatus.sources["…"].now must be one of …`, whether the deck drew the status or not. Laying the project over its preset dropped the stamp's empty fields, and the build diff --git a/umtool/app/api/report/window/route.ts b/umtool/app/api/report/window/route.ts @@ -84,7 +84,7 @@ export async function PUT(request: Request) { "gapAdd", "gapRemove", // One gap's own settings, its seconds as they are (`gapEdit`: {at, mark?, why?, reason?, corner?}, a key null drops it), - // and the mark at this clip's gaps' joins (`gapCue`: {mark?, min?, corner?, label?}, null clears it; + // and the mark at this clip's gaps' joins (`gapCue`: {mark?, min?, corner?, label?, place?, border?}, null clears it; // common lib/report/gapCue.mjs). "gapEdit", "gapCue", diff --git a/umtool/components/projects/ClipBench.tsx b/umtool/components/projects/ClipBench.tsx @@ -39,7 +39,7 @@ import { useGapEditor, type SavedGap } from "./bench/useGapEditor"; import GapCueTools from "./bench/GapCueTools"; import GapMarkChip from "./review/GapMarkChip"; import { clipGapMarks, clipPlayClock, gapMarkAt, gapMarkCorner } from "@/lib/report/gapCueView.mjs"; -import { clipGapCueOf, gapCueOf, type GapCue } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; +import { clipGapCueOf, gapCueBorderOf, gapCueOf, type GapCue } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; import { BenchWaveBox, GapTools } from "./bench/BenchWave"; import { CutEdges } from "./bench/CutEdges"; import { sourceWindowMedia } from "./bench/benchMedia"; @@ -330,6 +330,8 @@ export type ClipBenchData = { hidden?: CensorRegion[]; /** The project's `render.gapCue` as the build reads it (the look preset under it): the mark at gaps' joins. */ gapCue?: Record<string, unknown> | null; + /** The deck's accent as the build reads it (render.palette.accent, the brand's): the mark's border by default. */ + gapCueAccent?: string | null; /** The manifest's `generatedBy`: edits here are noted for the agent that runs it. */ generatedBy?: string | null; /** @@ -1471,6 +1473,11 @@ export default function ClipBench({ // on the clock of what plays (the cut, else the extent, as drafted -- the gaps' span), the render's own rule. const projectCue = useMemo(() => gapCueOf({ gapCue: data.gapCue ?? undefined }), [data.gapCue]); const clipCue = useMemo(() => clipGapCueOf({ gapCue: data.gapCue ?? undefined }, { gapCue: clip.gapCue ?? undefined }), [data.gapCue, clip.gapCue]); + // Its border's colour, as the render resolves it (common gapCueBorderOf): the clip's or project's, else the accent. + const benchMarkBorder = useMemo( + () => gapCueBorderOf({ gapCue: data.gapCue ?? undefined, palette: { accent: data.gapCueAccent ?? undefined } }, { gapCue: clip.gapCue ?? undefined }), + [data.gapCue, data.gapCueAccent, clip.gapCue], + ); const benchMarks = useMemo( () => clipGapMarks({ cue: clipCue, gaps: clip.gaps ?? [], from: gapsSpan.from, to: gapsSpan.to }), [clipCue, clip.gaps, gapsSpan.from, gapsSpan.to], @@ -3016,7 +3023,7 @@ export default function ClipBench({ /> {hasHidden && <CensorOverlay regions={data.hidden ?? []} at={benchAt} aspect={benchAspect} mode="edit" testId="bench-censor" />} {/* The mark at a gap's join, as the render draws it (lane gap-cue): up while what plays crosses a marked join. */} - {benchMarks.length > 0 && !benchMarkInDeck && <GapMarkChip mark={benchMark} corner={benchMarkCorner} aspect={benchAspect} testId="bench-gap-mark" />} + {benchMarks.length > 0 && !benchMarkInDeck && <GapMarkChip mark={benchMark} corner={benchMarkCorner} border={benchMarkBorder} aspect={benchAspect} testId="bench-gap-mark" />} {/* Placed in the deck (gapCue.place deck): the band is not over this picture -- said beside it, not drawn on it. */} {benchMarkInDeck && benchMark && ( <div data-bench-gap-mark-deck={benchMark.text} className="pointer-events-none absolute bottom-1 left-1 z-[4] rounded bg-black/70 px-1.5 py-0.5 font-mono text-[11px] text-white"> @@ -3451,6 +3458,7 @@ export default function ClipBench({ busy={!!busy} fmt={hms} writeCue={writeGapCue} + borderColor={benchMarkBorder} hasGaps={(clip.gaps ?? []).length > 0} /> </div> diff --git a/umtool/components/projects/bench/GapCueTools.tsx b/umtool/components/projects/bench/GapCueTools.tsx @@ -16,7 +16,8 @@ import type { GapEditor } from "./useGapEditor"; // own corner (a stream's layout can change inside a clip), // what its mark will say, Remove // the clip's the mark at its joins (as the project's, on, off), the -// shortest gap marked, the corner, the label +// shortest gap marked, the corner, the label, the border +// (accent: the deck's accent colour, or a #rrggbb) // // Every control writes at once through the window writer -- `gapEdit` for the // gap (useGapEditor's editPicked: an undo point, and the bench's Undo), @@ -38,6 +39,7 @@ export default function GapCueTools({ busy, fmt, writeCue, + borderColor = null, hasGaps, }: { gap: GapEditor; @@ -51,15 +53,19 @@ export default function GapCueTools({ fmt: (t: number) => string; /** Write the clip's `gapCue` patch (a key null drops it); resolves whether it was written. */ writeCue: (patch: Record<string, unknown>) => Promise<boolean>; + /** The border's colour as the render resolves it (common gapCueBorderOf): shown beside the field. */ + borderColor?: string | null; hasGaps: boolean; }) { const g = gap.picked; // The two typed fields: drafted, written on Enter or leaving them. const [min, setMin] = useState(own?.min === undefined ? "" : String(own.min)); const [label, setLabel] = useState(own?.label ?? ""); + const [border, setBorder] = useState(own?.border ?? ""); const [reason, setReason] = useState(g?.reason ?? ""); useEffect(() => setMin(own?.min === undefined ? "" : String(own.min)), [own?.min]); useEffect(() => setLabel(own?.label ?? ""), [own?.label]); + useEffect(() => setBorder(own?.border ?? ""), [own?.border]); useEffect(() => setReason(g?.reason ?? ""), [g?.from, g?.to, g?.reason]); if (!hasGaps) return null; @@ -73,6 +79,11 @@ export default function GapCueTools({ if (label === (own?.label ?? "")) return; void writeCue({ label: label === "" ? null : label }); }; + const commitBorder = () => { + const v = border.trim(); + if (v === (own?.border ?? "")) return; + void writeCue({ border: v === "" ? null : v }); + }; const commitReason = () => { if (!g || reason.trim() === (g.reason ?? "")) return; void gap.editPicked({ reason: reason.trim() === "" ? null : reason.trim() }); @@ -261,6 +272,30 @@ export default function GapCueTools({ }} /> </label> + <label className="flex items-center gap-1"> + <span className="micro">border</span> + <input + data-gap-cue-border="" + className={`${sel} w-20 font-mono`} + disabled={busy} + value={border} + placeholder={project.border} + title="accent (the deck's accent colour) or a #rrggbb colour (umtool set <p> <clip> gapCue.border=accent|'#rrggbb'; gapCue.border= as the project's)" + onChange={(e) => setBorder(e.target.value)} + onBlur={commitBorder} + onKeyDown={(e) => { + if (e.key === "Enter") commitBorder(); + }} + /> + {borderColor && ( + <span + data-gap-cue-border-swatch={borderColor} + className="inline-block h-3 w-3 rounded-sm border border-[var(--color-line)]" + style={{ background: borderColor }} + title={`drawn ${borderColor}`} + /> + )} + </label> </span> </div> ); diff --git a/umtool/components/projects/review/GapMarkChip.tsx b/umtool/components/projects/review/GapMarkChip.tsx @@ -1,7 +1,7 @@ "use client"; import { useEffect, useRef, useState } from "react"; -import { GAP_CUE_LOOK, gapCueBoxStyle } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; +import { GAP_CUE_LOOK, gapCueBoxStyle, gapCueLook } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; // THE GAP MARK OVER A RAW PICTURE (lane gap-cue, slice 1b; 1d): "» 27 s" at a clip gap's join, drawn where the // drawtext path draws it -- Play the cut of a cut with no deck, the clip bench over its source picture. Under a @@ -14,6 +14,8 @@ import { GAP_CUE_LOOK, gapCueBoxStyle } from "yt-dlp-transcript-common/lib/repor // frame when absent // aspect the picture is fitted inside this element (object-contain: the bench's <video>): its rect is measured, // and the picture is the frame +// border the border's colour, as the render resolves it (common gapCueBorderOf: the clip's or the project's +// `border`, else the deck's accent); absent: the look's fallback export type GapMarkCorner = "tl" | "tr" | "bl" | "br"; @@ -22,10 +24,12 @@ export default function GapMarkChip({ corner, box = null, aspect = null, + border = null, testId = "gap-mark", }: { mark: { text: string; alpha: number } | null; corner: GapMarkCorner; + border?: string | null; box?: { left: string; top: string; width: string; height: string } | null; aspect?: number | null; testId?: string; @@ -60,10 +64,11 @@ export default function GapMarkChip({ <span data-gap-mark-chip={mark.text} data-gap-mark-alpha={mark.alpha.toFixed(2)} + data-gap-mark-border={gapCueLook(null, null, { border }).strokeColor} className="absolute font-mono font-bold" style={{ ...at, - ...gapCueBoxStyle({ font: `max(9px, ${L.font * 100}cqmin)`, stroke: `max(1.5px, ${L.stroke * 100}cqmin)` }), + ...gapCueBoxStyle({ font: `max(9px, ${L.font * 100}cqmin)`, stroke: `max(1.5px, ${L.stroke * 100}cqmin)`, look: gapCueLook(null, null, { border }) }), opacity: mark.alpha, // Never off its box: a long label and reason end "…" (the build shrinks the face first: gap-mark.mjs gapMarkFit). maxWidth: `calc(100% - ${2 * L.inset * 100}cqmin)`, diff --git a/umtool/components/projects/review/PlayCut.tsx b/umtool/components/projects/review/PlayCut.tsx @@ -120,7 +120,7 @@ export type PlayEntry = { /** Seconds taken out of its middle (gaps.mjs): one item of jump cuts; each with its own mark and why when it says. */ gaps?: { from: number; to: number; mark?: boolean; why?: string }[]; /** The mark at its gaps' joins (common gapCue.mjs clipGapCueOf), only when a gap of it is marked. */ - gapCue?: { mark: boolean; min: number; corner: string; label: string }; + gapCue?: { mark: boolean; min: number; corner: string; label: string; place?: string; border?: string; borderColor?: string }; blur?: { on?: boolean; caption?: string; strength?: number; from?: number; to?: number } | null; /** Its hidden regions (clip-censor.mjs censorRegionsOf): drawn over the picture as the cut hides them. */ censor?: CensorRegion[]; diff --git a/umtool/components/projects/review/playCore.tsx b/umtool/components/projects/review/playCore.tsx @@ -515,7 +515,7 @@ export function PlayStage({ core, basic = false, plainClassName }: { core: PlayC {/* The gap mark under a deck is the gap-cue module's own page (a play layer, below): its live preview -- but a clip whose segment drew its own (gapInSegment) has none there, so the chip shows what the render does. */} {gapInSegment && gapMarks.length > 0 && rect && ( - <GapMarkChip mark={gapMark} corner={gapCorner} box={{ left: pct(rect.x, g.W), top: pct(rect.y, g.H), width: pct(rect.width, g.W), height: pct(rect.height, g.H) }} testId="play-gap-mark" /> + <GapMarkChip mark={gapMark} corner={gapCorner} border={cueEntry?.gapCue?.borderColor ?? null} box={{ left: pct(rect.x, g.W), top: pct(rect.y, g.H), width: pct(rect.width, g.W), height: pct(rect.height, g.H) }} testId="play-gap-mark" /> )} {/* Over a full-frame item (full-frame.mjs) a layer that keeps no time of its own is not drawn (layerOff): kept mounted, transparent, so its page is ready and seeked when the item after it comes up. The feed @@ -558,7 +558,7 @@ export function PlayStage({ core, basic = false, plainClassName }: { core: PlayC {!basic && introCard} {!basic && placeholderCard} {!basic && sideNow} - {!basic && gapMarks.length > 0 && <GapMarkChip mark={gapMark} corner={gapCorner} testId="play-gap-mark" />} + {!basic && gapMarks.length > 0 && <GapMarkChip mark={gapMark} corner={gapCorner} border={cueEntry?.gapCue?.borderColor ?? null} testId="play-gap-mark" />} </div> )} {dipVeil} diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md @@ -53,7 +53,7 @@ Inbox cannot disagree about what is wrong with one. | `reads <project> replace <from> <to> [--case] [--word] [--say-only] [--only <id>,…] [--dry-run] [--json]` · `reads <project> undo [--dry-run]` | **Replace**, two scopes, neither synthesizing and neither touching what is shown (operator ruling 3; `lib/report/readsReplace.mjs`): **these reads** rewrites the matched reads' spoken text in ONE undo point (`auto-before-reads-replace`) — a post's script (marked for reading), a screen line's said-as (made when it has none), a card's narration; a parent, the quoted or a linked post is said as shown (only `--say-only` changes it); a recorded read is never replaced; the preview names what a changed post loses (its approval, as a new script takes it), a card's review verdict given on the old words, and what the build would refuse (refused whole). **`--say-only`: everywhere, from now on** — a pronunciation entry (`posts say add`'s writer): every read of a post says it that way; whole words; never a card. `undo` takes back the newest replace -- These reads only while the draft is still exactly what it left (a re-read landing or any edit since: refused, said why), an Everywhere back to the entry it changed (its spoken form and note) or the entry it added removed; `--dry-run` says which, or why not. A flag a subcommand does not take is refused; `--` ends the flags. | | `reads <project> reread [--stale] [--only <id>,…] [--wait [--timeout <s>]] [--dry-run] [--json]` · `reads <project> queue [--stop] [--retry <id>] [--json]` · `reads <project> pick --new|--old [--only <id>,…] [--dry-run] [--json]` | **the re-read queue** (`lib/report/readsQueue.mjs`): the stale reads (or `--only` those) queued on the app's durable queue (`umtool queue ls`), ONE step per item in cut order, none waiting on another — `reads <p> reread --one <item> --only <ids>`, which judges the item again and runs the item's bench command (`readAgainArgv.mjs`: a post's take as the bench asks it, `--bench-slurs`; a thread piece's `--for`/`--tuned … reading:next`; a card's own reading), the tuning a plain press asks (only what the line owned). The editor's `tts-file` jobs, one at a time; render mode holds them. A re-read joins its list UNPICKED. `queue` says each row's state and, in one sentence, why they wait; `--stop` cancels what has not started; `--retry` puts one back. `pick --new` makes every unpicked re-read play, `--old` goes back to what played before (a card: its old words and reading) — one undo point. | | `present <project> [--take <take> \| --cut] [--json] [--public] [--open] [--url <origin>]` | **present mode**: the cut as slides, navigated like a deck (`/projects/<p>/present`) — prints the address and every slide (its kind, id — a post's `<channel>/<id>`, a clip's id, `section-<n>`, `day-<YYYY-MM-DD>` — date, words and censor counts); `--json` the payload (each post's card as Play draws it and its censor data by kind, each clip's spans, the dividers); `--public` the payload a public page would carry (censored, no reveal data); `--open` opens it; `<address>#<slide id>` opens a slide ([knobs.md](knobs.md#present-mode-the-cut-as-slides-navigated-like-a-deck)) | -| `set <project> <clip> key=value …` | a clip's **knobs**: `claim.at` `claim.hold` `claim.stamp` `claim.count` `claim.label` (the first mark's, or `--mark <id>`'s), its **marks** `mark.add=<verdict>[@<sec>]` `mark.remove=<id>` `mark.verdict=<verdict>` `marks=<json>`, `audio.offset` `audio.gain` `audio.fadeIn` `audio.fadeOut`, its picture's **blur** `blur.on=true` `blur.caption=…` `blur.strength` `blur.from` `blur.to` (`blur.on=` clears it; [knobs.md](knobs.md#a-clips-picture-blurred)), its **effects** `fx.zoom=<json>` `fx.receipts=<json>` `fx.punch=…` `fx.quote` `fx.punchIn=<json>` `fx.speakers=<json>` (`fx=<json>` all of them, `fx=` clears them; a shot is a file in the project; [knobs.md](knobs.md#effects)), its **gaps** `gap.add=12.3-15.1` `gap.remove=<sec>` `gaps=…` and a gap's own `gap.mark=<sec>:on|off|default` `gap.why=<sec>:dead-air|idle|other|default` `gap.reason=<sec>:<words>` (its mark says them) `gap.corner=<sec>:tl|tr|bl|br|default`, the **mark at its gaps' joins** `gapCue.mark=true` `gapCue.min` `gapCue.corner` `gapCue.label` over the project's `render.gapCue` (`gapCue=` clears it; [knobs.md](knobs.md#gaps-inside-a-clip)); on ANY entry (a post item, a still, a clip) `hideModules=diet,streak`, `shelfNote='…'` and `chapter='…'` (its name in the chapter list, one line of at most 100 characters; `chapter=` none); `--take <t>` writes the entry knobs into that take's patch; `key=` clears one ([knobs.md](knobs.md#marks)) | +| `set <project> <clip> key=value …` | a clip's **knobs**: `claim.at` `claim.hold` `claim.stamp` `claim.count` `claim.label` (the first mark's, or `--mark <id>`'s), its **marks** `mark.add=<verdict>[@<sec>]` `mark.remove=<id>` `mark.verdict=<verdict>` `marks=<json>`, `audio.offset` `audio.gain` `audio.fadeIn` `audio.fadeOut`, its picture's **blur** `blur.on=true` `blur.caption=…` `blur.strength` `blur.from` `blur.to` (`blur.on=` clears it; [knobs.md](knobs.md#a-clips-picture-blurred)), its **effects** `fx.zoom=<json>` `fx.receipts=<json>` `fx.punch=…` `fx.quote` `fx.punchIn=<json>` `fx.speakers=<json>` (`fx=<json>` all of them, `fx=` clears them; a shot is a file in the project; [knobs.md](knobs.md#effects)), its **gaps** `gap.add=12.3-15.1` `gap.remove=<sec>` `gaps=…` and a gap's own `gap.mark=<sec>:on|off|default` `gap.why=<sec>:dead-air|idle|other|default` `gap.reason=<sec>:<words>` (its mark says them) `gap.corner=<sec>:tl|tr|bl|br|default`, the **mark at its gaps' joins** `gapCue.mark=true` `gapCue.min` `gapCue.corner` `gapCue.label` `gapCue.place` `gapCue.border=accent\|'#rrggbb'` (its border: the deck's accent, or that colour) over the project's `render.gapCue` (`gapCue=` clears it; [knobs.md](knobs.md#gaps-inside-a-clip)); on ANY entry (a post item, a still, a clip) `hideModules=diet,streak`, `shelfNote='…'` and `chapter='…'` (its name in the chapter list, one line of at most 100 characters; `chapter=` none); `--take <t>` writes the entry knobs into that take's patch; `key=` clears one ([knobs.md](knobs.md#marks)) | | `intro <project> [key=value …] [--off] [--json]` · `intro <project> --take <take> --off\|--on` | **the intro** the cut opens on (`render.intro`): with no key, prints it as written, what the cut opens with (a `title-card`'s words resolved) and each version's on/off; `key=value` writes it through the look writer (`style` `seconds` 3.5–8 `mark` `ground` `sound` (`false` silent) `site` `title` `lines` (`a\|b`, ≤ 3) and the brand's keys; `key=` clears one; a new intro starts as `boot-dark`); `--off` takes it off the cut; `--take <t> --off` that version opens on no intro (its patch's `render.intro: null`), `--on` on the cut's again. **Exit 1** on a value the build refuses ([knobs.md](knobs.md#the-intro-played-and-edited)) | | `look <project> key=value … [--unset render.<key>]… [--take <t>]` | the cut's **knobs** (`--take <t>`: the `deck.*` keys given are set on that take -- its patch, an undo point of its own, the project's manifest untouched; the other knobs are the project's): `factcheck.stamp.*`, `factcheck.verdicts.<V>.stampLabel\|label\|color`, `deck.markers=<json>`, `deck.markerLayout`, `variants=<json>`, and the look's keys — `mode=basic\|deck` (the footage alone, [knobs.md](knobs.md#basic-output-the-footage-alone)) and `basic=<json>` (its fades), `gapCue=<json>` (the mark at the joins clips' gaps leave, `{"mark":true}`; [knobs.md](knobs.md#gaps-inside-a-clip)) among them ([knobs.md](knobs.md)) **The deck on, legacy keys off** (`updateRenderKeys`, one write, an undo point `revisions/…auto-render-keys…` first): `chrome.layout=deck` turns the deck on (render.chrome created when the cut has none: engine hyperframes, an empty deck), `--unset render.<key>` (repeatable) drops a legacy render key -- only `rail` `chromeEngine` `railEngine` `chromeRegions` `claimSchedule` `wordmark` `title` `finale` `cut`; the deck beside the old rail is refused in the build's words unless the same command drops it; deck.* keys in the same command land after the chrome exists. Another key named: **exit 2** | | `variants <project> [--take <t>] [--list] [--json]` | **Make variants**: the encode ladder of the build (or of a take's); `--list` what was made and the build's sync report, each clip's lag (past a frame flagged) ([knobs.md](knobs.md)) | diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -41,7 +41,7 @@ that generates it ([notes.md](notes.md)). | `fx.zoom` — `{shot, focus, at?, hold?}`: a screenshot (a file in the project; a bare name under its `shots/` is written as `shots/<name>`) that comes up over the footage and pushes in on `focus` (`[left, top, right, bottom]`, fractions of the shot) — drawn once `render.chrome.fx.zoom` is on ([Effects](#effects)). **How long it stays**: up 0.2 s into the clip's clean span (rising in over 0.38 s), its focus box drawn 0.55 s later, the push at `at` (seconds into the clip; default as soon as the box has drawn) over 1 s, then a slow drift on the detail; it leaves with a 0.3 s fade 0.3 s before the clip's clean span ends — or, with `hold` (0.5–10 s), that long after the push lands (never past the clip's own leave) | — | `umtool set <p> <clip> fx.zoom='{"shot":"shots/x.png","focus":[0.1,0.2,0.9,0.4],"at":5.9,"hold":4}'` (`fx.zoom=` clears it) | `PUT /api/report/window {project, clip, "fx.zoom": {…} \| null}` | | `fx.receipts`, `fx.punch`, `fx.quote`, `fx.punchIn`, `fx.speakers` — the clip's other effect fields (`[{shot, mark?, at?, hold?, label?}]` 1–4, `at` the source second a receipt flies in at (default: as the clip comes up), `hold` 0.5–10 s it stays once landed (on every one: they leave then, not with the clip), `label` a line of at most 80 characters in a band under the screenshot (when it was taken, what it is); the words to punch; `false`: no line; 1–8 source seconds inside the clip; `[{at, who: 0\|1}]`), each inert until its effect is on; `fx` is all of them at once. Checked by the build's own `validateFxEntries` | — | `fx.punch="the words"` `fx.punchIn='[231.4]'` · `fx='{…}'` sets them all, `fx=` clears every one | `PUT /api/report/window {project, clip, fx}` (or one `"fx.<field>"`) | | `gaps` — `[{from, to}]`, SOURCE seconds cut out of the clip's middle: it renders as ONE segment of jump cuts (one pip, one card), not two clips with a crossfade ([below](#gaps-inside-a-clip)) | clip bench (Edit this clip), the waveform: **Select a gap** (`g`) or Alt + drag a span, **Cut gap** (`g`), **Hear it**; a click on a gap's band picks it: its settings and **Remove** under the waveform (`G`: put back the one at the playhead); **Undo** | `umtool window <p> <clip> --gap 12.3-15.1` (repeatable) · `--gap-remove 12.3` · `--gaps '12.3-15.1,20-20.6'` (`--gaps ''` clears) · `umtool set <p> <clip> gap.add=12.3-15.1 gap.remove=12.3 gaps=` · a gap's own: `gap.mark=12.3:off` `gap.why=12.3:dead-air` `gap.reason=12.3:walks off` `gap.corner=12.3:tr` (`…:default`, `gap.reason=12.3:` drop one) | `PUT /api/report/window {project, clip, token, gapAdd \| gapRemove \| gaps \| gapEdit}` | -| `gapCue` — `{mark?, min?, corner?, label?, place?}`: the mark at this clip's gaps' joins, over the project's `render.gapCue` ([below](#gaps-inside-a-clip)) | clip bench, under the waveform: **mark at joins**, **from** (s), **corner**, **where**, **label** | `umtool set <p> <clip> gapCue.mark=true gapCue.corner=tr gapCue.place=deck` (`gapCue=` clears it) | `PUT /api/report/window {project, clip, token, gapCue}` | +| `gapCue` — `{mark?, min?, corner?, label?, place?, border?}`: the mark at this clip's gaps' joins, over the project's `render.gapCue` ([below](#gaps-inside-a-clip)) | clip bench, under the waveform: **mark at joins**, **from** (s), **corner**, **where**, **label**, **border** | `umtool set <p> <clip> gapCue.mark=true gapCue.corner=tr gapCue.place=deck gapCue.border='#3aa0ff'` (`gapCue=` clears it) | `PUT /api/report/window {project, clip, token, gapCue}` | `key=` (nothing after the `=`) clears a knob; in umtool, **Clear** beside a field (Audio: **Clear all**). A claim's knobs are read from the clip that **stamps** it — the last clip carrying the claim id; the box on any other @@ -293,10 +293,20 @@ seconds (`report-to-video/gaps.mjs` is the rule and both clocks). gap's own words (`reason`, 1-24 characters) or its `why`'s word: `dead-air` "dead air", `idle` "idle", `other` nothing. THE LOOK is one set of numbers, common `GAP_CUE_LOOK`, which the module's page (as CSS: `gapCueCss`), the drawtext and umtool's element over a raw picture (`gapCueBoxStyle`) all read: 3 % of the frame's short side (32 px - at 1080), light text on a #101010 box at 86 % inside a real 2 px white border at 90 %, the box 0.38 em round the - text, inset 2.6 %; the text, box and border fade together. The face: the deck's own bold (DeckSansBold) in the - module's page, IBM Plex Mono Bold in the drawtext (a cut with no deck has no deck face). The variant is one edit of - `GAP_CUE_LOOK` (stills of A white border, B accent border, C heavy: the operator picks; A is drawn). + at 1080), white text on a #101010 box at 90 % inside a real 2 px border at full opacity, the box 0.38 em round the + text, inset 2.6 %; the text, box and border fade together. **The border is the deck's accent** (variant B, the + operator's pick, 20 Nov: it ties the mark to the deck's styling): `render.palette.accent`, the colour the deck draws + its accent rule and the source line's dots in (the brand's when one is resolved); a render with no palette accent, + and the drawtext of such a render, `#f5b300`. **`border`** (`render.gapCue.border`, a clip's `gapCue.border`) + overrides it: `accent` (the default; absent or null reads the same, so a take's manifest that dropped the key + draws the accent) or a `#rrggbb` colour -- `umtool look <p> gapCue='{"border":"#3aa0ff"}'`, `umtool set <p> <clip> + gapCue.border='#3aa0ff'` (`gapCue.border=` the project's), the Modules panel's **Border**, the bench's **border** + (a swatch beside it shows the colour drawn). One resolver for every drawing: common `gapCueBorderOf` / + `gapCueLook` -- the slice puts the colour on each mark (`border`) for the module's page, the drawtext takes the + clip's look, and Play and the bench hand umtool's element the same colour. **With the mark on, the look change + gives every mark's page and every segment drawn with a mark a new key once** (the page's CSS, the schedule's marks + and a marked segment's record now carry the border); off or unset, nothing changes. The face: the deck's own bold + (DeckSansBold) in the module's page, IBM Plex Mono Bold in the drawtext (a cut with no deck has no deck face). Joins less than 1.1 s apart are ONE mark saying their seconds together (and their reason only when they all give the same). It is chrome over the footage, never blurred, at the layout's free corner (`corner: auto`): the deck's footage box bottom left (its stamp stands top left, its posts top right), the plain cut's picture top left (never @@ -3284,7 +3294,8 @@ The full reference is [Gaps inside a clip](#gaps-inside-a-clip) (the mark at the | `render.gapCue.place` | `footage` (over the footage, at its corner) · `deck` (in the deck's band, at the end of the source line, left of the QR -- over the footage where the row has no room, in the stacked vertical deck and in a cut with no deck; the page measures the line in its own faces and never stands the mark on it) · default `footage` | `umtool look <p> gapCue='{"place":"deck"}'` | | `render.gapCue.corner` | `auto` (the layout's free corner) · `tl` · `tr` · `bl` · `br` · default `auto` | `umtool look <p> gapCue='{"corner":"br"}'` | | `render.gapCue.label` | text holding `{s}` (the time skipped: `27 s`, from a minute `1:12`) and maybe `{why}` (the gap's reason); a part in `[ ]` is drawn only when the gap has one; at most 40 characters · default `» {s}[ · {why}]` (`» 27 s`, `» 26 s · dead air`) | `umtool look <p> gapCue='{"label":"{s} later"}'` | -| a clip's `gapCue` | the same keys, over the project's | `umtool set <p> <clip> gapCue.mark=false gapCue.corner=tr gapCue.place=deck` (`gapCue=` clears them) | +| `render.gapCue.border` | `accent` (the deck's accent colour, `render.palette.accent`: its rule and dots; a render with none #f5b300) · a `#rrggbb` colour · default `accent` (the border at full opacity, the box near-black at 90 %, the text white) | `umtool look <p> gapCue='{"border":"#3aa0ff"}'` | +| a clip's `gapCue` | the same keys, over the project's | `umtool set <p> <clip> gapCue.mark=false gapCue.corner=tr gapCue.place=deck gapCue.border='#3aa0ff'` (`gapCue=` clears them) | | a gap's `mark`, `why`, `reason`, `corner` | `mark` `true` · `false` (over the clip's and the project's); `why` `dead-air` · `idle` · `other` (the mark says "dead air", "idle", nothing); `reason` its own words, 1-24 characters, said instead; `corner` `tl` · `tr` · `bl` · `br` (its mark there, over the clip's) | `umtool set <p> <clip> gap.mark=12.3:off gap.why=12.3:dead-air gap.reason=12.3:walks off gap.corner=12.3:tr` (`…:default`, `gap.reason=12.3:` drop one) · the bench: click the gap's band | ### Stamps diff --git a/umtool/lib/cli/groups.mjs b/umtool/lib/cli/groups.mjs @@ -347,7 +347,7 @@ export const GROUPS = [ ], docs: [ ["`set <project> <clip> key=value …`", - "a clip's **knobs**: `claim.at` `claim.hold` `claim.stamp` `claim.count` `claim.label` (the first mark's, or `--mark <id>`'s), its **marks** `mark.add=<verdict>[@<sec>]` `mark.remove=<id>` `mark.verdict=<verdict>` `marks=<json>`, `audio.offset` `audio.gain` `audio.fadeIn` `audio.fadeOut`, its picture's **blur** `blur.on=true` `blur.caption=…` `blur.strength` `blur.from` `blur.to` (`blur.on=` clears it; [knobs.md](knobs.md#a-clips-picture-blurred)), its **effects** `fx.zoom=<json>` `fx.receipts=<json>` `fx.punch=…` `fx.quote` `fx.punchIn=<json>` `fx.speakers=<json>` (`fx=<json>` all of them, `fx=` clears them; a shot is a file in the project; [knobs.md](knobs.md#effects)), its **gaps** `gap.add=12.3-15.1` `gap.remove=<sec>` `gaps=…` and a gap's own `gap.mark=<sec>:on|off|default` `gap.why=<sec>:dead-air|idle|other|default` `gap.reason=<sec>:<words>` (its mark says them) `gap.corner=<sec>:tl|tr|bl|br|default`, the **mark at its gaps' joins** `gapCue.mark=true` `gapCue.min` `gapCue.corner` `gapCue.label` over the project's `render.gapCue` (`gapCue=` clears it; [knobs.md](knobs.md#gaps-inside-a-clip)); on ANY entry (a post item, a still, a clip) `hideModules=diet,streak`, `shelfNote='…'` and `chapter='…'` (its name in the chapter list, one line of at most 100 characters; `chapter=` none); `--take <t>` writes the entry knobs into that take's patch; `key=` clears one ([knobs.md](knobs.md#marks))"], + "a clip's **knobs**: `claim.at` `claim.hold` `claim.stamp` `claim.count` `claim.label` (the first mark's, or `--mark <id>`'s), its **marks** `mark.add=<verdict>[@<sec>]` `mark.remove=<id>` `mark.verdict=<verdict>` `marks=<json>`, `audio.offset` `audio.gain` `audio.fadeIn` `audio.fadeOut`, its picture's **blur** `blur.on=true` `blur.caption=…` `blur.strength` `blur.from` `blur.to` (`blur.on=` clears it; [knobs.md](knobs.md#a-clips-picture-blurred)), its **effects** `fx.zoom=<json>` `fx.receipts=<json>` `fx.punch=…` `fx.quote` `fx.punchIn=<json>` `fx.speakers=<json>` (`fx=<json>` all of them, `fx=` clears them; a shot is a file in the project; [knobs.md](knobs.md#effects)), its **gaps** `gap.add=12.3-15.1` `gap.remove=<sec>` `gaps=…` and a gap's own `gap.mark=<sec>:on|off|default` `gap.why=<sec>:dead-air|idle|other|default` `gap.reason=<sec>:<words>` (its mark says them) `gap.corner=<sec>:tl|tr|bl|br|default`, the **mark at its gaps' joins** `gapCue.mark=true` `gapCue.min` `gapCue.corner` `gapCue.label` `gapCue.place` `gapCue.border=accent\\|'#rrggbb'` (its border: the deck's accent, or that colour) over the project's `render.gapCue` (`gapCue=` clears it; [knobs.md](knobs.md#gaps-inside-a-clip)); on ANY entry (a post item, a still, a clip) `hideModules=diet,streak`, `shelfNote='…'` and `chapter='…'` (its name in the chapter list, one line of at most 100 characters; `chapter=` none); `--take <t>` writes the entry knobs into that take's patch; `key=` clears one ([knobs.md](knobs.md#marks))"], ], }, { diff --git a/umtool/lib/report/benchData.ts b/umtool/lib/report/benchData.ts @@ -15,6 +15,7 @@ import { FETCH_MAX_WINDOW } from "@/lib/report/driver.mjs"; import { gapWalls } from "umtool-report-to-video/gaps"; import { deckOn } from "umtool-report-to-video/deck"; import { censorRegionsOf } from "umtool-report-to-video/clip-censor"; +import { resolveBrandRender } from "umtool-report-to-video/brand"; import { pieceHrefOfProject } from "@/lib/pieces/article"; import { readWorkingCut } from "@/lib/report/workingCut.mjs"; import { effectiveManifest } from "@/lib/report/manifest.mjs"; @@ -184,6 +185,19 @@ export async function clipBenchData( const v = render.gapCue; return v && typeof v === "object" && !Array.isArray(v) ? (v as Record<string, unknown>) : null; })(), + // The deck's accent (render.palette.accent, the brand's when it names one): the mark's border unless a gapCue + // `border` names a colour (common gapCueBorderOf). null: the render has none. + gapCueAccent: (() => { + try { + const render = resolveBrandRender(((effectiveManifest(manifest) as { render?: Record<string, unknown> }).render ?? {}) as Record<string, unknown>) as { + palette?: { accent?: unknown }; + }; + return typeof render?.palette?.accent === "string" ? render.palette.accent : null; + } catch { + // An unknown preset or brand: the build says what is wrong. + return null; + } + })(), hidden: censorRegionsOf(((manifest.timeline ?? []) as { id: string }[]).find((e) => e.id === clipId) ?? {}, manifest.render ?? {}, manifest.provenance ?? {}), generatedBy: typeof manifest.generatedBy === "string" ? manifest.generatedBy : null, view, diff --git a/umtool/lib/report/gaps-writer.test.mjs b/umtool/lib/report/gaps-writer.test.mjs @@ -194,6 +194,20 @@ test("the mark at the joins: a gap's own mark and why (gap.mark=, gap.why=, gapE assert.equal(await lookCommand([name, 'gapCue={"min":null}'], io), 0); assert.deepEqual((await read(dir)).render.gapCue, { mark: true }); assert.equal(await lookCommand([name, 'gapCue={"corner":"middle"}'], io), 1); + // The border (variant B): the project's through the look writer, the clip's through set; refused when no colour. + assert.equal(await lookCommand([name, 'gapCue={"border":"#3aa0ff"}'], io), 0); + assert.deepEqual((await read(dir)).render.gapCue, { mark: true, border: "#3aa0ff" }); + assert.equal(await lookCommand([name, 'gapCue={"border":"blue"}'], io), 1); + assert.equal(await lookCommand([name, 'gapCue={"border":null}'], io), 0); + assert.deepEqual((await read(dir)).render.gapCue, { mark: true }, "null drops it: the accent again"); + assert.equal(await run(name, "c01", "gapCue.border=#ff00aa"), 0); + assert.deepEqual((await clip(dir, "c01")).gapCue, { border: "#ff00aa" }); + assert.equal(await run(name, "c01", "gapCue.border=accent"), 0); + assert.deepEqual((await clip(dir, "c01")).gapCue, { border: "accent" }); + assert.equal(await run(name, "c01", "gapCue.border=#fff"), 1); + assert.match(lines.at(-1), /^ERR gapCue\.border is accent \(the deck's accent colour\) or a #rrggbb colour/); + assert.equal(await run(name, "c01", "gapCue.border="), 0); + assert.equal("gapCue" in (await clip(dir, "c01")), false, "cleared: the project's (absent reads as accent)"); }); test("umtool set: gap.add=, gap.remove=, gaps= (a list, JSON, or empty); timeline ls shows them", async () => { diff --git a/umtool/lib/report/knobsCli.mjs b/umtool/lib/report/knobsCli.mjs @@ -58,7 +58,7 @@ const GAP_KEYS = ["gaps", "gap.add", "gap.remove", "gap.mark", "gap.why", "gap.r /** A gap's own settings (`gapEdit` on the window writer): its mark, why, reason and corner. */ const GAP_OWN_SET_KEYS = ["gap.mark", "gap.why", "gap.reason", "gap.corner"]; /** The mark at this clip's gaps' joins (common gapCue.mjs): its own settings over the project's render.gapCue. */ -export const GAP_CUE_SET_KEYS = Object.freeze(["gapCue", "gapCue.mark", "gapCue.min", "gapCue.corner", "gapCue.label", "gapCue.place"]); +export const GAP_CUE_SET_KEYS = Object.freeze(["gapCue", "gapCue.mark", "gapCue.min", "gapCue.corner", "gapCue.label", "gapCue.place", "gapCue.border"]); export const VERTICAL_SET_KEYS = Object.freeze(["vertical", "vertical.crop", "vertical.layout", "vertical.aspect", "vertical.crops"]); export const SIDE_SET_KEYS = Object.freeze(["side", "side.item", "side.post", "side.from", "side.to", "side.place"]); /** The clip kit (lane clip-kit; report-to-video clip-kit.mjs): a clip's code in a per-clip build, its batch file name. */ @@ -145,6 +145,7 @@ export const SET_USAGE = [ " gapCue.mark=true|false gapCue.min=<s> gapCue.corner=auto|tl|tr|bl|br gapCue.label='» {s}' the mark at this", " clip's gaps' joins, over the project's (umtool look <p> gapCue='{\"mark\":true}'); `gapCue=` clears them.", " gapCue.place=footage|deck: over the footage at its corner, or in the deck's band at the end of the source line.", + " gapCue.border=accent|'#rrggbb': the mark's border, the deck's accent (the default) or that colour.", ].join("\n"); export const LOOK_USAGE = [ @@ -324,7 +325,7 @@ export async function setCommand(args, { root = REPORTS_ROOT, out = (s) => conso entryPatch.gapCue = value; } else { const k = key.slice("gapCue.".length); - entryPatch.gapCue = { ...(entryPatch.gapCue && typeof entryPatch.gapCue === "object" ? entryPatch.gapCue : {}), [k]: k === "label" && value !== null ? String(value) : value }; + entryPatch.gapCue = { ...(entryPatch.gapCue && typeof entryPatch.gapCue === "object" ? entryPatch.gapCue : {}), [k]: (k === "label" || k === "border") && value !== null ? String(value) : value }; } continue; } diff --git a/umtool/lib/report/manifest.mjs b/umtool/lib/report/manifest.mjs @@ -835,7 +835,7 @@ export function patchClipEntry(manifest, clipId, patch, { edit = "trim", now = n // it, `gapCue: null` (or "") drops the block, nothing left is no block. if (patch.gapCue !== undefined) { const v = patch.gapCue === "" ? null : patch.gapCue; - if (v !== null && !isObj(v)) throw new Error("gapCue must be { mark?, min?, corner?, label? }, or null to clear it"); + if (v !== null && !isObj(v)) throw new Error("gapCue must be { mark?, min?, corner?, label?, place?, border? }, or null to clear it"); const next = patchGapCue(entry.gapCue, v); const errors = gapCueErrors(next, "gapCue"); if (errors.length) throw new Error(errors.join("; ")); diff --git a/umtool/lib/report/playView.mjs b/umtool/lib/report/playView.mjs @@ -27,7 +27,7 @@ import { draftLine, readWorkingCut } from "./workingCut.mjs"; import { listTakes, previewFile } from "./takes.mjs"; import { sectionModel } from "./sectionEdit.mjs"; import { effectiveManifest, manifestToken } from "./manifest.mjs"; -import { clipGapCueOf, gapCueWanted } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; +import { clipGapCueOf, gapCueBorderOf, gapCueWanted } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; import { projectCombos } from "umtool-report-to-video/post-combo-prints"; import { mediaSceneOf, sceneEntry } from "umtool-report-to-video/post-media-scene"; import { videoAudio, videoEnter, videoFit, videoHidesChrome, videoLead, videoSeconds, videoSpan } from "umtool-report-to-video/video-entry"; @@ -243,7 +243,8 @@ export async function playViewWith(project, { take = null, bare = false, postFor ...(Array.isArray(e.gaps) && e.gaps.length ? { gaps: e.gaps } : {}), // The mark at those gaps' joins (common gapCue.mjs): its settings, the clip's over the project's -- only when a // gap of it is marked (lib/report/gapCueView.mjs draws it at Play's joins, on the render's timing). - ...(!basic && Array.isArray(e.gaps) && e.gaps.length && gapCueWanted(cueRender, e) ? { gapCue: clipGapCueOf(cueRender, e) } : {}), + // `borderColor`: its border as the render resolves it (gapCueBorderOf: the setting, else the deck's accent). + ...(!basic && Array.isArray(e.gaps) && e.gaps.length && gapCueWanted(cueRender, e) ? { gapCue: { ...clipGapCueOf(cueRender, e), borderColor: gapCueBorderOf(cueRender, e) } } : {}), blur: e.blur && typeof e.blur === "object" ? e.blur : null, // Its hidden regions (report-to-video clip-censor.mjs): Play draws them over the picture as the cut hides them. censor: censorRegionsOf(e, render, selected.provenance ?? {}), diff --git a/umtool/report-to-video/build-video.mjs b/umtool/report-to-video/build-video.mjs @@ -190,7 +190,7 @@ import { } from "./gap-mark.mjs"; // Under a deck the gap mark is the gap-cue module's pages, from the schedule's slice (gap-cue-slice.mjs). import { withGapCue } from "./gap-cue-slice.mjs"; -import { clipGapCueOf, gapCueWanted } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; +import { clipGapCueOf, gapCueLook, gapCueWanted } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; import { SYNC_FILE, writeSyncReport } from "./sync-report.mjs"; import { validateThreadEntries } from "./threads.mjs"; import { validateFlipEntries } from "./flips.mjs"; @@ -1870,6 +1870,9 @@ async function buildClipSegment(entry, meta, render, dirs, opts, chrome, nodes, if (!gapMarks.length) return ""; const size = gapMarkSize(width, height); const want = clipGapCueOf(render, clipE).corner; + // Its colours (common gapCueLook): the border the clip's `border` names, else the deck's accent + // (render.palette.accent), else the fallback amber -- the module's page and umtool's element read the same. + const look = gapCueLook(render, clipE); // Each mark fitted to its box (gapMarkPlaces): its text as drawn, the file drawtext reads. const places = gapMarkPlaces({ marks: gapMarks, box, want, prefer, size, avoid, busy }); const files = []; @@ -1883,10 +1886,10 @@ async function buildClipSegment(entry, meta, render, dirs, opts, chrome, nodes, const asked = gapMarkAsked(m, want); return { at: m.at, until: m.until, seconds: m.seconds, ...(m.count > 1 ? { count: m.count } : {}), text: places[k].text, corner: places[k].corner, ...(asked ? { asked } : {}), - rect: places[k].rect, + rect: places[k].rect, border: look.strokeColor, }; }); - return gapMarkFilters({ marks: gapMarks, places, files, size }); + return gapMarkFilters({ marks: gapMarks, places, files, size, look }); }; /** The picture's hidden regions as rects to keep the mark off: the source `sw` × `sh` (its `region`) shown in `dest`. */ const censorAvoid = (sw, sh, dest, region = null) => diff --git a/umtool/report-to-video/chrome-gap-cue.mjs b/umtool/report-to-video/chrome-gap-cue.mjs @@ -8,11 +8,13 @@ // path's own ramp: linear, to GAP_CUE_MOTION.peak). // // THE LOOK is common gapCue.mjs GAP_CUE_LOOK as CSS (gapCueCss): the deck's own -// bold face (DeckSansBold), a real border, the box inside it. The page is its +// bold face (DeckSansBold), a real border -- in the mark's `border`, the colour +// the slice resolved (gapCueLook / gapCueBorderOf: the deck's accent unless the +// clip or project names one) -- the box inside it. The page is its // live preview too (the module's `play`): Play the cut loads it as it is. // // PURE: a schedule and a render in, the page's HTML out. -import { GAP_CUE_MOTION, gapCueCss } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; +import { GAP_CUE_MOTION, gapCueCss, gapCueLook } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; import { compileCues, cuePageHtml, esc, r4 } from "./chrome-cues.mjs"; import { subtitleMarkup } from "./chrome-deck.mjs"; import { GAP_CUE_DECK_LINE } from "./gap-cue-slice.mjs"; @@ -61,7 +63,7 @@ const lit = (v) => JSON.stringify(v).replace(/</g, "\\u003c"); * @param {Record<string, any>} render * @param {{ segment: string, from: number, to: number }} window the snapped window * @param {{ fonts?: { regular?: string, bold?: string }, gsap?: string, look?: Record<string, unknown> }} [opts] `look` over - * GAP_CUE_LOOK's colours and box (the operator's stills of the variants; the build passes none) + * the mark's own (gapCueLook of its `border`: the operator's stills of the variants; the build passes none) */ export function gapCueHtml(schedule, render, window, opts = {}) { const w = gapCueWindows(schedule).find((x) => x.segment === window.segment); @@ -87,7 +89,9 @@ export function gapCueHtml(schedule, render, window, opts = {}) { { k: "gm", at: a, dur: inDur, to: { autoAlpha: peak }, ease: "none" }, { k: "gm", at: r4(b - outDur), dur: outDur, to: { autoAlpha: 0 }, ease: "none" }, ]); - const look = opts.look ? { look: opts.look } : {}; + // The mark's look: its border in the colour the slice resolved (absent -- a schedule from before it carried one -- + // gapCueLook of the render alone: its accent), the stills' `look` over it. + const look = { look: { ...gapCueLook(render, null, { border: m.border }), ...(opts.look ?? {}) } }; const line = m.place === "deck" ? GAP_CUE_DECK_LINE : 1.2; const guard = m.place === "deck" && m.line && m.alt ? m : null; let css = `${gapCueCss(".gm", { font: m.font, stroke: m.stroke, lineHeight: line, ...look })} diff --git a/umtool/report-to-video/gap-cue-slice.mjs b/umtool/report-to-video/gap-cue-slice.mjs @@ -44,7 +44,7 @@ // // PURE: a schedule and a render in, the slice out. Byte for byte: no clip // wanting a mark, no slice (the key absent). -import { GAP_CUE_LOOK, clipGapCueOf, gapCueWanted } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; +import { GAP_CUE_LOOK, clipGapCueOf, gapCueBorderOf, gapCueWanted } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; import { sourceLineRow, subtitleTokens } from "./chrome-deck.mjs"; import { censorRegionsOf } from "./clip-censor.mjs"; import { chatGeometry } from "./chrome-chat.mjs"; @@ -222,8 +222,9 @@ function fxShotAvoids(schedule, render, feed) { /** * The schedule's `gapCue` slice: `{ marks: [...], inSegment?: [clip ids] }`, or null when no clip wants a mark * (or no deck is drawn). Each mark: `{ id, segment, at, until, seconds, count?, text, place, corner?, asked?, - * rect, room, font, stroke, fell? }` -- `at`/`until` the cut's seconds, `rect` frame px (its width reckoned wide: - * deckFaceWidth), `room` the widest the element may draw, `font`/`stroke` px. + * rect, room, font, stroke, border, fell? }` -- `at`/`until` the cut's seconds, `rect` frame px (its width reckoned + * wide: deckFaceWidth), `room` the widest the element may draw, `font`/`stroke` px, `border` its border's colour + * (common gapCueBorderOf: the clip's `border`, else the deck's accent, `render.palette.accent`). * * @param {Record<string, any>} schedule the deck's (deckSchedule): its segments, stamps, posts, chat * @param {{ entries: any[], render: any, records?: Map<string, any> | null, provenance?: any }} o @@ -255,6 +256,7 @@ export function gapCueSlice(schedule, { entries, render, records = null, provena const own = recordGapMarks({ render, entry: e, record: basis }); if (!own.length) continue; const cue = clipGapCueOf(render, e); + const border = gapCueBorderOf(render, e); // Over the footage: the footage box (twocrop: crop one inside the safe area), the deck's free corner. const twocrop = stackedOn(render) && clipTwoCrop(e); const fb = twocrop ? twoCropMarkBox(stackedGeometry(render)) : { box: rectOf(overlayBox(render, { feed })), prefer: "bl" }; @@ -280,7 +282,7 @@ export function gapCueSlice(schedule, { entries, render, records = null, provena onCut.forEach((m, k) => { const asked = gapMarkAsked(m, cue.corner); const common = { - id: `${e.id}.g${k}`, segment: e.id, at: m.at, until: m.until, seconds: m.seconds, ...(m.count > 1 ? { count: m.count } : {}), + id: `${e.id}.g${k}`, segment: e.id, at: m.at, until: m.until, seconds: m.seconds, ...(m.count > 1 ? { count: m.count } : {}), border, }; const p = places[k]; const footage = { text: p.text, place: "footage", corner: p.corner, ...(asked ? { asked } : {}), rect: p.rect, room, font: p.size.fontSize, stroke: p.size.stroke }; diff --git a/umtool/report-to-video/gap-cue-slice.test.mjs b/umtool/report-to-video/gap-cue-slice.test.mjs @@ -16,6 +16,7 @@ import { deckGeometry, deckLayout, estimateSchedule, overlayBox, stampGeometry } import { tallyOf } from "./factcheck.mjs"; import { gapCueDeckRect, gapCueSlice, withGapCue } from "./gap-cue-slice.mjs"; import { gapMarkByChrome } from "./gap-mark.mjs"; +import { gapCueBorderOf, gapCueBoxStyle, gapCueLook } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; import { verticalRender } from "./vertical.mjs"; import gapCueModule from "./modules/gap-cue.mjs"; @@ -183,7 +184,9 @@ test("the page: one mark, its text escaped, the look's CSS (a real border, the d const html = gapCueHtml(sched, m.render, w, { fonts: FONTS }); assert.match(html, /data-gm="12 s &lt;later&gt;"/); assert.ok(!html.includes("<later>"), "escaped"); - assert.match(html, /border: 2px solid rgba\(255, 255, 255, 0\.9\)/); + // Variant B: the border in the deck's accent (this palette's #a97bff), at full opacity; the box at 0.9. + assert.match(html, /border: 2px solid rgba\(169, 123, 255, 1\)/); + assert.match(html, /linear-gradient\(rgba\(16, 16, 16, 0\.9\), rgba\(16, 16, 16, 0\.9\)\)/); assert.match(html, /font-family: 'DeckSansBold'/); assert.match(html, /id="gap-cue-data"/); const data = JSON.parse(/<script id="gap-cue-data" type="application\/json">(.*?)<\/script>/s.exec(html)[1]); @@ -507,3 +510,54 @@ test("review 1d, 10: a windowed take (its timeline the window's entries) and a p assert.ok(Math.abs(hit[0].offset - 0.5) < 0.05, `offset ${hit[0].offset} into the window`); assert.deepEqual(gapCueModule.regions(sched, { render: m.render, outDir: "/o", shift: 0, clip: { at: 0, dur: 1 } }), [], "a window before it: none"); }); + +test("variant B: each mark carries its border -- the deck's own accent, the clip's colour over the project's, the fallback with no palette accent -- and its page draws it", () => { + const borderDecl = (html) => /\.gm \{[^}]*border: ([^;]+);/.exec(html)?.[1]; + // The deck's accent: the colour the deck's page draws its source line's dots in (chrome-deck.mjs .deck-sub .sep). + const m = manifest({ gapCue: { mark: true } }); + const sched = withGapCue(scheduleOf(m), { entries: m.timeline, render: m.render, records: new Map([["c01", OLD_RECORD]]) }); + const [w] = gapCueWindows(sched); + assert.equal(w.mark.border, PALETTE.accent); + assert.match(deckHtml(sched, m.render, { fonts: FONTS }), new RegExp(`\\.deck-sub \\.sep \\{ color: ${PALETTE.accent};`), "the deck's dots: the same accent"); + assert.equal(borderDecl(gapCueHtml(sched, m.render, w, { fonts: FONTS })), "2px solid rgba(169, 123, 255, 1)"); + // In the deck's band too. + const md = manifest({ gapCue: { mark: true, place: "deck" } }); + const kd = sliceOf(md).marks[0]; + assert.equal(kd.place, "deck"); + assert.equal(kd.border, PALETTE.accent); + // A teal deck and an orange one: each mark its own deck's accent. + for (const accent of ["#1fb5a8", "#e8742a"]) { + const mm = manifest({ gapCue: { mark: true }, render: { palette: { ...PALETTE, accent } } }); + assert.equal(sliceOf(mm).marks[0].border, accent); + } + // No palette accent: the fallback amber. + const none = manifest({ gapCue: { mark: true }, render: { palette: { bg: "#12101a", fg: "#f4f1ea", muted: "#9a93ad" } } }); + const kn = sliceOf(none).marks[0]; + assert.equal(kn.border, "#f5b300"); + // The project's colour, and a clip's over it ("accent" on the clip: the deck's again). + assert.equal(sliceOf(manifest({ gapCue: { mark: true, border: "#3aa0ff" } })).marks[0].border, "#3aa0ff"); + const own = (gapCue) => manifest({ + gapCue: { mark: true, border: "#3aa0ff" }, + timeline: [clip("c01", "synthvid001", 600, { gaps: [{ from: 605, to: 617 }], gapCue }), clip("c02", "synthvid002", 1200)], + }); + assert.equal(sliceOf(own({ border: "#ff00aa" })).marks[0].border, "#ff00aa"); + assert.equal(sliceOf(own({ border: "accent" })).marks[0].border, PALETTE.accent); + // A schedule from before marks carried a border: the page resolves the render's (its accent). + const old = { ...sched, gapCue: { ...sched.gapCue, marks: sched.gapCue.marks.map(({ border: _b, ...k }) => k) } }; + assert.equal(borderDecl(gapCueHtml(old, m.render, gapCueWindows(old)[0], { fonts: FONTS })), "2px solid rgba(169, 123, 255, 1)"); +}); + +test("variant B: umtool's element over a raw picture (GapMarkChip: gapCueBoxStyle of gapCueLook of the colour Play and the bench resolve) is the page's box", () => { + const m = manifest({ gapCue: { mark: true } }); + const sched = withGapCue(scheduleOf(m), { entries: m.timeline, render: m.render, records: new Map([["c01", OLD_RECORD]]) }); + const [w] = gapCueWindows(sched); + const html = gapCueHtml(sched, m.render, w, { fonts: FONTS }); + // What Play's entry (playView.mjs: gapCueBorderOf(cueRender, e)) and the bench (ClipBench: gapCueBorderOf) hand the chip. + const colour = gapCueBorderOf(m.render, m.timeline[0]); + const chip = gapCueBoxStyle({ font: w.mark.font, stroke: w.mark.stroke, look: gapCueLook(null, null, { border: colour }) }); + const decl = (k) => new RegExp(`\\.gm \\{[^}]*${k}: ([^;]+);`).exec(html)?.[1]; + assert.equal(decl("border"), chip.border); + assert.equal(decl("background"), chip.background); + assert.equal(decl("color"), chip.color); + assert.equal(chip.color, "#ffffff"); +}); diff --git a/umtool/report-to-video/gap-mark-place.mjs b/umtool/report-to-video/gap-mark-place.mjs @@ -17,7 +17,7 @@ // mark too wide for its box is drawn smaller, then cut ("…"): never off it. // // PURE: no fs, no ffmpeg run. -import { GAP_CUE_LOOK, clipGapCueOf, gapCueText, gapCueWanted, gapCues, gapMarkOn, gapOwnSays } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; +import { GAP_CUE_LOOK, clipGapCueOf, gapCueBorderOf, gapCueText, gapCueWanted, gapCues, gapMarkOn, gapOwnSays } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; import { offsetIn, renderGaps } from "./gaps.mjs"; /** Plex Mono's advance, in ems: every glyph the same width. */ @@ -145,7 +145,7 @@ export function recordGapMarks({ render, entry, record }) { export const gapMarkAsked = (mark, want) => (typeof mark.corner === "string" && mark.corner ? mark.corner : want && want !== "auto" ? want : null); /** - * Do a segment's recorded marks (its cut record's `gapMarks`: each `{at, until, seconds, text, corner, asked?}`) + * Do a segment's recorded marks (its cut record's `gapMarks`: each `{at, until, seconds, text, corner, asked?, border?}`) * still say what the settings now draw (recordGapMarks)? null when they do, else what changed, in words -- for a * pass that rebuilds no segment (`--chrome-only`), which would otherwise lay the old marks (or none) without a word. * A recorded text cut to fit ("…") agrees with the text it was cut from. @@ -167,6 +167,8 @@ export function gapMarkDrift({ render, entry, record }) { if (Math.abs(m.at - Number(w?.at)) > 0.01 || Math.abs(m.until - Number(w?.until)) > 0.01) return `the mark at ${m.at} s moved`; if (!sameText(w?.text, m.text)) return `"${w?.text}" now says "${m.text}"`; if ((w?.asked ?? null) !== gapMarkAsked(m, want)) return `the mark at ${m.at} s asks for another corner`; + // A record from before the border was kept (none recorded) is not judged by it. + if (typeof w?.border === "string" && w.border !== gapCueBorderOf(render, entry)) return `the mark's border is ${gapCueBorderOf(render, entry)} now, drawn ${w.border}`; } return null; } diff --git a/umtool/report-to-video/gap-mark.mjs b/umtool/report-to-video/gap-mark.mjs @@ -20,8 +20,9 @@ // THE LOOK is common gapCue.mjs's GAP_CUE_LOOK (umtool's pages draw it from the // same numbers): IBM Plex Mono Bold (the vendored face: the same mark whatever // the brand), 3 % of the frame's short side (32 px at 1080), light text on a -// near-opaque dark box inside a light 2 px border (operator, 20 Nov: "more -// visible and readable with a border"), faded in and out by `alpha` +// near-opaque dark box inside a 2 px border (operator, 20 Nov: "more visible +// and readable with a border"; "Go with variant B": the border in the deck's +// accent, common gapCueLook -- the build passes the clip's), faded in and out by `alpha` // (GAP_CUE_MOTION), which fades the box and its border with the text. The // border is a second drawtext under the first: the same text, unseen, its box // the border's colour and wider by the stroke. No sound. diff --git a/umtool/report-to-video/gap-mark.test.mjs b/umtool/report-to-video/gap-mark.test.mjs @@ -5,7 +5,7 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { GAP_CUE_LIFE } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; +import { GAP_CUE_LIFE, gapCueLook } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; import { GAP_MARK_FIT_MIN, censorAvoidRects, centredIn, gapMarkDrift, gapMarkFilters, gapMarkFit, gapMarkPlaces, gapMarkRect, gapMarkSize, insideRect, recordGapMarks, segmentGapJoins, segmentGapMarks, twoCropMarkBox, verticalMarkBox, @@ -89,12 +89,29 @@ test("the filters: per mark its border (the text unseen, a wider box) then its t const at = "x=142:y=984:alpha='0.9*clip(min((t-2)/0.15,(3.1-t)/0.35),0,1)':enable='between(t,2,3.1)'"; assert.equal( f, - `drawtext=textfile='/out/segments/c1.gapmark-0.txt':expansion=none:fontfile='/fonts/Mono.ttf':fontsize=32:fontcolor=0xffffff@0:box=1:boxcolor=0xffffff@0.9:boxborderw=14:${at},` + - `drawtext=textfile='/out/segments/c1.gapmark-0.txt':expansion=none:fontfile='/fonts/Mono.ttf':fontsize=32:fontcolor=0xffffff:box=1:boxcolor=0x101010@0.86:boxborderw=12:${at}`, + // Variant B with no look passed: the fallback amber border at full opacity, the box at 0.9. + `drawtext=textfile='/out/segments/c1.gapmark-0.txt':expansion=none:fontfile='/fonts/Mono.ttf':fontsize=32:fontcolor=0xffffff@0:box=1:boxcolor=0xf5b300@1:boxborderw=14:${at},` + + `drawtext=textfile='/out/segments/c1.gapmark-0.txt':expansion=none:fontfile='/fonts/Mono.ttf':fontsize=32:fontcolor=0xffffff:box=1:boxcolor=0x101010@0.9:boxborderw=12:${at}`, ); assert.equal(gapMarkFilters({ marks: [], places: [], files: [], size }), ""); }); +test("the drawtext's border (variant B): the colour the clip's look resolves -- the deck's accent, a setting's colour, the fallback with none", () => { + const size = gapMarkSize(1920, 1080); + const one = (look) => gapMarkFilters({ marks: [{ at: 2, until: 3.1 }], places: [{ rect: { x: 128, y: 970 } }], files: ["/f.txt"], size, font: "/m.ttf", look }); + const borderOf = (f) => /fontcolor=0xffffff@0:box=1:boxcolor=([^:]+):/.exec(f)?.[1]; + const boxOf = (f) => /fontcolor=0xffffff:box=1:boxcolor=([^:]+):/.exec(f)?.[1]; + const clip = { type: "clip", id: "c1", gaps: [{ from: 3, to: 9 }] }; + assert.equal(borderOf(one(gapCueLook({ palette: { accent: "#1fb5a8" } }, clip))), "0x1fb5a8@1", "the palette's accent"); + assert.equal(borderOf(one(gapCueLook({ palette: { accent: "#e8742a" } }, clip))), "0xe8742a@1"); + assert.equal(borderOf(one(gapCueLook({}, clip))), "0xf5b300@1", "no palette: the fallback"); + assert.equal(borderOf(one(gapCueLook({ palette: { accent: "#1fb5a8" }, gapCue: { border: "#3aa0ff" } }, clip))), "0x3aa0ff@1", "the project's colour"); + assert.equal(borderOf(one(gapCueLook({ palette: { accent: "#1fb5a8" }, gapCue: { border: "#3aa0ff" } }, { ...clip, gapCue: { border: "accent" } }))), "0x1fb5a8@1", "the clip's accent over it"); + // The text white, the box near-black at 0.9, whatever the border. + assert.equal(boxOf(one(gapCueLook({ palette: { accent: "#1fb5a8" } }, clip))), "0x101010@0.9"); + assert.match(one(gapCueLook({ palette: { accent: "#1fb5a8" } }, clip)), /fontcolor=0xffffff:box=1/); +}); + test("every drawtext draws its text as written: expansion=none, so a % or a backslash in a reason is words (review 1, 1)", () => { const size = gapMarkSize(1920, 1080); const marks = [{ at: 2, until: 3.1 }, { at: 6, until: 7.1 }]; @@ -170,6 +187,10 @@ test("gapMarkDrift: a segment's recorded marks against what the settings draw no assert.match(gapMarkDrift({ render: on, entry: { ...entry, gapCue: { corner: "tr" } }, record: { ...record, gapMarks: drawn } }) ?? "", /another corner/); // A text cut to fit agrees with the text it was cut from. assert.equal(gapMarkDrift({ render: on, entry, record: { ...record, gapMarks: [{ ...drawn[0], text: "» 2…" }] } }), null); + // Its border (variant B): judged when recorded (a record from before kept none, and is not judged by it). + const teal = { ...on, palette: { accent: "#1fb5a8" } }; + assert.equal(gapMarkDrift({ render: teal, entry, record: { ...record, gapMarks: [{ ...drawn[0], border: "#1fb5a8" }] } }), null); + assert.equal(gapMarkDrift({ render: teal, entry: { ...entry, gapCue: { border: "#3aa0ff" } }, record: { ...record, gapMarks: [{ ...drawn[0], border: "#1fb5a8" }] } }), "the mark's border is #3aa0ff now, drawn #1fb5a8"); }); test("a vertical clip's mark stands inside the safe area in every layout; a split's at its picture's top right, off its captions (review 1, 3 and 4)", () => { diff --git a/umtool/report-to-video/gaps-render.test.mjs b/umtool/report-to-video/gaps-render.test.mjs @@ -208,10 +208,13 @@ test("the gap mark ON draws '» 1 s' at the join over its life, in the record; o assert.equal(md5(p.seg("c2")), c2); const rec = await record(p, "c1"); // The join: 2 s into c1 (1–3 plays, 3–4 is out). Up 1.1 s, at the plain cut's top left. - assert.deepEqual(rec.gapMarks.map(({ rect, ...m }) => m), [{ at: 2, until: 3.1, seconds: 1, text: "» 1 s", corner: "tl" }]); + // Its border (variant B): the render's palette accent, recorded beside where it stood. + const accent = JSON.parse(await readFile(p.manifestPath, "utf8")).render.palette.accent; + assert.equal(accent, PALETTE.accent); + assert.deepEqual(rec.gapMarks.map(({ rect, ...m }) => m), [{ at: 2, until: 3.1, seconds: 1, text: "» 1 s", corner: "tl", border: accent }]); assert.deepEqual([rec.gapMarks[0].rect.x, rec.gapMarks[0].rect.y], [8, 8], "the record says where it was drawn: the picture's top left, inset"); near(await probeDuration(p.seg("c1"), FPS), 4, 1 / FPS + 1e-6, "the mark adds no time"); - // Its box at 320×180 (GAP_CUE_LOOK): inset 8, a 2 px light border, then the dark box (5 px above a 12 px face): + // Its box at 320×180 (GAP_CUE_LOOK): inset 8, a 2 px accent border, then the dark box (5 px above a 12 px face): // the box's top inside the border is darker than the grey while it is up. const y = cropLumas(p.seg("c1"), 11, 10, 30, 4); const yPlain = cropLumas(plain.seg("c1"), 11, 10, 30, 4); diff --git a/umtool/report-to-video/modules/config-loader.test.mjs b/umtool/report-to-video/modules/config-loader.test.mjs @@ -181,7 +181,11 @@ test("the panel: the gap mark (a window module of its own, a look key the writer assert.ok(row, "the gap mark is in the panel"); assert.equal(row.base, "render.gapCue"); assert.deepEqual(row.fields, { mark: true, min: 4 }); - assert.deepEqual(row.ui.map((f) => f.key), ["mark", "min", "place", "corner", "label"]); + assert.deepEqual(row.ui.map((f) => f.key), ["mark", "min", "place", "corner", "label", "border"]); + // The border's row (variant B): accent, the default, or a colour; written through the same merging writer. + assert.equal(row.ui.find((f) => f.key === "border").default, "accent"); + const wb = panelWrite(m, "gap-cue", { fields: { border: "#3aa0ff" } }); + assert.deepEqual(applyLookPatch(m, wb.render).render.gapCue, { mark: true, min: 4, border: "#3aa0ff" }); // min cleared, the label set: min goes as null, so the merging writer drops it. const w = panelWrite(m, "gap-cue", { fields: { min: null, label: "{s} later" } }); assert.deepEqual(w.render, { gapCue: { min: null, mark: true, label: "{s} later" } }); diff --git a/umtool/report-to-video/modules/gap-cue.mjs b/umtool/report-to-video/modules/gap-cue.mjs @@ -11,7 +11,7 @@ import path from "node:path"; import { - GAP_CUE_CORNERS, GAP_CUE_DEFAULTS, GAP_CUE_LABEL_MAX, GAP_CUE_MIN, GAP_CUE_PLACES, GAP_REASON_MAX, validateGapCue, + GAP_CUE_BORDER_FALLBACK, GAP_CUE_CORNERS, GAP_CUE_DEFAULTS, GAP_CUE_LABEL_MAX, GAP_CUE_MIN, GAP_CUE_PLACES, GAP_REASON_MAX, validateGapCue, } from "yt-dlp-transcript-common/lib/report/gapCue.mjs"; import { snapWindow } from "../deck.mjs"; import { GAP_CUE_ID_RE, gapCueHtml, gapCueWindows } from "../chrome-gap-cue.mjs"; @@ -37,6 +37,7 @@ export default defineModule({ { key: "place", type: "enum", options: [...GAP_CUE_PLACES], label: "Where (over the footage, or in the deck)", default: GAP_CUE_DEFAULTS.place }, { key: "corner", type: "enum", options: [...GAP_CUE_CORNERS], label: "Corner (over the footage)", default: GAP_CUE_DEFAULTS.corner }, { key: "label", type: "text", label: "Label ({s} the time skipped, {why} the reason, [ ] only with one)", default: GAP_CUE_DEFAULTS.label }, + { key: "border", type: "text", label: "Border (accent: the deck's accent colour, or #rrggbb)", default: GAP_CUE_DEFAULTS.border }, ], docs: { heading: "Gap mark", @@ -47,7 +48,8 @@ export default defineModule({ ["`render.gapCue.place`", "`footage` (over the footage, at its corner) · `deck` (in the deck's band, at the end of the source line, left of the QR -- over the footage where the row has no room, in the stacked vertical deck and in a cut with no deck; the page measures the line in its own faces and never stands the mark on it) · default `footage`", "`umtool look <p> gapCue='{\"place\":\"deck\"}'`"], ["`render.gapCue.corner`", "`auto` (the layout's free corner) · `tl` · `tr` · `bl` · `br` · default `auto`", "`umtool look <p> gapCue='{\"corner\":\"br\"}'`"], ["`render.gapCue.label`", `text holding \`{s}\` (the time skipped: \`27 s\`, from a minute \`1:12\`) and maybe \`{why}\` (the gap's reason); a part in \`[ ]\` is drawn only when the gap has one; at most ${GAP_CUE_LABEL_MAX} characters · default \`${GAP_CUE_DEFAULTS.label}\` (\`» 27 s\`, \`» 26 s · dead air\`)`, "`umtool look <p> gapCue='{\"label\":\"{s} later\"}'`"], - ["a clip's `gapCue`", "the same keys, over the project's", "`umtool set <p> <clip> gapCue.mark=false gapCue.corner=tr gapCue.place=deck` (`gapCue=` clears them)"], + ["`render.gapCue.border`", `\`accent\` (the deck's accent colour, \`render.palette.accent\`: its rule and dots; a render with none ${GAP_CUE_BORDER_FALLBACK}) · a \`#rrggbb\` colour · default \`accent\` (the border at full opacity, the box near-black at 90 %, the text white)`, "`umtool look <p> gapCue='{\"border\":\"#3aa0ff\"}'`"], + ["a clip's `gapCue`", "the same keys, over the project's", "`umtool set <p> <clip> gapCue.mark=false gapCue.corner=tr gapCue.place=deck gapCue.border='#3aa0ff'` (`gapCue=` clears them)"], ["a gap's `mark`, `why`, `reason`, `corner`", `\`mark\` \`true\` · \`false\` (over the clip's and the project's); \`why\` \`dead-air\` · \`idle\` · \`other\` (the mark says "dead air", "idle", nothing); \`reason\` its own words, 1-${GAP_REASON_MAX} characters, said instead; \`corner\` \`tl\` · \`tr\` · \`bl\` · \`br\` (its mark there, over the clip's)`, "`umtool set <p> <clip> gap.mark=12.3:off gap.why=12.3:dead-air gap.reason=12.3:walks off gap.corner=12.3:tr` (`…:default`, `gap.reason=12.3:` drop one) · the bench: click the gap's band"], ], },