// The clip editor's shapes (release 35 C2), as lib/report/clipEditor.mjs // returns them and components/projects/review/ClipEditor.tsx reads them. export type AssistEdit = { at: string; by: string; what: string; from: { cutStart: number; cutEnd: number } | null; to: { cutStart: number; cutEnd: number } }; export type Assist = { by: "assistant" | "operator"; proposal?: string; score?: number; why?: string; original?: { start: number; end: number; cutStart?: number; cutEnd?: number }; edits?: AssistEdit[]; }; export type EditorClip = { id: string; channel: string | null; video: string; start: number; end: number; cutStart: number | null; cutEnd: number | null; quote: string | null; title: string | null; assist: Assist | null; key: string | null; ruling: string | null; montage: boolean; /** Seconds cut out of its middle (gaps.mjs), when it has any. */ gaps?: { from: number; to: number }[]; /** A short's framing (release 36): `crop` = [x, y, w, h], fractions of the source picture. */ vertical: { crop: number[]; aspect?: number } | null; /** The clip kit (lane clip-kit): its own code (`qr`: false or {corner?, links?}) and batch `name`, as written. */ kit?: { qr?: false | { corner?: string; links?: string }; name?: string; promo?: false | { lead?: number; fade?: number; hold?: number }; zooms?: unknown[]; coldOpen?: { from: number; to: number }; censor?: false | CensorSet; [k: string]: unknown }; /** Its recording's hidden regions (render.censor naming its video). */ recordingCensor?: Array; /** Every region the cut hides on it (clip-censor.mjs censorRegionsOf): drawn over the player and the live preview. */ hidden?: Array<{ box: number[]; style: "blur" | "black" | "pixelate"; strength: number; from: number | null; to: number | null }>; /** Room at its edges (release 36 lane E): the clip's own `room` as written (false: none), and the edges it gets. */ room?: false | { tail?: boolean; head?: boolean } | null; roomEdges?: { tail: boolean; head: boolean } | null; /** The video knobs: the claim as written (id, verdict, and its stamp's knobs), the entry that stamps it, the sound. */ claim?: ClaimKnobs | null; stampsOn?: string | null; /** Every mark (plans/clip-marks.md), in order, each with the entry that stamps it; `claim` is the first. */ marks?: MarkView[]; audio?: ClipAudio | null; /** The deck's words for the clip as written (absent keys are automatic): the live preview's fields. */ onscreen?: { title?: string; subtitle?: string } | null; /** The clip's picture blurred at the encode (clip-blur.mjs), as written. */ blur?: ClipBlur | null; /** What a new clip from this one's recording copies: its section, its citation link, its channel as written. */ section?: number | string | null; citeUrl?: string | null; ownChannel?: string | null; }; /** A clip's blur: on, the caption drawn on the blurred picture, its strength (% of the picture's height), a partial span (source seconds). */ export type ClipBlur = { on: true; caption?: string; strength?: number; from?: number; to?: number }; /** The blur's defaults and bounds, and whether this cut draws it (render.blur "off": the uncensored variant). */ export type BlurDefaults = { caption: string; captionMax: number; strength: { min: number; max: number; default: number }; rendered: boolean }; /** A claim with its knobs (plans/video-knobs-plan.md): `at` is a source second. */ export type ClaimKnobs = { id: string; verdict: string; at?: number; hold?: number; stamp?: boolean; count?: number; label?: string; eventDate?: string }; /** A mark as the clip editor shows it: its knobs, and the clip that stamps it (the last carrying its id). */ export type MarkView = ClaimKnobs & { stampsOn: string | null }; /** A verdict a mark may take, with this cut's words and colour; `stock`: the cut's own (relabelled, or in use). */ export type MarkVerdict = { verdict: string; label: string; stampLabel: string; color: string; stock: boolean }; /** A clip's sound at the encode: offset in ms (+ = later), gain in dB, fades in s. */ export type ClipAudio = { offset?: number; gain?: number; fadeIn?: number; fadeOut?: number }; /** What a claim knob is when absent: the cut's stamp seconds, whether stamps are drawn, the count, each verdict's stamp word. */ export type KnobDefaults = { hold: number; stampShown: boolean; count: number; labels: Record; verdicts?: MarkVerdict[] }; export type Speaker = { index: number; role?: "host" | "subject" | "other"; label?: string; seconds?: number; turns?: number; how?: "auto" | "operator"; sameAs?: number }; export type Proposal = { id: string; start: number; end: number; score?: number; why?: string; moments?: string[]; used?: boolean; clipId?: string | null }; export type EditorView = { clips: EditorClip[]; token: string | null; rulingsError: string | null; reactionsError: string | null; reactions: { source: { channel?: string; video?: string; duration?: number; words?: string | null } | null; params: Record | null; speakers: Speaker[]; proposals: Proposal[]; proposalCount: number; proposedAt: string | null; rolesChangedAt: string | null; } | null; repropose: { available: boolean; why: string | null }; /** The shorts on disk, by clip id (release 36). */ shorts: Record; /** * A live pre-clip project's record (lib/report/clipsLive.mjs, plans/live-preclip.md): * the stream it grows from, how far it is transcribed and mined, and its flags * (a restart on another clock, a landing check that did not match). Null: not live. */ live?: { status: "live" | "final"; transcribedTo: number; minedTo: number; passes: number; lastPass: string | null; flags: { at: string; why: string }[]; } | null; /** The cut's render.room and its join's length (release 36 lane E). */ room?: { tail: boolean; head: boolean; minGap: number | null; maxS: number | null; join: number }; /** The claim knobs' defaults (video knobs). */ knobs?: KnobDefaults; /** The blur's defaults and bounds (video knobs). */ blur?: BlurDefaults; }; export type Turn = { start: number; end: number; speaker: number }; export type Laugh = { start: number; end: number; score: number | null; speaker: number | null }; export type TimedWord = { w: string; start: number; end: number }; export type Cue = { start: number; end: number; text: string }; export type Neighbourhood = { from: number; to: number; turns: Turn[]; laughs: Laugh[]; words: TimedWord[] | null; cues: Cue[] | null; duration: number | null; }; /** The take "Render a take" makes again (the clip deck's rule), or null: the Takes page chooses. */ export type RenderTarget = { take: string; label: string; builtAt: string | null; why: "latest" | "picked" | "whole cut" } | null; /** Hidden regions (report-to-video clip-censor.mjs): boxes as fractions of the source picture, each maybe over a span. */ export type CensorBox = number[] | { box: number[]; from?: number; to?: number }; export type CensorSet = { boxes: CensorBox[]; style?: "blur" | "black" | "pixelate"; strength?: number; from?: number; to?: number };