@cueframe/kernel 0.2.59-rc.2 → 0.2.59-rc.3
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/component-runtime/componentBundleServer.d.ts +7 -2
- package/dist/_members/component-runtime/componentBundleServer.d.ts.map +1 -1
- package/dist/_members/component-runtime/contracts.d.ts +0 -14
- package/dist/_members/component-runtime/contracts.d.ts.map +1 -1
- package/dist/_members/component-runtime/template/schema.d.ts +0 -6
- package/dist/_members/component-runtime/template/schema.d.ts.map +1 -1
- package/dist/_members/composition/componentClip.d.ts +96 -0
- package/dist/_members/composition/depth.d.ts +1 -1
- package/dist/_members/composition/scene/clipRules.d.ts +1 -1
- package/dist/_members/composition/validators/composition.d.ts +0 -52
- package/dist/_members/composition/validators/graphicKinds.d.ts +1 -1
- package/dist/_members/composition-ops/componentClips.d.ts +11 -0
- package/dist/_members/composition-ops/index.d.ts +6 -28
- package/dist/_members/errors/registry.d.ts +12 -0
- package/dist/_members/mcp/generated/harness.d.ts +1 -1
- package/dist/animate/preparation-facts.js +2 -2
- package/dist/animate.js +3 -3
- package/dist/authoring/context.js +6 -6
- package/dist/authoring/motion.js +3 -3
- package/dist/authoring/scene.js +2 -2
- package/dist/authoring.js +12 -12
- package/dist/{chunk-ZCEYEIRB.js → chunk-3KFQM7DG.js} +1 -1
- package/dist/{chunk-JNBNDHEF.js → chunk-3SMYBRYD.js} +2 -2
- package/dist/{chunk-H2ZZXISB.js → chunk-6D3KCUWA.js} +1 -1
- package/dist/{chunk-BZVOCVQV.js → chunk-BLVSFN6J.js} +0 -17
- package/dist/{chunk-NECN7TT4.js → chunk-BR6QZZEI.js} +4 -4
- package/dist/{chunk-3JEUNKDK.js → chunk-CMPRHO6D.js} +1 -1
- package/dist/{chunk-CEO47DIE.js → chunk-D5QWWPDL.js} +2 -2
- package/dist/{chunk-AK6QPX7A.js → chunk-DBBKM74E.js} +22 -45
- package/dist/{chunk-J44R72DZ.js → chunk-DPMS7I65.js} +1 -1
- package/dist/{chunk-G2OTMC72.js → chunk-E2DVOSUE.js} +38 -16
- package/dist/{chunk-4OHLOBXS.js → chunk-EA3J5XUJ.js} +1 -1
- package/dist/{chunk-3HLDIIWA.js → chunk-F5UOF52Q.js} +1 -1
- package/dist/{chunk-I2HNC4PQ.js → chunk-FZCVNHML.js} +1 -1
- package/dist/{chunk-DCKADD5B.js → chunk-HEMRBFLN.js} +1 -1
- package/dist/{chunk-ZT3LVL2U.js → chunk-HOQ45246.js} +17 -18
- package/dist/{chunk-T56BK7NS.js → chunk-JRGALHBZ.js} +1 -1
- package/dist/{chunk-FZB7UX44.js → chunk-KEQTT67U.js} +7 -49
- package/dist/{chunk-ML3HG2AZ.js → chunk-KRIEZVXX.js} +1 -1
- package/dist/{chunk-PLWDYWK6.js → chunk-KWWWMU5S.js} +1 -1
- package/dist/{chunk-GQFJKDCH.js → chunk-L53YKOK4.js} +4 -4
- package/dist/{chunk-QCETEKQX.js → chunk-LRS32NU7.js} +6 -6
- package/dist/{chunk-6KZCXAYL.js → chunk-MRLC4HLJ.js} +1 -1
- package/dist/{chunk-P6RVYHLT.js → chunk-NASGAME6.js} +4 -4
- package/dist/{chunk-XQGQ5EFS.js → chunk-O3RHY4ZI.js} +2 -0
- package/dist/{chunk-WPZKOVYF.js → chunk-OL3ULF5Q.js} +1 -1
- package/dist/{chunk-AFUITAH6.js → chunk-S6YSOEK5.js} +3 -12
- package/dist/{chunk-U7KSOA2L.js → chunk-SBKCVRJB.js} +1 -1
- package/dist/{chunk-MMJYII7Y.js → chunk-SBWXIK5K.js} +4 -4
- package/dist/{chunk-7II5OM7R.js → chunk-TBZEIN45.js} +1 -1
- package/dist/{chunk-RWJHZCOR.js → chunk-TG756AMB.js} +2 -2
- package/dist/{chunk-X2RTLS6K.js → chunk-TPQA5TPU.js} +1 -1
- package/dist/{chunk-CL5Y6V6K.js → chunk-UB6Z7RY4.js} +3 -3
- package/dist/{chunk-KC4LNZL5.js → chunk-VSHAP22Q.js} +2 -2
- package/dist/{chunk-LVMWPFV4.js → chunk-VW22APZC.js} +1 -1
- package/dist/chunk-WHYTCQYZ.js +161 -0
- package/dist/{chunk-XV2K3AQT.js → chunk-WONOHP4G.js} +1 -1
- package/dist/{chunk-ZPJQ3TQL.js → chunk-WYMJ5RXC.js} +1 -1
- package/dist/{chunk-6HA55CRU.js → chunk-X7DGPNSV.js} +1 -1
- package/dist/{chunk-2K2GBFLU.js → chunk-Y2NR3Y6J.js} +1 -1
- package/dist/{chunk-UGWJC4GA.js → chunk-ZTJYOHS3.js} +1 -1
- package/dist/{chunk-6HPEMDQW.js → chunk-ZUCLQVXD.js} +1 -1
- package/dist/component-runtime/browserOptions.js +3 -3
- package/dist/component-runtime/contracts.js +3 -11
- package/dist/component-runtime/importPolicy.js +2 -2
- package/dist/component-runtime/render.js +5 -5
- package/dist/component-runtime/sourceAdmission.js +2 -2
- package/dist/component-runtime/template/testing.js +11 -11
- package/dist/component-runtime/template.js +11 -11
- package/dist/component-runtime.js +8 -16
- package/dist/compose.js +11 -11
- package/dist/composition/component-clip.d.ts +1 -0
- package/dist/composition/component-clip.js +29 -0
- package/dist/composition/depth.js +1 -1
- package/dist/composition/graphics-plan.js +2 -2
- package/dist/composition/invariants.js +2 -2
- package/dist/composition/ops.js +5 -5
- package/dist/composition/projection.js +3 -3
- package/dist/composition/scene.js +1 -1
- package/dist/composition/timeline.js +2 -2
- package/dist/composition/validators/brand-kit-body.js +4 -4
- package/dist/composition/validators/graphic-kinds.js +1 -1
- package/dist/composition/validators.js +4 -6
- package/dist/composition-ops.js +17 -18
- package/dist/composition.js +9 -11
- package/dist/{context-7SWSVJ6Z.js → context-WOYP7QBB.js} +6 -6
- package/dist/core/render.js +9 -8
- package/dist/core/select.js +2 -2
- package/dist/core.js +9 -8
- package/dist/director/ai-sdk.js +3 -3
- package/dist/director/domain.js +2 -2
- package/dist/director.js +4 -4
- package/dist/errors.js +1 -1
- package/dist/mcp/adapter.js +3 -3
- package/dist/mcp/composition-ops.js +1 -1
- package/dist/mcp/core.js +1 -1
- package/dist/mcp/curation.js +1 -1
- package/dist/mcp/scene-shot.js +2 -2
- package/dist/mcp/server.js +6 -6
- package/dist/mcp.js +10 -10
- package/dist/primitives/captions.js +3 -3
- package/dist/primitives/effects.js +5 -5
- package/dist/primitives/layouts.js +4 -4
- package/dist/primitives/lib/index.js +3 -3
- package/dist/primitives/lib.js +3 -3
- package/dist/primitives/scenes.js +4 -4
- package/dist/primitives/ui-blocks.js +2 -2
- package/dist/primitives.js +9 -9
- package/dist/render-harness/cardAssetAdmission.js +2 -2
- package/dist/render-harness/cardFonts.js +2 -2
- package/dist/render-harness.js +20 -19
- package/dist/{src-XQYRJ27W.js → src-XYW7BEJ5.js} +17 -18
- package/package.json +15 -11
- package/dist/_members/composition-ops/alphaLayers.d.ts +0 -17
- package/dist/{chunk-UGEUB763.js → chunk-7PSQUTL5.js} +3 -3
package/dist/authoring.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
hasSceneOp,
|
|
5
5
|
isSceneOp,
|
|
6
6
|
materializeSceneOpsCore
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X7DGPNSV.js";
|
|
8
8
|
import {
|
|
9
9
|
buildDirectorContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VW22APZC.js";
|
|
11
11
|
import {
|
|
12
12
|
buildFastModel,
|
|
13
13
|
buildModel,
|
|
@@ -39,30 +39,30 @@ import {
|
|
|
39
39
|
} from "./chunk-EISHFHU5.js";
|
|
40
40
|
import {
|
|
41
41
|
selectAllOverlays
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-Y2NR3Y6J.js";
|
|
43
43
|
import {
|
|
44
44
|
ComposePlan
|
|
45
|
-
} from "./chunk-
|
|
46
|
-
import "./chunk-
|
|
45
|
+
} from "./chunk-3KFQM7DG.js";
|
|
46
|
+
import "./chunk-MRLC4HLJ.js";
|
|
47
47
|
import {
|
|
48
48
|
OverlayClipSource
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-S6YSOEK5.js";
|
|
50
|
+
import "./chunk-OL3ULF5Q.js";
|
|
51
51
|
import "./chunk-B7J5UUUV.js";
|
|
52
52
|
import "./chunk-EQH37KNZ.js";
|
|
53
53
|
import "./chunk-Q6CJ6HCU.js";
|
|
54
54
|
import "./chunk-WREYUH2E.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-L53YKOK4.js";
|
|
56
|
+
import "./chunk-DPMS7I65.js";
|
|
56
57
|
import "./chunk-DKBFAQCW.js";
|
|
57
|
-
import "./chunk-J44R72DZ.js";
|
|
58
58
|
import "./chunk-ILO4NEZ3.js";
|
|
59
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-O3RHY4ZI.js";
|
|
60
60
|
import "./chunk-7PA7FGLD.js";
|
|
61
61
|
import "./chunk-VG2ND6PX.js";
|
|
62
62
|
import {
|
|
63
63
|
collectSceneClipIssues,
|
|
64
64
|
isSceneShotClip
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-UB6Z7RY4.js";
|
|
66
66
|
import "./chunk-2L7PYYJK.js";
|
|
67
67
|
import "./chunk-OOL7ZUG7.js";
|
|
68
68
|
import "./chunk-U67V476Y.js";
|
|
@@ -143,7 +143,7 @@ var COMPOSE_ROLE_TOOLS = Object.freeze({
|
|
|
143
143
|
schema: z.object({}),
|
|
144
144
|
metadata: { label: "Get Context" },
|
|
145
145
|
handler: async (_args, capabilities) => {
|
|
146
|
-
const { buildDirectorContext: buildDirectorContext2 } = await import("./context-
|
|
146
|
+
const { buildDirectorContext: buildDirectorContext2 } = await import("./context-WOYP7QBB.js");
|
|
147
147
|
return buildDirectorContext2(capabilities);
|
|
148
148
|
}
|
|
149
149
|
},
|
|
@@ -43,14 +43,14 @@ import {
|
|
|
43
43
|
makeDefaultScreenTexture,
|
|
44
44
|
resolveCamera,
|
|
45
45
|
useImageTexture
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-TG756AMB.js";
|
|
47
47
|
import {
|
|
48
48
|
DEVICE_GLASS_OPACITY_ENCODED,
|
|
49
49
|
DeviceMesh,
|
|
50
50
|
StudioRig,
|
|
51
51
|
deviceDimensions,
|
|
52
52
|
laptopLayout
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-WONOHP4G.js";
|
|
54
54
|
|
|
55
55
|
// ../execution/primitives/src/scenes/changelog-bite/index.tsx
|
|
56
56
|
import {
|
|
@@ -107,19 +107,6 @@ var ComponentSourceV2 = z.object({
|
|
|
107
107
|
tsxSource: z.string().min(1),
|
|
108
108
|
manifest: ComponentManifestV2
|
|
109
109
|
}).strict();
|
|
110
|
-
var ComponentSourceRefV1 = z.object({
|
|
111
|
-
version: z.literal(1),
|
|
112
|
-
sourceVersionId: z.string().regex(/^[a-f0-9]{64}$/)
|
|
113
|
-
}).strict();
|
|
114
|
-
var COMPONENT_SOURCE_REF_PROP = "componentRef";
|
|
115
|
-
function readComponentSourceRef(props) {
|
|
116
|
-
const parsed = ComponentSourceRefV1.safeParse(props[COMPONENT_SOURCE_REF_PROP]);
|
|
117
|
-
return parsed.success ? parsed.data : null;
|
|
118
|
-
}
|
|
119
|
-
function authoredComponentProps(props) {
|
|
120
|
-
const { [COMPONENT_SOURCE_REF_PROP]: _reserved, ...authored } = props;
|
|
121
|
-
return authored;
|
|
122
|
-
}
|
|
123
110
|
var ComponentAssetBindingV2 = z.object({
|
|
124
111
|
handle: z.string().min(1).max(256),
|
|
125
112
|
kind: ComponentAssetKind,
|
|
@@ -306,10 +293,6 @@ export {
|
|
|
306
293
|
ComponentManifestV2,
|
|
307
294
|
CANVAS2D_COMPONENT_MANIFEST_V2,
|
|
308
295
|
ComponentSourceV2,
|
|
309
|
-
ComponentSourceRefV1,
|
|
310
|
-
COMPONENT_SOURCE_REF_PROP,
|
|
311
|
-
readComponentSourceRef,
|
|
312
|
-
authoredComponentProps,
|
|
313
296
|
ComponentAssetBindingV2,
|
|
314
297
|
ComponentAssetInputV2,
|
|
315
298
|
ComponentAssetFileV2,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BrandKitBodySchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-D5QWWPDL.js";
|
|
4
4
|
import {
|
|
5
5
|
ComponentSourceV2
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BLVSFN6J.js";
|
|
7
7
|
import {
|
|
8
8
|
Composition
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S6YSOEK5.js";
|
|
10
10
|
import {
|
|
11
11
|
SceneShotSpecV2,
|
|
12
12
|
sceneShotImageSlots,
|
|
13
13
|
sceneShotVideoSlots
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UB6Z7RY4.js";
|
|
15
15
|
|
|
16
16
|
// ../execution/component-runtime/src/template/schema.ts
|
|
17
17
|
import { z } from "zod";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-WTQRLFR2.js";
|
|
25
25
|
import {
|
|
26
26
|
FlexLayout
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-TG756AMB.js";
|
|
28
28
|
|
|
29
29
|
// ../execution/primitives/src/layouts/chat-to-preview-layout/index.tsx
|
|
30
30
|
import { Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion";
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
componentBrowserBackend,
|
|
9
9
|
componentBrowserOptions,
|
|
10
10
|
readGpuAttestation
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VSHAP22Q.js";
|
|
12
12
|
import {
|
|
13
13
|
sha256Hex,
|
|
14
14
|
sourceVersionId
|
|
15
15
|
} from "./chunk-F6PLDBAK.js";
|
|
16
16
|
import {
|
|
17
17
|
assertComponentImportsAllowed
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZTJYOHS3.js";
|
|
19
19
|
import {
|
|
20
20
|
ComponentCapturePageRasterAttestationV1,
|
|
21
21
|
ComponentGraphicsApiV2,
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
ComponentStillPngContainerFactsV1,
|
|
26
26
|
ComponentStillSessionAttestationV1,
|
|
27
27
|
ComponentStillSessionHostAttestationV1
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BLVSFN6J.js";
|
|
29
29
|
import {
|
|
30
30
|
parseSceneShotSpecV2
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-UB6Z7RY4.js";
|
|
32
32
|
import {
|
|
33
33
|
BUNDLED_FONT_FACES
|
|
34
34
|
} from "./chunk-OOL7ZUG7.js";
|
|
@@ -1000,48 +1000,26 @@ function contentSecurityPolicy(assetOrigins, scriptNonce, resourceOrigin) {
|
|
|
1000
1000
|
"frame-ancestors tauri: http://tauri.localhost"
|
|
1001
1001
|
].join("; ");
|
|
1002
1002
|
}
|
|
1003
|
-
async function startComponentBundleServer(
|
|
1004
|
-
const
|
|
1005
|
-
if (upstreamUrl && (upstreamUrl.protocol !== "http:" || !["127.0.0.1", "localhost"].includes(upstreamUrl.hostname))) {
|
|
1006
|
-
throw new Error("Live component preview requires a loopback bundle origin.");
|
|
1007
|
-
}
|
|
1008
|
-
const bundleRoot = upstreamUrl ? null : await realpath(upstream);
|
|
1003
|
+
async function startComponentBundleServer(bundleDir, assetOrigins) {
|
|
1004
|
+
const bundleRoot = await realpath(bundleDir);
|
|
1009
1005
|
const scriptNonce = randomBytes(18).toString("base64");
|
|
1010
1006
|
const server = createServer(async (request, response) => {
|
|
1011
1007
|
try {
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
const requested = pathname === "/" ? "index.html" : pathname.replace(/^\/+/, "");
|
|
1028
|
-
const resolved = await realpath(join3(bundleRoot, requested));
|
|
1029
|
-
if (resolved !== bundleRoot && !resolved.startsWith(bundleRoot + sep)) throw new Error("Invalid bundle path.");
|
|
1030
|
-
body = await readFile(resolved);
|
|
1031
|
-
const mime = (/* @__PURE__ */ new Map([
|
|
1032
|
-
[".html", "text/html; charset=utf-8"],
|
|
1033
|
-
[".js", "text/javascript; charset=utf-8"],
|
|
1034
|
-
[".css", "text/css; charset=utf-8"],
|
|
1035
|
-
[".json", "application/json"],
|
|
1036
|
-
[".png", "image/png"],
|
|
1037
|
-
[".svg", "image/svg+xml"],
|
|
1038
|
-
[".woff2", "font/woff2"]
|
|
1039
|
-
])).get(extname(resolved));
|
|
1040
|
-
if (mime) {
|
|
1041
|
-
contentType = mime;
|
|
1042
|
-
response.setHeader("Content-Type", mime);
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1008
|
+
const pathname = decodeURIComponent(new URL(request.url ?? "/", "http://localhost").pathname);
|
|
1009
|
+
const requested = pathname === "/" ? "index.html" : pathname.replace(/^\/+/, "");
|
|
1010
|
+
const resolved = await realpath(join3(bundleRoot, requested));
|
|
1011
|
+
if (resolved !== bundleRoot && !resolved.startsWith(bundleRoot + sep)) throw new Error("Invalid bundle path.");
|
|
1012
|
+
let body = await readFile(resolved);
|
|
1013
|
+
const contentType = (/* @__PURE__ */ new Map([
|
|
1014
|
+
[".html", "text/html; charset=utf-8"],
|
|
1015
|
+
[".js", "text/javascript; charset=utf-8"],
|
|
1016
|
+
[".css", "text/css; charset=utf-8"],
|
|
1017
|
+
[".json", "application/json"],
|
|
1018
|
+
[".png", "image/png"],
|
|
1019
|
+
[".svg", "image/svg+xml"],
|
|
1020
|
+
[".woff2", "font/woff2"]
|
|
1021
|
+
])).get(extname(resolved));
|
|
1022
|
+
if (contentType) response.setHeader("Content-Type", contentType);
|
|
1045
1023
|
if (contentType?.toLowerCase().startsWith("text/html")) {
|
|
1046
1024
|
body = Buffer.from(Buffer.from(body).toString("utf8").replaceAll("<script>", `<script nonce="${scriptNonce}">`));
|
|
1047
1025
|
}
|
|
@@ -1068,8 +1046,7 @@ async function startComponentBundleServer(upstream, assetOrigins) {
|
|
|
1068
1046
|
server.close();
|
|
1069
1047
|
throw new Error("Live component preview did not bind a loopback port.");
|
|
1070
1048
|
}
|
|
1071
|
-
const liveUrl = new URL(
|
|
1072
|
-
liveUrl.searchParams.delete("__cueframe_live");
|
|
1049
|
+
const liveUrl = new URL("/", `http://localhost:${address.port}`);
|
|
1073
1050
|
const renderUrl = liveUrl.href;
|
|
1074
1051
|
liveUrl.searchParams.set("__cueframe_live", "1");
|
|
1075
1052
|
let closePromise;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
function isBehindSubjectDepthSource(source) {
|
|
3
3
|
if (!source || typeof source !== "object") return false;
|
|
4
4
|
const kind = source.kind;
|
|
5
|
-
if (kind !== "overlay" && kind !== "component"
|
|
5
|
+
if (kind !== "overlay" && kind !== "component") return false;
|
|
6
6
|
return source.zPlane === "behind-subject";
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -3,13 +3,18 @@ import {
|
|
|
3
3
|
projectMediaPlaybackSpans,
|
|
4
4
|
sliceTranscriptWords,
|
|
5
5
|
splitIntoSentences
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HOQ45246.js";
|
|
7
|
+
import {
|
|
8
|
+
ComponentSourceRefV1,
|
|
9
|
+
componentPinCount,
|
|
10
|
+
repinnedComponentProps
|
|
11
|
+
} from "./chunk-WHYTCQYZ.js";
|
|
7
12
|
import {
|
|
8
13
|
createHeadlessStore,
|
|
9
14
|
findClipById,
|
|
10
15
|
findMarkerById,
|
|
11
16
|
findTrackContainingClipId
|
|
12
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Y2NR3Y6J.js";
|
|
13
18
|
import {
|
|
14
19
|
CaptionLayoutInput,
|
|
15
20
|
CaptionSegment,
|
|
@@ -25,14 +30,14 @@ import {
|
|
|
25
30
|
captionLayoutIssues,
|
|
26
31
|
captionSegmentSignature,
|
|
27
32
|
captionVisibilityIssues
|
|
28
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-S6YSOEK5.js";
|
|
29
34
|
import {
|
|
30
35
|
ReframeSegment
|
|
31
36
|
} from "./chunk-B7J5UUUV.js";
|
|
32
37
|
import {
|
|
33
38
|
SCENE_SLOT_MEDIA_FORMATS,
|
|
34
39
|
SceneShotSpecV2
|
|
35
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-UB6Z7RY4.js";
|
|
36
41
|
import {
|
|
37
42
|
introducedCaptionFaceIssues
|
|
38
43
|
} from "./chunk-OOL7ZUG7.js";
|
|
@@ -579,12 +584,8 @@ function stableSuffix(spans) {
|
|
|
579
584
|
return spans.map((s) => `${s.candidateId}@${s.startSec.toFixed(2)}`).join("_").slice(0, 48).replace(/[^a-zA-Z0-9_@.-]/g, "");
|
|
580
585
|
}
|
|
581
586
|
|
|
582
|
-
// ../composition-ops/src/
|
|
583
|
-
function
|
|
584
|
-
const kind = source?.kind;
|
|
585
|
-
return kind === "component" || kind === "alpha-layer";
|
|
586
|
-
}
|
|
587
|
-
function collectBakedGraphicClips(composition) {
|
|
587
|
+
// ../composition-ops/src/componentClips.ts
|
|
588
|
+
function collectComponentClips(composition) {
|
|
588
589
|
const tracks = composition?.tracks;
|
|
589
590
|
if (!Array.isArray(tracks)) return [];
|
|
590
591
|
const out = [];
|
|
@@ -594,7 +595,7 @@ function collectBakedGraphicClips(composition) {
|
|
|
594
595
|
for (const c of contents) {
|
|
595
596
|
const src = c?.source;
|
|
596
597
|
if (!src || typeof src !== "object") continue;
|
|
597
|
-
if (
|
|
598
|
+
if (src.kind !== "component") continue;
|
|
598
599
|
const componentId = src.componentId;
|
|
599
600
|
const clipId = c.id;
|
|
600
601
|
const startTime = c.startTime;
|
|
@@ -610,7 +611,7 @@ function collectBakedGraphicClips(composition) {
|
|
|
610
611
|
(entry) => typeof entry[1] === "string" && entry[1].length > 0
|
|
611
612
|
)
|
|
612
613
|
) : {};
|
|
613
|
-
out.push({
|
|
614
|
+
out.push({ clipId, componentId, props, assets, startTime, duration });
|
|
614
615
|
}
|
|
615
616
|
}
|
|
616
617
|
return out;
|
|
@@ -652,8 +653,6 @@ function deriveFromSource(sourceKind) {
|
|
|
652
653
|
return "effect";
|
|
653
654
|
case "component":
|
|
654
655
|
return "overlay";
|
|
655
|
-
case "alpha-layer":
|
|
656
|
-
return "overlay";
|
|
657
656
|
case "card":
|
|
658
657
|
return "overlay";
|
|
659
658
|
case "media":
|
|
@@ -798,6 +797,14 @@ var CompositionOp = z.discriminatedUnion("type", [
|
|
|
798
797
|
),
|
|
799
798
|
z.object({ type: z.literal("removeExcludedRange"), clipId: z.string(), rangeIdx: z.number() }).strict().describe(
|
|
800
799
|
"Server-authoritative: remove a clip's previously-added excluded range by index (re-includes that span, ripples downstream)."
|
|
800
|
+
),
|
|
801
|
+
z.object({
|
|
802
|
+
type: z.literal("component.repin"),
|
|
803
|
+
componentId: z.string().min(1),
|
|
804
|
+
from: ComponentSourceRefV1.shape.sourceVersionId,
|
|
805
|
+
to: ComponentSourceRefV1.shape.sourceVersionId
|
|
806
|
+
}).strict().describe(
|
|
807
|
+
"Move every pin of a component at version `from` to version `to`: the clips that place it and the scene surfaces that nest it. A clip's version changes only through a composition write; a component edit issues this op over the composition it names."
|
|
801
808
|
)
|
|
802
809
|
]).describe(
|
|
803
810
|
"One scoped composition operation. Discriminated by `type` \u2014 `clip.add` / `clip.remove` / `clip.update` patch clips across any family; the rest cover markers, reframe, effects, captions, format, tracks, and the server-authoritative ripple recomputes. Every variant is `.strict()`: an unknown field is refused, not ignored."
|
|
@@ -979,6 +986,16 @@ function applyOpToStore(store, op) {
|
|
|
979
986
|
case "removeExcludedRange":
|
|
980
987
|
store.removeExcludedRange(op.clipId, op.rangeIdx);
|
|
981
988
|
break;
|
|
989
|
+
case "component.repin": {
|
|
990
|
+
for (const track of composition.tracks) {
|
|
991
|
+
for (const clip of track.contents) {
|
|
992
|
+
if (!("source" in clip) || clip.source.kind !== "component") continue;
|
|
993
|
+
const { props, moved } = repinnedComponentProps(clip.source.componentId, clip.source.props, op);
|
|
994
|
+
if (moved > 0) store.updateClip(clip.id, { source: { ...clip.source, props } });
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
break;
|
|
998
|
+
}
|
|
982
999
|
default: {
|
|
983
1000
|
const _exhaustive = op;
|
|
984
1001
|
throw new Error(`applyOp: unknown op ${_exhaustive.type}`);
|
|
@@ -1102,6 +1119,12 @@ function invertOp(before, op) {
|
|
|
1102
1119
|
);
|
|
1103
1120
|
}
|
|
1104
1121
|
return { type: "clip.remove", clipId: op.newClipId };
|
|
1122
|
+
case "component.repin": {
|
|
1123
|
+
if (componentPinCount(before, op.componentId, op.to) > 0) {
|
|
1124
|
+
throw new Error(`invertOp(component.repin): '${op.componentId}' was already pinned at ${op.to} in the pre-image`);
|
|
1125
|
+
}
|
|
1126
|
+
return { type: "component.repin", componentId: op.componentId, from: op.to, to: op.from };
|
|
1127
|
+
}
|
|
1105
1128
|
case "cutAndRipple":
|
|
1106
1129
|
case "ripple":
|
|
1107
1130
|
case "addExcludedRange":
|
|
@@ -1140,8 +1163,7 @@ export {
|
|
|
1140
1163
|
GRID_HARD_MAX_MARKERS,
|
|
1141
1164
|
materializeGridMarkers,
|
|
1142
1165
|
replaceRegion,
|
|
1143
|
-
|
|
1144
|
-
collectBakedGraphicClips,
|
|
1166
|
+
collectComponentClips,
|
|
1145
1167
|
collectRawComponentClips,
|
|
1146
1168
|
mediaFamily,
|
|
1147
1169
|
resolveClipKind,
|
|
@@ -247,7 +247,7 @@ function describeClip(c) {
|
|
|
247
247
|
} else if (s.kind === "card") {
|
|
248
248
|
const tokens = Object.keys(s.tokens ?? {});
|
|
249
249
|
what = `card html:${s.html?.length ?? 0}ch${tokens.length ? ` tokens:{${tokens.join(",")}}` : ""}`;
|
|
250
|
-
} else if (s.kind === "component"
|
|
250
|
+
} else if (s.kind === "component") {
|
|
251
251
|
what = `${s.kind} ${s.componentId ?? "?"}`;
|
|
252
252
|
} else if (s.kind === "overlay") {
|
|
253
253
|
what = `overlay ${s.primitiveId ?? s.overlayId ?? "?"}`;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
flattenCompoundClips,
|
|
8
8
|
hasCompoundClips
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WYMJ5RXC.js";
|
|
10
10
|
import {
|
|
11
11
|
DOMINANCE_WEIGHTS,
|
|
12
12
|
ENTER_SEC,
|
|
@@ -24,11 +24,14 @@ import {
|
|
|
24
24
|
scoreAndRank,
|
|
25
25
|
segmentShots,
|
|
26
26
|
stabilizeSelectionHysteresis
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-F5UOF52Q.js";
|
|
28
28
|
import {
|
|
29
29
|
compositionHasVo,
|
|
30
30
|
roleDefaultGainDb
|
|
31
31
|
} from "./chunk-P3EFZDM5.js";
|
|
32
|
+
import {
|
|
33
|
+
componentClipRenderInput
|
|
34
|
+
} from "./chunk-WHYTCQYZ.js";
|
|
32
35
|
import {
|
|
33
36
|
SHOT_SCALE_TARGET,
|
|
34
37
|
shotScaleZoom
|
|
@@ -39,7 +42,7 @@ import {
|
|
|
39
42
|
import {
|
|
40
43
|
CueframeError,
|
|
41
44
|
encodeError
|
|
42
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-O3RHY4ZI.js";
|
|
43
46
|
import {
|
|
44
47
|
SCENE_CAPTURE_IDENTITY_FIELDS_V1,
|
|
45
48
|
SCENE_PRESET_TRIANGLES,
|
|
@@ -54,7 +57,7 @@ import {
|
|
|
54
57
|
sceneFullMipLevels,
|
|
55
58
|
sceneTextureBytes,
|
|
56
59
|
selectSceneBakeScale
|
|
57
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-UB6Z7RY4.js";
|
|
58
61
|
import {
|
|
59
62
|
SCENE_CONTEXT_GL_BUDGET_BYTES,
|
|
60
63
|
SCENE_MAX_TRIANGLES,
|
|
@@ -1680,7 +1683,7 @@ function projectOverlayTrack(track, trackIndex, trackCount, fps, alphaUrls, comp
|
|
|
1680
1683
|
{ trackId: track.id, clipId: c.id, compositionPath: `composition.tracks[${track.id}].contents[${i}].effects` }
|
|
1681
1684
|
);
|
|
1682
1685
|
}
|
|
1683
|
-
if (c.source.kind === "
|
|
1686
|
+
if (c.source.kind === "component" && componentClips === "baked") {
|
|
1684
1687
|
const { startFrame: startFrame2, durationInFrames: durationInFrames2 } = timelineSpanFrames(
|
|
1685
1688
|
c.startTime,
|
|
1686
1689
|
c.startTime + c.duration,
|
|
@@ -1691,7 +1694,7 @@ function projectOverlayTrack(track, trackIndex, trackCount, fps, alphaUrls, comp
|
|
|
1691
1694
|
if (!src) {
|
|
1692
1695
|
throw renderInputError(
|
|
1693
1696
|
"variant_not_baked",
|
|
1694
|
-
`composition.tracks[${track.id}].contents[${i}]:
|
|
1697
|
+
`composition.tracks[${track.id}].contents[${i}]: component clip ${c.id} has no baked alpha (alphaUrls[${c.id}] missing), bake before render`,
|
|
1695
1698
|
{
|
|
1696
1699
|
trackId: track.id,
|
|
1697
1700
|
clipId: c.id,
|
|
@@ -1722,26 +1725,22 @@ function projectOverlayTrack(track, trackIndex, trackCount, fps, alphaUrls, comp
|
|
|
1722
1725
|
fps
|
|
1723
1726
|
);
|
|
1724
1727
|
if (durationInFrames2 === 0) continue;
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1727
|
-
if (ref?.version !== 1 || typeof ref.sourceVersionId !== "string" || !/^[a-f0-9]{64}$/.test(ref.sourceVersionId)) {
|
|
1728
|
+
const built = componentClipRenderInput({ id: c.id, componentId: c.source.componentId, props: c.source.props });
|
|
1729
|
+
if (!built.ok) {
|
|
1728
1730
|
throw renderInputError(
|
|
1729
|
-
|
|
1730
|
-
`composition.tracks[${track.id}].contents[${i}].source:
|
|
1731
|
+
built.refusal.code,
|
|
1732
|
+
`composition.tracks[${track.id}].contents[${i}].source: ${built.refusal.message}`,
|
|
1731
1733
|
{ trackId: track.id, clipId: c.id, componentId: c.source.componentId }
|
|
1732
1734
|
);
|
|
1733
1735
|
}
|
|
1734
|
-
const {
|
|
1735
|
-
if (renderSeed !== void 0 && (typeof renderSeed !== "string" || renderSeed.length === 0)) {
|
|
1736
|
-
throw renderInputError("invalid_composition", `composition.tracks[${track.id}].contents[${i}].source.props.renderSeed must be a non-empty string`, transitionLocator);
|
|
1737
|
-
}
|
|
1736
|
+
const { sourceVersionId, params, seed } = built.input;
|
|
1738
1737
|
overlays.push({
|
|
1739
1738
|
...visualIdentity(track, trackIndex, trackCount, i),
|
|
1740
1739
|
id: c.id,
|
|
1741
1740
|
template: "component",
|
|
1742
1741
|
componentId: c.source.componentId,
|
|
1743
|
-
sourceVersionId
|
|
1744
|
-
|
|
1742
|
+
sourceVersionId,
|
|
1743
|
+
renderSeed: seed,
|
|
1745
1744
|
componentAssets: c.source.assets ?? {},
|
|
1746
1745
|
startFrame: startFrame2,
|
|
1747
1746
|
durationInFrames: durationInFrames2,
|
|
@@ -1782,7 +1781,7 @@ function projectOverlayTrack(track, trackIndex, trackCount, fps, alphaUrls, comp
|
|
|
1782
1781
|
if (c.source.kind !== "overlay") {
|
|
1783
1782
|
throw renderInputError(
|
|
1784
1783
|
"clip_source_track_mismatch",
|
|
1785
|
-
`composition.tracks[${track.id}].contents[${i}]: kind=${c.source.kind} is invalid on an overlay track (expected 'overlay', 'component',
|
|
1784
|
+
`composition.tracks[${track.id}].contents[${i}]: kind=${c.source.kind} is invalid on an overlay track (expected 'overlay', 'component', or 'card')`,
|
|
1786
1785
|
{ trackId: track.id, clipId: c.id, compositionPath: `composition.tracks[${track.id}].contents[${i}].source` }
|
|
1787
1786
|
);
|
|
1788
1787
|
}
|
|
@@ -55,7 +55,7 @@ function isSourceKindCompatible(trackKind, sourceKind) {
|
|
|
55
55
|
case "image":
|
|
56
56
|
return sourceKind === "media" || sourceKind === "component";
|
|
57
57
|
case "overlay":
|
|
58
|
-
return sourceKind === "overlay" || sourceKind === "component" || sourceKind === "
|
|
58
|
+
return sourceKind === "overlay" || sourceKind === "component" || sourceKind === "card";
|
|
59
59
|
case "effect":
|
|
60
60
|
return sourceKind === "effect";
|
|
61
61
|
}
|