@ossclip/core 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cover.ts +21 -0
- package/src/overrides.ts +13 -0
package/package.json
CHANGED
package/src/cover.ts
CHANGED
|
@@ -59,6 +59,27 @@ export function coverHeadline(text: string, maxWords = COVER_MAX_WORDS): string
|
|
|
59
59
|
return out.join(" ").replace(/[,;:—–-]+$/, "");
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* What the cover step should emit.
|
|
64
|
+
*
|
|
65
|
+
* "textless" exists because of the Urdu field run 2026-08-05: a run without
|
|
66
|
+
* `--produce` has no LLM hook text, and the old behavior skipped the cover
|
|
67
|
+
* entirely — but frame selection needs no text at all, and the
|
|
68
|
+
* sharpness-scored face frame is a clean thumbnail on its own. Only the
|
|
69
|
+
* banner needs a headline; the pick does not, so a missing headline demotes
|
|
70
|
+
* the cover to a bare frame instead of erasing it.
|
|
71
|
+
*/
|
|
72
|
+
export type CoverDecision = "banner" | "textless" | "none";
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Pure so the three-way outcome is testable without a video, ffmpeg, or a
|
|
76
|
+
* beat sheet on disk — the same I/O split as `openCommand()`.
|
|
77
|
+
*/
|
|
78
|
+
export function coverDecision(coverEnabled: boolean, headline: string): CoverDecision {
|
|
79
|
+
if (!coverEnabled) return "none";
|
|
80
|
+
return headline.trim() ? "banner" : "textless";
|
|
81
|
+
}
|
|
82
|
+
|
|
62
83
|
/** Where the face sits in the COVER frame, as fractions of it. */
|
|
63
84
|
export interface CoverFace {
|
|
64
85
|
centerXFrac: number;
|
package/src/overrides.ts
CHANGED
|
@@ -171,6 +171,19 @@ export function captionEditWas(
|
|
|
171
171
|
export const OverrideDocSchema = z.object({
|
|
172
172
|
/** Global style tokens — the look is a system, so these are not per-element. */
|
|
173
173
|
theme: ThemeSchema.partial().default({}),
|
|
174
|
+
/**
|
|
175
|
+
* Captions OFF for the whole video. Doc-global like `theme`, deliberately
|
|
176
|
+
* NOT a per-scene key: visibility is one decision about the output —
|
|
177
|
+
* `captionY`/`captionScale` (per scene, above) style captions, this one
|
|
178
|
+
* removes the track. Optional with NO default so every overrides.json
|
|
179
|
+
* written before the key existed parses byte-identically; absent means
|
|
180
|
+
* visible, and the editor DELETES the key rather than writing `false`
|
|
181
|
+
* (the clearVideo/restoreScene rule — an explicit false is still an
|
|
182
|
+
* override with nothing to say). Produce ORs this with `--no-captions`
|
|
183
|
+
* (`resolveCaptionsHidden`, apps/cli/src/produce.ts): either surface can
|
|
184
|
+
* hide, neither can force captions back on over the other.
|
|
185
|
+
*/
|
|
186
|
+
captionsHidden: z.boolean().optional(),
|
|
174
187
|
scenes: z.record(z.string(), SceneOverrideSchema).default({}),
|
|
175
188
|
/** Retyped caption words, keyed by caption-stream word index. */
|
|
176
189
|
captions: z.record(z.string(), CaptionEditSchema).default({}),
|