@cueframe/kernel 0.2.59-rc.1 → 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/{alphaLayers.d.ts → componentClips.d.ts} +3 -2
- package/dist/_members/composition-ops/index.d.ts +6 -28
- package/dist/_members/core/render/compositionRender.d.ts +6 -1
- package/dist/_members/core/render/trackProjection.d.ts +3 -1
- 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 -2
- package/dist/authoring/scene.js +2 -2
- package/dist/authoring.js +12 -11
- 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-DPMS7I65.js +11 -0
- package/dist/{chunk-ONSGT6UJ.js → chunk-E2DVOSUE.js} +37 -10
- package/dist/{chunk-4WBSXHQA.js → chunk-EA3J5XUJ.js} +2 -2
- 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-IUJABAG2.js → chunk-HOQ45246.js} +55 -39
- package/dist/{chunk-T56BK7NS.js → chunk-JRGALHBZ.js} +1 -1
- package/dist/{chunk-FZB7UX44.js → chunk-KEQTT67U.js} +7 -49
- package/dist/{chunk-4VBLQIM5.js → chunk-KRIEZVXX.js} +1 -1
- package/dist/{chunk-PLWDYWK6.js → chunk-KWWWMU5S.js} +1 -1
- package/dist/{chunk-IVFMOHAC.js → chunk-L53YKOK4.js} +5 -5
- package/dist/{chunk-XOT2VWCO.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 -10
- package/dist/component-runtime/template.js +11 -10
- 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 +3 -8
- 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 -2
- 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 -15
- package/dist/composition.js +9 -10
- package/dist/{context-7SWSVJ6Z.js → context-WOYP7QBB.js} +6 -6
- package/dist/core/render.js +9 -7
- package/dist/core/select.js +2 -2
- package/dist/core.js +9 -7
- 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 -18
- package/dist/{src-XI5MULKD.js → src-XYW7BEJ5.js} +17 -15
- package/package.json +16 -12
- package/dist/{chunk-UGEUB763.js → chunk-7PSQUTL5.js} +3 -3
package/dist/authoring/scene.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
sceneTrackIdFor,
|
|
14
14
|
validateSceneAdd,
|
|
15
15
|
validateSceneUpdate
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-X7DGPNSV.js";
|
|
17
17
|
import "../chunk-XHMKPTHV.js";
|
|
18
18
|
import {
|
|
19
19
|
SCENE_TRANSITION_KINDS,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
offFrameLattice,
|
|
24
24
|
readSceneSourceRef,
|
|
25
25
|
sceneClipShapeIssues
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-UB6Z7RY4.js";
|
|
27
27
|
import "../chunk-2L7PYYJK.js";
|
|
28
28
|
import "../chunk-U67V476Y.js";
|
|
29
29
|
export {
|
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,29 +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
58
|
import "./chunk-ILO4NEZ3.js";
|
|
58
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-O3RHY4ZI.js";
|
|
59
60
|
import "./chunk-7PA7FGLD.js";
|
|
60
61
|
import "./chunk-VG2ND6PX.js";
|
|
61
62
|
import {
|
|
62
63
|
collectSceneClipIssues,
|
|
63
64
|
isSceneShotClip
|
|
64
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-UB6Z7RY4.js";
|
|
65
66
|
import "./chunk-2L7PYYJK.js";
|
|
66
67
|
import "./chunk-OOL7ZUG7.js";
|
|
67
68
|
import "./chunk-U67V476Y.js";
|
|
@@ -142,7 +143,7 @@ var COMPOSE_ROLE_TOOLS = Object.freeze({
|
|
|
142
143
|
schema: z.object({}),
|
|
143
144
|
metadata: { label: "Get Context" },
|
|
144
145
|
handler: async (_args, capabilities) => {
|
|
145
|
-
const { buildDirectorContext: buildDirectorContext2 } = await import("./context-
|
|
146
|
+
const { buildDirectorContext: buildDirectorContext2 } = await import("./context-WOYP7QBB.js");
|
|
146
147
|
return buildDirectorContext2(capabilities);
|
|
147
148
|
}
|
|
148
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// ../composition/src/depth.ts
|
|
2
|
+
function isBehindSubjectDepthSource(source) {
|
|
3
|
+
if (!source || typeof source !== "object") return false;
|
|
4
|
+
const kind = source.kind;
|
|
5
|
+
if (kind !== "overlay" && kind !== "component") return false;
|
|
6
|
+
return source.zPlane === "behind-subject";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
isBehindSubjectDepthSource
|
|
11
|
+
};
|
|
@@ -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,8 +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
|
|
587
|
+
// ../composition-ops/src/componentClips.ts
|
|
588
|
+
function collectComponentClips(composition) {
|
|
584
589
|
const tracks = composition?.tracks;
|
|
585
590
|
if (!Array.isArray(tracks)) return [];
|
|
586
591
|
const out = [];
|
|
@@ -590,7 +595,7 @@ function collectAlphaLayerClips(composition) {
|
|
|
590
595
|
for (const c of contents) {
|
|
591
596
|
const src = c?.source;
|
|
592
597
|
if (!src || typeof src !== "object") continue;
|
|
593
|
-
if (src.kind !== "
|
|
598
|
+
if (src.kind !== "component") continue;
|
|
594
599
|
const componentId = src.componentId;
|
|
595
600
|
const clipId = c.id;
|
|
596
601
|
const startTime = c.startTime;
|
|
@@ -648,8 +653,6 @@ function deriveFromSource(sourceKind) {
|
|
|
648
653
|
return "effect";
|
|
649
654
|
case "component":
|
|
650
655
|
return "overlay";
|
|
651
|
-
case "alpha-layer":
|
|
652
|
-
return "overlay";
|
|
653
656
|
case "card":
|
|
654
657
|
return "overlay";
|
|
655
658
|
case "media":
|
|
@@ -794,6 +797,14 @@ var CompositionOp = z.discriminatedUnion("type", [
|
|
|
794
797
|
),
|
|
795
798
|
z.object({ type: z.literal("removeExcludedRange"), clipId: z.string(), rangeIdx: z.number() }).strict().describe(
|
|
796
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."
|
|
797
808
|
)
|
|
798
809
|
]).describe(
|
|
799
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."
|
|
@@ -975,6 +986,16 @@ function applyOpToStore(store, op) {
|
|
|
975
986
|
case "removeExcludedRange":
|
|
976
987
|
store.removeExcludedRange(op.clipId, op.rangeIdx);
|
|
977
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
|
+
}
|
|
978
999
|
default: {
|
|
979
1000
|
const _exhaustive = op;
|
|
980
1001
|
throw new Error(`applyOp: unknown op ${_exhaustive.type}`);
|
|
@@ -1098,6 +1119,12 @@ function invertOp(before, op) {
|
|
|
1098
1119
|
);
|
|
1099
1120
|
}
|
|
1100
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
|
+
}
|
|
1101
1128
|
case "cutAndRipple":
|
|
1102
1129
|
case "ripple":
|
|
1103
1130
|
case "addExcludedRange":
|
|
@@ -1136,7 +1163,7 @@ export {
|
|
|
1136
1163
|
GRID_HARD_MAX_MARKERS,
|
|
1137
1164
|
materializeGridMarkers,
|
|
1138
1165
|
replaceRegion,
|
|
1139
|
-
|
|
1166
|
+
collectComponentClips,
|
|
1140
1167
|
collectRawComponentClips,
|
|
1141
1168
|
mediaFamily,
|
|
1142
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 ?? "?"}`;
|
|
@@ -341,7 +341,7 @@ ${JSON.stringify(r.errors ?? [], null, 2)}${warns}`;
|
|
|
341
341
|
{
|
|
342
342
|
name: "validate_composition",
|
|
343
343
|
operationId: "validateComposition",
|
|
344
|
-
description: "Dry-run a full Composition object against the SAME pure, DB-free authoring guards saveComposition enforces, WITHOUT persisting it (no project needed). Checks: wire shape (Zod), primitive membership (unknown_primitive / custom_missing_sourcecode), required-param shape (invalid_primitive_params), clip\u2194track family (clip_source_track_mismatch), and reframe coverage (reframe_coverage_gap). Always returns ONE shape \u2014 200 { valid, errors, quote } \u2014 for BOTH malformed wire shapes and deep-invariant failures (so branch on `valid`, not on HTTP status); errors[] lists every problem at once as a sanitized envelope { code, stage, category, retryable, message, fix } you can fix before composing/rendering. The `quote` triple states the render price to finish from a valid composition \u2014 relay it to your human BEFORE create_render. `valid:true` means save-safe EXCEPT for the three genuinely DB-bound checks that can only run at save/render, because this tool takes no project: trim-bounds (needs the media duration), image/asset-on-a-video-track (needs the media kind), and componentId resolution (needs the installed components of YOUR org \u2014
|
|
344
|
+
description: "Dry-run a full Composition object against the SAME pure, DB-free authoring guards saveComposition enforces, WITHOUT persisting it (no project needed). Checks: wire shape (Zod), primitive membership (unknown_primitive / custom_missing_sourcecode), required-param shape (invalid_primitive_params), clip\u2194track family (clip_source_track_mismatch), and reframe coverage (reframe_coverage_gap). Always returns ONE shape \u2014 200 { valid, errors, quote } \u2014 for BOTH malformed wire shapes and deep-invariant failures (so branch on `valid`, not on HTTP status); errors[] lists every problem at once as a sanitized envelope { code, stage, category, retryable, message, fix } you can fix before composing/rendering. The `quote` triple states the render price to finish from a valid composition \u2014 relay it to your human BEFORE create_render. `valid:true` means save-safe EXCEPT for the three genuinely DB-bound checks that can only run at save/render, because this tool takes no project: trim-bounds (needs the media duration), image/asset-on-a-video-track (needs the media kind), and componentId resolution (needs the installed components of YOUR org \u2014 a `{kind:'component', componentId, props}` clip naming a component you have not created, or naming a CATALOG PRIMITIVE, passes here and is refused at save with `component_source_unavailable`). Pass the Composition as `body`.",
|
|
345
345
|
annotations: { readOnlyHint: true }
|
|
346
346
|
},
|
|
347
347
|
{
|