@cueframe/kernel 0.2.4 → 0.2.6
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/bake.d.ts +14 -0
- package/dist/_members/component-runtime/bake.d.ts.map +1 -1
- package/dist/_members/composition/scene/clipRules.d.ts +1 -1
- package/dist/_members/render-harness/prepareSceneBake.d.ts +5 -0
- package/dist/_members/render-harness/prepareSceneBake.d.ts.map +1 -0
- package/dist/animate/preparation-facts.js +2 -2
- package/dist/animate.js +3 -3
- package/dist/authoring/scene.js +2 -2
- package/dist/authoring.js +2 -2
- package/dist/{chunk-E7GIZEPS.js → chunk-3V75A6UH.js} +1 -1
- package/dist/{chunk-EBIBLL7E.js → chunk-6FIJJ6GN.js} +3 -3
- package/dist/{chunk-6EWRIAZA.js → chunk-ARCGJUCQ.js} +1 -1
- package/dist/{chunk-WIHXXF3X.js → chunk-DHL55ZBJ.js} +1 -1
- package/dist/{chunk-DQLYWNLC.js → chunk-GP2SCGCH.js} +2 -2
- package/dist/{chunk-VKATKWWR.js → chunk-JDOO6GTW.js} +1 -1
- package/dist/{chunk-7W6ZIKWV.js → chunk-LNGDWWYU.js} +1 -1
- package/dist/{chunk-I5QWBM3M.js → chunk-LO6X2NMI.js} +2 -2
- package/dist/{chunk-MH3UPKWR.js → chunk-M2CXETU3.js} +19 -7
- package/dist/{chunk-5DJ3IEJR.js → chunk-M5QETDOL.js} +2 -2
- package/dist/{chunk-UN6NY2E6.js → chunk-SC55VDLC.js} +1 -1
- package/dist/{chunk-QS36DMFG.js → chunk-SKQR5KAL.js} +1 -1
- package/dist/chunk-TECEMBCI.js +9440 -0
- package/dist/{chunk-YFSBFCXO.js → chunk-VTREDSYF.js} +1 -1
- package/dist/{chunk-UY77TMKD.js → chunk-XSUJQ7BR.js} +26 -6
- package/dist/component-runtime/browserOptions.js +2 -2
- package/dist/component-runtime/render.js +3 -3
- package/dist/component-runtime.js +4 -4
- package/dist/compose.js +6 -6
- package/dist/composition/scene.js +1 -1
- package/dist/composition-ops.js +2 -2
- package/dist/core/render.js +2 -2
- package/dist/core.js +2 -2
- package/dist/mcp/adapter.js +3 -3
- package/dist/mcp/core.js +1 -1
- package/dist/mcp/curation.js +1 -1
- package/dist/mcp/server.js +4 -4
- package/dist/mcp.js +4 -4
- package/dist/primitives/effects.js +4 -4
- package/dist/primitives/layouts.js +4 -4
- package/dist/primitives/scenes.js +4 -4
- package/dist/primitives.js +6 -6
- package/dist/render-harness.js +6 -6
- package/package.json +10 -10
- package/dist/chunk-6BVVCRRD.js +0 -26488
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ComponentBakeRequestV2 as BakeRequest, type ComponentBakeJobV2 as BakeJob, type ComponentRenderReceiptV2 as RenderReceipt } from './contracts.js';
|
|
2
|
+
import { startComponentAssetServer } from './assetServer.js';
|
|
2
3
|
import { type ComponentRenderTiming } from './render.js';
|
|
4
|
+
import { materializeComponentSource } from './sourceWorkspace.js';
|
|
3
5
|
export declare function assertAssetBindingsMatch(request: Pick<BakeRequest, 'source' | 'assets'>): void;
|
|
4
6
|
export declare function bakeComponentAlphaV2(options: {
|
|
5
7
|
job: BakeJob;
|
|
@@ -9,6 +11,18 @@ export declare function bakeComponentAlphaV2(options: {
|
|
|
9
11
|
ffprobeExecutable?: string;
|
|
10
12
|
ffmpegExecutable?: string;
|
|
11
13
|
concurrency?: number;
|
|
14
|
+
/** Host-owned scene preparation runs after verified assets and source staging.
|
|
15
|
+
* The runtime owns the lease until rendering finishes (including failures).
|
|
16
|
+
*/
|
|
17
|
+
prepareScene?: (input: {
|
|
18
|
+
request: BakeRequest;
|
|
19
|
+
materialized: ReturnType<typeof materializeComponentSource>;
|
|
20
|
+
runtimeAssets: Awaited<ReturnType<typeof startComponentAssetServer>>['runtimeAssets'];
|
|
21
|
+
allowedAssetOrigins: Set<string>;
|
|
22
|
+
}) => Promise<{
|
|
23
|
+
params: Record<string, unknown>;
|
|
24
|
+
cleanup(): Promise<void>;
|
|
25
|
+
}>;
|
|
12
26
|
onProgress?: (progress: {
|
|
13
27
|
renderedFrames: number;
|
|
14
28
|
encodedFrames: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bake.d.ts","sourceRoot":"","sources":["../src/bake.ts"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,sBAAsB,IAAI,WAAW,EAC1C,KAAK,kBAAkB,IAAI,OAAO,EAClC,KAAK,wBAAwB,IAAI,aAAa,EAC/C,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"bake.d.ts","sourceRoot":"","sources":["../src/bake.ts"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,sBAAsB,IAAI,WAAW,EAC1C,KAAK,kBAAkB,IAAI,OAAO,EAClC,KAAK,wBAAwB,IAAI,aAAa,EAC/C,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAS7D,OAAO,EAAwB,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAGlE,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,QAAQ,CAAC,GAC9C,IAAI,CAkCN;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAClD,GAAG,EAAE,OAAO,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE;QACrB,OAAO,EAAE,WAAW,CAAC;QACrB,YAAY,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;QAC5D,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACtF,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;KAClC,KAAK,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,CAAC,CAAC;IAC7E,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACxG,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACpD,GAAG,OAAO,CAAC,aAAa,CAAC,CAgHzB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAElE"}
|
|
@@ -64,7 +64,7 @@ export interface SceneClipRuleContext {
|
|
|
64
64
|
/** Composition frame rate; clip timing must sit on its frame lattice. */
|
|
65
65
|
fps: number;
|
|
66
66
|
resolveSource: SceneSourceResolver;
|
|
67
|
-
/** When supplied, bound media must exist here and
|
|
67
|
+
/** When supplied, bound media must exist here and match the surface kind. */
|
|
68
68
|
mediaKindById?: Record<string, string>;
|
|
69
69
|
}
|
|
70
70
|
/** True when `seconds` is not a whole number of frames at `fps`. */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type bakeComponentAlphaV2 } from '../component-runtime/index.js';
|
|
2
|
+
type PrepareScene = NonNullable<Parameters<typeof bakeComponentAlphaV2>[0]['prepareScene']>;
|
|
3
|
+
export declare function createNodeSceneBakePreparation(renderEntryRoot?: string): PrepareScene;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=prepareSceneBake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareSceneBake.d.ts","sourceRoot":"","sources":["../src/prepareSceneBake.ts"],"names":[],"mappings":"AAEA,OAAO,EAA6B,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnG,KAAK,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;AAE5F,wBAAgB,8BAA8B,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,YAAY,CAqDrF"}
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
sceneGrainPreparationCpuAllocationV1,
|
|
5
5
|
scenePresetBuilderDescriptorV1,
|
|
6
6
|
sceneSlabPreparationFactsV1
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-JDOO6GTW.js";
|
|
8
8
|
import {
|
|
9
9
|
photographicStudioPreparationFactsV1,
|
|
10
10
|
sceneFocusPreparationAllocationsV1
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-M2CXETU3.js";
|
|
12
12
|
import "../chunk-2L7PYYJK.js";
|
|
13
13
|
import "../chunk-2ESYSVXG.js";
|
|
14
14
|
export {
|
package/dist/animate.js
CHANGED
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
useStage,
|
|
102
102
|
weightsAt,
|
|
103
103
|
worldTransform
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-M5QETDOL.js";
|
|
105
105
|
import {
|
|
106
106
|
DEFAULT_LIGHTING_PROFILE,
|
|
107
107
|
DEVICE_GLASS_OPACITY_ENCODED,
|
|
@@ -160,7 +160,7 @@ import {
|
|
|
160
160
|
studioShadowFrustum,
|
|
161
161
|
verifyPhotographicStudioHdr,
|
|
162
162
|
withNormalisedFaceUv
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-JDOO6GTW.js";
|
|
164
164
|
import "./chunk-TARKDVP6.js";
|
|
165
165
|
import {
|
|
166
166
|
ALLOWED_BAKE_SCALES,
|
|
@@ -183,7 +183,7 @@ import {
|
|
|
183
183
|
projectedSlotEdges,
|
|
184
184
|
sceneFocusPreparationAllocationsV1,
|
|
185
185
|
selectSceneBakeScale
|
|
186
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-M2CXETU3.js";
|
|
187
187
|
import "./chunk-2L7PYYJK.js";
|
|
188
188
|
import "./chunk-2ESYSVXG.js";
|
|
189
189
|
export {
|
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-SKQR5KAL.js";
|
|
17
17
|
import {
|
|
18
18
|
SCENE_TRANSITION_KINDS,
|
|
19
19
|
collectSceneClipIssues,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
offFrameLattice,
|
|
23
23
|
readSceneSourceRef,
|
|
24
24
|
sceneClipShapeIssues
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-M2CXETU3.js";
|
|
26
26
|
import "../chunk-2L7PYYJK.js";
|
|
27
27
|
import "../chunk-2ESYSVXG.js";
|
|
28
28
|
export {
|
package/dist/authoring.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
hasSceneOp,
|
|
5
5
|
isSceneOp,
|
|
6
6
|
materializeSceneOpsCore
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SKQR5KAL.js";
|
|
8
8
|
import {
|
|
9
9
|
ZERO_USAGE,
|
|
10
10
|
buildDirectorTools,
|
|
@@ -68,7 +68,7 @@ import "./chunk-TARKDVP6.js";
|
|
|
68
68
|
import {
|
|
69
69
|
collectSceneClipIssues,
|
|
70
70
|
isSceneShotClip
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-M2CXETU3.js";
|
|
72
72
|
import "./chunk-2L7PYYJK.js";
|
|
73
73
|
import "./chunk-2ESYSVXG.js";
|
|
74
74
|
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
querySchemaShape,
|
|
3
3
|
serializeQuery,
|
|
4
4
|
waitForJob
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3V75A6UH.js";
|
|
6
6
|
import {
|
|
7
7
|
GENERATED_OPERATIONS,
|
|
8
8
|
apiErrorFrom,
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
sniffImageMediaType,
|
|
20
20
|
text,
|
|
21
21
|
withMedia
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TECEMBCI.js";
|
|
23
23
|
import {
|
|
24
24
|
CURATED_TOOLS
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SC55VDLC.js";
|
|
26
26
|
|
|
27
27
|
// ../mcp/src/prompts.ts
|
|
28
28
|
var skillListCache = null;
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-W2245F6G.js";
|
|
25
25
|
import {
|
|
26
26
|
FlexLayout
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-M5QETDOL.js";
|
|
28
28
|
|
|
29
29
|
// ../execution/primitives/src/layouts/chat-to-preview-layout/index.tsx
|
|
30
30
|
import { Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-ZVG446DJ.js";
|
|
5
5
|
import {
|
|
6
6
|
STUDIO_SHADOW_MAP_BUDGET
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-M2CXETU3.js";
|
|
8
8
|
|
|
9
9
|
// ../execution/component-runtime/src/webglProbe.ts
|
|
10
10
|
var FEATURE_OFF = /(^|_)off(?:_ok)?$|^(?:unavailable|disabled)$/;
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
componentBrowserBackend,
|
|
16
16
|
componentBrowserOptions,
|
|
17
17
|
readGpuAttestation
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DHL55ZBJ.js";
|
|
19
19
|
import {
|
|
20
20
|
ComponentCapturePageRasterAttestationV1,
|
|
21
21
|
ComponentGraphicsApiV2,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "./chunk-ZVG446DJ.js";
|
|
29
29
|
import {
|
|
30
30
|
parseSceneShotSpecV2
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-M2CXETU3.js";
|
|
32
32
|
|
|
33
33
|
// ../execution/component-runtime/src/sceneAdmission.ts
|
|
34
34
|
import { ZodError } from "zod";
|
|
@@ -43,14 +43,14 @@ import {
|
|
|
43
43
|
makeDefaultScreenTexture,
|
|
44
44
|
resolveCamera,
|
|
45
45
|
useImageTexture
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-M5QETDOL.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-JDOO6GTW.js";
|
|
54
54
|
|
|
55
55
|
// ../execution/primitives/src/scenes/changelog-bite/index.tsx
|
|
56
56
|
import {
|
|
@@ -1296,7 +1296,7 @@ function slotOwner(spec2, slot) {
|
|
|
1296
1296
|
for (const layer of layers) {
|
|
1297
1297
|
if ("surfaces" in layer && layer.surfaces !== void 0) {
|
|
1298
1298
|
for (const binding of Object.values(layer.surfaces)) {
|
|
1299
|
-
if (binding.source === "image" && binding.assetSlot === slot) return layer.id;
|
|
1299
|
+
if (binding.source === "image" && binding.assetSlot === slot || binding.source === "video" && binding.mediaId === slot) return layer.id;
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
1302
|
if (layer.kind === "group") {
|
|
@@ -1377,12 +1377,24 @@ function sceneSpecIssues(value, path) {
|
|
|
1377
1377
|
}
|
|
1378
1378
|
function bindingIssues(spec2, assets, path, mediaKindById) {
|
|
1379
1379
|
const issues = [];
|
|
1380
|
-
const
|
|
1381
|
-
|
|
1380
|
+
const images = sceneShotImageSlots(spec2);
|
|
1381
|
+
const videos = sceneShotVideoSlots(spec2);
|
|
1382
|
+
const slots = new Map([
|
|
1383
|
+
...images.map((slot) => [slot, "image"]),
|
|
1384
|
+
...videos.map((slot) => [slot, "video"])
|
|
1385
|
+
]);
|
|
1386
|
+
for (const slot of images.filter((slot2) => videos.includes(slot2))) {
|
|
1387
|
+
issues.push({
|
|
1388
|
+
path: `${path}.${slot}`,
|
|
1389
|
+
code: "validation_error",
|
|
1390
|
+
detail: `slot '${slot}' is used by both image and video surfaces; use distinct slot names.`
|
|
1391
|
+
});
|
|
1392
|
+
}
|
|
1393
|
+
for (const [slot, kind] of slots) {
|
|
1382
1394
|
if (typeof assets[slot] === "string" && assets[slot].length > 0) continue;
|
|
1383
1395
|
issues.push({
|
|
1384
1396
|
path: `${path}.${slot}`,
|
|
1385
|
-
detail: `slot '${slot}' is referenced by layer '${slotOwner(spec2, slot)}' but not bound; bind it to an image media id.`,
|
|
1397
|
+
detail: `slot '${slot}' is referenced by layer '${slotOwner(spec2, slot)}' but not bound; bind it to ${kind === "image" ? "an image" : "a video"} media id.`,
|
|
1386
1398
|
code: "validation_error"
|
|
1387
1399
|
});
|
|
1388
1400
|
}
|
|
@@ -1391,7 +1403,7 @@ function bindingIssues(spec2, assets, path, mediaKindById) {
|
|
|
1391
1403
|
issues.push({ path: `${path}.${name}`, detail: `'${name}' is not a valid slot name.`, code: "validation_error" });
|
|
1392
1404
|
continue;
|
|
1393
1405
|
}
|
|
1394
|
-
if (!slots.
|
|
1406
|
+
if (!slots.has(name)) {
|
|
1395
1407
|
issues.push({
|
|
1396
1408
|
path: `${path}.${name}`,
|
|
1397
1409
|
detail: `no layer references slot '${name}'; remove the binding or reference the slot from a layer.`,
|
|
@@ -1403,10 +1415,10 @@ function bindingIssues(spec2, assets, path, mediaKindById) {
|
|
|
1403
1415
|
const kind = mediaKindById[mediaId];
|
|
1404
1416
|
if (kind === void 0) {
|
|
1405
1417
|
issues.push({ path: `${path}.${name}`, detail: `media '${mediaId}' is not in this project.`, code: "validation_error" });
|
|
1406
|
-
} else if (kind !==
|
|
1418
|
+
} else if (kind !== slots.get(name)) {
|
|
1407
1419
|
issues.push({
|
|
1408
1420
|
path: `${path}.${name}`,
|
|
1409
|
-
detail: `slot '${name}' needs
|
|
1421
|
+
detail: `slot '${name}' needs ${slots.get(name)} media (${slots.get(name) === "image" ? "PNG, JPEG or WebP" : "MP4 or WebM"}); '${mediaId}' is ${kind}.`,
|
|
1410
1422
|
code: "validation_error"
|
|
1411
1423
|
});
|
|
1412
1424
|
}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
slabTriangleCount,
|
|
20
20
|
takeSceneEnvironment,
|
|
21
21
|
useSceneActualResourceRegistrarV1
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JDOO6GTW.js";
|
|
23
23
|
import {
|
|
24
24
|
resolveCaptionFaces
|
|
25
25
|
} from "./chunk-TARKDVP6.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
sceneTextureBytes,
|
|
35
35
|
sceneVideoMidpointAddressV1,
|
|
36
36
|
selectSceneBakeScale
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-M2CXETU3.js";
|
|
38
38
|
|
|
39
39
|
// ../execution/animate/src/easing/smooth.ts
|
|
40
40
|
var sigmoid = (x) => 1 / (1 + Math.exp(-x));
|
|
@@ -310,7 +310,7 @@ Call wait_job(kind="compose", id="${j.composeJobId}", projectId="${a.projectId}"
|
|
|
310
310
|
name: "apply_composition",
|
|
311
311
|
operationId: "applyComposition",
|
|
312
312
|
pathArgs: { projectId: "id" },
|
|
313
|
-
description: 'Atomically apply an array of CompositionOps to a project composition. All ops succeed or none do (transactional). Pass `if_match` for optimistic-concurrency control (409 stale_etag on mismatch) and `dry_run: true` to validate the batch without persisting. Use this to seed a composition (add media clips) or make targeted edits (set a crop intent, reorder clips, set the format). CAPTIONS: attach content with {type:"captions.fromTranscript", mediaId, window?} \u2014 the server slices the cached word-timed transcript, rebases times, and sentence-splits into segments (no pasting words; 422 media_no_transcript if the media has no speech); style it with {type:"setCaptionStyle", style}; or set explicit words with {type:"setCaptions", segments, style?} (e.g. translations or your own VO timings). Brand is NOT set here \u2014 it lives on the project (create_project / PATCH /projects/:id with brandKitId). CARDS: a {kind:"card", html, tokens} clip projects each `tokens` KEY `x` to the CSS custom property `--cf-x`, so the html must read it as `var(--cf-x)` \u2014 write `tokens:{"plate":"#0af"}` + `background:var(--cf-plate)`. Do NOT put dashes in the key: `"--plate"` becomes `--cf---plate` and your `var(--plate)` then resolves to NOTHING, which CSS silently degrades to a transparent background and black text. Responses carry `warnings[]` when a card reads a var nothing defines. SCENE SHOTS: for a 3D product shot \u2014 a tilted page screenshot, a lit laptop/phone showing a real screenshot, two-colour type, a colour-field backdrop, focus/grain/vignette and a camera move \u2014 use {type:"scene.add", clipId, newTrack|trackId, startTime, duration, scene, assets} and revise it with {type:"scene.update", clipId, scene?, assets?, startTime?, duration?}. You author a scene SPEC, never wrapper TSX; the server registers the component for you. There is NO built-in scene primitive in list_catalog \u2014 READ cueframe://scene-shot first for the JSON schema,
|
|
313
|
+
description: 'Atomically apply an array of CompositionOps to a project composition. All ops succeed or none do (transactional). Pass `if_match` for optimistic-concurrency control (409 stale_etag on mismatch) and `dry_run: true` to validate the batch without persisting. Use this to seed a composition (add media clips) or make targeted edits (set a crop intent, reorder clips, set the format). CAPTIONS: attach content with {type:"captions.fromTranscript", mediaId, window?} \u2014 the server slices the cached word-timed transcript, rebases times, and sentence-splits into segments (no pasting words; 422 media_no_transcript if the media has no speech); style it with {type:"setCaptionStyle", style}; or set explicit words with {type:"setCaptions", segments, style?} (e.g. translations or your own VO timings). Brand is NOT set here \u2014 it lives on the project (create_project / PATCH /projects/:id with brandKitId). CARDS: a {kind:"card", html, tokens} clip projects each `tokens` KEY `x` to the CSS custom property `--cf-x`, so the html must read it as `var(--cf-x)` \u2014 write `tokens:{"plate":"#0af"}` + `background:var(--cf-plate)`. Do NOT put dashes in the key: `"--plate"` becomes `--cf---plate` and your `var(--plate)` then resolves to NOTHING, which CSS silently degrades to a transparent background and black text. Responses carry `warnings[]` when a card reads a var nothing defines. SCENE SHOTS: for a 3D product shot \u2014 a tilted page screenshot, a lit laptop/phone showing a real screenshot, two-colour type, a colour-field backdrop, focus/grain/vignette and a camera move \u2014 use {type:"scene.add", clipId, newTrack|trackId, startTime, duration, scene, assets} and revise it with {type:"scene.update", clipId, scene?, assets?, startTime?, duration?}. You author a scene SPEC, never wrapper TSX; the server registers the component for you. There is NO built-in scene primitive in list_catalog \u2014 READ cueframe://scene-shot first for the JSON schema, the canonical V2 world-objects recipe with nested groups, slabs, pages, phones, laptops, world/screen text, admitted surfaces, camera motion, lighting, and the current resource limits.',
|
|
314
314
|
okFormat: (j, a) => {
|
|
315
315
|
const warns = formatWarnings(j);
|
|
316
316
|
if (j && typeof j.valid === "boolean") {
|