@koda-sl/baker-cli 0.305.0-dev.582739c3e → 0.305.0-dev.a04fd407d

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/cli.js CHANGED
@@ -66,7 +66,7 @@ import {
66
66
  ulid,
67
67
  validateCanvasDeep,
68
68
  ytDlpBlockSignal
69
- } from "./chunk-JI6QIAD3.js";
69
+ } from "./chunk-ZNN6ZHDS.js";
70
70
  import {
71
71
  csvOrJson,
72
72
  daysAgoIso,
@@ -34099,6 +34099,27 @@ function joinDialogueTexts(texts) {
34099
34099
  }
34100
34100
  return out.join(" ");
34101
34101
  }
34102
+ function foldUnshownPhrases(phrases, keepRenderedVoice) {
34103
+ if (!keepRenderedVoice) return [...phrases];
34104
+ const claimed = /* @__PURE__ */ new Set();
34105
+ const kept = [];
34106
+ for (const phrase of phrases) {
34107
+ const available = phrase.shownScenes.filter((scene) => !claimed.has(scene));
34108
+ if (phrase.presenterShown && available.length > 0) {
34109
+ for (const scene of available) claimed.add(scene);
34110
+ kept.push(phrase);
34111
+ continue;
34112
+ }
34113
+ const host = [...kept].reverse().find((candidate) => candidate.speaker === phrase.speaker);
34114
+ if (!host) {
34115
+ kept.push(phrase);
34116
+ continue;
34117
+ }
34118
+ host.text = joinDialogueTexts([host.text, phrase.text]);
34119
+ host.end_s = Math.max(host.end_s, phrase.end_s);
34120
+ }
34121
+ return kept;
34122
+ }
34102
34123
  function collapseVoiceover(blueprint) {
34103
34124
  const casts = castIdSet(blueprint);
34104
34125
  const cameraOn = onCameraDialogue(blueprint);
@@ -34661,7 +34682,7 @@ function buildTimeline(blueprint, slots, opts, nodes) {
34661
34682
  const phrases = buildPhrases(blueprint, canonical2, compositeScenes, presenterPresent, presentStrict);
34662
34683
  const usedVoIds = /* @__PURE__ */ new Set();
34663
34684
  const claimed = /* @__PURE__ */ new Set();
34664
- phrases.forEach((phrase, k) => {
34685
+ foldUnshownPhrases(phrases, env.keepRenderedVoice === true).forEach((phrase, k) => {
34665
34686
  const voiceNode = ensureVoiceNode(phrase.speaker);
34666
34687
  const available = phrase.shownScenes.filter((s) => !claimed.has(s));
34667
34688
  if (phrase.presenterShown && available.length > 0) {