@cueframe/kernel 0.2.15 → 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/animate/index.d.ts +1 -1
- package/dist/_members/animate/three/FrameDepthOfField.d.ts +8 -0
- package/dist/_members/animate/three/depthOfFieldPipeline.d.ts +29 -0
- package/dist/_members/animate/three/index.d.ts +1 -0
- package/dist/_members/component-runtime/allowedImports.d.ts +1 -1
- package/dist/_members/component-runtime/allowedImports.d.ts.map +1 -1
- package/dist/_members/component-runtime/bake.d.ts.map +1 -1
- package/dist/_members/component-runtime/index.d.ts +1 -0
- package/dist/_members/component-runtime/index.d.ts.map +1 -1
- package/dist/_members/component-runtime/localRoot.d.ts +10 -0
- package/dist/_members/component-runtime/localRoot.d.ts.map +1 -1
- package/dist/_members/component-runtime/sourceAdmission.d.ts +12 -0
- package/dist/_members/component-runtime/sourceAdmission.d.ts.map +1 -0
- package/dist/_members/composition/fonts/bundledFaces.d.ts +15 -0
- package/dist/animate.js +4 -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-RKDXNYLE.js → chunk-26MBA3WH.js} +1 -1
- package/dist/{chunk-IUIG5N6M.js → chunk-2R35PKNK.js} +5 -1
- package/dist/{chunk-MDFKDTPF.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-A74FZCPY.js → chunk-5NGYBI5Z.js} +2 -1
- package/dist/{chunk-TARKDVP6.js → chunk-BAC7DKQZ.js} +5 -0
- package/dist/{chunk-QLHATEZI.js → chunk-CG2E43AN.js} +1 -1
- package/dist/{chunk-KBMKQGFR.js → chunk-D3GMN4WL.js} +35 -9
- package/dist/{chunk-5DSHDRPQ.js → chunk-DEOP3TWR.js} +9 -9
- 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-6BZZWF5B.js → chunk-ZYGUHMX6.js} +213 -81
- package/dist/component-runtime/importPolicy.js +1 -1
- package/dist/component-runtime/render.js +3 -3
- package/dist/component-runtime/sourceAdmission.d.ts +1 -0
- package/dist/component-runtime/sourceAdmission.js +12 -0
- package/dist/component-runtime.js +12 -4
- package/dist/compose.js +12 -12
- 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 +3 -3
- 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 +4 -4
- package/dist/primitives.js +10 -10
- package/dist/render-harness.js +10 -9
- package/package.json +25 -17
- package/dist/{chunk-XMAA2HYI.js → chunk-2P4NHHKR.js} +3 -3
- package/dist/{chunk-B3GSTQLR.js → chunk-A76GTLSA.js} +3 -3
|
@@ -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
|
+
};
|