@glissade/narrate 0.12.0 → 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
@@ -74,6 +74,23 @@ interface NarrationScript {
74
74
  * the committed JSON. A segment's own `maxSec` wins over an entry here.
75
75
  */
76
76
  budgets?: Record<string, number>;
77
+ /**
78
+ * How captions are delivered. `'burn'` = baked into the video frame (a fixed
79
+ * box that CANNOT scroll) — declaring it ESCALATES `gs narration-lint`'s
80
+ * caption-fit rule to Tier-1 (a hard, CI-failing error), because an overflow
81
+ * is unrecoverable at play time. `'sidecar'` = player-wrapped .srt/.vtt with
82
+ * no fixed box; caption-fit stays Tier-2 (warn-only). Omitted → sidecar
83
+ * semantics (warn-only) so a project that never declared intent exits 0.
84
+ * The signal lives HERE, in the committed script (it travels with the content),
85
+ * not behind a CLI flag (which drifts in CI config). Persisted into the manifest.
86
+ */
87
+ captionMode?: 'burn' | 'sidecar';
88
+ /**
89
+ * A per-script caption-fit budget: the max wrapped lines a caption may use.
90
+ * Declaring it is an explicit caption-fit INTENT, so — like `captionMode:'burn'`
91
+ * — it ESCALATES caption-fit to Tier-1 (CI-failing). Persisted into the manifest.
92
+ */
93
+ captionMaxLines?: number;
77
94
  /** spoken segments and explicit pause beats, in playback order */
78
95
  segments: NarrationElement[];
79
96
  }
@@ -120,6 +137,18 @@ interface NarrationTiming {
120
137
  * segment's own `maxSec` (on the TimedSegment) wins over an entry here.
121
138
  */
122
139
  budgets?: Record<string, number>;
140
+ /**
141
+ * Caption delivery mode carried from the script. `'burn'` escalates
142
+ * `gs narration-lint`'s caption-fit rule to Tier-1 (CI-failing); `'sidecar'`
143
+ * / omitted keeps it Tier-2 (warn-only). Persisted so the lint reads intent
144
+ * from the committed manifest, no CLI flag.
145
+ */
146
+ captionMode?: 'burn' | 'sidecar';
147
+ /**
148
+ * Per-script caption-fit budget (max wrapped lines) carried from the script.
149
+ * Its presence ESCALATES caption-fit to Tier-1, like `captionMode:'burn'`.
150
+ */
151
+ captionMaxLines?: number;
123
152
  }
124
153
  declare class NarrationError extends Error {
125
154
  constructor(message: string);
package/dist/providers.js CHANGED
@@ -666,7 +666,9 @@ async function synthesizeScript(scriptPath, opts = {}) {
666
666
  segments,
667
667
  ...pauses.length > 0 ? { pauses } : {},
668
668
  ...raw.captionSplit ? { captionSplit: raw.captionSplit } : {},
669
- ...raw.budgets && Object.keys(raw.budgets).length > 0 ? { budgets: raw.budgets } : {}
669
+ ...raw.budgets && Object.keys(raw.budgets).length > 0 ? { budgets: raw.budgets } : {},
670
+ ...raw.captionMode !== void 0 ? { captionMode: raw.captionMode } : {},
671
+ ...raw.captionMaxLines !== void 0 ? { captionMaxLines: raw.captionMaxLines } : {}
670
672
  };
671
673
  const timingPath = `${base}.narration.timing.json`;
672
674
  writeFileSync(timingPath, JSON.stringify(timing, null, 2) + "\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissade/narrate",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "glissade narration + captions: TTS at prepare time (gs narrate), deterministic caching, narration-anchored timeline beats, and captions as plain tracks. Render stays offline.",
5
5
  "license": "Apache-2.0",
6
6
  "engines": {
@@ -22,8 +22,8 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@glissade/core": "0.12.0",
26
- "@glissade/scene": "0.12.0"
25
+ "@glissade/core": "0.12.1",
26
+ "@glissade/scene": "0.12.1"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "kokoro-js": "^1.2.0"