/** * Does the docked strip have room for the previously-spoken chunk? * * ★★ Lives here, not in `VoiceMiniController`, so it can be tested by CALLING * it. The mini caption's other invariants are pinned by reading the component's * source as text, which is all that is available for JSX — but this is a pure * decision about lengths, and a real test that feeds it real chunk sizes is * worth more than a grep for its name. */ /** * Roughly how many characters survive the strip's three-line clamp. * * ★★ Derived, not guessed — and the first version of this got it wrong in a * way worth recording. It estimated ~75 characters of capacity and then set * the budget to 160, so an 80+80 pair passed: the previous chunk is rendered * FIRST, so it consumed the whole clamp and hid the sentence being spoken. * The number contradicted the reasoning printed directly above it, and it * re-admitted the exact bug this module exists to prevent. * * The arithmetic, at the docked panel width both products ship (440px): * 440 − px-3 (24) − px-4 (32) − gap-3 (12) − orb w-40 (160) ≈ 212px * and on a 320px phone the same subtraction leaves ≈ 92px. At `text-sm` * (14px, ~7px average advance) that is ~30 and ~13 characters a line, so the * three-line clamp holds roughly 90 and 40 characters respectively. * * The budget is the NARROWEST of those, not an average — 70 was the second * wrong answer here. A single constant cannot be right for both widths, and * the promise being kept is "the sentence being spoken is never dropped". Only * fitting the smallest layout keeps it everywhere; sizing for the docked * desktop case means a 40+30 pair passes and then clips the current chunk on a * phone, which is the whole defect again in a narrower window. * * Erring small costs a little unused room on wide panels. Erring large costs * the feature on small ones. Those are not symmetric. * * The consequence is deliberate: with chunks running to `SPEECH_CHUNK_CHARS` = * 180, context will often NOT be shown — the honest answer, because there is * often no room. "When there is room" has to mean something for the promise to * hold at all. */ export declare const MINI_CAPTION_BUDGET = 40; export declare const showPreviousChunk: (synced: { chunks: string[]; index: number; }) => boolean; //# sourceMappingURL=miniCaptionBudget.d.ts.map