@cueframe/kernel 0.2.16 → 0.2.17
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 +15 -0
- 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-WTGUORWJ.js → chunk-26MBA3WH.js} +1 -1
- package/dist/{chunk-HA4S2ZGH.js → chunk-2R35PKNK.js} +4 -77
- package/dist/{chunk-YROOHMJG.js → chunk-3BCGHUJS.js} +1 -1
- package/dist/{chunk-S3PZFAF5.js → chunk-3IUVVVFE.js} +1 -1
- package/dist/{chunk-X6U6XVU4.js → chunk-4GSIXJ3I.js} +4 -4
- package/dist/{chunk-TARKDVP6.js → chunk-BAC7DKQZ.js} +5 -0
- package/dist/{chunk-ZFI3N2ID.js → chunk-CG2E43AN.js} +4 -4
- package/dist/{chunk-QWIK3HKM.js → chunk-D3GMN4WL.js} +1 -1
- package/dist/{chunk-HBT2OCUB.js → chunk-DEOP3TWR.js} +5 -5
- package/dist/{chunk-C4P4NC66.js → chunk-ENMY25I3.js} +1 -1
- package/dist/{chunk-IGP2CA7C.js → chunk-KSGREMGC.js} +1 -1
- package/dist/{chunk-O7G2NXUJ.js → chunk-MAD6MSXA.js} +1 -1
- package/dist/{chunk-TAXZ4KBF.js → chunk-MQO5T32S.js} +2 -2
- package/dist/{chunk-5CNS7IXO.js → chunk-OXHF3O5T.js} +1 -1
- package/dist/{chunk-QZR4JCFY.js → chunk-URUOXC3Z.js} +1 -1
- package/dist/chunk-WXHD6OUT.js +82 -0
- package/dist/{chunk-LQRW5UPR.js → chunk-ZYGUHMX6.js} +1 -1
- package/dist/component-runtime/render.js +2 -2
- package/dist/component-runtime/sourceAdmission.d.ts +1 -0
- package/dist/component-runtime/sourceAdmission.js +12 -0
- package/dist/component-runtime.js +8 -6
- package/dist/compose.js +11 -11
- package/dist/composition/fonts.js +3 -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 +3 -3
- package/dist/composition-ops.js +6 -6
- package/dist/composition.js +5 -5
- package/dist/{context-VHBMKP65.js → context-UE255PMJ.js} +5 -5
- package/dist/core/render.js +3 -3
- package/dist/core.js +3 -3
- package/dist/mcp/adapter.js +3 -3
- package/dist/mcp/server.js +2 -2
- package/dist/mcp.js +2 -2
- package/dist/primitives/captions.js +1 -1
- package/dist/primitives/effects.js +4 -4
- package/dist/primitives/layouts.js +3 -3
- package/dist/primitives/lib/index.js +11 -11
- package/dist/primitives/lib.js +11 -11
- package/dist/primitives/scenes.js +3 -3
- package/dist/primitives/ui-blocks.js +2 -2
- package/dist/primitives.js +8 -8
- package/dist/render-harness.js +9 -8
- package/package.json +14 -10
- package/dist/{chunk-XMAA2HYI.js → chunk-2P4NHHKR.js} +3 -3
- package/dist/{chunk-VLJOIUHL.js → chunk-A76GTLSA.js} +3 -3
|
@@ -148,3 +148,18 @@ export type StackFontFamily = {
|
|
|
148
148
|
kind: "unknown";
|
|
149
149
|
};
|
|
150
150
|
export declare function bundledFamilyForStack(stack: string | undefined | null): StackFontFamily;
|
|
151
|
+
/**
|
|
152
|
+
* The family name a font admission should be decided against, for any value an author can put in
|
|
153
|
+
* a `fontFamily` field.
|
|
154
|
+
*
|
|
155
|
+
* A stack that names a bundled family collapses to THAT family, because it is the file the render
|
|
156
|
+
* will draw with. Anything else — an unknown family, a generic-only stack, a `$brand:` ref — stays
|
|
157
|
+
* exactly as authored, so the refusal names what the author wrote and the sealed brand font
|
|
158
|
+
* manifest still gets its chance to admit it.
|
|
159
|
+
*
|
|
160
|
+
* Both admission paths need this and they must not answer differently: `assertCaptionFontsAdmitted`
|
|
161
|
+
* resolves the caption stack, and `Root.tsx`'s sweep of every other `fontFamily` in the render
|
|
162
|
+
* input did not — so `{ fontFamily: "Inter, sans-serif" }` was drawn as a caption and refused as an
|
|
163
|
+
* overlay param, with a message calling the whole stack "not a bundled family".
|
|
164
|
+
*/
|
|
165
|
+
export declare function admissibleFamilyForStack(stack: string): string;
|
package/dist/animate.js
CHANGED
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
useStage,
|
|
103
103
|
weightsAt,
|
|
104
104
|
worldTransform
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-ZYGUHMX6.js";
|
|
106
106
|
import {
|
|
107
107
|
DEFAULT_LIGHTING_PROFILE,
|
|
108
108
|
DEVICE_GLASS_OPACITY_ENCODED,
|
|
@@ -185,7 +185,7 @@ import {
|
|
|
185
185
|
selectSceneBakeScale
|
|
186
186
|
} from "./chunk-KKV5U5EA.js";
|
|
187
187
|
import "./chunk-2L7PYYJK.js";
|
|
188
|
-
import "./chunk-
|
|
188
|
+
import "./chunk-BAC7DKQZ.js";
|
|
189
189
|
import "./chunk-2ESYSVXG.js";
|
|
190
190
|
export {
|
|
191
191
|
ALLOWED_BAKE_SCALES,
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
buildPlannerTools,
|
|
5
5
|
buildToolsFromSchemas,
|
|
6
6
|
extractProviderError
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-OXHF3O5T.js";
|
|
8
|
+
import "../chunk-4GSIXJ3I.js";
|
|
9
9
|
import "../chunk-JOURGVOR.js";
|
|
10
10
|
import "../chunk-7AZLFN26.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-KSGREMGC.js";
|
|
12
|
+
import "../chunk-MQO5T32S.js";
|
|
13
|
+
import "../chunk-URUOXC3Z.js";
|
|
14
14
|
import "../chunk-WPZKOVYF.js";
|
|
15
15
|
import "../chunk-B7J5UUUV.js";
|
|
16
16
|
import "../chunk-KYRDKK2D.js";
|
|
17
17
|
import "../chunk-WREYUH2E.js";
|
|
18
18
|
import "../chunk-7PA7FGLD.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-BAC7DKQZ.js";
|
|
20
20
|
import "../chunk-2ESYSVXG.js";
|
|
21
21
|
export {
|
|
22
22
|
ZERO_USAGE,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildDirectorContext
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-3IUVVVFE.js";
|
|
4
|
+
import "../chunk-KSGREMGC.js";
|
|
5
|
+
import "../chunk-MQO5T32S.js";
|
|
6
|
+
import "../chunk-URUOXC3Z.js";
|
|
7
7
|
import "../chunk-WPZKOVYF.js";
|
|
8
8
|
import "../chunk-B7J5UUUV.js";
|
|
9
9
|
import "../chunk-KYRDKK2D.js";
|
|
10
10
|
import "../chunk-WREYUH2E.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-BAC7DKQZ.js";
|
|
12
12
|
import "../chunk-2ESYSVXG.js";
|
|
13
13
|
export {
|
|
14
14
|
buildDirectorContext
|
package/dist/authoring/tools.js
CHANGED
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
COMPOSE_ROLE_TOOLS,
|
|
7
7
|
COMPOSE_ROLE_TOOL_NAMES,
|
|
8
8
|
dispatchComposeRoleTool
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-4GSIXJ3I.js";
|
|
10
10
|
import "../chunk-JOURGVOR.js";
|
|
11
11
|
import "../chunk-7AZLFN26.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-KSGREMGC.js";
|
|
13
|
+
import "../chunk-MQO5T32S.js";
|
|
14
|
+
import "../chunk-URUOXC3Z.js";
|
|
15
15
|
import "../chunk-WPZKOVYF.js";
|
|
16
16
|
import "../chunk-B7J5UUUV.js";
|
|
17
17
|
import "../chunk-KYRDKK2D.js";
|
|
18
18
|
import "../chunk-WREYUH2E.js";
|
|
19
19
|
import "../chunk-7PA7FGLD.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-BAC7DKQZ.js";
|
|
21
21
|
import "../chunk-2ESYSVXG.js";
|
|
22
22
|
export {
|
|
23
23
|
COMPOSE_MOTION_TOOLS,
|
package/dist/authoring.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
buildPlannerTools,
|
|
12
12
|
buildToolsFromSchemas,
|
|
13
13
|
extractProviderError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OXHF3O5T.js";
|
|
15
15
|
import {
|
|
16
16
|
COMPOSE_MOTION_TOOLS,
|
|
17
17
|
COMPOSE_MOTION_VERIFY_TOOLS,
|
|
@@ -20,14 +20,14 @@ import {
|
|
|
20
20
|
COMPOSE_ROLE_TOOLS,
|
|
21
21
|
COMPOSE_ROLE_TOOL_NAMES,
|
|
22
22
|
dispatchComposeRoleTool
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-4GSIXJ3I.js";
|
|
24
24
|
import {
|
|
25
25
|
AgentFixableCaptureError,
|
|
26
26
|
getExcludedTools
|
|
27
27
|
} from "./chunk-JOURGVOR.js";
|
|
28
28
|
import {
|
|
29
29
|
buildDirectorContext
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-3IUVVVFE.js";
|
|
31
31
|
import {
|
|
32
32
|
buildFastModel,
|
|
33
33
|
buildModel,
|
|
@@ -48,16 +48,16 @@ import {
|
|
|
48
48
|
formatPlanSteps,
|
|
49
49
|
initCodeGenPrompts
|
|
50
50
|
} from "./chunk-Y4HPN4BC.js";
|
|
51
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-ENMY25I3.js";
|
|
52
52
|
import {
|
|
53
53
|
cssLayoutVars
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-MAD6MSXA.js";
|
|
55
55
|
import "./chunk-ILO4NEZ3.js";
|
|
56
56
|
import "./chunk-7AZLFN26.js";
|
|
57
57
|
import "./chunk-VG2ND6PX.js";
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-KSGREMGC.js";
|
|
59
|
+
import "./chunk-MQO5T32S.js";
|
|
60
|
+
import "./chunk-URUOXC3Z.js";
|
|
61
61
|
import "./chunk-WPZKOVYF.js";
|
|
62
62
|
import "./chunk-B7J5UUUV.js";
|
|
63
63
|
import "./chunk-KYRDKK2D.js";
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
isSceneShotClip
|
|
70
70
|
} from "./chunk-KKV5U5EA.js";
|
|
71
71
|
import "./chunk-2L7PYYJK.js";
|
|
72
|
-
import "./chunk-
|
|
72
|
+
import "./chunk-BAC7DKQZ.js";
|
|
73
73
|
import "./chunk-2ESYSVXG.js";
|
|
74
74
|
|
|
75
75
|
// ../authoring/src/agent.ts
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
assertSceneShotParamsAdmitted,
|
|
4
4
|
materializeComponentSource,
|
|
5
5
|
renderComponentAlpha
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D3GMN4WL.js";
|
|
7
7
|
import {
|
|
8
8
|
componentArtifactId,
|
|
9
9
|
componentBundleId,
|
|
@@ -11,6 +11,9 @@ import {
|
|
|
11
11
|
sha256Hex,
|
|
12
12
|
sourceVersionId
|
|
13
13
|
} from "./chunk-EXY4JJPH.js";
|
|
14
|
+
import {
|
|
15
|
+
assertSourceReadsDeclaredAssets
|
|
16
|
+
} from "./chunk-WXHD6OUT.js";
|
|
14
17
|
import {
|
|
15
18
|
resolvedComponentRenderer
|
|
16
19
|
} from "./chunk-C5MPFJCD.js";
|
|
@@ -24,79 +27,6 @@ import {
|
|
|
24
27
|
assertRendererReceiptMatches
|
|
25
28
|
} from "./chunk-ZVG446DJ.js";
|
|
26
29
|
|
|
27
|
-
// ../execution/component-runtime/src/sourceAdmission.ts
|
|
28
|
-
import { parse } from "@babel/parser";
|
|
29
|
-
function staticMember(node) {
|
|
30
|
-
if (!node || typeof node !== "object") return null;
|
|
31
|
-
const candidate = node;
|
|
32
|
-
if (candidate.type !== "MemberExpression" && candidate.type !== "OptionalMemberExpression") return null;
|
|
33
|
-
const property = candidate.property;
|
|
34
|
-
if (!property) return null;
|
|
35
|
-
const name = candidate.computed === true ? property.type === "StringLiteral" && typeof property.value === "string" ? property.value : null : property.type === "Identifier" && typeof property.name === "string" ? property.name : null;
|
|
36
|
-
return name === null ? null : { object: candidate.object, property: name };
|
|
37
|
-
}
|
|
38
|
-
function sourceAssetHandleReads(tsxSource) {
|
|
39
|
-
let root;
|
|
40
|
-
try {
|
|
41
|
-
root = parse(tsxSource, {
|
|
42
|
-
sourceType: "module",
|
|
43
|
-
plugins: ["jsx", "typescript"],
|
|
44
|
-
errorRecovery: false
|
|
45
|
-
});
|
|
46
|
-
} catch (error) {
|
|
47
|
-
throw new ComponentRuntimeError(
|
|
48
|
-
"component_does_not_compile",
|
|
49
|
-
error instanceof Error ? error.message : String(error),
|
|
50
|
-
{ cause: error }
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
const reads = /* @__PURE__ */ new Set();
|
|
54
|
-
const visit = (value) => {
|
|
55
|
-
if (!value || typeof value !== "object") return;
|
|
56
|
-
if (Array.isArray(value)) {
|
|
57
|
-
for (const child of value) visit(child);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
const node = value;
|
|
61
|
-
const leaf = staticMember(node);
|
|
62
|
-
if (leaf?.property === "handle") {
|
|
63
|
-
const slot = staticMember(leaf.object);
|
|
64
|
-
const rootObject = slot?.object;
|
|
65
|
-
if (slot && rootObject?.type === "Identifier" && rootObject.name === "assets") {
|
|
66
|
-
reads.add(slot.property);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
for (const [key, child] of Object.entries(node)) {
|
|
70
|
-
if (key === "loc" || key === "start" || key === "end" || key === "errors" || key === "comments") continue;
|
|
71
|
-
visit(child);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
visit(root);
|
|
75
|
-
return reads;
|
|
76
|
-
}
|
|
77
|
-
function missingDeclaredAssetHandleReads(tsxSource, manifest) {
|
|
78
|
-
const slots = Object.keys(manifest.assets);
|
|
79
|
-
if (slots.length === 0) return [];
|
|
80
|
-
const reads = sourceAssetHandleReads(tsxSource);
|
|
81
|
-
return slots.filter((slot) => !reads.has(slot));
|
|
82
|
-
}
|
|
83
|
-
function assertSourceReadsDeclaredAssets(source) {
|
|
84
|
-
const missing = missingDeclaredAssetHandleReads(source.tsxSource, source.manifest);
|
|
85
|
-
if (missing.length === 0) return;
|
|
86
|
-
throw new ComponentRuntimeError(
|
|
87
|
-
"invalid_component_source",
|
|
88
|
-
`The manifest declares asset slot(s) ${missing.map((slot) => JSON.stringify(slot)).join(", ")} but the source never reads ${missing.length === 1 ? "it" : "them"} through \`assets[slot].handle\`. Declared slots are delivered to the mount as \`assets[slot].handle\` (a fetchable URL for <Img>/<Video>/<Audio>); \`params\` is the clip's \`props\` and carries no asset URL. Mount as ({ durationInFrames, params, assets, render }) and read \`assets.${missing[0]}.handle\`.`,
|
|
89
|
-
{
|
|
90
|
-
locator: {
|
|
91
|
-
stage: "source-admission",
|
|
92
|
-
componentId: source.componentId,
|
|
93
|
-
path: "manifest.assets",
|
|
94
|
-
slots: missing
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
30
|
// ../execution/component-runtime/src/assetServer.ts
|
|
101
31
|
import { createHash, randomBytes } from "crypto";
|
|
102
32
|
import { createReadStream, realpathSync, statSync } from "fs";
|
|
@@ -465,9 +395,6 @@ function sourceIdentityForBake(request) {
|
|
|
465
395
|
}
|
|
466
396
|
|
|
467
397
|
export {
|
|
468
|
-
sourceAssetHandleReads,
|
|
469
|
-
missingDeclaredAssetHandleReads,
|
|
470
|
-
assertSourceReadsDeclaredAssets,
|
|
471
398
|
startComponentAssetServer,
|
|
472
399
|
parseAlphaOpaqueFractions,
|
|
473
400
|
bakeOpacityContradictsPolicy,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-W2245F6G.js";
|
|
25
25
|
import {
|
|
26
26
|
FlexLayout
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ZYGUHMX6.js";
|
|
28
28
|
|
|
29
29
|
// ../execution/primitives/src/layouts/chat-to-preview-layout/index.tsx
|
|
30
30
|
import { Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion";
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
} from "./chunk-7AZLFN26.js";
|
|
8
8
|
import {
|
|
9
9
|
selectAllOverlays
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KSGREMGC.js";
|
|
11
11
|
import {
|
|
12
12
|
ComposePlan
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MQO5T32S.js";
|
|
14
14
|
import {
|
|
15
15
|
OverlayClipSource
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-URUOXC3Z.js";
|
|
17
17
|
|
|
18
18
|
// ../authoring/src/tools/toolSets.ts
|
|
19
19
|
var COMPOSE_PLANNER_TOOLS = [
|
|
@@ -63,7 +63,7 @@ var COMPOSE_ROLE_TOOLS = Object.freeze({
|
|
|
63
63
|
schema: z.object({}),
|
|
64
64
|
metadata: { label: "Get Context" },
|
|
65
65
|
handler: async (_args, capabilities) => {
|
|
66
|
-
const { buildDirectorContext } = await import("./context-
|
|
66
|
+
const { buildDirectorContext } = await import("./context-UE255PMJ.js");
|
|
67
67
|
return buildDirectorContext(capabilities);
|
|
68
68
|
}
|
|
69
69
|
},
|
|
@@ -160,6 +160,10 @@ function bundledFamilyForStack(stack) {
|
|
|
160
160
|
}
|
|
161
161
|
return bundled ? { kind: "bundled", family: bundled } : { kind: "default" };
|
|
162
162
|
}
|
|
163
|
+
function admissibleFamilyForStack(stack) {
|
|
164
|
+
const resolved = bundledFamilyForStack(stack);
|
|
165
|
+
return resolved.kind === "bundled" ? resolved.family : stack;
|
|
166
|
+
}
|
|
163
167
|
|
|
164
168
|
// ../composition/src/fonts/captionFaces.ts
|
|
165
169
|
var CAPTION_FACE_DEFAULTS = Object.freeze({
|
|
@@ -406,6 +410,7 @@ export {
|
|
|
406
410
|
parseFontStack,
|
|
407
411
|
isGenericOnlyStack,
|
|
408
412
|
bundledFamilyForStack,
|
|
413
|
+
admissibleFamilyForStack,
|
|
409
414
|
CAPTION_FACE_DEFAULTS,
|
|
410
415
|
CAPTION_DEFAULT_FAMILY,
|
|
411
416
|
captionStackFamily,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EASING_BY_INTENT
|
|
3
|
-
} from "./chunk-MFHXCHRI.js";
|
|
4
1
|
import {
|
|
5
2
|
FitText
|
|
6
3
|
} from "./chunk-XHGZ2E77.js";
|
|
4
|
+
import {
|
|
5
|
+
EASING_BY_INTENT
|
|
6
|
+
} from "./chunk-MFHXCHRI.js";
|
|
7
7
|
import {
|
|
8
8
|
ACCENT,
|
|
9
9
|
ACCENT_STRONG,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
perspectiveFor,
|
|
27
27
|
resolveCamera,
|
|
28
28
|
useStage
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ZYGUHMX6.js";
|
|
30
30
|
|
|
31
31
|
// ../execution/primitives/src/effects/blur/index.tsx
|
|
32
32
|
import React2 from "react";
|
|
@@ -7,6 +7,10 @@ import {
|
|
|
7
7
|
flattenCompoundClips,
|
|
8
8
|
hasCompoundClips
|
|
9
9
|
} from "./chunk-QISFYLBB.js";
|
|
10
|
+
import {
|
|
11
|
+
compositionHasVo,
|
|
12
|
+
roleDefaultGainDb
|
|
13
|
+
} from "./chunk-VZ7TYX6Z.js";
|
|
10
14
|
import {
|
|
11
15
|
DOMINANCE_WEIGHTS,
|
|
12
16
|
ENTER_SEC,
|
|
@@ -25,10 +29,6 @@ import {
|
|
|
25
29
|
segmentShots,
|
|
26
30
|
stabilizeSelectionHysteresis
|
|
27
31
|
} from "./chunk-L2AHS3AW.js";
|
|
28
|
-
import {
|
|
29
|
-
compositionHasVo,
|
|
30
|
-
roleDefaultGainDb
|
|
31
|
-
} from "./chunk-VZ7TYX6Z.js";
|
|
32
32
|
import {
|
|
33
33
|
SHOT_SCALE_TARGET,
|
|
34
34
|
shotScaleZoom
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
bundledFontFaceExists,
|
|
62
62
|
mergedCaptionFaceIssues,
|
|
63
63
|
unrenderableFaceField
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-BAC7DKQZ.js";
|
|
65
65
|
|
|
66
66
|
// ../execution/core/src/render/sceneCaptureIdentity.ts
|
|
67
67
|
var INTENT_FIELDS = [
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
Format,
|
|
5
5
|
GraphicRole,
|
|
6
6
|
OpaqueId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-URUOXC3Z.js";
|
|
8
8
|
import {
|
|
9
9
|
brandKitCaptionFaceIssues
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BAC7DKQZ.js";
|
|
11
11
|
|
|
12
12
|
// ../composition/src/validators/composePlan.ts
|
|
13
13
|
import { z } from "zod";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ComponentRuntimeError
|
|
3
|
+
} from "./chunk-ZVG446DJ.js";
|
|
4
|
+
|
|
5
|
+
// ../execution/component-runtime/src/sourceAdmission.ts
|
|
6
|
+
import { parse } from "@babel/parser";
|
|
7
|
+
function staticMember(node) {
|
|
8
|
+
if (!node || typeof node !== "object") return null;
|
|
9
|
+
const candidate = node;
|
|
10
|
+
if (candidate.type !== "MemberExpression" && candidate.type !== "OptionalMemberExpression") return null;
|
|
11
|
+
const property = candidate.property;
|
|
12
|
+
if (!property) return null;
|
|
13
|
+
const name = candidate.computed === true ? property.type === "StringLiteral" && typeof property.value === "string" ? property.value : null : property.type === "Identifier" && typeof property.name === "string" ? property.name : null;
|
|
14
|
+
return name === null ? null : { object: candidate.object, property: name };
|
|
15
|
+
}
|
|
16
|
+
function sourceAssetHandleReads(tsxSource) {
|
|
17
|
+
let root;
|
|
18
|
+
try {
|
|
19
|
+
root = parse(tsxSource, {
|
|
20
|
+
sourceType: "module",
|
|
21
|
+
plugins: ["jsx", "typescript"],
|
|
22
|
+
errorRecovery: false
|
|
23
|
+
});
|
|
24
|
+
} catch (error) {
|
|
25
|
+
throw new ComponentRuntimeError(
|
|
26
|
+
"component_does_not_compile",
|
|
27
|
+
error instanceof Error ? error.message : String(error),
|
|
28
|
+
{ cause: error }
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
const reads = /* @__PURE__ */ new Set();
|
|
32
|
+
const visit = (value) => {
|
|
33
|
+
if (!value || typeof value !== "object") return;
|
|
34
|
+
if (Array.isArray(value)) {
|
|
35
|
+
for (const child of value) visit(child);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const node = value;
|
|
39
|
+
const leaf = staticMember(node);
|
|
40
|
+
if (leaf?.property === "handle") {
|
|
41
|
+
const slot = staticMember(leaf.object);
|
|
42
|
+
const rootObject = slot?.object;
|
|
43
|
+
if (slot && rootObject?.type === "Identifier" && rootObject.name === "assets") {
|
|
44
|
+
reads.add(slot.property);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
for (const [key, child] of Object.entries(node)) {
|
|
48
|
+
if (key === "loc" || key === "start" || key === "end" || key === "errors" || key === "comments") continue;
|
|
49
|
+
visit(child);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
visit(root);
|
|
53
|
+
return reads;
|
|
54
|
+
}
|
|
55
|
+
function missingDeclaredAssetHandleReads(tsxSource, manifest) {
|
|
56
|
+
const slots = Object.keys(manifest.assets);
|
|
57
|
+
if (slots.length === 0) return [];
|
|
58
|
+
const reads = sourceAssetHandleReads(tsxSource);
|
|
59
|
+
return slots.filter((slot) => !reads.has(slot));
|
|
60
|
+
}
|
|
61
|
+
function assertSourceReadsDeclaredAssets(source) {
|
|
62
|
+
const missing = missingDeclaredAssetHandleReads(source.tsxSource, source.manifest);
|
|
63
|
+
if (missing.length === 0) return;
|
|
64
|
+
throw new ComponentRuntimeError(
|
|
65
|
+
"invalid_component_source",
|
|
66
|
+
`The manifest declares asset slot(s) ${missing.map((slot) => JSON.stringify(slot)).join(", ")} but the source never reads ${missing.length === 1 ? "it" : "them"} through \`assets[slot].handle\`. Declared slots are delivered to the mount as \`assets[slot].handle\` (a fetchable URL for <Img>/<Video>/<Audio>); \`params\` is the clip's \`props\` and carries no asset URL. Mount as ({ durationInFrames, params, assets, render }) and read \`assets.${missing[0]}.handle\`.`,
|
|
67
|
+
{
|
|
68
|
+
locator: {
|
|
69
|
+
stage: "source-admission",
|
|
70
|
+
componentId: source.componentId,
|
|
71
|
+
path: "manifest.assets",
|
|
72
|
+
slots: missing
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
sourceAssetHandleReads,
|
|
80
|
+
missingDeclaredAssetHandleReads,
|
|
81
|
+
assertSourceReadsDeclaredAssets
|
|
82
|
+
};
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
stagedBrowserLocator,
|
|
27
27
|
verifyLocalStagedBrowser,
|
|
28
28
|
vp9AlphaFfmpegOverride
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-D3GMN4WL.js";
|
|
30
30
|
import "../chunk-WB2VFDQZ.js";
|
|
31
31
|
import "../chunk-EXY4JJPH.js";
|
|
32
32
|
import "../chunk-DAARYRNT.js";
|
|
@@ -35,7 +35,7 @@ import "../chunk-C5MPFJCD.js";
|
|
|
35
35
|
import "../chunk-ZVG446DJ.js";
|
|
36
36
|
import "../chunk-KKV5U5EA.js";
|
|
37
37
|
import "../chunk-2L7PYYJK.js";
|
|
38
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-BAC7DKQZ.js";
|
|
39
39
|
import "../chunk-2ESYSVXG.js";
|
|
40
40
|
export {
|
|
41
41
|
COMPONENT_BROWSER_CLEANUP_TIMEOUT_MS,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../_members/component-runtime/sourceAdmission.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertSourceReadsDeclaredAssets,
|
|
3
|
+
missingDeclaredAssetHandleReads,
|
|
4
|
+
sourceAssetHandleReads
|
|
5
|
+
} from "../chunk-WXHD6OUT.js";
|
|
6
|
+
import "../chunk-ZVG446DJ.js";
|
|
7
|
+
import "../chunk-2ESYSVXG.js";
|
|
8
|
+
export {
|
|
9
|
+
assertSourceReadsDeclaredAssets,
|
|
10
|
+
missingDeclaredAssetHandleReads,
|
|
11
|
+
sourceAssetHandleReads
|
|
12
|
+
};
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertAssetBindingsMatch,
|
|
3
3
|
assertComponentOutputProbe,
|
|
4
|
-
assertSourceReadsDeclaredAssets,
|
|
5
4
|
bakeComponentAlphaV2,
|
|
6
5
|
bakeOpacityContradictsPolicy,
|
|
7
|
-
missingDeclaredAssetHandleReads,
|
|
8
6
|
parseAlphaOpaqueFractions,
|
|
9
|
-
sourceAssetHandleReads,
|
|
10
7
|
sourceIdentityForBake,
|
|
11
8
|
startComponentAssetServer,
|
|
12
9
|
verifyComponentOutput
|
|
13
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2R35PKNK.js";
|
|
14
11
|
import {
|
|
15
12
|
COMPONENT_MEDIA_HEADROOM,
|
|
16
13
|
COMPONENT_MEDIA_TIERS,
|
|
@@ -55,7 +52,7 @@ import {
|
|
|
55
52
|
stagedBrowserLocator,
|
|
56
53
|
verifyLocalStagedBrowser,
|
|
57
54
|
vp9AlphaFfmpegOverride
|
|
58
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-D3GMN4WL.js";
|
|
59
56
|
import "./chunk-WB2VFDQZ.js";
|
|
60
57
|
import {
|
|
61
58
|
bundleIdentityFields,
|
|
@@ -72,6 +69,11 @@ import {
|
|
|
72
69
|
COMPONENT_IMPORT_ALLOWLIST,
|
|
73
70
|
assertComponentImportsAllowed
|
|
74
71
|
} from "./chunk-5NGYBI5Z.js";
|
|
72
|
+
import {
|
|
73
|
+
assertSourceReadsDeclaredAssets,
|
|
74
|
+
missingDeclaredAssetHandleReads,
|
|
75
|
+
sourceAssetHandleReads
|
|
76
|
+
} from "./chunk-WXHD6OUT.js";
|
|
75
77
|
import {
|
|
76
78
|
HALF_FLOAT_COLOR_TARGET_EXTENSIONS,
|
|
77
79
|
admittedHost,
|
|
@@ -127,7 +129,7 @@ import {
|
|
|
127
129
|
} from "./chunk-ZVG446DJ.js";
|
|
128
130
|
import "./chunk-KKV5U5EA.js";
|
|
129
131
|
import "./chunk-2L7PYYJK.js";
|
|
130
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-BAC7DKQZ.js";
|
|
131
133
|
import "./chunk-2ESYSVXG.js";
|
|
132
134
|
export {
|
|
133
135
|
CANVAS2D_COMPONENT_MANIFEST_V2,
|