@glissade/cli 0.12.0-pre.1 → 0.12.1

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/dist/index.d.ts CHANGED
@@ -688,6 +688,13 @@ interface LintOptions {
688
688
  caption?: CaptionProbe;
689
689
  /** include Tier-2 (warn-only) diagnostics; default true */
690
690
  warnings?: boolean;
691
+ /**
692
+ * Caller-supplied caption mode (e.g. the render config is burning captions).
693
+ * MAY escalate caption-fit to Tier-1 — but the committed script's own
694
+ * `captionMode` (on the timing manifest) is the authoritative signal and
695
+ * takes precedence. Omit to defer entirely to the manifest.
696
+ */
697
+ captionMode?: 'burn' | 'sidecar';
691
698
  }
692
699
  /**
693
700
  * Lint the committed narration timing. Pure: same inputs (timing + the probe's
@@ -99,17 +99,24 @@ function lintNarration(timing, opts = {}) {
99
99
  };
100
100
  for (const s of timing.segments) checkBudget(s.id, s.duration, s.maxSec ?? budgets[s.id]);
101
101
  for (const p of timing.pauses ?? []) checkBudget(p.id, p.duration, budgets[p.id]);
102
- if (opts.caption) {
102
+ const burnDeclared = (timing.captionMode ?? opts.captionMode) === "burn";
103
+ const linesDeclared = timing.captionMaxLines !== void 0;
104
+ const captionEscalated = burnDeclared || linesDeclared;
105
+ const captionTier = captionEscalated ? 1 : 2;
106
+ const runCaptionFit = captionEscalated || warnings;
107
+ const nudge = " — caption-fit is warn-only until you declare maxLines or captionMode:\"burn\" in the script";
108
+ const withNudge = (msg) => captionEscalated ? msg : msg + nudge;
109
+ if (opts.caption && runCaptionFit) {
103
110
  const probe = opts.caption;
104
111
  for (const c of cues) {
105
112
  const id = cueId(c, perSeg.get(c.segId) ?? 1);
106
113
  const { lines, bottomY } = probe.measure(c.text);
107
114
  if (lines > probe.maxLines) out.push({
108
115
  rule: "caption-fit",
109
- tier: 1,
110
- severity: "error",
116
+ tier: captionTier,
117
+ severity: captionEscalated ? "error" : "warn",
111
118
  id,
112
- message: `caption wraps to ${lines} lines, over maxLines ${probe.maxLines}`,
119
+ message: withNudge(`caption wraps to ${lines} lines, over maxLines ${probe.maxLines}`),
113
120
  detail: {
114
121
  lines,
115
122
  maxLines: probe.maxLines,
@@ -118,10 +125,10 @@ function lintNarration(timing, opts = {}) {
118
125
  });
119
126
  else if (bottomY > probe.sceneH + 1e-6) out.push({
120
127
  rule: "caption-fit",
121
- tier: 1,
122
- severity: "error",
128
+ tier: captionTier,
129
+ severity: captionEscalated ? "error" : "warn",
123
130
  id,
124
- message: `caption overflows the frame: its lowest line ends at y=${bottomY.toFixed(0)} of ${probe.sceneH}`,
131
+ message: withNudge(`caption overflows the frame: its lowest line ends at y=${bottomY.toFixed(0)} of ${probe.sceneH}`),
125
132
  detail: {
126
133
  bottomY: round(bottomY),
127
134
  sceneH: probe.sceneH,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissade/cli",
3
- "version": "0.12.0-pre.1",
3
+ "version": "0.12.1",
4
4
  "description": "glissade CLI: headless rendering via backend-skia (+ FFmpeg mux).",
5
5
  "license": "Apache-2.0",
6
6
  "engines": {
@@ -23,15 +23,15 @@
23
23
  "@napi-rs/canvas": "^0.1.65",
24
24
  "esbuild": "^0.28.0",
25
25
  "jiti": "^2.4.2",
26
- "@glissade/backend-skia": "0.12.0-pre.1",
27
- "@glissade/core": "0.12.0-pre.1",
28
- "@glissade/interact": "0.12.0-pre.1",
29
- "@glissade/lottie": "0.12.0-pre.1",
30
- "@glissade/svg": "0.12.0-pre.1",
31
- "@glissade/narrate": "0.12.0-pre.1",
32
- "@glissade/player": "0.12.0-pre.1",
33
- "@glissade/scene": "0.12.0-pre.1",
34
- "@glissade/sfx": "0.12.0-pre.1"
26
+ "@glissade/backend-skia": "0.12.1",
27
+ "@glissade/core": "0.12.1",
28
+ "@glissade/interact": "0.12.1",
29
+ "@glissade/lottie": "0.12.1",
30
+ "@glissade/svg": "0.12.1",
31
+ "@glissade/narrate": "0.12.1",
32
+ "@glissade/player": "0.12.1",
33
+ "@glissade/scene": "0.12.1",
34
+ "@glissade/sfx": "0.12.1"
35
35
  },
36
36
  "repository": {
37
37
  "type": "git",