@cueframe/kernel 0.2.52 → 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.
- package/dist/_members/composition/fonts/bundledFaces.d.ts +9 -15
- package/dist/_members/composition/fonts/captionFaces.d.ts +2 -3
- package/dist/_members/composition/ops/captionOps.d.ts +11 -0
- package/dist/_members/composition/ops/compositionOps.d.ts +20 -19
- package/dist/_members/composition/validators/composition.d.ts +644 -0
- package/dist/_members/composition/validators/registry.d.ts +1 -1
- package/dist/_members/composition/validators/render.d.ts +292 -0
- package/dist/_members/composition-ops/index.d.ts +74 -0
- package/dist/_members/core/render/compositionAudioAndDepth.d.ts +1 -1
- package/dist/_members/core/render/index.d.ts +1 -1
- package/dist/_members/core/render/types.d.ts +3 -1
- package/dist/_members/plane/contract.d.ts +1 -1
- package/dist/_members/primitives/captions/Captions.d.ts +18 -1
- package/dist/_members/primitives/captions/index.d.ts +1 -1
- package/dist/animate.js +2 -2
- package/dist/authoring/build-tools.js +6 -6
- package/dist/authoring/context.js +5 -5
- package/dist/authoring/tools.js +5 -5
- package/dist/authoring.js +9 -9
- package/dist/{chunk-MYBK6DKF.js → chunk-2BVKNYRB.js} +1 -1
- package/dist/{chunk-2M65KQNG.js → chunk-46DGDPXR.js} +296 -47
- package/dist/{chunk-KMDZDH5E.js → chunk-4DM63RTI.js} +4 -4
- package/dist/{chunk-QVBUYWW6.js → chunk-5E4YP44R.js} +1 -1
- package/dist/{chunk-3OG2674K.js → chunk-7AUHC2X7.js} +1 -1
- package/dist/{chunk-AVTEPAWI.js → chunk-7RGDRDAR.js} +17 -13
- package/dist/{chunk-7XZW26U2.js → chunk-AONWKKXK.js} +1 -1
- package/dist/{chunk-4B4V3HYW.js → chunk-C6ONUJIO.js} +1 -1
- package/dist/{chunk-MBSQKRDF.js → chunk-CJMUTCJW.js} +2 -2
- package/dist/{chunk-CZOVEX2D.js → chunk-CR3G2JQP.js} +1 -1
- package/dist/{chunk-2PU2TSUG.js → chunk-D5E5XFHK.js} +1 -1
- package/dist/{chunk-6WQHVYJD.js → chunk-G7ZSFSQG.js} +1 -1
- package/dist/{chunk-5ZQLMPDY.js → chunk-GAACUQAB.js} +1 -1
- package/dist/{chunk-3I43W7DP.js → chunk-LPUQTBKU.js} +41 -20
- package/dist/{chunk-WZ22ZYXD.js → chunk-P3DYA5NA.js} +4 -4
- package/dist/{chunk-Z6NY6MCL.js → chunk-RMLGMYEJ.js} +1 -1
- package/dist/{chunk-5JCLZPMV.js → chunk-TPKPU4PE.js} +56 -38
- package/dist/{chunk-CV3QQUMK.js → chunk-UFNIB3JL.js} +117 -4
- package/dist/{chunk-ACURZCPN.js → chunk-UKKY7HWN.js} +1 -1
- package/dist/{chunk-IHXMBXXL.js → chunk-VTM7NEJC.js} +30 -4
- package/dist/{chunk-JWW54N24.js → chunk-ZFW35DLG.js} +1 -1
- package/dist/{chunk-FSEB4LSU.js → chunk-ZIPGDGBR.js} +1 -1
- package/dist/component-runtime/render.js +2 -2
- package/dist/component-runtime.js +3 -3
- package/dist/compose.js +5 -5
- package/dist/composition/fonts.js +1 -1
- package/dist/composition/graphics-plan.js +3 -3
- package/dist/composition/ops.js +4 -4
- package/dist/composition/projection.js +3 -3
- package/dist/composition/validators.js +13 -3
- package/dist/composition-ops.js +8 -8
- package/dist/composition.js +15 -5
- package/dist/{context-2MBCDTCZ.js → context-UAS5WJRB.js} +5 -5
- package/dist/core/render.js +4 -4
- package/dist/core.js +4 -4
- package/dist/mcp/adapter.js +2 -2
- package/dist/mcp/core.js +1 -1
- package/dist/mcp/scene-shot.js +2 -2
- package/dist/mcp/server.js +12 -12
- package/dist/mcp.js +12 -12
- package/dist/primitives/captions.js +195 -32
- package/dist/primitives/effects.js +3 -3
- package/dist/primitives/layouts.js +3 -3
- package/dist/primitives/scenes.js +3 -3
- package/dist/primitives.js +5 -5
- package/dist/render-harness/cardFonts.js +2 -2
- package/dist/render-harness.js +7 -7
- package/package.json +14 -14
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
} from "../chunk-W2245F6G.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveCaptionFaces
|
|
16
|
-
} from "../chunk-
|
|
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 =
|
|
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 =
|
|
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
|
-
() =>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
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 =
|
|
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
|
|
345
|
-
const
|
|
346
|
-
const
|
|
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(
|
|
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((
|
|
377
|
-
|
|
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-
|
|
15
|
+
} from "../chunk-GAACUQAB.js";
|
|
16
16
|
import "../chunk-MFHXCHRI.js";
|
|
17
17
|
import "../chunk-XHGZ2E77.js";
|
|
18
18
|
import "../chunk-W2245F6G.js";
|
|
19
|
-
import "../chunk-
|
|
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-
|
|
23
|
+
import "../chunk-7RGDRDAR.js";
|
|
24
24
|
import "../chunk-2ESYSVXG.js";
|
|
25
25
|
export {
|
|
26
26
|
Blur,
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
SplitScreen,
|
|
9
9
|
StaggeredBentoGrid,
|
|
10
10
|
catalog
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-CR3G2JQP.js";
|
|
12
12
|
import "../chunk-XHGZ2E77.js";
|
|
13
13
|
import "../chunk-W2245F6G.js";
|
|
14
|
-
import "../chunk-
|
|
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-
|
|
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-
|
|
11
|
+
} from "../chunk-C6ONUJIO.js";
|
|
12
12
|
import "../chunk-S5H6GH6M.js";
|
|
13
13
|
import "../chunk-QAGGJHAF.js";
|
|
14
14
|
import "../chunk-MFHXCHRI.js";
|
|
15
15
|
import "../chunk-QGAWDLYX.js";
|
|
16
16
|
import "../chunk-W2245F6G.js";
|
|
17
|
-
import "../chunk-
|
|
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-
|
|
21
|
+
import "../chunk-7RGDRDAR.js";
|
|
22
22
|
import "../chunk-2ESYSVXG.js";
|
|
23
23
|
export {
|
|
24
24
|
ChangelogBite,
|
package/dist/primitives.js
CHANGED
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "./chunk-VLJOIUHL.js";
|
|
4
4
|
import {
|
|
5
5
|
catalog as catalog2
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GAACUQAB.js";
|
|
7
7
|
import {
|
|
8
8
|
catalog as catalog8
|
|
9
9
|
} from "./chunk-7SQOXIWR.js";
|
|
10
10
|
import {
|
|
11
11
|
catalog as catalog4
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CR3G2JQP.js";
|
|
13
13
|
import {
|
|
14
14
|
catalog as catalog7
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-C6ONUJIO.js";
|
|
16
16
|
import "./chunk-S5H6GH6M.js";
|
|
17
17
|
import "./chunk-QAGGJHAF.js";
|
|
18
18
|
import "./chunk-MFHXCHRI.js";
|
|
@@ -33,11 +33,11 @@ import {
|
|
|
33
33
|
import "./chunk-XHGZ2E77.js";
|
|
34
34
|
import "./chunk-ZFEXATWN.js";
|
|
35
35
|
import "./chunk-W2245F6G.js";
|
|
36
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
5
|
+
} from "../chunk-UKKY7HWN.js";
|
|
6
6
|
import "../chunk-E63UEO5C.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-7RGDRDAR.js";
|
|
8
8
|
import "../chunk-2ESYSVXG.js";
|
|
9
9
|
export {
|
|
10
10
|
assertCardFontsAdmitted,
|
package/dist/render-harness.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-DV7ZFVL4.js";
|
|
4
4
|
import {
|
|
5
5
|
assertCardFontsAdmitted
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UKKY7HWN.js";
|
|
7
7
|
import {
|
|
8
8
|
assertNoRemoteRefs,
|
|
9
9
|
assetSlots,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
renderInputAssets
|
|
13
13
|
} from "./chunk-KSRFYFUZ.js";
|
|
14
14
|
import "./chunk-OSMXQV5V.js";
|
|
15
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
57
|
-
import "./chunk-
|
|
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-
|
|
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.
|
|
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/
|
|
19
|
+
"@cueframe/brand-derivation": "0.1.0",
|
|
20
20
|
"@cueframe/animate": "0.1.0",
|
|
21
|
-
"@cueframe/
|
|
21
|
+
"@cueframe/cloud-import": "0.1.0",
|
|
22
|
+
"@cueframe/account-model": "0.1.0",
|
|
22
23
|
"@cueframe/authoring": "0.1.0",
|
|
23
|
-
"@cueframe/composition-ops": "0.1.0",
|
|
24
|
-
"@cueframe/component-runtime": "0.1.0",
|
|
25
24
|
"@cueframe/compose": "0.1.0",
|
|
26
|
-
"@cueframe/
|
|
27
|
-
"@cueframe/
|
|
28
|
-
"@cueframe/foundation": "0.1.0",
|
|
29
|
-
"@cueframe/mcp": "0.1.0",
|
|
30
|
-
"@cueframe/core": "0.1.0",
|
|
25
|
+
"@cueframe/composition": "0.1.0",
|
|
26
|
+
"@cueframe/component-runtime": "0.1.0",
|
|
31
27
|
"@cueframe/director": "0.1.0",
|
|
28
|
+
"@cueframe/core": "0.1.0",
|
|
29
|
+
"@cueframe/mcp": "0.1.0",
|
|
30
|
+
"@cueframe/composition-ops": "0.1.0",
|
|
31
|
+
"@cueframe/foundation": "0.1.0",
|
|
32
32
|
"@cueframe/errors": "0.1.0",
|
|
33
|
-
"@cueframe/
|
|
33
|
+
"@cueframe/media-model": "0.1.0",
|
|
34
34
|
"@cueframe/perception": "0.1.0",
|
|
35
|
+
"@cueframe/nle-export": "0.1.0",
|
|
35
36
|
"@cueframe/plane": "0.1.0",
|
|
36
|
-
"@cueframe/
|
|
37
|
-
"@cueframe/
|
|
38
|
-
"@cueframe/render-harness": "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",
|