@cueframe/kernel 0.2.51 → 0.2.53

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.
Files changed (74) hide show
  1. package/dist/_members/composition/fonts/bundledFaces.d.ts +9 -15
  2. package/dist/_members/composition/fonts/captionFaces.d.ts +2 -3
  3. package/dist/_members/composition/ops/captionOps.d.ts +11 -0
  4. package/dist/_members/composition/ops/compositionOps.d.ts +20 -19
  5. package/dist/_members/composition/validators/composition.d.ts +664 -0
  6. package/dist/_members/composition/validators/registry.d.ts +1 -1
  7. package/dist/_members/composition/validators/render.d.ts +294 -0
  8. package/dist/_members/composition-ops/index.d.ts +86 -0
  9. package/dist/_members/core/render/compositionAudioAndDepth.d.ts +9 -3
  10. package/dist/_members/core/render/compositionRender.d.ts +14 -0
  11. package/dist/_members/core/render/index.d.ts +2 -2
  12. package/dist/_members/core/render/types.d.ts +4 -1
  13. package/dist/_members/plane/contract.d.ts +1 -1
  14. package/dist/_members/primitives/captions/Captions.d.ts +18 -1
  15. package/dist/_members/primitives/captions/index.d.ts +1 -1
  16. package/dist/animate.js +2 -2
  17. package/dist/authoring/build-tools.js +6 -6
  18. package/dist/authoring/context.js +5 -5
  19. package/dist/authoring/tools.js +5 -5
  20. package/dist/authoring.js +9 -9
  21. package/dist/{chunk-MYBK6DKF.js → chunk-2BVKNYRB.js} +1 -1
  22. package/dist/{chunk-2LUAUF46.js → chunk-46DGDPXR.js} +303 -47
  23. package/dist/{chunk-KY3QBG7O.js → chunk-4DM63RTI.js} +4 -4
  24. package/dist/{chunk-IHWC75AN.js → chunk-5E4YP44R.js} +1 -1
  25. package/dist/{chunk-MOUWO53S.js → chunk-7AUHC2X7.js} +1 -1
  26. package/dist/{chunk-AVTEPAWI.js → chunk-7RGDRDAR.js} +17 -13
  27. package/dist/{chunk-7XZW26U2.js → chunk-AONWKKXK.js} +1 -1
  28. package/dist/{chunk-O3SJTX6S.js → chunk-C6ONUJIO.js} +5 -5
  29. package/dist/{chunk-LO3DH776.js → chunk-CJMUTCJW.js} +2 -2
  30. package/dist/{chunk-CZOVEX2D.js → chunk-CR3G2JQP.js} +1 -1
  31. package/dist/{chunk-2PU2TSUG.js → chunk-D5E5XFHK.js} +1 -1
  32. package/dist/{chunk-6WQHVYJD.js → chunk-G7ZSFSQG.js} +1 -1
  33. package/dist/{chunk-7SXY6NFW.js → chunk-GAACUQAB.js} +4 -4
  34. package/dist/{chunk-4CNJGY7P.js → chunk-LPUQTBKU.js} +147 -27
  35. package/dist/{chunk-YKXOAGY3.js → chunk-P3DYA5NA.js} +8 -8
  36. package/dist/{chunk-Z6NY6MCL.js → chunk-RMLGMYEJ.js} +1 -1
  37. package/dist/{chunk-NLXQ7WTH.js → chunk-TPKPU4PE.js} +56 -38
  38. package/dist/{chunk-LZEX2GAY.js → chunk-UFNIB3JL.js} +144 -5
  39. package/dist/{chunk-ACURZCPN.js → chunk-UKKY7HWN.js} +1 -1
  40. package/dist/{chunk-M665ZQYB.js → chunk-VTM7NEJC.js} +38 -6
  41. package/dist/{chunk-FSA3UBVR.js → chunk-ZFW35DLG.js} +1 -1
  42. package/dist/{chunk-OVV35ZS2.js → chunk-ZIPGDGBR.js} +1 -1
  43. package/dist/component-runtime/render.js +2 -2
  44. package/dist/component-runtime.js +3 -3
  45. package/dist/compose.js +23 -23
  46. package/dist/composition/fonts.js +1 -1
  47. package/dist/composition/graphics-plan.js +3 -3
  48. package/dist/composition/ops.js +4 -4
  49. package/dist/composition/projection.js +3 -3
  50. package/dist/composition/validators.js +17 -3
  51. package/dist/composition-ops.js +8 -8
  52. package/dist/composition.js +19 -5
  53. package/dist/{context-AIUJG7R4.js → context-UAS5WJRB.js} +5 -5
  54. package/dist/core/render.js +6 -4
  55. package/dist/core.js +4 -4
  56. package/dist/mcp/adapter.js +2 -2
  57. package/dist/mcp/core.js +1 -1
  58. package/dist/mcp/scene-shot.js +2 -2
  59. package/dist/mcp/server.js +12 -12
  60. package/dist/mcp.js +12 -12
  61. package/dist/primitives/captions.js +195 -32
  62. package/dist/primitives/effects.js +4 -4
  63. package/dist/primitives/hero-text.js +2 -2
  64. package/dist/primitives/layouts.js +3 -3
  65. package/dist/primitives/scenes.js +4 -4
  66. package/dist/primitives/text.js +2 -2
  67. package/dist/primitives/ui-blocks.js +4 -4
  68. package/dist/primitives.js +23 -23
  69. package/dist/render-harness/cardFonts.js +2 -2
  70. package/dist/render-harness.js +12 -12
  71. package/package.json +12 -12
  72. package/dist/{chunk-RL5SO653.js → chunk-7SQOXIWR.js} +3 -3
  73. package/dist/{chunk-B3GSTQLR.js → chunk-VLJOIUHL.js} +6 -6
  74. package/dist/{chunk-RBWS5XHE.js → chunk-X34KW2SL.js} +4 -4
@@ -13,13 +13,13 @@ import {
13
13
  } from "../chunk-W2245F6G.js";
14
14
  import {
15
15
  resolveCaptionFaces
16
- } from "../chunk-AVTEPAWI.js";
16
+ } from "../chunk-7RGDRDAR.js";
17
17
  import "../chunk-2ESYSVXG.js";
18
18
 
19
19
  // ../execution/primitives/src/captions/Captions.tsx
20
20
  import { useMemo } from "react";
21
21
  import { AbsoluteFill, useCurrentFrame, useVideoConfig, interpolate, Easing } from "remotion";
22
- import { fillTextBox } from "@remotion/layout-utils";
22
+ import { fillTextBox, measureText } from "@remotion/layout-utils";
23
23
 
24
24
  // ../execution/primitives/src/captions/paginate.ts
25
25
  import { createTikTokStyleCaptions } from "@remotion/captions";
@@ -154,6 +154,29 @@ function plateStyleFor(kind, backgroundColor) {
154
154
  }
155
155
  var COMBINE_TOKENS_MS = 1500;
156
156
  var CAPTION_LINGER_MS = 600;
157
+ function italicAwareTextBox(maxWidth, maxLines) {
158
+ const lineWidths = [0];
159
+ return {
160
+ add: (word) => {
161
+ const widthOf = (text) => measureText({ ...word, text }).width;
162
+ const current = lineWidths.length - 1;
163
+ const width = widthOf(lineWidths[current] === 0 ? word.text.trimStart() : word.text);
164
+ if (Math.ceil(lineWidths[current] + width) < maxWidth) {
165
+ lineWidths[current] += width;
166
+ return { exceedsBox: false, newLine: false };
167
+ }
168
+ const firstWidth = widthOf(word.text.trimStart());
169
+ if (current + 1 >= maxLines || Math.ceil(firstWidth) >= maxWidth) {
170
+ return { exceedsBox: true, newLine: false };
171
+ }
172
+ lineWidths.push(firstWidth);
173
+ return { exceedsBox: false, newLine: true };
174
+ }
175
+ };
176
+ }
177
+ function tokenBox(maxWidth, maxLines, emphasis) {
178
+ return emphasis?.emphasisFontStyle === "italic" ? italicAwareTextBox(maxWidth, maxLines) : fillTextBox({ maxBoxWidth: maxWidth, maxLines });
179
+ }
157
180
  function addTokenToBox(box, token, fontFamily, fontSize, fontWeight, emphasis) {
158
181
  const isEmp = emphasis?.emphasisSet.has(token.fromMs) ?? false;
159
182
  const tokenSize = isEmp ? Math.round(fontSize * (emphasis?.emphasisScale ?? 1.2)) : fontSize;
@@ -163,19 +186,20 @@ function addTokenToBox(box, token, fontFamily, fontSize, fontWeight, emphasis) {
163
186
  text: token.text,
164
187
  fontFamily: tokenFamily,
165
188
  fontSize: tokenSize,
166
- fontWeight: String(tokenWeight)
189
+ fontWeight: String(tokenWeight),
190
+ ...isEmp && emphasis?.emphasisFontStyle === "italic" ? { additionalStyles: { fontStyle: "italic" } } : {}
167
191
  });
168
192
  }
169
193
  function makeBoxFactory(maxWidth, maxLines, fontFamily, fontSize, fontWeight, emphasis) {
170
194
  return () => {
171
- const box = fillTextBox({ maxBoxWidth: maxWidth, maxLines });
195
+ const box = tokenBox(maxWidth, maxLines, emphasis);
172
196
  return {
173
197
  add: (token) => !addTokenToBox(box, token, fontFamily, fontSize, fontWeight, emphasis).exceedsBox
174
198
  };
175
199
  };
176
200
  }
177
201
  function layoutTokensIntoLines(tokens, maxWidth, maxLines, fontFamily, fontSize, fontWeight, emphasis) {
178
- const box = fillTextBox({ maxBoxWidth: maxWidth, maxLines });
202
+ const box = tokenBox(maxWidth, maxLines, emphasis);
179
203
  const lines = [[]];
180
204
  for (const token of tokens) {
181
205
  const result = addTokenToBox(box, token, fontFamily, fontSize, fontWeight, emphasis);
@@ -187,10 +211,67 @@ function layoutTokensIntoLines(tokens, maxWidth, maxLines, fontFamily, fontSize,
187
211
  }
188
212
  return lines.filter((line) => line.length > 0);
189
213
  }
214
+ function layoutFitError(label) {
215
+ return new Error(`Caption layout${label ? ` ${label}` : " word range"} does not fit one page in its region; enlarge the region or split the range`);
216
+ }
217
+ function tokenRuns(tokens, emphasisSet, emphasisPlate) {
218
+ const runs = [];
219
+ for (const token of tokens) {
220
+ const emph = emphasisSet.has(token.fromMs);
221
+ const last = runs[runs.length - 1];
222
+ if (emphasisPlate && emph && last?.emph) last.tokens.push(token);
223
+ else runs.push({ tokens: [token], emph });
224
+ }
225
+ return runs;
226
+ }
227
+ function layoutAuthoredTokensIntoLines(tokens, maxWidth, maxLines, fontSize, style, emphasisSet, faces, label) {
228
+ const lines = [[]];
229
+ let lineWidth = 0;
230
+ const plate = style.emphasisPlate ?? false;
231
+ const runGap = fontSize * 0.35;
232
+ for (const run of tokenRuns(tokens, emphasisSet, plate)) {
233
+ const emph = run.emph;
234
+ const text = emph && plate ? run.tokens.map((token) => token.text.trim()).join(" ") : plate ? run.tokens[0].text.trim() : run.tokens[0].text;
235
+ const size = emph ? Math.round(fontSize * (style.emphasisScale ?? 1.08)) : fontSize;
236
+ const transform = emph ? style.emphasisTextTransform ?? style.textTransform : style.textTransform;
237
+ const letterSpacing = emph ? style.emphasisLetterSpacing : void 0;
238
+ const width = measureText({
239
+ text,
240
+ fontFamily: emph ? faces.emphasis.stack : faces.base.stack,
241
+ fontSize: size,
242
+ fontWeight: String(emph ? faces.emphasis.weight : faces.base.weight),
243
+ ...transform ? { textTransform: transform } : {},
244
+ ...letterSpacing ? { letterSpacing: `${letterSpacing}px` } : {},
245
+ ...emph && faces.emphasis.style === "italic" ? { additionalStyles: { fontStyle: "italic" } } : {}
246
+ }).width + (emph && plate ? 2 * Math.round(size * (style.emphasisPlatePadX ?? 0.16)) : 0);
247
+ if (Math.ceil(width) > maxWidth) {
248
+ throw layoutFitError(label);
249
+ }
250
+ const current = lines[lines.length - 1];
251
+ const nextWidth = lineWidth + (current.length ? runGap : 0) + width;
252
+ if (Math.ceil(nextWidth) > maxWidth) {
253
+ if (lines.length >= maxLines) {
254
+ throw layoutFitError(label);
255
+ }
256
+ lines.push([...run.tokens]);
257
+ lineWidth = width;
258
+ } else {
259
+ current.push(...run.tokens);
260
+ lineWidth = nextWidth;
261
+ }
262
+ }
263
+ return lines.filter((line) => line.length > 0);
264
+ }
190
265
  function Captions({
191
266
  segments,
192
267
  style: userStyle,
193
- region
268
+ region,
269
+ holdUntilMs,
270
+ scale,
271
+ rotation,
272
+ syncWordVisibility,
273
+ singlePageRequired,
274
+ layoutLabel
194
275
  }) {
195
276
  const frame = useCurrentFrame();
196
277
  const { fps, width, height } = useVideoConfig();
@@ -231,6 +312,7 @@ function Captions({
231
312
  const lineHeight = fontSize * Math.max(1, emphasisScale) * 1.2;
232
313
  const maxLines = authoredRegion ? Math.min(3, Math.floor((availableHeight + fontSize * 0.25) / (lineHeight + fontSize * 0.25))) : 3;
233
314
  if (authoredRegion && (maxTextWidth <= 0 || maxLines < 1)) {
315
+ if (singlePageRequired) throw layoutFitError(layoutLabel);
234
316
  throw new Error("Caption style.region is too small for one caption line at the authored font size");
235
317
  }
236
318
  const { emphasisStartMs, annotateKind } = useMemo(() => {
@@ -243,16 +325,39 @@ function Captions({
243
325
  return { emphasisStartMs: emph, annotateKind: ann };
244
326
  }, [segments]);
245
327
  const emphasisLayout = useMemo(
246
- () => emphasisStartMs.size > 0 ? { emphasisSet: emphasisStartMs, emphasisScale, emphasisFontFamily, emphasisFontWeight } : void 0,
247
- [emphasisStartMs, emphasisScale, emphasisFontFamily, emphasisFontWeight]
328
+ () => emphasisStartMs.size > 0 ? { emphasisSet: emphasisStartMs, emphasisScale, emphasisFontFamily, emphasisFontWeight, emphasisFontStyle } : void 0,
329
+ [emphasisStartMs, emphasisScale, emphasisFontFamily, emphasisFontWeight, emphasisFontStyle]
248
330
  );
249
331
  const pages = useMemo(
250
- () => paginateCaptionSegments(segments, {
251
- combineMs: COMBINE_TOKENS_MS,
252
- makeBox: makeBoxFactory(maxTextWidth, maxLines, style.fontFamily, fontSize, style.fontWeight, emphasisLayout),
253
- lingerMs: CAPTION_LINGER_MS
254
- }),
255
- [segments, maxTextWidth, maxLines, fontSize, style.fontFamily, style.fontWeight, emphasisLayout]
332
+ () => {
333
+ const makeBox = makeBoxFactory(maxTextWidth, maxLines, style.fontFamily, fontSize, style.fontWeight, emphasisLayout);
334
+ const paginated = paginateCaptionSegments(segments, {
335
+ combineMs: singlePageRequired ? Number.MAX_SAFE_INTEGER : COMBINE_TOKENS_MS,
336
+ makeBox: singlePageRequired ? () => ({ add: () => true }) : makeBox,
337
+ lingerMs: CAPTION_LINGER_MS
338
+ });
339
+ if (singlePageRequired) {
340
+ if (paginated.length !== 1) {
341
+ throw layoutFitError(layoutLabel);
342
+ }
343
+ layoutAuthoredTokensIntoLines(
344
+ paginated[0].tokens,
345
+ maxTextWidth,
346
+ maxLines,
347
+ fontSize,
348
+ style,
349
+ emphasisStartMs,
350
+ faces,
351
+ layoutLabel
352
+ );
353
+ }
354
+ if (holdUntilMs !== void 0 && paginated.length > 0) {
355
+ const last = paginated[paginated.length - 1];
356
+ last.durationMs = Math.max(1, holdUntilMs - last.startMs);
357
+ }
358
+ return paginated;
359
+ },
360
+ [segments, maxTextWidth, maxLines, fontSize, style, emphasisStartMs, faces, emphasisLayout, holdUntilMs, singlePageRequired, layoutLabel]
256
361
  );
257
362
  if (pages.length === 0) return null;
258
363
  const currentTimeMs = frame / fps * 1e3;
@@ -277,7 +382,16 @@ function Captions({
277
382
  extrapolateLeft: "clamp",
278
383
  extrapolateRight: "clamp"
279
384
  }) : 1;
280
- const lines = layoutTokensIntoLines(
385
+ const lines = singlePageRequired ? layoutAuthoredTokensIntoLines(
386
+ currentPage.tokens,
387
+ maxTextWidth,
388
+ maxLines,
389
+ fontSize,
390
+ style,
391
+ emphasisStartMs,
392
+ faces,
393
+ layoutLabel
394
+ ) : layoutTokensIntoLines(
281
395
  currentPage.tokens,
282
396
  maxTextWidth,
283
397
  maxLines,
@@ -287,6 +401,10 @@ function Captions({
287
401
  emphasisLayout
288
402
  );
289
403
  const wrapperStyle = resolveCaptionPlacement(userStyle?.position, region, authoredRegion);
404
+ if (scale !== void 0 || rotation !== void 0) {
405
+ wrapperStyle.transform = `${wrapperStyle.transform ?? ""} rotate(${rotation ?? 0}deg) scale(${scale ?? 1})`.trim();
406
+ wrapperStyle.transformOrigin = "top left";
407
+ }
290
408
  return /* @__PURE__ */ React.createElement(AbsoluteFill, { style: { pointerEvents: "none" } }, /* @__PURE__ */ React.createElement("div", { style: wrapperStyle }, /* @__PURE__ */ React.createElement(
291
409
  "div",
292
410
  {
@@ -315,8 +433,8 @@ function Captions({
315
433
  if (entrance === "none") return { opacity: 1, scale: 1, y: 0 };
316
434
  const start = tokenStartFrame.get(first) ?? 0;
317
435
  if (entrance === "word-pop") {
318
- const { opacity, scale } = wordPop(frame, fps, start, entranceFrames, isEmph ? 0.86 : 0.92);
319
- return { opacity, scale, y: 0 };
436
+ const { opacity, scale: scale2 } = wordPop(frame, fps, start, entranceFrames, isEmph ? 0.86 : 0.92);
437
+ return { opacity, scale: scale2, y: 0 };
320
438
  }
321
439
  if (entrance === "stagger-up") {
322
440
  const y = interpolate(frame, [start, start + entranceFrames], [RISE_PX, 0], {
@@ -332,21 +450,18 @@ function Captions({
332
450
  return { opacity: 1, scale: 1, y: 0 };
333
451
  };
334
452
  return lines.map((line, lineIdx) => {
335
- const segs = [];
336
- for (const t of line) {
337
- const e = emphasisStartMs.has(t.fromMs);
338
- const last = segs[segs.length - 1];
339
- if (emphasisPlate && e && last && last.emph) last.tokens.push(t);
340
- else segs.push({ tokens: [t], emph: e });
341
- }
453
+ const segs = tokenRuns(line, emphasisStartMs, emphasisPlate);
342
454
  return /* @__PURE__ */ React.createElement("div", { key: lineIdx, style: { display: "flex", justifyContent: authoredRegion ? "flex-start" : "center", alignItems: "baseline", gap: `${fontSize * 0.35}px` } }, segs.map((seg, si) => {
343
455
  const first = seg.tokens[0];
344
- const { opacity, scale, y } = entranceOf(first, seg.emph);
345
- const entranceTransform = `translateY(${y}px) scale(${scale})`;
346
- const annKind = seg.tokens.map((t) => annotateKind.get(t.fromMs)).find(Boolean);
456
+ const entered = entranceOf(first, seg.emph);
457
+ const opacity = syncWordVisibility && currentTimeMs < first.fromMs ? 0 : entered.opacity;
458
+ const { scale: scale2, y } = entered;
459
+ const entranceTransform = `translateY(${y}px) scale(${scale2})`;
460
+ const annotatedToken = seg.tokens.find((token2) => annotateKind.has(token2.fromMs));
461
+ const annKind = annotatedToken ? annotateKind.get(annotatedToken.fromMs) : void 0;
347
462
  let markerP = 1;
348
- if (annKind && entrance !== "none") {
349
- const ms = (tokenStartFrame.get(first) ?? 0) + Math.round(fps * 0.14);
463
+ if (annKind && annotatedToken && entrance !== "none") {
464
+ const ms = (tokenStartFrame.get(annotatedToken) ?? 0) + Math.round(fps * 0.14);
350
465
  markerP = interpolate(frame, [ms, ms + Math.round(fps * 0.32)], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
351
466
  }
352
467
  if (seg.emph && emphasisPlate) {
@@ -373,8 +488,10 @@ function Captions({
373
488
  whiteSpace: "nowrap"
374
489
  }
375
490
  },
376
- seg.tokens.map((t) => t.text.trim()).join(" ")
377
- ), annKind ? /* @__PURE__ */ React.createElement(Marker, { spec: { kind: annKind, color: annotationColor }, progress: markerP }) : null);
491
+ seg.tokens.map((token2, tokenIndex) => /* @__PURE__ */ React.createElement("span", { key: token2.fromMs, style: {
492
+ opacity: syncWordVisibility && tokenIndex > 0 ? currentTimeMs < token2.fromMs ? 0 : entranceOf(token2, true).opacity : 1
493
+ } }, tokenIndex > 0 ? " " : "", token2.text.trim()))
494
+ ), annKind && annotatedToken && currentTimeMs >= annotatedToken.fromMs ? /* @__PURE__ */ React.createElement(Marker, { spec: { kind: annKind, color: annotationColor }, progress: markerP }) : null);
378
495
  }
379
496
  const token = first;
380
497
  const isActive = token === activeToken;
@@ -406,12 +523,58 @@ function Captions({
406
523
  },
407
524
  emphasisPlate ? token.text.trim() : token.text
408
525
  );
409
- return /* @__PURE__ */ React.createElement("span", { key: si, style: { position: "relative", display: "inline-block", opacity, transform: entranceTransform, transformOrigin: "center" } }, inner, annKind ? /* @__PURE__ */ React.createElement(Marker, { spec: { kind: annKind, color: annotationColor }, progress: markerP }) : null);
526
+ return /* @__PURE__ */ React.createElement("span", { key: si, style: { position: "relative", display: "inline-block", opacity, transform: entranceTransform, transformOrigin: "center" } }, inner, annKind && annotatedToken && currentTimeMs >= annotatedToken.fromMs ? /* @__PURE__ */ React.createElement(Marker, { spec: { kind: annKind, color: annotationColor }, progress: markerP }) : null);
410
527
  }));
411
528
  });
412
529
  })()
413
530
  )));
414
531
  }
532
+ function CaptionLayoutLayer({
533
+ segments,
534
+ layouts,
535
+ style,
536
+ region
537
+ }) {
538
+ if (!layouts?.length) return /* @__PURE__ */ React.createElement(Captions, { segments, style, region });
539
+ const placed = /* @__PURE__ */ new Set();
540
+ for (const layout of layouts) {
541
+ for (let word = layout.wordStartIndex; word < layout.wordEndIndex; word++) {
542
+ placed.add(`${layout.segmentIndex}:${word}`);
543
+ }
544
+ }
545
+ const remaining = segments.map((words, segmentIndex) => words.filter((_, wordIndex) => !placed.has(`${segmentIndex}:${wordIndex}`)));
546
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Captions, { segments: remaining, style, region }), layouts.map((layout) => {
547
+ const source = segments[layout.segmentIndex];
548
+ if (!source) return null;
549
+ const marks = new Map((layout.wordMarks ?? []).map((mark) => [mark.wordIndex, mark]));
550
+ const words = source.slice(layout.wordStartIndex, layout.wordEndIndex).map((word, offset) => {
551
+ const mark = marks.get(layout.wordStartIndex + offset);
552
+ if (!mark) return word;
553
+ const updated = { ...word };
554
+ if (mark.emphasis !== void 0) updated.emphasis = mark.emphasis;
555
+ if (mark.annotate === null) delete updated.annotate;
556
+ else if (mark.annotate !== void 0) updated.annotate = mark.annotate;
557
+ return updated;
558
+ });
559
+ const hold = source[layout.holdThroughWordIndex ?? layout.wordEndIndex - 1];
560
+ return /* @__PURE__ */ React.createElement(
561
+ Captions,
562
+ {
563
+ key: `${layout.segmentIndex}:${layout.wordStartIndex}:${layout.wordEndIndex}`,
564
+ segments: [words],
565
+ style: { ...style, ...layout.style, region: layout.region },
566
+ region,
567
+ holdUntilMs: hold?.endMs,
568
+ scale: layout.scale,
569
+ rotation: layout.rotation,
570
+ syncWordVisibility: true,
571
+ singlePageRequired: true,
572
+ layoutLabel: `segment ${layout.segmentIndex} words ${layout.wordStartIndex}..${layout.wordEndIndex - 1}`
573
+ }
574
+ );
575
+ }));
576
+ }
415
577
  export {
578
+ CaptionLayoutLayer,
416
579
  Captions
417
580
  };
@@ -12,15 +12,15 @@ import {
12
12
  Vignette,
13
13
  catalog,
14
14
  laneDepths
15
- } from "../chunk-7SXY6NFW.js";
16
- import "../chunk-XHGZ2E77.js";
15
+ } from "../chunk-GAACUQAB.js";
17
16
  import "../chunk-MFHXCHRI.js";
17
+ import "../chunk-XHGZ2E77.js";
18
18
  import "../chunk-W2245F6G.js";
19
- import "../chunk-2PU2TSUG.js";
19
+ import "../chunk-D5E5XFHK.js";
20
20
  import "../chunk-XV2K3AQT.js";
21
21
  import "../chunk-CL5Y6V6K.js";
22
22
  import "../chunk-2L7PYYJK.js";
23
- import "../chunk-AVTEPAWI.js";
23
+ import "../chunk-7RGDRDAR.js";
24
24
  import "../chunk-2ESYSVXG.js";
25
25
  export {
26
26
  Blur,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  HeroText,
3
3
  catalog
4
- } from "../chunk-RL5SO653.js";
4
+ } from "../chunk-7SQOXIWR.js";
5
5
  import "../chunk-LT4PWSR2.js";
6
6
  import "../chunk-FWSJLHSV.js";
7
- import "../chunk-ZFEXATWN.js";
8
7
  import "../chunk-XHGZ2E77.js";
8
+ import "../chunk-ZFEXATWN.js";
9
9
  import "../chunk-W2245F6G.js";
10
10
  import "../chunk-2ESYSVXG.js";
11
11
  export {
@@ -8,14 +8,14 @@ import {
8
8
  SplitScreen,
9
9
  StaggeredBentoGrid,
10
10
  catalog
11
- } from "../chunk-CZOVEX2D.js";
11
+ } from "../chunk-CR3G2JQP.js";
12
12
  import "../chunk-XHGZ2E77.js";
13
13
  import "../chunk-W2245F6G.js";
14
- import "../chunk-2PU2TSUG.js";
14
+ import "../chunk-D5E5XFHK.js";
15
15
  import "../chunk-XV2K3AQT.js";
16
16
  import "../chunk-CL5Y6V6K.js";
17
17
  import "../chunk-2L7PYYJK.js";
18
- import "../chunk-AVTEPAWI.js";
18
+ import "../chunk-7RGDRDAR.js";
19
19
  import "../chunk-2ESYSVXG.js";
20
20
  export {
21
21
  ChatToPreviewLayout,
@@ -8,17 +8,17 @@ import {
8
8
  ProductLaunchTrailer,
9
9
  TerminalToBrowserDeploy,
10
10
  catalog
11
- } from "../chunk-O3SJTX6S.js";
12
- import "../chunk-QGAWDLYX.js";
11
+ } from "../chunk-C6ONUJIO.js";
13
12
  import "../chunk-S5H6GH6M.js";
14
13
  import "../chunk-QAGGJHAF.js";
15
14
  import "../chunk-MFHXCHRI.js";
15
+ import "../chunk-QGAWDLYX.js";
16
16
  import "../chunk-W2245F6G.js";
17
- import "../chunk-2PU2TSUG.js";
17
+ import "../chunk-D5E5XFHK.js";
18
18
  import "../chunk-XV2K3AQT.js";
19
19
  import "../chunk-CL5Y6V6K.js";
20
20
  import "../chunk-2L7PYYJK.js";
21
- import "../chunk-AVTEPAWI.js";
21
+ import "../chunk-7RGDRDAR.js";
22
22
  import "../chunk-2ESYSVXG.js";
23
23
  export {
24
24
  ChangelogBite,
@@ -21,13 +21,13 @@ import {
21
21
  TrackingIn,
22
22
  Typewriter,
23
23
  catalog
24
- } from "../chunk-RBWS5XHE.js";
24
+ } from "../chunk-X34KW2SL.js";
25
25
  import "../chunk-DLF4WVSE.js";
26
26
  import "../chunk-U4V4FZGE.js";
27
27
  import "../chunk-LT4PWSR2.js";
28
28
  import "../chunk-FWSJLHSV.js";
29
- import "../chunk-ZFEXATWN.js";
30
29
  import "../chunk-XHGZ2E77.js";
30
+ import "../chunk-ZFEXATWN.js";
31
31
  import "../chunk-W2245F6G.js";
32
32
  import "../chunk-2ESYSVXG.js";
33
33
  export {
@@ -30,14 +30,14 @@ import {
30
30
  VisualDocsSnippet,
31
31
  VoiceWaveform,
32
32
  catalog
33
- } from "../chunk-B3GSTQLR.js";
34
- import "../chunk-LT4PWSR2.js";
35
- import "../chunk-FWSJLHSV.js";
36
- import "../chunk-XHGZ2E77.js";
33
+ } from "../chunk-VLJOIUHL.js";
37
34
  import {
38
35
  DashboardPopulate
39
36
  } from "../chunk-S5H6GH6M.js";
40
37
  import "../chunk-QAGGJHAF.js";
38
+ import "../chunk-LT4PWSR2.js";
39
+ import "../chunk-FWSJLHSV.js";
40
+ import "../chunk-XHGZ2E77.js";
41
41
  import "../chunk-W2245F6G.js";
42
42
  import "../chunk-2ESYSVXG.js";
43
43
  export {
@@ -1,43 +1,43 @@
1
- import {
2
- catalog
3
- } from "./chunk-RBWS5XHE.js";
4
- import "./chunk-DLF4WVSE.js";
5
- import "./chunk-U4V4FZGE.js";
6
- import {
7
- catalog as catalog3
8
- } from "./chunk-FVDFPJHT.js";
9
1
  import {
10
2
  catalog as catalog6
11
- } from "./chunk-B3GSTQLR.js";
12
- import {
13
- catalog as catalog5
14
- } from "./chunk-RAXHCRVV.js";
3
+ } from "./chunk-VLJOIUHL.js";
15
4
  import {
16
5
  catalog as catalog2
17
- } from "./chunk-7SXY6NFW.js";
6
+ } from "./chunk-GAACUQAB.js";
18
7
  import {
19
8
  catalog as catalog8
20
- } from "./chunk-RL5SO653.js";
21
- import "./chunk-LT4PWSR2.js";
22
- import "./chunk-FWSJLHSV.js";
23
- import "./chunk-ZFEXATWN.js";
9
+ } from "./chunk-7SQOXIWR.js";
24
10
  import {
25
11
  catalog as catalog4
26
- } from "./chunk-CZOVEX2D.js";
27
- import "./chunk-XHGZ2E77.js";
12
+ } from "./chunk-CR3G2JQP.js";
28
13
  import {
29
14
  catalog as catalog7
30
- } from "./chunk-O3SJTX6S.js";
31
- import "./chunk-QGAWDLYX.js";
15
+ } from "./chunk-C6ONUJIO.js";
32
16
  import "./chunk-S5H6GH6M.js";
33
17
  import "./chunk-QAGGJHAF.js";
34
18
  import "./chunk-MFHXCHRI.js";
19
+ import {
20
+ catalog
21
+ } from "./chunk-X34KW2SL.js";
22
+ import "./chunk-DLF4WVSE.js";
23
+ import "./chunk-U4V4FZGE.js";
24
+ import "./chunk-LT4PWSR2.js";
25
+ import "./chunk-FWSJLHSV.js";
26
+ import {
27
+ catalog as catalog3
28
+ } from "./chunk-FVDFPJHT.js";
29
+ import "./chunk-QGAWDLYX.js";
30
+ import {
31
+ catalog as catalog5
32
+ } from "./chunk-RAXHCRVV.js";
33
+ import "./chunk-XHGZ2E77.js";
34
+ import "./chunk-ZFEXATWN.js";
35
35
  import "./chunk-W2245F6G.js";
36
- import "./chunk-2PU2TSUG.js";
36
+ import "./chunk-D5E5XFHK.js";
37
37
  import "./chunk-XV2K3AQT.js";
38
38
  import "./chunk-CL5Y6V6K.js";
39
39
  import "./chunk-2L7PYYJK.js";
40
- import "./chunk-AVTEPAWI.js";
40
+ import "./chunk-7RGDRDAR.js";
41
41
  import "./chunk-2ESYSVXG.js";
42
42
 
43
43
  // ../execution/primitives/src/index.ts
@@ -2,9 +2,9 @@ import {
2
2
  assertCardFontsAdmitted,
3
3
  cardBundledFamilies,
4
4
  cardFontFamilyStacks
5
- } from "../chunk-ACURZCPN.js";
5
+ } from "../chunk-UKKY7HWN.js";
6
6
  import "../chunk-E63UEO5C.js";
7
- import "../chunk-AVTEPAWI.js";
7
+ import "../chunk-7RGDRDAR.js";
8
8
  import "../chunk-2ESYSVXG.js";
9
9
  export {
10
10
  assertCardFontsAdmitted,
@@ -1,3 +1,9 @@
1
+ import {
2
+ assertCardHtmlAssetFree
3
+ } from "./chunk-DV7ZFVL4.js";
4
+ import {
5
+ assertCardFontsAdmitted
6
+ } from "./chunk-UKKY7HWN.js";
1
7
  import {
2
8
  assertNoRemoteRefs,
3
9
  assetSlots,
@@ -5,14 +11,8 @@ import {
5
11
  isRemoteUrl,
6
12
  renderInputAssets
7
13
  } from "./chunk-KSRFYFUZ.js";
8
- import {
9
- assertCardHtmlAssetFree
10
- } from "./chunk-DV7ZFVL4.js";
11
14
  import "./chunk-OSMXQV5V.js";
12
- import {
13
- assertCardFontsAdmitted
14
- } from "./chunk-ACURZCPN.js";
15
- import "./chunk-MYBK6DKF.js";
15
+ import "./chunk-2BVKNYRB.js";
16
16
  import "./chunk-BVA3537Z.js";
17
17
  import {
18
18
  COMPONENT_STILL_RUNTIME_IDENTITY,
@@ -23,7 +23,7 @@ import {
23
23
  readMaterializedComponentSource,
24
24
  resolveRenderEntryRoot,
25
25
  verifyLocalStagedBrowser
26
- } from "./chunk-7XZW26U2.js";
26
+ } from "./chunk-AONWKKXK.js";
27
27
  import "./chunk-WB2VFDQZ.js";
28
28
  import {
29
29
  sourceVersionId
@@ -46,15 +46,15 @@ import {
46
46
  parseSceneComponentCaptureIntentV1,
47
47
  prepareSceneShotRenderInput,
48
48
  readSceneShotManifest
49
- } from "./chunk-4CNJGY7P.js";
49
+ } from "./chunk-LPUQTBKU.js";
50
50
  import "./chunk-QH3YI3ND.js";
51
51
  import "./chunk-JPMVNMF3.js";
52
52
  import "./chunk-IMIUHG2E.js";
53
53
  import "./chunk-VZ7TYX6Z.js";
54
54
  import "./chunk-T56BK7NS.js";
55
55
  import "./chunk-KYRDKK2D.js";
56
- import "./chunk-6WQHVYJD.js";
57
- import "./chunk-Z6NY6MCL.js";
56
+ import "./chunk-G7ZSFSQG.js";
57
+ import "./chunk-RMLGMYEJ.js";
58
58
  import "./chunk-WREYUH2E.js";
59
59
  import "./chunk-ILO4NEZ3.js";
60
60
  import {
@@ -69,7 +69,7 @@ import {
69
69
  sceneCameraPlanesV2
70
70
  } from "./chunk-CL5Y6V6K.js";
71
71
  import "./chunk-2L7PYYJK.js";
72
- import "./chunk-AVTEPAWI.js";
72
+ import "./chunk-7RGDRDAR.js";
73
73
  import "./chunk-2ESYSVXG.js";
74
74
 
75
75
  // ../execution/render-harness/src/materializeSources.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cueframe/kernel",
3
- "version": "0.2.51",
3
+ "version": "0.2.53",
4
4
  "type": "module",
5
5
  "description": "Publish-only aggregate of CueFrame's isomorphic kernel packages — composition, primitives, authoring, MCP, and friends shipped as one npm artifact. Members remain separate workspace packages; this only changes what ships.",
6
6
  "files": [
@@ -16,26 +16,26 @@
16
16
  "devDependencies": {
17
17
  "tsup": "^8.3.5",
18
18
  "typescript": "^5.9.3",
19
+ "@cueframe/brand-derivation": "0.1.0",
19
20
  "@cueframe/animate": "0.1.0",
20
21
  "@cueframe/cloud-import": "0.1.0",
22
+ "@cueframe/account-model": "0.1.0",
21
23
  "@cueframe/authoring": "0.1.0",
22
- "@cueframe/component-runtime": "0.1.0",
23
- "@cueframe/brand-derivation": "0.1.0",
24
+ "@cueframe/compose": "0.1.0",
24
25
  "@cueframe/composition": "0.1.0",
26
+ "@cueframe/component-runtime": "0.1.0",
27
+ "@cueframe/director": "0.1.0",
28
+ "@cueframe/core": "0.1.0",
29
+ "@cueframe/mcp": "0.1.0",
25
30
  "@cueframe/composition-ops": "0.1.0",
26
31
  "@cueframe/foundation": "0.1.0",
27
32
  "@cueframe/errors": "0.1.0",
28
33
  "@cueframe/media-model": "0.1.0",
29
- "@cueframe/compose": "0.1.0",
30
- "@cueframe/core": "0.1.0",
31
- "@cueframe/account-model": "0.1.0",
32
- "@cueframe/director": "0.1.0",
33
- "@cueframe/plane": "0.1.0",
34
- "@cueframe/nle-export": "0.1.0",
35
- "@cueframe/mcp": "0.1.0",
36
34
  "@cueframe/perception": "0.1.0",
37
- "@cueframe/primitives": "0.1.0",
38
- "@cueframe/render-harness": "0.1.0"
35
+ "@cueframe/nle-export": "0.1.0",
36
+ "@cueframe/plane": "0.1.0",
37
+ "@cueframe/render-harness": "0.1.0",
38
+ "@cueframe/primitives": "0.1.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "gsap": "3.13.0",
@@ -4,15 +4,15 @@ import {
4
4
  import {
5
5
  resolveContrast
6
6
  } from "./chunk-FWSJLHSV.js";
7
+ import {
8
+ resolveFitFontSize
9
+ } from "./chunk-XHGZ2E77.js";
7
10
  import {
8
11
  fadeProgress,
9
12
  resolveEasing,
10
13
  staggerUp,
11
14
  wordPop
12
15
  } from "./chunk-ZFEXATWN.js";
13
- import {
14
- resolveFitFontSize
15
- } from "./chunk-XHGZ2E77.js";
16
16
 
17
17
  // ../execution/primitives/src/hero-text/HeroText.tsx
18
18
  import { useCurrentFrame, useVideoConfig } from "remotion";